comparison aac.c @ 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 ac7958d25361
children 70ea65c17597
comparison
equal deleted inserted replaced
8821:58706d84c938 8822:01271e32d74e
1163 if (c) { 1163 if (c) {
1164 cge = coup->coupling_point == AFTER_IMDCT ? 1 : get_bits1(gb); 1164 cge = coup->coupling_point == AFTER_IMDCT ? 1 : get_bits1(gb);
1165 gain = cge ? get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60: 0; 1165 gain = cge ? get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60: 0;
1166 gain_cache = pow(scale, -gain); 1166 gain_cache = pow(scale, -gain);
1167 } 1167 }
1168 if (coup->coupling_point == AFTER_IMDCT) {
1169 coup->gain[c][0] = gain_cache;
1170 } else {
1168 for (g = 0; g < sce->ics.num_window_groups; g++) { 1171 for (g = 0; g < sce->ics.num_window_groups; g++) {
1169 for (sfb = 0; sfb < sce->ics.max_sfb; sfb++, idx++) { 1172 for (sfb = 0; sfb < sce->ics.max_sfb; sfb++, idx++) {
1170 if (sce->band_type[idx] != ZERO_BT) { 1173 if (sce->band_type[idx] != ZERO_BT) {
1171 if (!cge) { 1174 if (!cge) {
1172 int t = get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60; 1175 int t = get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60;
1181 } 1184 }
1182 } 1185 }
1183 coup->gain[c][idx] = gain_cache; 1186 coup->gain[c][idx] = gain_cache;
1184 } 1187 }
1185 } 1188 }
1189 }
1186 } 1190 }
1187 } 1191 }
1188 return 0; 1192 return 0;
1189 } 1193 }
1190 1194