FFmpeg
Macros | Functions | Variables
av_tx.c File Reference
#include "libavutil/mem_internal.h"
#include "libavutil/tx.h"
#include "libavutil/error.h"
#include "checkasm.h"
#include <stdlib.h>

Go to the source code of this file.

Macros

#define EPS   0.0005
 
#define SCALE_NOOP(x)   (x)
 
#define SCALE_INT20(x)   (av_clip64(lrintf((x) * 2147483648.0), INT32_MIN, INT32_MAX) >> 12)
 
#define randomize_complex(BUF, LEN, TYPE, SCALE)
 
#define CHECK_TEMPLATE(PREFIX, TYPE, DIR, DATA_TYPE, SCALE_TYPE, LENGTHS, CHECK_EXPRESSION)
 

Functions

static void free_tx_refs (void)
 
void checkasm_check_av_tx (void)
 

Variables

static const int check_lens []
 
static AVTXContexttx_refs [AV_TX_NB][2][FF_ARRAY_ELEMS(check_lens)] = { 0 }
 
static int init = 0
 

Macro Definition Documentation

◆ EPS

#define EPS   0.0005

Definition at line 27 of file av_tx.c.

◆ SCALE_NOOP

#define SCALE_NOOP (   x)    (x)

Definition at line 29 of file av_tx.c.

◆ SCALE_INT20

#define SCALE_INT20 (   x)    (av_clip64(lrintf((x) * 2147483648.0), INT32_MIN, INT32_MAX) >> 12)

Definition at line 30 of file av_tx.c.

◆ randomize_complex

#define randomize_complex (   BUF,
  LEN,
  TYPE,
  SCALE 
)
Value:
do { \
TYPE *buf = (TYPE *)BUF; \
for (int i = 0; i < LEN; i++) { \
double fre = (double)rnd() / UINT_MAX; \
double fim = (double)rnd() / UINT_MAX; \
buf[i] = (TYPE){ SCALE(fre), SCALE(fim) }; \
} \
} while (0)

Definition at line 32 of file av_tx.c.

◆ CHECK_TEMPLATE

#define CHECK_TEMPLATE (   PREFIX,
  TYPE,
  DIR,
  DATA_TYPE,
  SCALE_TYPE,
  LENGTHS,
  CHECK_EXPRESSION 
)

Definition at line 57 of file av_tx.c.

Function Documentation

◆ free_tx_refs()

static void free_tx_refs ( void  )
static

Definition at line 49 of file av_tx.c.

Referenced by checkasm_check_av_tx().

◆ checkasm_check_av_tx()

void checkasm_check_av_tx ( void  )

Definition at line 101 of file av_tx.c.

Variable Documentation

◆ check_lens

const int check_lens[]
static
Initial value:
= {
2, 4, 8, 16, 32, 64, 120, 960, 1024, 1920, 16384,
}

Definition at line 42 of file av_tx.c.

Referenced by checkasm_check_av_tx().

◆ tx_refs

AVTXContext* tx_refs[AV_TX_NB][2][FF_ARRAY_ELEMS(check_lens)] = { 0 }
static

Definition at line 46 of file av_tx.c.

Referenced by free_tx_refs().

◆ init

int init = 0
static

Definition at line 47 of file av_tx.c.

Referenced by checkasm_check_av_tx().

LEN
#define LEN
rnd
#define rnd()
Definition: checkasm.h:118
SCALE
#define SCALE(c)
Definition: dcadata.c:7338
TYPE
#define TYPE
Definition: ffv1dec.c:116
double
double
Definition: af_crystalizer.c:132
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:269