diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-20 22:41:58 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-20 22:58:04 +0200 |
commit | 349c62410ba92b9513d4a31ec69cbf3ef5240555 (patch) | |
tree | e14c0ee0b7ebadc38f86b7393db4d216447e3dd7 /libavcodec/mpegaudiodec.c | |
parent | 432fe9a38afca9104c1c11942d21739e2a48ba96 (diff) | |
parent | 4f04f5cc8b2a590217fe69492da3d65376ebcff3 (diff) | |
download | ffmpeg-349c62410ba92b9513d4a31ec69cbf3ef5240555.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
indeo: Make ivi_calc_band_checksum() static, it is only used in one file.
indeo: Drop unused debug function ivi_check_band().
avcodec/utils: cast a function argument to shut up a compiler warning
truemotion1: remove disabled code
fix typo in comment
fate: fix dependencies for non-SAMPLES avconv tests
indeo: check for invalid motion vectors
indeo: check that band output buffer exists
indeo: clear allocated band buffers
indeo: track tile macroblock size
indeo: check custom Huffman tables for errors
factor out common decoding code for Indeo 4 and Indeo 5
mp3: fix start band index for block type 2 in 8kHz audio
lavf: change some (de)muxer names to lowercase
lavf: make output format matching case insensitive
Conflicts:
libavcodec/indeo4.c
libavcodec/indeo5.c
libavcodec/ivi_common.c
libavcodec/utils.c
tests/fate/video.mak
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r-- | libavcodec/mpegaudiodec.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 64cbba8e44..553398acb7 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -174,9 +174,12 @@ static void ff_region_offset2size(GranuleDef *g) static void ff_init_short_region(MPADecodeContext *s, GranuleDef *g) { - if (g->block_type == 2) - g->region_size[0] = (36 / 2); - else { + if (g->block_type == 2) { + if (s->sample_rate_index != 8) + g->region_size[0] = (36 / 2); + else + g->region_size[0] = (72 / 2); + } else { if (s->sample_rate_index <= 2) g->region_size[0] = (36 / 2); else if (s->sample_rate_index != 8) @@ -201,14 +204,12 @@ static void ff_compute_band_indexes(MPADecodeContext *s, GranuleDef *g) if (g->block_type == 2) { if (g->switch_point) { /* if switched mode, we handle the 36 first samples as - long blocks. For 8000Hz, we handle the 48 first - exponents as long blocks (XXX: check this!) */ + long blocks. For 8000Hz, we handle the 72 first + exponents as long blocks */ if (s->sample_rate_index <= 2) g->long_end = 8; - else if (s->sample_rate_index != 8) - g->long_end = 6; else - g->long_end = 4; /* 8000 Hz */ + g->long_end = 6; g->short_start = 2 + (s->sample_rate_index != 8); } else { @@ -1018,7 +1019,7 @@ static void reorder_block(MPADecodeContext *s, GranuleDef *g) if (s->sample_rate_index != 8) ptr = g->sb_hybrid + 36; else - ptr = g->sb_hybrid + 48; + ptr = g->sb_hybrid + 72; } else { ptr = g->sb_hybrid; } |