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

faust3 subversion at mplayerhq.hu
Thu Jul 2 20:17:32 CEST 2009


Author: faust3
Date: Thu Jul  2 20:17:32 2009
New Revision: 4574

Log:
do the final scaling in the imdct

Modified:
   wmapro/wma3dec.c

Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c	Thu Jul  2 19:46:53 2009	(r4573)
+++ wmapro/wma3dec.c	Thu Jul  2 20:17:32 2009	(r4574)
@@ -428,8 +428,8 @@ static av_cold int decode_init(AVCodecCo
 
     /** init MDCT, FIXME: only init needed sizes */
     for (i = 0; i < WMAPRO_BLOCK_SIZES; i++)
-        ff_mdct_init(&s->mdct_ctx[i],
-                     BLOCK_MIN_BITS+1+i, 1, 1.0 / (1<<(BLOCK_MIN_BITS+i-1)));
+        ff_mdct_init(&s->mdct_ctx[i], BLOCK_MIN_BITS+1+i, 1,
+                     1.0 / (1<<(BLOCK_MIN_BITS + i + s->bits_per_sample - 2)));
 
     /** init MDCT windows: simple sinus window */
     for (i=0 ; i<WMAPRO_BLOCK_SIZES ; i++) {
@@ -1440,8 +1440,7 @@ static int decode_frame(WMA3DecodeContex
         ptr = s->samples + i;
 
         for (x=0;x<s->samples_per_frame;x++) {
-            *ptr = (1./32768)* *iptr++;
-            *ptr = av_clipf(*ptr, -1.0, 32767.0 / 32768.0);
+            *ptr = av_clipf(*iptr++, -1.0, 32767.0 / 32768.0);
             ptr += incr;
         }
 


More information about the FFmpeg-soc mailing list