FFmpeg
Data Structures | Macros | Functions | Variables
vf_chromashift.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/eval.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "framesync.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  ChromaShiftContext
 

Macros

#define DEFINE_SMEAR(depth, type, div)
 
#define DEFINE_WRAP(depth, type, div)
 
#define DEFINE_RGBASMEAR(depth, type, div)
 
#define DEFINE_RGBAWRAP(depth, type, div)
 
#define OFFSET(x)   offsetof(ChromaShiftContext, x)
 
#define VF   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int config_input (AVFilterLink *inlink)
 
 AVFILTER_DEFINE_CLASS (chromashift)
 
 AVFILTER_DEFINE_CLASS (rgbashift)
 

Variables

static const AVOption chromashift_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
AVFilter ff_vf_chromashift
 
static const AVOption rgbashift_options []
 
AVFilter ff_vf_rgbashift
 

Macro Definition Documentation

#define DEFINE_SMEAR (   depth,
  type,
  div 
)

Definition at line 92 of file vf_chromashift.c.

#define DEFINE_WRAP (   depth,
  type,
  div 
)

Definition at line 134 of file vf_chromashift.c.

#define DEFINE_RGBASMEAR (   depth,
  type,
  div 
)

Definition at line 189 of file vf_chromashift.c.

#define DEFINE_RGBAWRAP (   depth,
  type,
  div 
)

Definition at line 256 of file vf_chromashift.c.

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

Definition at line 403 of file vf_chromashift.c.

Definition at line 404 of file vf_chromashift.c.

Function Documentation

static int query_formats ( AVFilterContext ctx)
static

Definition at line 56 of file vf_chromashift.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 345 of file vf_chromashift.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 375 of file vf_chromashift.c.

AVFILTER_DEFINE_CLASS ( chromashift  )
AVFILTER_DEFINE_CLASS ( rgbashift  )

Variable Documentation

const AVOption chromashift_options[]
static
Initial value:
= {
{ "cbh", "shift chroma-blue horizontally", OFFSET(cbh), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VF },
{ "cbv", "shift chroma-blue vertically", OFFSET(cbv), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VF },
{ "crh", "shift chroma-red horizontally", OFFSET(crh), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VF },
{ "crv", "shift chroma-red vertically", OFFSET(crv), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VF },
{ "edge", "set edge operation", OFFSET(edge), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, .flags = VF, "edge" },
{ "smear", 0, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, .flags = VF, "edge" },
{ "wrap", 0, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, .flags = VF, "edge" },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define VF
#define OFFSET(x)

Definition at line 406 of file vf_chromashift.c.

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

Definition at line 417 of file vf_chromashift.c.

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

Definition at line 427 of file vf_chromashift.c.

AVFilter ff_vf_chromashift
Initial value:
= {
.name = "chromashift",
.description = NULL_IF_CONFIG_SMALL("Shift chroma."),
.priv_size = sizeof(ChromaShiftContext),
.priv_class = &chromashift_class,
}
#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 const AVFilterPad inputs[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116
static const AVFilterPad outputs[]
static int query_formats(AVFilterContext *ctx)
#define flags(name, subs,...)
Definition: cbs_av1.c:561

Definition at line 437 of file vf_chromashift.c.

const AVOption rgbashift_options[]
static
Initial value:
= {
{ "rh", "shift red horizontally", OFFSET(rh), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VF },
{ "rv", "shift red vertically", OFFSET(rv), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VF },
{ "gh", "shift green horizontally", OFFSET(gh), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VF },
{ "gv", "shift green vertically", OFFSET(gv), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VF },
{ "bh", "shift blue horizontally", OFFSET(bh), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VF },
{ "bv", "shift blue vertically", OFFSET(bv), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VF },
{ "ah", "shift alpha horizontally", OFFSET(ah), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VF },
{ "av", "shift alpha vertically", OFFSET(av), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VF },
{ "edge", "set edge operation", OFFSET(edge), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, .flags = VF, "edge" },
{ "smear", 0, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, .flags = VF, "edge" },
{ "wrap", 0, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, .flags = VF, "edge" },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define VF
#define OFFSET(x)

Definition at line 448 of file vf_chromashift.c.

AVFilter ff_vf_rgbashift
Initial value:
= {
.name = "rgbashift",
.description = NULL_IF_CONFIG_SMALL("Shift RGBA."),
.priv_size = sizeof(ChromaShiftContext),
.priv_class = &rgbashift_class,
}
#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 const AVFilterPad inputs[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116
static const AVFilterPad outputs[]
static int query_formats(AVFilterContext *ctx)
#define flags(name, subs,...)
Definition: cbs_av1.c:561

Definition at line 465 of file vf_chromashift.c.