diff options
author | Paul B Mahol <onemda@gmail.com> | 2022-03-06 12:26:15 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2022-03-06 12:27:48 +0100 |
commit | 88a58b90fe2d1c71da037fce254e4839c12d63dc (patch) | |
tree | 6ea8282973005f39c7fd1029c667b62c7df25d89 | |
parent | 14c9b7b194221dbf358d4a44fb4db049fc95afa9 (diff) | |
download | ffmpeg-88a58b90fe2d1c71da037fce254e4839c12d63dc.tar.gz |
avfilter/avf_ahistogram: use av_clip_uint8() instead
-rw-r--r-- | libavfilter/avf_ahistogram.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/avf_ahistogram.c b/libavfilter/avf_ahistogram.c index 03093a162f..f8724cc1b0 100644 --- a/libavfilter/avf_ahistogram.c +++ b/libavfilter/avf_ahistogram.c @@ -359,7 +359,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) if (s->h - H > 0) { h = aa * 255; - s->out->data[0][s->ypos * s->out->linesize[0] + n] = av_clip(h, 0, 255); + s->out->data[0][s->ypos * s->out->linesize[0] + n] = av_clip_uint8(h); s->out->data[1][s->ypos * s->out->linesize[1] + n] = 127; s->out->data[2][s->ypos * s->out->linesize[2] + n] = 127; s->out->data[3][s->ypos * s->out->linesize[3] + n] = 255; @@ -373,9 +373,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) if (s->out->data[0][y * s->out->linesize[0] + n] != old) break; old = s->out->data[0][y * s->out->linesize[0] + n]; - s->out->data[0][y * s->out->linesize[0] + n] = av_clip(yf, 0, 255); - s->out->data[1][y * s->out->linesize[1] + n] = av_clip(128.f+uf, 0, 255); - s->out->data[2][y * s->out->linesize[2] + n] = av_clip(128.f+vf, 0, 255); + s->out->data[0][y * s->out->linesize[0] + n] = av_clip_uint8(yf); + s->out->data[1][y * s->out->linesize[1] + n] = av_clip_uint8(128.f+uf); + s->out->data[2][y * s->out->linesize[2] + n] = av_clip_uint8(128.f+vf); s->out->data[3][y * s->out->linesize[3] + n] = 255; } |