FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
vf_maskedmerge.c File Reference
#include "libavutil/imgutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
#include "maskedmerge.h"

Go to the source code of this file.

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (maskedmerge)
 
static int query_formats (AVFilterContext *ctx)
 
static int process_frame (FFFrameSync *fs)
 
static void maskedmerge8 (const uint8_t *bsrc, const uint8_t *osrc, const uint8_t *msrc, uint8_t *dst, ptrdiff_t blinesize, ptrdiff_t olinesize, ptrdiff_t mlinesize, ptrdiff_t dlinesize, int w, int h, int half, int shift)
 
static void maskedmerge16 (const uint8_t *bbsrc, const uint8_t *oosrc, const uint8_t *mmsrc, uint8_t *ddst, ptrdiff_t blinesize, ptrdiff_t olinesize, ptrdiff_t mlinesize, ptrdiff_t dlinesize, int w, int h, int half, int shift)
 
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 maskedmerge_options []
 
static const AVFilterPad maskedmerge_inputs []
 
static const AVFilterPad maskedmerge_outputs []
 
AVFilter ff_vf_maskedmerge
 

Macro Definition Documentation

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

Definition at line 30 of file vf_maskedmerge.c.

Definition at line 31 of file vf_maskedmerge.c.

Function Documentation

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

Definition at line 40 of file vf_maskedmerge.c.

static int process_frame ( FFFrameSync fs)
static

Definition at line 64 of file vf_maskedmerge.c.

Referenced by config_output().

static void maskedmerge8 ( const uint8_t bsrc,
const uint8_t osrc,
const uint8_t msrc,
uint8_t dst,
ptrdiff_t  blinesize,
ptrdiff_t  olinesize,
ptrdiff_t  mlinesize,
ptrdiff_t  dlinesize,
int  w,
int  h,
int  half,
int  shift 
)
static

Definition at line 109 of file vf_maskedmerge.c.

Referenced by config_input().

static void maskedmerge16 ( const uint8_t bbsrc,
const uint8_t oosrc,
const uint8_t mmsrc,
uint8_t ddst,
ptrdiff_t  blinesize,
ptrdiff_t  olinesize,
ptrdiff_t  mlinesize,
ptrdiff_t  dlinesize,
int  w,
int  h,
int  half,
int  shift 
)
static

Definition at line 130 of file vf_maskedmerge.c.

Referenced by config_input().

static int config_input ( AVFilterLink inlink)
static

Definition at line 155 of file vf_maskedmerge.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 185 of file vf_maskedmerge.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame buf 
)
static

Definition at line 252 of file vf_maskedmerge.c.

static int request_frame ( AVFilterLink outlink)
static

Definition at line 258 of file vf_maskedmerge.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 264 of file vf_maskedmerge.c.

Variable Documentation

const AVOption maskedmerge_options[]
static
Initial value:
= {
{ "planes", "set planes", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=0xF}, 0, 0xF, FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define FLAGS
#define OFFSET(x)

Definition at line 33 of file vf_maskedmerge.c.

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

Definition at line 271 of file vf_maskedmerge.c.

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

Definition at line 291 of file vf_maskedmerge.c.

AVFilter ff_vf_maskedmerge
Initial value:
= {
.name = "maskedmerge",
.description = NULL_IF_CONFIG_SMALL("Merge first stream with second stream using third stream as mask."),
.priv_size = sizeof(MaskedMergeContext),
.priv_class = &maskedmerge_class,
}
static const AVFilterPad maskedmerge_outputs[]
static int query_formats(AVFilterContext *ctx)
#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 maskedmerge_inputs[]
#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:131
static int flags
Definition: cpu.c:47
static av_cold void uninit(AVFilterContext *ctx)

Definition at line 301 of file vf_maskedmerge.c.