FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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

#define BUF_UNITS   8

Definition at line 28 of file pixblockdsp.c.

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

Definition at line 29 of file pixblockdsp.c.

Referenced by checkasm_check_pixblockdsp().

#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 AV_WN32A(p, v)
Definition: intreadwrite.h:538
#define BUF_SIZE
Definition: pixblockdsp.c:29
const char * r
Definition: vf_curves.c:111
#define rnd()
Definition: checkasm.h:68
for(j=16;j >0;--j)

Definition at line 31 of file pixblockdsp.c.

#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 */ \
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:113
uint8_t
#define BUF_SIZE
Definition: pixblockdsp.c:29
#define fail()
Definition: checkasm.h:83
#define declare_func_emms(cpu_flags, ret,...)
Definition: checkasm.h:80
#define call_ref(...)
Definition: checkasm.h:89
#define AV_CPU_FLAG_MMX
standard MMX
Definition: cpu.h:29
#define BUF_UNITS
Definition: pixblockdsp.c:28
GLint GLenum type
Definition: opengl_enc.c:105
if(ret< 0)
Definition: vf_mcdeint.c:282
int pixels
Definition: avisynth_c.h:429
#define bench_new(...)
Definition: checkasm.h:176
#define randomize_buffers()
Definition: pixblockdsp.c:31
#define call_new(...)
Definition: checkasm.h:144
for(j=16;j >0;--j)

Definition at line 47 of file pixblockdsp.c.

Referenced by checkasm_check_pixblockdsp().

#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, int 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 */ \
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)
static int16_t block[64]
Definition: dct.c:113
uint8_t
#define BUF_SIZE
Definition: pixblockdsp.c:29
#define s2
Definition: regdef.h:39
#define fail()
Definition: checkasm.h:83
#define declare_func_emms(cpu_flags, ret,...)
Definition: checkasm.h:80
#define call_ref(...)
Definition: checkasm.h:89
#define AV_CPU_FLAG_MMX
standard MMX
Definition: cpu.h:29
#define BUF_UNITS
Definition: pixblockdsp.c:28
GLint GLenum type
Definition: opengl_enc.c:105
#define s1
Definition: regdef.h:38
GLint GLenum GLboolean GLsizei stride
Definition: opengl_enc.c:105
if(ret< 0)
Definition: vf_mcdeint.c:282
#define bench_new(...)
Definition: checkasm.h:176
#define randomize_buffers()
Definition: pixblockdsp.c:31
#define call_new(...)
Definition: checkasm.h:144
for(j=16;j >0;--j)

Definition at line 64 of file pixblockdsp.c.

Referenced by checkasm_check_pixblockdsp().

Function Documentation

void checkasm_check_pixblockdsp ( void  )

Definition at line 81 of file pixblockdsp.c.