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

Go to the source code of this file.

Macros

#define BUF_SIZE   512
 
#define randomize_buffers(mask)
 
#define check_pack_line(type, mask)
 

Functions

void checkasm_check_v210enc (void)
 

Macro Definition Documentation

◆ BUF_SIZE

#define BUF_SIZE   512

Definition at line 28 of file v210enc.c.

◆ randomize_buffers

#define randomize_buffers (   mask)
Value:
do { \
int i, size = sizeof(*y0); \
for (i = 0; i < BUF_SIZE; i += 4 / size) { \
uint32_t r = rnd() & mask; \
AV_WN32A(y0 + i, r); \
AV_WN32A(y1 + i, r); \
} \
for (i = 0; i < BUF_SIZE / 2; i += 4 / size) { \
uint32_t r = rnd() & mask; \
AV_WN32A(u0 + i, r); \
AV_WN32A(u1 + i, r); \
r = rnd() & mask; \
AV_WN32A(v0 + i, r); \
AV_WN32A(v1 + i, r); \
} \
for (i = 0; i < width * 8 / 3; i += 4) { \
uint32_t r = rnd(); \
AV_WN32A(dst0 + i, r); \
AV_WN32A(dst1 + i, r); \
} \
} while (0)
int size
static const uint16_t mask[17]
Definition: lzw.c:38
const char * r
Definition: vf_curves.c:111
uint16_t width
Definition: gdv.c:47
#define BUF_SIZE
Definition: v210enc.c:28
#define v0
Definition: regdef.h:26
#define rnd()
Definition: checkasm.h:100

Definition at line 30 of file v210enc.c.

◆ check_pack_line

#define check_pack_line (   type,
  mask 
)
Value:
do { \
LOCAL_ALIGNED_16(type, y0, [BUF_SIZE]); \
LOCAL_ALIGNED_16(type, y1, [BUF_SIZE]); \
LOCAL_ALIGNED_16(type, u0, [BUF_SIZE / 2]); \
LOCAL_ALIGNED_16(type, u1, [BUF_SIZE / 2]); \
LOCAL_ALIGNED_16(type, v0, [BUF_SIZE / 2]); \
LOCAL_ALIGNED_16(type, v1, [BUF_SIZE / 2]); \
LOCAL_ALIGNED_16(uint8_t, dst0, [BUF_SIZE * 8 / 3]); \
LOCAL_ALIGNED_16(uint8_t, dst1, [BUF_SIZE * 8 / 3]); \
declare_func(void, const type * y, const type * u, const type * v, \
uint8_t * dst, ptrdiff_t width); \
ptrdiff_t width, step = 12 / sizeof(type); \
for (width = step; width < BUF_SIZE - 15; width += step) { \
int y_offset = rnd() & 15; \
int uv_offset = y_offset / 2; \
randomize_buffers(mask); \
call_ref(y0 + y_offset, u0 + uv_offset, v0 + uv_offset, dst0, width); \
call_new(y1 + y_offset, u1 + uv_offset, v1 + uv_offset, dst1, width); \
if (memcmp(y0, y1, BUF_SIZE) || memcmp(u0, u1, BUF_SIZE / 2) || \
memcmp(v0, v1, BUF_SIZE / 2) || memcmp(dst0, dst1, width * 8 / 3)) \
fail(); \
bench_new(y1 + y_offset, u1 + uv_offset, v1 + uv_offset, dst1, width); \
} \
} while (0)
uint8_t
#define u(width, name, range_min, range_max)
Definition: cbs_h2645.c:344
static const uint16_t mask[17]
Definition: lzw.c:38
#define declare_func(ret,...)
Definition: checkasm.h:111
uint16_t width
Definition: gdv.c:47
#define BUF_SIZE
Definition: v210enc.c:28
cl_device_type type
#define v0
Definition: regdef.h:26
#define rnd()
Definition: checkasm.h:100
for(j=16;j >0;--j)

Definition at line 53 of file v210enc.c.

Referenced by checkasm_check_v210enc().

Function Documentation

◆ checkasm_check_v210enc()

void checkasm_check_v210enc ( void  )

Definition at line 81 of file v210enc.c.