Libav
Data Structures | Macros | Enumerations | Functions | Variables
hevc.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "libavutil/buffer.h"
#include "libavutil/md5.h"
#include "avcodec.h"
#include "cabac.h"
#include "dsputil.h"
#include "get_bits.h"
#include "hevcdsp.h"
#include "internal.h"
#include "thread.h"
#include "videodsp.h"

Go to the source code of this file.

Data Structures

struct  ShortTermRPS
struct  LongTermRPS
struct  RefPicList
struct  RefPicListTab
struct  HEVCWindow
struct  VUI
struct  PTLCommon
struct  PTL
struct  HEVCVPS
struct  ScalingList
struct  HEVCSPS
struct  HEVCPPS
struct  SliceHeader
struct  CodingTree
struct  CodingUnit
struct  Mv
struct  MvField
struct  NeighbourAvailable
struct  PredictionUnit
struct  TransformTree
struct  TransformUnit
struct  DBParams
struct  HEVCFrame
struct  HEVCNAL
struct  HEVCPredContext
struct  HEVCLocalContext
struct  HEVCContext

Macros

#define MAX_DPB_SIZE   16
#define MAX_REFS   16
#define MAX_SUB_LAYERS   7
 7.4.2.1
#define MAX_VPS_COUNT   16
#define MAX_SPS_COUNT   32
#define MAX_PPS_COUNT   256
#define MAX_SHORT_TERM_RPS_COUNT   64
#define MAX_CU_SIZE   128
#define MAX_TRANSFORM_DEPTH   5
#define MAX_TB_SIZE   32
#define MAX_PB_SIZE   64
#define MAX_LOG2_CTB_SIZE   6
#define MAX_QP   51
#define DEFAULT_INTRA_TC_OFFSET   2
#define HEVC_CONTEXTS   183
#define MRG_MAX_NUM_CANDS   5
#define L0   0
#define L1   1
#define EPEL_EXTRA_BEFORE   1
#define EPEL_EXTRA_AFTER   2
#define EPEL_EXTRA   3
#define EDGE_EMU_BUFFER_STRIDE   80
#define SAMPLE(tab, x, y)   ((tab)[(y) * s->sps->width + (x)])
 Value of the luma sample at position (x, y) in the 2D array tab.
#define SAMPLE_CTB(tab, x, y)   ((tab)[(y) * min_cb_width + (x)])
#define SAMPLE_CBF(tab, x, y)   ((tab)[((y) & ((1<<log2_trafo_size)-1)) * MAX_CU_SIZE + ((x) & ((1<<log2_trafo_size)-1))])
#define IS_IDR(s)   (s->nal_unit_type == NAL_IDR_W_RADL || s->nal_unit_type == NAL_IDR_N_LP)
#define IS_BLA(s)
#define IS_IRAP(s)   (s->nal_unit_type >= 16 && s->nal_unit_type <= 23)
#define FFUDIV(a, b)   (((a) > 0 ? (a) : (a) - (b) + 1) / (b))
#define FFUMOD(a, b)   ((a) - (b) * FFUDIV(a,b))
#define HEVC_FRAME_FLAG_OUTPUT   (1 << 0)
#define HEVC_FRAME_FLAG_SHORT_REF   (1 << 1)
#define HEVC_FRAME_FLAG_LONG_REF   (1 << 2)

Enumerations

enum  NALUnitType {
  NAL_TRAIL_N = 0, NAL_TRAIL_R = 1, NAL_TSA_N = 2, NAL_TSA_R = 3,
  NAL_STSA_N = 4, NAL_STSA_R = 5, NAL_RADL_N = 6, NAL_RADL_R = 7,
  NAL_RASL_N = 8, NAL_RASL_R = 9, NAL_BLA_W_LP = 16, NAL_BLA_W_RADL = 17,
  NAL_BLA_N_LP = 18, NAL_IDR_W_RADL = 19, NAL_IDR_N_LP = 20, NAL_CRA_NUT = 21,
  NAL_VPS = 32, NAL_SPS = 33, NAL_PPS = 34, NAL_AUD = 35,
  NAL_EOS_NUT = 36, NAL_EOB_NUT = 37, NAL_FD_NUT = 38, NAL_SEI_PREFIX = 39,
  NAL_SEI_SUFFIX = 40
}
 Table 7-3: NAL unit type codes. More...
