diff options
author | Paul B Mahol <onemda@gmail.com> | 2017-02-14 00:49:41 +0300 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-02-14 00:54:21 +0300 |
commit | aa234698e92fa856013a1391fac3526b06c4d533 (patch) | |
tree | ba75d753258585d92e9cda4d72be2b6e4c4acb1d | |
parent | 72864547f91f2864f75b2829d0c11317ef7b390b (diff) |
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.c | 2 |
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] = |