FFmpeg  4.0
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"

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)
 
#define check_diff_pixels(type)
 

Functions

void checkasm_check_pixblockdsp (void)
 

Macro Definition Documentation

◆ BUF_UNITS

#define BUF_UNITS   8

Definition at line 28 of file pixblockdsp.c.

◆ BUF_SIZE

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

Definition at line 29 of file pixblockdsp.c.

Referenced by checkasm_check_pixblockdsp().

◆ 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)
#define BUF_SIZE
Definition: pixblockdsp.c:29
const char * r
Definition: vf_curves.c:111
#define rnd()
Definition: checkasm.h:100

Definition at line 31 of file pixblockdsp.c.

◆ check_get_pixels

#define check_get_pixels (   type)
Value:
do { \
int i; \
declare_func_emms(AV_CPU_FLAG_MMX, 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) + 8 * i; /* Test various alignments */ \
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)
static int16_t block[64]
Definition: dct.c:115
uint8_t
#define BUF_SIZE
Definition: pixblockdsp.c:29
#define AV_CPU_FLAG_MMX
standard MMX
Definition: cpu.h:31
#define BUF_UNITS
Definition: pixblockdsp.c:28
cl_device_type type
int pixels
Definition: avisynth_c.h:429
for(j=16;j >0;--j)

Definition at line 47 of file pixblockdsp.c.

Referenced by checkasm_check_pixblockdsp().

◆ check_diff_pixels

#define check_diff_pixels (   type)
Value:
do { \
int i; \
declare_func_emms(AV_CPU_FLAG_MMX, 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) + 8 * i; /* Test various alignments */ \
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)
int stride
Definition: mace.c:144
static int16_t block[64]
Definition: dct.c:115
uint8_t
#define av_restrict
Definition: config.h:10
#define BUF_SIZE
Definition: pixblockdsp.c:29
#define s2
Definition: regdef.h:39
#define AV_CPU_FLAG_MMX
standard MMX
Definition: cpu.h:31
#define BUF_UNITS
Definition: pixblockdsp.c:28
cl_device_type type
#define s1
Definition: regdef.h:38
for(j=16;j >0;--j)

Definition at line 64 of file pixblockdsp.c.

Referenced by checkasm_check_pixblockdsp().

Function Documentation

◆ checkasm_check_pixblockdsp()

void checkasm_check_pixblockdsp ( void  )

Definition at line 81 of file pixblockdsp.c.