FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
vf_cover_rect.c File Reference
#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 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 []
 
const AVFilter ff_vf_cover_rect
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 45 of file vf_cover_rect.c.

◆ FLAGS

Definition at line 46 of file vf_cover_rect.c.

Enumeration Type Documentation

◆ mode

enum mode
Todo:
switch to dualinput
Enumerator
FF_EBUR128_MODE_M 

can resurrrect and 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 31 of file vf_cover_rect.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( cover_rect  )

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 57 of file vf_cover_rect.c.

◆ cover_rect()

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

Definition at line 62 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 80 of file vf_cover_rect.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 123 of file vf_cover_rect.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 183 of file vf_cover_rect.c.

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 192 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 47 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,
},
}

Definition at line 221 of file vf_cover_rect.c.

◆ cover_rect_outputs

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

Definition at line 230 of file vf_cover_rect.c.

◆ ff_vf_cover_rect

const 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 237 of file vf_cover_rect.c.

cover_rect_outputs
static const AVFilterPad cover_rect_outputs[]
Definition: vf_cover_rect.c:230
OFFSET
#define OFFSET(x)
Definition: vf_cover_rect.c:45
cover_rect_inputs
static const AVFilterPad cover_rect_inputs[]
Definition: vf_cover_rect.c:221
NB_MODES
@ NB_MODES
Definition: vf_cover_rect.c:34
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:66
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:190
NULL
#define NULL
Definition: coverity.c:32
AV_PIX_FMT_YUVJ420P
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
Definition: pixfmt.h:78
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:115
FILTER_PIXFMTS
#define FILTER_PIXFMTS(...)
Definition: internal.h:176
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_cover_rect.c:183
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_cover_rect.c:57
MODE_BLUR
@ MODE_BLUR
Definition: vf_cover_rect.c:33
CoverContext
Definition: vf_cover_rect.c:37
MODE_COVER
@ MODE_COVER
Definition: vf_cover_rect.c:32
mode
mode
Definition: ebur128.h:83
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
init
static av_cold int init(AVFilterContext *ctx)
Definition: vf_cover_rect.c:192
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:191
FLAGS
#define FLAGS
Definition: vf_cover_rect.c:46
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:229
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_cover_rect.c:123
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:234