FFmpeg
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
hevcdec.h
Go to the documentation of this file.
1 /*
2  * HEVC video decoder
3  *
4  * Copyright (C) 2012 - 2013 Guillaume Martres
5  *
6  * This file is part of FFmpeg.
7  *
8  * FFmpeg is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * FFmpeg is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with FFmpeg; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #ifndef AVCODEC_HEVC_HEVCDEC_H
24 #define AVCODEC_HEVC_HEVCDEC_H
25 
26 #include <stdatomic.h>
27 
28 #include "libavutil/buffer.h"
29 #include "libavutil/mem_internal.h"
30 
31 #include "libavcodec/avcodec.h"
32 #include "libavcodec/bswapdsp.h"
33 #include "libavcodec/cabac.h"
34 #include "libavcodec/dovi_rpu.h"
35 #include "libavcodec/get_bits.h"
36 #include "libavcodec/h2645_parse.h"
37 #include "libavcodec/h274.h"
39 #include "libavcodec/videodsp.h"
40 
41 #include "dsp.h"
42 #include "hevc.h"
43 #include "pred.h"
44 #include "ps.h"
45 #include "sei.h"
46 
47 #define SHIFT_CTB_WPP 2
48 
49 #define MAX_TB_SIZE 32
50 #define MAX_QP 51
51 #define DEFAULT_INTRA_TC_OFFSET 2
52 
53 #define HEVC_CONTEXTS 199
54 #define HEVC_STAT_COEFFS 4
55 
56 #define MRG_MAX_NUM_CANDS 5
57 
58 #define L0 0
59 #define L1 1
60 
61 #define EPEL_EXTRA_BEFORE 1
62 #define EPEL_EXTRA_AFTER 2
63 #define EPEL_EXTRA 3
64 #define QPEL_EXTRA_BEFORE 3
65 #define QPEL_EXTRA_AFTER 4
66 #define QPEL_EXTRA 7
67 
68 #define EDGE_EMU_BUFFER_STRIDE 80
69 
70 /**
71  * Value of the luma sample at position (x, y) in the 2D array tab.
72  */
73 #define SAMPLE(tab, x, y) ((tab)[(y) * s->sps->width + (x)])
74 #define SAMPLE_CTB(tab, x, y) ((tab)[(y) * min_cb_width + (x)])
75 
76 #define IS_IDR(s) ((s)->nal_unit_type == HEVC_NAL_IDR_W_RADL || (s)->nal_unit_type == HEVC_NAL_IDR_N_LP)
77 #define IS_BLA(s) ((s)->nal_unit_type == HEVC_NAL_BLA_W_RADL || (s)->nal_unit_type == HEVC_NAL_BLA_W_LP || \
78  (s)->nal_unit_type == HEVC_NAL_BLA_N_LP)
79 #define IS_IRAP(s) ((s)->nal_unit_type >= HEVC_NAL_BLA_W_LP && (s)->nal_unit_type <= HEVC_NAL_RSV_IRAP_VCL23)
80 
81 #define HEVC_RECOVERY_UNSPECIFIED INT_MAX
82 #define HEVC_RECOVERY_END INT_MIN
83 #define HEVC_IS_RECOVERING(s) ((s)->recovery_poc != HEVC_RECOVERY_UNSPECIFIED && (s)->recovery_poc != HEVC_RECOVERY_END)
84 
85 enum RPSType {
94 };
95 
96 enum PartMode {
98  PART_2NxN = 1,
99  PART_Nx2N = 2,
100  PART_NxN = 3,
105 };
106 
107 enum PredMode {
111 };
112 
114  PRED_L0 = 0,
117 };
118 
119 enum PredFlag {
120  PF_INTRA = 0,
124 };
125 
162 };
163 
164 enum SAOType {
169 };
170 
176 };
177 
178 enum ScanType {
182 };
183 
184 typedef struct HEVCCABACState {
188 
189 typedef struct LongTermRPS {
190  int poc[32];
191  uint8_t poc_msb_present[32];
192  uint8_t used[32];
193  uint8_t nb_refs;
194 } LongTermRPS;
195 
196 typedef struct RefPicList {
200  int nb_refs;
201 } RefPicList;
202 
203 typedef struct RefPicListTab {
205 } RefPicListTab;
206 
207 typedef struct SliceHeader {
208  unsigned int pps_id;
209 
210  ///< address (in raster order) of the first block in the current slice segment
211  unsigned int slice_segment_addr;
212  ///< address (in raster order) of the first block in the current slice
213  unsigned int slice_addr;
214 
216 
218  int poc;
219 
225 
226  ///< RPS coded in the slice header itself is stored here
233  unsigned int list_entry_lx[2][32];
234 
238 
239  unsigned int nb_refs[2];
240 
243 
245  uint8_t disable_deblocking_filter_flag; ///< slice_header_disable_deblocking_filter_flag
248 
249  unsigned int collocated_ref_idx;
250 
254 
258 
260 
261  int beta_offset; ///< beta_offset_div2 * 2
262  int tc_offset; ///< tc_offset_div2 * 2
263 
264  uint8_t max_num_merge_cand; ///< 5 - 5_minus_max_num_merge_cand
266 
268  int * offset;
269  int * size;
271 
272  int8_t slice_qp;
273 
276 
277  int16_t luma_weight_l0[16];
278  int16_t chroma_weight_l0[16][2];
279  int16_t chroma_weight_l1[16][2];
280  int16_t luma_weight_l1[16];
281 
282  int16_t luma_offset_l0[16];
283  int16_t chroma_offset_l0[16][2];
284 
285  int16_t luma_offset_l1[16];
286  int16_t chroma_offset_l1[16][2];
287 
289  unsigned data_offset;
290 } SliceHeader;
291 
292 typedef struct CodingUnit {
293  int x;
294  int y;
295 
296  enum PredMode pred_mode; ///< PredMode
297  enum PartMode part_mode; ///< PartMode
298 
299  // Inferred parameters
300  uint8_t intra_split_flag; ///< IntraSplitFlag
301  uint8_t max_trafo_depth; ///< MaxTrafoDepth
303 } CodingUnit;
304 
305 typedef struct Mv {
306  int16_t x; ///< horizontal component of motion vector
307  int16_t y; ///< vertical component of motion vector
308 } Mv;
309 
310 typedef struct MvField {
312  int8_t ref_idx[2];
313  int8_t pred_flag;
314 } MvField;
315 
316 typedef struct NeighbourAvailable {
319  int cand_up;
324 
325 typedef struct PredictionUnit {
326  int mpm_idx;
328  uint8_t intra_pred_mode[4];
330  uint8_t merge_flag;
331  uint8_t intra_pred_mode_c[4];
332  uint8_t chroma_mode_c[4];
334 
335 typedef struct TransformUnit {
337 
339 
340  // Inferred parameters;
348  uint8_t cross_pf;
349 } TransformUnit;
350 
351 typedef struct DBParams {
354 } DBParams;
355 
356 #define HEVC_FRAME_FLAG_OUTPUT (1 << 0)
357 #define HEVC_FRAME_FLAG_SHORT_REF (1 << 1)
358 #define HEVC_FRAME_FLAG_LONG_REF (1 << 2)
359 #define HEVC_FRAME_FLAG_UNAVAILABLE (1 << 3)
360 #define HEVC_FRAME_FLAG_CORRUPT (1 << 4)
361 
362 typedef struct HEVCFrame {
363  union {
364  struct {
366  };
368  };
370  int needs_fg; /* 1 if grain needs to be applied by the decoder */
371  MvField *tab_mvf; ///< RefStruct reference
373  RefPicListTab **rpl_tab; ///< RefStruct reference
375  int poc;
376 
377  const HEVCPPS *pps; ///< RefStruct reference
378  RefPicListTab *rpl; ///< RefStruct reference
380 
381  void *hwaccel_picture_private; ///< RefStruct reference
382 
383  // for secondary-layer frames, this is the DPB index of the base-layer frame
384  // from the same AU, if it exists, otherwise -1
386 
387  /**
388  * A combination of HEVC_FRAME_FLAG_*
389  */
390  uint8_t flags;
391 } HEVCFrame;
392 
393 typedef struct HEVCLocalContext {
395 
397 
398  uint8_t first_qp_group;
399 
400  void *logctx;
401  const struct HEVCContext *parent;
402 
404 
405  /**
406  * This is a pointer to the common CABAC state.
407  * In case entropy_coding_sync_enabled_flag is set,
408  * the CABAC state after decoding the second CTU in a row is
409  * stored here and used to initialize the CABAC state before
410  * decoding the first CTU in the next row.
411  * This is the basis for WPP and in case slice-threading is used,
412  * the next row is decoded by another thread making this state
413  * shared between threads.
414  */
416 
417  int8_t qp_y;
418  int8_t curr_qp_y;
419 
420  int qPy_pred;
421 
423 
424  uint8_t ctb_left_flag;
425  uint8_t ctb_up_flag;
430  /* +7 is for subpixel interpolation, *2 for high bit depths */
432  /* The extended size between the new edge emu buffer is abused by SAO */
435 
436  int ct_depth;
440 
441 #define BOUNDARY_LEFT_SLICE (1 << 0)
442 #define BOUNDARY_LEFT_TILE (1 << 1)
443 #define BOUNDARY_UPPER_SLICE (1 << 2)
444 #define BOUNDARY_UPPER_TILE (1 << 3)
445  /* properties of the boundary of the current CTB for the purposes
446  * of the deblocking filter */
448 
449  // an array of these structs is used for per-thread state - pad its size
450  // to avoid false sharing
451  char padding[128];
453 
454 typedef struct HEVCLayerContext {
457 
458  const HEVCSPS *sps; // RefStruct reference
459 
460  int bs_width;
462 
465 
466  // CU
467  uint8_t *skip_flag;
468  uint8_t *tab_ct_depth;
469 
470  // PU
471  uint8_t *cbf_luma; // cbf_luma of colocated TU
472  uint8_t *tab_ipm;
473  uint8_t *is_pcm;
474 
475  // CTB-level flags affecting loop filter operation
477 
479 
480  int8_t *qp_y_tab;
481 
482  uint8_t *horizontal_bs;
483  uint8_t *vertical_bs;
484 
485  uint8_t *sao_pixel_buffer_h[3];
486  uint8_t *sao_pixel_buffer_v[3];
487 
491 
492 typedef struct HEVCContext {
493  const AVClass *c; // needed by private avoptions
495 
497  unsigned nb_local_ctx;
498 
499  // per-layer decoding state, addressed by VPS layer indices
501  // VPS index of the layer currently being decoded
502  unsigned cur_layer;
503  // bitmask of layer indices that are active for decoding/output
506 
507  /** 1 if the independent slice segment header was successfully parsed */
509 
511 
514  struct AVMD5 *md5_ctx;
515 
516  ///< candidate references for the current frame
518 
519  const HEVCVPS *vps; ///< RefStruct reference
520  const HEVCPPS *pps; ///< RefStruct reference
523  int temporal_id; ///< temporal_id_plus1 - 1
526  int poc;
527  int poc_tid0;
528  int slice_idx; ///< number of the slice being currently decoded
529  int eos; ///< current packet contains an EOS/EOB NAL
530  int last_eos; ///< last packet contains an EOS/EOB NAL
532 
533  // NoRaslOutputFlag associated with the last IRAP frame
535 
541 
542  /** used on BE to byteswap the lines for checksumming */
543  uint8_t *checksum_buf;
545 
546  /** The target for the common_cabac_state of the local contexts. */
548 
550  unsigned nb_wpp_progress;
551 
553 
554  const uint8_t *data;
555 
557  // type of the first VCL NAL of the current frame
559  // index in pkt.nals of the NAL unit after which we can call
560  // ff_thread_finish_setup()
562 
563  int is_nalff; ///< this flag is != 0 if bitstream is encapsulated
564  ///< as a format defined in 14496-15
566 
567  // multi-layer AVOptions
568  int *view_ids;
569  unsigned nb_view_ids;
570 
573 
576 
577  int nal_length_size; ///< Number of bytes used for nal length (1, 2 or 4)
579 
581 
582  // dts of the packet currently being decoded
584 
585  AVBufferRef *rpu_buf; ///< 0 or 1 Dolby Vision RPUs.
586  DOVIContext dovi_ctx; ///< Dolby Vision decoding context
587 } HEVCContext;
588 
589 /**
590  * Mark all frames in DPB as unused for reference.
591  */
593 
594 /**
595  * Drop all frames currently in DPB.
596  */
598 
599 const RefPicList *ff_hevc_get_ref_list(const HEVCFrame *frame, int x0, int y0);
600 
601 /**
602  * Construct the reference picture sets for the current frame.
603  */
605 
606 /**
607  * Construct the reference picture list(s) for the current slice.
608  */
610 
612  int ctb_addr_ts);
614  int ctb_addr_ts, const uint8_t *data, size_t size,
615  int is_wpp);
624 int ff_hevc_skip_flag_decode(HEVCLocalContext *lc, uint8_t *skip_flag,
625  int x0, int y0, int x_cb, int y_cb, int min_cb_width);
627 int ff_hevc_split_coding_unit_flag_decode(HEVCLocalContext *lc, uint8_t *tab_ct_depth,
628  const HEVCSPS *sps,
629  int ct_depth, int x0, int y0);
630 int ff_hevc_part_mode_decode(HEVCLocalContext *lc, const HEVCSPS *sps, int log2_cb_size);
638 int ff_hevc_inter_pred_idc_decode(HEVCLocalContext *lc, int nPbW, int nPbH);
639 int ff_hevc_ref_idx_lx_decode(HEVCLocalContext *lc, int num_ref_idx_lx);
642 int ff_hevc_split_transform_flag_decode(HEVCLocalContext *lc, int log2_trafo_size);
643 int ff_hevc_cbf_cb_cr_decode(HEVCLocalContext *lc, int trafo_depth);
644 int ff_hevc_cbf_luma_decode(HEVCLocalContext *lc, int trafo_depth);
647 
648 /**
649  * Get the number of candidate references for the current frame.
650  */
651 int ff_hevc_frame_nb_refs(const SliceHeader *sh, const HEVCPPS *pps,
652  unsigned layer_idx);
653 
655 
657 {
658  switch (type) {
659  case HEVC_NAL_TRAIL_N:
660  case HEVC_NAL_TSA_N:
661  case HEVC_NAL_STSA_N:
662  case HEVC_NAL_RADL_N:
663  case HEVC_NAL_RASL_N:
664  case HEVC_NAL_VCL_N10:
665  case HEVC_NAL_VCL_N12:
666  case HEVC_NAL_VCL_N14:
667  return 1;
668  default: break;
669  }
670  return 0;
671 }
672 
673 /**
674  * Find frames in the DPB that are ready for output and either write them to the
675  * output FIFO or drop their output flag, depending on the value of discard.
676  *
677  * @param max_output maximum number of AUs with an output-pending frame in at
678  * least one layer that can be present in the DPB before output
679  * is triggered
680  * @param max_dpb maximum number of any frames that can be present in the DPB
681  * for any layer before output is triggered
682  */
684  unsigned layers_active_decode, unsigned layers_active_output,
685  unsigned max_output, unsigned max_dpb, int discard);
686 
688 
689 void ff_hevc_set_neighbour_available(HEVCLocalContext *lc, int x0, int y0,
690  int nPbW, int nPbH, int log2_ctb_size);
692  int x0, int y0,
693  int nPbW, int nPbH, int log2_cb_size,
694  int part_idx, int merge_idx, MvField *mv);
696  int x0, int y0,
697  int nPbW, int nPbH, int log2_cb_size,
698  int part_idx, int merge_idx,
699  MvField *mv, int mvp_lx_flag, int LX);
701  const HEVCPPS *pps,
702  int x, int y, int ctb_size);
704  const HEVCPPS *pps,
705  int x_ctb, int y_ctb, int ctb_size);
707  const HEVCLayerContext *l, const HEVCPPS *pps,
708  int xBase, int yBase, int log2_cb_size);
710  const HEVCPPS *pps,
711  int x0, int y0, int log2_trafo_size);
715 int ff_hevc_cu_chroma_qp_offset_idx(HEVCLocalContext *lc, int chroma_qp_offset_list_len_minus1);
717  int x0, int y0,
718  int log2_trafo_size, enum ScanType scan_idx,
719  int c_idx);
720 
721 void ff_hevc_hls_mvd_coding(HEVCLocalContext *lc, int x0, int y0, int log2_cb_size);
722 
724 
725 extern const uint8_t ff_hevc_qpel_extra_before[4];
726 extern const uint8_t ff_hevc_qpel_extra_after[4];
727 extern const uint8_t ff_hevc_qpel_extra[4];
728 
729 #endif /* AVCODEC_HEVC_HEVCDEC_H */
HEVCLocalContext::na
NeighbourAvailable na
Definition: hevcdec.h:439
HEVCLayerContext::tab_ct_depth
uint8_t * tab_ct_depth
Definition: hevcdec.h:468
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: cabac.c:981
HEVCContext::temporal_id
int temporal_id
temporal_id_plus1 - 1
Definition: hevcdec.h:523
HEVCLayerContext::horizontal_bs
uint8_t * horizontal_bs
Definition: hevcdec.h:482
SliceHeader::beta_offset
int beta_offset
beta_offset_div2 * 2
Definition: hevcdec.h:261
bswapdsp.h
DBParams
Definition: hevcdec.h:351
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: cabac.c:623
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: mvs.c:589
HEVCLocalContext
Definition: hevcdec.h:393
HEVCFrame::flags
uint8_t flags
A combination of HEVC_FRAME_FLAG_*.
Definition: hevcdec.h:390
HEVCLayerContext::bs_height
int bs_height
Definition: hevcdec.h:461
SliceHeader::slice_act_cr_qp_offset
int slice_act_cr_qp_offset
Definition: hevcdec.h:257
INTRA_ANGULAR_28
@ INTRA_ANGULAR_28
Definition: hevcdec.h:155
HEVCContext::view_pos_available
unsigned * view_pos_available
Definition: hevcdec.h:574
h2645_parse.h
SliceHeader::chroma_offset_l1
int16_t chroma_offset_l1[16][2]
Definition: hevcdec.h:286
LT_FOLL
@ LT_FOLL
Definition: hevcdec.h:90
SAO_EO_45D
@ SAO_EO_45D
Definition: hevcdec.h:175
cabac.h
HEVCContext::nuh_layer_id
int nuh_layer_id
Definition: hevcdec.h:578
INTRA_ANGULAR_29
@ INTRA_ANGULAR_29
Definition: hevcdec.h:156
PART_NxN
@ PART_NxN
Definition: hevcdec.h:100
mem_internal.h
INTRA_ANGULAR_30
@ INTRA_ANGULAR_30
Definition: hevcdec.h:157
SliceHeader::slice_act_y_qp_offset
int slice_act_y_qp_offset
Definition: hevcdec.h:255
HEVCContext::rps
RefPicList rps[NB_RPS_TYPE]
Definition: hevcdec.h:517
ThreadProgress
ThreadProgress is an API to easily notify other threads about progress of any kind as long as it can ...
Definition: threadprogress.h:43
INTRA_ANGULAR_34
@ INTRA_ANGULAR_34
Definition: hevcdec.h:161
HEVCContext::layers_active_output
unsigned layers_active_output
Definition: hevcdec.h:505
INTRA_ANGULAR_27
@ INTRA_ANGULAR_27
Definition: hevcdec.h:154
SAO_APPLIED
@ SAO_APPLIED
Definition: hevcdec.h:168
SAO_BAND
@ SAO_BAND
Definition: hevcdec.h:166
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: mvs.c:43
HEVC_VPS_MAX_LAYERS
#define HEVC_VPS_MAX_LAYERS
Definition: ps.h:35
INTRA_ANGULAR_2
@ INTRA_ANGULAR_2
Definition: hevcdec.h:129
HEVCContext::slice_initialized
uint8_t slice_initialized
1 if the independent slice segment header was successfully parsed
Definition: hevcdec.h:508
ff_hevc_res_scale_sign_flag
int ff_hevc_res_scale_sign_flag(HEVCLocalContext *lc, int idx)
Definition: cabac.c:861
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: filter.c:742
HEVCContext::nb_view_ids_available
unsigned nb_view_ids_available
Definition: hevcdec.h:572
HEVCContext::output_fifo
struct AVContainerFifo * output_fifo
Definition: hevcdec.h:510
HEVCLocalContext::ctb_up_flag
uint8_t ctb_up_flag
Definition: hevcdec.h:425
CodingUnit
Definition: hevcdec.h:292
HEVCFrame::needs_fg
int needs_fg
Definition: hevcdec.h:370
int64_t
long long int64_t
Definition: coverity.c:34
HEVCLayerContext::tab_ipm
uint8_t * tab_ipm
Definition: hevcdec.h:472
mv
static const int8_t mv[256][2]
Definition: 4xm.c:81
SliceHeader::num_entry_point_offsets
int num_entry_point_offsets
Definition: hevcdec.h:270
HEVCFrame::frame_grain
AVFrame * frame_grain
Definition: hevcdec.h:369
PART_2NxnU
@ PART_2NxnU
Definition: hevcdec.h:101
HEVCContext::md5_ctx
struct AVMD5 * md5_ctx
candidate references for the current frame
Definition: hevcdec.h:514
ff_hevc_flush_dpb
void ff_hevc_flush_dpb(HEVCContext *s)
Drop all frames currently in DPB.
Definition: refs.c:75
ff_hevc_save_states
void ff_hevc_save_states(HEVCLocalContext *lc, const HEVCPPS *pps, int ctb_addr_ts)
Definition: cabac.c:402
HEVCLayerContext::bs_width
int bs_width
Definition: hevcdec.h:460
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:410
ff_hevc_is_alpha_video
int ff_hevc_is_alpha_video(const HEVCContext *s)
Definition: hevcdec.c:469
ff_hevc_sao_type_idx_decode
int ff_hevc_sao_type_idx_decode(HEVCLocalContext *lc)
Definition: cabac.c:521
HEVCFrame::tab_mvf
MvField * tab_mvf
RefStruct reference.
Definition: hevcdec.h:371
TransformUnit::cu_qp_delta
int cu_qp_delta
Definition: hevcdec.h:336
ScanType
ScanType
Definition: hevcdec.h:178
ff_hevc_intra_chroma_pred_mode_decode
int ff_hevc_intra_chroma_pred_mode_decode(HEVCLocalContext *lc)
Definition: cabac.c:725
HEVCFrame::hwaccel_picture_private
void * hwaccel_picture_private
RefStruct reference.
Definition: hevcdec.h:381
NeighbourAvailable::cand_left
int cand_left
Definition: hevcdec.h:318
NeighbourAvailable::cand_up
int cand_up
Definition: hevcdec.h:319
ff_hevc_qpel_extra_before
const uint8_t ff_hevc_qpel_extra_before[4]
INTRA_DC
@ INTRA_DC
Definition: hevcdec.h:128
HEVCContext::collocated_ref
HEVCFrame * collocated_ref
Definition: hevcdec.h:525
HEVCContext::no_rasl_output_flag
int no_rasl_output_flag
Definition: hevcdec.h:534
NeighbourAvailable::cand_up_right
int cand_up_right
Definition: hevcdec.h:321
data
const char data[16]
Definition: mxf.c:149
Mv::y
int16_t y
vertical component of motion vector
Definition: hevcdec.h:307
HEVC_NAL_TSA_N
@ HEVC_NAL_TSA_N
Definition: hevc.h:31
HEVCContext::checksum_buf_size
int checksum_buf_size
Definition: hevcdec.h:544
SAO_EDGE
@ SAO_EDGE
Definition: hevcdec.h:167
atomic_int
intptr_t atomic_int
Definition: stdatomic.h:55
SliceHeader::slice_temporal_mvp_enabled_flag
uint8_t slice_temporal_mvp_enabled_flag
Definition: hevcdec.h:237
ff_hevc_get_ref_list
const RefPicList * ff_hevc_get_ref_list(const HEVCFrame *frame, int x0, int y0)
Definition: refs.c:56
ff_hevc_rem_intra_luma_pred_mode_decode
int ff_hevc_rem_intra_luma_pred_mode_decode(HEVCLocalContext *lc)
Definition: cabac.c:715
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: filter.c:122
TransformUnit::is_cu_qp_delta_coded
uint8_t is_cu_qp_delta_coded
Definition: hevcdec.h:344
MODE_INTRA
@ MODE_INTRA
Definition: hevcdec.h:109
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 the...
Definition: refs.c:264
HEVCContext::data
const uint8_t * data
Definition: hevcdec.h:554
SliceHeader::slice_loop_filter_across_slices_enabled_flag
uint8_t slice_loop_filter_across_slices_enabled_flag
Definition: hevcdec.h:246
ff_hevc_sao_eo_class_decode
int ff_hevc_sao_eo_class_decode(HEVCLocalContext *lc)
Definition: cabac.c:556
HEVCLocalContext::ctb_up_left_flag
uint8_t ctb_up_left_flag
Definition: hevcdec.h:427
HEVCContext::bdsp
BswapDSPContext bdsp
Definition: hevcdec.h:539
ff_hevc_cu_qp_delta_abs
int ff_hevc_cu_qp_delta_abs(HEVCLocalContext *lc)
Definition: cabac.c:586
DPB
Decoded Picture Buffer (DPB).
Definition: vaapi_h264.c:82
ff_hevc_ref_idx_lx_decode
int ff_hevc_ref_idx_lx_decode(HEVCLocalContext *lc, int num_ref_idx_lx)
Definition: cabac.c:762
HEVCContext::checksum_buf
uint8_t * checksum_buf
used on BE to byteswap the lines for checksumming
Definition: hevcdec.h:543
bit_depth
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
Definition: af_astats.c:246
INTRA_ANGULAR_9
@ INTRA_ANGULAR_9
Definition: hevcdec.h:136
RefPicList
Definition: hevcdec.h:196
PF_INTRA
@ PF_INTRA
Definition: hevcdec.h:120
INTRA_ANGULAR_10
@ INTRA_ANGULAR_10
Definition: hevcdec.h:137
ff_hevc_cbf_luma_decode
int ff_hevc_cbf_luma_decode(HEVCLocalContext *lc, int trafo_depth)
Definition: cabac.c:831
MODE_SKIP
@ MODE_SKIP
Definition: hevcdec.h:110
HEVCLayerContext::skip_flag
uint8_t * skip_flag
Definition: hevcdec.h:467
HEVCLocalContext::end_of_tiles_x
int end_of_tiles_x
Definition: hevcdec.h:428
CodingUnit::x
int x
Definition: hevcdec.h:293
SAOType
SAOType
Definition: hevcdec.h:164
PART_2Nx2N
@ PART_2Nx2N
Definition: hevcdec.h:97
ff_hevc_sao_offset_abs_decode
int ff_hevc_sao_offset_abs_decode(HEVCLocalContext *lc, int bit_depth)
Definition: cabac.c:541
ff_hevc_cbf_cb_cr_decode
int ff_hevc_cbf_cb_cr_decode(HEVCLocalContext *lc, int trafo_depth)
Definition: cabac.c:826
HEVCLocalContext::ctb_up_right_flag
uint8_t ctb_up_right_flag
Definition: hevcdec.h:426
HEVCLayerContext::tab_slice_address
int32_t * tab_slice_address
Definition: hevcdec.h:478
HEVCLocalContext::common_cabac_state
HEVCCABACState * common_cabac_state
This is a pointer to the common CABAC state.
Definition: hevcdec.h:415
SAO_EO_135D
@ SAO_EO_135D
Definition: hevcdec.h:174
HEVCLayerContext::sao_pixel_buffer_v
uint8_t * sao_pixel_buffer_v[3]
Definition: hevcdec.h:486
HEVC_NAL_VCL_N14
@ HEVC_NAL_VCL_N14
Definition: hevc.h:43
HEVCLayerContext::sao_pixel_buffer_h
uint8_t * sao_pixel_buffer_h[3]
Definition: hevcdec.h:485
PRED_BI
@ PRED_BI
Definition: hevcdec.h:116
ff_hevc_cu_qp_delta_sign_flag
int ff_hevc_cu_qp_delta_sign_flag(HEVCLocalContext *lc)
Definition: cabac.c:613
DOVIContext
Definition: dovi_rpu.h:42
ff_hevc_end_of_slice_flag_decode
int ff_hevc_end_of_slice_flag_decode(HEVCLocalContext *lc)
Definition: cabac.c:563
INTRA_ANGULAR_3
@ INTRA_ANGULAR_3
Definition: hevcdec.h:130
PredictionUnit::intra_pred_mode_c
uint8_t intra_pred_mode_c[4]
Definition: hevcdec.h:331
PredictionUnit
Definition: hevcdec.h:325
HEVCContext::finish_setup_nal_idx
unsigned finish_setup_nal_idx
Definition: hevcdec.h:561
InterPredIdc
InterPredIdc
Definition: hevcdec.h:113
MODE_INTER
@ MODE_INTER
Definition: hevcdec.h:108
SliceHeader::luma_log2_weight_denom
uint8_t luma_log2_weight_denom
Definition: hevcdec.h:274
HEVCLocalContext::pu
PredictionUnit pu
Definition: hevcdec.h:438
sei.h
TransformUnit::res_scale_val
int res_scale_val
Definition: hevcdec.h:338
SliceHeader::short_term_ref_pic_set_size
int short_term_ref_pic_set_size
Definition: hevcdec.h:228
type
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
Definition: writing_filters.txt:86
dovi_rpu.h
SliceHeader::long_term_ref_pic_set_size
int long_term_ref_pic_set_size
Definition: hevcdec.h:231
RefPicList::nb_refs
int nb_refs
Definition: hevcdec.h:200
HEVCContext::h274db
H274FilmGrainDatabase h274db
Definition: hevcdec.h:540
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: mvs.c:482
AVMD5
Definition: md5.c:42
progressframe.h
SliceHeader::slice_segment_addr
unsigned int slice_segment_addr
address (in raster order) of the first block in the current slice
Definition: hevcdec.h:211
HEVCContext::apply_defdispwin
int apply_defdispwin
Definition: hevcdec.h:565
ff_hevc_part_mode_decode
int ff_hevc_part_mode_decode(HEVCLocalContext *lc, const HEVCSPS *sps, int log2_cb_size)
Definition: cabac.c:660
HEVCLayerContext::vertical_bs
uint8_t * vertical_bs
Definition: hevcdec.h:483
TransformUnit::intra_pred_mode
int intra_pred_mode
Definition: hevcdec.h:341
SliceHeader::cabac_init_flag
uint8_t cabac_init_flag
Definition: hevcdec.h:244
DBParams::beta_offset
int beta_offset
Definition: hevcdec.h:352
HEVCLocalContext::curr_qp_y
int8_t curr_qp_y
Definition: hevcdec.h:418
DBParams::tc_offset
int tc_offset
Definition: hevcdec.h:353
ff_hevc_cabac_init
int ff_hevc_cabac_init(HEVCLocalContext *lc, const HEVCPPS *pps, int ctb_addr_ts, const uint8_t *data, size_t size, int is_wpp)
Definition: cabac.c:454
INTRA_ANGULAR_23
@ INTRA_ANGULAR_23
Definition: hevcdec.h:150
HEVCLayerContext::cur_frame
HEVCFrame * cur_frame
Definition: hevcdec.h:456
HEVCLocalContext::parent
const struct HEVCContext * parent
Definition: hevcdec.h:401
s
#define s(width, name)
Definition: cbs_vp9.c:198
NeighbourAvailable::cand_bottom_left
int cand_bottom_left
Definition: hevcdec.h:317
HEVCContext::c
const AVClass * c
Definition: hevcdec.h:493
HEVC_NAL_VCL_N10
@ HEVC_NAL_VCL_N10
Definition: hevc.h:39
SAO_NOT_APPLIED
@ SAO_NOT_APPLIED
Definition: hevcdec.h:165
HEVCContext::last_eos
int last_eos
last packet contains an EOS/EOB NAL
Definition: hevcdec.h:530
HEVCNALUnitType
HEVCNALUnitType
Table 7-1 – NAL unit type codes and NAL unit type classes in T-REC-H.265-201802.
Definition: hevc.h:28
SliceHeader::luma_offset_l1
int16_t luma_offset_l1[16]
Definition: hevcdec.h:285
INTRA_ANGULAR_14
@ INTRA_ANGULAR_14
Definition: hevcdec.h:141
HEVCContext::slice_idx
int slice_idx
number of the slice being currently decoded
Definition: hevcdec.h:528
ff_hevc_nal_is_nonref
static av_always_inline int ff_hevc_nal_is_nonref(enum HEVCNALUnitType type)
Definition: hevcdec.h:656
HEVCSEI
Definition: sei.h:105
HEVCLocalContext::padding
char padding[128]
Definition: hevcdec.h:451
INTRA_ANGULAR_12
@ INTRA_ANGULAR_12
Definition: hevcdec.h:139
SliceHeader::slice_rps
ShortTermRPS slice_rps
Definition: hevcdec.h:229
ff_hevc_qpel_extra
const uint8_t ff_hevc_qpel_extra[4]
HEVCPredContext
Definition: pred.h:32
AVRefStructPool
AVRefStructPool is an API for a thread-safe pool of objects managed via the RefStruct API.
Definition: refstruct.c:183
HEVCFrame::rpl
RefPicListTab * rpl
RefStruct reference.
Definition: hevcdec.h:378
RPSType
RPSType
Definition: hevcdec.h:85
hevc.h
get_bits.h
INTRA_ANGULAR_18
@ INTRA_ANGULAR_18
Definition: hevcdec.h:145
RefPicList::ref
struct HEVCFrame * ref[HEVC_MAX_REFS]
Definition: hevcdec.h:197
AVContainerFifo
AVContainerFifo is a FIFO for "containers" - dynamically allocated reusable structs (e....
Definition: container_fifo.c:27
SliceHeader::size
int * size
Definition: hevcdec.h:269
HEVCContext::pps
const HEVCPPS * pps
RefStruct reference.
Definition: hevcdec.h:520
SliceHeader::collocated_list
uint8_t collocated_list
Definition: hevcdec.h:247
SliceHeader::luma_offset_l0
int16_t luma_offset_l0[16]
Definition: hevcdec.h:282
NeighbourAvailable::cand_up_right_sap
int cand_up_right_sap
Definition: hevcdec.h:322
HEVCLayerContext::tab_mvf_pool
struct AVRefStructPool * tab_mvf_pool
Definition: hevcdec.h:488
INTRA_ANGULAR_26
@ INTRA_ANGULAR_26
Definition: hevcdec.h:153
SliceHeader::chroma_weight_l1
int16_t chroma_weight_l1[16][2]
Definition: hevcdec.h:279
CodingUnit::max_trafo_depth
uint8_t max_trafo_depth
MaxTrafoDepth.
Definition: hevcdec.h:301
SliceHeader::slice_ctb_addr_rs
int slice_ctb_addr_rs
Definition: hevcdec.h:288
SliceHeader::poc
int poc
Definition: hevcdec.h:218
HEVCContext::nal_unit_type
enum HEVCNALUnitType nal_unit_type
Definition: hevcdec.h:522
HEVC_NAL_VCL_N12
@ HEVC_NAL_VCL_N12
Definition: hevc.h:41
SliceHeader::pic_output_flag
uint8_t pic_output_flag
Definition: hevcdec.h:222
HEVCContext::vps
const HEVCVPS * vps
RefStruct reference.
Definition: hevcdec.h:519
HEVCFrame::refPicList
RefPicList * refPicList
Definition: hevcdec.h:372
PredictionUnit::rem_intra_luma_pred_mode
int rem_intra_luma_pred_mode
Definition: hevcdec.h:327
INTRA_ANGULAR_11
@ INTRA_ANGULAR_11
Definition: hevcdec.h:138
HEVCContext::sei
HEVCSEI sei
Definition: hevcdec.h:513
HEVCLayerContext::deblock
DBParams * deblock
Definition: hevcdec.h:464
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:75
INTRA_ANGULAR_15
@ INTRA_ANGULAR_15
Definition: hevcdec.h:142
HEVCCABACState::state
uint8_t state[HEVC_CONTEXTS]
Definition: hevcdec.h:185
INTRA_ANGULAR_22
@ INTRA_ANGULAR_22
Definition: hevcdec.h:149
HEVCLocalContext::tmp
int16_t tmp[MAX_PB_SIZE *MAX_PB_SIZE]
Definition: hevcdec.h:434
ff_hevc_merge_flag_decode
int ff_hevc_merge_flag_decode(HEVCLocalContext *lc)
Definition: cabac.c:747
LongTermRPS::poc
int poc[32]
Definition: hevcdec.h:190
CodingUnit::cu_transquant_bypass_flag
uint8_t cu_transquant_bypass_flag
Definition: hevcdec.h:302
HEVCLocalContext::first_qp_group
uint8_t first_qp_group
Definition: hevcdec.h:398
HEVCContext::view_ids_available
unsigned * view_ids_available
Definition: hevcdec.h:571
HEVCLayerContext::cbf_luma
uint8_t * cbf_luma
Definition: hevcdec.h:471
HEVC_NAL_STSA_N
@ HEVC_NAL_STSA_N
Definition: hevc.h:33
HEVCFrame::rpl_tab
RefPicListTab ** rpl_tab
RefStruct reference.
Definition: hevcdec.h:373
LongTermRPS::poc_msb_present
uint8_t poc_msb_present[32]
Definition: hevcdec.h:191
ff_hevc_split_transform_flag_decode
int ff_hevc_split_transform_flag_decode(HEVCLocalContext *lc, int log2_trafo_size)
Definition: cabac.c:821
HEVCContext::film_grain_warning_shown
int film_grain_warning_shown
Definition: hevcdec.h:580
INTER_LAYER0
@ INTER_LAYER0
Definition: hevcdec.h:91
PART_Nx2N
@ PART_Nx2N
Definition: hevcdec.h:99
RefPicListTab
Definition: hevcdec.h:203
h274.h
HEVCContext::is_nalff
int is_nalff
this flag is != 0 if bitstream is encapsulated as a format defined in 14496-15
Definition: hevcdec.h:563
SliceHeader::nb_refs
unsigned int nb_refs[2]
Definition: hevcdec.h:239
Mv::x
int16_t x
horizontal component of motion vector
Definition: hevcdec.h:306
HEVCSliceType
HEVCSliceType
Definition: hevc.h:95
INTRA_ANGULAR_5
@ INTRA_ANGULAR_5
Definition: hevcdec.h:132
PF_BI
@ PF_BI
Definition: hevcdec.h:123
HEVCContext::poc
int poc
Definition: hevcdec.h:526
INTRA_ANGULAR_16
@ INTRA_ANGULAR_16
Definition: hevcdec.h:143
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: cabac.c:573
SCAN_HORIZ
@ SCAN_HORIZ
Definition: hevcdec.h:180
TransformUnit
Definition: hevcdec.h:335
HEVCLocalContext::edge_emu_buffer
uint8_t edge_emu_buffer[(MAX_PB_SIZE+7) *EDGE_EMU_BUFFER_STRIDE *2]
Definition: hevcdec.h:431
LongTermRPS::used
uint8_t used[32]
Definition: hevcdec.h:192
ff_hevc_hls_filter
void ff_hevc_hls_filter(HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, int x, int y, int ctb_size)
Definition: filter.c:872
SliceHeader::colour_plane_id
uint8_t colour_plane_id
Definition: hevcdec.h:223
PART_nLx2N
@ PART_nLx2N
Definition: hevcdec.h:103
HEVCContext::nal_length_size
int nal_length_size
Number of bytes used for nal length (1, 2 or 4)
Definition: hevcdec.h:577
SliceHeader::dependent_slice_segment_flag
uint8_t dependent_slice_segment_flag
Definition: hevcdec.h:221
ff_hevc_set_new_ref
int ff_hevc_set_new_ref(HEVCContext *s, HEVCLayerContext *l, int poc)
Definition: refs.c:209
SliceHeader::slice_act_cb_qp_offset
int slice_act_cb_qp_offset
Definition: hevcdec.h:256
ST_FOLL
@ ST_FOLL
Definition: hevcdec.h:88
SliceHeader::first_slice_in_pic_flag
uint8_t first_slice_in_pic_flag
Definition: hevcdec.h:220
HEVCLocalContext::ctb_left_flag
uint8_t ctb_left_flag
Definition: hevcdec.h:424
dsp.h
H274FilmGrainDatabase
Definition: h274.h:34
ff_hevc_cu_transquant_bypass_flag_decode
int ff_hevc_cu_transquant_bypass_flag_decode(HEVCLocalContext *lc)
Definition: cabac.c:568
ff_hevc_frame_rps
int ff_hevc_frame_rps(HEVCContext *s, HEVCLayerContext *l)
Construct the reference picture sets for the current frame.
Definition: refs.c:533
DECLARE_ALIGNED
#define DECLARE_ALIGNED(n, t, v)
Definition: mem_internal.h:104
INTRA_ANGULAR_17
@ INTRA_ANGULAR_17
Definition: hevcdec.h:144
HEVC_NAL_RASL_N
@ HEVC_NAL_RASL_N
Definition: hevc.h:37
ff_hevc_unref_frame
void ff_hevc_unref_frame(HEVCFrame *frame, int flags)
Definition: refs.c:34
ff_hevc_mpm_idx_decode
int ff_hevc_mpm_idx_decode(HEVCLocalContext *lc)
Definition: cabac.c:707
INTRA_PLANAR
@ INTRA_PLANAR
Definition: hevcdec.h:127
HEVCLocalContext::cabac_state
uint8_t cabac_state[HEVC_CONTEXTS]
Definition: hevcdec.h:394
PART_2NxnD
@ PART_2NxnD
Definition: hevcdec.h:102
HEVCContext::pkt_dts
int64_t pkt_dts
Definition: hevcdec.h:583
size
int size
Definition: twinvq_data.h:10344
PartMode
PartMode
Definition: hevcdec.h:96
SCAN_VERT
@ SCAN_VERT
Definition: hevcdec.h:181
SliceHeader::collocated_ref_idx
unsigned int collocated_ref_idx
Definition: hevcdec.h:249
HEVCContext::nb_view_ids
unsigned nb_view_ids
Definition: hevcdec.h:569
SliceHeader::entry_point_offset
unsigned * entry_point_offset
Definition: hevcdec.h:267
TransformUnit::chroma_mode_c
int chroma_mode_c
Definition: hevcdec.h:343
HEVCContext::cur_layer
unsigned cur_layer
Definition: hevcdec.h:502
ps.h
SliceHeader::short_term_ref_pic_set_sps_flag
int short_term_ref_pic_set_sps_flag
Definition: hevcdec.h:227
SliceHeader::no_output_of_prior_pics_flag
uint8_t no_output_of_prior_pics_flag
Definition: hevcdec.h:236
MvField
Definition: hevcdec.h:310
buffer.h
PF_L1
@ PF_L1
Definition: hevcdec.h:122
HEVC_STAT_COEFFS
#define HEVC_STAT_COEFFS
Definition: hevcdec.h:54
HEVCDSPContext
Definition: dsp.h:47
HEVCContext::dovi_ctx
DOVIContext dovi_ctx
Dolby Vision decoding context.
Definition: hevcdec.h:586
SliceHeader::chroma_weight_l0
int16_t chroma_weight_l0[16][2]
Definition: hevcdec.h:278
ff_hevc_no_residual_syntax_flag_decode
int ff_hevc_no_residual_syntax_flag_decode(HEVCLocalContext *lc)
Definition: cabac.c:783
HEVCFrame::base_layer_frame
int base_layer_frame
Definition: hevcdec.h:385
HEVCContext::ps
HEVCParamSets ps
Definition: hevcdec.h:512
TransformUnit::cu_qp_offset_cb
int8_t cu_qp_offset_cb
Definition: hevcdec.h:346
SliceHeader::chroma_log2_weight_denom
int16_t chroma_log2_weight_denom
Definition: hevcdec.h:275
MvField::pred_flag
int8_t pred_flag
Definition: hevcdec.h:313
HEVCLocalContext::ct_depth
int ct_depth
Definition: hevcdec.h:436
INTRA_ANGULAR_7
@ INTRA_ANGULAR_7
Definition: hevcdec.h:134
PART_nRx2N
@ PART_nRx2N
Definition: hevcdec.h:104
SliceHeader::slice_cb_qp_offset
int slice_cb_qp_offset
Definition: hevcdec.h:252
SliceHeader
Definition: hevcdec.h:207
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: refs.c:613
INTRA_ANGULAR_8
@ INTRA_ANGULAR_8
Definition: hevcdec.h:135
HEVCLayerContext::filter_slice_edges
uint8_t * filter_slice_edges
Definition: hevcdec.h:476
ff_hevc_inter_pred_idc_decode
int ff_hevc_inter_pred_idc_decode(HEVCLocalContext *lc, int nPbW, int nPbH)
Definition: cabac.c:752
HEVCLayerContext::qp_y_tab
int8_t * qp_y_tab
Definition: hevcdec.h:480
HEVCContext::cabac
HEVCCABACState cabac
The target for the common_cabac_state of the local contexts.
Definition: hevcdec.h:547
HEVCContext::avctx
AVCodecContext * avctx
Definition: hevcdec.h:494
SliceHeader::slice_sample_adaptive_offset_flag
uint8_t slice_sample_adaptive_offset_flag[3]
Definition: hevcdec.h:241
HEVCContext::cur_frame
HEVCFrame * cur_frame
Definition: hevcdec.h:524
INTRA_ANGULAR_32
@ INTRA_ANGULAR_32
Definition: hevcdec.h:159
INTRA_ANGULAR_21
@ INTRA_ANGULAR_21
Definition: hevcdec.h:148
HEVCFrame
Definition: hevcdec.h:362
HEVCFrame::tf
ProgressFrame tf
Definition: hevcdec.h:367
HEVC_MAX_REFS
@ HEVC_MAX_REFS
Definition: hevc.h:122
NeighbourAvailable::cand_up_left
int cand_up_left
Definition: hevcdec.h:320
INTRA_ANGULAR_6
@ INTRA_ANGULAR_6
Definition: hevcdec.h:133
ff_hevc_sao_merge_flag_decode
int ff_hevc_sao_merge_flag_decode(HEVCLocalContext *lc)
Definition: cabac.c:516
HEVCLayerContext
Definition: hevcdec.h:454
HEVCFrame::nb_rpl_elems
int nb_rpl_elems
Definition: hevcdec.h:379
HEVCLocalContext::logctx
void * logctx
Definition: hevcdec.h:400
HEVCFrame::ctb_count
int ctb_count
Definition: hevcdec.h:374
RefPicList::list
int list[HEVC_MAX_REFS]
Definition: hevcdec.h:198
SliceHeader::offset
int * offset
Definition: hevcdec.h:268
HEVCContext::view_ids
int * view_ids
Definition: hevcdec.h:568
HEVCContext::pkt
H2645Packet pkt
Definition: hevcdec.h:556
SliceHeader::mvd_l1_zero_flag
uint8_t mvd_l1_zero_flag
Definition: hevcdec.h:242
av_always_inline
#define av_always_inline
Definition: attributes.h:49
PF_L0
@ PF_L0
Definition: hevcdec.h:121
EDGE_EMU_BUFFER_STRIDE
#define EDGE_EMU_BUFFER_STRIDE
Definition: hevcdec.h:68
INTRA_ANGULAR_19
@ INTRA_ANGULAR_19
Definition: hevcdec.h:146
SliceHeader::data_offset
unsigned data_offset
Definition: hevcdec.h:289
ff_hevc_pred_mode_decode
int ff_hevc_pred_mode_decode(HEVCLocalContext *lc)
Definition: cabac.c:634
HEVCLocalContext::qp_y
int8_t qp_y
Definition: hevcdec.h:417
pred.h
ff_hevc_qpel_extra_after
const uint8_t ff_hevc_qpel_extra_after[4]
HEVCContext::wpp_progress
struct ThreadProgress * wpp_progress
Definition: hevcdec.h:549
SAO_EO_HORIZ
@ SAO_EO_HORIZ
Definition: hevcdec.h:172
SliceHeader::chroma_offset_l0
int16_t chroma_offset_l0[16][2]
Definition: hevcdec.h:283
SliceHeader::list_entry_lx
unsigned int list_entry_lx[2][32]
Definition: hevcdec.h:233
HEVCContext::recovery_poc
int recovery_poc
Definition: hevcdec.h:531
HEVCLocalContext::stat_coeff
uint8_t stat_coeff[HEVC_STAT_COEFFS]
Definition: hevcdec.h:396
HEVCFrame::poc
int poc
Definition: hevcdec.h:375
HEVCFrame::f
AVFrame * f
Definition: hevcdec.h:365
SAOEOClass
SAOEOClass
Definition: hevcdec.h:171
HEVCContext::nb_wpp_progress
unsigned nb_wpp_progress
Definition: hevcdec.h:550
SAOParams
Definition: dsp.h:34
SliceHeader::short_term_rps
const ShortTermRPS * short_term_rps
Definition: hevcdec.h:230
HEVCFrame::pps
const HEVCPPS * pps
RefStruct reference.
Definition: hevcdec.h:377
avcodec.h
MAX_PB_SIZE
#define MAX_PB_SIZE
Definition: dsp.h:32
SliceHeader::cu_chroma_qp_offset_enabled_flag
uint8_t cu_chroma_qp_offset_enabled_flag
Definition: hevcdec.h:259
HEVCContext::first_nal_type
enum HEVCNALUnitType first_nal_type
Definition: hevcdec.h:558
HEVCLayerContext::sps
const HEVCSPS * sps
Definition: hevcdec.h:458
NeighbourAvailable
Definition: hevcdec.h:316
frame
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
Definition: filter_design.txt:264
PRED_L1
@ PRED_L1
Definition: hevcdec.h:115
PredictionUnit::mvd
Mv mvd
Definition: hevcdec.h:329
IntraPredMode
IntraPredMode
Definition: hevcdec.h:126
ST_CURR_BEF
@ ST_CURR_BEF
Definition: hevcdec.h:86
SliceHeader::disable_deblocking_filter_flag
uint8_t disable_deblocking_filter_flag
slice_header_disable_deblocking_filter_flag
Definition: hevcdec.h:245
HEVCLocalContext::edge_emu_buffer2
uint8_t edge_emu_buffer2[(MAX_PB_SIZE+7) *EDGE_EMU_BUFFER_STRIDE *2]
Definition: hevcdec.h:433
sps
static int FUNC() sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
Definition: cbs_h264_syntax_template.c:260
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: cabac.c:639
SliceHeader::max_num_merge_cand
uint8_t max_num_merge_cand
5 - 5_minus_max_num_merge_cand
Definition: hevcdec.h:264
SliceHeader::luma_weight_l0
int16_t luma_weight_l0[16]
Definition: hevcdec.h:277
ff_hevc_merge_idx_decode
int ff_hevc_merge_idx_decode(HEVCLocalContext *lc)
Definition: cabac.c:736
HEVCLocalContext::boundary_flags
int boundary_flags
Definition: hevcdec.h:447
LongTermRPS
Definition: hevcdec.h:189
SliceHeader::slice_type
enum HEVCSliceType slice_type
Definition: hevcdec.h:215
LT_CURR
@ LT_CURR
Definition: hevcdec.h:89
AVCodecContext
main external API structure.
Definition: avcodec.h:451
INTRA_ANGULAR_25
@ INTRA_ANGULAR_25
Definition: hevcdec.h:152
HEVCContext::nb_view_pos_available
unsigned nb_view_pos_available
Definition: hevcdec.h:575
HEVCContext::layers_active_decode
unsigned layers_active_decode
Definition: hevcdec.h:504
ff_hevc_hls_mvd_coding
void ff_hevc_hls_mvd_coding(HEVCLocalContext *lc, int x0, int y0, int log2_cb_size)
Definition: cabac.c:1493
SliceHeader::slice_qp
int8_t slice_qp
Definition: hevcdec.h:272
PredMode
PredMode
Definition: hevcdec.h:107
PredictionUnit::merge_flag
uint8_t merge_flag
Definition: hevcdec.h:330
NB_RPS_TYPE
@ NB_RPS_TYPE
Definition: hevcdec.h:93
SliceHeader::slice_cr_qp_offset
int slice_cr_qp_offset
Definition: hevcdec.h:253
HEVCContext
Definition: hevcdec.h:492
ff_hevc_prev_intra_luma_pred_flag_decode
int ff_hevc_prev_intra_luma_pred_flag_decode(HEVCLocalContext *lc)
Definition: cabac.c:702
CodingUnit::pred_mode
enum PredMode pred_mode
PredMode.
Definition: hevcdec.h:296
HEVCContext::layers
HEVCLayerContext layers[HEVC_VPS_MAX_LAYERS]
Definition: hevcdec.h:500
SliceHeader::pic_order_cnt_lsb
int pic_order_cnt_lsb
Definition: hevcdec.h:217
HEVCContext::rpu_buf
AVBufferRef * rpu_buf
0 or 1 Dolby Vision RPUs.
Definition: hevcdec.h:585
HEVCLocalContext::qPy_pred
int qPy_pred
Definition: hevcdec.h:420
SCAN_DIAG
@ SCAN_DIAG
Definition: hevcdec.h:179
SliceHeader::rpl_modification_flag
uint8_t rpl_modification_flag[2]
Definition: hevcdec.h:235
pps
uint64_t pps
Definition: dovi_rpuenc.c:35
HEVCContext::local_ctx
HEVCLocalContext * local_ctx
Definition: hevcdec.h:496
ShortTermRPS
Definition: ps.h:75
SAO_EO_VERT
@ SAO_EO_VERT
Definition: hevcdec.h:173
ff_hevc_sao_offset_sign_decode
int ff_hevc_sao_offset_sign_decode(HEVCLocalContext *lc)
Definition: cabac.c:551
HEVCLocalContext::tu
TransformUnit tu
Definition: hevcdec.h:422
ff_hevc_log2_res_scale_abs
int ff_hevc_log2_res_scale_abs(HEVCLocalContext *lc, int idx)
Definition: cabac.c:851
VideoDSPContext
Definition: videodsp.h:40
CodingUnit::y
int y
Definition: hevcdec.h:294
HEVCContext::vdsp
VideoDSPContext vdsp
Definition: hevcdec.h:538
MvField::mv
Mv mv[2]
mvL0, vvL1
Definition: hevcdec.h:311
SliceHeader::inter_layer_pred
uint8_t inter_layer_pred
RPS coded in the slice header itself is stored here.
Definition: hevcdec.h:224
INTRA_ANGULAR_24
@ INTRA_ANGULAR_24
Definition: hevcdec.h:151
Mv
Definition: hevcdec.h:305
ff_hevc_clear_refs
void ff_hevc_clear_refs(HEVCLayerContext *l)
Mark all frames in DPB as unused for reference.
Definition: refs.c:66
MvField::ref_idx
int8_t ref_idx[2]
refIdxL0, refIdxL1
Definition: hevcdec.h:312
PRED_L0
@ PRED_L0
Definition: hevcdec.h:114
AVBufferRef
A reference to a data buffer.
Definition: buffer.h:82
HEVCVPS
Definition: ps.h:171
HEVCCABACState::stat_coeff
uint8_t stat_coeff[HEVC_STAT_COEFFS]
Definition: hevcdec.h:186
INTRA_ANGULAR_31
@ INTRA_ANGULAR_31
Definition: hevcdec.h:158
ff_hevc_slice_rpl
int ff_hevc_slice_rpl(HEVCContext *s)
Construct the reference picture list(s) for the current slice.
Definition: refs.c:342
HEVCContext::eos
int eos
current packet contains an EOS/EOB NAL
Definition: hevcdec.h:529
HEVCLayerContext::sao
SAOParams * sao
Definition: hevcdec.h:463
HEVCSPS
Definition: ps.h:255
ff_hevc_sao_band_position_decode
int ff_hevc_sao_band_position_decode(HEVCLocalContext *lc)
Definition: cabac.c:531
HEVCPPS
Definition: ps.h:374
ST_CURR_AFT
@ ST_CURR_AFT
Definition: hevcdec.h:87
CodingUnit::part_mode
enum PartMode part_mode
PartMode.
Definition: hevcdec.h:297
INTRA_ANGULAR_4
@ INTRA_ANGULAR_4
Definition: hevcdec.h:131
ProgressFrame
The ProgressFrame structure.
Definition: progressframe.h:73
SliceHeader::tc_offset
int tc_offset
tc_offset_div2 * 2
Definition: hevcdec.h:262
LongTermRPS::nb_refs
uint8_t nb_refs
Definition: hevcdec.h:193
PredFlag
PredFlag
Definition: hevcdec.h:119
TransformUnit::cross_pf
uint8_t cross_pf
Definition: hevcdec.h:348
HEVCLocalContext::cu
CodingUnit cu
Definition: hevcdec.h:437
SliceHeader::pps_id
unsigned int pps_id
address (in raster order) of the first block in the current slice segment
Definition: hevcdec.h:208
videodsp.h
SliceHeader::luma_weight_l1
int16_t luma_weight_l1[16]
Definition: hevcdec.h:280
HEVCContext::sh
SliceHeader sh
Definition: hevcdec.h:521
int32_t
int32_t
Definition: audioconvert.c:56
PredictionUnit::mpm_idx
int mpm_idx
Definition: hevcdec.h:326
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:482
HEVCContext::wpp_err
atomic_int wpp_err
Definition: hevcdec.h:552
INTRA_ANGULAR_33
@ INTRA_ANGULAR_33
Definition: hevcdec.h:160
PredictionUnit::chroma_mode_c
uint8_t chroma_mode_c[4]
Definition: hevcdec.h:332
PredictionUnit::intra_pred_mode
uint8_t intra_pred_mode[4]
Definition: hevcdec.h:328
HEVCContext::hpc
HEVCPredContext hpc
Definition: hevcdec.h:536
BswapDSPContext
Definition: bswapdsp.h:24
TransformUnit::is_cu_chroma_qp_offset_coded
uint8_t is_cu_chroma_qp_offset_coded
Definition: hevcdec.h:345
ff_hevc_pcm_flag_decode
int ff_hevc_pcm_flag_decode(HEVCLocalContext *lc)
Definition: cabac.c:697
SliceHeader::slice_qp_delta
int slice_qp_delta
Definition: hevcdec.h:251
SliceHeader::slice_addr
unsigned int slice_addr
Definition: hevcdec.h:213
SliceHeader::use_integer_mv_flag
uint8_t use_integer_mv_flag
Definition: hevcdec.h:265
HEVCLayerContext::rpl_tab_pool
struct AVRefStructPool * rpl_tab_pool
Definition: hevcdec.h:489
RefPicList::isLongTerm
int isLongTerm[HEVC_MAX_REFS]
Definition: hevcdec.h:199
HEVCCABACState
Definition: hevcdec.h:184
TransformUnit::intra_pred_mode_c
int intra_pred_mode_c
Definition: hevcdec.h:342
HEVCContext::hevcdsp
HEVCDSPContext hevcdsp
Definition: hevcdec.h:537
HEVC_NAL_RADL_N
@ HEVC_NAL_RADL_N
Definition: hevc.h:35
INTRA_ANGULAR_20
@ INTRA_ANGULAR_20
Definition: hevcdec.h:147
HEVCContext::nb_local_ctx
unsigned nb_local_ctx
Definition: hevcdec.h:497
INTRA_ANGULAR_13
@ INTRA_ANGULAR_13
Definition: hevcdec.h:140
HEVCLocalContext::end_of_tiles_y
int end_of_tiles_y
Definition: hevcdec.h:429
H2645Packet
Definition: h2645_parse.h:82
HEVCContext::poc_tid0
int poc_tid0
Definition: hevcdec.h:527
CodingUnit::intra_split_flag
uint8_t intra_split_flag
IntraSplitFlag.
Definition: hevcdec.h:300
ff_hevc_mvp_lx_flag_decode
int ff_hevc_mvp_lx_flag_decode(HEVCLocalContext *lc)
Definition: cabac.c:778
CABACContext
Definition: cabac.h:41
PART_2NxN
@ PART_2NxN
Definition: hevcdec.h:98
SliceHeader::long_term_rps
LongTermRPS long_term_rps
Definition: hevcdec.h:232
INTER_LAYER1
@ INTER_LAYER1
Definition: hevcdec.h:92
HEVCLayerContext::is_pcm
uint8_t * is_pcm
Definition: hevcdec.h:473
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)
Definition: filter.c:912
ff_hevc_cu_chroma_qp_offset_flag
int ff_hevc_cu_chroma_qp_offset_flag(HEVCLocalContext *lc)
Definition: cabac.c:618
HEVC_NAL_TRAIL_N
@ HEVC_NAL_TRAIL_N
Definition: hevc.h:29
HEVCLocalContext::cc
CABACContext cc
Definition: hevcdec.h:403
TransformUnit::cu_qp_offset_cr
int8_t cu_qp_offset_cr
Definition: hevcdec.h:347
HEVCParamSets
Definition: ps.h:511
HEVC_CONTEXTS
#define HEVC_CONTEXTS
Definition: hevcdec.h:53
RefPicListTab::refPicList
RefPicList refPicList[2]
Definition: hevcdec.h:204