[FFmpeg-cvslog] avfilter/vf_convolution: Use av_clip_uint8()

Michael Niedermayer git at videolan.org
Sat Jan 23 18:41:03 CET 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Jan 23 18:29:48 2016 +0100| [d8637853795eebc6a9e34d086e0f9b13b5c8ff90] | committer: Michael Niedermayer

avfilter/vf_convolution: Use av_clip_uint8()

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d8637853795eebc6a9e34d086e0f9b13b5c8ff90
---

 libavfilter/vf_convolution.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_convolution.c b/libavfilter/vf_convolution.c
index dcfb684..0622cf8 100644
--- a/libavfilter/vf_convolution.c
+++ b/libavfilter/vf_convolution.c
@@ -163,7 +163,7 @@ static void filter_3x3(ConvolutionContext *s, AVFrame *in, AVFrame *out, int pla
                       p2[x] *     matrix[7] +
                       p2[x + 1] * matrix[8];
             sum = (int)(sum * rdiv + bias + 0.5f);
-            dst[x] = av_clip(sum, 0, 255);
+            dst[x] = av_clip_uint8(sum);
         }
 
         p0 = p1;
@@ -218,7 +218,7 @@ static void filter_5x5(ConvolutionContext *s, AVFrame *in, AVFrame *out, int pla
                 sum += *(array[i] + x) * matrix[i];
             }
             sum = (int)(sum * rdiv + bias + 0.5f);
-            dst[x] = av_clip(sum, 0, 255);
+            dst[x] = av_clip_uint8(sum);
         }
 
         p0 = p1;



More information about the ffmpeg-cvslog mailing list