changeset 8822:01271e32d74e libavcodec

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
author alexc
date Fri, 13 Feb 2009 16:06:22 +0000
parents 58706d84c938
children 70ea65c17597
files aac.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/aac.c	Fri Feb 13 07:06:36 2009 +0000
+++ b/aac.c	Fri Feb 13 16:06:22 2009 +0000
@@ -1165,6 +1165,9 @@
             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 @@
                 }
             }
         }
+        }
     }
     return 0;
 }