FFmpeg
Data Structures | Macros | Functions | Variables
vf_tile.c File Reference
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "drawutils.h"
#include "filters.h"
#include "formats.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  TileContext
 

Macros

#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 (const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
 
static int config_props (AVFilterLink *outlink)
 
static void get_tile_pos (AVFilterContext *ctx, unsigned *x, unsigned *y, unsigned current)
 
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)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

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

Detailed Description

tile video filter

Definition in file vf_tile.c.

Macro Definition Documentation

◆ OFFSET

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

Definition at line 51 of file vf_tile.c.

◆ FLAGS

Definition at line 52 of file vf_tile.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( tile  )

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 73 of file vf_tile.c.

◆ query_formats()

static int query_formats ( const AVFilterContext ctx,
AVFilterFormatsConfig **  cfg_in,
AVFilterFormatsConfig **  cfg_out 
)
static

Definition at line 114 of file vf_tile.c.

◆ config_props()

static int config_props ( AVFilterLink outlink)
static

Definition at line 122 of file vf_tile.c.

◆ get_tile_pos()

static void get_tile_pos ( AVFilterContext ctx,
unsigned *  x,
unsigned *  y,
unsigned  current 
)
static

Definition at line 152 of file vf_tile.c.

Referenced by draw_blank_frame(), and filter_frame().

◆ draw_blank_frame()

static void draw_blank_frame ( AVFilterContext ctx,
AVFrame out_buf 
)
static

Definition at line 163 of file vf_tile.c.

Referenced by end_last_frame().

◆ end_last_frame()

static int end_last_frame ( AVFilterContext ctx)
static

Definition at line 176 of file vf_tile.c.

Referenced by filter_frame(), and request_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame picref 
)
static

Definition at line 199 of file vf_tile.c.

◆ request_frame()

static int request_frame ( AVFilterLink outlink)
static

Definition at line 252 of file vf_tile.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 265 of file vf_tile.c.

Variable Documentation

◆ tile_options

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 },
{ "color", "set the color of the unused area", OFFSET(rgba_color), AV_OPT_TYPE_COLOR, {.str = "black"}, .flags = FLAGS },
{ "overlap", "set how many frames to overlap for each render", OFFSET(overlap),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS },
{ "init_padding", "set how many frames to initially pad", OFFSET(init_padding),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS },
{ NULL }
}

Definition at line 54 of file vf_tile.c.

◆ tile_inputs

const AVFilterPad tile_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
}

Definition at line 273 of file vf_tile.c.

◆ tile_outputs

const AVFilterPad tile_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_props,
.request_frame = request_frame,
},
}

Definition at line 281 of file vf_tile.c.

◆ ff_vf_tile

const AVFilter ff_vf_tile
Initial value:
= {
.name = "tile",
.description = NULL_IF_CONFIG_SMALL("Tile several successive frames together."),
.init = init,
.uninit = uninit,
.priv_size = sizeof(TileContext),
.priv_class = &tile_class,
}

Definition at line 290 of file vf_tile.c.

filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
Definition: vf_tile.c:199
tile_outputs
static const AVFilterPad tile_outputs[]
Definition: vf_tile.c:281
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_tile.c:265
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
w
uint8_t w
Definition: llviddspenc.c:38
config_props
static int config_props(AVFilterLink *outlink)
Definition: vf_tile.c:122
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
NULL
#define NULL
Definition: coverity.c:32
query_formats
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
Definition: vf_tile.c:114
AV_OPT_TYPE_COLOR
@ AV_OPT_TYPE_COLOR
Underlying C type is uint8_t[4].
Definition: opt.h:323
AV_OPT_TYPE_IMAGE_SIZE
@ AV_OPT_TYPE_IMAGE_SIZE
Underlying C type is two consecutive integers.
Definition: opt.h:303
OFFSET
#define OFFSET(x)
Definition: vf_tile.c:51
tile_inputs
static const AVFilterPad tile_inputs[]
Definition: vf_tile.c:273
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:94
request_frame
static int request_frame(AVFilterLink *outlink)
Definition: vf_tile.c:252
FILTER_QUERY_FUNC2
#define FILTER_QUERY_FUNC2(func)
Definition: filters.h:239
init
static av_cold int init(AVFilterContext *ctx)
Definition: vf_tile.c:73
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
TileContext
Definition: vf_tile.c:35
FLAGS
#define FLAGS
Definition: vf_tile.c:52