comparison aac.c @ 7637:1fd8e319e8b6 libavcodec

Work around GCC variable may be used uninitialised warning
author superdump
date Thu, 21 Aug 2008 12:12:03 +0000
parents 2774adcaf040
children 80b097820403
comparison
equal deleted inserted replaced
7636:2774adcaf040 7637:1fd8e319e8b6
613 GetBitContext * gb, const IndividualChannelStream * ics) { 613 GetBitContext * gb, const IndividualChannelStream * ics) {
614 int w, filt, i, coef_len, coef_res, coef_compress; 614 int w, filt, i, coef_len, coef_res, coef_compress;
615 const int is8 = ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE; 615 const int is8 = ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE;
616 const int tns_max_order = is8 ? 7 : ac->m4ac.object_type == AOT_AAC_MAIN ? 20 : 12; 616 const int tns_max_order = is8 ? 7 : ac->m4ac.object_type == AOT_AAC_MAIN ? 20 : 12;
617 for (w = 0; w < ics->num_windows; w++) { 617 for (w = 0; w < ics->num_windows; w++) {
618 tns->n_filt[w] = get_bits(gb, 2 - is8); 618 if ((tns->n_filt[w] = get_bits(gb, 2 - is8))) {
619
620 if (tns->n_filt[w])
621 coef_res = get_bits1(gb); 619 coef_res = get_bits1(gb);
622 620
623 for (filt = 0; filt < tns->n_filt[w]; filt++) { 621 for (filt = 0; filt < tns->n_filt[w]; filt++) {
624 int tmp2_idx; 622 int tmp2_idx;
625 tns->length[w][filt] = get_bits(gb, 6 - 2*is8); 623 tns->length[w][filt] = get_bits(gb, 6 - 2*is8);
635 coef_len = coef_res + 3 - coef_compress; 633 coef_len = coef_res + 3 - coef_compress;
636 tmp2_idx = 2*coef_compress + coef_res; 634 tmp2_idx = 2*coef_compress + coef_res;
637 635
638 for (i = 0; i < tns->order[w][filt]; i++) 636 for (i = 0; i < tns->order[w][filt]; i++)
639 tns->coef[w][filt][i] = tns_tmp2_map[tmp2_idx][get_bits(gb, coef_len)]; 637 tns->coef[w][filt][i] = tns_tmp2_map[tmp2_idx][get_bits(gb, coef_len)];
638 }
640 } 639 }
641 } 640 }
642 return 0; 641 return 0;
643 } 642 }
644 643