31 static const uint32_t
pixel_mask[3] = { 0xffffffff, 0x03ff03ff, 0x0fff0fff };
32 static const uint32_t
sao_size[5] = {8, 16, 32, 48, 64};
34 #define SIZEOF_PIXEL ((bit_depth + 7) / 8)
35 #define PIXEL_STRIDE (2*MAX_PB_SIZE + AV_INPUT_BUFFER_PADDING_SIZE) //same with sao_edge src_stride
36 #define BUF_SIZE (PIXEL_STRIDE * (64+2) * 2) //+2 for top and bottom row, *2 for high bit depth
37 #define OFFSET_THRESH (1 << (bit_depth - 5))
38 #define OFFSET_LENGTH 5
40 #define randomize_buffers(buf0, buf1, size) \
42 uint32_t mask = pixel_mask[(bit_depth - 8) >> 1]; \
44 for (k = 0; k < size; k += 4) { \
45 uint32_t r = rnd() & mask; \
46 AV_WN32A(buf0 + k, r); \
47 AV_WN32A(buf1 + k, r); \
51 #define randomize_buffers2(buf, size) \
53 uint32_t max_offset = OFFSET_THRESH; \
55 if (bit_depth == 8) { \
56 for (k = 0; k < size; k++) { \
57 uint8_t r = rnd() % max_offset; \
61 for (k = 0; k < size; k++) { \
62 uint16_t r = rnd() % max_offset; \
76 int left_class =
rnd()%32;
78 for (i = 0; i <= 4; i++) {
82 int16_t *sao_offset_val,
int sao_left_class,
int width,
int height);
90 call_ref(dst0,
src0, stride, stride, offset_val, left_class, block_size, block_size);
91 call_new(dst1,
src1, stride, stride, offset_val, left_class, block_size, block_size);
94 bench_new(dst1,
src1, stride, stride, offset_val, left_class, block_size, block_size);
109 for (i = 0; i <= 4; i++) {
114 int16_t *sao_offset_val,
int eo,
int width,
int height);
122 call_ref(dst0,
src0 + offset, stride, offset_val, eo, block_size, block_size);
123 call_new(dst1,
src1 + offset, stride, offset_val, eo, block_size, block_size);
126 bench_new(dst1,
src1 + offset, stride, offset_val, eo, block_size, block_size);
135 for (bit_depth = 8; bit_depth <= 12; bit_depth += 2) {
143 for (bit_depth = 8; bit_depth <= 12; bit_depth += 2) {
#define randomize_buffers(buf0, buf1, size)
static void check_sao_band(HEVCDSPContext h, int bit_depth)
void(* sao_edge_filter[5])(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *sao_offset_val, int sao_eo_class, int width, int height)
static const uint8_t offset[127][2]
static void check_sao_edge(HEVCDSPContext h, int bit_depth)
static void bit_depth(AudioStatsContext *s, uint64_t mask, uint64_t imask, AVRational *depth)
#define declare_func_emms(cpu_flags, ret,...)
void(* sao_band_filter[5])(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src, int16_t *sao_offset_val, int sao_left_class, int width, int height)
void ff_hevc_dsp_init(HEVCDSPContext *hevcdsp, int bit_depth)
Libavcodec external API header.
#define AV_CPU_FLAG_MMX
standard MMX
static const uint32_t sao_size[5]
#define check_func(func,...)
static const uint32_t pixel_mask[3]
#define LOCAL_ALIGNED_32(t, v,...)
GLint GLenum GLboolean GLsizei stride
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
#define randomize_buffers2(buf, size)
void checkasm_check_hevc_sao(void)