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"
#include "libavutil/mem_internal.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 29 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 31 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 44 of file bswapdsp.c.

Function Documentation

◆ checkasm_check_bswapdsp()

void checkasm_check_bswapdsp ( void  )

Definition at line 60 of file bswapdsp.c.

r
const char * r
Definition: vf_curves.c:127
src1
const pixel * src1
Definition: h264pred_template.c:421
w
uint8_t w
Definition: llviddspenc.c:38
BUF_SIZE
#define BUF_SIZE
Definition: bswapdsp.c:29
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
rnd
#define rnd()
Definition: checkasm.h:172
dst
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition: dsp.h:83
for
for(k=2;k<=8;++k)
Definition: h264pred_template.c:425
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
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:256
src0
const pixel *const src0
Definition: h264pred_template.c:420
src
#define src
Definition: vp8dsp.c:248