Commit Graph

89 Commits

Author SHA1 Message Date
Martin Storsjö 9cf0841ef3 dsputil: Add ff_ prefix to the dsputil*_init* functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:34 +02:00
Alex Converse 7b05025856 aacdec: Unify preconfigured layout and PCE layout. 2012-02-09 13:33:07 -08:00
Alex Converse f1ecd0802d aacdec: Support native channel layout when requested. 2012-02-09 13:33:07 -08:00
Alex Converse 37bed6ff3f aacdec: Try to sniff a reasonable channel layout for PCE based configurations.
This changes the output order of multichannel PCE based streams.
2012-02-09 13:33:06 -08:00
Alex Converse 8ece266213 aacdec: Remove incorrect comment.
It was only correct when element ids met very specific criteria.
2012-02-08 09:56:37 -08:00
Alex Converse e600a1e44a aacdec: Simplify output configuration. 2012-02-08 09:56:37 -08:00
Alex Converse b5fc571e4f latmdec: Check AudioSpecificConfig length before decoding extradata.
This is different than a normal get_bits() over read because
decode_audio_specific_config() creates its own GetBitContext.

Fixes Bug 170.
2012-01-11 14:40:47 -08:00
Alex Converse 4acd43a295 aacdec: Turn off PS for multichannel files that use PCE based configs.
Fixes al_sbr_cm_48_5.1.mp4.
2012-01-09 11:04:05 -08:00
Martin Storsjö 132846b0c8 aacdec: Handle new extradata passed as side data
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-12-21 22:52:39 +02:00
Alex Converse 021914e27f aacdec: Cleanup decode_ics_info.
Remove unused function argument.
Return an AVERROR.
Don't zero out ICS on failure.
2011-12-20 18:32:41 -08:00
Alex Converse 5cd56e193f aacdec: Use intfloat.h rather than local punning union. 2011-12-12 21:36:54 -08:00
Janne Grunau d268b79e34 aac_latm: reconfigure decoder on audio specific config changes 2011-12-03 00:42:48 +01:00
Janne Grunau fd095539d1 latmdec: fix audio specific config parsing
Pass the correct size in bits to mpeg4audio_get_config and add a flag
to disable parsing of the sync extension when the size is not known.

Latm with AudioMuxVersion 0 does not specify the size of the audio
specific config. Data after the audio specific config can be
misinterpreted as sync extension resulting in random and wrong configs.
2011-12-03 00:42:48 +01:00
Justin Ruggles 0eea212943 Add avcodec_decode_audio4().
Deprecate avcodec_decode_audio3().
Implement audio support in avcodec_default_get_buffer().
Implement the new audio decoder API in all audio decoders.
2011-12-02 17:40:40 -05:00
Alex Converse 963f685535 aacdec: Fix PS in ADTS.
Fixes File1.aac and Bug 80.
2011-11-22 14:33:11 -08:00
Michael Niedermayer bc2dd36740 aacdec: allow output reconfiguration on channel changes
Locking the decoder against channel config changes in
parse_adts_frame_header() seems to be unnecessary and
streams with channel config changes are reported.

The sample in http://roundup.libav.org/issue999 still works.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-28 22:44:59 +02:00
Justin Ruggles 71ccfb3f14 aac_latm: remove unneeded check for zero-size packet.
This is already checked by avcodec_decode_audio3()
2011-10-26 12:21:18 -04:00
Janne Grunau 28287045ca cosmetics: simplify latm_decode_init 2011-10-25 12:08:21 +02:00
Janne Grunau 785f876cee latm: avoid unnecessary reinit of the aac decoder 2011-10-25 12:08:21 +02:00
Janne Grunau 80e36425fb aacdec: initialize sbr context only in new channel elements 2011-10-25 12:07:58 +02:00
Dustin Brody 9abc98737f lavc: replace references to deprecated AVCodecContext.error_recognition to use AVCodecContext.err_recognition
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-22 14:49:55 +02:00
Anton Khirnov 59a9a23581 lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf.
Specifically, ff_mpeg4audio_sample_rates, ff_mpeg4audio_get_config and
ff_copy_pce_data
2011-10-20 21:06:57 +02:00
Anton Khirnov 73ae27e17b lavc: use avpriv_ prefix for ff_aac_parse_header().
It's used in lavf.
2011-10-20 21:06:57 +02:00
Mans Rullgard d12294304a aacdec: fix undefined shifts
Since nnz can be zero, this is needed to avoid a shift by 32.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-08 20:03:55 +01:00
Alex Converse 44920d04ba aac: Only set sample rate and object type from ADTS if output hasn't been configured.
Long term it would be nice to support error resilient reconfiguration
but right now setting this every frame does more harm than help.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-08-18 22:29:41 +02:00
Alex Converse 06d37fede4 aac: Set SBR and PS to unsignalled during headerless and ADTS initialization.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-08-18 22:29:41 +02:00
Alex Converse d8425ed4af aac: Only output configure if audio was found.
Audio found is not triggered on a CCE because a CCE alone has no output.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-08-18 22:29:41 +02:00
Alex Converse 94d47382e0 aac: Don't attempt to output configure an invalid channel configuration. 2011-08-09 12:16:40 -07:00
Dustin Brody 680b1852ab aac: propagate error return values for AV_LOG_ERROR-triggering events 2011-08-05 12:35:49 -07:00
Alex Converse a6c49f18ab aac: Remove some suspicious illegal memcpy()s from LTP. 2011-08-01 09:39:33 -07:00
Anton Khirnov ec6402b7c5 lavc: use designated initialisers for all codecs.
It's more readable and less prone to breakage.
2011-07-29 08:42:34 +02:00
Alex Converse a58858d60d lavf: Cleanup try_decode_frame() logic.
This fixes AAC playback in ffplay.
2011-07-13 10:39:06 -07:00
Benjamin Larsson dafaef2fe1 Add support for aac streams in mp4/mov without extradata. 2011-06-30 10:10:26 -07:00
Justin Ruggles e6c52cee54 Replace usages of av_get_bits_per_sample_fmt() with av_get_bytes_per_sample().
av_get_bits_per_sample_fmt() is deprecated.
2011-06-20 18:56:06 -04:00
Justin Ruggles cef7d70181 aacdec: fix typo in scalefactor clipping check 2011-05-23 15:56:52 -04:00
Ronald S. Bultje 42da8ea8e8 LATM/AAC: Free previously initialized context on reinit.
Fixes memory leaks which are the result of overwriting already-initialized
MDCT contexts during context reinitialization, e.g. in valgrind
fate-aac-latm_000000001180bc60.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-20 18:24:53 +02:00
Justin Ruggles 9aa8193a23 Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis
decoders.

