[FFmpeg-soc] [soc]: r4157 - amr/amrnbfloatdec.c
kmalaussene
subversion at mplayerhq.hu
Wed Mar 4 19:44:42 CET 2009
Author: kmalaussene
Date: Wed Mar 4 19:44:41 2009
New Revision: 4157
Log:
Simplify decoding gains for MODE_475.
Modified:
amr/amrnbfloatdec.c
Modified: amr/amrnbfloatdec.c
==============================================================================
--- amr/amrnbfloatdec.c Wed Mar 4 19:34:41 2009 (r4156)
+++ amr/amrnbfloatdec.c Wed Mar 4 19:44:41 2009 (r4157)
@@ -1,4 +1,4 @@
-/*
+/*
* AMR narrowband decoder (floating point)
* Copyright (c) 2006-2007 Robert Swain
*
@@ -710,11 +710,9 @@ static void decode_gains(AMRContext *p,
p->fixed_gain_factor = gains_low[amr_subframe->p_gain][1];
}else {
// gain index is only coded in subframes 0,2
- if(!(subframe&1)) {
- gains_index_MODE_475 = amr_subframe->p_gain<<1;
- }
- p->pitch_gain[4] = gains_MODE_475[gains_index_MODE_475 + (subframe&1)][0];
- p->fixed_gain_factor = gains_MODE_475[gains_index_MODE_475 + (subframe&1)][1];
+ gains_index_MODE_475 = subframe&1 ? gains_index_MODE_475+1 : amr_subframe->p_gain<<1;
+ p->pitch_gain[4] = gains_MODE_475[gains_index_MODE_475][0];
+ p->fixed_gain_factor = gains_MODE_475[gains_index_MODE_475][1];
}
// calculate the predicted fixed gain g_c'
More information about the FFmpeg-soc
mailing list