FFmpeg
Loading...
Searching...
No Matches
hevcdec.h File Reference
#include <stdatomic.h>
#include "libavutil/buffer.h"
#include "libavutil/mem_internal.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/bswapdsp.h"
#include "libavcodec/cabac.h"
#include "libavcodec/dovi_rpu.h"
#include "libavcodec/h2645_parse.h"
#include "libavcodec/progressframe.h"
#include "libavcodec/videodsp.h"
#include "dsp.h"
#include "hevc.h"
#include "pred.h"
#include "ps.h"
#include "sei.h"

Go to the source code of this file.

Data Structures

struct  HEVCCABACState
 
struct  LongTermRPS
 
struct  RefPicList
 
struct  RefPicListTab
 
struct  SliceHeader
 
struct  CodingUnit
 
struct  Mv
 
struct  MvField
 
struct  NeighbourAvailable
 
struct  PredictionUnit
 
struct  TransformUnit
 
struct  DBParams
 
struct  HEVCFrame
 
struct  HEVCSubstream
 
struct  HEVCLocalContext
 
struct  HEVCLayerContext
 
struct  HEVCTileSlice
 
struct  HEVCTileStream
 
struct  HEVCContext
 

Macros

#define SHIFT_CTB_WPP   2
 
#define MAX_TB_SIZE   32
 
#define MAX_QP   51
 
#define DEFAULT_INTRA_TC_OFFSET   2
 
#define HEVC_CONTEXTS   199
 
#define HEVC_STAT_COEFFS   4
 
#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 QPEL_EXTRA_BEFORE   3
 
#define QPEL_EXTRA_AFTER   4
 
#define QPEL_EXTRA   7
 
#define EDGE_EMU_BUFFER_STRIDE   80
 
#define SAMPLE(tab, x, y)
 Value of the luma sample at position (x, y) in the 2D array tab.
 
#define SAMPLE_CTB(tab, x, y)
 
#define IS_IDR_TYPE(t)
 
#define IS_IDR(s)
 
#define IS_BLA(s)
 
#define IS_IRAP(s)
 
#define HEVC_RECOVERY_UNSPECIFIED   INT_MAX
 
#define HEVC_RECOVERY_END   INT_MIN
 
#define HEVC_IS_RECOVERING(s)
 
#define HEVC_FRAME_FLAG_OUTPUT   (1 << 0)
 
#define HEVC_FRAME_FLAG_SHORT_REF   (1 << 1)
 
#define HEVC_FRAME_FLAG_LONG_REF   (1 << 2)
 
#define HEVC_FRAME_FLAG_UNAVAILABLE   (1 << 3)
 
#define HEVC_FRAME_FLAG_CORRUPT   (1 << 4)
 
#define BOUNDARY_LEFT_SLICE   (1 << 0)
 
#define BOUNDARY_LEFT_TILE   (1 << 1)
 
#define BOUNDARY_UPPER_SLICE   (1 << 2)
 
#define BOUNDARY_UPPER_TILE   (1 << 3)
 

Enumerations

enum  RPSType {
  ST_CURR_BEF = 0 , ST_CURR_AFT , ST_FOLL , LT_CURR ,
  LT_FOLL , INTER_LAYER0 , INTER_LAYER1 , NB_RPS_TYPE
}
 
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  PredFlag { PF_INTRA = 0 , PF_L0 , PF_L1 , PF_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
}
 
enum  SAOType { SAO_NOT_APPLIED = 0 , SAO_BAND , SAO_EDGE , SAO_APPLIED }
 
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

void ff_hevc_clear_refs (HEVCLayerContext *l)
 Mark all frames in DPB as unused for reference.
 
void ff_hevc_flush_dpb (HEVCContext *s)
 Drop all frames currently in DPB.
 
const RefPicList * ff_hevc_get_ref_list (const HEVCFrame *frame, int x0, int y0)
 
int ff_hevc_frame_rps (HEVCContext *s, HEVCLayerContext *l)
 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 (HEVCLocalContext *lc, const HEVCPPS *pps, int ctb_addr_ts)
 
int ff_hevc_cabac_init (HEVCLocalContext *lc, const HEVCPPS *pps, int ctb_addr_ts)
 
