]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Replace cliping in ff_acelp_interpolate() by a check&av_log, this should be the
authormichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 25 Aug 2008 22:51:47 +0000 (22:51 +0000)
committermichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 25 Aug 2008 22:51:47 +0000 (22:51 +0000)
quickest way to find out if it is needed.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14970 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/acelp_filters.c

index b5a666006662bc1cc44545d82eb7bf2550450be9..581da306f342adb9662bbcd39dc99502dc8a6f70 100644 (file)
@@ -75,7 +75,9 @@ void ff_acelp_interpolate(
             i++;
             v += in[n - i] * filter_coeffs[idx - frac_pos];
         }
-        out[n] = av_clip_int16(v >> 15);
+        if(av_clip_int16(v>>15) != (v>>15))
+            av_log(NULL, AV_LOG_WARNING, "overflow that would need cliping in ff_acelp_interpolate()\n");
+        out[n] = v >> 15;
     }
 }