[FFmpeg-soc] [soc]: r5138 - amr/amrnbdec.c
cmcq
subversion at mplayerhq.hu
Sat Aug 15 22:03:14 CEST 2009
Author: cmcq
Date: Sat Aug 15 22:03:14 2009
New Revision: 5138
Log:
Change ?: to if/else to make code formatting easier
Modified:
amr/amrnbdec.c
Modified: amr/amrnbdec.c
==============================================================================
--- amr/amrnbdec.c Sat Aug 15 21:59:23 2009 (r5137)
+++ amr/amrnbdec.c Sat Aug 15 22:03:14 2009 (r5138)
@@ -815,12 +815,17 @@ static void decode_gains(AMRContext *p,
p->pitch_gain[4] = qua_gain_pit [amr_subframe->p_gain ] / 16384.0;
*fixed_gain_factor = qua_gain_code[amr_subframe->fixed_gain] / 2048.0;
} else {
- const uint16_t *gains =
- mode >= MODE_67 ? gains_high[amr_subframe->p_gain] :
- mode >= MODE_515 ? gains_low [amr_subframe->p_gain] :
- // gain index is only coded in subframes 0,2 for MODE_475
- gains_MODE_475[(p->frame.subframe[subframe & 2].p_gain << 1) +
- (subframe & 1)];
+ const uint16_t *gains;
+
+ if (mode >= MODE_67) {
+ gains = gains_high[amr_subframe->p_gain];
+ } else if (mode >= MODE_515) {
+ gains = gains_low [amr_subframe->p_gain];
+ } else {
+ // gain index is only coded in subframes 0,2 for MODE_475
+ gains = gains_MODE_475[(p->frame.subframe[subframe & 2].p_gain << 1)
+ + (subframe & 1)];
+ }
p->pitch_gain[4] = gains[0] / 16384.0;
*fixed_gain_factor = gains[1] / 4096.0;
More information about the FFmpeg-soc
mailing list