enum  RPSType {
  ST_CURR_BEF = 0, ST_CURR_AFT, ST_FOLL, LT_CURR,
  LT_FOLL, NB_RPS_TYPE
}
enum  SliceType { B_SLICE = 0, P_SLICE = 1, I_SLICE = 2 }
enum  SyntaxElement {
  SAO_MERGE_FLAG = 0, SAO_TYPE_IDX, SAO_EO_CLASS, SAO_BAND_POSITION,
  SAO_OFFSET_ABS, SAO_OFFSET_SIGN, END_OF_SLICE_FLAG, SPLIT_CODING_UNIT_FLAG,
  CU_TRANSQUANT_BYPASS_FLAG, SKIP_FLAG, CU_QP_DELTA, PRED_MODE_FLAG,
  PART_MODE, PCM_FLAG, PREV_INTRA_LUMA_PRED_FLAG, MPM_IDX,
  REM_INTRA_LUMA_PRED_MODE, INTRA_CHROMA_PRED_MODE, MERGE_FLAG, MERGE_IDX,
  INTER_PRED_IDC, REF_IDX_L0, REF_IDX_L1, ABS_MVD_GREATER0_FLAG,
  ABS_MVD_GREATER1_FLAG, ABS_MVD_MINUS2, MVD_SIGN_FLAG, MVP_LX_FLAG,
  NO_RESIDUAL_DATA_FLAG, SPLIT_TRANSFORM_FLAG, CBF_LUMA, CBF_CB_CR,
  TRANSFORM_SKIP_FLAG, LAST_SIGNIFICANT_COEFF_X_PREFIX, LAST_SIGNIFICANT_COEFF_Y_PREFIX, LAST_SIGNIFICANT_COEFF_X_SUFFIX,
  LAST_SIGNIFICANT_COEFF_Y_SUFFIX, SIGNIFICANT_COEFF_GROUP_FLAG, SIGNIFICANT_COEFF_FLAG, COEFF_ABS_LEVEL_GREATER1_FLAG,
  COEFF_ABS_LEVEL_GREATER2_FLAG, COEFF_ABS_LEVEL_REMAINING, COEFF_SIGN_FLAG
}
enum  PartMode {
  PART_2Nx2N = 0, PART_2NxN = 1, PART_Nx2N = 2, PART_NxN = 3,
  PART_2NxnU = 4, PART_2NxnD = 5, PART_nLx2N = 6, PART_nRx2N = 7
}
enum  PredMode { MODE_INTER = 0, MODE_INTRA, MODE_SKIP }
enum  InterPredIdc { PRED_L0 = 0, PRED_L1, PRED_BI }
enum  IntraPredMode {
  INTRA_PLANAR = 0, INTRA_DC, INTRA_ANGULAR_2, INTRA_ANGULAR_3,
  INTRA_ANGULAR_4, INTRA_ANGULAR_5, INTRA_ANGULAR_6, INTRA_ANGULAR_7,
  INTRA_ANGULAR_8, INTRA_ANGULAR_9, INTRA_ANGULAR_10, INTRA_ANGULAR_11,
  INTRA_ANGULAR_12, INTRA_ANGULAR_13, INTRA_ANGULAR_14, INTRA_ANGULAR_15,
  INTRA_ANGULAR_16, INTRA_ANGULAR_17, INTRA_ANGULAR_18, INTRA_ANGULAR_19,
  INTRA_ANGULAR_20, INTRA_ANGULAR_21, INTRA_ANGULAR_22, INTRA_ANGULAR_23,
  INTRA_ANGULAR_24, INTRA_ANGULAR_25, INTRA_ANGULAR_26, INTRA_ANGULAR_27,
  INTRA_ANGULAR_28, INTRA_ANGULAR_29, INTRA_ANGULAR_30, INTRA_ANGULAR_31,
  INTRA_ANGULAR_32, INTRA_ANGULAR_33, INTRA_ANGULAR_34, VERT_PRED,
  HOR_PRED, DC_PRED, DIAG_DOWN_LEFT_PRED, DIAG_DOWN_RIGHT_PRED,
  VERT_RIGHT_PRED, HOR_DOWN_PRED, VERT_LEFT_PRED, HOR_UP_PRED,
  TM_VP8_PRED, LEFT_DC_PRED, TOP_DC_PRED, DC_128_PRED,
  DC_127_PRED, DC_129_PRED, N_INTRA_PRED_MODES
}
enum  SAOType { SAO_NOT_APPLIED = 0, SAO_BAND, SAO_EDGE }
enum  SAOEOClass { SAO_EO_HORIZ = 0, SAO_EO_VERT, SAO_EO_135D, SAO_EO_45D }
enum  ScanType { SCAN_DIAG = 0, SCAN_HORIZ, SCAN_VERT }

Functions

int ff_hevc_decode_short_term_rps (HEVCContext *s, ShortTermRPS *rps, const HEVCSPS *sps, int is_slice_header)
int ff_hevc_decode_nal_vps (HEVCContext *s)
int ff_hevc_decode_nal_sps (HEVCContext *s)
int ff_hevc_decode_nal_pps (HEVCContext *s)
int ff_hevc_decode_nal_sei (HEVCContext *s)
void ff_hevc_clear_refs (HEVCContext *s)
 Mark all frames in DPB as unused for reference.
void ff_hevc_flush_dpb (HEVCContext *s)
 Drop all frames currently in DPB.
int ff_hevc_compute_poc (HEVCContext *s, int poc_lsb)
 Compute POC of the current frame and return it.
RefPicListff_hevc_get_ref_list (HEVCContext *s, HEVCFrame *frame, int x0, int y0)
int ff_hevc_frame_rps (HEVCContext *s)
 Construct the reference picture sets for the current frame.
int ff_hevc_slice_rpl (HEVCContext *s)
 Construct the reference picture list(s) for the current slice.