int ff_hevc_sao_merge_flag_decode (HEVCLocalContext *lc)
 
int ff_hevc_sao_type_idx_decode (HEVCLocalContext *lc)
 
int ff_hevc_sao_band_position_decode (HEVCLocalContext *lc)
 
int ff_hevc_sao_offset_abs_decode (HEVCLocalContext *lc, int bit_depth)
 
int ff_hevc_sao_offset_sign_decode (HEVCLocalContext *lc)
 
int ff_hevc_sao_eo_class_decode (HEVCLocalContext *lc)
 
int ff_hevc_end_of_slice_flag_decode (HEVCLocalContext *lc)
 
int ff_hevc_cu_transquant_bypass_flag_decode (HEVCLocalContext *lc)
 
int ff_hevc_skip_flag_decode (HEVCLocalContext *lc, uint8_t *skip_flag, int x0, int y0, int x_cb, int y_cb, int min_cb_width)
 
int ff_hevc_pred_mode_decode (HEVCLocalContext *lc)
 
int ff_hevc_split_coding_unit_flag_decode (HEVCLocalContext *lc, uint8_t *tab_ct_depth, const HEVCSPS *sps, int ct_depth, int x0, int y0)
 
int ff_hevc_part_mode_decode (HEVCLocalContext *lc, const HEVCSPS *sps, int log2_cb_size)
 
int ff_hevc_pcm_flag_decode (HEVCLocalContext *lc)
 
int ff_hevc_prev_intra_luma_pred_flag_decode (HEVCLocalContext *lc)
 
int ff_hevc_mpm_idx_decode (HEVCLocalContext *lc)
 
int ff_hevc_rem_intra_luma_pred_mode_decode (HEVCLocalContext *lc)
 
int ff_hevc_intra_chroma_pred_mode_decode (HEVCLocalContext *lc)
 
int ff_hevc_merge_idx_decode (HEVCLocalContext *lc)
 
int ff_hevc_merge_flag_decode (HEVCLocalContext *lc)
 
int ff_hevc_inter_pred_idc_decode (HEVCLocalContext *lc, int nPbW, int nPbH)
 
int ff_hevc_ref_idx_lx_decode (HEVCLocalContext *lc, int num_ref_idx_lx)
 
int ff_hevc_mvp_lx_flag_decode (HEVCLocalContext *lc)
 
int ff_hevc_no_residual_syntax_flag_decode (HEVCLocalContext *lc)
 
int ff_hevc_split_transform_flag_decode (HEVCLocalContext *lc, int log2_trafo_size)
 
int ff_hevc_cbf_cb_cr_decode (HEVCLocalContext *lc, int trafo_depth)
 
int ff_hevc_cbf_luma_decode (HEVCLocalContext *lc, int trafo_depth)
 
int ff_hevc_log2_res_scale_abs (HEVCLocalContext *lc, int idx)
 
int ff_hevc_res_scale_sign_flag (HEVCLocalContext *lc, int idx)
 
int ff_hevc_frame_nb_refs (const SliceHeader *sh, const HEVCPPS *pps, unsigned layer_idx)
 Get the number of candidate references for the current frame.
 
int ff_hevc_set_new_ref (HEVCContext *s, HEVCLayerContext *l, int poc)
 
static av_always_inline int ff_hevc_nal_is_nonref (enum HEVCNALUnitType type)
 
int ff_hevc_output_frames (HEVCContext *s, unsigned layers_active_decode, unsigned layers_active_output, unsigned max_output, unsigned max_dpb, int discard)
 Find frames in the DPB that are ready for output and either write them to the output FIFO or drop their output flag, depending on the value of discard.
 
void ff_hevc_unref_frame (HEVCFrame *frame, int flags)
 
void ff_hevc_set_neighbour_available (HEVCLocalContext *lc, int x0, int y0, int nPbW, int nPbH, int log2_ctb_size)
 
