summaryrefslogtreecommitdiff
path: root/libavcodec/libfdk-aacdec.c
Commit message (Collapse)AuthorAge
* libfdk-aacdec: Remove unused variableVittorio Giovara2015-08-31
|
* libfdk-aacdec: Clean up properly if the init failsMartin Storsjö2015-08-16
| | | | | | | | | Previously most of the error paths leaked. Also add FF_CODEC_CAP_INIT_THREADSAFE while adding caps_internal; this decoder wrapper doesn't have any static data that is initialized. Signed-off-by: Martin Storsjö <martin@martin.st>
* libfdk-aacdec: Always decode into an intermediate bufferMartin Storsjö2015-08-16
| | | | | | | | | | | | | | | | | | | | For ADTS streams, the output format (number of channels, frame size) can change at any point (with the latest version of fdk-aac, the decoder seems to change format after a handful of frames, not outputting the right format immediately, for cases that worked fine with the earlier version of the lib). Previously, the decoder decoded straight into the output frame once the number of channels and frame size was known. This obviously does not work if the number of channels or frame size changes. The alternative would be to allocate the AVFrame with the maximum number of channels and frame size, and change them afterward decoding into it, but that may cause confusion to users e.g. of the get_buffer callback. This solution should be more robust. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* libfdk-aacdec: Bump the max number of channels to 8Martin Storsjö2015-08-16
| | | | | | | | | In the latest version of fdk-aac, the decoder can output up to 8 channels; take this into account when preallocating buffers that need to fit the output from any packet. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-27
| | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* libfdk-aacdec: Make sure decoding doesn't add any extra delay in the latest ↵Martin Storsjö2015-01-08
| | | | | | | | | | | version of fdk-aac The latest version added support for a new option for enabling a signal level limiter, which adds some extra delay. In fdk-aac, this is enabled by default, but disable it by default here since we'd rather have zero-delay decoding. Signed-off-by: Martin Storsjö <martin@martin.st>
* libfdk-aacdec: Fix a boundary checkMartin Storsjö2014-12-10
| | | | | | | | | This avoids potential out of bounds writes, with potential future versions of the library. Bug-Id: CID 1254945 CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* libfdk-aacdec: Support building with the latest version of fdk-aacMartin Storsjö2014-11-10
| | | | | | | | | | | | | | The latest fdk-aac code drop (from android 5.0) changed the channel layout enums (changing the value of existing enum constants), and renamed the option for downmixing. The failsafe comparison between ctype and FF_ARRAY_ELEMS(channel_counts) can trigger warnings (-Wtautological-constant-out-of-range-compare) when building with the old FDK AAC releases, where it can't be out of range with the enum values used there. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* libfdk-aacdec: Enable Dynamic Range Control Metadata SupportOmer Osman2014-10-17
| | | | | | | | | | For streams which contain DRC metadata, the FDK decoder is able to control rendering of the decoded output. The rendering parameters are detailed in fdk_aac_dec_options []. The default behavior is left up to the decoder. Signed-off-by: Martin Storsjö <martin@martin.st>
* libfdk-aacdec: Enable Decoder Downmix including Downmix Metadata SupportOmer Osman2014-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* libfdk-aacdec: Decode the first AAC frame to reliably identify the bitstreamOmer Osman2014-07-07
| | | | | | | | | | | | For implicit signaling cases (as possible for Spectral Band Replication and Parametric Stereo Tools), the decoder must decode the first frame to correctly identify the stream configuration (as called from avformat_find_stream_info). The mechanism for this is built-in and only requires adding CODEC_CAP_CHANNEL_CONF to the libfdk-aacdec AVCodec struct. Signed-off-by: Omer Osman <omer.osman@iis.fraunhofer.de> Signed-off-by: Martin Storsjö <martin@martin.st>
* libfdk-aacdec: Reduce the default decoder delay by one frameOmer Osman2014-07-05
| | | | | | | | | | | | | The default error concealment method if none is set via aacDecoder_SetParam(AAC_CONCEAL_METHOD) is set in CConcealment_InitCommonData within the fdk-aac library and is set to Energy Interpolation. This method requires one frame delay to the output. To reduce the default decoder output delay and avoid missing the last frame in file based decoding, use Noise Substitution as the default concealment method. Signed-off-by: Omer Osman <omer.osman@iis.fraunhofer.de> Signed-off-by: Martin Storsjö <martin@martin.st>
* libfdk-aac: Relicense the library wrappers to the ISC licenseMartin Storsjö2014-06-06
| | | | | | | | | | | This reduces the number of different licenses used within libav, and is preferrable since it has less ambiguous wordings than the BSD license with respect to the duties of the user of the code. Fraunhofer have now indicated that they're allowed to contribute code under this license as well. Signed-off-by: Martin Storsjö <martin@martin.st>
* libfdk-aac: Relicense the library wrappers to 2-clause BSDMartin Storsjö2014-05-05
| | | | | | | | | This should make it possible for Fraunhofer to contribute to these wrappers - they didn't want to contribute to code under LGPL2.1 with the "or any later version" clause (which allowed using the code under the LGPL3 license). Signed-off-by: Martin Storsjö <martin@martin.st>
* libfdk-aacdec: formatting cosmeticsDiego Biurrun2013-08-23
|
* Add a libfdk-aac decoderMartin Storsjö2013-08-20
This can be useful for decoding AAC object types that are not supported by the native AAC decoder, e.g. AAC-LD and AAC-ELD.