FFmpeg  4.0
Macros | Functions
bswapdsp.c File Reference
#include <string.h>
#include "checkasm.h"
#include "libavcodec/bswapdsp.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()
 
#define check_bswap(type)
 

Functions

void checkasm_check_bswapdsp (void)
 

Macro Definition Documentation

◆ BUF_SIZE

#define BUF_SIZE   512

Definition at line 28 of file bswapdsp.c.

Referenced by checkasm_check_bswapdsp().

◆ randomize_buffers

#define randomize_buffers ( )
Value:
do { \
int i; \
for (i = 0; i < BUF_SIZE; i += 4) { \
uint32_t r = rnd(); \
AV_WN32A(src0 + i, r); \
AV_WN32A(src1 + i, r); \
r = rnd(); \
AV_WN32A(dst0 + i, r); \
AV_WN32A(dst1 + i, r); \
} \
} while (0)
#define BUF_SIZE
Definition: bswapdsp.c:28
const char * r
Definition: vf_curves.c:111
#define src1
Definition: h264pred.c:139
#define src0
Definition: h264pred.c:138
#define rnd()
Definition: checkasm.h:100

Definition at line 30 of file bswapdsp.c.

◆ check_bswap

#define check_bswap (   type)
Value:
do { \
int w; \
declare_func(void, type *dst, const type *src, int w); \
for (w = 0; w < BUF_SIZE / sizeof(type); w++) { \
int offset = (BUF_SIZE / sizeof(type) - w) & 15; /* Test various alignments */ \
randomize_buffers(); \
call_ref((type *)dst0 + offset, (type *)src0 + offset, w); \
call_new((type *)dst1 + offset, (type *)src1 + offset, w); \
if (memcmp(src0, src1, BUF_SIZE) || memcmp(dst0, dst1, BUF_SIZE)) \
fail(); \
bench_new((type *)dst1 + offset, (type *)src1 + offset, w); \
} \
} while (0)
#define BUF_SIZE
Definition: bswapdsp.c:28
#define src
Definition: vp8dsp.c:254
static const uint8_t offset[127][2]
Definition: vf_spp.c:92
uint8_t w
Definition: llviddspenc.c:38
#define src1
Definition: h264pred.c:139
cl_device_type type
#define src0
Definition: h264pred.c:138
for(j=16;j >0;--j)

Definition at line 43 of file bswapdsp.c.

Referenced by checkasm_check_bswapdsp().

Function Documentation

◆ checkasm_check_bswapdsp()

void checkasm_check_bswapdsp ( void  )

Definition at line 59 of file bswapdsp.c.