FFmpeg  4.3
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 "formats.h"
#include "video.h"
#include "internal.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 (AVFilterContext *ctx)
 
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 []
 
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 ( AVFilterContext ctx)
static

Definition at line 114 of file vf_tile.c.

◆ config_props()

static int config_props ( AVFilterLink outlink)
static

Definition at line 119 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 148 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 159 of file vf_tile.c.

Referenced by end_last_frame().

◆ end_last_frame()

static int end_last_frame ( AVFilterContext ctx)
static

Definition at line 172 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 195 of file vf_tile.c.

◆ request_frame()

static int request_frame ( AVFilterLink outlink)
static

Definition at line 248 of file vf_tile.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 261 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,
},
{ NULL }
}

Definition at line 269 of file vf_tile.c.

◆ tile_outputs

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

Definition at line 278 of file vf_tile.c.

◆ ff_vf_tile

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

Definition at line 288 of file vf_tile.c.

filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
Definition: vf_tile.c:195
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_tile.c:114
tile_outputs
static const AVFilterPad tile_outputs[]
Definition: vf_tile.c:278
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_tile.c:261
config_props
static int config_props(AVFilterLink *outlink)
Definition: vf_tile.c:119
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
NULL
#define NULL
Definition: coverity.c:32
AV_OPT_TYPE_COLOR
@ AV_OPT_TYPE_COLOR
Definition: opt.h:238
AV_OPT_TYPE_IMAGE_SIZE
@ AV_OPT_TYPE_IMAGE_SIZE
offset must point to two consecutive integers
Definition: opt.h:233
inputs
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: filter_design.txt:243
OFFSET
#define OFFSET(x)
Definition: vf_tile.c:51
tile_inputs
static const AVFilterPad tile_inputs[]
Definition: vf_tile.c:269
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:186
request_frame
static int request_frame(AVFilterLink *outlink)
Definition: vf_tile.c:248
init
static av_cold int init(AVFilterContext *ctx)
Definition: vf_tile.c:73
w
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo ug o o w
Definition: fate.txt:150
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
TileContext
Definition: vf_tile.c:35
FLAGS
#define FLAGS
Definition: vf_tile.c:52