Go to the documentation of this file.
   33 static const uint32_t 
pixel_mask[] = { 0xffffffff, 0x03ff03ff, 0x0fff0fff, 0x3fff3fff, 0xffffffff };
 
   34 static const int sizes[] = { 2, 4, 8, 16, 32, 64, 128 };
 
   36 #define SIZEOF_PIXEL ((bit_depth + 7) / 8) 
   37 #define PIXEL_STRIDE (MAX_CTU_SIZE * 2) 
   38 #define EXTRA_BEFORE 3 
   40 #define SRC_EXTRA    (EXTRA_BEFORE + EXTRA_AFTER) * 2 
   41 #define SRC_BUF_SIZE (PIXEL_STRIDE + SRC_EXTRA) * (PIXEL_STRIDE + SRC_EXTRA) 
   42 #define DST_BUF_SIZE (MAX_CTU_SIZE * MAX_CTU_SIZE * 2) 
   43 #define SRC_OFFSET   ((PIXEL_STRIDE + EXTRA_BEFORE * 2) * EXTRA_BEFORE) 
   45 #define randomize_buffers(buf0, buf1, size, mask)           \ 
   48         for (k = 0; k < size; k += 4 / sizeof(*buf0)) {     \ 
   49             uint32_t r = rnd() & mask;                      \ 
   50             AV_WN32A(buf0 + k, r);                          \ 
   51             AV_WN32A(buf1 + k, r);                          \ 
   55 #define randomize_pixels(buf0, buf1, size)                  \ 
   57         uint32_t mask = pixel_mask[(bit_depth - 8) >> 1];   \ 
   58         randomize_buffers(buf0, buf1, size, mask);          \ 
   61 #define randomize_avg_src(buf0, buf1, size)                 \ 
   63         uint32_t mask = 0x3fff3fff;                         \ 
   64         randomize_buffers(buf0, buf1, size, mask);          \ 
   67 #define randomize_prof_src(buf0, buf1, size)                \ 
   69         const int shift   = 14 - bit_depth;                 \ 
   70         const int mask16  = 0x3fff >> shift << shift;       \ 
   71         uint32_t mask = (mask16 << 16) | mask16;            \ 
   72         randomize_buffers(buf0, buf1, size, mask);          \ 
   89         for (
int i = 0; 
i < 2; 
i++) {
 
   90             for (
int j = 0; j < 2; j++) {
 
   94                         const int mx        = 
rnd() % 16;
 
   95                         const int my        = 
rnd() % 16;
 
   99                         switch ((j << 1) | 
i) {
 
  100                             case 0: 
type = 
"put_luma_pixels"; 
break; 
 
  101                             case 1: 
type = 
"put_luma_h"; 
break; 
 
  102                             case 2: 
type = 
"put_luma_v"; 
break; 
 
  103                             case 3: 
type = 
"put_luma_hv"; 
break; 
 
  133         const int8_t *
hf, 
const int8_t *
vf, 
int width);
 
  138         for (
int i = 0; 
i < 2; 
i++) {
 
  139             for (
int j = 0; j < 2; j++) {
 
  149                         switch ((j << 1) | 
i) {
 
  150                             case 0: 
type = 
"put_uni_pixels"; 
break; 
 
  151                             case 1: 
type = 
"put_uni_h"; 
break; 
 
  152                             case 2: 
type = 
"put_uni_v"; 
break; 
 
  153                             case 3: 
type = 
"put_uni_hv"; 
break; 
 
  183         const int height, 
const int8_t *
hf, 
const int8_t *
vf, 
const int width);
 
  188         for (
int i = 0; 
i < 2; 
i++) {
 
  189             for (
int j = 0; j < 2; j++) {
 
  198                         switch ((j << 1) | 
i) {
 
  199                             case 0: 
type = 
"put_chroma_pixels"; 
break; 
 
  200                             case 1: 
type = 
"put_chroma_h"; 
break; 
 
  201                             case 2: 
type = 
"put_chroma_v"; 
break; 
 
  202                             case 3: 
type = 
"put_chroma_hv"; 
break; 
 
  232         const int8_t *
hf, 
const int8_t *
vf, 
int width);
 
  237         for (
int i = 0; 
i < 2; 
i++) {
 
  238             for (
int j = 0; j < 2; j++) {
 
  248                         switch ((j << 1) | 
i) {
 
  249                             case 0: 
type = 
"put_uni_pixels"; 
break; 
 
  250                             case 1: 
type = 
"put_uni_h"; 
break; 
 
  251                             case 2: 
type = 
"put_uni_v"; 
break; 
 
  252                             case 3: 
type = 
"put_uni_hv"; 
break; 
 
  273 #define AVG_SRC_BUF_SIZE (MAX_CTU_SIZE * MAX_CTU_SIZE) 
  274 #define AVG_DST_BUF_SIZE (MAX_PB_SIZE * MAX_PB_SIZE * 2) 
  309                         int denom, 
int w0, 
int w1, 
int o0, 
int o1);
 
  311                         const int denom = 
rnd() % 8;
 
  312                         const int w0    = 
rnd() % 256 - 128;
 
  313                         const int w1    = 
rnd() % 256 - 128;
 
  314                         const int o0    = 
rnd() % 256 - 128;
 
  315                         const int o1    = 
rnd() % 256 - 128;
 
  320                             call_ref(dst0, 
MAX_CTU_SIZE * 
SIZEOF_PIXEL, src00, src01, 
w, 
h, denom, w0, w1, o0, o1);
 
  321                             call_new(dst1, 
MAX_CTU_SIZE * 
SIZEOF_PIXEL, src10, src11, 
w, 
h, denom, w0, w1, o0, o1);
 
  325                                 bench_new(dst0, 
MAX_CTU_SIZE * 
SIZEOF_PIXEL, src00, src01, 
w, 
h, denom, w0, w1, o0, o1);
 
  342     const int dst_stride = 
MAX_PB_SIZE * 
sizeof(int16_t);
 
  351         for (
int i = 0; 
i < 2; 
i++) {
 
  352             for (
int j = 0; j < 2; j++) {
 
  353                 for (
int h = 8; 
h <= 16; 
h *= 2) {
 
  354                     for (
int w = 8; 
w <= 16; 
w *= 2) {
 
  364                         switch ((j << 1) | 
i) {
 
  365                             case 0: 
type = 
"dmvr";    
break; 
 
  366                             case 1: 
type = 
"dmvr_h";  
break; 
 
  367                             case 2: 
type = 
"dmvr_v";  
break; 
 
  368                             case 3: 
type = 
"dmvr_hv"; 
break; 
 
  376                             for (
int k = 0; k < 
pred_h; k++) {
 
  377                                 if (memcmp(dst0 + k * dst_stride, dst1 + k * dst_stride, pred_w * 
sizeof(int16_t))) {
 
  393 #define BDOF_BLOCK_SIZE 16 
  394 #define BDOF_SRC_SIZE   (MAX_PB_SIZE* (BDOF_BLOCK_SIZE + 2)) 
  395 #define BDOF_SRC_OFFSET (MAX_PB_SIZE + 1) 
  396 #define BDOF_DST_SIZE   (BDOF_BLOCK_SIZE * BDOF_BLOCK_SIZE * 2) 
  407     declare_func(
void, uint8_t *
dst, ptrdiff_t dst_stride, 
const int16_t *
src0, 
const int16_t *
src1, 
int block_w, 
int block_h);
 
  415         for (
int h = 8; 
h <= 16; 
h *= 2) {
 
  416             for (
int w = 8; 
w <= 16; 
w *= 2) {
 
  440     declare_func(
int, 
const int16_t *
src0, 
const int16_t *
src1, 
int dx, 
int dy, 
int block_w, 
int block_h);
 
  444     for (
int h = 8; 
h <= 16; 
h *= 2) {
 
  445         for (
int w = 8; 
w <= 16; 
w *= 2) {
 
  446             for(
int offy = 0; offy <= 4; offy++) {
 
  447                 for(
int offx = 0; offx <= 4; offx++) {
 
  458                         if (result1 != result0)
 
  460                         if(offx == 0 && offy == 0)
 
  
static void check_bdof(void)
 
const int8_t ff_vvc_inter_chroma_filters[VVC_INTER_CHROMA_FILTER_TYPES][VVC_INTER_CHROMA_FACTS][VVC_INTER_CHROMA_TAPS]
 
#define randomize_prof_src(buf0, buf1, size)
 
static void check_vvc_sad(void)
 
static void check_put_vvc_chroma_uni(void)
 
#define check_func(func,...)
 
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
 
static void check_put_vvc_luma_uni(void)
 
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t mx
 
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 type
 
#define VVC_INTER_CHROMA_FACTS
 
static void check_avg(void)
 
#define VVC_INTER_LUMA_DMVR_FACTS
 
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t my
 
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t const uint8_t ptrdiff_t srcstride
 
#define LOCAL_ALIGNED_32(t, v,...)
 
static void FUNC() pred_h(uint8_t *_src, const uint8_t *_left, const int w, const int h, const ptrdiff_t stride)
 
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
 
const int8_t ff_vvc_inter_luma_filters[VVC_INTER_LUMA_FILTER_TYPES][VVC_INTER_LUMA_FACTS][VVC_INTER_LUMA_TAPS]
 
static const uint32_t pixel_mask[]
 
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
 
#define VVC_INTER_LUMA_FILTER_TYPES
 
void ff_vvc_dsp_init(VVCDSPContext *vvcdsp, int bit_depth)
 
#define randomize_avg_src(buf0, buf1, size)
 
#define VVC_INTER_LUMA_FACTS
 
#define i(width, name, range_min, range_max)
 
static void check_put_vvc_luma(void)
 
uint8_t ptrdiff_t const uint8_t ptrdiff_t int const int8_t * hf
 
#define VVC_INTER_CHROMA_FILTER_TYPES
 
static void check_put_vvc_chroma(void)
 
static void check_dmvr(void)
 
#define randomize_pixels(buf0, buf1, size)
 
#define declare_func(ret,...)
 
void checkasm_check_vvc_mc(void)
 
uint8_t ptrdiff_t const uint8_t ptrdiff_t int const int8_t const int8_t * vf