FFmpeg  4.0
Data Structures | Macros | Enumerations | Functions | Variables
vf_fillborders.c File Reference
#include "libavutil/colorspace.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "drawutils.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  Borders
 
struct  FillBordersContext
 

Macros

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

Enumerations

enum  { Y, U, V, A }
 
enum  { R, G, B }
 
enum  FillMode { FM_SMEAR, FM_MIRROR, FM_FIXED, FM_NB_MODES }
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static void smear_borders8 (FillBordersContext *s, AVFrame *frame)
 
static void smear_borders16 (FillBordersContext *s, AVFrame *frame)
 
static void mirror_borders8 (FillBordersContext *s, AVFrame *frame)
 
static void mirror_borders16 (FillBordersContext *s, AVFrame *frame)
 
static void fixed_borders8 (FillBordersContext *s, AVFrame *frame)
 
static void fixed_borders16 (FillBordersContext *s, AVFrame *frame)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *frame)
 
static int config_input (AVFilterLink *inlink)
 
 AVFILTER_DEFINE_CLASS (fillborders)
 

Variables

static const AVOption fillborders_options []
 
static const AVFilterPad fillborders_inputs []
 
static const AVFilterPad fillborders_outputs []
 
AVFilter ff_vf_fillborders
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 348 of file vf_fillborders.c.

◆ FLAGS

Definition at line 349 of file vf_fillborders.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator

Definition at line 31 of file vf_fillborders.c.

◆ anonymous enum

anonymous enum
Enumerator

Definition at line 32 of file vf_fillborders.c.

◆ FillMode

enum FillMode
Enumerator
FM_SMEAR 
FM_MIRROR 
FM_FIXED 
FM_NB_MODES 

Definition at line 34 of file vf_fillborders.c.

Function Documentation

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 57 of file vf_fillborders.c.

◆ smear_borders8()

static void smear_borders8 ( FillBordersContext s,
AVFrame frame 
)
static

Definition at line 85 of file vf_fillborders.c.

Referenced by config_input().

◆ smear_borders16()

static void smear_borders16 ( FillBordersContext s,
AVFrame frame 
)
static

Definition at line 115 of file vf_fillborders.c.

Referenced by config_input().

◆ mirror_borders8()

static void mirror_borders8 ( FillBordersContext s,
AVFrame frame 
)
static

Definition at line 147 of file vf_fillborders.c.

Referenced by config_input().

◆ mirror_borders16()

static void mirror_borders16 ( FillBordersContext s,
AVFrame frame 
)
static

Definition at line 180 of file vf_fillborders.c.

Referenced by config_input().

◆ fixed_borders8()

static void fixed_borders8 ( FillBordersContext s,
AVFrame frame 
)
static

Definition at line 213 of file vf_fillborders.c.

Referenced by config_input().

◆ fixed_borders16()

static void fixed_borders16 ( FillBordersContext s,
AVFrame frame 
)
static

Definition at line 238 of file vf_fillborders.c.

Referenced by config_input().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 271 of file vf_fillborders.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 280 of file vf_fillborders.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( fillborders  )

Variable Documentation

◆ fillborders_options

const AVOption fillborders_options[]
static
Initial value:
= {
{ "left", "set the left fill border", OFFSET(left), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
{ "right", "set the right fill border", OFFSET(right), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
{ "top", "set the top fill border", OFFSET(top), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
{ "bottom", "set the bottom fill border", OFFSET(bottom), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
{ "mode", "set the fill borders mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=FM_SMEAR}, 0, FM_NB_MODES-1, FLAGS, "mode" },
{ "smear", NULL, 0, AV_OPT_TYPE_CONST, {.i64=FM_SMEAR}, 0, 0, FLAGS, "mode" },
{ "mirror", NULL, 0, AV_OPT_TYPE_CONST, {.i64=FM_MIRROR}, 0, 0, FLAGS, "mode" },
{ "fixed", NULL, 0, AV_OPT_TYPE_CONST, {.i64=FM_FIXED}, 0, 0, FLAGS, "mode" },
{ "color", "set the color for the fixed mode", OFFSET(rgba_color), AV_OPT_TYPE_COLOR, {.str = "black"}, .flags = FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define FLAGS
#define OFFSET(x)
mode
Use these values in ebur128_init (or'ed).
Definition: ebur128.h:83

Definition at line 351 of file vf_fillborders.c.

◆ fillborders_inputs

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

Definition at line 366 of file vf_fillborders.c.

◆ fillborders_outputs

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

Definition at line 377 of file vf_fillborders.c.

◆ ff_vf_fillborders

AVFilter ff_vf_fillborders
Initial value:
= {
.name = "fillborders",
.description = NULL_IF_CONFIG_SMALL("Fill borders of the input video."),
.priv_size = sizeof(FillBordersContext),
.priv_class = &fillborders_class,
}
static const AVFilterPad fillborders_inputs[]
#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
static int flags
Definition: log.c:55
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static int query_formats(AVFilterContext *ctx)
static const AVFilterPad fillborders_outputs[]

Definition at line 385 of file vf_fillborders.c.