FFmpeg
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

◆ OFFSET

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

Definition at line 46 of file vf_cover_rect.c.

◆ FLAGS

Definition at line 47 of file vf_cover_rect.c.

Enumeration Type Documentation

◆ mode

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()

AVFILTER_DEFINE_CLASS ( cover_rect  )

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 58 of file vf_cover_rect.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 69 of file vf_cover_rect.c.

◆ cover_rect()

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().

◆ blur()

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().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 135 of file vf_cover_rect.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 195 of file vf_cover_rect.c.

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 204 of file vf_cover_rect.c.

Variable Documentation

◆ cover_rect_options

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 }
}

Definition at line 48 of file vf_cover_rect.c.

◆ cover_rect_inputs

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

Definition at line 233 of file vf_cover_rect.c.

◆ cover_rect_outputs

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

Definition at line 243 of file vf_cover_rect.c.

◆ ff_vf_cover_rect

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,
}

Definition at line 251 of file vf_cover_rect.c.

query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_cover_rect.c:58
cover_rect_outputs
static const AVFilterPad cover_rect_outputs[]
Definition: vf_cover_rect.c:243
OFFSET
#define OFFSET(x)
Definition: vf_cover_rect.c:46
cover_rect_inputs
static const AVFilterPad cover_rect_inputs[]
Definition: vf_cover_rect.c:233
NB_MODES
@ NB_MODES
Definition: vf_cover_rect.c:35
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
NULL
#define NULL
Definition: coverity.c:32
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
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:188
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_cover_rect.c:195
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_cover_rect.c:69
MODE_BLUR
@ MODE_BLUR
Definition: vf_cover_rect.c:34
CoverContext
Definition: vf_cover_rect.c:38
MODE_COVER
@ MODE_COVER
Definition: vf_cover_rect.c:33
mode
mode
Definition: ebur128.h:83
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
init
static av_cold int init(AVFilterContext *ctx)
Definition: vf_cover_rect.c:204
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
FLAGS
#define FLAGS
Definition: vf_cover_rect.c:47
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:227
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_cover_rect.c:135
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:232