[vlc-devel] [PATCH 00/12] Support input with a high number of channels
Thomas Guillem
thomas at gllm.fr
Fri Jul 7 15:39:47 CEST 2017
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
More information about the vlc-devel
mailing list