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 #include "libavutil/md5.h"
30 
31 #include "avcodec.h"
32 #include "bswapdsp.h"
33 #include "cabac.h"
34 #include "get_bits.h"
35 #include "hevcpred.h"
36 #include "h2645_parse.h"
37 #include "hevc.h"
38 #include "hevc_ps.h"
39 #include "hevc_sei.h"
40 #include "hevcdsp.h"
41 #include "internal.h"
42 #include "thread.h"
43 #include "videodsp.h"
44 
45 #define MAX_NB_THREADS 16
46 #define SHIFT_CTB_WPP 2
47 
48 //TODO: check if this is really the maximum
49 #define MAX_TRANSFORM_DEPTH 5
50 
51 #define MAX_TB_SIZE 32
52 #define MAX_QP 51
53 #define DEFAULT_INTRA_TC_OFFSET 2
54 
55 #define HEVC_CONTEXTS 199
56 
57 #define MRG_MAX_NUM_CANDS 5
58 
59 #define L0 0
60 #define L1 1
61 
62 #define EPEL_EXTRA_BEFORE 1
63 #define EPEL_EXTRA_AFTER 2
64 #define EPEL_EXTRA 3
65 #define QPEL_EXTRA_BEFORE 3
66 #define QPEL_EXTRA_AFTER 4
67 #define QPEL_EXTRA 7
68 
69 #define EDGE_EMU_BUFFER_STRIDE 80
70 
71 /**
72  * Value of the luma sample at position (x, y) in the 2D array tab.
73  */
74 #define SAMPLE(tab, x, y) ((tab)[(y) * s->sps->width + (x)])
75 #define SAMPLE_CTB(tab, x, y) ((tab)[(y) * min_cb_width + (x)])
76 
77 #define IS_IDR(s) ((s)->nal_unit_type == HEVC_NAL_IDR_W_RADL || (s)->nal_unit_type == HEVC_NAL_IDR_N_LP)
78 #define IS_BLA(s) ((s)->nal_unit_type == HEVC_NAL_BLA_W_RADL || (s)->nal_unit_type == HEVC_NAL_BLA_W_LP || \
79  (s)->nal_unit_type == HEVC_NAL_BLA_N_LP)
80 #define IS_IRAP(s) ((s)->nal_unit_type >= 16 && (s)->nal_unit_type <= 23)
81 
82 enum RPSType {
89 };
90 
141 };
142 
143 enum PartMode {
147  PART_NxN = 3,
152 };
153 
154 enum PredMode {
158 };
159 
161  PRED_L0 = 0,
164 };
165 
166 enum PredFlag {
167  PF_INTRA = 0,
171 };
172 
209 };
210 
211 enum SAOType {
216 };
217 
223 };
224 
225 enum ScanType {
229 };
230 
231 typedef struct RefPicList {
235  int nb_refs;
236 } RefPicList;
237 
238 typedef struct RefPicListTab {
240 } RefPicListTab;
241 
242 typedef struct CodingUnit {
243  int x;
244  int y;
245 
246  enum PredMode pred_mode; ///< PredMode
247  enum PartMode part_mode; ///< PartMode
248 
249  // Inferred parameters
250  uint8_t intra_split_flag; ///< IntraSplitFlag
251  uint8_t max_trafo_depth; ///< MaxTrafoDepth
253 } CodingUnit;
254 
255 typedef struct Mv {
256  int16_t x; ///< horizontal component of motion vector
257  int16_t y; ///< vertical component of motion vector
258 } Mv;
259 
260 typedef struct MvField {
262  int8_t ref_idx[2];
263  int8_t pred_flag;
264 } MvField;
265 
266 typedef struct NeighbourAvailable {
269  int cand_up;
274 
275 typedef struct PredictionUnit {
276  int mpm_idx;
284 
285 typedef struct TransformUnit {
287 
289 
290  // Inferred parameters;
299 } TransformUnit;
300 
301 typedef struct DBParams {
304 } DBParams;
305 
306 #define HEVC_FRAME_FLAG_OUTPUT (1 << 0)
307 #define HEVC_FRAME_FLAG_SHORT_REF (1 << 1)
308 #define HEVC_FRAME_FLAG_LONG_REF (1 << 2)
309 #define HEVC_FRAME_FLAG_BUMPING (1 << 3)
310 
311 typedef struct HEVCFrame {
318  int poc;
320 
324 
327 
328  /**
329  * A sequence counter, so that old frames are output first
330  * after a POC reset
331  */
332  uint16_t sequence;
333 
334  /**
335  * A combination of HEVC_FRAME_FLAG_*
336  */
338 } HEVCFrame;
339 
340 typedef struct HEVCLocalContext {
342 
344 
346 
349 
350  int8_t qp_y;
351  int8_t curr_qp_y;
352 
353  int qPy_pred;
354 
356 
363  /* +7 is for subpixel interpolation, *2 for high bit depths */
365  /* The extended size between the new edge emu buffer is abused by SAO */
368 
369  int ct_depth;
373 
374 #define BOUNDARY_LEFT_SLICE (1 << 0)
375 #define BOUNDARY_LEFT_TILE (1 << 1)
376 #define BOUNDARY_UPPER_SLICE (1 << 2)
377 #define BOUNDARY_UPPER_TILE (1 << 3)
378  /* properties of the boundary of the current CTB for the purposes
379  * of the deblocking filter */
382 
383 typedef struct HEVCContext {
384  const AVClass *c; // needed by private avoptions
386 
388 
391 
394 
395  int width;
396  int height;
397 
399 
400  /** 1 if the independent slice segment header was successfully parsed */
402 
407 
410  struct AVMD5 *md5_ctx;
411 
414 
415  ///< candidate references for the current frame
417 
422  int temporal_id; ///< temporal_id_plus1 - 1
425  int poc;
426  int pocTid0;
427  int slice_idx; ///< number of the slice being currently decoded
428  int eos; ///< current packet contains an EOS/EOB NAL
429  int last_eos; ///< last packet contains an EOS/EOB NAL
430  int max_ra;
431  int bs_width;
433 
436 
441  int8_t *qp_y_tab;
444 
446 
447  // CU
450  // PU
452 
453  uint8_t *cbf_luma; // cbf_luma of colocated TU
455 
456  // CTB-level flags affecting loop filter operation
458 
459  /** used on BE to byteswap the lines for checksumming */
462 
463  /**
464  * Sequence counters for decoded and output frames, so that old
465  * frames are output first after a POC reset
466  */
467  uint16_t seq_decode;
468  uint16_t seq_output;
469 
472 
473  const uint8_t *data;
474 
476  // type of the first VCL NAL of the current frame
478 
480  int is_nalff; ///< this flag is != 0 if bitstream is encapsulated
481  ///< as a format defined in 14496-15
483 
484  int nal_length_size; ///< Number of bytes used for nal length (1, 2 or 4)
486 } HEVCContext;
487 
488 /**
489  * Mark all frames in DPB as unused for reference.
490  */
492 
493 /**
494  * Drop all frames currently in DPB.
495  */
497 
499  int x0, int y0);
500 
501 /**
502  * Construct the reference picture sets for the current frame.
503  */
505 
506 /**
507  * Construct the reference picture list(s) for the current slice.
508  */
510 
511 void ff_hevc_save_states(HEVCContext *s, int ctb_addr_ts);
512 int ff_hevc_cabac_init(HEVCContext *s, int ctb_addr_ts);
521 int ff_hevc_skip_flag_decode(HEVCContext *s, int x0, int y0,
522  int x_cb, int y_cb);
525  int x0, int y0);
526 int ff_hevc_part_mode_decode(HEVCContext *s, int log2_cb_size);
534 int ff_hevc_inter_pred_idc_decode(HEVCContext *s, int nPbW, int nPbH);
535 int ff_hevc_ref_idx_lx_decode(HEVCContext *s, int num_ref_idx_lx);
538 int ff_hevc_split_transform_flag_decode(HEVCContext *s, int log2_trafo_size);
539 int ff_hevc_cbf_cb_cr_decode(HEVCContext *s, int trafo_depth);
540 int ff_hevc_cbf_luma_decode(HEVCContext *s, int trafo_depth);
543 
544 /**
545  * Get the number of candidate references for the current frame.
546  */
548 
549 int ff_hevc_set_new_ref(HEVCContext *s, AVFrame **frame, int poc);
550 
552 {
553  switch (type) {
554  case HEVC_NAL_TRAIL_N:
555  case HEVC_NAL_TSA_N:
556  case HEVC_NAL_STSA_N:
557  case HEVC_NAL_RADL_N:
558  case HEVC_NAL_RASL_N:
559  case HEVC_NAL_VCL_N10:
560  case HEVC_NAL_VCL_N12:
561  case HEVC_NAL_VCL_N14:
562  case HEVC_NAL_BLA_N_LP:
563  case HEVC_NAL_IDR_N_LP:
564  return 1;
565  break;
566  default: break;
567  }
568  return 0;
569 }
570 
571 /**
572  * Find next frame in output order and put a reference to it in frame.
573  * @return 1 if a frame was output, 0 otherwise
574  */
576 
578 
580 
581 void ff_hevc_set_neighbour_available(HEVCContext *s, int x0, int y0,
582  int nPbW, int nPbH);
583 void ff_hevc_luma_mv_merge_mode(HEVCContext *s, int x0, int y0,
584  int nPbW, int nPbH, int log2_cb_size,
585  int part_idx, int merge_idx, MvField *mv);
586 void ff_hevc_luma_mv_mvp_mode(HEVCContext *s, int x0, int y0,
587  int nPbW, int nPbH, int log2_cb_size,
588  int part_idx, int merge_idx,
589  MvField *mv, int mvp_lx_flag, int LX);
590 void ff_hevc_set_qPy(HEVCContext *s, int xBase, int yBase,
591  int log2_cb_size);
593  int log2_trafo_size);
598 void ff_hevc_hls_filter(HEVCContext *s, int x, int y, int ctb_size);
599 void ff_hevc_hls_filters(HEVCContext *s, int x_ctb, int y_ctb, int ctb_size);
600 void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0,
601  int log2_trafo_size, enum ScanType scan_idx,
602  int c_idx);
603 
604 void ff_hevc_hls_mvd_coding(HEVCContext *s, int x0, int y0, int log2_cb_size);
605 
606 extern const uint8_t ff_hevc_qpel_extra_before[4];
607 extern const uint8_t ff_hevc_qpel_extra_after[4];
608 extern const uint8_t ff_hevc_qpel_extra[4];
609 
610 #endif /* AVCODEC_HEVCDEC_H */
int8_t cu_qp_offset_cr
Definition: hevcdec.h:297
uint8_t ctb_up_flag
Definition: hevcdec.h:358
AVFrame * frame
Definition: hevcdec.h:312
HEVCPredContext hpc
Definition: hevcdec.h:437
NeighbourAvailable na
Definition: hevcdec.h:372
int ff_hevc_slice_rpl(HEVCContext *s)
Construct the reference picture list(s) for the current slice.
Definition: hevc_refs.c:291
This structure describes decoded (raw) audio or video data.
Definition: frame.h:226
HEVCFrame * ref
Definition: hevcdec.h:423
#define HEVC_CONTEXTS
Definition: hevcdec.h:55
uint8_t is_cu_qp_delta_coded
Definition: hevcdec.h:294
int ff_hevc_inter_pred_idc_decode(HEVCContext *s, int nPbW, int nPbH)
Definition: hevc_cabac.c:797
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:439
uint8_t edge_emu_buffer[(MAX_PB_SIZE+7)*EDGE_EMU_BUFFER_STRIDE *2]
Definition: hevcdec.h:364
const uint8_t ff_hevc_qpel_extra_before[4]
int ff_hevc_res_scale_sign_flag(HEVCContext *s, int idx)
Definition: hevc_cabac.c:905
int16_t x
horizontal component of motion vector
Definition: hevcdec.h:256
int ff_hevc_end_of_slice_flag_decode(HEVCContext *s)
Definition: hevc_cabac.c:608
void * hwaccel_picture_private
Definition: hevcdec.h:326
uint8_t * cabac_state
Definition: hevcdec.h:398
InterPredIdc
Definition: hevcdec.h:160
MvField * tab_mvf
Definition: hevcdec.h:314
int bs_width
Definition: hevcdec.h:431
uint8_t intra_split_flag
IntraSplitFlag.
Definition: hevcdec.h:250
int rem_intra_luma_pred_mode
Definition: hevcdec.h:277
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:876
int tc_offset
Definition: hevcdec.h:303
PredictionUnit pu
Definition: hevcdec.h:371
RefPicList refPicList[2]
Definition: hevcdec.h:239
HEVCParamSets ps
Definition: hevcdec.h:408
int nuh_layer_id
Definition: hevcdec.h:485
intptr_t atomic_int
Definition: stdatomic.h:55
int ff_hevc_cu_chroma_qp_offset_idx(HEVCContext *s)
Definition: hevc_cabac.c:670
CABACContext cc
Definition: hevcdec.h:348
int ff_hevc_mpm_idx_decode(HEVCContext *s)
Definition: hevc_cabac.c:752
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:467
HEVCNALUnitType
Table 7-1 – NAL unit type codes and NAL unit type classes in T-REC-H.265-201802.
Definition: hevc.h:28
uint8_t threads_type
Definition: hevcdec.h:392
int max_ra
Definition: hevcdec.h:430
void ff_hevc_bump_frame(HEVCContext *s)
Definition: hevc_refs.c:233
const uint8_t * data
Definition: hevcdec.h:473
int8_t curr_qp_y
Definition: hevcdec.h:351
AVBufferPool * rpl_tab_pool
candidate references for the current frame
Definition: hevcdec.h:413
int nb_refs
Definition: hevcdec.h:235
int is_nalff
this flag is != 0 if bitstream is encapsulated as a format defined in 14496-15
Definition: hevcdec.h:480
int end_of_tiles_x
Definition: hevcdec.h:361
uint8_t
enum HEVCNALUnitType nal_unit_type
Definition: hevcdec.h:421
int ff_hevc_log2_res_scale_abs(HEVCContext *s, int idx)
Definition: hevc_cabac.c:896
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:359
struct HEVCFrame * ref[HEVC_MAX_REFS]
Definition: hevcdec.h:232
Multithreading support functions.
void ff_hevc_save_states(HEVCContext *s, int ctb_addr_ts)
Definition: hevc_cabac.c:450
SAOType
Definition: hevcdec.h:211
AVFrame * output_frame
Definition: hevcdec.h:404
int apply_defdispwin
Definition: hevcdec.h:482
SAOParams * sao
Definition: hevcdec.h:419
AVCodecContext * avctx
Definition: hevcdec.h:385
int ff_hevc_part_mode_decode(HEVCContext *s, int log2_cb_size)
Definition: hevc_cabac.c:705
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:112
BswapDSPContext bdsp
Definition: hevcdec.h:440
ThreadFrame tf
Definition: hevcdec.h:313
uint8_t ctb_up_left_flag
Definition: hevcdec.h:360
uint8_t threads_number
Definition: hevcdec.h:393
uint8_t is_cu_chroma_qp_offset_coded
Definition: hevcdec.h:295
bitstream reader API header.
int8_t pred_flag
Definition: hevcdec.h:263
int8_t * qp_y_tab
Definition: hevcdec.h:441
uint8_t * tab_ct_depth
Definition: hevcdec.h:449
uint8_t cu_transquant_bypass_flag
Definition: hevcdec.h:252
int16_t tmp[MAX_PB_SIZE *MAX_PB_SIZE]
Definition: hevcdec.h:367
int ff_hevc_frame_rps(HEVCContext *s)
Construct the reference picture sets for the current frame.
Definition: hevc_refs.c:451
Definition: md5.c:40
int ff_hevc_rem_intra_luma_pred_mode_decode(HEVCContext *s)
Definition: hevc_cabac.c:760
RPSType
Definition: hevcdec.h:82
The buffer pool.
int temporal_id
temporal_id_plus1 - 1
Definition: hevcdec.h:422
uint8_t first_qp_group
Definition: hevcdec.h:345
HEVCDSPContext hevcdsp
Definition: hevcdec.h:438
int ff_hevc_cu_qp_delta_sign_flag(HEVCContext *s)
Definition: hevc_cabac.c:660
int ctb_count
Definition: hevcdec.h:317
HEVCLocalContext * HEVClcList[MAX_NB_THREADS]
Definition: hevcdec.h:389
int slice_idx
number of the slice being currently decoded
Definition: hevcdec.h:427
uint8_t intra_pred_mode[4]
Definition: hevcdec.h:278
uint8_t slice_initialized
1 if the independent slice segment header was successfully parsed
Definition: hevcdec.h:401
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:322
RefPicList * refPicList
Definition: hevcdec.h:315
int bs_height
Definition: hevcdec.h:432
static av_always_inline int ff_hevc_nal_is_nonref(enum HEVCNALUnitType type)
Definition: hevcdec.h:551
uint8_t * sao_pixel_buffer_h[3]
Definition: hevcdec.h:405
int8_t cu_qp_offset_cb
Definition: hevcdec.h:296
uint8_t merge_flag
Definition: hevcdec.h:280
struct AVMD5 * md5_ctx
Definition: hevcdec.h:410
void ff_hevc_hls_mvd_coding(HEVCContext *s, int x0, int y0, int log2_cb_size)
Definition: hevc_cabac.c:1534
uint8_t edge_emu_buffer2[(MAX_PB_SIZE+7)*EDGE_EMU_BUFFER_STRIDE *2]
Definition: hevcdec.h:366
uint8_t max_trafo_depth
MaxTrafoDepth.
Definition: hevcdec.h:251
uint16_t sequence
A sequence counter, so that old frames are output first after a POC reset.
Definition: hevcdec.h:332
Definition: hevcdec.h:169
uint8_t * vertical_bs
Definition: hevcdec.h:443
int chroma_mode_c
Definition: hevcdec.h:293
struct HEVCContext * sList[MAX_NB_THREADS]
Definition: hevcdec.h:387
int intra_pred_mode
Definition: hevcdec.h:291
int ff_hevc_split_transform_flag_decode(HEVCContext *s, int log2_trafo_size)
Definition: hevc_cabac.c:866
enum HEVCNALUnitType first_nal_type
Definition: hevcdec.h:477
AVBufferRef * tab_mvf_buf
Definition: hevcdec.h:321
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:282
int res_scale_val
Definition: hevcdec.h:288
Definition: hevcdec.h:170
uint8_t cabac_state[HEVC_CONTEXTS]
Definition: hevcdec.h:341
uint8_t * sao_pixel_buffer_v[3]
Definition: hevcdec.h:406
int ff_hevc_set_new_ref(HEVCContext *s, AVFrame **frame, int poc)
Definition: hevc_refs.c:135
uint8_t * tab_ipm
Definition: hevcdec.h:451
int ff_hevc_mvp_lx_flag_decode(HEVCContext *s)
Definition: hevc_cabac.c:823
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:143
int ff_hevc_split_coding_unit_flag_decode(HEVCContext *s, int ct_depth, int x0, int y0)
Definition: hevc_cabac.c:686
SyntaxElement
Definition: hevcdec.h:91
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
#define s(width, name)
Definition: cbs_vp9.c:257
int intra_pred_mode_c
Definition: hevcdec.h:292
int ff_hevc_cu_chroma_qp_offset_flag(HEVCContext *s)
Definition: hevc_cabac.c:665
struct HEVCFrame * collocated_ref
Definition: hevcdec.h:319
uint16_t seq_output
Definition: hevcdec.h:468
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:218
int ff_hevc_prev_intra_luma_pred_flag_decode(HEVCContext *s)
Definition: hevc_cabac.c:747
int ff_hevc_merge_flag_decode(HEVCContext *s)
Definition: hevc_cabac.c:792
static const int8_t mv[256][2]
Definition: 4xm.c:77
IntraPredMode
Definition: hevcdec.h:173
RefPicListTab ** rpl_tab
Definition: hevcdec.h:316
void ff_hevc_hls_filter(HEVCContext *s, int x, int y, int ctb_size)
Definition: hevc_filter.c:842
Libavcodec external API header.
int ff_hevc_cbf_cb_cr_decode(HEVCContext *s, int trafo_depth)
Definition: hevc_cabac.c:871
PredMode
Definition: hevcdec.h:154
main external API structure.
Definition: avcodec.h:1533
enum PredMode pred_mode
PredMode.
Definition: hevcdec.h:246
AVBufferRef * hwaccel_priv_buf
Definition: hevcdec.h:325
atomic_int wpp_err
Definition: hevcdec.h:471
int16_t y
vertical component of motion vector
Definition: hevcdec.h:257
uint8_t cross_pf
Definition: hevcdec.h:298
int height
Definition: hevcdec.h:396
#define EDGE_EMU_BUFFER_STRIDE
Definition: hevcdec.h:69
int ff_hevc_pred_mode_decode(HEVCContext *s)
Definition: hevc_cabac.c:681
TransformUnit tu
Definition: hevcdec.h:355
GLint GLenum type
Definition: opengl_enc.c:105
uint8_t ctb_left_flag
Definition: hevcdec.h:357
int cu_qp_delta
Definition: hevcdec.h:286
uint8_t * is_pcm
Definition: hevcdec.h:454
uint8_t * checksum_buf
used on BE to byteswap the lines for checksumming
Definition: hevcdec.h:460
Describe the class of an AVClass context structure.
Definition: log.h:67
uint8_t stat_coeff[4]
Definition: hevcdec.h:343
int ff_hevc_sao_type_idx_decode(HEVCContext *s)
Definition: hevc_cabac.c:566
int poc
Definition: hevcdec.h:318
AVFrame * frame
Definition: hevcdec.h:403
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:470
int checksum_buf_size
Definition: hevcdec.h:461
int last_eos
last packet contains an EOS/EOB NAL
Definition: hevcdec.h:429
DBParams * deblock
Definition: hevcdec.h:420
GetBitContext gb
Definition: hevcdec.h:347
refcounted data buffer API
enum PartMode part_mode
PartMode.
Definition: hevcdec.h:247
int ff_hevc_no_residual_syntax_flag_decode(HEVCContext *s)
Definition: hevc_cabac.c:828
uint8_t intra_pred_mode_c[4]
Definition: hevcdec.h:281
Definition: hevcdec.h:168
Definition: hevcdec.h:255
PredFlag
Definition: hevcdec.h:166
int ff_hevc_pcm_flag_decode(HEVCContext *s)
Definition: hevc_cabac.c:742
int pocTid0
Definition: hevcdec.h:426
uint8_t flags
A combination of HEVC_FRAME_FLAG_*.
Definition: hevcdec.h:337
HEVCLocalContext * HEVClc
Definition: hevcdec.h:390
#define MAX_PB_SIZE
Definition: hevcdsp.h:30
int list[HEVC_MAX_REFS]
Definition: hevcdec.h:233
#define flags(name, subs,...)
Definition: cbs_av1.c:596
int ff_hevc_cu_qp_delta_abs(HEVCContext *s)
Definition: hevc_cabac.c:633
int ff_hevc_frame_nb_refs(const HEVCContext *s)
Get the number of candidate references for the current frame.
Definition: hevc_refs.c:511
const uint8_t ff_hevc_qpel_extra_after[4]
int eos
current packet contains an EOS/EOB NAL
Definition: hevcdec.h:428
A reference to a data buffer.
Definition: buffer.h:81
Mv mv[2]
Definition: hevcdec.h:261
int ff_hevc_sao_merge_flag_decode(HEVCContext *s)
Definition: hevc_cabac.c:561
uint8_t * skip_flag
Definition: hevcdec.h:448
int8_t ref_idx[2]
Definition: hevcdec.h:262
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:442
int32_t * tab_slice_address
Definition: hevcdec.h:445
const AVClass * c
Definition: hevcdec.h:384
uint8_t * filter_slice_edges
Definition: hevcdec.h:457
int nal_length_size
Number of bytes used for nal length (1, 2 or 4)
Definition: hevcdec.h:484
AVBufferPool * tab_mvf_pool
Definition: hevcdec.h:412
Core video DSP helper functions.
int ff_hevc_merge_idx_decode(HEVCContext *s)
Definition: hevc_cabac.c:781
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:1024
void ff_hevc_hls_filters(HEVCContext *s, int x_ctb, int y_ctb, int ctb_size)
Definition: hevc_filter.c:878
RefPicList rps[5]
Definition: hevcdec.h:416
Decoded Picture Buffer (DPB).
Definition: vaapi_h264.c:82
CodingUnit cu
Definition: hevcdec.h:370
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:302
HEVCSEI sei
Definition: hevcdec.h:409
H2645Packet pkt
Definition: hevcdec.h:475
int boundary_flags
Definition: hevcdec.h:380
Public header for MD5 hash function implementation.
#define av_always_inline
Definition: attributes.h:39
uint8_t context_initialized
Definition: hevcdec.h:479
AVBufferRef * rpl_buf
Definition: hevcdec.h:323
int is_decoded
Definition: hevcdec.h:434
int ff_hevc_ref_idx_lx_decode(HEVCContext *s, int num_ref_idx_lx)
Definition: hevc_cabac.c:807
uint8_t * cbf_luma
Definition: hevcdec.h:453
void ff_hevc_flush_dpb(HEVCContext *s)
Drop all frames currently in DPB.
Definition: hevc_refs.c:75
SliceHeader sh
Definition: hevcdec.h:418
int no_rasl_output_flag
Definition: hevcdec.h:435
int ff_hevc_cabac_init(HEVCContext *s, int ctb_addr_ts)
Definition: hevc_cabac.c:504
ScanType
Definition: hevcdec.h:225
int width
Definition: hevcdec.h:395
int end_of_tiles_y
Definition: hevcdec.h:362
int ff_hevc_intra_chroma_pred_mode_decode(HEVCContext *s)
Definition: hevc_cabac.c:770
Context Adaptive Binary Arithmetic Coder.
#define MAX_NB_THREADS
Definition: hevcdec.h:45
int isLongTerm[HEVC_MAX_REFS]
Definition: hevcdec.h:234