FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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_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 filter_frame (AVFilterLink *inlink, AVFrame *buf)
 
static int request_frame (AVFilterLink *outlink)
 
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

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

Definition at line 51 of file vf_displace.c.

Definition at line 52 of file vf_displace.c.

Enumeration Type Documentation

enum EdgeMode
Enumerator
EDGE_BLANK 
EDGE_SMEAR 
EDGE_WRAP 
EDGE_NB 

Definition at line 30 of file vf_displace.c.

Function Documentation

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

Definition at line 64 of file vf_displace.c.

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

Definition at line 82 of file vf_displace.c.

Referenced by config_input().

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

Definition at line 142 of file vf_displace.c.

Referenced by config_input().

static int process_frame ( FFFrameSync fs)
static

Definition at line 207 of file vf_displace.c.

Referenced by config_output().

static int config_input ( AVFilterLink inlink)
static

Definition at line 237 of file vf_displace.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 268 of file vf_displace.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame buf 
)
static

Definition at line 336 of file vf_displace.c.

static int request_frame ( AVFilterLink outlink)
static

Definition at line 342 of file vf_displace.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 348 of file vf_displace.c.

Variable Documentation

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" },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define FLAGS
Definition: vf_displace.c:52
#define OFFSET(x)
Definition: vf_displace.c:51

Definition at line 54 of file vf_displace.c.

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

Definition at line 355 of file vf_displace.c.

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

Definition at line 375 of file vf_displace.c.

AVFilter ff_vf_displace
Initial value:
= {
.name = "displace",
.description = NULL_IF_CONFIG_SMALL("Displace pixels."),
.priv_size = sizeof(DisplaceContext),
.priv_class = &displace_class,
}
static const AVFilterPad displace_inputs[]
Definition: vf_displace.c:355
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
static const AVFilterPad displace_outputs[]
Definition: vf_displace.c:375
static int query_formats(AVFilterContext *ctx)
Definition: vf_displace.c:64
#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 int flags
Definition: cpu.c:47
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_displace.c:348

Definition at line 385 of file vf_displace.c.