FFmpeg
Macros | Functions
vp8dsp.c File Reference
#include <string.h>
#include "libavcodec/avcodec.h"
#include "libavcodec/vp8dsp.h"
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem_internal.h"
#include "checkasm.h"

Go to the source code of this file.

Macros

#define PIXEL_STRIDE   16
 
#define randomize_buffers(src, dst, stride, coef)
 
#define SRC_BUF_STRIDE   32
 
#define SRC_BUF_SIZE   (((size << (size < 16)) + 5) * SRC_BUF_STRIDE)
 
#define src   (buf + 2 * SRC_BUF_STRIDE + 2 + 1)
 
#define randomize_buffers()
 
#define setpx(a, b, c)   buf[(a) + (b) * jstride] = av_clip_uint8(c)
 
#define setdx(a, b, c, d)   setpx(a, b, c - (d) + (rnd() % ((d) * 2 + 1)))
 
#define setdx2(a, b, o, c, d, e)   setpx(a, b, o = c + ((d) + (rnd() % (e))) * (c >= 128 ? -1 : 1))
 
#define randomize_buffers(buf, lineoff, str, force_hev)   randomize_loopfilter_buffers(lineoff, str, dir, flim_E, flim_I, hev_thresh, buf, force_hev)
 

Functions

static void dct4x4 (int16_t *coef)
 
static void wht4x4 (int16_t *coef)
 
static void check_idct (void)
 
static void check_idct_dc4 (void)
 
static void check_luma_dc_wht (void)
 
static void check_mc (void)
 
static void randomize_loopfilter_buffers (int lineoff, int str, int dir, int flim_E, int flim_I, int hev_thresh, uint8_t *buf, int force_hev)
 
static void fill_loopfilter_buffers (uint8_t *buf, ptrdiff_t stride, int w, int h)
 
static void check_loopfilter_16y (void)
 
static void check_loopfilter_8uv (void)
 
static void check_loopfilter_simple (void)
 
void checkasm_check_vp8dsp (void)
 

Macro Definition Documentation

◆ PIXEL_STRIDE

#define PIXEL_STRIDE   16

Definition at line 32 of file vp8dsp.c.

◆ randomize_buffers [1/3]

#define randomize_buffers (   src,
  dst,
  stride,
  coef 
)
Value:
do { \
int x, y; \
for (y = 0; y < 4; y++) { \
AV_WN32A((src) + y * (stride), rnd()); \
AV_WN32A((dst) + y * (stride), rnd()); \
for (x = 0; x < 4; x++) \
(coef)[y * 4 + x] = (src)[y * (stride) + x] - \
(dst)[y * (stride) + x]; \
} \
} while (0)

Definition at line 377 of file vp8dsp.c.

◆ SRC_BUF_STRIDE

#define SRC_BUF_STRIDE   32

Definition at line 250 of file vp8dsp.c.

◆ SRC_BUF_SIZE

#define SRC_BUF_SIZE   (((size << (size < 16)) + 5) * SRC_BUF_STRIDE)

Definition at line 251 of file vp8dsp.c.

◆ src

#define src   (buf + 2 * SRC_BUF_STRIDE + 2 + 1)
Examples
filter_audio.c.

Definition at line 255 of file vp8dsp.c.

◆ randomize_buffers [2/3]

#define randomize_buffers ( )
Value:
do { \
int k; \
for (k = 0; k < SRC_BUF_SIZE; k += 4) { \
AV_WN32A(buf + k, rnd()); \
} \
} while (0)

Definition at line 377 of file vp8dsp.c.

◆ setpx

#define setpx (   a,
  b,
  c 
)    buf[(a) + (b) * jstride] = av_clip_uint8(c)

Definition at line 329 of file vp8dsp.c.

◆ setdx

#define setdx (   a,
  b,
  c,
  d 
)    setpx(a, b, c - (d) + (rnd() % ((d) * 2 + 1)))

Definition at line 331 of file vp8dsp.c.

◆ setdx2

#define setdx2 (   a,
  b,
  o,
  c,
  d,
 
)    setpx(a, b, o = c + ((d) + (rnd() % (e))) * (c >= 128 ? -1 : 1))

Definition at line 333 of file vp8dsp.c.

◆ randomize_buffers [3/3]

#define randomize_buffers (   buf,
  lineoff,
  str,
  force_hev 
)    randomize_loopfilter_buffers(lineoff, str, dir, flim_E, flim_I, hev_thresh, buf, force_hev)

Definition at line 377 of file vp8dsp.c.

Function Documentation

◆ dct4x4()

static void dct4x4 ( int16_t *  coef)
static

Definition at line 46 of file vp8dsp.c.

Referenced by check_idct(), check_idct_dc4(), check_idct_multiple(), and check_luma_dc_wht().

◆ wht4x4()

static void wht4x4 ( int16_t *  coef)
static

Definition at line 71 of file vp8dsp.c.

Referenced by check_luma_dc_wht().

◆ check_idct()

static void check_idct ( void  )
static

Definition at line 112 of file vp8dsp.c.

Referenced by checkasm_check_vp8dsp().

◆ check_idct_dc4()

static void check_idct_dc4 ( void  )
static

Definition at line 157 of file vp8dsp.c.

Referenced by checkasm_check_vp8dsp().

◆ check_luma_dc_wht()

static void check_luma_dc_wht ( void  )
static

Definition at line 200 of file vp8dsp.c.

Referenced by checkasm_check_vp8dsp().

◆ check_mc()

static void check_mc ( void  )
static

Definition at line 266 of file vp8dsp.c.

Referenced by checkasm_check_vp8dsp().

◆ randomize_loopfilter_buffers()

static void randomize_loopfilter_buffers ( int  lineoff,
int  str,
int  dir,
int  flim_E,
int  flim_I,
int  hev_thresh,
uint8_t *  buf,
int  force_hev 
)
static

Definition at line 335 of file vp8dsp.c.

◆ fill_loopfilter_buffers()

static void fill_loopfilter_buffers ( uint8_t *  buf,
ptrdiff_t  stride,
int  w,
int  h 
)
static

Definition at line 369 of file vp8dsp.c.

Referenced by check_loopfilter_16y(), check_loopfilter_8uv(), and check_loopfilter_simple().

◆ check_loopfilter_16y()

static void check_loopfilter_16y ( void  )
static

Definition at line 380 of file vp8dsp.c.

Referenced by checkasm_check_vp8dsp().

◆ check_loopfilter_8uv()

static void check_loopfilter_8uv ( void  )
static

Definition at line 424 of file vp8dsp.c.

Referenced by checkasm_check_vp8dsp().

◆ check_loopfilter_simple()

static void check_loopfilter_simple ( void  )
static

Definition at line 477 of file vp8dsp.c.

Referenced by checkasm_check_vp8dsp().

◆ checkasm_check_vp8dsp()

void checkasm_check_vp8dsp ( void  )

Definition at line 508 of file vp8dsp.c.

stride
int stride
Definition: mace.c:144
rnd
#define rnd()
Definition: checkasm.h:111
src
#define src
Definition: vp8dsp.c:255
SRC_BUF_SIZE
#define SRC_BUF_SIZE
Definition: vp8dsp.c:251