FFmpeg
Loading...
Searching...
No Matches
hevcdec.c File Reference

Go to the source code of this file.

Macros

#define HWACCEL_MAX
#define CTB(tab, x, y)
#define SET_SAO(elem, value)
#define SUBDIVIDE(x, y, idx)
#define POS(c_idx, x, y)
#define MD5_PRI   "%016" PRIx64 "%016" PRIx64
#define MD5_PRI_ARG(buf)
#define OFFSET(x)
#define PAR   (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)

Functions

static void pic_arrays_free (HEVCLayerContext *l)
 NOTE: Each function hls_foo correspond to the function foo in the specification (HLS stands for High Level Syntax).
static int pic_arrays_init (HEVCLayerContext *l, const HEVCSPS *sps)
static int pred_weight_table (SliceHeader *sh, void *logctx, const HEVCSPS *sps, GetBitContext *gb)
static int decode_lt_rps (const HEVCSPS *sps, LongTermRPS *rps, GetBitContext *gb, int cur_poc, int poc_lsb)
static void export_stream_params (HEVCContext *s, const HEVCSPS *sps)
static int export_stream_params_from_sei (HEVCContext *s)
static int export_multilayer (HEVCContext *s, const HEVCVPS *vps)
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.
static int setup_multilayer (HEVCContext *s, const HEVCVPS *vps)
static enum AVPixelFormat map_to_alpha_format (HEVCContext *s, enum AVPixelFormat pix_fmt)
static enum AVPixelFormat get_format (HEVCContext *s, const HEVCSPS *sps)
static int set_sps (HEVCContext *s, HEVCLayerContext *l, const HEVCSPS *sps)
static int hls_slice_header (SliceHeader *sh, const HEVCContext *s, GetBitContext *gb)
static void hls_sao_param (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, int rx, int ry)
static int hls_cross_component_pred (HEVCLocalContext *lc, int idx)
static int hls_transform_unit (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, int x0, int y0, int xBase, int yBase, int cb_xBase, int cb_yBase, int log2_cb_size, int log2_trafo_size, int blk_idx, int cbf_luma, int *cbf_cb, int *cbf_cr)
static void set_deblocking_bypass (uint8_t *is_pcm, const HEVCSPS *sps, int x0, int y0, int log2_cb_size)
static int hls_transform_tree (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, int x0, int y0, int xBase, int yBase, int cb_xBase, int cb_yBase, int log2_cb_size, int log2_trafo_size, int trafo_depth, int blk_idx, const int *base_cbf_cb, const int *base_cbf_cr)
static int hls_pcm_sample (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, int x0, int y0, int log2_cb_size)
static void luma_mc_uni (HEVCLocalContext *lc, const HEVCPPS *pps, const HEVCSPS *sps, uint8_t *dst, ptrdiff_t dststride, const AVFrame *ref, const Mv *mv, int x_off, int y_off, int block_w, int block_h, int luma_weight, int luma_offset)
 8.5.3.2.2.1 Luma sample unidirectional interpolation process
static void luma_mc_bi (HEVCLocalContext *lc, const HEVCPPS *pps, const HEVCSPS *sps, uint8_t *dst, ptrdiff_t dststride, const AVFrame *ref0, const Mv *mv0, int x_off, int y_off, int block_w, int block_h, const AVFrame *ref1, const Mv *mv1, struct MvField *current_mv)
 8.5.3.2.2.1 Luma sample bidirectional interpolation process
static void chroma_mc_uni (HEVCLocalContext *lc, const HEVCPPS *pps, const HEVCSPS *sps, uint8_t *dst0, ptrdiff_t dststride, const uint8_t *src0, ptrdiff_t srcstride, int reflist, int x_off, int y_off, int block_w, int block_h, const struct MvField *current_mv, int chroma_weight, int chroma_offset)
 8.5.3.2.2.2 Chroma sample uniprediction interpolation process
static void chroma_mc_bi (HEVCLocalContext *lc, const HEVCPPS *pps, const HEVCSPS *sps, uint8_t *dst0, ptrdiff_t dststride, const AVFrame *ref0, const AVFrame *ref1, int x_off, int y_off, int block_w, int block_h, const MvField *current_mv, int cidx)
 8.5.3.2.2.2 Chroma sample bidirectional interpolation process
