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.00005
 
#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, DATA_TYPE, SCALE, 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 [6][FF_ARRAY_ELEMS(check_lens)]
 
static int init = 0
 

Macro Definition Documentation

◆ EPS

#define EPS   0.00005

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,
  DATA_TYPE,
  SCALE,
  LENGTHS,
  CHECK_EXPRESSION 
)

Definition at line 56 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 100 of file av_tx.c.

Variable Documentation

◆ check_lens

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

Definition at line 42 of file av_tx.c.

Referenced by checkasm_check_av_tx().

◆ tx_refs

AVTXContext* tx_refs[6][FF_ARRAY_ELEMS(check_lens)]
static

Definition at line 46 of file av_tx.c.

Referenced by free_tx_refs().

◆ init

int init = 0
static
LEN
#define LEN
rnd
#define rnd()
Definition: checkasm.h:111
SCALE
#define SCALE(c)
Definition: dcadata.c:7338
TYPE
#define TYPE
Definition: ffv1.h:194
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:271