Browse Source

avfilter/vf_lut3d: support remaping negative values in the prelut

tags/n4.4
Mark Reid Paul B Mahol 5 years ago
parent
commit
5fcd83a244
1 changed files with 3 additions and 5 deletions
  1. +3
    -5
      libavfilter/vf_lut3d.c

+ 3
- 5
libavfilter/vf_lut3d.c View File

@@ -878,18 +878,16 @@ static int parse_cinespace(AVFilterContext *ctx, FILE *f)

prelut_sizes[i] = npoints;
in_min[i] = FLT_MAX;
in_max[i] = FLT_MIN;
in_max[i] = -FLT_MAX;
out_min[i] = FLT_MAX;
out_max[i] = FLT_MIN;

last = FLT_MIN;
out_max[i] = -FLT_MAX;

for (int j = 0; j < npoints; j++) {
NEXT_FLOAT_OR_GOTO(v, end)
in_min[i] = FFMIN(in_min[i], v);
in_max[i] = FFMAX(in_max[i], v);
in_prelut[i][j] = v;
if (v < last) {
if (j > 0 && v < last) {
av_log(ctx, AV_LOG_ERROR, "Invalid file, non increasing prelut.\n");
ret = AVERROR(ENOMEM);
goto end;


Loading…
Cancel
Save