[FFmpeg-soc] [soc]: r4365 - wmapro/wma3dec.c

faust3 subversion at mplayerhq.hu
Mon Jun 1 13:37:49 CEST 2009


Author: faust3
Date: Mon Jun  1 13:37:49 2009
New Revision: 4365

Log:
use av_clip to calculate subwoofer cutoffs

Modified:
   wmapro/wma3dec.c

Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c	Mon Jun  1 13:31:20 2009	(r4364)
+++ wmapro/wma3dec.c	Mon Jun  1 13:37:49 2009	(r4365)
@@ -374,9 +374,7 @@ static av_cold int wma_decode_init(AVCod
         int block_size = s->samples_per_frame / (1 << i);
         int cutoff = ceil(block_size * 440.0
                           / (double)s->avctx->sample_rate + 0.5);
-        cutoff = FFMAX(cutoff, 4);
-        cutoff = FFMIN(cutoff, block_size);
-        s->subwoofer_cutoffs[i] = cutoff;
+        s->subwoofer_cutoffs[i] = av_clip(cutoff,4,block_size);
     }
 
     /** set up decorrelation matrixes */


More information about the FFmpeg-soc mailing list