diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-23 18:29:48 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-23 18:29:48 +0100 |
commit | d8637853795eebc6a9e34d086e0f9b13b5c8ff90 (patch) | |
tree | a9270f4d8bf569984b8f4f19d0d2d17bc55ab5da /libavfilter | |
parent | 7fc944df15832c3a32997a878a988986f0020433 (diff) | |
download | ffmpeg-d8637853795eebc6a9e34d086e0f9b13b5c8ff90.tar.gz |
avfilter/vf_convolution: Use av_clip_uint8()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_convolution.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_convolution.c b/libavfilter/vf_convolution.c index dcfb684589..0622cf8d40 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; |