aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aacdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-04-25 02:47:47 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-04-25 03:49:47 +0200
commit2ebd47841f16d1d521d7dd9b5ae0b8015443b690 (patch)
tree5e32bef0eda02346d15fa212326806ab58e9103b /libavcodec/aacdec.c
parent9d7244c4c60d9f85f58b3770065a394c71fdce3f (diff)
parent989fb05fe344d9666db858e0577c44969625184e (diff)
downloadffmpeg-2ebd47841f16d1d521d7dd9b5ae0b8015443b690.tar.gz
Merge branch 'master' into oldabi
* master: (172 commits) Check mmap() return against correct value Signed-off-by: Michael Niedermayer <michaelni@gmx.at> vorbisdec: Employ proper printf format specifiers for uint_fast32_t. Support fourcc MMJP. Support fourcc XVIX. Support fourcc M263. Support fourcc auv2. Fix indentation. Support PARSER_FLAG_COMPLETE_FRAMES for h261 and h263 parsers. ffplay: avoid SIGFPE exception in SDL_DisplayYUVOverlay avi: try to synchronize the points in time of the starts of streams after seeking. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Add flag to force demuxers to sort more strictly by dts. This enables non interleaved AVI mode for example. Players that are picky on strict interleaving can set this. Patches to only switch to non intereaved AVI mode when the index is not strictly correctly interleaved are welcome. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> applehttp: Don't export variant_bitrate if it isn't known crypto: Use av_freep instead of av_free CrystalHD: Add AVOption to configure hardware downscaling. Check for malloc failures in fraps decoder. Use av_fast_malloc instead of av_realloc in fraps decoder. general.texi: document libcelt decoder. Fix some passing argument from incompatible pointer type warnings. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> configure: Add missing libm library dependencies to .pc files. oggdec: reindent after 8f3eebd6 ... Conflicts: libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aacdec.c')
-rw-r--r--libavcodec/aacdec.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index a0b67f4af7..7b1e501f83 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -180,9 +180,8 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id)
* @return Returns error status. 0 - OK, !0 - error
*/
static av_cold int che_configure(AACContext *ac,
- enum ChannelPosition che_pos[4][MAX_ELEM_ID],
- int type, int id,
- int *channels)
+ enum ChannelPosition che_pos[4][MAX_ELEM_ID],
+ int type, int id, int *channels)
{
if (che_pos[type][id]) {
if (!ac->che[type][id] && !(ac->che[type][id] = av_mallocz(sizeof(ChannelElement))))
@@ -212,9 +211,9 @@ static av_cold int che_configure(AACContext *ac,
* @return Returns error status. 0 - OK, !0 - error
*/
static av_cold int output_configure(AACContext *ac,
- enum ChannelPosition che_pos[4][MAX_ELEM_ID],
- enum ChannelPosition new_che_pos[4][MAX_ELEM_ID],
- int channel_config, enum OCStatus oc_type)
+ enum ChannelPosition che_pos[4][MAX_ELEM_ID],
+ enum ChannelPosition new_che_pos[4][MAX_ELEM_ID],
+ int channel_config, enum OCStatus oc_type)
{
AVCodecContext *avctx = ac->avctx;
int i, type, channels = 0, ret;
@@ -231,7 +230,7 @@ static av_cold int output_configure(AACContext *ac,
return ret;
}
- memset(ac->tag_che_map, 0, 4 * MAX_ELEM_ID * sizeof(ac->che[0][0]));
+ memset(ac->tag_che_map, 0, 4 * MAX_ELEM_ID * sizeof(ac->che[0][0]));
avctx->channel_layout = aac_channel_layout[channel_config - 1];
} else {
@@ -346,8 +345,8 @@ static int decode_pce(AVCodecContext *avctx, MPEG4AudioConfig *m4ac,
* @return Returns error status. 0 - OK, !0 - error
*/
static av_cold int set_default_channel_config(AVCodecContext *avctx,
- enum ChannelPosition new_che_pos[4][MAX_ELEM_ID],
- int channel_config)
+ enum ChannelPosition new_che_pos[4][MAX_ELEM_ID],
+ int channel_config)
{
if (channel_config < 1 || channel_config > 7) {
av_log(avctx, AV_LOG_ERROR, "invalid default channel configuration (%d)\n",
@@ -464,6 +463,11 @@ static int decode_audio_specific_config(AACContext *ac,
GetBitContext gb;
int i;
+ av_dlog(avctx, "extradata size %d\n", avctx->extradata_size);
+ for (i = 0; i < avctx->extradata_size; i++)
+ av_dlog(avctx, "%02x ", avctx->extradata[i]);
+ av_dlog(avctx, "\n");
+
init_get_bits(&gb, data, data_size * 8);
if ((i = ff_mpeg4audio_get_config(m4ac, data, data_size)) < 0)
@@ -490,6 +494,10 @@ static int decode_audio_specific_config(AACContext *ac,
return -1;
}
+ av_dlog(avctx, "AOT %d chan config %d sampling index %d (%d) SBR %d PS %d\n",
+ m4ac->object_type, m4ac->chan_config, m4ac->sampling_index,
+ m4ac->sample_rate, m4ac->sbr, m4ac->ps);
+
return get_bits_count(&gb);
}
@@ -1240,7 +1248,7 @@ static av_always_inline float flt16_trunc(float pf)
static av_always_inline void predict(PredictorState *ps, float *coef,
float sf_scale, float inv_sf_scale,
- int output_enable)
+ int output_enable)
{
const float a = 0.953125; // 61.0 / 64
const float alpha = 0.90625; // 29.0 / 32