30static const uint32_t
pixel_mask[3] = { 0xffffffff, 0x03ff03ff, 0x0fff0fff };
31static const uint32_t
sao_size[] = {8, 16, 32, 48, 64, 80, 96, 112, 128};
33#define SIZEOF_PIXEL ((bit_depth + 7) / 8)
34#define PIXEL_STRIDE (2*MAX_CTU_SIZE + AV_INPUT_BUFFER_PADDING_SIZE)
35#define BUF_SIZE (PIXEL_STRIDE * (MAX_CTU_SIZE+2) * 2)
36#define OFFSET_THRESH (1 << (bit_depth - 5))
37#define OFFSET_LENGTH 5
39#define randomize_buffers(buf0, buf1, size) \
41 uint32_t mask = pixel_mask[(bit_depth - 8) >> 1]; \
43 for (k = 0; k < size; k += 4) { \
44 uint32_t r = rnd() & mask; \
45 AV_WN32A(buf0 + k, r); \
46 AV_WN32A(buf1 + k, r); \
50#define randomize_buffers2(buf, size) \
52 uint32_t max_offset = OFFSET_THRESH; \
54 if (bit_depth == 8) { \
55 for (k = 0; k < size; k++) { \
56 uint8_t r = rnd() % max_offset; \
60 for (k = 0; k < size; k++) { \
61 uint16_t r = rnd() % max_offset; \
74 const int left_class =
rnd()%32;
75 const int walign = 16;
79 const int prev_size =
i > 0 ?
sao_size[
i - 1] : 0;
81 declare_func(
void, uint8_t *
dst,
const uint8_t *
src, ptrdiff_t dst_stride, ptrdiff_t src_stride,
82 const int16_t *sao_offset_val,
int sao_left_class,
int width,
int height);
86 for (
int w = prev_size + 4;
w <= block_size;
w += 4) {
108 const int eo =
rnd()%4;
109 const int walign = 16;
116 const int16_t *sao_offset_val,
int eo,
int width,
int height);
119 for (
int w = prev_size + 4;
w <= block_size;
w += 4) {
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
#define i(width, name, range_min, range_max)
#define CLEAR_PIXEL_RECT(name)
#define checkasm_check_pixel_padded_align(...)
#define PIXEL_RECT(name, w, h)
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding.
static const uint32_t sao_size[5]
#define LOCAL_ALIGNED_32(t, v,...)
#define FF_ARRAY_ELEMS(a)
static const uint32_t pixel_mask[5]
void ff_vvc_dsp_init(VVCDSPContext *vvcdsp, int bit_depth)
#define randomize_buffers2(buf, size)
#define randomize_buffers(buf0, buf1, size)
void checkasm_check_vvc_sao(void)
static void check_sao_edge(VVCDSPContext *h, int bit_depth)
static void check_sao_band(VVCDSPContext *h, int bit_depth)