static void hevc_await_progress (const HEVCContext *s, const HEVCFrame *ref, const Mv *mv, int y0, int height)
static void hevc_luma_mv_mvp_mode (HEVCLocalContext *lc, const HEVCPPS *pps, const HEVCSPS *sps, int x0, int y0, int nPbW, int nPbH, int log2_cb_size, int part_idx, int merge_idx, MvField *mv)
static void hls_prediction_unit (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, int x0, int y0, int nPbW, int nPbH, int log2_cb_size, int partIdx, int idx)
static int luma_intra_pred_mode (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCSPS *sps, int x0, int y0, int pu_size, int prev_intra_luma_pred_flag)
 8.4.1
static av_always_inline void set_ct_depth (const HEVCSPS *sps, uint8_t *tab_ct_depth, int x0, int y0, int log2_cb_size, int ct_depth)
static void intra_prediction_unit (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCSPS *sps, int x0, int y0, int log2_cb_size)
static void intra_prediction_unit_default_value (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCSPS *sps, int x0, int y0, int log2_cb_size)
static int hls_coding_unit (HEVCLocalContext *lc, const HEVCContext *s, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, int x0, int y0, int log2_cb_size)
static int hls_coding_quadtree (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, int x0, int y0, int log2_cb_size, int cb_depth)
static void hls_decode_neighbour (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, int x_ctb, int y_ctb, int ctb_addr_ts)
static int hls_decode_entry (HEVCContext *s, GetBitContext *gb)
static int hls_decode_entry_wpp (AVCodecContext *avctx, void *hevc_lclist, int job, int thread)
static int wpp_progress_init (HEVCContext *s, unsigned count)
static int hls_slice_data_wpp (HEVCContext *s, const H2645NAL *nal)
static int decode_slice_data (HEVCContext *s, const HEVCLayerContext *l, const H2645NAL *nal, GetBitContext *gb)
static int set_side_data (HEVCContext *s)
static int find_finish_setup_nal (const HEVCContext *s)
static int hevc_frame_start (HEVCContext *s, HEVCLayerContext *l, unsigned nal_idx)
static int verify_md5 (HEVCContext *s, AVFrame *frame)
static int hevc_frame_end (HEVCContext *s, HEVCLayerContext *l)
static int decode_slice (HEVCContext *s, unsigned nal_idx, GetBitContext *gb)
static int decode_nal_unit (HEVCContext *s, unsigned nal_idx)
static void decode_reset_recovery_point (HEVCContext *s)
static int export_stream_params_from_slice (HEVCContext *s, const H2645NAL *nal)
static int decode_nal_units (HEVCContext *s, const uint8_t *buf, int length)
static int hevc_decode_extradata (HEVCContext *s, uint8_t *buf, int length, int first)
static int hevc_receive_frame (AVCodecContext *avctx, AVFrame *frame)
static int hevc_ref_frame (HEVCFrame *dst, const HEVCFrame *src)
static av_cold int hevc_decode_free (AVCodecContext *avctx)
static av_cold int hevc_init_context (AVCodecContext *avctx)
static int hevc_sei_to_context (AVCodecContext *avctx, HEVCSEI *sei)
static av_cold int hevc_decode_init (AVCodecContext *avctx)
static av_cold void hevc_decode_flush (AVCodecContext *avctx)

Variables

static const uint8_t hevc_pel_weight [65] = { [2] = 0, [4] = 1, [6] = 2, [8] = 3, [12] = 4, [16] = 5, [24] = 6, [32] = 7, [48] = 8, [64] = 9 }
static const uint8_t tab_mode_idx []
static const AVOption options []
static const AVClass hevc_decoder_class
const FFCodec ff_hevc_decoder

Macro Definition Documentation

◆ HWACCEL_MAX