void ff_hevc_save_states (HEVCContext *s, int ctb_addr_ts)
void ff_hevc_cabac_init (HEVCContext *s, int ctb_addr_ts)
int ff_hevc_sao_merge_flag_decode (HEVCContext *s)
int ff_hevc_sao_type_idx_decode (HEVCContext *s)
int ff_hevc_sao_band_position_decode (HEVCContext *s)
int ff_hevc_sao_offset_abs_decode (HEVCContext *s)
int ff_hevc_sao_offset_sign_decode (HEVCContext *s)
int ff_hevc_sao_eo_class_decode (HEVCContext *s)
int ff_hevc_end_of_slice_flag_decode (HEVCContext *s)
int ff_hevc_cu_transquant_bypass_flag_decode (HEVCContext *s)
int ff_hevc_skip_flag_decode (HEVCContext *s, int x0, int y0, int x_cb, int y_cb)
int ff_hevc_pred_mode_decode (HEVCContext *s)
int ff_hevc_split_coding_unit_flag_decode (HEVCContext *s, int ct_depth, int x0, int y0)
int ff_hevc_part_mode_decode (HEVCContext *s, int log2_cb_size)
int ff_hevc_pcm_flag_decode (HEVCContext *s)
int ff_hevc_prev_intra_luma_pred_flag_decode (HEVCContext *s)
int ff_hevc_mpm_idx_decode (HEVCContext *s)
int ff_hevc_rem_intra_luma_pred_mode_decode (HEVCContext *s)
int ff_hevc_intra_chroma_pred_mode_decode (HEVCContext *s)
int ff_hevc_merge_idx_decode (HEVCContext *s)
int ff_hevc_merge_flag_decode (HEVCContext *s)
int ff_hevc_inter_pred_idc_decode (HEVCContext *s, int nPbW, int nPbH)
int ff_hevc_ref_idx_lx_decode (HEVCContext *s, int num_ref_idx_lx)
int ff_hevc_mvp_lx_flag_decode (HEVCContext *s)
int ff_hevc_no_residual_syntax_flag_decode (HEVCContext *s)
int ff_hevc_abs_mvd_greater0_flag_decode (HEVCContext *s)
int ff_hevc_abs_mvd_greater1_flag_decode (HEVCContext *s)
int ff_hevc_mvd_decode (HEVCContext *s)
int ff_hevc_mvd_sign_flag_decode (HEVCContext *s)
int ff_hevc_split_transform_flag_decode (HEVCContext *s, int log2_trafo_size)
int ff_hevc_cbf_cb_cr_decode (HEVCContext *s, int trafo_depth)
int ff_hevc_cbf_luma_decode (HEVCContext *s, int trafo_depth)
int ff_hevc_transform_skip_flag_decode (HEVCContext *s, int c_idx)
int ff_hevc_last_significant_coeff_x_prefix_decode (HEVCContext *s, int c_idx, int log2_size)
int ff_hevc_last_significant_coeff_y_prefix_decode (HEVCContext *s, int c_idx, int log2_size)
int ff_hevc_last_significant_coeff_suffix_decode (HEVCContext *s, int last_significant_coeff_prefix)
int ff_hevc_significant_coeff_group_flag_decode (HEVCContext *s, int c_idx, int ctx_cg)
int ff_hevc_significant_coeff_flag_decode (HEVCContext *s, int c_idx, int x_c, int y_c, int log2_trafo_size, int scan_idx, int prev_sig)
int ff_hevc_coeff_abs_level_greater1_flag_decode (HEVCContext *s, int c_idx, int ctx_set)
int ff_hevc_coeff_abs_level_greater2_flag_decode (HEVCContext *s, int c_idx, int inc)
int ff_hevc_coeff_abs_level_remaining (HEVCContext *s, int base_level, int rc_rice_param)
int ff_hevc_coeff_sign_flag (HEVCContext *s, uint8_t nb)
int ff_hevc_frame_nb_refs (HEVCContext *s)
 Get the number of candidate references for the current frame.
int ff_hevc_set_new_ref (HEVCContext *s, AVFrame **frame, int poc)
int ff_hevc_output_frame (HEVCContext *s, AVFrame *frame, int flush)
 Find next frame in output order and put a reference to it in frame.
void ff_hevc_unref_frame (HEVCContext *s, HEVCFrame *frame, int flags)
void ff_hevc_set_neighbour_available (HEVCContext *s, int x0, int y0, int nPbW, int nPbH)
void ff_hevc_luma_mv_merge_mode (HEVCContext *s, int x0, int y0, int nPbW, int nPbH, int log2_cb_size, int part_idx, int merge_idx, MvField *mv)
void ff_hevc_luma_mv_mvp_mode (HEVCContext *s, int x0, int y0, int nPbW, int nPbH, int log2_cb_size, int part_idx, int merge_idx, MvField *mv, int mvp_lx_flag, int LX)
void ff_hevc_set_qPy (HEVCContext *s, int xC, int yC, int xBase, int yBase, int log2_cb_size)
void ff_hevc_deblocking_boundary_strengths (HEVCContext *s, int x0, int y0, int log2_trafo_size, int slice_or_tiles_up_boundary, int slice_or_tiles_left_boundary)
int ff_hevc_cu_qp_delta_sign_flag (HEVCContext *s)
int ff_hevc_cu_qp_delta_abs (HEVCContext *s)
void ff_hevc_hls_filter (HEVCContext *s, int x, int y)
void ff_hevc_hls_filters (HEVCContext *s, int x_ctb, int y_ctb, int ctb_size)
void ff_hevc_pps_free (HEVCPPS **ppps)
void ff_hevc_pred_init (HEVCPredContext *hpc, int bit_depth)

Variables

const uint8_t ff_hevc_qpel_extra_before [4]
const uint8_t ff_hevc_qpel_extra_after [4]
const uint8_t ff_hevc_qpel_extra [4]
const uint8_t ff_hevc_diag_scan4x4_x [16]
const uint8_t ff_hevc_diag_scan4x4_y [16]
const uint8_t ff_hevc_diag_scan8x8_x [64]
const uint8_t ff_hevc_diag_scan8x8_y [64]

