FFmpeg  4.0
Macros | Functions
vf_blend.c File Reference
#include <string.h>
#include "checkasm.h"
#include "libavfilter/blend.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"

Go to the source code of this file.

Macros

#define WIDTH   256
 
#define HEIGHT   256
 
#define BUF_UNITS   3
 
#define SIZE_PER_UNIT   (WIDTH * HEIGHT)
 
#define BUF_SIZE   (BUF_UNITS * SIZE_PER_UNIT)
 
#define randomize_buffers()
 
#define check_blend_func(depth)
 
#define check_and_report(name, val, depth)
 

Functions

void checkasm_check_blend (void)
 

Macro Definition Documentation

◆ WIDTH

#define WIDTH   256

Definition at line 28 of file vf_blend.c.

◆ HEIGHT

#define HEIGHT   256

Definition at line 29 of file vf_blend.c.

◆ BUF_UNITS

#define BUF_UNITS   3

Definition at line 30 of file vf_blend.c.

◆ SIZE_PER_UNIT

#define SIZE_PER_UNIT   (WIDTH * HEIGHT)

Definition at line 31 of file vf_blend.c.

◆ BUF_SIZE

#define BUF_SIZE   (BUF_UNITS * SIZE_PER_UNIT)

Definition at line 32 of file vf_blend.c.

Referenced by checkasm_check_blend().

◆ randomize_buffers

#define randomize_buffers ( )
Value:
do { \
int i, j; \
for (i = 0; i < HEIGHT; i++) { \
for (j = 0; j < WIDTH; j++) { \
top1[i * WIDTH + j] = \
top2[i * WIDTH + j] = i; \
bot1[i * WIDTH + j] = \
bot2[i * WIDTH + j] = j; \
} \
} \
for (i = 0; i < SIZE_PER_UNIT; i += 4) { \
uint32_t r = rnd(); \
AV_WN32A(dst1 + i, r); \
AV_WN32A(dst2 + i, r); \
} \
for (; i < BUF_SIZE; i += 4) { \
uint32_t r = rnd(); \
AV_WN32A(top1 + i, r); \
AV_WN32A(top2 + i, r); \
r = rnd(); \
AV_WN32A(bot1 + i, r); \
AV_WN32A(bot2 + i, r); \
r = rnd(); \
AV_WN32A(dst1 + i, r); \
AV_WN32A(dst2 + i, r); \
} \
} while (0)
#define HEIGHT
Definition: vf_blend.c:29
const char * r
Definition: vf_curves.c:111
#define WIDTH
Definition: vf_blend.c:28
#define SIZE_PER_UNIT
Definition: vf_blend.c:31
#define rnd()
Definition: checkasm.h:100
#define BUF_SIZE
Definition: vf_blend.c:32

Definition at line 34 of file vf_blend.c.

◆ check_blend_func

#define check_blend_func (   depth)
Value:
do { \
int i, w; \
declare_func(void, 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, \
struct FilterParams *param, double *values); \
w = WIDTH / depth; \
for (i = 0; i < BUF_UNITS - 1; i++) { \
int src_offset = i * SIZE_PER_UNIT + i; /* Test various alignments */ \
int dst_offset = i * SIZE_PER_UNIT; /* dst must be aligned */ \
randomize_buffers(); \
call_ref(top1 + src_offset, w, bot1 + src_offset, w, \
dst1 + dst_offset, w, w, HEIGHT, &param, NULL); \
call_new(top2 + src_offset, w, bot2 + src_offset, w, \
dst2 + dst_offset, w, w, HEIGHT, &param, NULL); \
if (memcmp(top1, top2, BUF_SIZE) || memcmp(bot1, bot2, BUF_SIZE) || memcmp(dst1, dst2, BUF_SIZE)) \
fail(); \
} \
bench_new(top2, w / 4, bot2, w / 4, dst2, w / 4, \
w / 4, HEIGHT / 4, &param, NULL); \
} while (0)
#define NULL
Definition: coverity.c:32
#define BUF_UNITS
Definition: vf_blend.c:30
#define HEIGHT
Definition: vf_blend.c:29
uint8_t
#define height
uint16_t width
Definition: gdv.c:47
uint8_t w
Definition: llviddspenc.c:38
#define WIDTH
Definition: vf_blend.c:28
filter data
Definition: mlp.h:74
#define SIZE_PER_UNIT
Definition: vf_blend.c:31
#define BUF_SIZE
Definition: vf_blend.c:32
for(j=16;j >0;--j)

Definition at line 63 of file vf_blend.c.

◆ check_and_report

#define check_and_report (   name,
  val,
  depth 
)
Value:
param.mode = val; \
ff_blend_init(&param, depth - 1); \
if (check_func(param.blend, #name)) \
check_blend_func(depth);
const char * name
Definition: avisynth_c.h:775
const char const char void * val
Definition: avisynth_c.h:771
#define check_func(func,...)
Definition: checkasm.h:107

Referenced by checkasm_check_blend().

Function Documentation

◆ checkasm_check_blend()

void checkasm_check_blend ( void  )

Definition at line 88 of file vf_blend.c.