the condition being tested was the same as the stop condition for the containing loop, so inside the loop it would always test positive
Unified · Split
| @@ -181,7 +181,7 @@ void ff_aac_search_for_tns(AACEncContext *s, SingleChannelElement *sce) · 180 unmodified lines | ||
| 181 | 181 | |
| 182 | 182 | for (w = 0; w < sce->ics.num_windows; w++) { |
| 183 | 183 | float en[2] = {0.0f, 0.0f}; |
| 184 | − int oc_start = 0, os_start = 0; | |
| 184 | + int oc_start = 0; | |
| 185 | 185 | int coef_start = sce->ics.swb_offset[sfb_start]; |
| 186 | 186 | |
| 187 | 187 | for (g = sfb_start; g < sce->ics.num_swb && g <= sfb_end; g++) { |
| @@ -202,12 +202,11 @@ void ff_aac_search_for_tns(AACEncContext *s, SingleChannelElement *sce) · 14 unmodified lines | ||
| 202 | 202 | tns->n_filt[w] = is8 ? 1 : order != TNS_MAX_ORDER ? 2 : 3; |
| 203 | 203 | for (g = 0; g < tns->n_filt[w]; g++) { |
| 204 | 204 | tns->direction[w][g] = slant != 2 ? slant : en[g] < en[!g]; |
| 205 | − tns->order[w][g] = g < tns->n_filt[w] ? order/tns->n_filt[w] : order - oc_start; | |
| 206 | − tns->length[w][g] = g < tns->n_filt[w] ? sfb_len/tns->n_filt[w] : sfb_len - os_start; | |
| 205 | + tns->order[w][g] = order/tns->n_filt[w]; | |
| 206 | + tns->length[w][g] = sfb_len/tns->n_filt[w]; | |
| 207 | 207 | quantize_coefs(&coefs[oc_start], tns->coef_idx[w][g], tns->coef[w][g], |
| 208 | 208 | tns->order[w][g], c_bits); |
| 209 | 209 | oc_start += tns->order[w][g]; |
| 210 | − os_start += tns->length[w][g]; | |
| 211 | 210 | } |
| 212 | 211 | count++; |
| 213 | 212 | } |