void ff_hevc_luma_mv_merge_mode (HEVCLocalContext *lc, const HEVCPPS *pps, 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 (HEVCLocalContext *lc, const HEVCPPS *pps, 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_hls_filter (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, int x, int y, int ctb_size)
 
void ff_hevc_hls_filters (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, int x_ctb, int y_ctb, int ctb_size)
 
void ff_hevc_set_qPy (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, int xBase, int yBase, int log2_cb_size)
 
void ff_hevc_deblocking_boundary_strengths (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, int x0, int y0, int log2_trafo_size)
 
void ff_hevc_ctb_edge_bs (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, int x0, int y0, unsigned edges)
 
int ff_hevc_cu_qp_delta_sign_flag (HEVCLocalContext *lc)
 
int ff_hevc_cu_qp_delta_abs (HEVCLocalContext *lc)
 
int ff_hevc_cu_chroma_qp_offset_flag (HEVCLocalContext *lc)
 
int ff_hevc_cu_chroma_qp_offset_idx (HEVCLocalContext *lc, int chroma_qp_offset_list_len_minus1)
 
void ff_hevc_hls_residual_coding (HEVCLocalContext *lc, const HEVCPPS *pps, int x0, int y0, int log2_trafo_size, enum ScanType scan_idx, int c_idx)
 
void ff_hevc_hls_mvd_coding (HEVCLocalContext *lc, int x0, int y0, int log2_cb_size)
 
int ff_hevc_is_alpha_video (const HEVCContext *s)
 
int ff_hevc_requested_layers (const HEVCContext *s, const HEVCVPS *vps, unsigned *active_output)
 Resolve the caller's view selection into layers.
 

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]
 

Macro Definition Documentation

◆ SHIFT_CTB_WPP

#define SHIFT_CTB_WPP   2

Definition at line 45 of file hevcdec.h.

Referenced by hls_decode_entry_wpp().

◆ MAX_TB_SIZE

#define MAX_TB_SIZE   32

◆ MAX_QP

#define MAX_QP   51

Definition at line 48 of file hevcdec.h.

Referenced by deblocking_filter_CTB(), set_qp_c(), and vvc_deblock().

◆ DEFAULT_INTRA_TC_OFFSET

#define DEFAULT_INTRA_TC_OFFSET   2

Definition at line 49 of file hevcdec.h.

Referenced by chroma_tc().

◆ HEVC_CONTEXTS

#define HEVC_CONTEXTS   199

Definition at line 51 of file hevcdec.h.

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

◆ HEVC_STAT_COEFFS

#define HEVC_STAT_COEFFS   4

Definition at line 52 of file hevcdec.h.

Referenced by ff_hevc_save_states(), and load_states().

◆ MRG_MAX_NUM_CANDS

#define MRG_MAX_NUM_CANDS   5

◆ L0

◆ L1

◆ EPEL_EXTRA_BEFORE

#define EPEL_EXTRA_BEFORE   1

Definition at line 59 of file hevcdec.h.

Referenced by chroma_mc_bi(), chroma_mc_uni(), put_hevc_epel_bi_hv(), and put_hevc_epel_bi_w_hv().

◆ EPEL_EXTRA_AFTER

#define EPEL_EXTRA_AFTER   2

Definition at line 60 of file hevcdec.h.

Referenced by chroma_mc_bi(), and chroma_mc_uni().

◆ EPEL_EXTRA

#define EPEL_EXTRA   3

Definition at line 61 of file hevcdec.h.

Referenced by chroma_mc_bi(), chroma_mc_uni(), put_hevc_epel_bi_hv(), and put_hevc_epel_bi_w_hv().

◆ QPEL_EXTRA_BEFORE

#define QPEL_EXTRA_BEFORE   3

Definition at line 62 of file hevcdec.h.

Referenced by luma_mc_bi(), luma_mc_uni(), put_hevc_qpel_bi_hv(), and put_hevc_qpel_bi_w_hv().

◆ QPEL_EXTRA_AFTER

#define QPEL_EXTRA_AFTER   4

Definition at line 63 of file hevcdec.h.

Referenced by luma_mc_bi(), and luma_mc_uni().

◆ QPEL_EXTRA

#define QPEL_EXTRA   7

Definition at line 64 of file hevcdec.h.

Referenced by luma_mc_bi(), luma_mc_uni(), put_hevc_qpel_bi_hv(), and put_hevc_qpel_bi_w_hv().

◆ EDGE_EMU_BUFFER_STRIDE

#define EDGE_EMU_BUFFER_STRIDE   80

◆ SAMPLE

#define SAMPLE ( tab,
x,
y )
Value:
((tab)[(y) * s->sps->width + (x)])
#define s(width, name)
Definition cbs_vp9.c:198
static const struct twinvq_data tab

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

