FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_premultiply.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  PreMultiplyContext
 

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (premultiply)
 
static int query_formats (AVFilterContext *ctx)
 
static void premultiply8 (const uint8_t *msrc, const uint8_t *asrc, uint8_t *dst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int shift, int offset)
 
static void premultiply8yuv (const uint8_t *msrc, const uint8_t *asrc, uint8_t *dst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int shift, int offset)
 
static void premultiply8offset (const uint8_t *msrc, const uint8_t *asrc, uint8_t *dst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int shift, int offset)
 
static void premultiply16 (const uint8_t *mmsrc, const uint8_t *aasrc, uint8_t *ddst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int shift, int offset)
 
static void premultiply16yuv (const uint8_t *mmsrc, const uint8_t *aasrc, uint8_t *ddst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int shift, int offset)
 
static void premultiply16offset (const uint8_t *mmsrc, const uint8_t *aasrc, uint8_t *ddst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int shift, int offset)
 
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 premultiply_options []
 
static const AVFilterPad premultiply_inputs []
 
static const AVFilterPad premultiply_outputs []
 
AVFilter ff_vf_premultiply
 

Macro Definition Documentation

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

Definition at line 46 of file vf_premultiply.c.

Definition at line 47 of file vf_premultiply.c.

Function Documentation

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

Definition at line 55 of file vf_premultiply.c.

static void premultiply8 ( const uint8_t msrc,
const uint8_t asrc,
uint8_t dst,
ptrdiff_t  mlinesize,
ptrdiff_t  alinesize,
ptrdiff_t  dlinesize,
int  w,
int  h,
int  half,
int  shift,
int  offset 
)
static

Definition at line 71 of file vf_premultiply.c.

Referenced by process_frame().

static void premultiply8yuv ( const uint8_t msrc,
const uint8_t asrc,
uint8_t dst,
ptrdiff_t  mlinesize,
ptrdiff_t  alinesize,
ptrdiff_t  dlinesize,
int  w,
int  h,
int  half,
int  shift,
int  offset 
)
static

Definition at line 91 of file vf_premultiply.c.

Referenced by process_frame().

static void premultiply8offset ( const uint8_t msrc,
const uint8_t asrc,
uint8_t dst,
ptrdiff_t  mlinesize,
ptrdiff_t  alinesize,
ptrdiff_t  dlinesize,
int  w,
int  h,
int  half,
int  shift,
int  offset 
)
static

Definition at line 111 of file vf_premultiply.c.

Referenced by process_frame().

static void premultiply16 ( const uint8_t mmsrc,
const uint8_t aasrc,
uint8_t ddst,
ptrdiff_t  mlinesize,
ptrdiff_t  alinesize,
ptrdiff_t  dlinesize,
int  w,
int  h,
int  half,
int  shift,
int  offset 
)
static

Definition at line 131 of file vf_premultiply.c.

Referenced by process_frame().

static void premultiply16yuv ( const uint8_t mmsrc,
const uint8_t aasrc,
uint8_t ddst,
ptrdiff_t  mlinesize,
ptrdiff_t  alinesize,
ptrdiff_t  dlinesize,
int  w,
int  h,
int  half,
int  shift,
int  offset 
)
static

Definition at line 154 of file vf_premultiply.c.

Referenced by process_frame().

static void premultiply16offset ( const uint8_t mmsrc,
const uint8_t aasrc,
uint8_t ddst,
ptrdiff_t  mlinesize,
ptrdiff_t  alinesize,
ptrdiff_t  dlinesize,
int  w,
int  h,
int  half,
int  shift,
int  offset 
)
static

Definition at line 177 of file vf_premultiply.c.

Referenced by process_frame().

static int process_frame ( FFFrameSync fs)
static

Definition at line 200 of file vf_premultiply.c.

Referenced by config_output().

static int config_input ( AVFilterLink inlink)
static

Definition at line 285 of file vf_premultiply.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 308 of file vf_premultiply.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame buf 
)
static

Definition at line 355 of file vf_premultiply.c.

static int request_frame ( AVFilterLink outlink)
static

Definition at line 361 of file vf_premultiply.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 367 of file vf_premultiply.c.

Variable Documentation

const AVOption premultiply_options[]
static
Initial value:
= {
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 49 of file vf_premultiply.c.

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

Definition at line 374 of file vf_premultiply.c.

const AVFilterPad premultiply_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 389 of file vf_premultiply.c.

AVFilter ff_vf_premultiply
Initial value:
= {
.name = "premultiply",
.description = NULL_IF_CONFIG_SMALL("PreMultiply first stream with first plane of second stream."),
.priv_size = sizeof(PreMultiplyContext),
.priv_class = &premultiply_class,
}
static int flags
Definition: log.c:57
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static const AVFilterPad premultiply_outputs[]
static av_cold void uninit(AVFilterContext *ctx)
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
static int query_formats(AVFilterContext *ctx)
#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 const AVFilterPad premultiply_inputs[]

Definition at line 399 of file vf_premultiply.c.