History

avfilter/vf_lut3d: support remaping negative values in the prelut

Mark Reid committed 6 years ago

Commit 5fcd83a1 parent 03415f21 file · +3 −5Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_lut3d.c+3−5
@@ -878,18 +878,16 @@ static int parse_cinespace(AVFilterContext *ctx, FILE *f) · 877 unmodified lines
878 878
879 prelut_sizes[i] = npoints;879 prelut_sizes[i] = npoints;
880 in_min[i] = FLT_MAX;880 in_min[i] = FLT_MAX;
881 in_max[i] = FLT_MIN;881 in_max[i] = -FLT_MAX;
882 out_min[i] = FLT_MAX;882 out_min[i] = FLT_MAX;
883 out_max[i] = FLT_MIN;883 out_max[i] = -FLT_MAX;
884
885 last = FLT_MIN;
886 884
887 for (int j = 0; j < npoints; j++) {885 for (int j = 0; j < npoints; j++) {
888 NEXT_FLOAT_OR_GOTO(v, end)886 NEXT_FLOAT_OR_GOTO(v, end)
889 in_min[i] = FFMIN(in_min[i], v);887 in_min[i] = FFMIN(in_min[i], v);
890 in_max[i] = FFMAX(in_max[i], v);888 in_max[i] = FFMAX(in_max[i], v);
891 in_prelut[i][j] = v;889 in_prelut[i][j] = v;
892 if (v < last) {890 if (j > 0 && v < last) {
893 av_log(ctx, AV_LOG_ERROR, "Invalid file, non increasing prelut.\n");891 av_log(ctx, AV_LOG_ERROR, "Invalid file, non increasing prelut.\n");
894 ret = AVERROR(ENOMEM);892 ret = AVERROR(ENOMEM);
895 goto end;893 goto end;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t