Definition at line 71 of file hevcdec.h.

Referenced by copy_TMPL(), mix6to2_TMPL(), mix8to2_TMPL(), and sum2_TMPL().

◆ SAMPLE_CTB

◆ IS_IDR_TYPE

#define IS_IDR_TYPE ( t)
Value:
@ HEVC_NAL_IDR_W_RADL
Definition hevc.h:48
@ HEVC_NAL_IDR_N_LP
Definition hevc.h:49

Definition at line 74 of file hevcdec.h.

Referenced by ff_hevc_hls_filter().

◆ IS_IDR

◆ IS_BLA

#define IS_BLA ( s)
Value:
((s)->nal_unit_type == HEVC_NAL_BLA_W_RADL || (s)->nal_unit_type == HEVC_NAL_BLA_W_LP || \
(s)->nal_unit_type == HEVC_NAL_BLA_N_LP)
@ HEVC_NAL_BLA_W_LP
Definition hevc.h:45
@ HEVC_NAL_BLA_N_LP
Definition hevc.h:47
@ HEVC_NAL_BLA_W_RADL
Definition hevc.h:46

Definition at line 76 of file hevcdec.h.

Referenced by find_ref_idx(), and hevc_frame_start().

◆ IS_IRAP

◆ HEVC_RECOVERY_UNSPECIFIED

#define HEVC_RECOVERY_UNSPECIFIED   INT_MAX

Definition at line 80 of file hevcdec.h.

Referenced by decode_reset_recovery_point(), and hevc_frame_start().

◆ HEVC_RECOVERY_END

#define HEVC_RECOVERY_END   INT_MIN

Definition at line 81 of file hevcdec.h.

Referenced by hevc_frame_start().

◆ HEVC_IS_RECOVERING

#define HEVC_IS_RECOVERING ( s)
Value:
((s)->recovery_poc != HEVC_RECOVERY_UNSPECIFIED && (s)->recovery_poc != HEVC_RECOVERY_END)
#define HEVC_RECOVERY_END
Definition hevcdec.h:81
#define HEVC_RECOVERY_UNSPECIFIED
Definition hevcdec.h:80

Definition at line 82 of file hevcdec.h.

Referenced by add_candidate_ref(), and ff_hevc_set_new_ref().

◆ HEVC_FRAME_FLAG_OUTPUT

#define HEVC_FRAME_FLAG_OUTPUT   (1 << 0)

Definition at line 353 of file hevcdec.h.

Referenced by ff_hevc_output_frames(), and ff_hevc_set_new_ref().

◆ HEVC_FRAME_FLAG_SHORT_REF

◆ HEVC_FRAME_FLAG_LONG_REF

◆ HEVC_FRAME_FLAG_UNAVAILABLE

#define HEVC_FRAME_FLAG_UNAVAILABLE   (1 << 3)

Definition at line 356 of file hevcdec.h.

Referenced by add_candidate_ref(), generate_missing_ref(), and unref_missing_refs().

◆ HEVC_FRAME_FLAG_CORRUPT

#define HEVC_FRAME_FLAG_CORRUPT   (1 << 4)

Definition at line 357 of file hevcdec.h.

Referenced by add_candidate_ref(), ff_hevc_output_frames(), and ff_hevc_unref_frame().

◆ BOUNDARY_LEFT_SLICE

◆ BOUNDARY_LEFT_TILE

◆ BOUNDARY_UPPER_SLICE

◆ BOUNDARY_UPPER_TILE

Enumeration Type Documentation

◆ RPSType

enum RPSType
Enumerator
ST_CURR_BEF 
ST_CURR_AFT 
ST_FOLL 
LT_CURR 
LT_FOLL 
INTER_LAYER0 
INTER_LAYER1 
NB_RPS_TYPE 

Definition at line 84 of file hevcdec.h.

◆ PartMode

enum PartMode
Enumerator
PART_2Nx2N 
PART_2NxN 
PART_Nx2N 
PART_NxN 
PART_2NxnU 
PART_2NxnD 
PART_nLx2N 
PART_nRx2N 

Definition at line 95 of file hevcdec.h.

