<html><head></head><body><div class="gmail_quote">Le 7 juillet 2017 16:39:47 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">This set of patches add supports for input with a number of channels superior<br />to AOUT_CHAN_MAX.<br /><br />Wav inputs can have up to 32 channels. VLC audio output can handle up to 9<br />physical channels. Maybe one day we'll increase it to 18 (for<br />WAVE_SPEAKER_TOP_*), but this is not what this set is doing.<br /><br />Instead of dropping the audio completely when the number of channels if too<br />big, this set keep the input untouched until it's passed to the aout. Then, a<br />filter will be inserted to handle it.<br /><br />The big change of this set concerns audio_format_t.i_physical_channels and<br />audio_format.i_channels.<br /><br /> - Audio outputs have to setup a valid i_physical_channels, in that case,<br />   i_channels will match.<br /><br /> - Input (codec or demux) can either set i_physical_channels or i_channels. If<br />   i_physical_channels is set: i_channels will be overridden by<br />   aout_FormatPrepare(). In that case the input know the channel layout. If<br />   i_physical_channels is not set but i_channels is, the input doesn't know the<br />   channel layout. VLC will assume that the channel layout is in wg4 order and<br />   try to output something (I think it's better than nothing).<br /><br />This patch is needed to add ambisonics supports since ambisonics input will<br />often have a very high numbers of channels that is superior to AOUT_CHAN_MAX.<br /><br />Best regards,<br />Thomas.<br /><br />Thomas Guillem (12):<br />  bandlimited: requires a valid physical channel layout<br />  soxr: requires a valid physical channel layout<br />  speex: requires a valid physical channel layout<br />  ugly: requires a valid physical channel layout<br />  src: requires a valid physical channel layout<br />  trivial: add support for unknown channel layout<br />  aout: add aout_SetDefaultPhysicalChannels<br />  aout: support unknown channel layout<br />  aout: add an extra assert<br />  demux: wav: supports inputs with channels > AOUT_CHAN_MAX<br />  codec: araw: supports output with channels > AOUT_CHAN_MAX<br />  codec: avcodec: supports output with channels > AOUT_CHAN_MAX<br /><br /> include/vlc_aout.h                           |  9 +++++<br /> modules/audio_filter/channel_mixer/trivial.c | 53 ++++++++++++++++++++++++++++<br /> modules/audio_filter/resampler/bandlimited.c |  3 +-<br /> modules/audio_filter/resampler/soxr.c        |  3 +-<br /> modules/audio_filter/resampler/speex.c       |  3 +-<br /> modules/audio_filter/resampler/src.c         |  3 +-<br /> modules/audio_filter/resampler/ugly.c        |  3 +-<br /> modules/codec/araw.c                         | 33 ++++++++++-------<br /> modules/codec/avcodec/audio.c                | 28 +++++++++------<br /> modules/demux/wav.c                          |  6 ++--<br /> src/audio_output/dec.c                       | 18 +++++++---<br /> src/audio_output/filters.c                   | 26 ++++++++++++--<br /> src/audio_output/output.c                    |  1 +<br /> 13 files changed, 152 insertions(+), 37 deletions(-)<br /></pre></blockquote></div><br clear="all">The channel limit is not only related to the physical mask. It also avoids integer overflow notably in multiplication with the sample rate. And then I guess it is sometimes used to dimension tables. You can't simply remove the limit: a reasonable limit is still needed.<br>
-- <br>
Rémi Denis-Courmont<br>
Typed on an inconvenient virtual keyboard</body></html>