FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
vf_cover_rect.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "internal.h"
#include "lavfutils.h"

Go to the source code of this file.

Data Structures

struct  CoverContext
 

Macros

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

Enumerations

enum  mode {
  FF_EBUR128_MODE_M = (1 << 0), FF_EBUR128_MODE_S = (1 << 1) | FF_EBUR128_MODE_M, FF_EBUR128_MODE_I = (1 << 2) | FF_EBUR128_MODE_M, FF_EBUR128_MODE_LRA = (1 << 3) | FF_EBUR128_MODE_S,
  FF_EBUR128_MODE_SAMPLE_PEAK = (1 << 4) | FF_EBUR128_MODE_M, MODE_NONE, MODE_RO, MODE_RW,
  MODE_TOGGLE, MODE_RANDOM, NB_MODES, MODE_COVER,
  MODE_BLUR, NB_MODES, MODE_HARD, MODE_SOFT,
  MODE_MEDIUM, MODE_HARD, MODE_SOFT, NB_MODES
}
 

Functions

 AVFILTER_DEFINE_CLASS (cover_rect)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static void cover_rect (CoverContext *cover, AVFrame *in, int offx, int offy)
 
static void blur (CoverContext *cover, AVFrame *in, int offx, int offy)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static av_cold int init (AVFilterContext *ctx)
 

Variables

static const AVOption cover_rect_options []
 
static const AVFilterPad cover_rect_inputs []
 
static const AVFilterPad cover_rect_outputs []
 
AVFilter ff_vf_cover_rect
 

Macro Definition Documentation

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

Definition at line 46 of file vf_cover_rect.c.

Definition at line 47 of file vf_cover_rect.c.

Enumeration Type Documentation

enum mode
Todo:
switch to dualinput
Enumerator
FF_EBUR128_MODE_M 

can call ff_ebur128_loudness_momentary

FF_EBUR128_MODE_S 

can call ff_ebur128_loudness_shortterm

FF_EBUR128_MODE_I 

can call ff_ebur128_loudness_global_* and ff_ebur128_relative_threshold

FF_EBUR128_MODE_LRA 

can call ff_ebur128_loudness_range

FF_EBUR128_MODE_SAMPLE_PEAK 

can call ff_ebur128_sample_peak

MODE_NONE 
MODE_RO 
MODE_RW 
MODE_TOGGLE 
MODE_RANDOM 
NB_MODES 
MODE_COVER 
MODE_BLUR 
NB_MODES 
MODE_HARD 
MODE_SOFT 
MODE_MEDIUM 
MODE_HARD 
MODE_SOFT 
NB_MODES 

Definition at line 32 of file vf_cover_rect.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( cover_rect  )
static int query_formats ( AVFilterContext ctx)
static

Definition at line 58 of file vf_cover_rect.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 69 of file vf_cover_rect.c.

static void cover_rect ( CoverContext cover,
AVFrame in,
int  offx,
int  offy 
)
static

Definition at line 74 of file vf_cover_rect.c.

Referenced by filter_frame(), and register_all().

static void blur ( CoverContext cover,
AVFrame in,
int  offx,
int  offy 
)
static

Definition at line 92 of file vf_cover_rect.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 135 of file vf_cover_rect.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 195 of file vf_cover_rect.c.

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 203 of file vf_cover_rect.c.

Variable Documentation

const AVOption cover_rect_options[]
static
Initial value:
= {
{ "cover", "cover bitmap filename", OFFSET(cover_filename), AV_OPT_TYPE_STRING, {.str = NULL}, .flags = FLAGS },
{ "mode", "set removal mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64 = MODE_BLUR}, 0, NB_MODES - 1, FLAGS, "mode" },
{ "cover", "cover area with bitmap", 0, AV_OPT_TYPE_CONST, {.i64 = MODE_COVER}, INT_MIN, INT_MAX, FLAGS, "mode" },
{ "blur", "blur area", 0, AV_OPT_TYPE_CONST, {.i64 = MODE_BLUR}, INT_MIN, INT_MAX, FLAGS, "mode" },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: vf_cover_rect.c:46
#define FLAGS
Definition: vf_cover_rect.c:47
mode
Use these values in ebur128_init (or'ed).
Definition: ebur128.h:83

Definition at line 48 of file vf_cover_rect.c.

const AVFilterPad cover_rect_inputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_input,
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_input(AVFilterLink *inlink)
Definition: vf_cover_rect.c:69
static int filter_frame(AVFilterLink *inlink, AVFrame *in)

Definition at line 232 of file vf_cover_rect.c.

const AVFilterPad cover_rect_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 242 of file vf_cover_rect.c.

AVFilter ff_vf_cover_rect
Initial value:
= {
.name = "cover_rect",
.description = NULL_IF_CONFIG_SMALL("Find and cover a user specified object."),
.priv_size = sizeof(CoverContext),
.init = init,
.priv_class = &cover_rect_class,
}
static int query_formats(AVFilterContext *ctx)
Definition: vf_cover_rect.c:58
static av_cold int init(AVFilterContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static av_cold void uninit(AVFilterContext *ctx)
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
static const AVFilterPad cover_rect_outputs[]
static const AVFilterPad cover_rect_inputs[]

Definition at line 250 of file vf_cover_rect.c.