◆ PredMode

enum PredMode
Enumerator
MODE_INTER 
MODE_INTRA 
MODE_SKIP 

Definition at line 106 of file hevcdec.h.

◆ InterPredIdc

Enumerator
PRED_L0 
PRED_L1 
PRED_BI 

Definition at line 112 of file hevcdec.h.

◆ PredFlag

enum PredFlag
Enumerator
PF_INTRA 
PF_L0 
PF_L1 
PF_BI 

Definition at line 118 of file hevcdec.h.

◆ IntraPredMode

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 

Definition at line 125 of file hevcdec.h.

◆ SAOType

enum SAOType
Enumerator
SAO_NOT_APPLIED 
SAO_BAND 
SAO_EDGE 
SAO_APPLIED 

Definition at line 163 of file hevcdec.h.

◆ SAOEOClass

enum SAOEOClass
Enumerator
SAO_EO_HORIZ 
SAO_EO_VERT 
SAO_EO_135D 
SAO_EO_45D 

Definition at line 170 of file hevcdec.h.

◆ ScanType

enum ScanType
Enumerator
SCAN_DIAG 
SCAN_HORIZ 
SCAN_VERT 

Definition at line 177 of file hevcdec.h.

Function Documentation

◆ ff_hevc_clear_refs()

void ff_hevc_clear_refs ( HEVCLayerContext * l)

Mark all frames in DPB as unused for reference.

Definition at line 67 of file refs.c.

Referenced by hevc_frame_start().

◆ ff_hevc_flush_dpb()

void ff_hevc_flush_dpb ( HEVCContext * s)

Drop all frames currently in DPB.

Definition at line 76 of file refs.c.

Referenced by hevc_decode_flush().

◆ ff_hevc_get_ref_list()

const RefPicList * ff_hevc_get_ref_list ( const HEVCFrame * frame,
int x0,
int y0 )

Definition at line 57 of file refs.c.

Referenced by ff_hevc_ctb_edge_bs(), and ff_hevc_deblocking_boundary_strengths().

◆ ff_hevc_frame_rps()

int ff_hevc_frame_rps ( HEVCContext * s,
HEVCLayerContext * l )

Construct the reference picture sets for the current frame.

Definition at line 537 of file refs.c.

Referenced by hevc_frame_start().

◆ ff_hevc_slice_rpl()

int ff_hevc_slice_rpl ( HEVCContext * s)

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

Definition at line 345 of file refs.c.

Referenced by decode_slice_data().

◆ ff_hevc_save_states()

void ff_hevc_save_states ( HEVCLocalContext * lc,
const HEVCPPS * pps,
int ctb_addr_ts )

Definition at line 402 of file cabac.c.

Referenced by decode_ctb_data(), and hls_decode_entry_wpp().

◆ ff_hevc_cabac_init()

int ff_hevc_cabac_init ( HEVCLocalContext * lc,
const HEVCPPS * pps,
int ctb_addr_ts )

Definition at line 472 of file cabac.c.

Referenced by decode_ctb_data(), hls_decode_entry_tile(), and hls_decode_entry_wpp().

◆ ff_hevc_sao_merge_flag_decode()

int ff_hevc_sao_merge_flag_decode ( HEVCLocalContext * lc)

Definition at line 530 of file cabac.c.

Referenced by hls_sao_param().

◆ ff_hevc_sao_type_idx_decode()

int ff_hevc_sao_type_idx_decode ( HEVCLocalContext * lc)

Definition at line 535 of file cabac.c.

Referenced by hls_sao_param().

◆ ff_hevc_sao_band_position_decode()

int ff_hevc_sao_band_position_decode ( HEVCLocalContext * lc)

Definition at line 545 of file cabac.c.

Referenced by hls_sao_param().

◆ ff_hevc_sao_offset_abs_decode()

int ff_hevc_sao_offset_abs_decode ( HEVCLocalContext * lc,
int bit_depth )

Definition at line 555 of file cabac.c.

Referenced by hls_sao_param().

◆ ff_hevc_sao_offset_sign_decode()

int ff_hevc_sao_offset_sign_decode ( HEVCLocalContext * lc)

Definition at line 565 of file cabac.c.

Referenced by hls_sao_param().