Based on patches by clsid2 in ffdshow-tryout.
2011-05-18 17:27:06 -04:00
Justin Ruggles 033a4a942a aacdec: Use float instead of int16_t for ltp_state to avoid needless rounding. 2011-05-15 17:42:05 -04:00
Alex Converse 767848d761 aacdec: remove sf_scale and sf_offset.
Instead, scalefactors are adjusted by the offset amount, removing the need
for sf_scale, and the MDCT scales are adjusted to compensate for the higher
scalefactors. Floating-point output will be handled by modifying the MDCT
scales.
2011-04-27 12:39:37 -04:00
Justin Ruggles 6271794041 aacdec: use a scale of 2 in the LTP MDCT rather than doubling the coefficient
table values from the spec.
2011-04-27 12:39:37 -04:00
Alex Converse d70fa4c423 Define POW_SF2_ZERO in aac.h and use for ff_aac_pow2sf_tabp[] offsets instead
of hardcoding 200 everywhere.
2011-04-27 12:39:37 -04:00
Alex Converse e4744b59aa Large intensity stereo and PNS indices are legal. Clip them instead of
erroring out. A magnitude of 100 corresponds to 2^25 so the will most
likely result in clipped output anyway.

None of the conformance streams fall in the range that need to be clipped.
2011-04-27 12:39:37 -04:00
Alex Converse 785c441828 Add some debug log messages to AAC extradata
On Wed, Apr 20, 2011 at 11:39 AM, Justin Ruggles
<justin.ruggles@gmail.com> wrote:
> On 04/20/2011 02:26 PM, Alex Converse wrote:
>
>> ---
>>  libavcodec/aacdec.c |   10 +++++++++-
>>  1 files changed, 9 insertions(+), 1 deletions(-)
>>
>>
>>
>> 0002-Add-some-Debug-log-messages-to-AAC-extradata.patch
>>
>>
>> diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
>> index c9761a1..3ec274f 100644
>> --- a/libavcodec/aacdec.c
>> +++ b/libavcodec/aacdec.c
>> @@ -79,7 +79,6 @@
>>             Parametric Stereo.
>>   */
>>
>> -
>>  #include "avcodec.h"
>>  #include "internal.h"
>>  #include "get_bits.h"
>
>
> stray whitespace change
>

oops, fixed

>From 94e8d0eea77480630f84368c97646cabc0f50628 Mon Sep 17 00:00:00 2001
From: Alex Converse <aconverse@google.com>
Date: Wed, 20 Apr 2011 11:23:34 -0700
Subject: [PATCH] Add some debug log messages to AAC extradata
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------1"

This is a multi-part message in MIME format.
--------------1
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
2011-04-22 20:36:57 -07:00
Young Han Lee 9978ed7d6c aacdec: indentation cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-04-22 14:47:47 +02:00
Alex Converse 187a537904 Convert some undefined 1<<31 shifts into 1U<<31.
According to ISO 9899:1999 S 6.5.7/4:

The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated bits
are filled with zeros. If E1 has an unsigned type, the value of the
result is E1× 2^E2, reduced modulo one more than the maximum value
representable in the result type. If E1 has a signed type and
nonnegative value, and E1× 2^E2 is representable in the result type, then
that is the resulting value; otherwise, the behavior is undefined.
2011-04-11 21:47:42 -07:00
Janne Grunau d6f66edd65 Revert "aac_latm_dec: use aac context and aac m4ac"
This reverts commit 36864ac354 since it
breaks LATM decoding in ffplay.
2011-04-05 12:21:50 +02:00
Mans Rullgard 4538729afe Move sine windows to a separate file
These windows do not really belong in fft/mdct files and were
easily confused with the similarly named tables used by rdft.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-20 13:25:19 +00:00
Mans Rullgard a45fbda994 Move ff_kbd_window_init() to a separate file
This function is not tightly coupled to mdct, and it's in the way
of making a fixed-point mdct implementation.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 19:49:27 +00:00
Mans Rullgard 26f548bb59 fft: remove inline wrappers for function pointers
This removes the rather pointless wrappers (one not even inline)
for calling the fft_calc and related function pointers.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 19:49:18 +00:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00