[soc]: r4114 - amr/amrnbfloatdec.c
Author: kmalaussene Date: Sun Feb 22 02:32:28 2009 New Revision: 4114 Log: Remove uses of temporary variables in decode_pitch_lag. Modified: amr/amrnbfloatdec.c Modified: amr/amrnbfloatdec.c ============================================================================== --- amr/amrnbfloatdec.c Sun Feb 22 02:24:43 2009 (r4113) +++ amr/amrnbfloatdec.c Sun Feb 22 02:32:28 2009 (r4114) @@ -403,11 +403,10 @@ static void decode_pitch_lag(int *lag_in // subframe 2 or 4 }else { if(mode == MODE_122) { - int temp; // calculate the pitch lag - temp = (pitch_index + 5)/6 - 1; - *lag_int = temp + search_range_min; - *lag_frac = pitch_index - temp*6 - 3; + *lag_int = (pitch_index + 5) / 6 - 1; + *lag_frac = pitch_index - *lag_int * 6 - 3; + *lag_int += search_range_min; }else if(mode <= MODE_67) { // decoding with 4-bit resolution int t1_temp = FFMAX(FFMIN(prev_lag_int, search_range_max-4), search_range_min+5); @@ -429,9 +428,9 @@ static void decode_pitch_lag(int *lag_in }else { // decoding with 5 or 6 bit resolution, 1/3 fractional precision // 10923>>15 is approximately 1/3 - int temp = ( ((pitch_index + 2)*10923)>>15 ) - 1; - *lag_int = temp + search_range_min; - *lag_frac = pitch_index - temp*3 - 2; + *lag_int = ( ((pitch_index + 2)*10923)>>15 ) - 1; + *lag_frac = pitch_index - *lag_int * 3 - 2; + *lag_int += search_range_min; } } }
participants (1)
-
kmalaussene