FFmpeg  4.0
Macros | Functions | Variables
hevc_sao.c File Reference
#include <string.h>
#include "libavutil/intreadwrite.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/hevcdsp.h"
#include "checkasm.h"

Go to the source code of this file.

Macros

#define SIZEOF_PIXEL   ((bit_depth + 7) / 8)
 
#define PIXEL_STRIDE   (2*MAX_PB_SIZE + AV_INPUT_BUFFER_PADDING_SIZE)
 
#define BUF_SIZE   (PIXEL_STRIDE * (64+2) * 2)
 
#define OFFSET_THRESH   (1 << (bit_depth - 5))
 
#define OFFSET_LENGTH   5
 
#define randomize_buffers(buf0, buf1, size)
 
#define randomize_buffers2(buf, size)
 

Functions

static void check_sao_band (HEVCDSPContext h, int bit_depth)
 
static void check_sao_edge (HEVCDSPContext h, int bit_depth)
 
void checkasm_check_hevc_sao (void)
 

Variables

static const uint32_t pixel_mask [3] = { 0xffffffff, 0x03ff03ff, 0x0fff0fff }
 
static const uint32_t sao_size [5] = {8, 16, 32, 48, 64}
 

Macro Definition Documentation

◆ SIZEOF_PIXEL

#define SIZEOF_PIXEL   ((bit_depth + 7) / 8)

Definition at line 34 of file hevc_sao.c.

Referenced by check_sao_band(), and check_sao_edge().

◆ PIXEL_STRIDE

#define PIXEL_STRIDE   (2*MAX_PB_SIZE + AV_INPUT_BUFFER_PADDING_SIZE)

Definition at line 35 of file hevc_sao.c.

Referenced by check_sao_band(), and check_sao_edge().

◆ BUF_SIZE

#define BUF_SIZE   (PIXEL_STRIDE * (64+2) * 2)

Definition at line 36 of file hevc_sao.c.

Referenced by check_sao_band(), and check_sao_edge().

◆ OFFSET_THRESH

#define OFFSET_THRESH   (1 << (bit_depth - 5))

Definition at line 37 of file hevc_sao.c.

◆ OFFSET_LENGTH

#define OFFSET_LENGTH   5

Definition at line 38 of file hevc_sao.c.

Referenced by check_sao_band(), and check_sao_edge().

◆ randomize_buffers

#define randomize_buffers (   buf0,
  buf1,
  size 
)
Value:
do { \
uint32_t mask = pixel_mask[(bit_depth - 8) >> 1]; \
int k; \
for (k = 0; k < size; k += 4) { \
uint32_t r = rnd() & mask; \
AV_WN32A(buf0 + k, r); \
AV_WN32A(buf1 + k, r); \
} \
} while (0)
int size
static const uint16_t mask[17]
Definition: lzw.c:38
const char * r
Definition: vf_curves.c:111
static void bit_depth(AudioStatsContext *s, uint64_t mask, uint64_t imask, AVRational *depth)
Definition: af_astats.c:152
static const uint32_t pixel_mask[3]
Definition: hevc_sao.c:31
#define rnd()
Definition: checkasm.h:100

Definition at line 40 of file hevc_sao.c.

Referenced by check_sao_band(), and check_sao_edge().

◆ randomize_buffers2

#define randomize_buffers2 (   buf,
  size 
)
Value:
do { \
uint32_t max_offset = OFFSET_THRESH; \
int k; \
if (bit_depth == 8) { \
for (k = 0; k < size; k++) { \
uint8_t r = rnd() % max_offset; \
buf[k] = r; \
} \
} else { \
for (k = 0; k < size; k++) { \
uint16_t r = rnd() % max_offset; \
buf[k] = r; \
} \
} \
} while (0)
int size
#define OFFSET_THRESH
Definition: hevc_sao.c:37
const char * r
Definition: vf_curves.c:111
static void bit_depth(AudioStatsContext *s, uint64_t mask, uint64_t imask, AVRational *depth)
Definition: af_astats.c:152
#define rnd()
Definition: checkasm.h:100

Definition at line 51 of file hevc_sao.c.

Referenced by check_sao_band(), and check_sao_edge().

Function Documentation

◆ check_sao_band()

static void check_sao_band ( HEVCDSPContext  h,
int  bit_depth 
)
static

Definition at line 68 of file hevc_sao.c.

Referenced by checkasm_check_hevc_sao().

◆ check_sao_edge()

static void check_sao_edge ( HEVCDSPContext  h,
int  bit_depth 
)
static

Definition at line 99 of file hevc_sao.c.

Referenced by checkasm_check_hevc_sao().

◆ checkasm_check_hevc_sao()

void checkasm_check_hevc_sao ( void  )

Definition at line 131 of file hevc_sao.c.

Variable Documentation

◆ pixel_mask

const uint32_t pixel_mask[3] = { 0xffffffff, 0x03ff03ff, 0x0fff0fff }
static

Definition at line 31 of file hevc_sao.c.

◆ sao_size

const uint32_t sao_size[5] = {8, 16, 32, 48, 64}
static

Definition at line 32 of file hevc_sao.c.

Referenced by check_sao_band(), and check_sao_edge().