Macro Definition Documentation

#define MAX_DPB_SIZE   16

Definition at line 41 of file hevc.h.

Referenced by ff_hevc_decode_nal_sps(), and ff_hevc_decode_nal_vps().

#define MAX_REFS   16

Definition at line 42 of file hevc.h.

Referenced by ff_hevc_decode_short_term_rps(), ff_hevc_slice_rpl(), and hls_slice_header().

#define MAX_SUB_LAYERS   7

7.4.2.1

Definition at line 47 of file hevc.h.

Referenced by ff_hevc_decode_nal_sps(), ff_hevc_decode_nal_vps(), and hvcc_parse_ptl().

#define MAX_VPS_COUNT   16

Definition at line 48 of file hevc.h.

Referenced by ff_hevc_decode_nal_sps(), ff_hevc_decode_nal_vps(), and hvcc_write().

#define MAX_SPS_COUNT   32

Definition at line 49 of file hevc.h.

#define MAX_PPS_COUNT   256

Definition at line 50 of file hevc.h.

#define MAX_SHORT_TERM_RPS_COUNT   64

Definition at line 51 of file hevc.h.

Referenced by ff_hevc_decode_nal_sps(), and hvcc_parse_sps().

#define MAX_CU_SIZE   128

Definition at line 52 of file hevc.h.

#define MAX_TRANSFORM_DEPTH   5

Definition at line 55 of file hevc.h.

#define MAX_TB_SIZE   32

Definition at line 57 of file hevc.h.

Referenced by hls_residual_coding(), intra_pred(), and pred_angular().

#define MAX_PB_SIZE   64

Definition at line 58 of file hevc.h.

Referenced by hls_prediction_unit(), and put_hevc_epel_hv().

#define MAX_LOG2_CTB_SIZE   6

Definition at line 59 of file hevc.h.

Referenced by ff_hevc_decode_nal_sps().

#define MAX_QP   51

Definition at line 60 of file hevc.h.

Referenced by deblocking_filter_CTB().

#define DEFAULT_INTRA_TC_OFFSET   2

Definition at line 61 of file hevc.h.

Referenced by chroma_tc().

#define HEVC_CONTEXTS   183

Definition at line 63 of file hevc.h.

Referenced by cabac_init_state(), ff_hevc_save_states(), and load_states().

#define MRG_MAX_NUM_CANDS   5

Definition at line 65 of file hevc.h.

#define L0   0

Definition at line 67 of file hevc.h.

Referenced by hls_prediction_unit(), hls_slice_header(), and pred_weight_table().

#define L1   1
#define EPEL_EXTRA_BEFORE   1

Definition at line 70 of file hevc.h.

Referenced by chroma_mc(), and put_hevc_epel_hv().

#define EPEL_EXTRA_AFTER   2

Definition at line 71 of file hevc.h.

Referenced by chroma_mc().

#define EPEL_EXTRA   3

Definition at line 72 of file hevc.h.

Referenced by chroma_mc(), and put_hevc_epel_hv().

#define EDGE_EMU_BUFFER_STRIDE   80

Definition at line 74 of file hevc.h.

Referenced by chroma_mc(), and luma_mc().

#define SAMPLE (   tab,
  x,
 
)    ((tab)[(y) * s->sps->width + (x)])

Value of the luma sample at position (x, y) in the 2D array tab.

Definition at line 79 of file hevc.h.

Referenced by hls_coding_quadtree().

#define SAMPLE_CTB (   tab,
  x,
 
)    ((tab)[(y) * min_cb_width + (x)])

Definition at line 80 of file hevc.h.

Referenced by ff_hevc_skip_flag_decode(), hls_coding_unit(), and hls_prediction_unit().

#define SAMPLE_CBF (   tab,
  x,
 
)    ((tab)[((y) & ((1<<log2_trafo_size)-1)) * MAX_CU_SIZE + ((x) & ((1<<log2_trafo_size)-1))])

Definition at line 81 of file hevc.h.

Referenced by hls_transform_tree(), and hls_transform_unit().

#define IS_IDR (   s)    (s->nal_unit_type == NAL_IDR_W_RADL || s->nal_unit_type == NAL_IDR_N_LP)

Definition at line 83 of file hevc.h.

Referenced by decode_nal_unit(), and hls_slice_header().

#define IS_BLA (   s)
Value:
(s->nal_unit_type == NAL_BLA_W_RADL || s->nal_unit_type == NAL_BLA_W_LP || \
s->nal_unit_type == NAL_BLA_N_LP)

Definition at line 84 of file hevc.h.

Referenced by decode_nal_unit(), and hls_slice_header().

#define IS_IRAP (   s)    (s->nal_unit_type >= 16 && s->nal_unit_type <= 23)

Definition at line 86 of file hevc.h.

Referenced by hls_slice_header().

#define FFUDIV (   a,
  b 
)    (((a) > 0 ? (a) : (a) - (b) + 1) / (b))

Definition at line 88 of file hevc.h.

#define FFUMOD (   a,
  b 
)    ((a) - (b) * FFUDIV(a,b))

Definition at line 89 of file hevc.h.

Referenced by ff_hevc_set_qPy(), and hls_slice_header().

#define HEVC_FRAME_FLAG_OUTPUT   (1 << 0)