#define HWACCEL_MAX
Value:
#define CONFIG_HEVC_VAAPI_HWACCEL
#define CONFIG_HEVC_D3D12VA_HWACCEL
#define CONFIG_HEVC_DXVA2_HWACCEL
#define CONFIG_HEVC_VDPAU_HWACCEL
#define CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL
#define CONFIG_HEVC_NVDEC_HWACCEL
#define CONFIG_HEVC_VULKAN_HWACCEL
#define CONFIG_HEVC_NVDEC_CUARRAY_HWACCEL
#define CONFIG_HEVC_D3D11VA_HWACCEL

◆ CTB

#define CTB ( tab,
x,
y )
Value:
((tab)[(y) * sps->ctb_width + (x)])
static int FUNC sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
static const struct twinvq_data tab

Definition at line 1217 of file hevcdec.c.

Referenced by hls_sao_param().

◆ SET_SAO

#define SET_SAO ( elem,
value )
Value:
do { \
if (!sao_merge_up_flag && !sao_merge_left_flag) \
sao->elem = value; \
else if (sao_merge_left_flag) \
sao->elem = CTB(l->sao, rx-1, ry).elem; \
else if (sao_merge_up_flag) \
sao->elem = CTB(l->sao, rx, ry-1).elem; \
else \
sao->elem = 0; \
} while (0)
double value
Definition eval.c:102
#define CTB(tab, x, y)
Definition filter.c:267

Definition at line 1219 of file hevcdec.c.

Referenced by hls_sao_param().

◆ SUBDIVIDE

#define SUBDIVIDE ( x,
y,
idx )
Value:
do { \
ret = hls_transform_tree(lc, l, pps, sps, \
x, y, x0, y0, cb_xBase, cb_yBase, log2_cb_size, \
log2_trafo_size - 1, trafo_depth + 1, idx, \
cbf_cb, cbf_cr); \
if (ret < 0) \
return ret; \
} while (0)
uint64_t pps
Definition dovi_rpuenc.c:36
static int hls_transform_tree(HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, int x0, int y0, int xBase, int yBase, int cb_xBase, int cb_yBase, int log2_cb_size, int log2_trafo_size, int trafo_depth, int blk_idx, const int *base_cbf_cb, const int *base_cbf_cr)
Definition hevcdec.c:1551

Referenced by hls_transform_tree().

◆ POS

#define POS ( c_idx,
x,
y )
Value:
s->cur_frame->f->data[c_idx] ? \
&s->cur_frame->f->data[c_idx][((y) >> sps->vshift[c_idx]) * linesize[c_idx] + \
(((x) >> sps->hshift[c_idx]) << sps->pixel_shift)] : NULL
#define s(width, name)
Definition cbs_vp9.c:198
#define NULL
Definition coverity.c:32

Referenced by hls_prediction_unit().

◆ MD5_PRI

#define MD5_PRI   "%016" PRIx64 "%016" PRIx64

Referenced by verify_md5().

◆ MD5_PRI_ARG

#define MD5_PRI_ARG ( buf)
Value:
AV_RB64(buf), AV_RB64((const uint8_t*)(buf) + 8)
#define AV_RB64(p)

Referenced by verify_md5().

◆ OFFSET

#define OFFSET ( x)
Value:
offsetof(HEVCContext, x)

Definition at line 4313 of file hevcdec.c.

◆ PAR

Definition at line 4314 of file hevcdec.c.

Function Documentation

◆ pic_arrays_free()

void pic_arrays_free ( HEVCLayerContext * l)
static

NOTE: Each function hls_foo correspond to the function foo in the specification (HLS stands for High Level Syntax).

Section 5.7

Definition at line 74 of file hevcdec.c.

Referenced by hevc_decode_free(), pic_arrays_init(), and set_sps().

◆ pic_arrays_init()

int pic_arrays_init ( HEVCLayerContext * l,
const HEVCSPS * sps )
static

Definition at line 103 of file hevcdec.c.

Referenced by set_sps().

◆ pred_weight_table()

int pred_weight_table ( SliceHeader * sh,
void * logctx,
const HEVCSPS * sps,
GetBitContext * gb )
static

Definition at line 175 of file hevcdec.c.

Referenced by hls_slice_header().

◆ decode_lt_rps()

int decode_lt_rps ( const HEVCSPS * sps,
LongTermRPS * rps,
GetBitContext * gb,
int cur_poc,
int poc_lsb )
static

