FFmpeg
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.

◆ 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)

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)

Definition at line 43 of file bswapdsp.c.

Function Documentation

◆ checkasm_check_bswapdsp()

void checkasm_check_bswapdsp ( void  )

Definition at line 59 of file bswapdsp.c.

r
const char * r
Definition: vf_curves.c:114
w
uint8_t w
Definition: llviddspenc.c:38
BUF_SIZE
#define BUF_SIZE
Definition: bswapdsp.c:28
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
src
#define src
Definition: vp8dsp.c:254
rnd
#define rnd()
Definition: checkasm.h:104
for
for(j=16;j >0;--j)
Definition: h264pred_template.c:469
offset
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 offset
Definition: writing_filters.txt:86
src0
#define src0
Definition: h264pred.c:138
src1
#define src1
Definition: h264pred.c:139
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:259