◆ ff_hevc_sao_eo_class_decode()

int ff_hevc_sao_eo_class_decode ( HEVCLocalContext * lc)

Definition at line 570 of file cabac.c.

Referenced by hls_sao_param().

◆ ff_hevc_end_of_slice_flag_decode()

int ff_hevc_end_of_slice_flag_decode ( HEVCLocalContext * lc)

Definition at line 577 of file cabac.c.

Referenced by hls_coding_quadtree().

◆ ff_hevc_cu_transquant_bypass_flag_decode()

int ff_hevc_cu_transquant_bypass_flag_decode ( HEVCLocalContext * lc)

Definition at line 582 of file cabac.c.

Referenced by hls_coding_unit().

◆ ff_hevc_skip_flag_decode()

int ff_hevc_skip_flag_decode ( HEVCLocalContext * lc,
uint8_t * skip_flag,
int x0,
int y0,
int x_cb,
int y_cb,
int min_cb_width )

Definition at line 587 of file cabac.c.

Referenced by hls_coding_unit().

◆ ff_hevc_pred_mode_decode()

int ff_hevc_pred_mode_decode ( HEVCLocalContext * lc)

Definition at line 648 of file cabac.c.

Referenced by hls_coding_unit().

◆ ff_hevc_split_coding_unit_flag_decode()

int ff_hevc_split_coding_unit_flag_decode ( HEVCLocalContext * lc,
uint8_t * tab_ct_depth,
const HEVCSPS * sps,
int ct_depth,
int x0,
int y0 )

Definition at line 653 of file cabac.c.

Referenced by hls_coding_quadtree().

◆ ff_hevc_part_mode_decode()

int ff_hevc_part_mode_decode ( HEVCLocalContext * lc,
const HEVCSPS * sps,
int log2_cb_size )

Definition at line 674 of file cabac.c.

Referenced by hls_coding_unit().

◆ ff_hevc_pcm_flag_decode()

int ff_hevc_pcm_flag_decode ( HEVCLocalContext * lc)

Definition at line 711 of file cabac.c.

Referenced by hls_coding_unit().

◆ ff_hevc_prev_intra_luma_pred_flag_decode()

int ff_hevc_prev_intra_luma_pred_flag_decode ( HEVCLocalContext * lc)

Definition at line 716 of file cabac.c.

Referenced by intra_prediction_unit().

◆ ff_hevc_mpm_idx_decode()

int ff_hevc_mpm_idx_decode ( HEVCLocalContext * lc)

Definition at line 721 of file cabac.c.

Referenced by intra_prediction_unit().

◆ ff_hevc_rem_intra_luma_pred_mode_decode()

int ff_hevc_rem_intra_luma_pred_mode_decode ( HEVCLocalContext * lc)

Definition at line 729 of file cabac.c.

Referenced by intra_prediction_unit().

◆ ff_hevc_intra_chroma_pred_mode_decode()

int ff_hevc_intra_chroma_pred_mode_decode ( HEVCLocalContext * lc)

Definition at line 739 of file cabac.c.

Referenced by intra_prediction_unit().

◆ ff_hevc_merge_idx_decode()

int ff_hevc_merge_idx_decode ( HEVCLocalContext * lc)

Definition at line 750 of file cabac.c.

Referenced by hls_prediction_unit().

◆ ff_hevc_merge_flag_decode()

int ff_hevc_merge_flag_decode ( HEVCLocalContext * lc)

Definition at line 761 of file cabac.c.

Referenced by hls_prediction_unit().

◆ ff_hevc_inter_pred_idc_decode()

int ff_hevc_inter_pred_idc_decode ( HEVCLocalContext * lc,
int nPbW,
int nPbH )

Definition at line 766 of file cabac.c.

Referenced by hevc_luma_mv_mvp_mode().

◆ ff_hevc_ref_idx_lx_decode()

int ff_hevc_ref_idx_lx_decode ( HEVCLocalContext * lc,
int num_ref_idx_lx )

Definition at line 776 of file cabac.c.

Referenced by hevc_luma_mv_mvp_mode().

◆ ff_hevc_mvp_lx_flag_decode()

int ff_hevc_mvp_lx_flag_decode ( HEVCLocalContext * lc)

Definition at line 792 of file cabac.c.