Definition at line 672 of file hevc.h.

Referenced by ff_hevc_output_frame(), and ff_hevc_set_new_ref().

#define HEVC_FRAME_FLAG_SHORT_REF   (1 << 1)

Definition at line 673 of file hevc.h.

Referenced by ff_hevc_clear_refs(), ff_hevc_frame_rps(), ff_hevc_set_new_ref(), and mark_ref().

#define HEVC_FRAME_FLAG_LONG_REF   (1 << 2)

Definition at line 674 of file hevc.h.

Referenced by ff_hevc_clear_refs(), ff_hevc_frame_rps(), and mark_ref().

Enumeration Type Documentation

Table 7-3: NAL unit type codes.

Enumerator:
NAL_TRAIL_N 
NAL_TRAIL_R 
NAL_TSA_N 
NAL_TSA_R 
NAL_STSA_N 
NAL_STSA_R 
NAL_RADL_N 
NAL_RADL_R 
NAL_RASL_N 
NAL_RASL_R 
NAL_BLA_W_LP 
NAL_BLA_W_RADL 
NAL_BLA_N_LP 
NAL_IDR_W_RADL 
NAL_IDR_N_LP 
NAL_CRA_NUT 
NAL_VPS 
NAL_SPS 
NAL_PPS 
NAL_AUD 
NAL_EOS_NUT 
NAL_EOB_NUT 
NAL_FD_NUT 
NAL_SEI_PREFIX 
NAL_SEI_SUFFIX 

Definition at line 94 of file hevc.h.

enum RPSType
Enumerator:
ST_CURR_BEF 
ST_CURR_AFT 
ST_FOLL 
LT_CURR 
LT_FOLL 
NB_RPS_TYPE 

Definition at line 122 of file hevc.h.

enum SliceType
Enumerator:
B_SLICE 
P_SLICE 
I_SLICE 

Definition at line 131 of file hevc.h.

Enumerator:
SAO_MERGE_FLAG 
SAO_TYPE_IDX 
SAO_EO_CLASS 
SAO_BAND_POSITION 
SAO_OFFSET_ABS 
SAO_OFFSET_SIGN 
END_OF_SLICE_FLAG 
SPLIT_CODING_UNIT_FLAG 
CU_TRANSQUANT_BYPASS_FLAG 
SKIP_FLAG 
CU_QP_DELTA 
PRED_MODE_FLAG 
PART_MODE 
PCM_FLAG 
PREV_INTRA_LUMA_PRED_FLAG 
MPM_IDX 
REM_INTRA_LUMA_PRED_MODE 
INTRA_CHROMA_PRED_MODE 
MERGE_FLAG 
MERGE_IDX 
INTER_PRED_IDC 
REF_IDX_L0 
REF_IDX_L1 
ABS_MVD_GREATER0_FLAG 
ABS_MVD_GREATER1_FLAG 
ABS_MVD_MINUS2 
MVD_SIGN_FLAG 
MVP_LX_FLAG 
NO_RESIDUAL_DATA_FLAG 
SPLIT_TRANSFORM_FLAG 
CBF_LUMA 
CBF_CB_CR 
TRANSFORM_SKIP_FLAG 
LAST_SIGNIFICANT_COEFF_X_PREFIX 
LAST_SIGNIFICANT_COEFF_Y_PREFIX 
LAST_SIGNIFICANT_COEFF_X_SUFFIX 
LAST_SIGNIFICANT_COEFF_Y_SUFFIX 
SIGNIFICANT_COEFF_GROUP_FLAG 
SIGNIFICANT_COEFF_FLAG 
COEFF_ABS_LEVEL_GREATER1_FLAG 
COEFF_ABS_LEVEL_GREATER2_FLAG 
COEFF_ABS_LEVEL_REMAINING 
COEFF_SIGN_FLAG 

Definition at line 137 of file hevc.h.

enum PartMode
Enumerator:
PART_2Nx2N 
PART_2NxN 
PART_Nx2N 
PART_NxN 
PART_2NxnU 
PART_2NxnD 
PART_nLx2N 
PART_nRx2N 

Definition at line 183 of file hevc.h.

enum PredMode
Enumerator:
MODE_INTER 
MODE_INTRA 
MODE_SKIP 

Definition at line 194 of file hevc.h.

Enumerator:
PRED_L0 
PRED_L1 
PRED_BI 

Definition at line 200 of file hevc.h.

Enumerator:
INTRA_PLANAR 
INTRA_DC 
INTRA_ANGULAR_2 
INTRA_ANGULAR_3 
INTRA_ANGULAR_4 
INTRA_ANGULAR_5 
INTRA_ANGULAR_6 
INTRA_ANGULAR_7 
INTRA_ANGULAR_8 
INTRA_ANGULAR_9 
INTRA_ANGULAR_10 
INTRA_ANGULAR_11 
INTRA_ANGULAR_12 
INTRA_ANGULAR_13 
INTRA_ANGULAR_14 
INTRA_ANGULAR_15 
INTRA_ANGULAR_16 
INTRA_ANGULAR_17 
INTRA_ANGULAR_18 
INTRA_ANGULAR_19 
INTRA_ANGULAR_20 
INTRA_ANGULAR_21 
INTRA_ANGULAR_22 
INTRA_ANGULAR_23 
INTRA_ANGULAR_24 
INTRA_ANGULAR_25 
INTRA_ANGULAR_26 
INTRA_ANGULAR_27 
INTRA_ANGULAR_28 
INTRA_ANGULAR_29 
INTRA_ANGULAR_30 
INTRA_ANGULAR_31 
INTRA_ANGULAR_32 
INTRA_ANGULAR_33 
INTRA_ANGULAR_34 
VERT_PRED 
HOR_PRED 
DC_PRED 
DIAG_DOWN_LEFT_PRED 
DIAG_DOWN_RIGHT_PRED 
VERT_RIGHT_PRED 
HOR_DOWN_PRED 
VERT_LEFT_PRED 
HOR_UP_PRED 
TM_VP8_PRED 
LEFT_DC_PRED 
TOP_DC_PRED 
DC_128_PRED 
DC_127_PRED 
DC_129_PRED 
N_INTRA_PRED_MODES 

