FFmpeg
Macros | Functions
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)

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); \
if (memcmp(y0, y1, BUF_SIZE * sizeof(type)) \
|| memcmp(u0, u1, BUF_SIZE * sizeof(type) / 2) \
|| memcmp(v0, v1, BUF_SIZE * sizeof(type) / 2) \
|| memcmp(dst0, dst1, width * 8 / 3)) \
fail(); \
bench_new(y1 + y_offset, u1 + uv_offset, v1 + uv_offset, dst1, width); \
} \
} while (0)

Definition at line 54 of file v210enc.c.

Function Documentation

◆ checkasm_check_v210enc()

void checkasm_check_v210enc ( void  )

Definition at line 84 of file v210enc.c.

r
const char * r
Definition: vf_curves.c:126
u
#define u(width, name, range_min, range_max)
Definition: cbs_h2645.c:250
step
trying all byte sequences megabyte in length and selecting the best looking sequence will yield cases to try But a word about which is also called distortion Distortion can be quantified by almost any quality measurement one chooses the sum of squared differences is used but more complex methods that consider psychovisual effects can be used as well It makes no difference in this discussion First step
Definition: rate_distortion.txt:58
v0
#define v0
Definition: regdef.h:26
type
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
Definition: writing_filters.txt:86
rnd
#define rnd()
Definition: checkasm.h:122
mask
static const uint16_t mask[17]
Definition: lzw.c:38
width
#define width
BUF_SIZE
#define BUF_SIZE
Definition: v210enc.c:29
for
for(k=2;k<=8;++k)
Definition: h264pred_template.c:425
size
int size
Definition: twinvq_data.h:10344
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
declare_func
#define declare_func(ret,...)
Definition: checkasm.h:133