[FFmpeg-cvslog] r14970 - trunk/libavcodec/acelp_filters.c

michael subversion
Tue Aug 26 00:51:47 CEST 2008


Author: michael
Date: Tue Aug 26 00:51:47 2008
New Revision: 14970

Log:
Replace cliping in ff_acelp_interpolate() by a check&av_log, this should be the
quickest way to find out if it is needed.


Modified:
   trunk/libavcodec/acelp_filters.c

Modified: trunk/libavcodec/acelp_filters.c
==============================================================================
--- trunk/libavcodec/acelp_filters.c	(original)
+++ trunk/libavcodec/acelp_filters.c	Tue Aug 26 00:51:47 2008
@@ -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;
     }
 }
 




More information about the ffmpeg-cvslog mailing list