FFmpeg
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

#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:114
#define WIDTH
Definition: vf_blend.c:28
#define SIZE_PER_UNIT
Definition: vf_blend.c:31
int
#define rnd()
Definition: checkasm.h:107
#define BUF_SIZE
Definition: vf_blend.c:32
for(j=16;j >0;--j)
int i
Definition: input.c:407

Definition at line 34 of file vf_blend.c.

#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 + (BUF_UNITS - 1 - i) * depth; /* Test various alignments */ \
int dst_offset = i * SIZE_PER_UNIT; /* dst must be aligned */ \
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 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:118
#define fail()
Definition: checkasm.h:123
#define width
uint8_t w
Definition: llviddspenc.c:38
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
#define WIDTH
Definition: vf_blend.c:28
if(ret)
#define call_ref(...)
Definition: checkasm.h:129
filter data
Definition: mlp.h:74
#define SIZE_PER_UNIT
Definition: vf_blend.c:31
int
#define BUF_SIZE
Definition: vf_blend.c:32
#define bench_new(...)
Definition: checkasm.h:261
#define call_new(...)
Definition: checkasm.h:201
for(j=16;j >0;--j)
int i
Definition: input.c:407

Definition at line 63 of file vf_blend.c.

#define check_and_report (   name,
  val,
  depth 
)
Value:
param.mode = val; \
ff_blend_init(&param, depth * 8); \
if (check_func(param.blend, #name)) \
void ff_blend_init(FilterParams *param, int depth)
Definition: vf_blend.c:750
if(ret)
#define check_blend_func(depth)
Definition: vf_blend.c:63
#define check_func(func,...)
Definition: checkasm.h:114
static double val(void *priv, double ch)
Definition: aeval.c:76
const char * name
Definition: opengl_enc.c:102

Referenced by checkasm_check_blend().

Function Documentation

void checkasm_check_blend ( void  )

Definition at line 88 of file vf_blend.c.