FFmpeg
Loading...
Searching...
No Matches
ctu.h
Go to the documentation of this file.
1/*
2 * VVC CTU(Coding Tree Unit) parser
3 *
4 * Copyright (C) 2022 Nuo Mi
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_VVC_CTU_H
24#define AVCODEC_VVC_CTU_H
25
26#include <stdbool.h>
27
28#include "libavcodec/cabac.h"
30
31#include "dec.h"
32
33#define MAX_CTU_SIZE 128
34
35#define MAX_CU_SIZE MAX_CTU_SIZE
36#define MIN_CU_SIZE 4
37#define MIN_CU_LOG2 2
38#define MAX_CU_DEPTH 7
39#define MAX_PALETTE_CU_SIZE 64
40
41#define MAX_PARTS_IN_CTU ((MAX_CTU_SIZE >> MIN_CU_LOG2) * (MAX_CTU_SIZE >> MIN_CU_LOG2))
42
43#define MIN_PU_SIZE 4
44
45#define MAX_TB_SIZE 64
46#define MIN_TU_SIZE 4
47#define MAX_TUS_IN_CU 64
48
49#define MAX_QP 63
50
51#define MAX_PB_SIZE 128
52#define MAX_SCALING_RATIO 8
53#define EDGE_EMU_BUFFER_STRIDE ((MAX_PB_SIZE + 32) * MAX_SCALING_RATIO)
54
55#define CHROMA_EXTRA_BEFORE 1
56#define CHROMA_EXTRA_AFTER 2
57#define CHROMA_EXTRA 3
58#define LUMA_EXTRA_BEFORE 3
59#define LUMA_EXTRA_AFTER 4
60#define LUMA_EXTRA 7
61#define BILINEAR_EXTRA_BEFORE 0
62#define BILINEAR_EXTRA_AFTER 1
63#define BILINEAR_EXTRA 1
64
65#define SCALED_INT(pos) ((pos) >> 10)
66
67#define MAX_CONTROL_POINTS 3
68
69#define AFFINE_MIN_BLOCK_SIZE 4
70
71#define MRG_MAX_NUM_CANDS 6
72#define MAX_NUM_HMVP_CANDS 5
73
74#define SAO_PADDING_SIZE 1
75
76#define ALF_PADDING_SIZE 8
77#define ALF_BLOCK_SIZE 4
78
79#define ALF_BORDER_LUMA 3
80#define ALF_BORDER_CHROMA 2
81
82#define ALF_VB_POS_ABOVE_LUMA 4
83#define ALF_VB_POS_ABOVE_CHROMA 2
84
85#define ALF_GRADIENT_STEP 2
86#define ALF_GRADIENT_BORDER 2
87#define ALF_GRADIENT_SIZE ((MAX_CU_SIZE + ALF_GRADIENT_BORDER * 2) / ALF_GRADIENT_STEP)
88#define ALF_NUM_DIR 4
89
90#define ALF_MAX_BLOCKS_IN_CTU (MAX_CTU_SIZE * MAX_CTU_SIZE / ALF_BLOCK_SIZE / ALF_BLOCK_SIZE)
91#define ALF_MAX_FILTER_SIZE (ALF_MAX_BLOCKS_IN_CTU * ALF_NUM_COEFF_LUMA)
92
93/**
94 * Value of the luma sample at position (x, y) in the 2D array tab.
95 */
96#define SAMPLE(tab, x, y) ((tab)[(y) * s->pps->width + (x)])
97#define SAMPLE_CTB(tab, x, y) ((tab)[(y) * min_cb_width + (x)])
98#define CTB(tab, x, y) ((tab)[(y) * fc->ps.pps->ctb_width + (x)])
99
105
112
113typedef struct NeighbourAvailable {
114 int cand_left;
115 int cand_up;
116 int cand_up_left;
117 int cand_up_right;
120
126
135
143
144typedef struct TransformBlock {
145 uint8_t has_coeffs;
146 uint8_t c_idx;
147 uint8_t ts; ///< transform_skip_flag
148 int x0;
149 int y0;
150
155
160
161 int qp;
165
166 int *coeffs;
168
174
175typedef struct TransformUnit {
176 int x0;
177 int y0;
178 int width;
180 bool avail[CHROMA + 1]; // contains luma/chroma block
181
182 uint8_t joint_cbcr_residual_flag; ///< tu_joint_cbcr_residual_flag
183
184 uint8_t coded_flag[VVC_MAX_SAMPLE_ARRAYS]; ///< tu_y_coded_flag, tu_cb_coded_flag, tu_cr_coded_flag
185 uint8_t nb_tbs;
187
188 struct TransformUnit *next; ///< RefStruct reference
190
198
199typedef struct Mv {
200 int x; ///< horizontal component of motion vector
201 int y; ///< vertical component of motion vector
202} Mv;
203
204typedef struct MvField {
205 DECLARE_ALIGNED(8, Mv, mv)[2]; ///< mvL0, vvL1
206 int8_t ref_idx[2]; ///< refIdxL0, refIdxL1
207 uint8_t hpel_if_idx; ///< hpelIfIdx
208 uint8_t bcw_idx; ///< bcwIdx
209 uint8_t pred_flag;
210 uint8_t ciip_flag; ///< ciip_flag
211} MvField;
212
213typedef struct DMVRInfo {
214 DECLARE_ALIGNED(8, Mv, mv)[2]; ///< mvL0, vvL1
216} DMVRInfo;
217
223
224typedef enum PredFlag {
225 PF_INTRA = 0x0,
226 PF_L0 = 0x1,
227 PF_L1 = 0x2,
228 PF_BI = 0x3,
229 PF_IBC = PF_L0 | 0x4,
230 PF_PLT = 0x8,
231} PredFlag;
232
245
246typedef struct MotionInfo {
247 MotionModelIdc motion_model_idc; ///< MotionModelIdc
248 int8_t ref_idx[2]; ///< refIdxL0, refIdxL1
249 uint8_t hpel_if_idx; ///< hpelIfIdx
250 uint8_t bcw_idx; ///< bcwIdx
252
254
256} MotionInfo;
257
258typedef struct PredictionUnit {
261 //InterPredIdc inter_pred_idc;
263
264 //subblock predict
266
270
272
274
275 // for regular prediction only
276 uint8_t dmvr_flag;
277 uint8_t bdof_flag;
278
283
284typedef struct Palette {
285 uint8_t size;
287} Palette;
288
289typedef struct CodingUnit {
291 int x0;
292 int y0;
297
298 uint8_t coded_flag;
299
300 uint8_t sbt_flag;
303
306
308
309 uint8_t intra_luma_ref_idx; ///< IntraLumaRefLineIdx[][]
310 uint8_t intra_mip_flag; ///< intra_mip_flag
311 uint8_t skip_flag; ///< cu_skip_flag;
312
313 //inter
314 uint8_t ciip_flag;
315
316 // Inferred parameters
317 enum IspType isp_split_type; ///< IntraSubPartitionsSplitType
318
319 enum PredMode pred_mode; ///< PredMode
320
322
323 IntraPredMode intra_pred_mode_y; ///< IntraPredModeY
324 IntraPredMode intra_pred_mode_c; ///< IntraPredModeC
325 int mip_chroma_direct_flag; ///< MipChromaDirectFlag
326
328
329 int apply_lfnst_flag[VVC_MAX_SAMPLE_ARRAYS]; ///< ApplyLfnstFlag[]
330
331 struct {
332 TransformUnit *head; ///< RefStruct reference
333 TransformUnit *tail; ///< RefStruct reference
335
336 int8_t qp[4]; ///< QpY, Qp′Cb, Qp′Cr, Qp′CbCr
337
339
341
342 struct CodingUnit *next; ///< RefStruct reference
343} CodingUnit;
344
345typedef struct CTU {
347 int max_y_idx[2];
349} CTU;
350
351typedef struct ReconstructedArea {
352 int x;
353 int y;
354 int w;
355 int h;
357
358typedef struct VVCCabacState {
359 uint16_t state[2];
360 uint8_t shift[2];
362
363// VVC_CONTEXTS matched with SYNTAX_ELEMENT_LAST, it's checked by cabac_init_state.
364#define VVC_CONTEXTS 378
365typedef struct EntryPoint {
366 int8_t qp_y; ///< QpY
367
368 uint8_t is_first_qg; // first quantization group
369
372
374
377
378 Palette pp[VVC_MAX_SAMPLE_ARRAYS]; // PalettePredictor
379
380 MvField hmvp[MAX_NUM_HMVP_CANDS]; ///< HmvpCandList
381 int num_hmvp; ///< NumHmvpCand
382 MvField hmvp_ibc[MAX_NUM_HMVP_CANDS]; ///< HmvpIbcCandList
383 int num_hmvp_ibc; ///< NumHmvpIbcCand
384} EntryPoint;
385
386typedef struct VVCLocalContext {
388 uint8_t ctb_up_flag;
393
394 struct {
395 int sbt_num_fourths_tb0; ///< SbtNumFourthsTb0
396
397 uint8_t is_cu_qp_delta_coded; ///< IsCuQpDeltaCoded
398 int cu_qg_top_left_x; ///< CuQgTopLeftX
399 int cu_qg_top_left_y; ///< CuQgTopLeftY
400 int is_cu_chroma_qp_offset_coded; ///< IsCuChromaQpOffsetCoded
401 int chroma_qp_offset[3]; ///< CuQpOffsetCb, CuQpOffsetCr, CuQpOffsetCbCr
402
403 int infer_tu_cbf_luma; ///< InferTuCbfLuma
404 int prev_tu_cbf_y; ///< prevTuCbfY;
405
406 int lfnst_dc_only; ///< LfnstDcOnly
407 int lfnst_zero_out_sig_coeff_flag; ///< LfnstZeroOutSigCoeffFlag
408
409 int mts_dc_only; ///< MtsDcOnly
410 int mts_zero_out_sig_coeff_flag; ///< MtsZeroOutSigCoeffFlag;
412
413 struct {
414 // lmcs cache, for recon only
419
423 int *coeffs;
424
426
427#define BOUNDARY_LEFT_SLICE (1 << 0)
428#define BOUNDARY_LEFT_TILE (1 << 1)
429#define BOUNDARY_LEFT_SUBPIC (1 << 2)
430#define BOUNDARY_UPPER_SLICE (1 << 3)
431#define BOUNDARY_UPPER_TILE (1 << 4)
432#define BOUNDARY_UPPER_SUBPIC (1 << 5)
433 /* properties of the boundary of the current CTB for the purposes
434 * of the deblocking filter */
436
437 int num_ras[2];
439
441
442 union {
443 struct {
444 /* *2 for high bit depths */
448 union {
451 };
452 } pred; ///< only accessed in ff_vvc_predict_inter() and ff_vvc_predict_ciip()
453 ///< during the inter and reconstruction stages
454 struct {
456 } sao; ///< only accessed in ff_vvc_sao_filter() during the sao processing stage
457 struct {
463 } alf; ///< only accessed in ff_vvc_alf_filter() during the alf processing stage
464 };
466
467typedef struct VVCAllowedSplit {
468 int qt;
469 int btv;
470 int bth;
471 int ttv;
472 int tth;
474
475typedef struct SAOParams {
476 int offset_abs[3][4]; ///< sao_offset_abs
477 int offset_sign[3][4]; ///< sao_offset_sign
478
479 uint8_t band_position[3]; ///< sao_band_position
480
481 int eo_class[3]; ///< sao_eo_class
482
483 int16_t offset_val[3][5]; ///< SaoOffsetVal
484
485 uint8_t type_idx[3]; ///< sao_type_idx
486} SAOParams;
487
488typedef struct ALFParams {
489 uint8_t ctb_flag[3]; ///< alf_ctb_flag[]
490 uint8_t ctb_filt_set_idx_y; ///< AlfCtbFiltSetIdxY
491 uint8_t alf_ctb_filter_alt_idx[2]; ///< alf_ctb_filter_alt_idx[]
492 uint8_t ctb_cc_idc[2]; ///< alf_ctb_cc_cb_idc, alf_ctb_cc_cr_idc
493} ALFParams;
494
495typedef struct VVCRect {
496 int l; // left
497 int t; // top
498 int r; // right
499 int b; // bottom
500} VVCRect;
501
502/**
503 * parse a CTU
504 * @param lc local context for CTU
505 * @param ctb_idx CTB(CTU) address in the current slice
506 * @param rs raster order for the CTU.
507 * @param rx raster order x for the CTU.
508 * @param ry raster order y for the CTU.
509 * @return AVERROR
510 */
511int ff_vvc_coding_tree_unit(VVCLocalContext *lc, int ctu_idx, int rs, int rx, int ry);
512
513//utils
514void ff_vvc_set_neighbour_available(VVCLocalContext *lc, int x0, int y0, int w, int h);
515void ff_vvc_decode_neighbour(VVCLocalContext *lc, int x_ctb, int y_ctb, int rx, int ry, int rs);
517int ff_vvc_get_qPy(const VVCFrameContext *fc, int xc, int yc);
518void ff_vvc_ep_init_stat_coeff(EntryPoint *ep, int bit_depth, int persistent_rice_adaptation_enabled_flag);
519void ff_vvc_channel_range(int *start, int *end, VVCTreeType tree_type, uint8_t chroma_format_idc);
520
521#endif // AVCODEC_VVC_CTU_H
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
Definition af_astats.c:246
static int parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition apv_parser.c:92
int32_t
Context Adaptive Binary Arithmetic Coder.
#define VVC_CONTEXTS
Definition ctu.h:364
#define ALF_MAX_FILTER_SIZE
Definition ctu.h:91
#define AFFINE_MIN_BLOCK_SIZE
Definition ctu.h:69
IspType
Definition ctu.h:121
@ ISP_NO_SPLIT
Definition ctu.h:122
@ ISP_VER_SPLIT
Definition ctu.h:124
@ ISP_HOR_SPLIT
Definition ctu.h:123
PredMode
Definition ctu.h:191
@ MODE_PLT
Definition ctu.h:195
@ MODE_IBC
Definition ctu.h:196
MotionModelIdc
Definition ctu.h:218
@ MOTION_6_PARAMS_AFFINE
Definition ctu.h:221
@ MOTION_4_PARAMS_AFFINE
Definition ctu.h:220
@ MOTION_TRANSLATION
Definition ctu.h:219
PredFlag
Definition ctu.h:224
@ PF_PLT
Definition ctu.h:230
@ PF_IBC
Definition ctu.h:229
#define ALF_GRADIENT_SIZE
Definition ctu.h:87
VVCTreeType
Definition ctu.h:169
@ DUAL_TREE_LUMA
Definition ctu.h:171
@ DUAL_TREE_CHROMA
Definition ctu.h:172
@ SINGLE_TREE
Definition ctu.h:170
IntraPredMode
Definition ctu.h:233
@ INTRA_HORZ
Definition ctu.h:237
@ INTRA_DIAG
Definition ctu.h:238
@ INTRA_VDIAG
Definition ctu.h:240
@ INTRA_L_CCLM
Definition ctu.h:242
@ INTRA_LT_CCLM
Definition ctu.h:241
@ INTRA_T_CCLM
Definition ctu.h:243
@ INTRA_VERT
Definition ctu.h:239
@ INTRA_INVALID
Definition ctu.h:234
#define MAX_PB_SIZE
Definition ctu.h:51
#define SAO_PADDING_SIZE
Definition ctu.h:74
#define MAX_PARTS_IN_CTU
Definition ctu.h:41
void ff_vvc_ctu_free_cus(CodingUnit **cus)
Definition ctu.c:2887
#define MAX_NUM_HMVP_CANDS
Definition ctu.h:72
#define MAX_CONTROL_POINTS
Definition ctu.h:67
MtsIdx
Definition ctu.h:136
@ MTS_DST7_DCT8
Definition ctu.h:139
@ MTS_DCT8_DCT8
Definition ctu.h:141
@ MTS_DCT2_DCT2
Definition ctu.h:137
@ MTS_DST7_DST7
Definition ctu.h:138
@ MTS_DCT8_DST7
Definition ctu.h:140
VVCSplitMode
Definition ctu.h:127
@ SPLIT_TT_VER
Definition ctu.h:131
@ SPLIT_TT_HOR
Definition ctu.h:129
@ SPLIT_BT_HOR
Definition ctu.h:130
@ SPLIT_BT_VER
Definition ctu.h:132
@ SPLIT_QT
Definition ctu.h:133
#define ALF_PADDING_SIZE
Definition ctu.h:76
void ff_vvc_decode_neighbour(VVCLocalContext *lc, int x_ctb, int y_ctb, int rx, int ry, int rs)
Definition ctu.c:2839
void ff_vvc_ep_init_stat_coeff(EntryPoint *ep, int bit_depth, int persistent_rice_adaptation_enabled_flag)
Definition ctu.c:2914
#define ALF_NUM_DIR
Definition ctu.h:88
void ff_vvc_channel_range(int *start, int *end, VVCTreeType tree_type, uint8_t chroma_format_idc)
Definition ctu.c:2923
#define MAX_CTU_SIZE
Definition ctu.h:33
#define EDGE_EMU_BUFFER_STRIDE
Definition ctu.h:53
int ff_vvc_get_qPy(const VVCFrameContext *fc, int xc, int yc)
Definition ctu.c:2906
void ff_vvc_set_neighbour_available(VVCLocalContext *lc, int x0, int y0, int w, int h)
Definition ctu.c:2872
int ff_vvc_coding_tree_unit(VVCLocalContext *lc, int ctu_idx, int rs, int rx, int ry)
parse a CTU
Definition ctu.c:2808
static const uint16_t fc[]
Definition dcaenc.h:43
#define CHROMA(h)
Definition h264dec.h:88
PredMode
Definition hevcdec.h:105
@ MODE_INTER
Definition hevcdec.h:106
@ MODE_SKIP
Definition hevcdec.h:108
PredFlag
Definition hevcdec.h:117
@ PF_L1
Definition hevcdec.h:120
@ PF_BI
Definition hevcdec.h:121
@ PF_L0
Definition hevcdec.h:119
@ PF_INTRA
Definition hevcdec.h:118
IntraPredMode
Definition hevcdec.h:124
@ INTRA_DC
Definition hevcdec.h:126
@ INTRA_PLANAR
Definition hevcdec.h:125
SAOType
Definition hevcdec.h:162
@ SAO_BAND
Definition hevcdec.h:164
@ SAO_NOT_APPLIED
Definition hevcdec.h:163
@ SAO_EDGE
Definition hevcdec.h:165
SAOEOClass
Definition hevcdec.h:169
@ SAO_EO_VERT
Definition hevcdec.h:171
@ SAO_EO_45D
Definition hevcdec.h:173
@ SAO_EO_135D
Definition hevcdec.h:172
@ SAO_EO_HORIZ
Definition hevcdec.h:170
static const int8_t mv[256][2]
Definition 4xm.c:81
@ VVC_MAX_NUM_PALETTE_PREDICTOR_SIZE
Definition vvc.h:159
@ VVC_MAX_REF_ENTRIES
Definition vvc.h:115
@ VVC_MAX_SAMPLE_ARRAYS
Definition vvc.h:77
uint8_t w
Definition llvidencdsp.c:39
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
@ SPLIT_NONE
Definition mss12.c:37
uint8_t ctb_flag[3]
alf_ctb_flag[]
Definition ctu.h:489
uint8_t alf_ctb_filter_alt_idx[2]
alf_ctb_filter_alt_idx[]
Definition ctu.h:491
uint8_t ctb_filt_set_idx_y
AlfCtbFiltSetIdxY.
Definition ctu.h:490
uint8_t ctb_cc_idc[2]
alf_ctb_cc_cb_idc, alf_ctb_cc_cr_idc
Definition ctu.h:492
Definition ctu.h:345
int max_y[2][VVC_MAX_REF_ENTRIES]
Definition ctu.h:346
int has_dmvr
Definition ctu.h:348
int max_y_idx[2]
Definition ctu.h:347
int apply_lfnst_flag[VVC_MAX_SAMPLE_ARRAYS]
ApplyLfnstFlag[].
Definition ctu.h:329
TransformUnit * head
RefStruct reference.
Definition ctu.h:332
enum PredMode pred_mode
PredMode.
Definition hevcdec.h:294
Palette plt[VVC_MAX_SAMPLE_ARRAYS]
Definition ctu.h:338
int mip_chroma_direct_flag
MipChromaDirectFlag.
Definition ctu.h:325
int bdpcm_flag[VVC_MAX_SAMPLE_ARRAYS]
BdpcmFlag.
Definition ctu.h:327
int cqt_depth
Definition ctu.h:296
uint8_t sbt_horizontal_flag
Definition ctu.h:301
enum IspType isp_split_type
IntraSubPartitionsSplitType.
Definition ctu.h:317
uint8_t coded_flag
Definition ctu.h:298
int cb_width
Definition ctu.h:293
uint8_t sbt_pos_flag
Definition ctu.h:302
struct CodingUnit * next
RefStruct reference.
Definition ctu.h:342
uint8_t skip_flag
cu_skip_flag;
Definition ctu.h:311
MtsIdx mts_idx
Definition ctu.h:305
IntraPredMode intra_pred_mode_y
IntraPredModeY.
Definition ctu.h:323
int cb_height
Definition ctu.h:294
int lfnst_idx
Definition ctu.h:304
VVCTreeType tree_type
Definition ctu.h:290
PredictionUnit pu
Definition ctu.h:340
uint8_t ciip_flag
Definition ctu.h:314
int x0
Definition ctu.h:291
uint8_t intra_luma_ref_idx
IntraLumaRefLineIdx[][].
Definition ctu.h:309
IntraPredMode intra_pred_mode_c
IntraPredModeC.
Definition ctu.h:324
int y0
Definition ctu.h:292
int num_intra_subpartitions
Definition ctu.h:321
TransformUnit * tail
RefStruct reference.
Definition ctu.h:333
struct CodingUnit::@377377256006074143206227277326325371142325360110 tus
int ch_type
Definition ctu.h:295
uint8_t intra_mip_flag
intra_mip_flag
Definition ctu.h:310
uint8_t sbt_flag
Definition ctu.h:300
uint8_t act_enabled_flag
Definition ctu.h:307
int8_t qp[4]
QpY, Qp′Cb, Qp′Cr, Qp′CbCr.
Definition ctu.h:336
Mv mv[2]
mvL0, vvL1
Definition ctu.h:214
uint8_t dmvr_enabled
Definition ctu.h:215
MvField hmvp[MAX_NUM_HMVP_CANDS]
HmvpCandList.
Definition ctu.h:380
int num_hmvp_ibc
NumHmvpIbcCand.
Definition ctu.h:383
MvField hmvp_ibc[MAX_NUM_HMVP_CANDS]
HmvpIbcCandList.
Definition ctu.h:382
CABACContext cc
Definition ctu.h:375
int ctu_end
Definition ctu.h:371
int ctu_start
Definition ctu.h:370
int num_hmvp
NumHmvpCand.
Definition ctu.h:381
int stat_coeff[VVC_MAX_SAMPLE_ARRAYS]
StatCoeff.
Definition ctu.h:373
int8_t qp_y
QpY.
Definition ctu.h:366
uint8_t is_first_qg
Definition ctu.h:368
VVCCabacState cabac_state[VVC_CONTEXTS]
Definition ctu.h:376
Palette pp[VVC_MAX_SAMPLE_ARRAYS]
Definition ctu.h:378
PredFlag pred_flag
Definition ctu.h:251
int num_sb_x
Definition ctu.h:255
uint8_t bcw_idx
bcwIdx
Definition ctu.h:250
Mv mv[2][MAX_CONTROL_POINTS]
Definition ctu.h:253
int num_sb_y
Definition ctu.h:255
uint8_t hpel_if_idx
hpelIfIdx
Definition ctu.h:249
int8_t ref_idx[2]
refIdxL0, refIdxL1
Definition ctu.h:248
MotionModelIdc motion_model_idc
MotionModelIdc.
Definition ctu.h:247
uint8_t hpel_if_idx
hpelIfIdx
Definition ctu.h:207
int8_t ref_idx[2]
refIdxL0, refIdxL1
Definition hevcdec.h:310
int8_t pred_flag
Definition hevcdec.h:311
uint8_t bcw_idx
bcwIdx
Definition ctu.h:208
uint8_t ciip_flag
ciip_flag
Definition ctu.h:210
Definition hevcdec.h:303
int16_t x
horizontal component of motion vector
Definition hevcdec.h:304
int16_t y
vertical component of motion vector
Definition hevcdec.h:305
uint8_t size
Definition ctu.h:285
uint16_t entries[VVC_MAX_NUM_PALETTE_PREDICTOR_SIZE]
Definition ctu.h:286
int cb_prof_flag[2]
Definition ctu.h:281
uint8_t mmvd_merge_flag
Definition ctu.h:260
uint8_t merge_gpm_flag
Definition ctu.h:267
MotionInfo mi
Definition ctu.h:273
uint8_t inter_affine_flag
Definition ctu.h:262
uint8_t dmvr_flag
Definition ctu.h:276
MvField gpm_mv[2]
Definition ctu.h:269
int16_t diff_mv_y[2][AFFINE_MIN_BLOCK_SIZE *AFFINE_MIN_BLOCK_SIZE]
diffMvLX
Definition ctu.h:280
uint8_t merge_subblock_flag
Definition ctu.h:265
uint8_t general_merge_flag
Definition ctu.h:259
uint8_t gpm_partition_idx
Definition ctu.h:268
int16_t diff_mv_x[2][AFFINE_MIN_BLOCK_SIZE *AFFINE_MIN_BLOCK_SIZE]
diffMvLX
Definition ctu.h:279
int sym_mvd_flag
Definition ctu.h:271
uint8_t bdof_flag
Definition ctu.h:277
int offset_sign[3][4]
sao_offset_sign
Definition dsp.h:36
int16_t offset_val[3][5]
SaoOffsetVal.
Definition dsp.h:42
uint8_t band_position[3]
sao_band_position
Definition dsp.h:38
int eo_class[3]
sao_eo_class
Definition dsp.h:40
int offset_abs[3][4]
sao_offset_abs
Definition dsp.h:35
uint8_t type_idx[3]
sao_type_idx
Definition dsp.h:44
int min_scan_y
Definition ctu.h:159
int log2_tb_width
Definition ctu.h:153
int * coeffs
Definition ctu.h:166
int max_scan_y
Definition ctu.h:157
uint8_t c_idx
Definition ctu.h:146
uint8_t has_coeffs
Definition ctu.h:145
int bd_offset
Definition ctu.h:164
int tb_width
Definition ctu.h:151
int bd_shift
Definition ctu.h:163
int log2_tb_height
Definition ctu.h:154
int rect_non_ts_flag
Definition ctu.h:162
int min_scan_x
Definition ctu.h:158
int max_scan_x
Definition ctu.h:156
uint8_t ts
transform_skip_flag
Definition ctu.h:147
int tb_height
Definition ctu.h:152
uint8_t nb_tbs
Definition ctu.h:185
int height
Definition ctu.h:179
uint8_t coded_flag[VVC_MAX_SAMPLE_ARRAYS]
tu_y_coded_flag, tu_cb_coded_flag, tu_cr_coded_flag
Definition ctu.h:184
TransformBlock tbs[VVC_MAX_SAMPLE_ARRAYS]
Definition ctu.h:186
bool avail[CHROMA+1]
Definition ctu.h:180
int width
Definition ctu.h:178
uint8_t joint_cbcr_residual_flag
tu_joint_cbcr_residual_flag
Definition ctu.h:182
struct TransformUnit * next
RefStruct reference.
Definition ctu.h:188
uint16_t state[2]
Definition ctu.h:359
uint8_t shift[2]
Definition ctu.h:360
struct VVCLocalContext::@341344066320375062105147172263124117020342060326::@055222342063040312177217323172174124065003301256 alf
only accessed in ff_vvc_alf_filter() during the alf processing stage
int cu_qg_top_left_y
CuQgTopLeftY.
Definition ctu.h:399
struct VVCLocalContext::@341344066320375062105147172263124117020342060326::@103125161133210147111054051001007356327371002074 sao
only accessed in ff_vvc_sao_filter() during the sao processing stage
int cu_qg_top_left_x
CuQgTopLeftX.
Definition ctu.h:398
uint8_t buffer_luma[(MAX_CTU_SIZE+2 *ALF_PADDING_SIZE) *EDGE_EMU_BUFFER_STRIDE *2]
Definition ctu.h:458
uint8_t ciip_tmp[MAX_PB_SIZE *MAX_PB_SIZE *2]
Definition ctu.h:450
uint8_t is_cu_qp_delta_coded
IsCuQpDeltaCoded.
Definition ctu.h:397
int lfnst_zero_out_sig_coeff_flag
LfnstZeroOutSigCoeffFlag.
Definition ctu.h:407
CodingUnit * cu
Definition ctu.h:425
EntryPoint * ep
Definition ctu.h:422
int32_t gradient_tmp[ALF_GRADIENT_SIZE *ALF_GRADIENT_SIZE *ALF_NUM_DIR]
Definition ctu.h:460
int mts_dc_only
MtsDcOnly.
Definition ctu.h:409
int chroma_scale
Definition ctu.h:415
int infer_tu_cbf_luma
InferTuCbfLuma.
Definition ctu.h:403
int prev_tu_cbf_y
prevTuCbfY;
Definition ctu.h:404
struct VVCLocalContext::@341344066320375062105147172263124117020342060326::@073072245072044000206134265330343062236310026066 pred
only accessed in ff_vvc_predict_inter() and ff_vvc_predict_ciip() during the inter and reconstruction...
int16_t clip_tmp[ALF_MAX_FILTER_SIZE]
Definition ctu.h:462
uint8_t edge_emu_buffer[EDGE_EMU_BUFFER_STRIDE *EDGE_EMU_BUFFER_STRIDE *2]
Definition ctu.h:445
uint8_t ctb_up_right_flag
Definition ctu.h:389
struct VVCLocalContext::@021361013100205372061325107241166327104062156055 lmcs
int sbt_num_fourths_tb0
SbtNumFourthsTb0.
Definition ctu.h:395
int16_t tmp1[MAX_PB_SIZE *MAX_PB_SIZE]
Definition ctu.h:447
int * coeffs
Definition ctu.h:423
uint8_t buffer_chroma[(MAX_CTU_SIZE+2 *ALF_PADDING_SIZE) *EDGE_EMU_BUFFER_STRIDE *2]
Definition ctu.h:459
uint8_t ctb_up_flag
Definition ctu.h:388
VVCFrameContext * fc
Definition ctu.h:421
uint8_t buffer[(MAX_CTU_SIZE+2 *SAO_PADDING_SIZE) *EDGE_EMU_BUFFER_STRIDE *2]
Definition ctu.h:455
int16_t coeff_tmp[ALF_MAX_FILTER_SIZE]
Definition ctu.h:461
ReconstructedArea ras[2][MAX_PARTS_IN_CTU]
Definition ctu.h:438
int chroma_qp_offset[3]
CuQpOffsetCb, CuQpOffsetCr, CuQpOffsetCbCr.
Definition ctu.h:401
uint8_t ctb_up_left_flag
Definition ctu.h:390
NeighbourAvailable na
Definition ctu.h:440
int16_t prof_tmp[MAX_PB_SIZE *MAX_PB_SIZE]
Definition ctu.h:449
int mts_zero_out_sig_coeff_flag
MtsZeroOutSigCoeffFlag;.
Definition ctu.h:410
int is_cu_chroma_qp_offset_coded
IsCuChromaQpOffsetCoded.
Definition ctu.h:400
SliceContext * sc
Definition ctu.h:420
int16_t tmp[MAX_PB_SIZE *MAX_PB_SIZE]
Definition ctu.h:446
int end_of_tiles_x
Definition ctu.h:391
uint8_t ctb_left_flag
Definition ctu.h:387
int boundary_flags
Definition ctu.h:435
int lfnst_dc_only
LfnstDcOnly.
Definition ctu.h:406
int num_ras[2]
Definition ctu.h:437
int end_of_tiles_y
Definition ctu.h:392
Definition ctu.h:495
int r
Definition ctu.h:498
int b
Definition ctu.h:499
int l
Definition ctu.h:496
int t
Definition ctu.h:497
#define MODE_INTRA
Definition vp3.c:83