FFmpeg
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

#define BUF_SIZE   512

Definition at line 28 of file v210enc.c.

#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)
GLfloat v0
Definition: opengl_enc.c:106
#define AV_WN32A(p, v)
Definition: intreadwrite.h:538
ptrdiff_t size
Definition: opengl_enc.c:100
static const uint16_t mask[17]
Definition: lzw.c:38
const char * r
Definition: vf_curves.c:114
#define BUF_SIZE
Definition: v210enc.c:28
#define width
int
#define rnd()
Definition: checkasm.h:107
for(j=16;j >0;--j)
int i
Definition: input.c:407

Definition at line 30 of file v210enc.c.

#define check_pack_line (   type,
  mask 
)
Value:
do { \
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; \
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)
#define randomize_buffers(mask)
Definition: v210enc.c:30
GLint GLenum type
Definition: opengl_enc.c:104
GLfloat v0
Definition: opengl_enc.c:106
uint8_t
#define u(width, name, range_min, range_max)
Definition: cbs_h2645.c:262
static const uint16_t mask[17]
Definition: lzw.c:38
#define declare_func(ret,...)
Definition: checkasm.h:118
#define fail()
Definition: checkasm.h:123
#define BUF_SIZE
Definition: v210enc.c:28
#define width
if(ret)
#define call_ref(...)
Definition: checkasm.h:129
int
#define rnd()
Definition: checkasm.h:107
#define bench_new(...)
Definition: checkasm.h:261
#define LOCAL_ALIGNED_16(t, v,...)
Definition: internal.h:131
#define call_new(...)
Definition: checkasm.h:201
for(j=16;j >0;--j)
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 at line 53 of file v210enc.c.

Referenced by checkasm_check_v210enc().

Function Documentation

void checkasm_check_v210enc ( void  )

Definition at line 81 of file v210enc.c.