FFmpeg
Macros | Functions | Variables
vvc_mc.c File Reference
#include <string.h>
#include "checkasm.h"
#include "libavcodec/vvc/vvc_ctu.h"
#include "libavcodec/vvc/vvc_data.h"
#include "libavcodec/vvc/vvcdsp.h"
#include "libavutil/common.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_CTU_SIZE * 2)
 
#define EXTRA_BEFORE   3
 
#define EXTRA_AFTER   4
 
#define SRC_EXTRA   (EXTRA_BEFORE + EXTRA_AFTER) * 2
 
#define SRC_BUF_SIZE   (PIXEL_STRIDE + SRC_EXTRA) * (PIXEL_STRIDE + SRC_EXTRA)
 
#define DST_BUF_SIZE   (MAX_CTU_SIZE * MAX_CTU_SIZE * 2)
 
#define SRC_OFFSET   ((PIXEL_STRIDE + EXTRA_BEFORE * 2) * EXTRA_BEFORE)
 
#define randomize_buffers(buf0, buf1, size, mask)
 
#define randomize_pixels(buf0, buf1, size)
 
#define randomize_avg_src(buf0, buf1, size)
 
#define AVG_SRC_BUF_SIZE   (MAX_CTU_SIZE * MAX_CTU_SIZE)
 
#define AVG_DST_BUF_SIZE   (MAX_PB_SIZE * MAX_PB_SIZE * 2)
 

Functions

static void check_put_vvc_luma (void)
 
static void check_put_vvc_luma_uni (void)
 
static void check_put_vvc_chroma (void)
 
static void check_put_vvc_chroma_uni (void)
 
static void check_avg (void)
 
void checkasm_check_vvc_mc (void)
 

Variables

static const uint32_t pixel_mask [] = { 0xffffffff, 0x03ff03ff, 0x0fff0fff, 0x3fff3fff, 0xffffffff }
 
static const int sizes [] = { 2, 4, 8, 16, 32, 64, 128 }
 

Macro Definition Documentation

◆ SIZEOF_PIXEL

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

Definition at line 36 of file vvc_mc.c.

◆ PIXEL_STRIDE

#define PIXEL_STRIDE   (MAX_CTU_SIZE * 2)

Definition at line 37 of file vvc_mc.c.

◆ EXTRA_BEFORE

#define EXTRA_BEFORE   3

Definition at line 38 of file vvc_mc.c.

◆ EXTRA_AFTER

#define EXTRA_AFTER   4

Definition at line 39 of file vvc_mc.c.

◆ SRC_EXTRA

#define SRC_EXTRA   (EXTRA_BEFORE + EXTRA_AFTER) * 2

Definition at line 40 of file vvc_mc.c.

◆ SRC_BUF_SIZE

#define SRC_BUF_SIZE   (PIXEL_STRIDE + SRC_EXTRA) * (PIXEL_STRIDE + SRC_EXTRA)

Definition at line 41 of file vvc_mc.c.

◆ DST_BUF_SIZE

#define DST_BUF_SIZE   (MAX_CTU_SIZE * MAX_CTU_SIZE * 2)

Definition at line 42 of file vvc_mc.c.

◆ SRC_OFFSET

#define SRC_OFFSET   ((PIXEL_STRIDE + EXTRA_BEFORE * 2) * EXTRA_BEFORE)

Definition at line 43 of file vvc_mc.c.

◆ randomize_buffers

#define randomize_buffers (   buf0,
  buf1,
  size,
  mask 
)
Value:
do { \
int k; \
for (k = 0; k < size; k += 4) { \
uint32_t r = rnd() & mask; \
AV_WN32A(buf0 + k, r); \
AV_WN32A(buf1 + k, r); \
} \
} while (0)

Definition at line 45 of file vvc_mc.c.

◆ randomize_pixels

#define randomize_pixels (   buf0,
  buf1,
  size 
)
Value:
do { \
uint32_t mask = pixel_mask[(bit_depth - 8) >> 1]; \
randomize_buffers(buf0, buf1, size, mask); \
} while (0)

Definition at line 55 of file vvc_mc.c.

◆ randomize_avg_src

#define randomize_avg_src (   buf0,
  buf1,
  size 
)
Value:
do { \
uint32_t mask = 0x3fff3fff; \
randomize_buffers(buf0, buf1, size, mask); \
} while (0)

Definition at line 61 of file vvc_mc.c.

◆ AVG_SRC_BUF_SIZE

#define AVG_SRC_BUF_SIZE   (MAX_CTU_SIZE * MAX_CTU_SIZE)

Definition at line 263 of file vvc_mc.c.

◆ AVG_DST_BUF_SIZE

#define AVG_DST_BUF_SIZE   (MAX_PB_SIZE * MAX_PB_SIZE * 2)

Definition at line 264 of file vvc_mc.c.

Function Documentation

◆ check_put_vvc_luma()

static void check_put_vvc_luma ( void  )
static

Definition at line 67 of file vvc_mc.c.

Referenced by checkasm_check_vvc_mc().

◆ check_put_vvc_luma_uni()

static void check_put_vvc_luma_uni ( void  )
static

Definition at line 115 of file vvc_mc.c.

Referenced by checkasm_check_vvc_mc().

◆ check_put_vvc_chroma()

static void check_put_vvc_chroma ( void  )
static

Definition at line 165 of file vvc_mc.c.

Referenced by checkasm_check_vvc_mc().

◆ check_put_vvc_chroma_uni()

static void check_put_vvc_chroma_uni ( void  )
static

Definition at line 213 of file vvc_mc.c.

Referenced by checkasm_check_vvc_mc().

◆ check_avg()

static void check_avg ( void  )
static

Definition at line 266 of file vvc_mc.c.

Referenced by checkasm_check_vvc_mc().

◆ checkasm_check_vvc_mc()

void checkasm_check_vvc_mc ( void  )

Definition at line 325 of file vvc_mc.c.

Variable Documentation

◆ pixel_mask

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

Definition at line 33 of file vvc_mc.c.

◆ sizes

const int sizes[] = { 2, 4, 8, 16, 32, 64, 128 }
static

Definition at line 34 of file vvc_mc.c.

r
const char * r
Definition: vf_curves.c:126
bit_depth
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
Definition: af_astats.c:245
rnd
#define rnd()
Definition: checkasm.h:163
mask
static const uint16_t mask[17]
Definition: lzw.c:38
pixel_mask
static const uint32_t pixel_mask[]
Definition: vvc_mc.c:33
size
int size
Definition: twinvq_data.h:10344