]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpegaudiodec_template.c
Merge commit 'be1db21ba88fe86036fea9f8d2c1a5f47c2a0a7e'
[ffmpeg] / libavcodec / mpegaudiodec_template.c
index a389318a2a9580c984933202545f787f75aed035..a5ac5817f34b5f8eab4df2345119171e38f6a5ec 100644 (file)
@@ -251,9 +251,9 @@ static inline int l3_unscale(int value, int exponent)
     if(e < 1)
         av_log(NULL, AV_LOG_WARNING, "l3_unscale: e is %d\n", e);
 #endif
-    if (e > 31)
+    if (e > (SUINT)31)
         return 0;
-    m = (m + (1 << (e - 1))) >> e;
+    m = (m + ((1U << e)>>1)) >> e;
 
     return m;
 }
@@ -457,7 +457,7 @@ static av_cold int decode_init(AVCodecContext * avctx)
 
 /* 12 points IMDCT. We compute it "by hand" by factorizing obvious
    cases. */
-static void imdct12(INTFLOAT *out, INTFLOAT *in)
+static void imdct12(INTFLOAT *out, SUINTFLOAT *in)
 {
     SUINTFLOAT in0, in1, in2, in3, in4, in5, t1, t2;