Definition at line 206 of file hevc.h.

enum SAOType
Enumerator:
SAO_NOT_APPLIED 
SAO_BAND 
SAO_EDGE 

Definition at line 244 of file hevc.h.

enum SAOEOClass
Enumerator:
SAO_EO_HORIZ 
SAO_EO_VERT 
SAO_EO_135D 
SAO_EO_45D 

Definition at line 250 of file hevc.h.

enum ScanType
Enumerator:
SCAN_DIAG 
SCAN_HORIZ 
SCAN_VERT 

Definition at line 257 of file hevc.h.

Function Documentation

int ff_hevc_decode_short_term_rps ( HEVCContext s,
ShortTermRPS rps,
const HEVCSPS sps,
int  is_slice_header 
)

Definition at line 73 of file hevc_ps.c.

Referenced by ff_hevc_decode_nal_sps(), and hls_slice_header().

int ff_hevc_decode_nal_vps ( HEVCContext s)

Definition at line 322 of file hevc_ps.c.

Referenced by decode_nal_unit().

int ff_hevc_decode_nal_sps ( HEVCContext s)

Definition at line 608 of file hevc_ps.c.

Referenced by decode_nal_unit().

int ff_hevc_decode_nal_pps ( HEVCContext s)

6.5

Definition at line 984 of file hevc_ps.c.

Referenced by decode_nal_unit().

int ff_hevc_decode_nal_sei ( HEVCContext s)

Definition at line 117 of file hevc_sei.c.

Referenced by decode_nal_unit().

void ff_hevc_clear_refs ( HEVCContext s)

Mark all frames in DPB as unused for reference.

Definition at line 66 of file hevc_refs.c.

Referenced by hls_slice_header().

void ff_hevc_flush_dpb ( HEVCContext s)

Drop all frames currently in DPB.

Definition at line 75 of file hevc_refs.c.

Referenced by hevc_decode_flush().

int ff_hevc_compute_poc ( HEVCContext s,
int  poc_lsb 
)

Compute POC of the current frame and return it.

Definition at line 447 of file hevc_refs.c.

Referenced by hls_slice_header().

RefPicList* ff_hevc_get_ref_list ( HEVCContext s,
HEVCFrame frame,
int  x0,
int  y0 
)

Definition at line 52 of file hevc_refs.c.

Referenced by ff_hevc_deblocking_boundary_strengths().

int ff_hevc_frame_rps ( HEVCContext s)

Construct the reference picture sets for the current frame.

Definition at line 388 of file hevc_refs.c.

Referenced by hevc_frame_start().

int ff_hevc_slice_rpl ( HEVCContext s)

Construct the reference picture list(s) for the current slice.

Definition at line 232 of file hevc_refs.c.

Referenced by decode_nal_unit().

void ff_hevc_save_states ( HEVCContext s,
int  ctb_addr_ts 
)

Definition at line 326 of file hevc_cabac.c.

Referenced by hls_slice_data().

void ff_hevc_cabac_init ( HEVCContext s,
int  ctb_addr_ts 
)

Definition at line 377 of file hevc_cabac.c.

Referenced by hls_slice_data().

int ff_hevc_sao_merge_flag_decode ( HEVCContext s)

Definition at line 417 of file hevc_cabac.c.

Referenced by hls_sao_param().

int ff_hevc_sao_type_idx_decode ( HEVCContext s)

Definition at line 422 of file hevc_cabac.c.

Referenced by hls_sao_param().

int ff_hevc_sao_band_position_decode ( HEVCContext s)

Definition at line 432 of file hevc_cabac.c.

Referenced by hls_sao_param().

int ff_hevc_sao_offset_abs_decode ( HEVCContext s)

Definition at line 442 of file hevc_cabac.c.

Referenced by hls_sao_param().

int ff_hevc_sao_offset_sign_decode ( HEVCContext s)

Definition at line 452 of file hevc_cabac.c.

Referenced by hls_sao_param().

int ff_hevc_sao_eo_class_decode ( HEVCContext s)

Definition at line 457 of file hevc_cabac.c.

Referenced by hls_sao_param().

int ff_hevc_end_of_slice_flag_decode ( HEVCContext s)

Definition at line 464 of file hevc_cabac.c.

Referenced by hls_slice_data().

int ff_hevc_cu_transquant_bypass_flag_decode ( HEVCContext s)

Definition at line 469 of file hevc_cabac.c.

Referenced by hls_coding_unit().

int ff_hevc_skip_flag_decode ( HEVCContext s,
int  x0,
int  y0,
int  x_cb,
int  y_cb 
)

