FFmpeg  4.3
Data Structures | Macros | Enumerations | Functions | Variables
vf_swaprect.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/eval.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  SwapRectContext
 

Macros

#define OFFSET(x)   offsetof(SwapRectContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
 

Enumerations

enum  {
  VAR_W, VAR_H, VAR_A, VAR_N,
  VAR_T, VAR_POS, VAR_SAR, VAR_DAR,
  VAR_VARS_NB
}
 

Functions

 AVFILTER_DEFINE_CLASS (swaprect)
 
static int query_formats (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int config_input (AVFilterLink *inlink)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption swaprect_options []
 
static const char *const var_names [] = { "w", "h", "a", "n", "t", "pos", "sar", "dar", NULL }
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
AVFilter ff_vf_swaprect
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 45 of file vf_swaprect.c.

◆ FLAGS

Definition at line 46 of file vf_swaprect.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
VAR_W 
VAR_H 
VAR_A 
VAR_N 
VAR_T 
VAR_POS 
VAR_SAR 
VAR_DAR 
VAR_VARS_NB 

Definition at line 77 of file vf_swaprect.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( swaprect  )

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 59 of file vf_swaprect.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 79 of file vf_swaprect.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 200 of file vf_swaprect.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 221 of file vf_swaprect.c.

Variable Documentation

◆ swaprect_options

const AVOption swaprect_options[]
static
Initial value:
= {
{ "w", "set rect width", OFFSET(w), AV_OPT_TYPE_STRING, {.str="w/2"}, 0, 0, .flags = FLAGS },
{ "h", "set rect height", OFFSET(h), AV_OPT_TYPE_STRING, {.str="h/2"}, 0, 0, .flags = FLAGS },
{ "x1", "set 1st rect x top left coordinate", OFFSET(x1), AV_OPT_TYPE_STRING, {.str="w/2"}, 0, 0, .flags = FLAGS },
{ "y1", "set 1st rect y top left coordinate", OFFSET(y1), AV_OPT_TYPE_STRING, {.str="h/2"}, 0, 0, .flags = FLAGS },
{ "x2", "set 2nd rect x top left coordinate", OFFSET(x2), AV_OPT_TYPE_STRING, {.str="0"}, 0, 0, .flags = FLAGS },
{ "y2", "set 2nd rect y top left coordinate", OFFSET(y2), AV_OPT_TYPE_STRING, {.str="0"}, 0, 0, .flags = FLAGS },
{ NULL },
}

Definition at line 47 of file vf_swaprect.c.

◆ var_names

const char* const var_names[] = { "w", "h", "a", "n", "t", "pos", "sar", "dar", NULL }
static

Definition at line 76 of file vf_swaprect.c.

Referenced by filter_frame().

◆ inputs

const AVFilterPad inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
.needs_writable = 1,
},
{ NULL }
}

Definition at line 227 of file vf_swaprect.c.

◆ outputs

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

Definition at line 238 of file vf_swaprect.c.

◆ ff_vf_swaprect

AVFilter ff_vf_swaprect
Initial value:
= {
.name = "swaprect",
.description = NULL_IF_CONFIG_SMALL("Swap 2 rectangular objects in video."),
.priv_size = sizeof(SwapRectContext),
.priv_class = &swaprect_class,
}

Definition at line 246 of file vf_swaprect.c.

FLAGS
#define FLAGS
Definition: vf_swaprect.c:46
outputs
static const AVFilterPad outputs[]
Definition: vf_swaprect.c:238
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_swaprect.c:221
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_swaprect.c:59
SwapRectContext
Definition: vf_swaprect.c:32
NULL
#define NULL
Definition: coverity.c:32
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
AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:125
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
OFFSET
#define OFFSET(x)
Definition: vf_swaprect.c:45
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
inputs
static const AVFilterPad inputs[]
Definition: vf_swaprect.c:227
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:564
h
h
Definition: vp9dsp_template.c:2038
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:227
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_swaprect.c:79
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_swaprect.c:200