FFmpeg
Macros | Functions
vf_blend_init.h File Reference
#include "config.h"
#include "libavutil/attributes.h"
#include "libavutil/imgutils.h"
#include "blend.h"
#include "blend_modes.c"

Go to the source code of this file.

Macros

#define DEPTH   8
 
#define DEPTH   9
 
#define DEPTH   10
 
#define DEPTH   12
 
#define DEPTH   14
 
#define DEPTH   16
 
#define DEPTH   32
 
#define COPY(src, depth)
 
#define BLEND_NORMAL(name, type)
 
#define DEFINE_INIT_BLEND_FUNC(depth, nbits)
 

Functions

static av_unused void ff_blend_init (FilterParams *param, int depth)
 

Macro Definition Documentation

◆ DEPTH [1/7]

#define DEPTH   8

Definition at line 53 of file vf_blend_init.h.

◆ DEPTH [2/7]

#define DEPTH   9

Definition at line 53 of file vf_blend_init.h.

◆ DEPTH [3/7]

#define DEPTH   10

Definition at line 53 of file vf_blend_init.h.

◆ DEPTH [4/7]

#define DEPTH   12

Definition at line 53 of file vf_blend_init.h.

◆ DEPTH [5/7]

#define DEPTH   14

Definition at line 53 of file vf_blend_init.h.

◆ DEPTH [6/7]

#define DEPTH   16

Definition at line 53 of file vf_blend_init.h.

◆ DEPTH [7/7]

#define DEPTH   32

Definition at line 53 of file vf_blend_init.h.

◆ COPY

#define COPY (   src,
  depth 
)
Value:
static void blend_copy ## src##_##depth(const uint8_t *top, ptrdiff_t top_linesize, \
const uint8_t *bottom, ptrdiff_t bottom_linesize,\
uint8_t *dst, ptrdiff_t dst_linesize, \
ptrdiff_t width, ptrdiff_t height, \
FilterParams *param, double *values, int starty) \
{ \
av_image_copy_plane(dst, dst_linesize, src, src ## _linesize, \
width * depth / 8, height); \
}

Definition at line 56 of file vf_blend_init.h.

◆ BLEND_NORMAL

#define BLEND_NORMAL (   name,
  type 
)
Value:
static void blend_normal_##name(const uint8_t *_top, ptrdiff_t top_linesize, \
const uint8_t *_bottom, ptrdiff_t bottom_linesize,\
uint8_t *_dst, ptrdiff_t dst_linesize, \
ptrdiff_t width, ptrdiff_t height, \
FilterParams *param, double *values, int starty) \
{ \
const type *top = (type*)_top; \
const type *bottom = (type*)_bottom; \
type *dst = (type*)_dst; \
const float opacity = param->opacity; \
\
dst_linesize /= sizeof(type); \
top_linesize /= sizeof(type); \
bottom_linesize /= sizeof(type); \
for (int i = 0; i < height; i++) { \
for (int j = 0; j < width; j++) { \
dst[j] = top[j] * opacity + bottom[j] * (1.f - opacity); \
} \
dst += dst_linesize; \
top += top_linesize; \
bottom += bottom_linesize; \
} \
}

Definition at line 78 of file vf_blend_init.h.

◆ DEFINE_INIT_BLEND_FUNC

#define DEFINE_INIT_BLEND_FUNC (   depth,
  nbits 
)

Definition at line 108 of file vf_blend_init.h.

Function Documentation

◆ ff_blend_init()

static av_unused void ff_blend_init ( FilterParams param,
int  depth 
)
static

Definition at line 162 of file vf_blend_init.h.

Referenced by config_params().

name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
type
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
Definition: writing_filters.txt:86
width
#define width
FilterParams
filter data
Definition: mlp.h:77
for
for(k=2;k<=8;++k)
Definition: h264pred_template.c:425
height
#define height
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:269
values
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 the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return values
Definition: filter_design.txt:263
_
#define _
src
INIT_CLIP pixel * src
Definition: h264pred_template.c:418