| @@ -2062,40 +2062,6 @@ fail: · 2061 unmodified lines |
| 2062 | return ret; | 2062 | return ret; |
| 2063 | } | 2063 | } |
| 2064 | | 2064 | |
| 2065 | /** | | |
| 2066 | * Mid/Side stereo decoding; reference: 4.6.8.1.3. | | |
| 2067 | */ | | |
| 2068 | static void apply_mid_side_stereo(AACDecContext *ac, ChannelElement *cpe) | | |
| 2069 | { | | |
| 2070 | const IndividualChannelStream *ics = &cpe->ch[0].ics; | | |
| 2071 | INTFLOAT *ch0 = cpe->ch[0].AAC_RENAME(coeffs); | | |
| 2072 | INTFLOAT *ch1 = cpe->ch[1].AAC_RENAME(coeffs); | | |
| 2073 | int g, i, group, idx = 0; | | |
| 2074 | const uint16_t *offsets = ics->swb_offset; | | |
| 2075 | for (g = 0; g < ics->num_window_groups; g++) { | | |
| 2076 | for (i = 0; i < ics->max_sfb; i++, idx++) { | | |
| 2077 | if (cpe->ms_mask[idx] && | | |
| 2078 | cpe->ch[0].band_type[idx] < NOISE_BT && | | |
| 2079 | cpe->ch[1].band_type[idx] < NOISE_BT) { | | |
| 2080 | #if USE_FIXED | | |
| 2081 | for (group = 0; group < ics->group_len[g]; group++) { | | |
| 2082 | ac->fdsp->butterflies_fixed(ch0 + group * 128 + offsets[i], | | |
| 2083 | ch1 + group * 128 + offsets[i], | | |
| 2084 | offsets[i+1] - offsets[i]); | | |
| 2085 | #else | | |
| 2086 | for (group = 0; group < ics->group_len[g]; group++) { | | |
| 2087 | ac->fdsp->butterflies_float(ch0 + group * 128 + offsets[i], | | |
| 2088 | ch1 + group * 128 + offsets[i], | | |
| 2089 | offsets[i+1] - offsets[i]); | | |
| 2090 | #endif /* USE_FIXED */ | | |
| 2091 | } | | |
| 2092 | } | | |
| 2093 | } | | |
| 2094 | ch0 += ics->group_len[g] * 128; | | |
| 2095 | ch1 += ics->group_len[g] * 128; | | |
| 2096 | } | | |
| 2097 | } | | |
| 2098 | | | |
| 2099 | /** | 2065 | /** |
| 2100 | * intensity stereo decoding; reference: 4.6.8.2.3 | 2066 | * intensity stereo decoding; reference: 4.6.8.2.3 |
| 2101 | * | 2067 | * |
| @@ -2183,7 +2149,7 @@ static int decode_cpe(AACDecContext *ac, GetBitContext *gb, ChannelElement *cpe) · 81 unmodified lines |
| 2183 | | 2149 | |
| 2184 | if (common_window) { | 2150 | if (common_window) { |
| 2185 | if (ms_present) | 2151 | if (ms_present) |
| 2186 | apply_mid_side_stereo(ac, cpe); | 2152 | ac->dsp.apply_mid_side_stereo(ac, cpe); |
| 2187 | if (ac->oc[1].m4ac.object_type == AOT_AAC_MAIN) { | 2153 | if (ac->oc[1].m4ac.object_type == AOT_AAC_MAIN) { |
| 2188 | apply_prediction(ac, &cpe->ch[0]); | 2154 | apply_prediction(ac, &cpe->ch[0]); |
| 2189 | apply_prediction(ac, &cpe->ch[1]); | 2155 | apply_prediction(ac, &cpe->ch[1]); |