Definition at line 275 of file hevcdec.c.

Referenced by hls_slice_header().

◆ export_stream_params()

void export_stream_params ( HEVCContext * s,
const HEVCSPS * sps )
static

◆ export_stream_params_from_sei()

int export_stream_params_from_sei ( HEVCContext * s)
static

Definition at line 388 of file hevcdec.c.

Referenced by decode_nal_units(), hevc_decode_extradata(), and hevc_frame_start().

◆ export_multilayer()

int export_multilayer ( HEVCContext * s,
const HEVCVPS * vps )
static

Definition at line 401 of file hevcdec.c.

Referenced by get_format(), and hevc_decode_extradata().

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

◆ setup_multilayer()

int setup_multilayer ( HEVCContext * s,
const HEVCVPS * vps )
static

Definition at line 519 of file hevcdec.c.

Referenced by get_format().

◆ map_to_alpha_format()

enum AVPixelFormat map_to_alpha_format ( HEVCContext * s,
enum AVPixelFormat pix_fmt )
static

Definition at line 552 of file hevcdec.c.

Referenced by export_stream_params_from_slice(), and get_format().

◆ get_format()

enum AVPixelFormat get_format ( HEVCContext * s,
const HEVCSPS * sps )
static

Definition at line 580 of file hevcdec.c.

Referenced by hevc_frame_start().

◆ set_sps()

int set_sps ( HEVCContext * s,
HEVCLayerContext * l,
const HEVCSPS * sps )
static

Definition at line 761 of file hevcdec.c.

Referenced by hevc_frame_start().

◆ hls_slice_header()

int hls_slice_header ( SliceHeader * sh,
const HEVCContext * s,
GetBitContext * gb )
static

Definition at line 791 of file hevcdec.c.

Referenced by decode_slice().

◆ hls_sao_param()

void hls_sao_param ( HEVCLocalContext * lc,
const HEVCLayerContext * l,
const HEVCPPS * pps,
const HEVCSPS * sps,
int rx,
int ry )
static

Definition at line 1231 of file hevcdec.c.

Referenced by hls_decode_entry(), and hls_decode_entry_wpp().

◆ hls_cross_component_pred()

int hls_cross_component_pred ( HEVCLocalContext * lc,
int idx )
static

Definition at line 1307 of file hevcdec.c.

Referenced by hls_transform_unit().

◆ hls_transform_unit()

int hls_transform_unit ( HEVCLocalContext * lc,
const HEVCLayerContext * l,
const HEVCPPS * pps,
const HEVCSPS * sps,
int x0,
int y0,
int xBase,
int yBase,
int cb_xBase,
int cb_yBase,
int log2_cb_size,
int log2_trafo_size,
int blk_idx,
int cbf_luma,
int * cbf_cb,
int * cbf_cr )
static

Definition at line 1323 of file hevcdec.c.

Referenced by hls_transform_tree().

◆ set_deblocking_bypass()

void set_deblocking_bypass ( uint8_t * is_pcm,
const HEVCSPS * sps,
int x0,
int y0,
int log2_cb_size )
static

Definition at line 1535 of file hevcdec.c.

Referenced by hls_coding_unit(), and hls_transform_tree().

◆ hls_transform_tree()

int hls_transform_tree ( HEVCLocalContext * lc,
const HEVCLayerContext * l,
const HEVCPPS * pps,
const HEVCSPS * sps,
int x0,
int y0,
int xBase,
int yBase,
int cb_xBase,
int cb_yBase,
int log2_cb_size,
int log2_trafo_size,
int trafo_depth,
int blk_idx,
const int * base_cbf_cb,
const int * base_cbf_cr )
static

Definition at line 1551 of file hevcdec.c.

Referenced by hls_coding_unit().

◆ hls_pcm_sample()

int hls_pcm_sample ( HEVCLocalContext * lc,
const HEVCLayerContext * l,
const HEVCPPS * pps,
int x0,
int y0,
int log2_cb_size )
static

Definition at line 1679 of file hevcdec.c.

Referenced by hls_coding_unit().

◆ luma_mc_uni()

