diff options
author | John Cox <jc@kynesim.co.uk> | 2018-05-31 16:22:59 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-05-31 16:22:59 +0200 |
commit | 8d4fc2ea06a7c69efa35b032e3fb2ad853ea3daf (patch) | |
tree | c8856148c4f742d1093e593bc8e583b36d7f1e4c /libavfilter/vf_colorbalance.c | |
parent | 1616b1be5a120bfaa0f05982071c74ee9574f65b (diff) |
avfilter: use av_clip_uintp2_c where clip is variable
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vf_colorbalance.c')
-rw-r--r-- | libavfilter/vf_colorbalance.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavfilter/vf_colorbalance.c b/libavfilter/vf_colorbalance.c index dd8189f548..fd003fdc21 100644 --- a/libavfilter/vf_colorbalance.c +++ b/libavfilter/vf_colorbalance.c @@ -297,17 +297,17 @@ static int config_output(AVFilterLink *outlink) for (i = 0; i < max; i++) { r = g = b = i; - r = av_clip_uintp2(r + s->cyan_red.shadows * shadows[r], depth); - r = av_clip_uintp2(r + s->cyan_red.midtones * midtones[r], depth); - r = av_clip_uintp2(r + s->cyan_red.highlights * highlights[r], depth); + r = av_clip_uintp2_c(r + s->cyan_red.shadows * shadows[r], depth); + r = av_clip_uintp2_c(r + s->cyan_red.midtones * midtones[r], depth); + r = av_clip_uintp2_c(r + s->cyan_red.highlights * highlights[r], depth); - g = av_clip_uintp2(g + s->magenta_green.shadows * shadows[g], depth); - g = av_clip_uintp2(g + s->magenta_green.midtones * midtones[g], depth); - g = av_clip_uintp2(g + s->magenta_green.highlights * highlights[g], depth); + g = av_clip_uintp2_c(g + s->magenta_green.shadows * shadows[g], depth); + g = av_clip_uintp2_c(g + s->magenta_green.midtones * midtones[g], depth); + g = av_clip_uintp2_c(g + s->magenta_green.highlights * highlights[g], depth); - b = av_clip_uintp2(b + s->yellow_blue.shadows * shadows[b], depth); - b = av_clip_uintp2(b + s->yellow_blue.midtones * midtones[b], depth); - b = av_clip_uintp2(b + s->yellow_blue.highlights * highlights[b], depth); + b = av_clip_uintp2_c(b + s->yellow_blue.shadows * shadows[b], depth); + b = av_clip_uintp2_c(b + s->yellow_blue.midtones * midtones[b], depth); + b = av_clip_uintp2_c(b + s->yellow_blue.highlights * highlights[b], depth); s->lut[R][i] = r; s->lut[G][i] = g; |