Definition at line 474 of file hevc_cabac.c.

Referenced by hls_coding_unit().

int ff_hevc_pred_mode_decode ( HEVCContext s)

Definition at line 519 of file hevc_cabac.c.

Referenced by hls_coding_unit().

int ff_hevc_split_coding_unit_flag_decode ( HEVCContext s,
int  ct_depth,
int  x0,
int  y0 
)

Definition at line 524 of file hevc_cabac.c.

Referenced by hls_coding_quadtree().

int ff_hevc_part_mode_decode ( HEVCContext s,
int  log2_cb_size 
)

Definition at line 543 of file hevc_cabac.c.

Referenced by hls_coding_unit().

int ff_hevc_pcm_flag_decode ( HEVCContext s)

Definition at line 580 of file hevc_cabac.c.

Referenced by hls_coding_unit().

int ff_hevc_prev_intra_luma_pred_flag_decode ( HEVCContext s)

Definition at line 585 of file hevc_cabac.c.

Referenced by intra_prediction_unit().

int ff_hevc_mpm_idx_decode ( HEVCContext s)

Definition at line 590 of file hevc_cabac.c.

Referenced by intra_prediction_unit().

int ff_hevc_rem_intra_luma_pred_mode_decode ( HEVCContext s)

Definition at line 598 of file hevc_cabac.c.

Referenced by intra_prediction_unit().

int ff_hevc_intra_chroma_pred_mode_decode ( HEVCContext s)

Definition at line 608 of file hevc_cabac.c.

Referenced by intra_prediction_unit().

int ff_hevc_merge_idx_decode ( HEVCContext s)

Definition at line 619 of file hevc_cabac.c.

Referenced by hls_prediction_unit().

int ff_hevc_merge_flag_decode ( HEVCContext s)

Definition at line 630 of file hevc_cabac.c.

Referenced by hls_prediction_unit().

int ff_hevc_inter_pred_idc_decode ( HEVCContext s,
int  nPbW,
int  nPbH 
)

Definition at line 635 of file hevc_cabac.c.

Referenced by hls_prediction_unit().

int ff_hevc_ref_idx_lx_decode ( HEVCContext s,
int  num_ref_idx_lx 
)

Definition at line 645 of file hevc_cabac.c.

Referenced by hls_prediction_unit().

int ff_hevc_mvp_lx_flag_decode ( HEVCContext s)

Definition at line 661 of file hevc_cabac.c.

Referenced by hls_prediction_unit().

int ff_hevc_no_residual_syntax_flag_decode ( HEVCContext s)

Definition at line 666 of file hevc_cabac.c.

Referenced by hls_coding_unit().

int ff_hevc_abs_mvd_greater0_flag_decode ( HEVCContext s)

Definition at line 671 of file hevc_cabac.c.

Referenced by hls_mvd_coding().

int ff_hevc_abs_mvd_greater1_flag_decode ( HEVCContext s)

Definition at line 676 of file hevc_cabac.c.

Referenced by hls_mvd_coding().

int ff_hevc_mvd_decode ( HEVCContext s)

Definition at line 681 of file hevc_cabac.c.

Referenced by hls_mvd_coding().

int ff_hevc_mvd_sign_flag_decode ( HEVCContext s)

Definition at line 697 of file hevc_cabac.c.

Referenced by hls_mvd_coding().

int ff_hevc_split_transform_flag_decode ( HEVCContext s,
int  log2_trafo_size 
)

Definition at line 702 of file hevc_cabac.c.

Referenced by hls_transform_tree().

int ff_hevc_cbf_cb_cr_decode ( HEVCContext s,
int  trafo_depth 
)

Definition at line 707 of file hevc_cabac.c.

Referenced by hls_transform_tree().

int ff_hevc_cbf_luma_decode ( HEVCContext s,
int  trafo_depth 
)

Definition at line 712 of file hevc_cabac.c.

Referenced by hls_transform_tree().

int ff_hevc_transform_skip_flag_decode ( HEVCContext s,
int  c_idx 
)

Definition at line 717 of file hevc_cabac.c.

Referenced by hls_residual_coding().

int ff_hevc_last_significant_coeff_x_prefix_decode ( HEVCContext s,
int  c_idx,
int  log2_size 
)

Definition at line 739 of file hevc_cabac.c.

Referenced by hls_residual_coding().

int ff_hevc_last_significant_coeff_y_prefix_decode ( HEVCContext s,
int  c_idx,
int  log2_size 
)

Definition at line 745 of file hevc_cabac.c.

Referenced by hls_residual_coding().

int ff_hevc_last_significant_coeff_suffix_decode ( HEVCContext s,
int  last_significant_coeff_prefix 
)

Definition at line 751 of file hevc_cabac.c.

Referenced by hls_residual_coding().

int ff_hevc_significant_coeff_group_flag_decode ( HEVCContext s,
int  c_idx,
int  ctx_cg 
)

Definition at line 763 of file hevc_cabac.c.

Referenced by hls_residual_coding().

int ff_hevc_significant_coeff_flag_decode ( HEVCContext s,
int  c_idx,
int  x_c,
int  y_c,
int  log2_trafo_size,
int  scan_idx,
int  prev_sig 
)

Definition at line 772 of file hevc_cabac.c.

Referenced by hls_residual_coding().

int ff_hevc_coeff_abs_level_greater1_flag_decode ( HEVCContext s,
int  c_idx,
int  ctx_set 
)

