Skip to content
Snippets Groups Projects
Commit aa234698 authored by Paul B Mahol's avatar Paul B Mahol
Browse files

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: default avatarPaul B Mahol <onemda@gmail.com>
parent 72864547
No related branches found
No related tags found
No related merge requests found
...@@ -310,7 +310,7 @@ static int config_props(AVFilterLink *inlink) ...@@ -310,7 +310,7 @@ static int config_props(AVFilterLink *inlink)
s->var_values[VAR_MAXVAL] = max[color]; s->var_values[VAR_MAXVAL] = max[color];
s->var_values[VAR_MINVAL] = min[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_VAL] = val;
s->var_values[VAR_CLIPVAL] = av_clip(val, min[color], max[color]); s->var_values[VAR_CLIPVAL] = av_clip(val, min[color], max[color]);
s->var_values[VAR_NEGVAL] = s->var_values[VAR_NEGVAL] =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment