FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups 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_HEVCDEC_H
24 #define AVCODEC_HEVCDEC_H
25 
26 #include <stdatomic.h>
27 
28 #include "libavutil/buffer.h"
29 
30 #include "avcodec.h"
31 #include "bswapdsp.h"
32 #include "cabac.h"
33 #include "get_bits.h"
34 #include "hevcpred.h"
35 #include "h2645_parse.h"
36 #include "hevc.h"
37 #include "hevc_ps.h"
38 #include "hevc_sei.h"
39 #include "hevcdsp.h"
40 #include "internal.h"
41 #include "thread.h"
42 #include "videodsp.h"
43 
44 #define MAX_NB_THREADS 16
45 #define SHIFT_CTB_WPP 2
46 
47 //TODO: check if this is really the maximum
48 #define MAX_TRANSFORM_DEPTH 5
49 
50 #define MAX_TB_SIZE 32
51 #define MAX_QP 51
52 #define DEFAULT_INTRA_TC_OFFSET 2
53 
54 #define HEVC_CONTEXTS 199
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 >= 16 && (s)->nal_unit_type <= 23)
80 
81 enum RPSType {
88 };
89 
140 };
141 
142 enum PartMode {
146  PART_NxN = 3,
151 };
152 
153 enum PredMode {
157 };
158 
160  PRED_L0 = 0,
163 };
164 
165 enum PredFlag {
166  PF_INTRA = 0,
170 };
171 
208 };
209 
210 enum SAOType {
215 };
216 
222 };
223 
224 enum ScanType {
228 };
229 
230 typedef struct RefPicList {
234  int nb_refs;
235 } RefPicList;
236 
237 typedef struct RefPicListTab {
239 } RefPicListTab;
240 
241 typedef struct CodingUnit {
242  int x;
243  int y;
244 
245  enum PredMode pred_mode; ///< PredMode
246  enum PartMode part_mode; ///< PartMode
247 
248  // Inferred parameters
249  uint8_t intra_split_flag; ///< IntraSplitFlag
250  uint8_t max_trafo_depth; ///< MaxTrafoDepth
252 } CodingUnit;
253 
254 typedef struct Mv {
255  int16_t x; ///< horizontal component of motion vector
256  int16_t y; ///< vertical component of motion vector
257 } Mv;
258 
259 typedef struct MvField {
261  int8_t ref_idx[2];
262  int8_t pred_flag;
263 } MvField;
264 
265 typedef struct NeighbourAvailable {
268  int cand_up;
273 
274 typedef struct PredictionUnit {
275  int mpm_idx;
283 
284 typedef struct TransformUnit {
286 
288 
289  // Inferred parameters;
298 } TransformUnit;
299 
300 typedef struct DBParams {
303 } DBParams;
304 
305 #define HEVC_FRAME_FLAG_OUTPUT (1 << 0)
306 #define HEVC_FRAME_FLAG_SHORT_REF (1 << 1)
307 #define HEVC_FRAME_FLAG_LONG_REF (1 << 2)
308 #define HEVC_FRAME_FLAG_BUMPING (1 << 3)
309 
310 typedef struct HEVCFrame {
317  int poc;
319 
323 
326 
327  /**
328  * A sequence counter, so that old frames are output first
329  * after a POC reset
330  */
331  uint16_t sequence;
332 
333  /**
334  * A combination of HEVC_FRAME_FLAG_*
335  */
337 } HEVCFrame;
338 
339 typedef struct HEVCLocalContext {
341 
343 
345 
348 
349  int8_t qp_y;
350  int8_t curr_qp_y;
351 
352  int qPy_pred;
353 
355 
362  /* +7 is for subpixel interpolation, *2 for high bit depths */
364  /* The extended size between the new edge emu buffer is abused by SAO */
367 
368  int ct_depth;
372 
373 #define BOUNDARY_LEFT_SLICE (1 << 0)
374 #define BOUNDARY_LEFT_TILE (1 << 1)
375 #define BOUNDARY_UPPER_SLICE (1 << 2)
376 #define BOUNDARY_UPPER_TILE (1 << 3)
377  /* properties of the boundary of the current CTB for the purposes
378  * of the deblocking filter */
381 
382 typedef struct HEVCContext {
383  const AVClass *c; // needed by private avoptions
385 
387 
390 
393 
394  int width;
395  int height;
396 
398 
399  /** 1 if the independent slice segment header was successfully parsed */
401 
406 
408 
411 
412  ///< candidate references for the current frame
414 
419  int temporal_id; ///< temporal_id_plus1 - 1
422  int poc;
423  int pocTid0;
424  int slice_idx; ///< number of the slice being currently decoded
425  int eos; ///< current packet contains an EOS/EOB NAL
426  int last_eos; ///< last packet contains an EOS/EOB NAL
427  int max_ra;
428  int bs_width;
430 
433 
438  int8_t *qp_y_tab;
441 
443 
444  // CU
447  // PU
449 
450  uint8_t *cbf_luma; // cbf_luma of colocated TU
452 
453  // CTB-level flags affecting loop filter operation
455 
456  /** used on BE to byteswap the lines for checksumming */
459 
460  /**
461  * Sequence counters for decoded and output frames, so that old
462  * frames are output first after a POC reset
463  */
464  uint16_t seq_decode;
465  uint16_t seq_output;
466 
469 
470  const uint8_t *data;
471 
473  // type of the first VCL NAL of the current frame
475 
477  int is_nalff; ///< this flag is != 0 if bitstream is encapsulated
478  ///< as a format defined in 14496-15
480 
481  int nal_length_size; ///< Number of bytes used for nal length (1, 2 or 4)
483 
485 } HEVCContext;
486 
487 /**
488  * Mark all frames in DPB as unused for reference.
489  */
491 
492 /**
493  * Drop all frames currently in DPB.
494  */
496 
498  int x0, int y0);
499 
500 /**
501  * Construct the reference picture sets for the current frame.
502  */
504 
505 /**
506  * Construct the reference picture list(s) for the current slice.
507  */
509 
510 void ff_hevc_save_states(HEVCContext *s, int ctb_addr_ts);
511 int ff_hevc_cabac_init(HEVCContext *s, int ctb_addr_ts);
520 int ff_hevc_skip_flag_decode(HEVCContext *s, int x0, int y0,
521  int x_cb, int y_cb);
524  int x0, int y0);
525 int ff_hevc_part_mode_decode(HEVCContext *s, int log2_cb_size);
533 int ff_hevc_inter_pred_idc_decode(HEVCContext *s, int nPbW, int nPbH);
534 int ff_hevc_ref_idx_lx_decode(HEVCContext *s, int num_ref_idx_lx);
537 int ff_hevc_split_transform_flag_decode(HEVCContext *s, int log2_trafo_size);
538 int ff_hevc_cbf_cb_cr_decode(HEVCContext *s, int trafo_depth);
539 int ff_hevc_cbf_luma_decode(HEVCContext *s, int trafo_depth);
542 
543 /**
544  * Get the number of candidate references for the current frame.
545  */
547 
549 
550 /**
551  * Find next frame in output order and put a reference to it in frame.
552  * @return 1 if a frame was output, 0 otherwise
553  */
555 
557 
559 
560 void ff_hevc_set_neighbour_available(HEVCContext *s, int x0, int y0,
561  int nPbW, int nPbH);
562 void ff_hevc_luma_mv_merge_mode(HEVCContext *s, int x0, int y0,
563  int nPbW, int nPbH, int log2_cb_size,
564  int part_idx, int merge_idx, MvField *mv);
565 void ff_hevc_luma_mv_mvp_mode(HEVCContext *s, int x0, int y0,
566  int nPbW, int nPbH, int log2_cb_size,
567  int part_idx, int merge_idx,
568  MvField *mv, int mvp_lx_flag, int LX);
569 void ff_hevc_set_qPy(HEVCContext *s, int xBase, int yBase,
570  int log2_cb_size);
572  int log2_trafo_size);
577 void ff_hevc_hls_filter(HEVCContext *s, int x, int y, int ctb_size);
578 void ff_hevc_hls_filters(HEVCContext *s, int x_ctb, int y_ctb, int ctb_size);
579 void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0,
580  int log2_trafo_size, enum ScanType scan_idx,
581  int c_idx);
582 
583 void ff_hevc_hls_mvd_coding(HEVCContext *s, int x0, int y0, int log2_cb_size);
584 
585 extern const uint8_t ff_hevc_qpel_extra_before[4];
586 extern const uint8_t ff_hevc_qpel_extra_after[4];
587 extern const uint8_t ff_hevc_qpel_extra[4];
588 
589 #endif /* AVCODEC_HEVCDEC_H */
int8_t cu_qp_offset_cr
Definition: hevcdec.h:296
uint8_t ctb_up_flag
Definition: hevcdec.h:357
AVFrame * frame
Definition: hevcdec.h:311
HEVCPredContext hpc
Definition: hevcdec.h:434
const char * s
Definition: avisynth_c.h:768
NeighbourAvailable na
Definition: hevcdec.h:371
int ff_hevc_slice_rpl(HEVCContext *s)
Construct the reference picture list(s) for the current slice.
Definition: hevc_refs.c:294
This structure describes decoded (raw) audio or video data.
Definition: frame.h:201
HEVCFrame * ref
Definition: hevcdec.h:420
#define HEVC_CONTEXTS
Definition: hevcdec.h:54
uint8_t is_cu_qp_delta_coded
Definition: hevcdec.h:293
int ff_hevc_inter_pred_idc_decode(HEVCContext *s, int nPbW, int nPbH)
Definition: hevc_cabac.c:795
static void flush(AVCodecContext *avctx)
int ff_hevc_sao_offset_sign_decode(HEVCContext *s)
Definition: hevc_cabac.c:596
void ff_hevc_set_qPy(HEVCContext *s, int xBase, int yBase, int log2_cb_size)
Definition: hevc_filter.c:121
VideoDSPContext vdsp
Definition: hevcdec.h:436
uint8_t edge_emu_buffer[(MAX_PB_SIZE+7)*EDGE_EMU_BUFFER_STRIDE *2]
Definition: hevcdec.h:363
const uint8_t ff_hevc_qpel_extra_before[4]
int ff_hevc_res_scale_sign_flag(HEVCContext *s, int idx)
Definition: hevc_cabac.c:903
int16_t x
horizontal component of motion vector
Definition: hevcdec.h:255
int ff_hevc_end_of_slice_flag_decode(HEVCContext *s)
Definition: hevc_cabac.c:608
void * hwaccel_picture_private
Definition: hevcdec.h:325
uint8_t * cabac_state
Definition: hevcdec.h:397
InterPredIdc
Definition: hevcdec.h:159
MvField * tab_mvf
Definition: hevcdec.h:313
int bs_width
Definition: hevcdec.h:428
uint8_t intra_split_flag
IntraSplitFlag.
Definition: hevcdec.h:249
int rem_intra_luma_pred_mode
Definition: hevcdec.h:276
void ff_hevc_clear_refs(HEVCContext *s)
Mark all frames in DPB as unused for reference.
Definition: hevc_refs.c:66
int ff_hevc_cbf_luma_decode(HEVCContext *s, int trafo_depth)
Definition: hevc_cabac.c:874
int tc_offset
Definition: hevcdec.h:302
PredictionUnit pu
Definition: hevcdec.h:370
RefPicList refPicList[2]
Definition: hevcdec.h:238
HEVCParamSets ps
Definition: hevcdec.h:407
int nuh_layer_id
Definition: hevcdec.h:482
intptr_t atomic_int
Definition: stdatomic.h:55
int ff_hevc_cu_chroma_qp_offset_idx(HEVCContext *s)
Definition: hevc_cabac.c:668
CABACContext cc
Definition: hevcdec.h:347
int ff_hevc_mpm_idx_decode(HEVCContext *s)
Definition: hevc_cabac.c:750
uint16_t seq_decode
Sequence counters for decoded and output frames, so that old frames are output first after a POC rese...
Definition: hevcdec.h:464
HEVCNALUnitType
Table 7-3: NAL unit type codes.
Definition: hevc.h:27
uint8_t threads_type
Definition: hevcdec.h:391
int max_ra
Definition: hevcdec.h:427
void ff_hevc_bump_frame(HEVCContext *s)
Definition: hevc_refs.c:236
const uint8_t * data
Definition: hevcdec.h:470
int8_t curr_qp_y
Definition: hevcdec.h:350
AVBufferPool * rpl_tab_pool
candidate references for the current frame
Definition: hevcdec.h:410
int nb_refs
Definition: hevcdec.h:234
int is_nalff
this flag is != 0 if bitstream is encapsulated as a format defined in 14496-15
Definition: hevcdec.h:477
int end_of_tiles_x
Definition: hevcdec.h:360
uint8_t
enum HEVCNALUnitType nal_unit_type
Definition: hevcdec.h:418
int ff_hevc_log2_res_scale_abs(HEVCContext *s, int idx)
Definition: hevc_cabac.c:894
int ff_hevc_output_frame(HEVCContext *s, AVFrame *frame, int flush)
Find next frame in output order and put a reference to it in frame.
Definition: hevc_refs.c:174
uint8_t ctb_up_right_flag
Definition: hevcdec.h:358
struct HEVCFrame * ref[HEVC_MAX_REFS]
Definition: hevcdec.h:231
Multithreading support functions.
void ff_hevc_save_states(HEVCContext *s, int ctb_addr_ts)
Definition: hevc_cabac.c:450
SAOType
Definition: hevcdec.h:210
AVFrame * output_frame
Definition: hevcdec.h:403
int apply_defdispwin
Definition: hevcdec.h:479
SAOParams * sao
Definition: hevcdec.h:416
AVCodecContext * avctx
Definition: hevcdec.h:384
int ff_hevc_part_mode_decode(HEVCContext *s, int log2_cb_size)
Definition: hevc_cabac.c:703
int ff_hevc_sao_band_position_decode(HEVCContext *s)
Definition: hevc_cabac.c:576
static AVFrame * frame
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
Definition: mem.h:104
BswapDSPContext bdsp
Definition: hevcdec.h:437
ThreadFrame tf
Definition: hevcdec.h:312
uint8_t ctb_up_left_flag
Definition: hevcdec.h:359
static int flags
Definition: log.c:57
uint8_t threads_number
Definition: hevcdec.h:392
uint8_t is_cu_chroma_qp_offset_coded
Definition: hevcdec.h:294
bitstream reader API header.
int8_t pred_flag
Definition: hevcdec.h:262
int8_t * qp_y_tab
Definition: hevcdec.h:438
uint8_t * tab_ct_depth
Definition: hevcdec.h:446
uint8_t cu_transquant_bypass_flag
Definition: hevcdec.h:251
int16_t tmp[MAX_PB_SIZE *MAX_PB_SIZE]
Definition: hevcdec.h:366
int ff_hevc_frame_rps(HEVCContext *s)
Construct the reference picture sets for the current frame.
Definition: hevc_refs.c:454
int ff_hevc_rem_intra_luma_pred_mode_decode(HEVCContext *s)
Definition: hevc_cabac.c:758
RPSType
Definition: hevcdec.h:81
The buffer pool.
int temporal_id
temporal_id_plus1 - 1
Definition: hevcdec.h:419
uint8_t first_qp_group
Definition: hevcdec.h:344
HEVCDSPContext hevcdsp
Definition: hevcdec.h:435
int ff_hevc_cu_qp_delta_sign_flag(HEVCContext *s)
Definition: hevc_cabac.c:658
int ctb_count
Definition: hevcdec.h:316
HEVCLocalContext * HEVClcList[MAX_NB_THREADS]
Definition: hevcdec.h:388
int slice_idx
number of the slice being currently decoded
Definition: hevcdec.h:424
uint8_t intra_pred_mode[4]
Definition: hevcdec.h:277
uint8_t slice_initialized
1 if the independent slice segment header was successfully parsed
Definition: hevcdec.h:400
RefPicList * ff_hevc_get_ref_list(HEVCContext *s, HEVCFrame *frame, int x0, int y0)
Definition: hevc_refs.c:57
AVBufferRef * rpl_tab_buf
Definition: hevcdec.h:321
RefPicList * refPicList
Definition: hevcdec.h:314
int bs_height
Definition: hevcdec.h:429
uint8_t * sao_pixel_buffer_h[3]
Definition: hevcdec.h:404
int8_t cu_qp_offset_cb
Definition: hevcdec.h:295
uint8_t merge_flag
Definition: hevcdec.h:279
void ff_hevc_hls_mvd_coding(HEVCContext *s, int x0, int y0, int log2_cb_size)
Definition: hevc_cabac.c:1529
uint8_t edge_emu_buffer2[(MAX_PB_SIZE+7)*EDGE_EMU_BUFFER_STRIDE *2]
Definition: hevcdec.h:365
uint8_t max_trafo_depth
MaxTrafoDepth.
Definition: hevcdec.h:250
uint16_t sequence
A sequence counter, so that old frames are output first after a POC reset.
Definition: hevcdec.h:331
Definition: hevcdec.h:168
uint8_t * vertical_bs
Definition: hevcdec.h:440
int chroma_mode_c
Definition: hevcdec.h:292
struct HEVCContext * sList[MAX_NB_THREADS]
Definition: hevcdec.h:386
int intra_pred_mode
Definition: hevcdec.h:290
int ff_hevc_split_transform_flag_decode(HEVCContext *s, int log2_trafo_size)
Definition: hevc_cabac.c:864
enum HEVCNALUnitType first_nal_type
Definition: hevcdec.h:474
AVBufferRef * tab_mvf_buf
Definition: hevcdec.h:320
HEVCSEIContext sei
Definition: hevcdec.h:484
void ff_hevc_luma_mv_merge_mode(HEVCContext *s, int x0, int y0, int nPbW, int nPbH, int log2_cb_size, int part_idx, int merge_idx, MvField *mv)
Definition: hevc_mvs.c:479
uint8_t chroma_mode_c[4]
Definition: hevcdec.h:281
int res_scale_val
Definition: hevcdec.h:287
Definition: hevcdec.h:169
uint8_t cabac_state[HEVC_CONTEXTS]
Definition: hevcdec.h:340
uint8_t * sao_pixel_buffer_v[3]
Definition: hevcdec.h:405
int ff_hevc_set_new_ref(HEVCContext *s, AVFrame **frame, int poc)
Definition: hevc_refs.c:135
uint8_t * tab_ipm
Definition: hevcdec.h:448
int ff_hevc_mvp_lx_flag_decode(HEVCContext *s)
Definition: hevc_cabac.c:821
int ff_hevc_sao_offset_abs_decode(HEVCContext *s)
Definition: hevc_cabac.c:586
const uint8_t ff_hevc_qpel_extra[4]
int32_t
PartMode
Definition: hevcdec.h:142
int ff_hevc_split_coding_unit_flag_decode(HEVCContext *s, int ct_depth, int x0, int y0)
Definition: hevc_cabac.c:684
SyntaxElement
Definition: hevcdec.h:90
void ff_hevc_luma_mv_mvp_mode(HEVCContext *s, int x0, int y0, int nPbW, int nPbH, int log2_cb_size, int part_idx, int merge_idx, MvField *mv, int mvp_lx_flag, int LX)
Definition: hevc_mvs.c:582
int intra_pred_mode_c
Definition: hevcdec.h:291
int ff_hevc_cu_chroma_qp_offset_flag(HEVCContext *s)
Definition: hevc_cabac.c:663
struct HEVCFrame * collocated_ref
Definition: hevcdec.h:318
uint16_t seq_output
Definition: hevcdec.h:465
void ff_hevc_deblocking_boundary_strengths(HEVCContext *s, int x0, int y0, int log2_trafo_size)
Definition: hevc_filter.c:714
int ff_hevc_sao_eo_class_decode(HEVCContext *s)
Definition: hevc_cabac.c:601
void ff_hevc_unref_frame(HEVCContext *s, HEVCFrame *frame, int flags)
Definition: hevc_refs.c:32
SAOEOClass
Definition: hevcdec.h:217
int ff_hevc_prev_intra_luma_pred_flag_decode(HEVCContext *s)
Definition: hevc_cabac.c:745
int ff_hevc_merge_flag_decode(HEVCContext *s)
Definition: hevc_cabac.c:790
static const int8_t mv[256][2]
Definition: 4xm.c:77
IntraPredMode
Definition: hevcdec.h:172
RefPicListTab ** rpl_tab
Definition: hevcdec.h:315
void ff_hevc_hls_filter(HEVCContext *s, int x, int y, int ctb_size)
Definition: hevc_filter.c:842
int ff_hevc_frame_nb_refs(HEVCContext *s)
Get the number of candidate references for the current frame.
Definition: hevc_refs.c:514
Libavcodec external API header.
int ff_hevc_cbf_cb_cr_decode(HEVCContext *s, int trafo_depth)
Definition: hevc_cabac.c:869
PredMode
Definition: hevcdec.h:153
main external API structure.
Definition: avcodec.h:1761
enum PredMode pred_mode
PredMode.
Definition: hevcdec.h:245
AVBufferRef * hwaccel_priv_buf
Definition: hevcdec.h:324
atomic_int wpp_err
Definition: hevcdec.h:468
int16_t y
vertical component of motion vector
Definition: hevcdec.h:256
uint8_t cross_pf
Definition: hevcdec.h:297
int height
Definition: hevcdec.h:395
#define EDGE_EMU_BUFFER_STRIDE
Definition: hevcdec.h:68
int ff_hevc_pred_mode_decode(HEVCContext *s)
Definition: hevc_cabac.c:679
TransformUnit tu
Definition: hevcdec.h:354
uint8_t ctb_left_flag
Definition: hevcdec.h:356
int cu_qp_delta
Definition: hevcdec.h:285
uint8_t * is_pcm
Definition: hevcdec.h:451
uint8_t * checksum_buf
used on BE to byteswap the lines for checksumming
Definition: hevcdec.h:457
Describe the class of an AVClass context structure.
Definition: log.h:67
uint8_t stat_coeff[4]
Definition: hevcdec.h:342
int ff_hevc_sao_type_idx_decode(HEVCContext *s)
Definition: hevc_cabac.c:566
int poc
Definition: hevcdec.h:317
AVFrame * frame
Definition: hevcdec.h:402
void ff_hevc_set_neighbour_available(HEVCContext *s, int x0, int y0, int nPbW, int nPbH)
Definition: hevc_mvs.c:42
int enable_parallel_tiles
Definition: hevcdec.h:467
int checksum_buf_size
Definition: hevcdec.h:458
int last_eos
last packet contains an EOS/EOB NAL
Definition: hevcdec.h:426
DBParams * deblock
Definition: hevcdec.h:417
GetBitContext gb
Definition: hevcdec.h:346
refcounted data buffer API
enum PartMode part_mode
PartMode.
Definition: hevcdec.h:246
int ff_hevc_no_residual_syntax_flag_decode(HEVCContext *s)
Definition: hevc_cabac.c:826
uint8_t intra_pred_mode_c[4]
Definition: hevcdec.h:280
Definition: hevcdec.h:167
Definition: hevcdec.h:254
PredFlag
Definition: hevcdec.h:165
int ff_hevc_pcm_flag_decode(HEVCContext *s)
Definition: hevc_cabac.c:740
int pocTid0
Definition: hevcdec.h:423
uint8_t flags
A combination of HEVC_FRAME_FLAG_*.
Definition: hevcdec.h:336
HEVCLocalContext * HEVClc
Definition: hevcdec.h:389
#define MAX_PB_SIZE
Definition: hevcdsp.h:30
int list[HEVC_MAX_REFS]
Definition: hevcdec.h:232
int ff_hevc_cu_qp_delta_abs(HEVCContext *s)
Definition: hevc_cabac.c:633
const uint8_t ff_hevc_qpel_extra_after[4]
int eos
current packet contains an EOS/EOB NAL
Definition: hevcdec.h:425
A reference to a data buffer.
Definition: buffer.h:81
Mv mv[2]
Definition: hevcdec.h:260
int ff_hevc_sao_merge_flag_decode(HEVCContext *s)
Definition: hevc_cabac.c:561
uint8_t * skip_flag
Definition: hevcdec.h:445
int8_t ref_idx[2]
Definition: hevcdec.h:261
int ff_hevc_cu_transquant_bypass_flag_decode(HEVCContext *s)
Definition: hevc_cabac.c:613
common internal api header.
uint8_t * horizontal_bs
Definition: hevcdec.h:439
int32_t * tab_slice_address
Definition: hevcdec.h:442
const AVClass * c
Definition: hevcdec.h:383
uint8_t * filter_slice_edges
Definition: hevcdec.h:454
int nal_length_size
Number of bytes used for nal length (1, 2 or 4)
Definition: hevcdec.h:481
AVBufferPool * tab_mvf_pool
Definition: hevcdec.h:409
Core video DSP helper functions.
int ff_hevc_merge_idx_decode(HEVCContext *s)
Definition: hevc_cabac.c:779
void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0, int log2_trafo_size, enum ScanType scan_idx, int c_idx)
Definition: hevc_cabac.c:1019
void ff_hevc_hls_filters(HEVCContext *s, int x_ctb, int y_ctb, int ctb_size)
Definition: hevc_filter.c:867
RefPicList rps[5]
Definition: hevcdec.h:413
Decoded Picture Buffer (DPB).
Definition: vaapi_h264.c:82
CodingUnit cu
Definition: hevcdec.h:369
int ff_hevc_skip_flag_decode(HEVCContext *s, int x0, int y0, int x_cb, int y_cb)
Definition: hevc_cabac.c:618
int beta_offset
Definition: hevcdec.h:301
H2645Packet pkt
Definition: hevcdec.h:472
int boundary_flags
Definition: hevcdec.h:379
uint8_t context_initialized
Definition: hevcdec.h:476
AVBufferRef * rpl_buf
Definition: hevcdec.h:322
int is_decoded
Definition: hevcdec.h:431
int ff_hevc_ref_idx_lx_decode(HEVCContext *s, int num_ref_idx_lx)
Definition: hevc_cabac.c:805
#define HEVC_MAX_REFS
Definition: hevc.h:87
uint8_t * cbf_luma
Definition: hevcdec.h:450
void ff_hevc_flush_dpb(HEVCContext *s)
Drop all frames currently in DPB.
Definition: hevc_refs.c:75
SliceHeader sh
Definition: hevcdec.h:415
int no_rasl_output_flag
Definition: hevcdec.h:432
int ff_hevc_cabac_init(HEVCContext *s, int ctb_addr_ts)
Definition: hevc_cabac.c:504
ScanType
Definition: hevcdec.h:224
int width
Definition: hevcdec.h:394
int end_of_tiles_y
Definition: hevcdec.h:361
int ff_hevc_intra_chroma_pred_mode_decode(HEVCContext *s)
Definition: hevc_cabac.c:768
Context Adaptive Binary Arithmetic Coder.
#define MAX_NB_THREADS
Definition: hevcdec.h:44
int isLongTerm[HEVC_MAX_REFS]
Definition: hevcdec.h:233