[FFmpeg-soc] [soc]: r4594 - wmapro/wmaprodec.c

faust3 subversion at mplayerhq.hu
Sat Jul 4 17:04:59 CEST 2009


Author: faust3
Date: Sat Jul  4 17:04:59 2009
New Revision: 4594

Log:
replace division with shift

Modified:
   wmapro/wmaprodec.c

Modified: wmapro/wmaprodec.c
==============================================================================
--- wmapro/wmaprodec.c	Sat Jul  4 12:33:24 2009	(r4593)
+++ wmapro/wmaprodec.c	Sat Jul  4 17:04:59 2009	(r4594)
@@ -441,7 +441,7 @@ static av_cold int decode_init(AVCodecCo
     /** calculate subwoofer cutoff values */
     for (i=0;i< s->num_possible_block_sizes;i++) {
         int block_size = s->samples_per_frame >> i;
-        int cutoff = (440*block_size + 3*s->avctx->sample_rate/2 - 1)
+        int cutoff = (440*block_size + 3 * (s->avctx->sample_rate >> 1) - 1)
                      / s->avctx->sample_rate;
         s->subwoofer_cutoffs[i] = av_clip(cutoff,4,block_size);
     }


More information about the FFmpeg-soc mailing list