Author: thilo.borgmann Date: Wed Oct 14 02:41:47 2009 New Revision: 5409 Log: Changed variable names and type and comment.
Modified: als/als_data.h als/alsdec.c Modified: als/als_data.h ============================================================================== --- als/als_data.h Tue Oct 13 21:35:21 2009 (r5408) +++ als/als_data.h Wed Oct 14 02:41:47 2009 (r5409) @@ -95,7 +95,7 @@ static const int16_t parcor_scaled_value /** Gain values of p(0) for long-term prediction. * To be indexed by the Rice coded indices. */ -static const int ltp_gain [] = { +static const uint8_t ltp_gain_values [] = { 0, 8, 16, 24, 32, 40, 48, 56, 64, 70, 76, 82, 88, 92, 96, 100 }; Modified: als/alsdec.c ============================================================================== --- als/alsdec.c Tue Oct 13 21:35:21 2009 (r5408) +++ als/alsdec.c Wed Oct 14 02:41:47 2009 (r5409) @@ -471,8 +471,8 @@ static int read_var_block(ALSDecContext int sb, store_prev_samples; int64_t y; int use_ltp = 0; - int lag = 0; - int gain[5]; + int ltp_lag = 0; + int ltp_gain[5]; *js_blocks = get_bits1(gb); @@ -576,19 +576,19 @@ static int read_var_block(ALSDecContext use_ltp = get_bits1(gb); if (use_ltp) { - gain[0] = decode_rice(gb, 1) << 3; - gain[1] = decode_rice(gb, 2) << 3; + ltp_gain[0] = decode_rice(gb, 1) << 3; + ltp_gain[1] = decode_rice(gb, 2) << 3; - gain[2] = get_unary(gb, 0, 4); - gain[2] <<= 2; - gain[2] += get_bits(gb, 2); - gain[2] = ltp_gain[gain[2]]; + ltp_gain[2] = get_unary(gb, 0, 4); + ltp_gain[2] <<= 2; + ltp_gain[2] += get_bits(gb, 2); + ltp_gain[2] = ltp_gain_values[ltp_gain[2]]; - gain[3] = decode_rice(gb, 2) << 3; - gain[4] = decode_rice(gb, 1) << 3; + ltp_gain[3] = decode_rice(gb, 2) << 3; + ltp_gain[4] = decode_rice(gb, 1) << 3; - lag = get_bits(gb, ctx->ltp_lag_length); - lag += FFMAX(4, opt_order + 1); + ltp_lag = get_bits(gb, ctx->ltp_lag_length); + ltp_lag += FFMAX(4, opt_order + 1); } } @@ -615,12 +615,12 @@ static int read_var_block(ALSDecContext *current_res++ = decode_rice(gb, s[sb]); } - // revert long-term prediction + // reverse long-term prediction if (use_ltp) { int ltp_smp; for (ltp_smp = 0; ltp_smp < block_length; ltp_smp++) { - int center = ltp_smp - lag; + int center = ltp_smp - ltp_lag; int begin = FFMAX(0, center - 2); int end = center + 3; int tab = 5 - (end - begin); @@ -629,7 +629,7 @@ static int read_var_block(ALSDecContext y = 1 << 6; for (base = begin; base < end; base++, tab++) - y += MUL64(gain[tab], raw_samples[base]); + y += MUL64(ltp_gain[tab], raw_samples[base]); raw_samples[ltp_smp] += y >> 7; } _______________________________________________ FFmpeg-soc mailing list FFmpeg-soc@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc