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

Unified · Split

libavfilter/vf_lut3d.c+3−5
@@ -878,18 +878,16 @@ static int parse_cinespace(AVFilterContext *ctx, FILE *f) · 877 unmodified lines
878878
879879 prelut_sizes[i] = npoints;
880880 in_min[i] = FLT_MAX;
881− in_max[i] = FLT_MIN;
881+ in_max[i] = -FLT_MAX;
882882 out_min[i] = FLT_MAX;
883− out_max[i] = FLT_MIN;
884−
885− last = FLT_MIN;
883+ out_max[i] = -FLT_MAX;
886884
887885 for (int j = 0; j < npoints; j++) {
888886 NEXT_FLOAT_OR_GOTO(v, end)
889887 in_min[i] = FFMIN(in_min[i], v);
890888 in_max[i] = FFMAX(in_max[i], v);
891889 in_prelut[i][j] = v;
892− if (v < last) {
890+ if (j > 0 && v < last) {
893891 av_log(ctx, AV_LOG_ERROR, "Invalid file, non increasing prelut.\n");
894892 ret = AVERROR(ENOMEM);
895893 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