summaryrefslogtreecommitdiff
path: root/libavfilter/vf_eq.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-26 23:46:44 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-26 23:46:44 +0100
commit530bf8ece6f828262b211edab1b97b873569b255 (patch)
treef13992517694bd4e6c49cdbe2e34d4ba3e9af5f3 /libavfilter/vf_eq.c
parent5a1e524ba7e5a025e8d814f0ea9f81bdf8876081 (diff)
avfilter/vf_eq: Fix clipping code
Found-by: Christophe Gisquet <christophe.gisquet@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_eq.c')
-rw-r--r--libavfilter/vf_eq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c
index 0c2f0cef4e..7bbbaee2c5 100644
--- a/libavfilter/vf_eq.c
+++ b/libavfilter/vf_eq.c
@@ -91,7 +91,7 @@ static void process_c(EQParameters *param, uint8_t *dst, int dst_stride,
for (x = 0; x < w; x++) {
pel = ((src[y * src_stride + x] * contrast) >> 12) + brightness;
- if (pel & 768)
+ if (pel & ~255)
pel = (-pel) >> 31;
dst[y * dst_stride + x] = pel;