Cosmetics by Kenan Gillet. Part 1 of 3 of his 'qcelp: silence handling'
authorReynaldo H. Verdejo Pinochet <reynaldo@opendot.cl>
Sat, 20 Dec 2008 02:38:34 +0000 (02:38 +0000)
committerReynaldo H. Verdejo Pinochet <reynaldo@opendot.cl>
Sat, 20 Dec 2008 02:38:34 +0000 (02:38 +0000)
changeset.

Originally committed as revision 16244 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/qcelpdec.c

index 098b8f6..32b2cad 100644 (file)
@@ -536,7 +536,12 @@ static void apply_pitch_filters(QCELPContext *q, float *cdn_vector)
             }
         }else
         {
-            float max_pitch_gain = q->erasure_count < 3 ? 0.9 - 0.3 * (q->erasure_count - 1) : 0.0;
+            float max_pitch_gain;
+
+            if (q->erasure_count < 3)
+                max_pitch_gain = 0.9 - 0.3 * (q->erasure_count - 1);
+             else
+                max_pitch_gain = 0.0;
             for(i=0; i<4; i++)
                 q->pitch_gain[i] = FFMIN(q->pitch_gain[i], max_pitch_gain);