Referenced by hevc_luma_mv_mvp_mode().

◆ ff_hevc_no_residual_syntax_flag_decode()

int ff_hevc_no_residual_syntax_flag_decode ( HEVCLocalContext * lc)

Definition at line 797 of file cabac.c.

Referenced by hls_coding_unit().

◆ ff_hevc_split_transform_flag_decode()

int ff_hevc_split_transform_flag_decode ( HEVCLocalContext * lc,
int log2_trafo_size )

Definition at line 835 of file cabac.c.

Referenced by hls_transform_tree().

◆ ff_hevc_cbf_cb_cr_decode()

int ff_hevc_cbf_cb_cr_decode ( HEVCLocalContext * lc,
int trafo_depth )

Definition at line 840 of file cabac.c.

Referenced by hls_transform_tree().

◆ ff_hevc_cbf_luma_decode()

int ff_hevc_cbf_luma_decode ( HEVCLocalContext * lc,
int trafo_depth )

Definition at line 845 of file cabac.c.

Referenced by hls_transform_tree().

◆ ff_hevc_log2_res_scale_abs()

int ff_hevc_log2_res_scale_abs ( HEVCLocalContext * lc,
int idx )

Definition at line 865 of file cabac.c.

Referenced by hls_cross_component_pred().

◆ ff_hevc_res_scale_sign_flag()

int ff_hevc_res_scale_sign_flag ( HEVCLocalContext * lc,
int idx )

Definition at line 875 of file cabac.c.

Referenced by hls_cross_component_pred().

◆ ff_hevc_frame_nb_refs()

int ff_hevc_frame_nb_refs ( const SliceHeader * sh,
const HEVCPPS * pps,
unsigned layer_idx )

Get the number of candidate references for the current frame.

Definition at line 617 of file refs.c.

Referenced by hls_slice_header(), nvdec_hevc_start_frame(), and vdpau_hevc_start_frame().

◆ ff_hevc_set_new_ref()

int ff_hevc_set_new_ref ( HEVCContext * s,
HEVCLayerContext * l,
int poc )

Definition at line 211 of file refs.c.

Referenced by hevc_frame_start().

◆ ff_hevc_nal_is_nonref()

static av_always_inline int ff_hevc_nal_is_nonref ( enum HEVCNALUnitType type)
static

Definition at line 719 of file hevcdec.h.

Referenced by decode_nal_units(), and ff_hevc_hls_filter().

◆ ff_hevc_output_frames()

int ff_hevc_output_frames ( HEVCContext * s,
unsigned layers_active_decode,
unsigned layers_active_output,
unsigned max_output,
unsigned max_dpb,
int discard )

Find frames in the DPB that are ready for output and either write them to the output FIFO or drop their output flag, depending on the value of discard.

Parameters
max_outputmaximum number of AUs with an output-pending frame in at least one layer that can be present in the DPB before output is triggered
max_dpbmaximum number of any frames that can be present in the DPB for any layer before output is triggered

Definition at line 267 of file refs.c.

Referenced by hevc_frame_start(), and hevc_receive_frame().

◆ ff_hevc_unref_frame()

◆ ff_hevc_set_neighbour_available()

void ff_hevc_set_neighbour_available ( HEVCLocalContext * lc,
int x0,
int y0,
int nPbW,
int nPbH,
int log2_ctb_size )

Definition at line 43 of file mvs.c.

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

◆ ff_hevc_luma_mv_merge_mode()

void ff_hevc_luma_mv_merge_mode ( HEVCLocalContext * lc,
const HEVCPPS * pps,
int x0,
int y0,
int nPbW,
int nPbH,
int log2_cb_size,
int part_idx,
int merge_idx,
MvField * mv )

Definition at line 485 of file mvs.c.

Referenced by hls_prediction_unit().

◆ ff_hevc_luma_mv_mvp_mode()

