FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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

#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().

#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().

#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().

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

Definition at line 37 of file hevc_sao.c.

#define OFFSET_LENGTH   5

Definition at line 38 of file hevc_sao.c.

Referenced by check_sao_band(), and check_sao_edge().

#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)
#define AV_WN32A(p, v)
Definition: intreadwrite.h:538
ptrdiff_t size
Definition: opengl_enc.c:101
static const uint16_t mask[17]
Definition: lzw.c:38
const char * r
Definition: vf_curves.c:114
static void bit_depth(AudioStatsContext *s, uint64_t mask, uint64_t imask, AVRational *depth)
Definition: af_astats.c:155
static const uint32_t pixel_mask[3]
Definition: hevc_sao.c:31
int
#define rnd()
Definition: checkasm.h:101
for(j=16;j >0;--j)

Definition at line 40 of file hevc_sao.c.

Referenced by check_sao_band(), and check_sao_edge().

#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)
#define OFFSET_THRESH
Definition: hevc_sao.c:37
uint8_t
ptrdiff_t size
Definition: opengl_enc.c:101
const char * r
Definition: vf_curves.c:114
static void bit_depth(AudioStatsContext *s, uint64_t mask, uint64_t imask, AVRational *depth)
Definition: af_astats.c:155
void * buf
Definition: avisynth_c.h:690
int
if(ret< 0)
Definition: vf_mcdeint.c:279
#define rnd()
Definition: checkasm.h:101
for(j=16;j >0;--j)

Definition at line 51 of file hevc_sao.c.

Referenced by check_sao_band(), and check_sao_edge().

Function Documentation

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().

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().

void checkasm_check_hevc_sao ( void  )

Definition at line 131 of file hevc_sao.c.

Variable Documentation

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

Definition at line 31 of file hevc_sao.c.

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().