void luma_mc_uni ( HEVCLocalContext * lc,
const HEVCPPS * pps,
const HEVCSPS * sps,
uint8_t * dst,
ptrdiff_t dststride,
const AVFrame * ref,
const Mv * mv,
int x_off,
int y_off,
int block_w,
int block_h,
int luma_weight,
int luma_offset )
static

8.5.3.2.2.1 Luma sample unidirectional interpolation process

Parameters
sHEVC decoding context
dsttarget buffer for block data at block position
dststridestride of the dst buffer
refreference picture buffer at origin (0, 0)
mvmotion vector (relative to block position) to get pixel data from
x_offhorizontal position of block from origin (0, 0)
y_offvertical position of block from origin (0, 0)
block_wwidth of block
block_hheight of block
luma_weightweighting factor applied to the luma prediction
luma_offsetadditive offset applied to the luma prediction value

Definition at line 1739 of file hevcdec.c.

Referenced by hls_prediction_unit().

◆ luma_mc_bi()

void luma_mc_bi ( HEVCLocalContext * lc,
const HEVCPPS * pps,
const HEVCSPS * sps,
uint8_t * dst,
ptrdiff_t dststride,
const AVFrame * ref0,
const Mv * mv0,
int x_off,
int y_off,
int block_w,
int block_h,
const AVFrame * ref1,
const Mv * mv1,
struct MvField * current_mv )
static

8.5.3.2.2.1 Luma sample bidirectional interpolation process

Parameters
sHEVC decoding context
dsttarget buffer for block data at block position
dststridestride of the dst buffer
ref0reference picture0 buffer at origin (0, 0)
mv0motion vector0 (relative to block position) to get pixel data from
x_offhorizontal position of block from origin (0, 0)
y_offvertical position of block from origin (0, 0)
block_wwidth of block
block_hheight of block
ref1reference picture1 buffer at origin (0, 0)
mv1motion vector1 (relative to block position) to get pixel data from
current_mvcurrent motion vector structure

Definition at line 1803 of file hevcdec.c.

Referenced by hls_prediction_unit().

◆ chroma_mc_uni()

void chroma_mc_uni ( HEVCLocalContext * lc,
const HEVCPPS * pps,
const HEVCSPS * sps,
uint8_t * dst0,
ptrdiff_t dststride,
const uint8_t * src0,
ptrdiff_t srcstride,
int reflist,
int x_off,
int y_off,
int block_w,
int block_h,
const struct MvField * current_mv,
int chroma_weight,
int chroma_offset )
static

8.5.3.2.2.2 Chroma sample uniprediction interpolation process

Parameters
sHEVC decoding context
dst1target buffer for block data at block position (U plane)
dst2target buffer for block data at block position (V plane)
dststridestride of the dst1 and dst2 buffers
refreference picture buffer at origin (0, 0)
mvmotion vector (relative to block position) to get pixel data from
x_offhorizontal position of block from origin (0, 0)
y_offvertical position of block from origin (0, 0)
block_wwidth of block
block_hheight of block
chroma_weightweighting factor applied to the chroma prediction
chroma_offsetadditive offset applied to the chroma prediction value

Definition at line 1897 of file hevcdec.c.

Referenced by hls_prediction_unit().

◆ chroma_mc_bi()

void chroma_mc_bi ( HEVCLocalContext * lc,
const HEVCPPS * pps,
const HEVCSPS * sps,
uint8_t * dst0,
ptrdiff_t dststride,
const AVFrame * ref0,
const AVFrame * ref1,
int x_off,
int y_off,
int block_w,
int block_h,
const MvField * current_mv,
int cidx )
static

8.5.3.2.2.2 Chroma sample bidirectional interpolation process

Parameters
sHEVC decoding context
dsttarget buffer for block data at block position
dststridestride of the dst buffer
ref0reference picture0 buffer at origin (0, 0)
mv0motion vector0 (relative to block position) to get pixel data from
x_offhorizontal position of block from origin (0, 0)
y_offvertical position of block from origin (0, 0)
block_wwidth of block
block_hheight of block
ref1reference picture1 buffer at origin (0, 0)
mv1motion vector1 (relative to block position) to get pixel data from
current_mvcurrent motion vector structure
cidxchroma component(cb, cr)

