avfilter: use int instead of enum for AVOption fields

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
Zhao Zhili 2026-01-25 22:30:58 +08:00
parent fddf881c06
commit 6b949407cb
14 changed files with 32 additions and 17 deletions

View file

@ -64,7 +64,8 @@ typedef struct LoudNormContext {
double offset;
int linear;
int dual_mono;
enum PrintFormat print_format;
/* enum PrintFormat */
int print_format;
char *stats_file_str;
double *buf;

View file

@ -40,7 +40,8 @@ typedef struct BlendContext {
int hsub, vsub; ///< chroma subsampling values
int nb_planes;
char *all_expr;
enum BlendMode all_mode;
/* enum BlendMode */
int all_mode;
double all_opacity;
int depth;

View file

@ -52,7 +52,8 @@ typedef struct BlendVulkanContext {
FilterParamsVulkan params[4];
double all_opacity;
enum BlendMode all_mode;
/* enum BlendMode */
int all_mode;
} BlendVulkanContext;
#define DEFINE_BLEND_MODE(MODE, EXPR) \

View file

@ -127,9 +127,12 @@ typedef struct ColorSpaceContext {
enum AVColorPrimaries in_prm, out_prm, user_prm, user_iprm;
enum AVPixelFormat in_format, user_format;
int fast_mode;
enum DitherMode dither;
enum WhitepointAdaptation wp_adapt;
enum ClipGamutMode clip_gamut;
/* enum DitherMode */
int dither;
/* enum WhitepointAdaptation */
int wp_adapt;
/* enum ClipGamutMode */
int clip_gamut;
int16_t *rgb[3];
ptrdiff_t rgb_stride;

View file

@ -61,7 +61,8 @@ typedef struct CUDAColorspaceContext {
CUfunction cu_convert[AVCOL_RANGE_NB];
enum AVPixelFormat pix_fmt;
enum AVColorRange range;
/* enum AVColorRange */
int range;
int num_planes;
} CUDAColorspaceContext;

View file

@ -36,7 +36,8 @@ enum EdgeMode {
typedef struct DisplaceContext {
const AVClass *class;
int width[4], height[4];
enum EdgeMode edge;
/* enum EdgeMode */
int edge;
int nb_planes;
int nb_components;
int step;

View file

@ -45,7 +45,8 @@ typedef struct FramepackContext {
int depth;
const AVPixFmtDescriptor *pix_desc; ///< agreed pixel format
enum AVStereo3DType format; ///< frame pack type output
/* enum AVStereo3DType */
int format; ///< frame pack type output
AVFrame *input_views[2]; ///< input frames
} FramepackContext;

View file

@ -206,7 +206,8 @@ typedef struct LibplaceboContext {
float pad_crop_ratio;
float corner_rounding;
char *lut_filename;
enum pl_lut_type lut_type;
/* enum pl_lut_type */
int lut_type;
int force_original_aspect_ratio;
int force_divisible_by;
int reset_sar;

View file

@ -165,7 +165,8 @@ typedef struct MIContext {
const AVClass *class;
AVMotionEstContext me_ctx;
AVRational frame_rate;
enum MIMode mi_mode;
/* enum MIMode */
int mi_mode;
int mc_mode;
int me_mode;
int me_method;

View file

@ -52,8 +52,8 @@ typedef struct TiltandshiftContext {
int tilt;
/* initial or final actions to perform (pad/hold a frame/black/nothing) */
enum PaddingOption start;
enum PaddingOption end;
int start;
int end;
/* columns to hold or pad at the beginning or at the end (respectively) */
int hold;

View file

@ -53,7 +53,8 @@ enum TonemapAlgorithm {
typedef struct TonemapContext {
const AVClass *class;
enum TonemapAlgorithm tonemap;
/* enum TonemapAlgorithm */
int tonemap;
double param;
double desat;
double peak;

View file

@ -57,7 +57,8 @@ typedef struct TonemapOpenCLContext {
enum AVColorRange range, range_in, range_out;
enum AVChromaLocation chroma_loc;
enum TonemapAlgorithm tonemap;
/* enum TonemapAlgorithm */
int tonemap;
enum AVPixelFormat format;
double peak;
double param;

View file

@ -41,7 +41,8 @@ typedef struct PerlinContext {
int octaves;
double persistence;
unsigned int random_seed;
enum FFPerlinRandomMode random_mode;
/* enum FFPerlinRandomMode */
int random_mode;
double xscale, yscale, tscale;
uint64_t pts;

View file

@ -51,7 +51,8 @@ typedef struct TestSrcVulkanContext {
int w, h;
int pw, ph;
char *out_format_string;
enum AVColorRange out_range;
/* enum AVColorRange */
int out_range;
unsigned int nb_frame;
AVRational time_base, frame_rate;
int64_t pts;