[FFmpeg-cvslog] lavfi: name anonymous structs

Vittorio Giovara git at videolan.org
Sat Apr 19 18:29:26 CEST 2014


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Fri Apr 11 11:54:15 2014 +0200| [58400ac133bcfb6bf8196b4e5208bc178307739b] | committer: Vittorio Giovara

lavfi: name anonymous structs

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=58400ac133bcfb6bf8196b4e5208bc178307739b
---

 libavfilter/buffersink.c     |    2 +-
 libavfilter/buffersrc.c      |    2 +-
 libavfilter/fifo.c           |    2 +-
 libavfilter/setpts.c         |    2 +-
 libavfilter/settb.c          |    2 +-
 libavfilter/vf_aspect.c      |    2 +-
 libavfilter/vf_blackframe.c  |    2 +-
 libavfilter/vf_boxblur.c     |    4 ++--
 libavfilter/vf_crop.c        |    2 +-
 libavfilter/vf_cropdetect.c  |    2 +-
 libavfilter/vf_delogo.c      |    2 +-
 libavfilter/vf_drawbox.c     |    2 +-
 libavfilter/vf_drawtext.c    |    4 ++--
 libavfilter/vf_fade.c        |    2 +-
 libavfilter/vf_fieldorder.c  |    2 +-
 libavfilter/vf_format.c      |    2 +-
 libavfilter/vf_hflip.c       |    2 +-
 libavfilter/vf_hqdn3d.h      |    2 +-
 libavfilter/vf_interlace.c   |    2 +-
 libavfilter/vf_libopencv.c   |    8 ++++----
 libavfilter/vf_lut.c         |    2 +-
 libavfilter/vf_overlay.c     |    2 +-
 libavfilter/vf_pad.c         |    2 +-
 libavfilter/vf_pixdesctest.c |    2 +-
 libavfilter/vf_scale.c       |    2 +-
 libavfilter/vf_select.c      |    2 +-
 libavfilter/vf_showinfo.c    |    2 +-
 libavfilter/vf_transpose.c   |    2 +-
 libavfilter/vf_unsharp.c     |    2 +-
 libavfilter/vf_vflip.c       |    2 +-
 libavfilter/vsrc_color.c     |    2 +-
 libavfilter/vsrc_movie.c     |    2 +-
 libavfilter/vsrc_nullsrc.c   |    2 +-
 libavfilter/vsrc_testsrc.c   |    4 ++--
 34 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 2a22948..2894a5b 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -35,7 +35,7 @@
 #include "buffersink.h"
 #include "internal.h"
 
