* commit '58400ac133bcfb6bf8196b4e5208bc178307739b': lavfi: name anonymous structs Conflicts: libavfilter/buffersink.c libavfilter/f_select.c libavfilter/src_movie.c libavfilter/vf_drawbox.c libavfilter/vf_drawtext.c libavfilter/vf_overlay.c libavfilter/vf_showinfo.c libavfilter/vf_unsharp.c
Unified · Split
| @@ -36,7 +36,7 @@ · 35 unmodified lines | |||
| 36 | #include "buffersink.h" | 36 | #include "buffersink.h" |
| 37 | #include "internal.h" | 37 | #include "internal.h" |
| 38 | 38 | ||
| 39 | typedef struct { | 39 | typedef struct BufferSinkContext { |
| 40 | const AVClass *class; | 40 | const AVClass *class; |
| 41 | AVFifoBuffer *fifo; ///< FIFO buffer of video frame references | 41 | AVFifoBuffer *fifo; ///< FIFO buffer of video frame references |
| 42 | unsigned warning_limit; | 42 | unsigned warning_limit; |
| @@ -41,7 +41,7 @@ · 40 unmodified lines | |||
| 41 | #include "video.h" | 41 | #include "video.h" |
| 42 | #include "avcodec.h" | 42 | #include "avcodec.h" |
| 43 | 43 | ||
| 44 | typedef struct { | 44 | typedef struct BufferSourceContext { |
| 45 | const AVClass *class; | 45 | const AVClass *class; |
| 46 | AVFifoBuffer *fifo; | 46 | AVFifoBuffer *fifo; |
| 47 | AVRational time_base; ///< time_base to set in the output link | 47 | AVRational time_base; ///< time_base to set in the output link |
| @@ -138,7 +138,7 @@ enum var_name { · 137 unmodified lines | |||
| 138 | VAR_VARS_NB | 138 | VAR_VARS_NB |
| 139 | }; | 139 | }; |
| 140 | 140 | ||
| 141 | typedef struct { | 141 | typedef struct SelectContext { |
| 142 | const AVClass *class; | 142 | const AVClass *class; |
| 143 | char *expr_str; | 143 | char *expr_str; |
| 144 | AVExpr *expr; | 144 | AVExpr *expr; |
| @@ -39,7 +39,7 @@ typedef struct Buf { · 38 unmodified lines | |||
| 39 | struct Buf *next; | 39 | struct Buf *next; |
| 40 | } Buf; | 40 | } Buf; |
| 41 | 41 | ||
| 42 | typedef struct { | 42 | typedef struct FifoContext { |
| 43 | Buf root; | 43 | Buf root; |
| 44 | Buf *last; ///< last buffered frame | 44 | Buf *last; ///< last buffered frame |
| 45 | 45 | ||
| @@ -82,7 +82,7 @@ enum var_name { · 81 unmodified lines | |||
| 82 | VAR_VARS_NB | 82 | VAR_VARS_NB |
| 83 | }; | 83 | }; |
| 84 | 84 | ||
| 85 | typedef struct { | 85 | typedef struct SetPTSContext { |
| 86 | const AVClass *class; | 86 | const AVClass *class; |
| 87 | char *expr_str; | 87 | char *expr_str; |
| 88 | AVExpr *expr; | 88 | AVExpr *expr; |
| @@ -51,7 +51,7 @@ enum var_name { · 50 unmodified lines | |||
| 51 | VAR_VARS_NB | 51 | VAR_VARS_NB |
| 52 | }; | 52 | }; |
| 53 | 53 | ||
| 54 | typedef struct { | 54 | typedef struct SetTBContext { |
| 55 | const AVClass *class; | 55 | const AVClass *class; |
| 56 | char *tb_expr; | 56 | char *tb_expr; |
| 57 | double var_values[VAR_VARS_NB]; | 57 | double var_values[VAR_VARS_NB]; |
| @@ -44,12 +44,12 @@ · 43 unmodified lines | |||
| 44 | #include "internal.h" | 44 | #include "internal.h" |
| 45 | #include "video.h" | 45 | #include "video.h" |
| 46 | 46 | ||
| 47 | typedef struct { | 47 | typedef struct MovieStream { |
| 48 | AVStream *st; | 48 | AVStream *st; |
| 49 | int done; | 49 | int done; |
| 50 | } MovieStream; | 50 | } MovieStream; |
| 51 | 51 | ||
| 52 | typedef struct { | 52 | typedef struct MovieContext { |
| 53 | /* common A/V fields */ | 53 | /* common A/V fields */ |
| 54 | const AVClass *class; | 54 | const AVClass *class; |
| 55 | int64_t seek_point; ///< seekpoint in microseconds | 55 | int64_t seek_point; ///< seekpoint in microseconds |
| @@ -64,7 +64,7 @@ typedef struct UnsharpFilterParam { · 63 unmodified lines | |||
| 64 | uint32_t *sc[MAX_MATRIX_SIZE - 1]; ///< finite state machine storage | 64 | uint32_t *sc[MAX_MATRIX_SIZE - 1]; ///< finite state machine storage |
| 65 | } UnsharpFilterParam; | 65 | } UnsharpFilterParam; |
| 66 | 66 | ||
| 67 | typedef struct { | 67 | typedef struct UnsharpContext { |
| 68 | const AVClass *class; | 68 | const AVClass *class; |
| 69 | int lmsize_x, lmsize_y, cmsize_x, cmsize_y; | 69 | int lmsize_x, lmsize_y, cmsize_x, cmsize_y; |
| 70 | float lamount, camount; | 70 | float lamount, camount; |
| @@ -56,7 +56,7 @@ enum var_name { · 55 unmodified lines | |||
| 56 | VARS_NB | 56 | VARS_NB |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | typedef struct { | 59 | typedef struct AspectContext { |
| 60 | const AVClass *class; | 60 | const AVClass *class; |
| 61 | AVRational dar; | 61 | AVRational dar; |
| 62 | AVRational sar; | 62 | AVRational sar; |
| @@ -37,7 +37,7 @@ · 36 unmodified lines | |||
| 37 | #include "internal.h" | 37 | #include "internal.h" |
| 38 | #include "video.h" | 38 | #include "video.h" |
| 39 | 39 | ||
| 40 | typedef struct { | 40 | typedef struct BlackFrameContext { |
| 41 | const AVClass *class; | 41 | const AVClass *class; |
| 42 | int bamount; ///< black amount | 42 | int bamount; ///< black amount |
| 43 | int bthresh; ///< black threshold | 43 | int bthresh; ///< black threshold |
| @@ -55,13 +55,13 @@ enum var_name { · 54 unmodified lines | |||
| 55 | VARS_NB | 55 | VARS_NB |
| 56 | }; | 56 | }; |
| 57 | 57 | ||
| 58 | typedef struct { | 58 | typedef struct FilterParam { |
| 59 | int radius; | 59 | int radius; |
| 60 | int power; | 60 | int power; |
| 61 | char *radius_expr; | 61 | char *radius_expr; |
| 62 | } FilterParam; | 62 | } FilterParam; |
| 63 | 63 | ||
| 64 | typedef struct { | 64 | typedef struct BoxBlurContext { |
| 65 | const AVClass *class; | 65 | const AVClass *class; |
| 66 | FilterParam luma_param; | 66 | FilterParam luma_param; |
| 67 | FilterParam chroma_param; | 67 | FilterParam chroma_param; |
| @@ -73,7 +73,7 @@ enum var_name { · 72 unmodified lines | |||
| 73 | VAR_VARS_NB | 73 | VAR_VARS_NB |
| 74 | }; | 74 | }; |
| 75 | 75 | ||
| 76 | typedef struct { | 76 | typedef struct CropContext { |
| 77 | const AVClass *class; | 77 | const AVClass *class; |
| 78 | int x; ///< x offset of the non-cropped area with respect to the input area | 78 | int x; ///< x offset of the non-cropped area with respect to the input area |
| 79 | int y; ///< y offset of the non-cropped area with respect to the input area | 79 | int y; ///< y offset of the non-cropped area with respect to the input area |
| @@ -32,7 +32,7 @@ · 31 unmodified lines | |||
| 32 | #include "internal.h" | 32 | #include "internal.h" |
| 33 | #include "video.h" | 33 | #include "video.h" |
| 34 | 34 | ||
| 35 | typedef struct { | 35 | typedef struct CropDetectContext { |
| 36 | const AVClass *class; | 36 | const AVClass *class; |
| 37 | int x1, y1, x2, y2; | 37 | int x1, y1, x2, y2; |
| 38 | int limit; | 38 | int limit; |
| @@ -148,7 +148,7 @@ static void apply_delogo(uint8_t *dst, int dst_linesize, · 147 unmodified lines | |||
| 148 | } | 148 | } |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | typedef struct { | 151 | typedef struct DelogoContext { |
| 152 | const AVClass *class; | 152 | const AVClass *class; |
| 153 | int x, y, w, h, band, show; | 153 | int x, y, w, h, band, show; |
| 154 | } DelogoContext; | 154 | } DelogoContext; |
| @@ -66,7 +66,7 @@ enum var_name { · 65 unmodified lines | |||
| 66 | VARS_NB | 66 | VARS_NB |
| 67 | }; | 67 | }; |
| 68 | 68 | ||
| 69 | typedef struct { | 69 | typedef struct DrawBoxContext { |
| 70 | const AVClass *class; | 70 | const AVClass *class; |
| 71 | int x, y, w, h; | 71 | int x, y, w, h; |
| 72 | int thickness; | 72 | int thickness; |
| @@ -126,7 +126,7 @@ enum expansion_mode { · 125 unmodified lines | |||
| 126 | EXP_STRFTIME, | 126 | EXP_STRFTIME, |
| 127 | }; | 127 | }; |
| 128 | 128 | ||
| 129 | typedef struct { | 129 | typedef struct DrawTextContext { |
| 130 | const AVClass *class; | 130 | const AVClass *class; |
| 131 | enum expansion_mode exp_mode; ///< expansion mode to use for the text | 131 | enum expansion_mode exp_mode; ///< expansion mode to use for the text |
| 132 | int reinit; ///< tells if the filter is being reinited | 132 | int reinit; ///< tells if the filter is being reinited |
| @@ -260,7 +260,7 @@ struct ft_error · 127 unmodified lines | |||
| 260 | 260 | ||
| 261 | #define FT_ERRMSG(e) ft_errors[e].err_msg | 261 | #define FT_ERRMSG(e) ft_errors[e].err_msg |
| 262 | 262 | ||
| 263 | typedef struct { | 263 | typedef struct Glyph { |
| 264 | FT_Glyph *glyph; | 264 | FT_Glyph *glyph; |
| 265 | uint32_t code; | 265 | uint32_t code; |
| 266 | FT_Bitmap bitmap; ///< array holding bitmaps of font | 266 | FT_Bitmap bitmap; ///< array holding bitmaps of font |
| @@ -33,7 +33,7 @@ · 32 unmodified lines | |||
| 33 | #include "internal.h" | 33 | #include "internal.h" |
| 34 | #include "video.h" | 34 | #include "video.h" |
| 35 | 35 | ||
| 36 | typedef struct { | 36 | typedef struct ColorContext { |
| 37 | const AVClass *class; | 37 | const AVClass *class; |
| 38 | AVLFG lfg; | 38 | AVLFG lfg; |
| 39 | unsigned int lfg_seed; | 39 | unsigned int lfg_seed; |
| @@ -49,7 +49,7 @@ · 48 unmodified lines | |||
| 49 | #define FADE_IN 0 | 49 | #define FADE_IN 0 |
| 50 | #define FADE_OUT 1 | 50 | #define FADE_OUT 1 |
| 51 | 51 | ||
| 52 | typedef struct { | 52 | typedef struct FadeContext { |
| 53 | const AVClass *class; | 53 | const AVClass *class; |
| 54 | int type; | 54 | int type; |
| 55 | int factor, fade_per_frame; | 55 | int factor, fade_per_frame; |
| @@ -32,7 +32,7 @@ · 31 unmodified lines | |||
| 32 | #include "internal.h" | 32 | #include "internal.h" |
| 33 | #include "video.h" | 33 | #include "video.h" |
| 34 | 34 | ||
| 35 | typedef struct { | 35 | typedef struct FieldOrderContext { |
| 36 | const AVClass *class; | 36 | const AVClass *class; |
| 37 | int dst_tff; ///< output bff/tff | 37 | int dst_tff; ///< output bff/tff |
| 38 | int line_size[4]; ///< bytes of pixel data per line for each plane | 38 | int line_size[4]; ///< bytes of pixel data per line for each plane |
| @@ -35,7 +35,7 @@ · 34 unmodified lines | |||
| 35 | #include "internal.h" | 35 | #include "internal.h" |
| 36 | #include "video.h" | 36 | #include "video.h" |
| 37 | 37 | ||
| 38 | typedef struct { | 38 | typedef struct FormatContext { |
| 39 | const AVClass *class; | 39 | const AVClass *class; |
| 40 | char *pix_fmts; | 40 | char *pix_fmts; |
| 41 | /** | 41 | /** |
| @@ -28,7 +28,7 @@ · 27 unmodified lines | |||
| 28 | #include "internal.h" | 28 | #include "internal.h" |
| 29 | #include "video.h" | 29 | #include "video.h" |
| 30 | 30 | ||
| 31 | typedef struct { | 31 | typedef struct NullContext { |
| 32 | const AVClass *class; | 32 | const AVClass *class; |
| 33 | int frame_step; | 33 | int frame_step; |
| 34 | } FrameStepContext; | 34 | } FrameStepContext; |
| @@ -35,7 +35,7 @@ · 34 unmodified lines | |||
| 35 | #include "libavutil/intreadwrite.h" | 35 | #include "libavutil/intreadwrite.h" |
| 36 | #include "libavutil/imgutils.h" | 36 | #include "libavutil/imgutils.h" |
| 37 | 37 | ||
| 38 | typedef struct { | 38 | typedef struct FlipContext { |
| 39 | int max_step[4]; ///< max pixel step for each plane, expressed as a number of bytes | 39 | int max_step[4]; ///< max pixel step for each plane, expressed as a number of bytes |
| 40 | int planewidth[4]; ///< width of each plane | 40 | int planewidth[4]; ///< width of each plane |
| 41 | int planeheight[4]; ///< height of each plane | 41 | int planeheight[4]; ///< height of each plane |
| @@ -28,7 +28,7 @@ · 27 unmodified lines | |||
| 28 | 28 | ||
| 29 | #include "libavutil/opt.h" | 29 | #include "libavutil/opt.h" |
| 30 | 30 | ||
| 31 | typedef struct { | 31 | typedef struct HQDN3DContext { |
| 32 | const AVClass *class; | 32 | const AVClass *class; |
| 33 | int16_t *coefs[4]; | 33 | int16_t *coefs[4]; |
| 34 | uint16_t *line; | 34 | uint16_t *line; |
| @@ -47,7 +47,7 @@ enum FieldType { · 46 unmodified lines | |||
| 47 | FIELD_LOWER = 1, | 47 | FIELD_LOWER = 1, |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | typedef struct { | 50 | typedef struct InterlaceContext { |
| 51 | const AVClass *class; | 51 | const AVClass *class; |
| 52 | enum ScanMode scan; // top or bottom field first scanning | 52 | enum ScanMode scan; // top or bottom field first scanning |
| 53 | #if FF_API_INTERLACE_LOWPASS_SET | 53 | #if FF_API_INTERLACE_LOWPASS_SET |
| @@ -68,7 +68,7 @@ static int query_formats(AVFilterContext *ctx) · 67 unmodified lines | |||
| 68 | return 0; | 68 | return 0; |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | typedef struct { | 71 | typedef struct OCVContext { |
| 72 | const AVClass *class; | 72 | const AVClass *class; |
| 73 | char *name; | 73 | char *name; |
| 74 | char *params; | 74 | char *params; |
| @@ -78,7 +78,7 @@ typedef struct { · 3 unmodified lines | |||
| 78 | void *priv; | 78 | void *priv; |
| 79 | } OCVContext; | 79 | } OCVContext; |
| 80 | 80 | ||
| 81 | typedef struct { | 81 | typedef struct SmoothContext { |
| 82 | int type; | 82 | int type; |
| 83 | int param1, param2; | 83 | int param1, param2; |
| 84 | double param3, param4; | 84 | double param3, param4; |
| @@ -245,7 +245,7 @@ static int parse_iplconvkernel(IplConvKernel **kernel, char *buf, void *log_ctx) · 160 unmodified lines | |||
| 245 | return 0; | 245 | return 0; |
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | typedef struct { | 248 | typedef struct DilateContext { |
| 249 | int nb_iterations; | 249 | int nb_iterations; |
| 250 | IplConvKernel *kernel; | 250 | IplConvKernel *kernel; |
| 251 | } DilateContext; | 251 | } DilateContext; |
| @@ -302,7 +302,7 @@ static void erode_end_frame_filter(AVFilterContext *ctx, IplImage *inimg, IplIma · 50 unmodified lines | |||
| 302 | cvErode(inimg, outimg, dilate->kernel, dilate->nb_iterations); | 302 | cvErode(inimg, outimg, dilate->kernel, dilate->nb_iterations); |
| 303 | } | 303 | } |
| 304 | 304 | ||
| 305 | typedef struct { | 305 | typedef struct OCVFilterEntry { |
| 306 | const char *name; | 306 | const char *name; |
| 307 | size_t priv_size; | 307 | size_t priv_size; |
| 308 | int (*init)(AVFilterContext *ctx, const char *args); | 308 | int (*init)(AVFilterContext *ctx, const char *args); |
| @@ -57,7 +57,7 @@ enum var_name { · 56 unmodified lines | |||
| 57 | VAR_VARS_NB | 57 | VAR_VARS_NB |
| 58 | }; | 58 | }; |
| 59 | 59 | ||
| 60 | typedef struct { | 60 | typedef struct LutContext { |
| 61 | const AVClass *class; | 61 | const AVClass *class; |
| 62 | uint8_t lut[4][256]; ///< lookup table for each component | 62 | uint8_t lut[4][256]; ///< lookup table for each component |
| 63 | char *comp_expr_str[4]; | 63 | char *comp_expr_str[4]; |
| @@ -91,7 +91,7 @@ static const char *eof_action_str[] = { · 90 unmodified lines | |||
| 91 | #define U 1 | 91 | #define U 1 |
| 92 | #define V 2 | 92 | #define V 2 |
| 93 | 93 | ||
| 94 | typedef struct { | 94 | typedef struct OverlayContext { |
| 95 | const AVClass *class; | 95 | const AVClass *class; |
| 96 | int x, y; ///< position of overlayed picture | 96 | int x, y; ///< position of overlayed picture |
| 97 | 97 | ||
| @@ -77,7 +77,7 @@ static int query_formats(AVFilterContext *ctx) · 76 unmodified lines | |||
| 77 | return 0; | 77 | return 0; |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | typedef struct { | 80 | typedef struct PadContext { |
| 81 | const AVClass *class; | 81 | const AVClass *class; |
| 82 | int w, h; ///< output dimensions, a value of 0 will result in the input size | 82 | int w, h; ///< output dimensions, a value of 0 will result in the input size |
| 83 | int x, y; ///< offsets of the input area with respect to the padded area | 83 | int x, y; ///< offsets of the input area with respect to the padded area |
| @@ -29,7 +29,7 @@ · 28 unmodified lines | |||
| 29 | #include "internal.h" | 29 | #include "internal.h" |
| 30 | #include "video.h" | 30 | #include "video.h" |
| 31 | 31 | ||
| 32 | typedef struct { | 32 | typedef struct PixdescTestContext { |
| 33 | const AVPixFmtDescriptor *pix_desc; | 33 | const AVPixFmtDescriptor *pix_desc; |
| 34 | uint16_t *line; | 34 | uint16_t *line; |
| 35 | } PixdescTestContext; | 35 | } PixdescTestContext; |
| @@ -71,7 +71,7 @@ enum var_name { · 70 unmodified lines | |||
| 71 | VARS_NB | 71 | VARS_NB |
| 72 | }; | 72 | }; |
| 73 | 73 | ||
| 74 | typedef struct { | 74 | typedef struct ScaleContext { |
| 75 | const AVClass *class; | 75 | const AVClass *class; |
| 76 | struct SwsContext *sws; ///< software scaler context | 76 | struct SwsContext *sws; ///< software scaler context |
| 77 | struct SwsContext *isws[2]; ///< software scaler context for interlaced material | 77 | struct SwsContext *isws[2]; ///< software scaler context for interlaced material |
| @@ -51,7 +51,7 @@ enum TransposeDir { · 50 unmodified lines | |||
| 51 | TRANSPOSE_CLOCK_FLIP, | 51 | TRANSPOSE_CLOCK_FLIP, |
| 52 | }; | 52 | }; |
| 53 | 53 | ||
| 54 | typedef struct { | 54 | typedef struct TransContext { |
| 55 | const AVClass *class; | 55 | const AVClass *class; |
| 56 | int hsub, vsub; | 56 | int hsub, vsub; |
| 57 | int pixsteps[4]; | 57 | int pixsteps[4]; |
| @@ -29,7 +29,7 @@ · 28 unmodified lines | |||
| 29 | #include "internal.h" | 29 | #include "internal.h" |
| 30 | #include "video.h" | 30 | #include "video.h" |
| 31 | 31 | ||
| 32 | typedef struct { | 32 | typedef struct FlipContext { |
| 33 | int vsub; ///< vertical chroma subsampling | 33 | int vsub; ///< vertical chroma subsampling |
| 34 | } FlipContext; | 34 | } FlipContext; |
| 35 | 35 | ||
| @@ -47,7 +47,7 @@ · 46 unmodified lines | |||
| 47 | #include "internal.h" | 47 | #include "internal.h" |
| 48 | #include "video.h" | 48 | #include "video.h" |
| 49 | 49 | ||
| 50 | typedef struct { | 50 | typedef struct TestSourceContext { |
| 51 | const AVClass *class; | 51 | const AVClass *class; |
| 52 | int w, h; | 52 | int w, h; |
| 53 | unsigned int nb_frame; | 53 | unsigned int nb_frame; |
| @@ -488,7 +488,7 @@ static void draw_digit(int digit, uint8_t *dst, int dst_linesize, · 434 unmodified lines | |||
| 488 | #define LEFT_BOT_VBAR 16 | 488 | #define LEFT_BOT_VBAR 16 |
| 489 | #define RIGHT_TOP_VBAR 32 | 489 | #define RIGHT_TOP_VBAR 32 |
| 490 | #define RIGHT_BOT_VBAR 64 | 490 | #define RIGHT_BOT_VBAR 64 |
| 491 | struct { | 491 | struct segments { |
| 492 | int x, y, w, h; | 492 | int x, y, w, h; |
| 493 | } segments[] = { | 493 | } segments[] = { |
| 494 | { 1, 0, 5, 1 }, /* TOP_HBAR */ | 494 | { 1, 0, 5, 1 }, /* TOP_HBAR */ |