[FFmpeg-devel] [PATCH] avfilter/vf_w3fdif: 255 * 256 * 128 -> max

lance.lmwang at gmail.com lance.lmwang at gmail.com
Tue Aug 11 18:19:29 EEST 2020


From: Limin Wang <lance.lmwang at gmail.com>

max is initialized to ((1 << depth) - 1) * 256 * 128 before.

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
 libavfilter/vf_w3fdif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c
index 5d64dbd..0f9efbf 100644
--- a/libavfilter/vf_w3fdif.c
+++ b/libavfilter/vf_w3fdif.c
@@ -163,7 +163,7 @@ static void filter_scale(uint8_t *out_pixel, const int32_t *work_pixel, int line
     int j;
 
     for (j = 0; j < linesize; j++, out_pixel++, work_pixel++)
-        *out_pixel = av_clip(*work_pixel, 0, 255 * 256 * 128) >> 15;
+        *out_pixel = av_clip(*work_pixel, 0, max) >> 15;
 }
 
 static void filter16_simple_low(int32_t *work_line,
-- 
1.8.3.1



More information about the ffmpeg-devel mailing list