Definition at line 1967 of file hevcdec.c.

Referenced by hls_prediction_unit().

◆ hevc_await_progress()

void hevc_await_progress ( const HEVCContext * s,
const HEVCFrame * ref,
const Mv * mv,
int y0,
int height )
static

Definition at line 2060 of file hevcdec.c.

Referenced by hls_prediction_unit().

◆ hevc_luma_mv_mvp_mode()

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

Definition at line 2070 of file hevcdec.c.

Referenced by hls_prediction_unit().

◆ hls_prediction_unit()

void hls_prediction_unit ( HEVCLocalContext * lc,
const HEVCLayerContext * l,
const HEVCPPS * pps,
const HEVCSPS * sps,
int x0,
int y0,
int nPbW,
int nPbH,
int log2_cb_size,
int partIdx,
int idx )
static

Definition at line 2117 of file hevcdec.c.

Referenced by hls_coding_unit().

◆ luma_intra_pred_mode()

int luma_intra_pred_mode ( HEVCLocalContext * lc,
const HEVCLayerContext * l,
const HEVCSPS * sps,
int x0,
int y0,
int pu_size,
int prev_intra_luma_pred_flag )
static

8.4.1

Definition at line 2247 of file hevcdec.c.

Referenced by derive_chroma_intra_pred_mode(), and intra_prediction_unit().

◆ set_ct_depth()

av_always_inline void set_ct_depth ( const HEVCSPS * sps,
uint8_t * tab_ct_depth,
int x0,
int y0,
int log2_cb_size,
int ct_depth )
static

Definition at line 2329 of file hevcdec.c.

Referenced by hls_coding_unit().

◆ intra_prediction_unit()

void intra_prediction_unit ( HEVCLocalContext * lc,
const HEVCLayerContext * l,
const HEVCSPS * sps,
int x0,
int y0,
int log2_cb_size )
static

Definition at line 2347 of file hevcdec.c.

Referenced by hls_coding_unit().

◆ intra_prediction_unit_default_value()

void intra_prediction_unit_default_value ( HEVCLocalContext * lc,
const HEVCLayerContext * l,
const HEVCSPS * sps,
int x0,
int y0,
int log2_cb_size )
static

Definition at line 2417 of file hevcdec.c.

Referenced by hls_coding_unit().

◆ hls_coding_unit()

int hls_coding_unit ( HEVCLocalContext * lc,
const HEVCContext * s,
const HEVCLayerContext * l,
const HEVCPPS * pps,
const HEVCSPS * sps,
int x0,
int y0,
int log2_cb_size )
static

Definition at line 2442 of file hevcdec.c.

Referenced by hls_coding_quadtree().

◆ hls_coding_quadtree()

int hls_coding_quadtree ( HEVCLocalContext * lc,
const HEVCLayerContext * l,
const HEVCPPS * pps,
const HEVCSPS * sps,
int x0,
int y0,
int log2_cb_size,
int cb_depth )
static

Definition at line 2629 of file hevcdec.c.

Referenced by hls_coding_quadtree(), hls_decode_entry(), and hls_decode_entry_wpp().

◆ hls_decode_neighbour()

void hls_decode_neighbour ( HEVCLocalContext * lc,
const HEVCLayerContext * l,
const HEVCPPS * pps,
const HEVCSPS * sps,
int x_ctb,
int y_ctb,
int ctb_addr_ts )
static

Definition at line 2722 of file hevcdec.c.

Referenced by hls_decode_entry(), and hls_decode_entry_wpp().

◆ hls_decode_entry()

int hls_decode_entry ( HEVCContext * s,
GetBitContext * gb )
static

Definition at line 2773 of file hevcdec.c.

Referenced by decode_slice_data().

◆ hls_decode_entry_wpp()

int hls_decode_entry_wpp ( AVCodecContext * avctx,
void * hevc_lclist,
int job,
int thread )
static

Definition at line 2827 of file hevcdec.c.

Referenced by hls_slice_data_wpp().

◆ wpp_progress_init()

