aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2017-02-13 22:49:41 +0100
committerPaul B Mahol <onemda@gmail.com>2017-02-13 22:54:21 +0100
commitaa234698e92fa856013a1391fac3526b06c4d533 (patch)
treeba75d753258585d92e9cda4d72be2b6e4c4acb1d
parent72864547f91f2864f75b2829d0c11317ef7b390b (diff)
downloadffmpeg-aa234698e92fa856013a1391fac3526b06c4d533.tar.gz
avfilter/vf_lut: make it possible to clip pixel values that are out of valid range
Previous behavior was not useful at all as such pixels where all mapped to 0. Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavfilter/vf_lut.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c
index 24726739e3..d005afae87 100644
--- a/libavfilter/vf_lut.c
+++ b/libavfilter/vf_lut.c
@@ -310,7 +310,7 @@ static int config_props(AVFilterLink *inlink)
s->var_values[VAR_MAXVAL] = max[color];
s->var_values[VAR_MINVAL] = min[color];
- for (val = 0; val < (1 << desc->comp[0].depth); val++) {
+ for (val = 0; val < FF_ARRAY_ELEMS(s->lut[comp]); val++) {
s->var_values[VAR_VAL] = val;
s->var_values[VAR_CLIPVAL] = av_clip(val, min[color], max[color]);
s->var_values[VAR_NEGVAL] =