]> git.sesse.net Git - ffmpeg/commit
libfdk-aacdec: Enable Decoder Downmix including Downmix Metadata Support
authorOmer Osman <omer.osman@iis.fraunhofer.de>
Tue, 14 Oct 2014 14:43:07 +0000 (16:43 +0200)
committerMartin Storsjö <martin@martin.st>
Fri, 17 Oct 2014 12:48:30 +0000 (15:48 +0300)
commitb01a2204b5cff7bb920f42fda1bb0103f450fe93
tree9f3f9d6931c0538e67a79bcde15c092532233f73
parente65c776d18dc14df8a279e017760862f9fc8763b
libfdk-aacdec: Enable Decoder Downmix including Downmix Metadata Support

The FDK decoder is capable of producing mono and stereo downmix from
multichannel streams. These streams may contain metadata that control
the downmix process. The decoder requires an Ancillary Buffer in order to
correctly apply downmix in streams containing downmix Metadata. The
decoder does not have an API interface to inform of the presence of
Metadata in the stream, and therefore the Ancillary Buffer is always
allocated whenever a downmix is requested.

When downmixing multichannel streams, the decoder requires the output
buffer in aacDecoder_DecodeFrame call to be of fixed size in order to
hold the actual number of channels contained in the stream. For example,
for a 5.1ch to stereo downmix, the decoder requires that the output buffer
is allocated for 6 channels, regardless of the fact that the output is in
fact two channels.

Due to this requirement, the output buffer is allocated for the maximum
output buffer size in case a downmix is requested (and also during
decoder init). When a downmix is requested, the buffer used for output
during init will also be used for the entire duration the decoder is open.
Otherwise, the initial decoder output buffer is freed and the decoder
decodes straight into the output AVFrame.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/libfdk-aacdec.c
libavcodec/version.h