FFmpeg
Loading...
Searching...
No Matches
v210enc.c File Reference
#include <string.h>
#include "checkasm.h"
#include "libavcodec/v210enc_init.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem_internal.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 29 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)
#define i(width, name, range_min, range_max)
Definition cbs_h264.c:63
#define rnd
Definition checkasm.h:135
#define r
Definition input.c:42
static const uint16_t mask[17]
Definition lzw.c:38
#define BUF_SIZE
Definition setpts.c:159
#define width
Definition dsp.h:89
int size

Definition at line 31 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); \
checkasm_check(type, y0, 0, y1, 0, BUF_SIZE, 1, "y"); \
checkasm_check(type, u0, 0, u1, 0, BUF_SIZE / 2, 1, "u"); \
checkasm_check(type, v0, 0, v1, 0, BUF_SIZE / 2, 1, "v"); \
checkasm_check(uint8_t, dst0, 0, dst1, 0, width * 8 / 3, 1, "dst"); \
bench_new(y1 + y_offset, u1 + uv_offset, v1 + uv_offset, dst1, width); \
} \
} while (0)
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:87
cl_device_type type
#define u(width, name, range_min, range_max)
Definition cbs_apv.c:68

Definition at line 54 of file v210enc.c.

Referenced by checkasm_check_v210enc().

Function Documentation

◆ checkasm_check_v210enc()

void checkasm_check_v210enc ( void )

Definition at line 83 of file v210enc.c.