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

cmcq subversion at mplayerhq.hu
Fri Jul 31 05:05:57 CEST 2009


Author: cmcq
Date: Fri Jul 31 05:05:57 2009
New Revision: 4855

Log:
Use av_clipf

Modified:
   amr/amrnbdec.c

Modified: amr/amrnbdec.c
==============================================================================
--- amr/amrnbdec.c	Fri Jul 31 05:02:37 2009	(r4854)
+++ amr/amrnbdec.c	Fri Jul 31 05:05:57 2009	(r4855)
@@ -750,7 +750,7 @@ static float fixed_gain_smooth(AMRContex
         p->hang_count++;
     } else if (mode < MODE_74 || mode == MODE_102) {
         // calculate the fixed gain smoothing factor (k_m)
-        const float smoothing_factor = FFMIN(1.0, FFMAX(0.0, 4.0*diff - 1.6));
+        const float smoothing_factor = av_clipf(4.0 * diff - 1.6, 0.0, 1.0);
         // calculate the mean fixed gain for the current subframe
         const float fixed_gain_mean = (p->fixed_gain[0] + p->fixed_gain[1] + p->fixed_gain[2] + p->fixed_gain[3] + p->fixed_gain[4])*0.2;
         // calculate the smoothed fixed gain


More information about the FFmpeg-soc mailing list