FFmpeg
Macros | Enumerations | Functions
cavsdsp.c File Reference
#include <assert.h>
#include <stddef.h>
#include "checkasm.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/macros.h"
#include "libavutil/mem_internal.h"
#include "libavcodec/cavsdsp.h"

Go to the source code of this file.

Macros

#define MAX_BLOCK_SIZE   16
 
#define randomize_buffers(buf0, buf1)
 
#define TEST(NAME)   { .name = #NAME, .offset = offsetof(CAVSDSPContext, NAME) }
 

Enumerations

enum  { MAX_STRIDE = 64, BUF_SIZE = ((MAX_BLOCK_SIZE - 1) * MAX_STRIDE + MAX_BLOCK_SIZE), INPUT_BUF_SIZE = (2 + (2 + MAX_BLOCK_SIZE - 1 + 3) * MAX_STRIDE + MAX_BLOCK_SIZE + 3 + (MAX_BLOCK_SIZE - 1)) }
 

Functions

static void check_cavs_qpeldsp (void)
 
void checkasm_check_cavsdsp (void)
 

Macro Definition Documentation

◆ MAX_BLOCK_SIZE

#define MAX_BLOCK_SIZE   16

Definition at line 31 of file cavsdsp.c.

◆ randomize_buffers

#define randomize_buffers (   buf0,
  buf1 
)
Value:
do { \
static_assert(sizeof(buf0) == sizeof(buf1), "Incompatible buffers"); \
static_assert(!(sizeof(buf0) % 4), "Tail handling needed"); \
static_assert(sizeof(buf0[0]) == 1 && sizeof(buf1[0]) == 1, \
"Pointer arithmetic needs to be adapted"); \
for (size_t k = 0; k < sizeof(buf0); k += 4) { \
uint32_t r = rnd(); \
AV_WN32A(buf0 + k, r); \
AV_WN32A(buf1 + k, r); \
} \
} while (0)

Definition at line 45 of file cavsdsp.c.

◆ TEST

#define TEST (   NAME)    { .name = #NAME, .offset = offsetof(CAVSDSPContext, NAME) }

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_STRIDE 
BUF_SIZE 

BUF_SIZE is bigger than necessary in order to test strides > block width.

INPUT_BUF_SIZE 

The qpel interpolation code accesses two lines above and three lines below the actual src block; it also accesses two pixels to the left and three to the right.

The input is not subject to alignment requirements; making the input buffer bigger (by MAX_BLOCK_SIZE - 1) allows us to use a random misalignment.

Definition at line 29 of file cavsdsp.c.

Function Documentation

◆ check_cavs_qpeldsp()

static void check_cavs_qpeldsp ( void  )
static

Definition at line 59 of file cavsdsp.c.

Referenced by checkasm_check_cavsdsp().

◆ checkasm_check_cavsdsp()

void checkasm_check_cavsdsp ( void  )

Definition at line 116 of file cavsdsp.c.

r
const char * r
Definition: vf_curves.c:127
rnd
#define rnd()
Definition: checkasm.h:189