]> code.delx.au - pulseaudio/commit
resampler: Resample first followed by remapping if have more out channels than in...
authorPeter Meerwald <p.meerwald@bct-electronic.com>
Wed, 13 Feb 2013 16:26:57 +0000 (17:26 +0100)
committerTanu Kaskinen <tanuk@iki.fi>
Fri, 15 Feb 2013 19:27:07 +0000 (21:27 +0200)
commit30ce3a14e5ae1cd316a18bec95b831c07ac57a1a
tree192251f79491c495f8594762dd78955599e67397
parent505a57d32d8c49ddfeca928ed988ba3b279aff3e
resampler: Resample first followed by remapping if have more out channels than in channels

The patch intends to reduce computational load when resampling AND remapping. The PA
resampler performs the following steps:

sample format conversion -> remapping -> resampling -> sample format conversion

In case the number of output channels is higher than the number of input channels, the
resampler has to be run more often than necessary. E.g. in case of mono to 4-channel remapping,
the resampler runs on 4 channels separately.

To ímprove this, the PA resampler pipeline is made adaptive:

if out-channels <= in-channels:
sample format conversion -> remapping -> resampling -> sample format conversion
if out-channels > in-channels:
sample format conversion -> resampling -> remapping -> sample format conversion

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
src/pulsecore/resampler.c