Go to the documentation of this file.
33 static const uint32_t
pixel_mask[3] = { 0xffffffff, 0x03ff03ff, 0x0fff0fff };
35 #define SIZEOF_PIXEL ((bit_depth + 7) / 8)
36 #define SRC_PIXEL_STRIDE (MAX_CTU_SIZE + 2 * ALF_PADDING_SIZE)
37 #define DST_PIXEL_STRIDE (SRC_PIXEL_STRIDE + 4)
38 #define SRC_BUF_SIZE (SRC_PIXEL_STRIDE * (MAX_CTU_SIZE + 3 * 2) * 2) //+3 * 2 for top and bottom row, *2 for high bit depth
39 #define DST_BUF_SIZE (DST_PIXEL_STRIDE * (MAX_CTU_SIZE + 3 * 2) * 2)
40 #define LUMA_PARAMS_SIZE (MAX_CTU_SIZE * MAX_CTU_SIZE / ALF_BLOCK_SIZE / ALF_BLOCK_SIZE * ALF_NUM_COEFF_LUMA)
42 #define randomize_buffers(buf0, buf1, size) \
44 uint32_t mask = pixel_mask[(bit_depth - 8) >> 1]; \
46 for (k = 0; k < size; k += 4) { \
47 uint32_t r = rnd() & mask; \
48 AV_WN32A(buf0 + k, r); \
49 AV_WN32A(buf1 + k, r); \
53 #define randomize_buffers2(buf, size, filter) \
57 for (k = 0; k < size; k++) { \
62 for (k = 0; k < size; k++) { \
63 int r = rnd() % FF_ARRAY_ELEMS(clip_set); \
64 buf[k] = clip_set[r]; \
86 const int16_t clip_set[] = {
94 declare_func(
void, uint8_t *
dst, ptrdiff_t dst_stride,
const uint8_t *
src, ptrdiff_t src_stride,
104 if (!(
w % 8) && !(
h % 8)) {
111 for (
int i = 0;
i < (
h + 1);
i++) {
112 if (memcmp(dst0 +
i * dst_stride, dst1 +
i * dst_stride, (
w + 1) *
SIZEOF_PIXEL))
116 if (
w ==
h && (
w & (
w - 1)) == 0)
121 if ((
w <= 64 || !(
w % 8)) && (
h <= 64 || !(
h % 8))) {
128 for (
int i = 0;
i < (
h + 1);
i++) {
129 if (memcmp(dst0 +
i * dst_stride, dst1 +
i * dst_stride, (
w + 1) *
SIZEOF_PIXEL))
132 if (
w ==
h && (
w & (
w - 1)) == 0)
154 const uint8_t *
src, ptrdiff_t src_stride,
int width,
int height,
int vb_pos,
int *gradient_tmp);
164 memset(class_idx0, 0, id_size);
165 memset(class_idx1, 0, id_size);
166 memset(transpose_idx0, 0, id_size);
167 memset(transpose_idx1, 0, id_size);
172 if (memcmp(class_idx0, class_idx1, id_size))
174 if (memcmp(transpose_idx0, transpose_idx1, id_size))
177 if (
w ==
h && (
w & (
w - 1)) == 0)
#define ALF_VB_POS_ABOVE_LUMA
#define ALF_GRADIENT_SIZE
#define check_func(func,...)
void(* filter)(uint8_t *src, int stride, int qscale)
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
#define randomize_buffers2(buf, size, filter)
#define randomize_buffers(buf0, buf1, size)
static int get_alf_vb_pos(const int h, const int vb_pos_above)
static void check_alf_classify(VVCDSPContext *c, const int bit_depth)
static void check_alf_filter(VVCDSPContext *c, const int bit_depth)
static const uint32_t pixel_mask[3]
#define LOCAL_ALIGNED_32(t, v,...)
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
void checkasm_check_vvc_alf(void)
void ff_vvc_dsp_init(VVCDSPContext *vvcdsp, int bit_depth)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
#define i(width, name, range_min, range_max)
#define declare_func(ret,...)
#define ALF_VB_POS_ABOVE_CHROMA