[FFmpeg-soc] [soc]: r5012 - amr/amrnbdec.c

cmcq subversion at mplayerhq.hu
Sun Aug 9 15:52:07 CEST 2009


Author: cmcq
Date: Sun Aug  9 15:52:07 2009
New Revision: 5012

Log:
if -> ?:
I hope this is not considered too ugly

Modified:
   amr/amrnbdec.c

Modified: amr/amrnbdec.c
==============================================================================
--- amr/amrnbdec.c	Sun Aug  9 15:37:18 2009	(r5011)
+++ amr/amrnbdec.c	Sun Aug  9 15:52:07 2009	(r5012)
@@ -1020,12 +1020,11 @@ static int synthesis(AMRContext *p, floa
     // emphasize pitch vector contribution
     if (p->pitch_gain[4] > 0.5 && !overflow) {
         float energy = ff_energyf(excitation, AMR_SUBFRAME_SIZE);
-        float pitch_factor = p->pitch_gain[4];
-
-        if (p->cur_frame_mode == MODE_122) {
-            pitch_factor *= 0.25 * FFMIN(p->pitch_gain[4], 1.0);
-        } else
-            pitch_factor *= 0.5  * FFMIN(p->pitch_gain[4], SHARP_MAX);
+        float pitch_factor =
+            p->pitch_gain[4] *
+            (p->cur_frame_mode == MODE_122 ?
+                0.25 * FFMIN(p->pitch_gain[4], 1.0) :
+                0.5  * FFMIN(p->pitch_gain[4], SHARP_MAX));
 
         for (i = 0; i < AMR_SUBFRAME_SIZE; i++)
             excitation[i] += pitch_factor * p->pitch_vector[i];


More information about the FFmpeg-soc mailing list