FFmpeg  4.0
Data Structures | Macros | Enumerations | Functions | Variables
vf_displace.c File Reference
#include "libavutil/imgutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "formats.h"
#include "framesync.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  DisplaceContext
 

Macros

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

Enumerations

enum  EdgeMode {
  EDGE_BLANK, EDGE_SMEAR, EDGE_WRAP, EDGE_MIRROR,
  EDGE_NB
}
 

Functions

 AVFILTER_DEFINE_CLASS (displace)
 
static int query_formats (AVFilterContext *ctx)
 
static void displace_planar (DisplaceContext *s, const AVFrame *in, const AVFrame *xpic, const AVFrame *ypic, AVFrame *out)
 
static void displace_packed (DisplaceContext *s, const AVFrame *in, const AVFrame *xpic, const AVFrame *ypic, AVFrame *out)
 
static int process_frame (FFFrameSync *fs)
 
static int config_input (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *outlink)
 
static int activate (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption displace_options []
 
static const AVFilterPad displace_inputs []
 
static const AVFilterPad displace_outputs []
 
AVFilter ff_vf_displace
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 52 of file vf_displace.c.

◆ FLAGS

Definition at line 53 of file vf_displace.c.

Enumeration Type Documentation

◆ EdgeMode

enum EdgeMode
Enumerator
EDGE_BLANK 
EDGE_SMEAR 
EDGE_WRAP 
EDGE_MIRROR 
EDGE_NB 

Definition at line 30 of file vf_displace.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( displace  )

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 66 of file vf_displace.c.

◆ displace_planar()

static void displace_planar ( DisplaceContext s,
const AVFrame in,
const AVFrame xpic,
const AVFrame ypic,
AVFrame out 
)
static

Definition at line 84 of file vf_displace.c.

Referenced by config_input().

◆ displace_packed()

static void displace_packed ( DisplaceContext s,
const AVFrame in,
const AVFrame xpic,
const AVFrame ypic,
AVFrame out 
)
static

Definition at line 160 of file vf_displace.c.

Referenced by config_input().

◆ process_frame()

static int process_frame ( FFFrameSync fs)
static

Definition at line 243 of file vf_displace.c.

Referenced by config_output().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 273 of file vf_displace.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 304 of file vf_displace.c.

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 362 of file vf_displace.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 368 of file vf_displace.c.

Variable Documentation

◆ displace_options

const AVOption displace_options[]
static
Initial value:
= {
{ "edge", "set edge mode", OFFSET(edge), AV_OPT_TYPE_INT, {.i64=EDGE_SMEAR}, 0, EDGE_NB-1, FLAGS, "edge" },
{ "blank", "", 0, AV_OPT_TYPE_CONST, {.i64=EDGE_BLANK}, 0, 0, FLAGS, "edge" },
{ "smear", "", 0, AV_OPT_TYPE_CONST, {.i64=EDGE_SMEAR}, 0, 0, FLAGS, "edge" },
{ "wrap" , "", 0, AV_OPT_TYPE_CONST, {.i64=EDGE_WRAP}, 0, 0, FLAGS, "edge" },
{ "mirror" , "", 0, AV_OPT_TYPE_CONST, {.i64=EDGE_MIRROR}, 0, 0, FLAGS, "edge" },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define FLAGS
Definition: vf_displace.c:53
#define OFFSET(x)
Definition: vf_displace.c:52

Definition at line 55 of file vf_displace.c.

◆ displace_inputs

const AVFilterPad displace_inputs[]
static
Initial value:
= {
{
.name = "source",
.config_props = config_input,
},
{
.name = "xmap",
},
{
.name = "ymap",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_input(AVFilterLink *inlink)
Definition: vf_displace.c:273

Definition at line 375 of file vf_displace.c.

◆ displace_outputs

const AVFilterPad displace_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_output(AVFilterLink *outlink)
Definition: vf_displace.c:304

Definition at line 392 of file vf_displace.c.

◆ ff_vf_displace

AVFilter ff_vf_displace
Initial value:
= {
.name = "displace",
.description = NULL_IF_CONFIG_SMALL("Displace pixels."),
.priv_size = sizeof(DisplaceContext),
.priv_class = &displace_class,
}
static int activate(AVFilterContext *ctx)
Definition: vf_displace.c:362
static int flags
Definition: log.c:55
static const AVFilterPad displace_inputs[]
Definition: vf_displace.c:375
#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 const AVFilterPad displace_outputs[]
Definition: vf_displace.c:392
static int query_formats(AVFilterContext *ctx)
Definition: vf_displace.c:66
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
Definition: avfilter.h:133
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_displace.c:368

Definition at line 401 of file vf_displace.c.