int wpp_progress_init ( HEVCContext * s,
unsigned count )
static

Definition at line 2922 of file hevcdec.c.

Referenced by hls_slice_data_wpp().

◆ hls_slice_data_wpp()

int hls_slice_data_wpp ( HEVCContext * s,
const H2645NAL * nal )
static

Definition at line 2948 of file hevcdec.c.

Referenced by decode_slice_data().

◆ decode_slice_data()

int decode_slice_data ( HEVCContext * s,
const HEVCLayerContext * l,
const H2645NAL * nal,
GetBitContext * gb )
static

Definition at line 3050 of file hevcdec.c.

Referenced by decode_slice().

◆ set_side_data()

int set_side_data ( HEVCContext * s)
static

Definition at line 3104 of file hevcdec.c.

Referenced by hevc_frame_start().

◆ find_finish_setup_nal()

int find_finish_setup_nal ( const HEVCContext * s)
static

Definition at line 3199 of file hevcdec.c.

Referenced by hevc_frame_start().

◆ hevc_frame_start()

int hevc_frame_start ( HEVCContext * s,
HEVCLayerContext * l,
unsigned nal_idx )
static

Definition at line 3243 of file hevcdec.c.

Referenced by decode_slice().

◆ verify_md5()

int verify_md5 ( HEVCContext * s,
AVFrame * frame )
static

Definition at line 3451 of file hevcdec.c.

Referenced by hevc_frame_end().

◆ hevc_frame_end()

int hevc_frame_end ( HEVCContext * s,
HEVCLayerContext * l )
static

Definition at line 3520 of file hevcdec.c.

Referenced by decode_nal_units().

◆ decode_slice()

int decode_slice ( HEVCContext * s,
unsigned nal_idx,
GetBitContext * gb )
static

Definition at line 3566 of file hevcdec.c.

Referenced by decode_nal_unit().

◆ decode_nal_unit()

int decode_nal_unit ( HEVCContext * s,
unsigned nal_idx )
static

Definition at line 3642 of file hevcdec.c.

Referenced by decode_nal_units().

◆ decode_reset_recovery_point()

void decode_reset_recovery_point ( HEVCContext * s)
static

Definition at line 3730 of file hevcdec.c.

Referenced by decode_nal_units().

◆ export_stream_params_from_slice()

int export_stream_params_from_slice ( HEVCContext * s,
const H2645NAL * nal )
static

Definition at line 3736 of file hevcdec.c.

Referenced by decode_nal_units().

◆ decode_nal_units()

int decode_nal_units ( HEVCContext * s,
const uint8_t * buf,
int length )
static

Definition at line 3772 of file hevcdec.c.

Referenced by hevc_receive_frame().

◆ hevc_decode_extradata()

int hevc_decode_extradata ( HEVCContext * s,
uint8_t * buf,
int length,
int first )
static

Definition at line 3906 of file hevcdec.c.

Referenced by hevc_decode_init(), and hevc_receive_frame().

◆ hevc_receive_frame()

int hevc_receive_frame ( AVCodecContext * avctx,
AVFrame * frame )
static

Definition at line 3938 of file hevcdec.c.

◆ hevc_ref_frame()

int hevc_ref_frame ( HEVCFrame * dst,
const HEVCFrame * src )
static

Definition at line 3998 of file hevcdec.c.

◆ hevc_decode_free()

av_cold int hevc_decode_free ( AVCodecContext * avctx)
static

Definition at line 4031 of file hevcdec.c.

◆ hevc_init_context()

av_cold int hevc_init_context ( AVCodecContext * avctx)
static

Definition at line 4077 of file hevcdec.c.

Referenced by hevc_decode_init().

◆ hevc_sei_to_context()

int hevc_sei_to_context ( AVCodecContext * avctx,
HEVCSEI * sei )
static

Definition at line 4214 of file hevcdec.c.

Referenced by hevc_decode_init().

◆ hevc_decode_init()

av_cold int hevc_decode_init ( AVCodecContext * avctx)
static

Definition at line 4263 of file hevcdec.c.

◆ hevc_decode_flush()

av_cold void hevc_decode_flush ( AVCodecContext * avctx)
static

