You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avfilter/vf_lut3d: Deduplicate options
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -1261,13 +1261,22 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar
|
|||||||
return config_input(ctx->inputs[0]);
|
return config_input(ctx->inputs[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_LUT3D_FILTER || CONFIG_HALDCLUT_FILTER
|
||||||
|
|
||||||
|
/* These options are shared between several filters;
|
||||||
|
* &lut3d_haldclut_options[COMMON_OPTIONS_OFFSET] must always
|
||||||
|
* point to the first of the COMMON_OPTIONS. */
|
||||||
|
#define COMMON_OPTIONS_OFFSET CONFIG_LUT3D_FILTER
|
||||||
|
static const AVOption lut3d_haldclut_options[] = {
|
||||||
#if CONFIG_LUT3D_FILTER
|
#if CONFIG_LUT3D_FILTER
|
||||||
static const AVOption lut3d_options[] = {
|
|
||||||
{ "file", "set 3D LUT file name", OFFSET(file), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
|
{ "file", "set 3D LUT file name", OFFSET(file), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
|
||||||
|
#endif
|
||||||
COMMON_OPTIONS
|
COMMON_OPTIONS
|
||||||
};
|
};
|
||||||
|
|
||||||
AVFILTER_DEFINE_CLASS(lut3d);
|
#if CONFIG_LUT3D_FILTER
|
||||||
|
|
||||||
|
AVFILTER_DEFINE_CLASS_EXT(lut3d, "lut3d", lut3d_haldclut_options);
|
||||||
|
|
||||||
static av_cold int lut3d_init(AVFilterContext *ctx)
|
static av_cold int lut3d_init(AVFilterContext *ctx)
|
||||||
{
|
{
|
||||||
@@ -1588,11 +1597,8 @@ static av_cold void haldclut_uninit(AVFilterContext *ctx)
|
|||||||
av_freep(&lut3d->lut);
|
av_freep(&lut3d->lut);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const AVOption haldclut_options[] = {
|
FRAMESYNC_DEFINE_CLASS_EXT(haldclut, LUT3DContext, fs,
|
||||||
COMMON_OPTIONS
|
&lut3d_haldclut_options[COMMON_OPTIONS_OFFSET]);
|
||||||
};
|
|
||||||
|
|
||||||
FRAMESYNC_DEFINE_CLASS(haldclut, LUT3DContext, fs);
|
|
||||||
|
|
||||||
static const AVFilterPad haldclut_inputs[] = {
|
static const AVFilterPad haldclut_inputs[] = {
|
||||||
{
|
{
|
||||||
@@ -1631,6 +1637,8 @@ const AVFilter ff_vf_haldclut = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* CONFIG_LUT3D_FILTER || CONFIG_HALDCLUT_FILTER */
|
||||||
|
|
||||||
#if CONFIG_LUT1D_FILTER
|
#if CONFIG_LUT1D_FILTER
|
||||||
|
|
||||||
enum interp_1d_mode {
|
enum interp_1d_mode {
|
||||||
|
Reference in New Issue
Block a user