[vlc-devel] [PATCH 00/12] Support input with a high number of channels

Rémi Denis-Courmont remi at remlab.net
Fri Jul 7 17:02:13 CEST 2017


Le 7 juillet 2017 16:39:47 GMT+03:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>This set of patches add supports for input with a number of channels
>superior
>to AOUT_CHAN_MAX.
>
>Wav inputs can have up to 32 channels. VLC audio output can handle up
>to 9
>physical channels. Maybe one day we'll increase it to 18 (for
>WAVE_SPEAKER_TOP_*), but this is not what this set is doing.
>
>Instead of dropping the audio completely when the number of channels if
>too
>big, this set keep the input untouched until it's passed to the aout.
>Then, a
>filter will be inserted to handle it.
>
>The big change of this set concerns audio_format_t.i_physical_channels
>and
>audio_format.i_channels.
>
>- Audio outputs have to setup a valid i_physical_channels, in that
>case,
>   i_channels will match.
>
>- Input (codec or demux) can either set i_physical_channels or
>i_channels. If
>   i_physical_channels is set: i_channels will be overridden by
>aout_FormatPrepare(). In that case the input know the channel layout.
>If
>i_physical_channels is not set but i_channels is, the input doesn't
>know the
>channel layout. VLC will assume that the channel layout is in wg4 order
>and
>   try to output something (I think it's better than nothing).
>
>This patch is needed to add ambisonics supports since ambisonics input
>will
>often have a very high numbers of channels that is superior to
>AOUT_CHAN_MAX.
>
>Best regards,
>Thomas.
>
>Thomas Guillem (12):
>  bandlimited: requires a valid physical channel layout
>  soxr: requires a valid physical channel layout
>  speex: requires a valid physical channel layout
>  ugly: requires a valid physical channel layout
>  src: requires a valid physical channel layout
>  trivial: add support for unknown channel layout
>  aout: add aout_SetDefaultPhysicalChannels
>  aout: support unknown channel layout
>  aout: add an extra assert
>  demux: wav: supports inputs with channels > AOUT_CHAN_MAX
>  codec: araw: supports output with channels > AOUT_CHAN_MAX
>  codec: avcodec: supports output with channels > AOUT_CHAN_MAX
>
> include/vlc_aout.h                           |  9 +++++
>modules/audio_filter/channel_mixer/trivial.c | 53
>++++++++++++++++++++++++++++
> modules/audio_filter/resampler/bandlimited.c |  3 +-
> modules/audio_filter/resampler/soxr.c        |  3 +-
> modules/audio_filter/resampler/speex.c       |  3 +-
> modules/audio_filter/resampler/src.c         |  3 +-
> modules/audio_filter/resampler/ugly.c        |  3 +-
> modules/codec/araw.c                         | 33 ++++++++++-------
> modules/codec/avcodec/audio.c                | 28 +++++++++------
> modules/demux/wav.c                          |  6 ++--
> src/audio_output/dec.c                       | 18 +++++++---
> src/audio_output/filters.c                   | 26 ++++++++++++--
> src/audio_output/output.c                    |  1 +
> 13 files changed, 152 insertions(+), 37 deletions(-)
>
>-- 
>2.11.0
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

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.
-- 
Rémi Denis-Courmont
Typed on an inconvenient virtual keyboard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170707/dfe87e4f/attachment.html>


More information about the vlc-devel mailing list