Definition at line 4299 of file hevcdec.c.

Variable Documentation

◆ hevc_pel_weight

const uint8_t hevc_pel_weight[65] = { [2] = 0, [4] = 1, [6] = 2, [8] = 3, [12] = 4, [16] = 5, [24] = 6, [32] = 7, [48] = 8, [64] = 9 }
static

Definition at line 62 of file hevcdec.c.

Referenced by chroma_mc_bi(), chroma_mc_uni(), luma_mc_bi(), and luma_mc_uni().

◆ tab_mode_idx

const uint8_t tab_mode_idx[]
static
Initial value:
= {
0, 1, 2, 2, 2, 2, 3, 5, 7, 8, 10, 12, 13, 15, 17, 18, 19, 20,
21, 22, 23, 23, 24, 24, 25, 25, 26, 27, 27, 28, 28, 29, 29, 30, 31}

Definition at line 2343 of file hevcdec.c.

Referenced by intra_prediction_unit().

◆ options

const AVOption options[]
static
Initial value:
= {
{ "apply_defdispwin", "Apply default display window from VUI", OFFSET(apply_defdispwin),
AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, PAR },
{ "strict-displaywin", "strictly apply default display window size", OFFSET(apply_defdispwin),
AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, PAR },
{ "view_ids", "Array of view IDs that should be decoded and output; a single -1 to decode all views",
.offset = OFFSET(view_ids), .type = AV_OPT_TYPE_INT | AV_OPT_TYPE_FLAG_ARRAY,
.min = -1, .max = INT_MAX, .flags = PAR },
{ "view_ids_available", "Array of available view IDs is exported here",
.offset = OFFSET(view_ids_available), .type = AV_OPT_TYPE_UINT | AV_OPT_TYPE_FLAG_ARRAY,
{ "view_pos_available", "Array of view positions for view_ids_available is exported here, as AVStereo3DView",
.offset = OFFSET(view_pos_available), .type = AV_OPT_TYPE_UINT | AV_OPT_TYPE_FLAG_ARRAY,
.flags = PAR | AV_OPT_FLAG_EXPORT | AV_OPT_FLAG_READONLY, .unit = "view_pos" },
{ "unspecified", .type = AV_OPT_TYPE_CONST, .default_val = { .i64 = AV_STEREO3D_VIEW_UNSPEC }, .unit = "view_pos" },
{ "left", .type = AV_OPT_TYPE_CONST, .default_val = { .i64 = AV_STEREO3D_VIEW_LEFT }, .unit = "view_pos" },
{ "right", .type = AV_OPT_TYPE_CONST, .default_val = { .i64 = AV_STEREO3D_VIEW_RIGHT }, .unit = "view_pos" },
{ NULL },
}
#define PAR
Definition apedec.c:1740
#define OFFSET(x)
#define AV_OPT_FLAG_READONLY
The option may not be set through the AVOptions API, only read.
Definition opt.h:367
#define AV_OPT_FLAG_EXPORT
The option is intended for exporting values to the caller.
Definition opt.h:362
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition opt.h:298
@ AV_OPT_TYPE_FLAG_ARRAY
May be combined with another regular option type to declare an array option.
Definition opt.h:345
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
Definition opt.h:326
@ AV_OPT_TYPE_UINT
Underlying C type is unsigned int.
Definition opt.h:334
@ AV_STEREO3D_VIEW_RIGHT
Frame contains only the right view.
Definition stereo3d.h:163
@ AV_STEREO3D_VIEW_LEFT
Frame contains only the left view.
Definition stereo3d.h:158
@ AV_STEREO3D_VIEW_UNSPEC
Content is unspecified.
Definition stereo3d.h:168

Definition at line 4316 of file hevcdec.c.

◆ hevc_decoder_class

const AVClass hevc_decoder_class
static
Initial value:
= {
.class_name = "HEVC decoder",
.item_name = av_default_item_name,
.option = options,
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85

Definition at line 4337 of file hevcdec.c.

◆ ff_hevc_decoder

const FFCodec ff_hevc_decoder

Definition at line 4344 of file hevcdec.c.

Referenced by imm5_init().