[pulseaudio-discuss] [PATCH 0/2] refactor calc_map_table(), build clipping-free mapping matrices

Stefan Huber s.huber at bct-electronic.com
Tue Feb 5 11:55:02 PST 2013


The following patch series comprises two patches: The first patch refactors
calc_map_table() in order to reduce code complexity without altering the logic
implemented. In particular, I have checked that the output of
src/tests/remix-test.c is the same.


The second patch proposes a genuine change in the logic of calc_map_table() and
something between an actual patch and an RFC:

The current code frequently produces channel mixing matrices whose rows sum up
to a value beyond 1.0, especially in the presence of center and LFE channels.
This can easily cause aweful clipping. The changes proposed guarantee that the
row sum results in 1.0 (resp. 0.0), see details in the commit message.

Note that there is a simple alternative to the method above: An additional
post-processing step could normalize each row. However, it seems to me that by
this method the actual problem is only hidden behind the normalization.


Stefan Huber (2):
  resampler: refactor calc_map_table()
  resampler: generate normalized rows in calc_map_table()

 src/pulsecore/resampler.c |  432 ++++++++++++++++++++++-----------------------
 1 file changed, 209 insertions(+), 223 deletions(-)

-- 
1.7.9.5



More information about the pulseaudio-discuss mailing list