FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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()
 
#define check_and_report(name, val)
 

Functions

void checkasm_check_blend (void)
 

Macro Definition Documentation

#define WIDTH   256

Definition at line 28 of file vf_blend.c.

#define HEIGHT   256

Definition at line 29 of file vf_blend.c.

#define BUF_UNITS   3

Definition at line 30 of file vf_blend.c.

#define SIZE_PER_UNIT   (WIDTH * HEIGHT)

Definition at line 31 of file vf_blend.c.

#define BUF_SIZE   (BUF_UNITS * SIZE_PER_UNIT)

Definition at line 32 of file vf_blend.c.

Referenced by checkasm_check_blend().

#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
#define AV_WN32A(p, v)
Definition: intreadwrite.h:538
const char * r
Definition: vf_curves.c:107
#define WIDTH
Definition: vf_blend.c:28
#define SIZE_PER_UNIT
Definition: vf_blend.c:31
#define rnd()
Definition: checkasm.h:66
#define BUF_SIZE
Definition: vf_blend.c:32
for(j=16;j >0;--j)

Definition at line 34 of file vf_blend.c.

#define check_blend_func ( )
Value:
do { \
int i; \
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); \
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 */ \
call_ref(top1 + src_offset, WIDTH, bot1 + src_offset, WIDTH, \
dst1 + dst_offset, WIDTH, WIDTH, HEIGHT, &param, NULL); \
call_new(top2 + src_offset, WIDTH, bot2 + src_offset, WIDTH, \
dst2 + dst_offset, WIDTH, WIDTH, HEIGHT, &param, NULL); \
if (memcmp(top1, top2, BUF_SIZE) || memcmp(bot1, bot2, BUF_SIZE) || memcmp(dst1, dst2, BUF_SIZE)) \
fail(); \
} \
bench_new(top2, WIDTH / 4, bot2, WIDTH / 4, dst2, WIDTH / 4, \
WIDTH / 4, HEIGHT / 4, &param, NULL); \
} while (0)
#define NULL
Definition: coverity.c:32
#define randomize_buffers()
Definition: vf_blend.c:34
#define BUF_UNITS
Definition: vf_blend.c:30
#define HEIGHT
Definition: vf_blend.c:29
uint8_t
#define height
#define declare_func(ret,...)
Definition: checkasm.h:77
#define fail()
Definition: checkasm.h:81
#define width
#define WIDTH
Definition: vf_blend.c:28
#define call_ref(...)
Definition: checkasm.h:87
filter data
Definition: mlp.h:74
#define SIZE_PER_UNIT
Definition: vf_blend.c:31
if(ret< 0)
Definition: vf_mcdeint.c:282
#define BUF_SIZE
Definition: vf_blend.c:32
#define bench_new(...)
Definition: checkasm.h:173
#define call_new(...)
Definition: checkasm.h:142
for(j=16;j >0;--j)

Definition at line 63 of file vf_blend.c.

#define check_and_report (   name,
  val 
)
Value:
param.mode = val; \
ff_blend_init(&param, 0); \
if (check_func(param.blend, #name)) \
const char const char void * val
Definition: avisynth_c.h:634
void ff_blend_init(FilterParams *param, int is_16bit)
Definition: vf_blend.c:446
#define check_blend_func()
Definition: vf_blend.c:63
#define check_func(func,...)
Definition: checkasm.h:73
if(ret< 0)
Definition: vf_mcdeint.c:282
const char * name
Definition: opengl_enc.c:103

Referenced by checkasm_check_blend().

Function Documentation

void checkasm_check_blend ( void  )

Definition at line 87 of file vf_blend.c.