-typedef struct {
+typedef struct BufferSinkContext {
     AVFrame *cur_frame;          ///< last frame delivered on the sink
     AVAudioFifo *audio_fifo;     ///< FIFO for audio samples
     int64_t next_pts;            ///< interpolating audio pts
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index fd058d6..480dca9 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -40,7 +40,7 @@
 #include "internal.h"
 #include "video.h"
 
-typedef struct {
+typedef struct BufferSourceContext {
     const AVClass    *class;
     AVFifoBuffer     *fifo;
     AVRational        time_base;     ///< time_base to set in the output link
diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c
index 30e0b38..a414585 100644
--- a/libavfilter/fifo.c
+++ b/libavfilter/fifo.c
@@ -39,7 +39,7 @@ typedef struct Buf {
     struct Buf        *next;
 } Buf;
 
-typedef struct {
+typedef struct FifoContext {
     Buf  root;
     Buf *last;   ///< last buffered frame
 
diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c
index be190c0..ff0016d 100644
--- a/libavfilter/setpts.c
+++ b/libavfilter/setpts.c
@@ -73,7 +73,7 @@ enum var_name {
     VAR_VARS_NB
 };
 
-typedef struct {
+typedef struct SetPTSContext {
     const AVClass *class;
     char *expr_str;
     AVExpr *expr;
diff --git a/libavfilter/settb.c b/libavfilter/settb.c
index 962e7b3..169037f 100644
--- a/libavfilter/settb.c
+++ b/libavfilter/settb.c
@@ -57,7 +57,7 @@ enum var_name {
     VAR_VARS_NB
 };
 
-typedef struct {
+typedef struct SetTBContext {
     const AVClass *class;
     char *tb_expr;
     double var_values[VAR_VARS_NB];
diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c
index bb7f15e..2c28213 100644
--- a/libavfilter/vf_aspect.c
+++ b/libavfilter/vf_aspect.c
@@ -62,7 +62,7 @@ enum var_name {
     VARS_NB
 };
 
-typedef struct {
+typedef struct AspectContext {
     const AVClass *class;
     AVRational dar;
     AVRational sar;
diff --git a/libavfilter/vf_blackframe.c b/libavfilter/vf_blackframe.c
index 039f055..8cbcc00 100644
--- a/libavfilter/vf_blackframe.c
+++ b/libavfilter/vf_blackframe.c
@@ -38,7 +38,7 @@
 #include "internal.h"
 #include "video.h"
 
-typedef struct {
+typedef struct BlackFrameContext {
     const AVClass *class;
     int bamount;          ///< black amount
     int bthresh;          ///< black threshold
diff --git a/libavfilter/vf_boxblur.c b/libavfilter/vf_boxblur.c
index 1f26549..4cbfe2c 100644
--- a/libavfilter/vf_boxblur.c
+++ b/libavfilter/vf_boxblur.c
@@ -55,12 +55,12 @@ enum var_name {
     VARS_NB
 };
 
-typedef struct {
+typedef struct FilterParam {
     int radius;
     int power;
 } FilterParam;
 
-typedef struct {
+typedef struct BoxBlurContext {
     const AVClass *class;
     FilterParam luma_param;
     FilterParam chroma_param;
diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
index 1aa8466..9e820d7 100644
--- a/libavfilter/vf_crop.c
+++ b/libavfilter/vf_crop.c
@@ -68,7 +68,7 @@ enum var_name {
     VAR_VARS_NB
 };
 
-typedef struct {
+typedef struct CropContext {
     const AVClass *class;
     int  x;             ///< x offset of the non-cropped area with respect to the input area
     int  y;             ///< y offset of the non-cropped area with respect to the input area
diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c
index ea9e47d..14c26c7 100644
--- a/libavfilter/vf_cropdetect.c
+++ b/libavfilter/vf_cropdetect.c
@@ -34,7 +34,7 @@
 #include "internal.h"
 #include "video.h"
 
-typedef struct {
+typedef struct CropDetectContext {
     const AVClass *class;
     int x1, y1, x2, y2;
     int limit;
diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c
index 4175e47..dc58078 100644
--- a/libavfilter/vf_delogo.c
+++ b/libavfilter/vf_delogo.c
@@ -130,7 +130,7 @@ static void apply_delogo(uint8_t *dst, int dst_linesize,
     }
 }
 
-typedef struct {
+typedef struct DelogoContext {
     const AVClass *class;
     int x, y, w, h, band, show;
 }  DelogoContext;
diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c
index 2241974..ab14af2 100644
--- a/libavfilter/vf_drawbox.c
+++ b/libavfilter/vf_drawbox.c
@@ -36,7 +36,7 @@
 
 enum { Y, U, V, A };
 
-typedef struct {
+typedef struct DrawBoxContext {
     const AVClass *class;
     int x, y, w_opt, h_opt, w, h;
     char *color_str;
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 2338b03..892104d 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -105,7 +105,7 @@ enum var_name {
     VAR_VARS_NB
 };
 
-typedef struct {
+typedef struct DrawTextContext {
     const AVClass *class;
 #if CONFIG_LIBFONTCONFIG
     uint8_t *font;              ///< font to be used
@@ -223,7 +223,7 @@ struct ft_error
 
 #define FT_ERRMSG(e) ft_errors[e].err_msg
 
-typedef struct {
+typedef struct Glyph {
     FT_Glyph *glyph;
     uint32_t code;
     FT_Bitmap bitmap; ///< array holding bitmaps of font
diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index b6bd775..eac0c2c 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -36,7 +36,7 @@
 #define FADE_IN  0
 #define FADE_OUT 1
 
-typedef struct {
+typedef struct FadeContext {
     const AVClass *class;
     int type;
     int factor, fade_per_frame;
diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c
index 5185cf4..a4df87f 100644
--- a/libavfilter/vf_fieldorder.c
+++ b/libavfilter/vf_fieldorder.c
@@ -35,7 +35,7 @@
 #include "internal.h"
 #include "video.h"
 
-typedef struct {
+typedef struct FieldOrderContext {
     const AVClass *class;
     int dst_tff;               ///< output bff/tff
     int          line_size[4]; ///< bytes of pixel data per line for each plane
diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c
index 22628d7..73c7e69 100644
--- a/libavfilter/vf_format.c
+++ b/libavfilter/vf_format.c
@@ -35,7 +35,7 @@
 #include "internal.h"
 #include "video.h"
 
-typedef struct {
+typedef struct FormatContext {
     const AVClass *class;
     char *pix_fmts;
     /**
diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c
index 6034b68..1eb8d69 100644
--- a/libavfilter/vf_hflip.c
+++ b/libavfilter/vf_hflip.c
@@ -35,7 +35,7 @@
 #include "libavutil/intreadwrite.h"
 #include "libavutil/imgutils.h"
 
-typedef struct {
+typedef struct FlipContext {
     int max_step[4];    ///< max pixel step for each plane, expressed as a number of bytes
     int hsub, vsub;     ///< chroma subsampling
 } FlipContext;
diff --git a/libavfilter/vf_hqdn3d.h b/libavfilter/vf_hqdn3d.h
index 5cdbb12..a344518 100644
--- a/libavfilter/vf_hqdn3d.h
+++ b/libavfilter/vf_hqdn3d.h
@@ -24,7 +24,7 @@
 
 #include "libavutil/opt.h"
 
-typedef struct {
+typedef struct HQDN3DContext {
     const AVClass *class;
     int16_t *coefs[4];
     uint16_t *line;
diff --git a/libavfilter/vf_interlace.c b/libavfilter/vf_interlace.c
index 8a16e19..fa3415d 100644
--- a/libavfilter/vf_interlace.c
+++ b/libavfilter/vf_interlace.c
@@ -42,7 +42,7 @@ enum FieldType {
     FIELD_LOWER = 1,
 };
 
-typedef struct {
+typedef struct InterlaceContext {
     const AVClass *class;
     enum ScanMode scan;    // top or bottom field first scanning
 #if FF_API_INTERLACE_LOWPASS_SET
diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c
index fa913f7..bd3d59b 100644
--- a/libavfilter/vf_libopencv.c
+++ b/libavfilter/vf_libopencv.c
@@ -68,7 +68,7 @@ static int query_formats(AVFilterContext *ctx)
     return 0;
 }
 
-typedef struct {
+typedef struct OCVContext {
     const AVClass *class;
     char *name;
     char *params;
@@ -78,7 +78,7 @@ typedef struct {
     void *priv;
 } OCVContext;
 
-typedef struct {
+typedef struct SmoothContext {
     int type;
     int    param1, param2;
     double param3, param4;
@@ -245,7 +245,7 @@ static int parse_iplconvkernel(IplConvKernel **kernel, char *buf, void *log_ctx)
     return 0;
 }
 
-typedef struct {
+typedef struct DilateContext {
     int nb_iterations;
     IplConvKernel *kernel;
 } DilateContext;
@@ -301,7 +301,7 @@ static void erode_end_frame_filter(AVFilterContext *ctx, IplImage *inimg, IplIma
     cvErode(inimg, outimg, dilate->kernel, dilate->nb_iterations);
 }
 
-typedef struct {
+typedef struct OCVFilterEntry {
     const char *name;
     size_t priv_size;
     int  (*init)(AVFilterContext *ctx, const char *args);
diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c
index c59dcd6..9299d40 100644
--- a/libavfilter/vf_lut.c
+++ b/libavfilter/vf_lut.c
@@ -63,7 +63,7 @@ enum var_name {
     VAR_VARS_NB
 };
 
-typedef struct {
+typedef struct LutContext {
     const AVClass *class;
     uint8_t lut[4][256];  ///< lookup table for each component
     char   *comp_expr_str[4];
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index b3591eb..11e0a6f 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -73,7 +73,7 @@ static const char *eof_action_str[] = {
 #define MAIN    0
 #define OVERLAY 1
 
-typedef struct {
+typedef struct OverlayContext {
     const AVClass *class;
     int x, y;                   ///< position of overlayed picture
 
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c
index 0609767..634af4c 100644
--- a/libavfilter/vf_pad.c
+++ b/libavfilter/vf_pad.c
@@ -94,7 +94,7 @@ static int query_formats(AVFilterContext *ctx)
     return 0;
 }
 
-typedef struct {
+typedef struct PadContext {
     const AVClass *class;
     int w, h;               ///< output dimensions, a value of 0 will result in the input size
     int x, y;               ///< offsets of the input area with respect to the padded area
diff --git a/libavfilter/vf_pixdesctest.c b/libavfilter/vf_pixdesctest.c
index 5c6b625..0c5b7a1 100644
--- a/libavfilter/vf_pixdesctest.c
+++ b/libavfilter/vf_pixdesctest.c
@@ -29,7 +29,7 @@
 #include "internal.h"
 #include "video.h"
 
-typedef struct {
+typedef struct PixdescTestContext {
     const AVPixFmtDescriptor *pix_desc;
     uint16_t *line;
 } PixdescTestContext;
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index c47c6f3..b06b179 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -68,7 +68,7 @@ enum var_name {
     VARS_NB
 };
 
-typedef struct {
+typedef struct ScaleContext {
     const AVClass *class;
     struct SwsContext *sws;     ///< software scaler context
 
diff --git a/libavfilter/vf_select.c b/libavfilter/vf_select.c
index fc69c89..22be1fd 100644
--- a/libavfilter/vf_select.c
+++ b/libavfilter/vf_select.c
@@ -115,7 +115,7 @@ enum var_name {
 
 #define FIFO_SIZE 8
 
-typedef struct {
+typedef struct SelectContext {
     const AVClass *class;
     char *expr_str;
     AVExpr *expr;
diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index 031d8fe..744ad23 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -34,7 +34,7 @@
 #include "internal.h"
 #include "video.h"
 
-typedef struct {
+typedef struct ShowInfoContext {
     unsigned int frame;
 } ShowInfoContext;
 
diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c
index cbb6ed6..07602b9 100644
--- a/libavfilter/vf_transpose.c
+++ b/libavfilter/vf_transpose.c
@@ -45,7 +45,7 @@ enum TransposeDir {
     TRANSPOSE_CLOCK_FLIP,
 };
 
-typedef struct {
+typedef struct TransContext {
     const AVClass *class;
     int hsub, vsub;
     int pixsteps[4];
diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c
index 842ec7e..d0d59e2 100644
--- a/libavfilter/vf_unsharp.c
+++ b/libavfilter/vf_unsharp.c
@@ -62,7 +62,7 @@ typedef struct FilterParam {
     uint32_t *sc[(MAX_SIZE * MAX_SIZE) - 1]; ///< finite state machine storage
 } FilterParam;
 
-typedef struct {
+typedef struct UnsharpContext {
     const AVClass *class;
     int lmsize_x, lmsize_y, cmsize_x, cmsize_y;
     float lamount, camount;
diff --git a/libavfilter/vf_vflip.c b/libavfilter/vf_vflip.c
index ced946e..fa54985 100644
--- a/libavfilter/vf_vflip.c
+++ b/libavfilter/vf_vflip.c
@@ -29,7 +29,7 @@
 #include "internal.h"
 #include "video.h"
 
-typedef struct {
+typedef struct FlipContext {
     int vsub;   ///< vertical chroma subsampling
 } FlipContext;
 
diff --git a/libavfilter/vsrc_color.c b/libavfilter/vsrc_color.c
index d72d072..3b506ec 100644
--- a/libavfilter/vsrc_color.c
+++ b/libavfilter/vsrc_color.c
@@ -40,7 +40,7 @@
 #include "libavutil/parseutils.h"
 #include "drawutils.h"
 
-typedef struct {
+typedef struct ColorContext {
     const AVClass *class;
     int w, h;
     uint8_t color[4];
diff --git a/libavfilter/vsrc_movie.c b/libavfilter/vsrc_movie.c
index 502f360..8ebdd06 100644
--- a/libavfilter/vsrc_movie.c
+++ b/libavfilter/vsrc_movie.c
@@ -41,7 +41,7 @@
 #include "internal.h"
 #include "video.h"
 
-typedef struct {
+typedef struct MovieContext {
     const AVClass *class;
     int64_t seek_point;   ///< seekpoint in microseconds
     double seek_point_d;
diff --git a/libavfilter/vsrc_nullsrc.c b/libavfilter/vsrc_nullsrc.c
index f7766fa..63e90fd 100644
--- a/libavfilter/vsrc_nullsrc.c
+++ b/libavfilter/vsrc_nullsrc.c
@@ -49,7 +49,7 @@ enum var_name {
     VAR_VARS_NB
 };
 
-typedef struct {
+typedef struct NullContext {
     const AVClass *class;
     int w, h;
     char *tb_expr;
diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c
index 9e12852..e41625e 100644
--- a/libavfilter/vsrc_testsrc.c
+++ b/libavfilter/vsrc_testsrc.c
@@ -42,7 +42,7 @@
 #include "internal.h"
 #include "video.h"
 
-typedef struct {
+typedef struct TestSourceContext {
     const AVClass *class;
     int h, w;
     unsigned int nb_frame;
@@ -193,7 +193,7 @@ static void draw_digit(int digit, uint8_t *dst, unsigned dst_linesize,
 #define LEFT_BOT_VBAR  16
 #define RIGHT_TOP_VBAR 32
 #define RIGHT_BOT_VBAR 64
-    struct {
+    struct segments {
         int x, y, w, h;
     } segments[] = {
         { 1,  0, 5, 1 }, /* TOP_HBAR */



More information about the ffmpeg-cvslog mailing list