FFmpeg
Macros | Functions
pixblockdsp.c File Reference
#include <string.h>
#include "checkasm.h"
#include "libavcodec/pixblockdsp.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_UNITS   8
 
#define BUF_SIZE   (BUF_UNITS * 128 + 8 * BUF_UNITS)
 
#define randomize_buffers()
 
#define check_get_pixels(type, aligned)
 
#define check_diff_pixels(type, aligned)
 

Functions

void checkasm_check_pixblockdsp (void)
 

Macro Definition Documentation

◆ BUF_UNITS

#define BUF_UNITS   8

Definition at line 29 of file pixblockdsp.c.

◆ BUF_SIZE

#define BUF_SIZE   (BUF_UNITS * 128 + 8 * BUF_UNITS)

Definition at line 30 of file pixblockdsp.c.

◆ randomize_buffers

#define randomize_buffers ( )
Value:
do { \
int i; \
for (i = 0; i < BUF_SIZE; i += 4) { \
uint32_t r = rnd(); \
AV_WN32A(src10 + i, r); \
AV_WN32A(src11 + i, r); \
r = rnd(); \
AV_WN32A(src20 + i, r); \
AV_WN32A(src21 + i, r); \
r = rnd(); \
AV_WN32A(dst0_ + i, r); \
AV_WN32A(dst1_ + i, r); \
} \
} while (0)

Definition at line 32 of file pixblockdsp.c.

◆ check_get_pixels

#define check_get_pixels (   type,
  aligned 
)
Value:
do { \
int i; \
declare_func(void, int16_t *block, const uint8_t *pixels, ptrdiff_t line_size); \
for (i = 0; i < BUF_UNITS; i++) { \
int src_offset = i * 64 * sizeof(type) + (aligned ? 8 : 1) * i; \
int dst_offset = i * 64; /* dst must be aligned */ \
randomize_buffers(); \
call_ref(dst0 + dst_offset, src10 + src_offset, 8); \
call_new(dst1 + dst_offset, src11 + src_offset, 8); \
if (memcmp(src10, src11, BUF_SIZE)|| memcmp(dst0, dst1, BUF_SIZE)) \
fail(); \
bench_new(dst1 + dst_offset, src11 + src_offset, 8); \
} \
} while (0)

Definition at line 48 of file pixblockdsp.c.

◆ check_diff_pixels

#define check_diff_pixels (   type,
  aligned 
)
Value:
do { \
int i; \
declare_func(void, int16_t *av_restrict block, const uint8_t *s1, const uint8_t *s2, ptrdiff_t stride); \
for (i = 0; i < BUF_UNITS; i++) { \
int src_offset = i * 64 * sizeof(type) + (aligned ? 8 : 1) * i; \
int dst_offset = i * 64; /* dst must be aligned */ \
randomize_buffers(); \
call_ref(dst0 + dst_offset, src10 + src_offset, src20 + src_offset, 8); \
call_new(dst1 + dst_offset, src11 + src_offset, src21 + src_offset, 8); \
if (memcmp(src10, src11, BUF_SIZE) || memcmp(src20, src21, BUF_SIZE) || memcmp(dst0, dst1, BUF_SIZE)) \
fail(); \
bench_new(dst1 + dst_offset, src11 + src_offset, src21 + src_offset, 8); \
} \
} while (0)

Definition at line 65 of file pixblockdsp.c.

Function Documentation

◆ checkasm_check_pixblockdsp()

void checkasm_check_pixblockdsp ( void  )

Definition at line 82 of file pixblockdsp.c.

r
const char * r
Definition: vf_curves.c:126
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
aligned
static int aligned(int val)
Definition: dashdec.c:170
rnd
#define rnd()
Definition: checkasm.h:122
BUF_UNITS
#define BUF_UNITS
Definition: pixblockdsp.c:29
s1
#define s1
Definition: regdef.h:38
s2
#define s2
Definition: regdef.h:39
for
for(k=2;k<=8;++k)
Definition: h264pred_template.c:425
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
stride
#define stride
Definition: h264pred_template.c:537
BUF_SIZE
#define BUF_SIZE
Definition: pixblockdsp.c:30
block
The exact code depends on how similar the blocks are and how related they are to the block
Definition: filter_design.txt:207