FFmpeg
Loading...
Searching...
No Matches
vvc_pred.c File Reference
#include <string.h>
#include "checkasm.h"
#include "libavcodec/vvc/dsp.h"
#include "libavcodec/vvc/intra.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem_internal.h"

Go to the source code of this file.

Macros

#define SIZEOF_PIXEL   ((bit_depth + 7) / 8)
 
#define PIXEL_STRIDE   (MAX_TB_SIZE * 2)
 
#define BUF_SIZE   (2 * PIXEL_STRIDE * 64)
 
#define REF_BYTES   FFALIGN(2 * (6 * MAX_TB_SIZE + 5), 4)
 
#define REF_OFFSET   (MAX_TB_SIZE + 3)
 
#define randomize_buffers()
 

Functions

static int derive_filter_flag (const int mode, const int ref_idx, const int w, const int h)
 
static void check_pred_dc (VVCDSPContext *c, uint8_t *buf0, uint8_t *buf1, uint8_t *top, uint8_t *left, int bit_depth)
 
static void check_pred_planar (VVCDSPContext *c, uint8_t *buf0, uint8_t *buf1, uint8_t *top, uint8_t *left, int bit_depth)
 
static void check_pred_vh (VVCDSPContext *c, uint8_t *buf0, uint8_t *buf1, uint8_t *top, uint8_t *left, int bit_depth)
 
static void check_pred_mip (VVCDSPContext *c, uint8_t *buf0, uint8_t *buf1, uint8_t *top, uint8_t *left, int bit_depth)
 
static void check_pred_angular (VVCDSPContext *c, uint8_t *buf0, uint8_t *buf1, uint8_t *top, uint8_t *left, int bit_depth)
 
void checkasm_check_vvc_pred (void)
 

Variables

static const uint32_t pixel_mask [3] = { 0xffffffff, 0x03ff03ff, 0x0fff0fff }
 
static const int mip_modes [] = {16, 8, 6}
 

Macro Definition Documentation

◆ SIZEOF_PIXEL

#define SIZEOF_PIXEL   ((bit_depth + 7) / 8)

Definition at line 29 of file vvc_pred.c.

◆ PIXEL_STRIDE

#define PIXEL_STRIDE   (MAX_TB_SIZE * 2)

Definition at line 30 of file vvc_pred.c.

◆ BUF_SIZE

#define BUF_SIZE   (2 * PIXEL_STRIDE * 64)

Definition at line 31 of file vvc_pred.c.

◆ REF_BYTES

#define REF_BYTES   FFALIGN(2 * (6 * MAX_TB_SIZE + 5), 4)

Definition at line 33 of file vvc_pred.c.

Referenced by checkasm_check_vvc_pred().

◆ REF_OFFSET

#define REF_OFFSET   (MAX_TB_SIZE + 3)

Definition at line 34 of file vvc_pred.c.

Referenced by checkasm_check_vvc_pred().

◆ randomize_buffers

#define randomize_buffers ( )
Value:
do { \
uint32_t mask = pixel_mask[(bit_depth - 8) >> 1]; \
for (int i = 0; i < BUF_SIZE; i += 4) { \
uint32_t r = rnd() & mask; \
AV_WN32A(buf0 + i, r); \
AV_WN32A(buf1 + i, r); \
} \
/* Make sure reference buffer writes don't go out of bounds */ \
for (int i = -(REF_OFFSET * SIZEOF_PIXEL); \
i < REF_BYTES - REF_OFFSET * SIZEOF_PIXEL; i += 4) { \
AV_WN32A(top + i, rnd() & mask); \
AV_WN32A(left + i, rnd() & mask); \
} \
} while (0)
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
Definition af_astats.c:246
static int BS_FUNC left(const BSCTX *bc)
Return the number of the bits left in a buffer.
#define i(width, name, range_min, range_max)
Definition cbs_h264.c:63
#define rnd
Definition checkasm.h:139
#define r
Definition input.c:42
static const uint16_t mask[17]
Definition lzw.c:38
#define BUF_SIZE
Definition setpts.c:159
#define SIZEOF_PIXEL
Definition h264chroma.c:28
static const uint32_t pixel_mask[5]
Definition h264dsp.c:31
#define REF_BYTES
Definition vvc_pred.c:33
#define REF_OFFSET
Definition vvc_pred.c:34

Definition at line 36 of file vvc_pred.c.

Referenced by check_pred_angular(), check_pred_dc(), check_pred_mip(), check_pred_planar(), and check_pred_vh().

Function Documentation

◆ derive_filter_flag()

static int derive_filter_flag ( const int mode,
const int ref_idx,
const int w,
const int h )
static

Definition at line 53 of file vvc_pred.c.

Referenced by check_pred_angular().

◆ check_pred_dc()

static void check_pred_dc ( VVCDSPContext * c,
uint8_t * buf0,
uint8_t * buf1,
uint8_t * top,
uint8_t * left,
int bit_depth )
static

Definition at line 63 of file vvc_pred.c.

Referenced by checkasm_check_vvc_pred().

◆ check_pred_planar()

static void check_pred_planar ( VVCDSPContext * c,
uint8_t * buf0,
uint8_t * buf1,
uint8_t * top,
uint8_t * left,
int bit_depth )
static

Definition at line 93 of file vvc_pred.c.

Referenced by checkasm_check_vvc_pred().

◆ check_pred_vh()

static void check_pred_vh ( VVCDSPContext * c,
uint8_t * buf0,
uint8_t * buf1,
uint8_t * top,
uint8_t * left,
int bit_depth )
static

Definition at line 124 of file vvc_pred.c.

Referenced by checkasm_check_vvc_pred().

◆ check_pred_mip()

static void check_pred_mip ( VVCDSPContext * c,
uint8_t * buf0,
uint8_t * buf1,
uint8_t * top,
uint8_t * left,
int bit_depth )
static

Definition at line 165 of file vvc_pred.c.

Referenced by checkasm_check_vvc_pred().

◆ check_pred_angular()

static void check_pred_angular ( VVCDSPContext * c,
uint8_t * buf0,
uint8_t * buf1,
uint8_t * top,
uint8_t * left,
int bit_depth )
static

Definition at line 207 of file vvc_pred.c.

Referenced by checkasm_check_vvc_pred().

◆ checkasm_check_vvc_pred()

void checkasm_check_vvc_pred ( void )

Definition at line 274 of file vvc_pred.c.

Variable Documentation

◆ pixel_mask

const uint32_t pixel_mask[3] = { 0xffffffff, 0x03ff03ff, 0x0fff0fff }
static

Definition at line 26 of file vvc_pred.c.

◆ mip_modes

const int mip_modes[] = {16, 8, 6}
static

Definition at line 27 of file vvc_pred.c.

Referenced by check_pred_mip().