vf_tile.c File Reference

tile video filter More...

#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "drawutils.h"
#include "formats.h"
#include "video.h"
#include "internal.h"
Include dependency graph for vf_tile.c:

Go to the source code of this file.

Data Structures

struct  TileContext
 

Macros

#define REASONABLE_SIZE   1024
 
#define OFFSET(x)   offsetof(TileContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (tile)
 
static av_cold int init (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_props (AVFilterLink *outlink)
 
static void get_current_tile_pos (AVFilterContext *ctx, unsigned *x, unsigned *y)
 
static void draw_blank_frame (AVFilterContext *ctx, AVFrame *out_buf)
 
static int end_last_frame (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *picref)
 
static int request_frame (AVFilterLink *outlink)
 

Variables

static const AVOption tile_options []
 
static const AVFilterPad tile_inputs []
 
static const AVFilterPad tile_outputs []
 
AVFilter avfilter_vf_tile
 

Detailed Description

tile video filter

Definition in file vf_tile.c.

Macro Definition Documentation

Definition at line 49 of file vf_tile.c.

#define OFFSET (   x)    offsetof(TileContext, x)

Definition at line 48 of file vf_tile.c.

#define REASONABLE_SIZE   1024

Definition at line 46 of file vf_tile.c.

Referenced by init().

Function Documentation

AVFILTER_DEFINE_CLASS ( tile  )
static int config_props ( AVFilterLink outlink)
static

Definition at line 92 of file vf_tile.c.

static void draw_blank_frame ( AVFilterContext ctx,
AVFrame out_buf 
)
static

Definition at line 135 of file vf_tile.c.

Referenced by end_last_frame().

static int end_last_frame ( AVFilterContext ctx)
static

Definition at line 147 of file vf_tile.c.

Referenced by filter_frame(), and request_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame picref 
)
static

Definition at line 165 of file vf_tile.c.

static void get_current_tile_pos ( AVFilterContext ctx,
unsigned *  x,
unsigned *  y 
)
static

Definition at line 124 of file vf_tile.c.

Referenced by draw_blank_frame(), and filter_frame().

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 65 of file vf_tile.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 86 of file vf_tile.c.

static int request_frame ( AVFilterLink outlink)
static

Definition at line 201 of file vf_tile.c.

Variable Documentation

AVFilter avfilter_vf_tile
Initial value:
= {
.name = "tile",
.description = NULL_IF_CONFIG_SMALL("Tile several successive frames together."),
.init = init,
.query_formats = query_formats,
.priv_size = sizeof(TileContext),
.priv_class = &tile_class,
}
static const AVFilterPad outputs[]
Definition: af_ashowinfo.c:117
static const AVFilterPad tile_inputs[]
Definition: vf_tile.c:214
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static int query_formats(AVFilterContext *ctx)
Definition: vf_tile.c:86
static const AVFilterPad tile_outputs[]
Definition: vf_tile.c:223
static av_cold int init(AVFilterContext *ctx)
Definition: vf_tile.c:65
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs

Definition at line 233 of file vf_tile.c.

const AVFilterPad tile_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
Definition: vf_tile.c:165
NULL
Definition: eval.c:55

Definition at line 214 of file vf_tile.c.

const AVOption tile_options[]
static
Initial value:
= {
{ "layout", "set grid size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE,
{.str = "6x5"}, 0, 0, FLAGS },
{ "nb_frames", "set maximum number of frame to render", OFFSET(nb_frames),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS },
{ "margin", "set outer border margin in pixels", OFFSET(margin),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1024, FLAGS },
{ "padding", "set inner border thickness in pixels", OFFSET(padding),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1024, FLAGS },
{NULL},
}
output residual component w
NULL
Definition: eval.c:55
offset must point to two consecutive integers
Definition: opt.h:230
#define FLAGS
Definition: vf_tile.c:49
#define OFFSET(x)
Definition: vf_tile.c:48

Definition at line 51 of file vf_tile.c.

const AVFilterPad tile_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_props,
.request_frame = request_frame,
},
{ NULL }
}
static int request_frame(AVFilterLink *outlink)
Definition: vf_tile.c:201
static int config_props(AVFilterLink *outlink)
Definition: vf_tile.c:92
NULL
Definition: eval.c:55

Definition at line 223 of file vf_tile.c.