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, SliceParams *sliceparam) \
{ \
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, SliceParams *sliceparam) \
{ \
const type *top = (const type*)_top; \
const type *bottom = (const 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:86
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:256
SliceParams
Definition: blend.h:72
_
#define _
src
INIT_CLIP pixel * src
Definition: h264pred_template.c:418