summaryrefslogtreecommitdiff
path: root/libavcodec/aac.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2009-02-13 16:06:22 +0000
committerAlex Converse <alex.converse@gmail.com>2009-02-13 16:06:22 +0000
commitf1ade11e332ac0e6f748d65446d07f2a320429c7 (patch)
tree76b1ff4959796641b32c85ff9d7c4c7ebbc951e0 /libavcodec/aac.c
parentfbd5205093f1c47985e20c86c4c53924e9eecf30 (diff)
Make set coup.gain[c][0] aand only coup.gain[c][0] is set for a independently switched CCE.
Discussed/OKed at http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-February/062219.html Originally committed as revision 17210 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aac.c')
-rw-r--r--libavcodec/aac.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/aac.c b/libavcodec/aac.c
index 904c9510c8..c0673bf133 100644
--- a/libavcodec/aac.c
+++ b/libavcodec/aac.c
@@ -1165,6 +1165,9 @@ static int decode_cce(AACContext * ac, GetBitContext * gb, ChannelElement * che)
gain = cge ? get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60: 0;
gain_cache = pow(scale, -gain);
}
+ if (coup->coupling_point == AFTER_IMDCT) {
+ coup->gain[c][0] = gain_cache;
+ } else {
for (g = 0; g < sce->ics.num_window_groups; g++) {
for (sfb = 0; sfb < sce->ics.max_sfb; sfb++, idx++) {
if (sce->band_type[idx] != ZERO_BT) {
@@ -1184,6 +1187,7 @@ static int decode_cce(AACContext * ac, GetBitContext * gb, ChannelElement * che)
}
}
}
+ }
}
return 0;
}