comparison alsdec.c @ 11209:8173c059f769 libavcodec

Do sequential bit reading outside of []-operators.
author thilo.borgmann
date Fri, 19 Feb 2010 08:07:02 +0000
parents f1b38a8588b2
children e6e95656937d
comparison
equal deleted inserted replaced
11208:2e77618615eb 11209:8173c059f769
701 // read LTP gain and lag values 701 // read LTP gain and lag values
702 if (sconf->long_term_prediction) { 702 if (sconf->long_term_prediction) {
703 *bd->use_ltp = get_bits1(gb); 703 *bd->use_ltp = get_bits1(gb);
704 704
705 if (*bd->use_ltp) { 705 if (*bd->use_ltp) {
706 int r, c;
707
706 bd->ltp_gain[0] = decode_rice(gb, 1) << 3; 708 bd->ltp_gain[0] = decode_rice(gb, 1) << 3;
707 bd->ltp_gain[1] = decode_rice(gb, 2) << 3; 709 bd->ltp_gain[1] = decode_rice(gb, 2) << 3;
708 710
709 bd->ltp_gain[2] = ltp_gain_values[get_unary(gb, 0, 4)][get_bits(gb, 2)]; 711 r = get_unary(gb, 0, 4);
712 c = get_bits(gb, 2);
713 bd->ltp_gain[2] = ltp_gain_values[r][c];
710 714
711 bd->ltp_gain[3] = decode_rice(gb, 2) << 3; 715 bd->ltp_gain[3] = decode_rice(gb, 2) << 3;
712 bd->ltp_gain[4] = decode_rice(gb, 1) << 3; 716 bd->ltp_gain[4] = decode_rice(gb, 1) << 3;
713 717
714 *bd->ltp_lag = get_bits(gb, ctx->ltp_lag_length); 718 *bd->ltp_lag = get_bits(gb, ctx->ltp_lag_length);