void ff_hevc_luma_mv_mvp_mode ( HEVCLocalContext * lc,
const HEVCPPS * pps,
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 590 of file mvs.c.

Referenced by hevc_luma_mv_mvp_mode().

◆ ff_hevc_hls_filter()

void ff_hevc_hls_filter ( HEVCLocalContext * lc,
const HEVCLayerContext * l,
const HEVCPPS * pps,
int x,
int y,
int ctb_size )

◆ ff_hevc_hls_filters()

void ff_hevc_hls_filters ( HEVCLocalContext * lc,
const HEVCLayerContext * l,
const HEVCPPS * pps,
int x_ctb,
int y_ctb,
int ctb_size )

◆ ff_hevc_set_qPy()

void ff_hevc_set_qPy ( HEVCLocalContext * lc,
const HEVCLayerContext * l,
const HEVCPPS * pps,
int xBase,
int yBase,
int log2_cb_size )

Definition at line 122 of file filter.c.

Referenced by hls_coding_unit(), and hls_transform_unit().

◆ ff_hevc_deblocking_boundary_strengths()

void ff_hevc_deblocking_boundary_strengths ( HEVCLocalContext * lc,
const HEVCLayerContext * l,
const HEVCPPS * pps,
int x0,
int y0,
int log2_trafo_size )

Definition at line 763 of file filter.c.

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

◆ ff_hevc_ctb_edge_bs()

void ff_hevc_ctb_edge_bs ( HEVCLocalContext * lc,
const HEVCLayerContext * l,
const HEVCPPS * pps,
int x0,
int y0,
unsigned edges )

Definition at line 933 of file filter.c.

Referenced by decode_slices_parallel(), and hls_slice_data_tiles().

◆ ff_hevc_cu_qp_delta_sign_flag()

int ff_hevc_cu_qp_delta_sign_flag ( HEVCLocalContext * lc)

Definition at line 627 of file cabac.c.

Referenced by hls_transform_unit().

◆ ff_hevc_cu_qp_delta_abs()

int ff_hevc_cu_qp_delta_abs ( HEVCLocalContext * lc)

Definition at line 600 of file cabac.c.

Referenced by hls_transform_unit().

◆ ff_hevc_cu_chroma_qp_offset_flag()

int ff_hevc_cu_chroma_qp_offset_flag ( HEVCLocalContext * lc)

Definition at line 632 of file cabac.c.

Referenced by hls_transform_unit().

◆ ff_hevc_cu_chroma_qp_offset_idx()

int ff_hevc_cu_chroma_qp_offset_idx ( HEVCLocalContext * lc,
int chroma_qp_offset_list_len_minus1 )

Definition at line 637 of file cabac.c.

Referenced by hls_transform_unit().

◆ ff_hevc_hls_residual_coding()

void ff_hevc_hls_residual_coding ( HEVCLocalContext * lc,
const HEVCPPS * pps,
int x0,
int y0,
int log2_trafo_size,
enum ScanType scan_idx,
int c_idx )

Definition at line 1075 of file cabac.c.

Referenced by hls_transform_unit().

◆ ff_hevc_hls_mvd_coding()

void ff_hevc_hls_mvd_coding ( HEVCLocalContext * lc,
int x0,
int y0,
int log2_cb_size )

Definition at line 1609 of file cabac.c.

Referenced by hevc_luma_mv_mvp_mode().

◆ ff_hevc_is_alpha_video()

int ff_hevc_is_alpha_video ( const HEVCContext * s)

Definition at line 440 of file hevcdec.c.

Referenced by alloc_frame(), get_format(), hevc_frame_start(), and setup_multilayer().

◆ ff_hevc_requested_layers()

int ff_hevc_requested_layers ( const HEVCContext * s,
const HEVCVPS * vps,
unsigned * active_output )

Resolve the caller's view selection into layers.

Depends only on the requested view IDs and the VPS, so unlike layers_active_decode it is already valid before setup_multilayer() runs and can be used from a hwaccel frame_params()/init() callback. Auxiliary alpha video is not covered here, as its layers do not follow view selection.

Parameters
active_outputreceives the mask of layers to output
Returns
number of layers that will be decoded, or a negative error code

Definition at line 459 of file hevcdec.c.

Referenced by setup_multilayer().

Variable Documentation

◆ ff_hevc_qpel_extra_before

const uint8_t ff_hevc_qpel_extra_before[4]
extern

◆ ff_hevc_qpel_extra_after

const uint8_t ff_hevc_qpel_extra_after[4]
extern

◆ ff_hevc_qpel_extra

const uint8_t ff_hevc_qpel_extra[4]
extern