FFmpeg
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

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

Definition at line 52 of file vf_displace.c.

Definition at line 53 of file vf_displace.c.

Enumeration Type Documentation

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 ( displace  )
static int query_formats ( AVFilterContext ctx)
static

Definition at line 66 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 84 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 160 of file vf_displace.c.

Referenced by config_input().

static int process_frame ( FFFrameSync fs)
static

Definition at line 243 of file vf_displace.c.

Referenced by config_output().

static int config_input ( AVFilterLink inlink)
static

Definition at line 273 of file vf_displace.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 304 of file vf_displace.c.

static int activate ( AVFilterContext ctx)
static

Definition at line 364 of file vf_displace.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 370 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" },
{ "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.

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 377 of file vf_displace.c.

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 394 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 int activate(AVFilterContext *ctx)
Definition: vf_displace.c:364
static const AVFilterPad displace_inputs[]
Definition: vf_displace.c:377
#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 outputs[]
Definition: af_acontrast.c:203
static const AVFilterPad displace_outputs[]
Definition: vf_displace.c:394
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
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
#define flags(name, subs,...)
Definition: cbs_av1.c:561
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_displace.c:370

Definition at line 403 of file vf_displace.c.