summaryrefslogtreecommitdiff
path: root/libavcodec/acelp_filters.c
diff options
context:
space:
mode:
authorVladimir Voroshilov <voroshil@gmail.com>2008-08-26 16:47:31 +0000
committerVladimir Voroshilov <voroshil@gmail.com>2008-08-26 16:47:31 +0000
commitf5e177f8521c585a101eafc171be06de1a3d5b60 (patch)
tree4e061a760349df392bbcb11c7c3f6eaa1c19f5b0 /libavcodec/acelp_filters.c
parent122d0276306e0a8843caeaeb340a497db7552c97 (diff)
(cosmetics) Describe for which tests clipping is required.
Originally committed as revision 14979 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/acelp_filters.c')
-rw-r--r--libavcodec/acelp_filters.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/acelp_filters.c b/libavcodec/acelp_filters.c
index 83db0efc8a..59db6497f6 100644
--- a/libavcodec/acelp_filters.c
+++ b/libavcodec/acelp_filters.c
@@ -156,6 +156,8 @@ void ff_acelp_high_pass_filter(
tmp += (hpf_f[1]* -7667LL)>>13;
tmp += 7699 * (in[i] - 2*in[i-1] + in[i-2]);
+ /* With "+0x800" rounding, clipping is needed
+ for ALGTHM and SPEECH tests. */
out[i] = av_clip_int16((tmp + 0x800) >> 12);
hpf_f[1] = hpf_f[0];