|
|
|
@ -1217,6 +1217,11 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar |
|
|
|
|
static const AVOption lut3d_haldclut_options[] = { |
|
|
|
|
#if CONFIG_LUT3D_FILTER |
|
|
|
|
{ "file", "set 3D LUT file name", OFFSET(file), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS }, |
|
|
|
|
#endif |
|
|
|
|
#if CONFIG_HALDCLUT_FILTER |
|
|
|
|
{ "clut", "when to process CLUT", OFFSET(clut), AV_OPT_TYPE_INT, {.i64=1}, 0, 1, .flags = TFLAGS, "clut" }, |
|
|
|
|
{ "first", "process only first CLUT, ignore rest", 0, AV_OPT_TYPE_CONST, {.i64=0}, .flags = TFLAGS, "clut" }, |
|
|
|
|
{ "all", "process all CLUTs", 0, AV_OPT_TYPE_CONST, {.i64=1}, .flags = TFLAGS, "clut" }, |
|
|
|
|
#endif |
|
|
|
|
COMMON_OPTIONS |
|
|
|
|
}; |
|
|
|
@ -1519,12 +1524,15 @@ static int update_apply_clut(FFFrameSync *fs) |
|
|
|
|
return ret; |
|
|
|
|
if (!second) |
|
|
|
|
return ff_filter_frame(ctx->outputs[0], master); |
|
|
|
|
if (lut3d->clut_float) |
|
|
|
|
update_clut_float(ctx->priv, second); |
|
|
|
|
else if (lut3d->clut_planar) |
|
|
|
|
update_clut_planar(ctx->priv, second); |
|
|
|
|
else |
|
|
|
|
update_clut_packed(ctx->priv, second); |
|
|
|
|
if (lut3d->clut || !lut3d->got_clut) { |
|
|
|
|
if (lut3d->clut_float) |
|
|
|
|
update_clut_float(ctx->priv, second); |
|
|
|
|
else if (lut3d->clut_planar) |
|
|
|
|
update_clut_planar(ctx->priv, second); |
|
|
|
|
else |
|
|
|
|
update_clut_packed(ctx->priv, second); |
|
|
|
|
lut3d->got_clut = 1; |
|
|
|
|
} |
|
|
|
|
out = apply_lut(inlink, master); |
|
|
|
|
return ff_filter_frame(ctx->outputs[0], out); |
|
|
|
|
} |
|
|
|
|