[FFmpeg-devel] [PATCH] Add 'drawgrid' video filter

Andrey Utkin andrey.krieger.utkin at gmail.com
Mon May 13 13:40:57 CEST 2013


2013/5/13 Stefano Sabatini <stefasab at gmail.com>:
>> +static int pixel_belongs_to_grid(DrawGridContext *drawgrid, int x, int y)
>
> inline, pure

You mean adding such specificator words? Before "static"?

>> +static const AVOption drawgrid_options[] = {
>> +    { "x",         "Set horizontal offset", OFFSET(x),         AV_OPT_TYPE_INT,    { .i64 = 0 },       INT_MIN,  INT_MAX,  FLAGS },
>> +    { "y",         "Set vertical offset",   OFFSET(y),         AV_OPT_TYPE_INT,    { .i64 = 0 },       INT_MIN,  INT_MAX,  FLAGS },
>> +    { "width",     "Width of grid cell",    OFFSET(w),         AV_OPT_TYPE_INT,    { .i64 = 0 },       0,        INT_MAX,  FLAGS },
>> +    { "w",         "Width of grid cell",    OFFSET(w),         AV_OPT_TYPE_INT,    { .i64 = 0 },       0,        INT_MAX,  FLAGS },
>> +    { "height",    "Height of grid cell",   OFFSET(h),         AV_OPT_TYPE_INT,    { .i64 = 0 },       0,        INT_MAX,  FLAGS },
>> +    { "h",         "Height of grid cell",   OFFSET(h),         AV_OPT_TYPE_INT,    { .i64 = 0 },       0,        INT_MAX,  FLAGS },
>> +    { "color",     "Color of the grid",     OFFSET(color_str), AV_OPT_TYPE_STRING, { .str = "black" }, CHAR_MIN, CHAR_MAX, FLAGS },
>> +    { "c",         "Color of the grid",     OFFSET(color_str), AV_OPT_TYPE_STRING, { .str = "black" }, CHAR_MIN, CHAR_MAX, FLAGS },
>> +    { "thickness", "Grid line thickness",   OFFSET(thickness), AV_OPT_TYPE_INT,    {.i64=1},           0,        INT_MAX,  FLAGS },
>> +    { "t",         "Grid line thickness",   OFFSET(thickness), AV_OPT_TYPE_INT,    {.i64=1},           0,        INT_MAX,  FLAGS },
>
> set horizontal offset
> set vertical offset
> etc ...

You mean descriptions should not start with capital letter? Sorry, i
just saw both variants around, and thought i should start with
capital.

--
Andrey Utkin


More information about the ffmpeg-devel mailing list