29static const uint32_t
pixel_mask[3] = { 0xffffffff, 0x03ff03ff, 0x0fff0fff };
31#define SIZEOF_PIXEL ((bit_depth + 7) / 8)
32#define BUF_STRIDE (16 * 2)
35#define BUF_OFFSET (2 * BUF_STRIDE * BUF_LINES)
36#define BUF_SIZE (2 * BUF_STRIDE * BUF_LINES + BUF_OFFSET * 2)
38#define randomize_buffers(buf0, buf1, size) \
40 uint32_t mask = pixel_mask[(bit_depth - 8) >> 1]; \
42 for (k = 0; k < size; k += 4) { \
43 uint32_t r = rnd() & mask; \
44 AV_WN32A(buf0 + k, r); \
45 AV_WN32A(buf1 + k, r); \
55 uint8_t no_p[2] = {
rnd() &
c,
rnd() &
c };
56 uint8_t no_q[2] = {
rnd() &
c,
rnd() &
c };
61 const int32_t *tc,
const uint8_t *no_p,
const uint8_t *no_q);
63 if (
check_func(
c ?
h->hevc_h_loop_filter_chroma_c :
h->hevc_h_loop_filter_chroma,
64 "hevc_h_loop_filter_chroma%d%s",
bit_depth,
c ?
"_full" :
""))
75 if (
check_func(
c ?
h->hevc_v_loop_filter_chroma_c :
h->hevc_v_loop_filter_chroma,
76 "hevc_v_loop_filter_chroma%d%s",
bit_depth,
c ?
"_full" :
""))
88#define P3 buf[-4 * xstride]
89#define P2 buf[-3 * xstride]
90#define P1 buf[-2 * xstride]
91#define P0 buf[-1 * xstride]
92#define Q0 buf[0 * xstride]
93#define Q1 buf[1 * xstride]
94#define Q2 buf[2 * xstride]
95#define Q3 buf[3 * xstride]
97#define TC25(x) ((tc[x] * 5 + 1) >> 1)
98#define MASK(x) (uint16_t)(x & ((1 << (bit_depth)) - 1))
99#define GET(x) ((SIZEOF_PIXEL == 1) ? *(uint8_t*)(&x) : *(uint16_t*)(&x))
100#define SET(x, y) do { \
101 uint16_t z = MASK(y); \
102 if (SIZEOF_PIXEL == 1) \
103 *(uint8_t*)(&x) = z; \
105 *(uint16_t*)(&x) = z; \
107#define RANDCLIP(x, diff) av_clip(GET(x) - (diff), 0, \
108 (1 << (bit_depth)) - 1) + rnd() % FFMAX(2 * (diff), 1)
119 uint8_t *buf, ptrdiff_t xstride, ptrdiff_t ystride,
int bit_depth)
121 int i, j,
b3, tc25, tc25diff, b3diff;
124 tc[0] = (
rnd() % 25) + 1;
125 tc[1] = (
rnd() % 25) + 1;
127 *beta = (
rnd() % 57) + 8;
131 for (j = 0; j < 2; j++) {
133 tc25diff =
FFMAX(tc25 - 1, 0);
135 for (
i = 0;
i < 4;
i++) {
165 for (j = 0; j < 2; j++) {
167 tc25diff =
FFMAX(tc25 - 1, 0);
169 for (
i = 0;
i < 4;
i++) {
180 (tc25diff >> 1) * (
P0 < (1 << (
bit_depth - 1))) ? 1 : -1);
207 for (
i = 0;
i < 8;
i++) {
220 const char *types[3] = {
"strong",
"weak",
"skip" };
223 uint8_t no_p[2] = {
rnd() &
c,
rnd() &
c };
224 uint8_t no_q[2] = {
rnd() &
c,
rnd() &
c };
231 const int32_t *tc,
const uint8_t *no_p,
const uint8_t *no_q);
234 for (
int j = 0; j < 3; j++) {
236 if (
check_func(
c ?
h->hevc_h_loop_filter_luma_c :
h->hevc_h_loop_filter_luma,
237 "hevc_h_loop_filter_luma%d_%s%s",
bit_depth,
type,
c ?
"_full" :
""))
249 if (
check_func(
c ?
h->hevc_v_loop_filter_luma_c :
h->hevc_v_loop_filter_luma,
250 "hevc_v_loop_filter_luma%d_%s%s",
bit_depth,
type,
c ?
"_full" :
""))
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
#define i(width, name, range_min, range_max)
void ff_hevc_dsp_init(HEVCDSPContext *hevcdsp, int bit_depth)
static void randomize_luma_buffers(int type, int *beta, int32_t tc[2], uint8_t *buf, ptrdiff_t xstride, ptrdiff_t ystride, int bit_depth)
#define RANDCLIP(x, diff)
static void check_deblock_chroma(HEVCDSPContext *h, int bit_depth, int c)
#define randomize_buffers(buf0, buf1, size)
void checkasm_check_hevc_deblock(void)
static void check_deblock_luma(HEVCDSPContext *h, int bit_depth, int c)
Utility Preprocessor macros.
#define LOCAL_ALIGNED_32(t, v,...)
static const uint32_t pixel_mask[5]
static double b3(void *priv, double x, double y)