Definition at line 822 of file hevc_cabac.c.

Referenced by hls_residual_coding().

int ff_hevc_coeff_abs_level_greater2_flag_decode ( HEVCContext s,
int  c_idx,
int  inc 
)

Definition at line 831 of file hevc_cabac.c.

Referenced by hls_residual_coding().

int ff_hevc_coeff_abs_level_remaining ( HEVCContext s,
int  base_level,
int  rc_rice_param 
)

Definition at line 839 of file hevc_cabac.c.

Referenced by hls_residual_coding().

int ff_hevc_coeff_sign_flag ( HEVCContext s,
uint8_t  nb 
)

Definition at line 864 of file hevc_cabac.c.

Referenced by hls_residual_coding().

int ff_hevc_frame_nb_refs ( HEVCContext s)

Get the number of candidate references for the current frame.

Definition at line 470 of file hevc_refs.c.

Referenced by hls_slice_header().

int ff_hevc_set_new_ref ( HEVCContext s,
AVFrame **  frame,
int  poc 
)

Definition at line 122 of file hevc_refs.c.

Referenced by hevc_frame_start().

int ff_hevc_output_frame ( HEVCContext s,
AVFrame frame,
int  flush 
)

Find next frame in output order and put a reference to it in frame.

Returns
1 if a frame was output, 0 otherwise

Definition at line 154 of file hevc_refs.c.

Referenced by hevc_decode_frame(), and hevc_frame_start().

void ff_hevc_unref_frame ( HEVCContext s,
HEVCFrame frame,
int  flags 
)
void ff_hevc_set_neighbour_available ( HEVCContext s,
int  x0,
int  y0,
int  nPbW,
int  nPbH 
)

Definition at line 41 of file hevc_mvs.c.

Referenced by ff_hevc_luma_mv_merge_mode(), hls_prediction_unit(), and hls_transform_unit().

void ff_hevc_luma_mv_merge_mode ( HEVCContext s,
int  x0,
int  y0,
int  nPbW,
int  nPbH,
int  log2_cb_size,
int  part_idx,
int  merge_idx,
MvField mv 
)

Definition at line 528 of file hevc_mvs.c.

Referenced by hls_prediction_unit().

void ff_hevc_luma_mv_mvp_mode ( HEVCContext s,
int  x0,
int  y0,
int  nPbW,
int  nPbH,
int  log2_cb_size,
int  part_idx,
int  merge_idx,
MvField mv,
int  mvp_lx_flag,
int  LX 
)

Definition at line 626 of file hevc_mvs.c.

Referenced by hls_prediction_unit().

void ff_hevc_set_qPy ( HEVCContext s,
int  xC,
int  yC,
int  xBase,
int  yBase,
int  log2_cb_size 
)

Definition at line 154 of file hevc_filter.c.

Referenced by hls_coding_unit(), and hls_transform_unit().

void ff_hevc_deblocking_boundary_strengths ( HEVCContext s,
int  x0,
int  y0,
int  log2_trafo_size,
int  slice_or_tiles_up_boundary,
int  slice_or_tiles_left_boundary 
)

Definition at line 585 of file hevc_filter.c.

Referenced by hls_coding_unit(), hls_pcm_sample(), and hls_transform_tree().

int ff_hevc_cu_qp_delta_sign_flag ( HEVCContext s)

Definition at line 514 of file hevc_cabac.c.

Referenced by hls_transform_unit().

int ff_hevc_cu_qp_delta_abs ( HEVCContext s)

Definition at line 489 of file hevc_cabac.c.

Referenced by hls_transform_unit().

void ff_hevc_hls_filter ( HEVCContext s,
int  x,
int  y 
)

Definition at line 728 of file hevc_filter.c.

Referenced by ff_hevc_hls_filters(), and hls_slice_data().

void ff_hevc_hls_filters ( HEVCContext s,
int  x_ctb,
int  y_ctb,
int  ctb_size 
)

Definition at line 735 of file hevc_filter.c.

Referenced by hls_slice_data().

void ff_hevc_pps_free ( HEVCPPS **  ppps)
void ff_hevc_pred_init ( HEVCPredContext hpc,
int  bit_depth 
)

Definition at line 37 of file hevcpred.c.

Referenced by set_sps().

Variable Documentation

const uint8_t ff_hevc_qpel_extra_before[4]

Definition at line 40 of file hevc.c.

Referenced by luma_mc().

const uint8_t ff_hevc_qpel_extra_after[4]

Definition at line 41 of file hevc.c.

Referenced by luma_mc().

const uint8_t ff_hevc_qpel_extra[4]

Definition at line 42 of file hevc.c.

Referenced by luma_mc().

const uint8_t ff_hevc_diag_scan4x4_x[16]

Definition at line 84 of file hevc.c.

Referenced by hls_residual_coding(), and scaling_list_data().

const uint8_t ff_hevc_diag_scan4x4_y[16]

Definition at line 91 of file hevc.c.

Referenced by hls_residual_coding(), and scaling_list_data().

const uint8_t ff_hevc_diag_scan8x8_x[64]

Definition at line 105 of file hevc.c.

Referenced by hls_residual_coding(), and scaling_list_data().

const uint8_t ff_hevc_diag_scan8x8_y[64]

Definition at line 124 of file hevc.c.

Referenced by hls_residual_coding(), and scaling_list_data().