FFmpeg
Macros | Functions | Variables
vvc_alf.c File Reference
#include <string.h>
#include "checkasm.h"
#include "libavcodec/vvc/ctu.h"
#include "libavcodec/vvc/data.h"
#include "libavcodec/vvc/dsp.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 SRC_PIXEL_STRIDE   (MAX_CTU_SIZE + 2 * ALF_PADDING_SIZE)
 
#define DST_PIXEL_STRIDE   (SRC_PIXEL_STRIDE + 4)
 
#define SRC_BUF_SIZE   (SRC_PIXEL_STRIDE * (MAX_CTU_SIZE + 3 * 2) * 2)
 
#define DST_BUF_SIZE   (DST_PIXEL_STRIDE * (MAX_CTU_SIZE + 3 * 2) * 2)
 
#define LUMA_PARAMS_SIZE   (MAX_CTU_SIZE * MAX_CTU_SIZE / ALF_BLOCK_SIZE / ALF_BLOCK_SIZE * ALF_NUM_COEFF_LUMA)
 
#define randomize_buffers(buf0, buf1, size)
 
#define randomize_buffers2(buf, size, filter)
 

Functions

static void check_alf_filter (VVCDSPContext *c, const int bit_depth)
 
static void check_alf_classify (VVCDSPContext *c, const int bit_depth)
 
void checkasm_check_vvc_alf (void)
 

Variables

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

Macro Definition Documentation

◆ SIZEOF_PIXEL

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

Definition at line 35 of file vvc_alf.c.

◆ SRC_PIXEL_STRIDE

#define SRC_PIXEL_STRIDE   (MAX_CTU_SIZE + 2 * ALF_PADDING_SIZE)

Definition at line 36 of file vvc_alf.c.

◆ DST_PIXEL_STRIDE

#define DST_PIXEL_STRIDE   (SRC_PIXEL_STRIDE + 4)

Definition at line 37 of file vvc_alf.c.

◆ SRC_BUF_SIZE

#define SRC_BUF_SIZE   (SRC_PIXEL_STRIDE * (MAX_CTU_SIZE + 3 * 2) * 2)

Definition at line 38 of file vvc_alf.c.

◆ DST_BUF_SIZE

#define DST_BUF_SIZE   (DST_PIXEL_STRIDE * (MAX_CTU_SIZE + 3 * 2) * 2)

Definition at line 39 of file vvc_alf.c.

◆ LUMA_PARAMS_SIZE

Definition at line 40 of file vvc_alf.c.

◆ randomize_buffers

#define randomize_buffers (   buf0,
  buf1,
  size 
)
Value:
do { \
uint32_t mask = pixel_mask[(bit_depth - 8) >> 1]; \
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 42 of file vvc_alf.c.

◆ randomize_buffers2

#define randomize_buffers2 (   buf,
  size,
  filter 
)
Value:
do { \
int k; \
if (filter) { \
for (k = 0; k < size; k++) { \
int8_t r = rnd(); \
buf[k] = r; \
} \
} else { \
for (k = 0; k < size; k++) { \
int r = rnd() % FF_ARRAY_ELEMS(clip_set); \
buf[k] = clip_set[r]; \
} \
} \
} while (0)

Definition at line 53 of file vvc_alf.c.

Function Documentation

◆ check_alf_filter()

static void check_alf_filter ( VVCDSPContext c,
const int  bit_depth 
)
static

Definition at line 69 of file vvc_alf.c.

Referenced by checkasm_check_vvc_alf().

◆ check_alf_classify()

static void check_alf_classify ( VVCDSPContext c,
const int  bit_depth 
)
static

Definition at line 127 of file vvc_alf.c.

Referenced by checkasm_check_vvc_alf().

◆ checkasm_check_vvc_alf()

void checkasm_check_vvc_alf ( void  )

Definition at line 170 of file vvc_alf.c.

Variable Documentation

◆ pixel_mask

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

Definition at line 33 of file vvc_alf.c.

r
const char * r
Definition: vf_curves.c:127
filter
void(* filter)(uint8_t *src, int stride, int qscale)
Definition: h263dsp.c:29
bit_depth
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
Definition: af_astats.c:246
rnd
#define rnd()
Definition: checkasm.h:169
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
mask
static const uint16_t mask[17]
Definition: lzw.c:38
pixel_mask
static const uint32_t pixel_mask[3]
Definition: vvc_alf.c:33
size
int size
Definition: twinvq_data.h:10344