42 #if RExt__DECODER_DEBUG_BIT_STATISTICS
52 Void xTraceVPSHeader ()
54 fprintf( g_hTrace,
"=========== Video Parameter Set ===========\n" );
57 Void xTraceSPSHeader ()
59 fprintf( g_hTrace,
"=========== Sequence Parameter Set ===========\n" );
62 Void xTracePPSHeader ()
64 fprintf( g_hTrace,
"=========== Picture Parameter Set ===========\n");
67 Void xTraceSliceHeader ()
69 fprintf( g_hTrace,
"=========== Slice ===========\n");
101 interRPSPred =
false;
116 assert(code <= idx-1);
117 Int rIdx = idx - 1 - code;
118 assert (rIdx <= idx-1 && rIdx >= 0);
120 Int k = 0, k0 = 0, k1 = 0;
123 Int deltaRPS = (1 - 2 * bit) * (code + 1);
126 READ_CODE(1, bit,
"used_by_curr_pic_flag" );
133 if (refIdc == 1 || refIdc == 2)
137 rps->
setUsed(k, (refIdc == 1));
197 assert(uiCode <= 63);
201 assert(uiCode <= 15);
214 READ_UVLC_CHK(uiCode,
"num_ref_idx_l0_default_active_minus1", 0, 14);
215 assert(uiCode <= 14);
218 READ_UVLC_CHK(uiCode,
"num_ref_idx_l1_default_active_minus1", 0, 14);
219 assert(uiCode <= 14);
224 READ_FLAG( uiCode,
"transform_skip_enabled_flag" );
227 READ_FLAG( uiCode,
"cu_qp_delta_enabled_flag" ); pcPPS->
setUseDQP( uiCode ?
true :
false );
230 READ_UVLC( uiCode,
"diff_cu_qp_delta_depth" );
249 READ_FLAG( uiCode,
"pps_slice_chroma_qp_offsets_present_flag" );
252 READ_FLAG( uiCode,
"weighted_pred_flag" );
254 READ_FLAG( uiCode,
"weighted_bipred_flag" );
257 READ_FLAG( uiCode,
"transquant_bypass_enabled_flag");
273 if (tileColumnsMinus1 > 0)
275 std::vector<Int> columnWidth(tileColumnsMinus1);
276 for(
UInt i = 0; i < tileColumnsMinus1; i++)
278 READ_UVLC( uiCode,
"column_width_minus1" );
279 columnWidth[i] = uiCode+1;
284 if (tileRowsMinus1 > 0)
286 std::vector<Int> rowHeight (tileRowsMinus1);
287 for(
UInt i = 0; i < tileRowsMinus1; i++)
289 READ_UVLC( uiCode,
"row_height_minus1" );
290 rowHeight[i] = uiCode + 1;
295 assert ((tileColumnsMinus1 + tileRowsMinus1) != 0);
316 READ_FLAG( uiCode,
"lists_modification_present_flag");
319 READ_UVLC( uiCode,
"log2_parallel_merge_level_minus2");
322 READ_FLAG( uiCode,
"slice_segment_header_extension_present_flag");
325 READ_FLAG( uiCode,
"pps_extension_present_flag");
328 #if ENC_DEC_TRACE || RExt__DECODER_DEBUG_BIT_STATISTICS
329 static const TChar *syntaxStrings[]={
"pps_range_extension_flag",
330 "pps_multilayer_extension_flag",
331 "pps_extension_6bits[0]",
332 "pps_extension_6bits[1]",
333 "pps_extension_6bits[2]",
334 "pps_extension_6bits[3]",
335 "pps_extension_6bits[4]",
336 "pps_extension_6bits[5]" };
343 pps_extension_flags[i] = uiCode!=0;
346 Bool bSkipTrailingExtensionBits=
false;
349 if (pps_extension_flags[i])
356 assert(!bSkipTrailingExtensionBits);
360 READ_UVLC( uiCode,
"log2_max_transform_skip_block_size_minus2");
364 READ_FLAG( uiCode,
"cross_component_prediction_enabled_flag");
367 READ_FLAG( uiCode,
"chroma_qp_offset_list_enabled_flag");
376 UInt tableSizeMinus1 = 0;
380 for (
Int cuChromaQpOffsetIdx = 0; cuChromaQpOffsetIdx <= (tableSizeMinus1); cuChromaQpOffsetIdx++)
385 assert(cbOffset >= -12 && cbOffset <= 12);
387 assert(crOffset >= -12 && crOffset <= 12);
394 READ_UVLC( uiCode,
"log2_sao_offset_scale_luma");
396 READ_UVLC( uiCode,
"log2_sao_offset_scale_chroma");
401 bSkipTrailingExtensionBits=
true;
406 if (bSkipTrailingExtensionBits)
410 READ_FLAG( uiCode,
"pps_extension_data_flag");
420 fprintf( g_hTrace,
"----------- vui_parameters -----------\n");
468 READ_FLAG( uiCode,
"default_display_window_flag");
504 assert(uiCode < 4096);
515 if( commonInfPresentFlag )
541 for( i = 0; i <= maxNumSubLayersMinus1; i ++ )
569 for( nalOrVcl = 0; nalOrVcl < 2; nalOrVcl ++ )
583 READ_FLAG( uiCode,
"cbr_flag" ); hrd->
setCbrFlag( i, j, nalOrVcl, uiCode == 1 ?
true :
false );
606 assert( uiCode == 1 );
611 assert(uiCode <= 15);
625 READ_FLAG( uiCode,
"conformance_window_flag");
640 #if O0043_BEST_EFFORT_DECODING
642 const UInt forceDecodeBitDepth = pcSPS->getForceDecodeBitDepth();
643 if (forceDecodeBitDepth != 0)
645 uiCode = forceDecodeBitDepth - 8;
651 #if O0043_BEST_EFFORT_DECODING
659 #if O0043_BEST_EFFORT_DECODING
661 if (forceDecodeBitDepth != 0)
663 uiCode = forceDecodeBitDepth - 8;
668 #if O0043_BEST_EFFORT_DECODING
676 UInt subLayerOrderingInfoPresentFlag;
677 READ_FLAG(subLayerOrderingInfoPresentFlag,
"sps_sub_layer_ordering_info_present_flag");
681 READ_UVLC ( uiCode,
"sps_max_dec_pic_buffering_minus1[i]");
683 READ_UVLC ( uiCode,
"sps_max_num_reorder_pics[i]" );
685 READ_UVLC ( uiCode,
"sps_max_latency_increase_plus1[i]");
688 if (!subLayerOrderingInfoPresentFlag)
702 READ_UVLC_CHK( uiCode,
"log2_min_luma_coding_block_size_minus3", 0, maxLog2CtbSize-3 );
703 assert(uiCode <= maxLog2CtbSize-3);
704 Int minCbLog2SizeY = uiCode + 3;
709 const UInt minLog2DiffMaxMinLumaCodingBlockSize = minLog2CtbSize < minCbLog2SizeY ? 0 : minLog2CtbSize - minCbLog2SizeY;
710 const UInt maxLog2DiffMaxMinLumaCodingBlockSize = maxLog2CtbSize - minCbLog2SizeY;
712 READ_UVLC_CHK( uiCode,
"log2_diff_max_min_luma_coding_block_size", minLog2DiffMaxMinLumaCodingBlockSize, maxLog2DiffMaxMinLumaCodingBlockSize);
713 assert(uiCode >= minLog2DiffMaxMinLumaCodingBlockSize && uiCode <= maxLog2DiffMaxMinLumaCodingBlockSize);
716 const Int maxCUDepthDelta = uiCode;
717 const Int ctbLog2SizeY = minCbLog2SizeY + maxCUDepthDelta;
720 READ_UVLC_CHK( uiCode,
"log2_min_luma_transform_block_size_minus2", 0, minCbLog2SizeY-1-2 );
721 const UInt minTbLog2SizeY = uiCode + 2;
725 READ_UVLC_CHK( uiCode,
"log2_diff_max_min_luma_transform_block_size", 0, min<UInt>(5U, ctbLog2SizeY) - minTbLog2SizeY );
745 READ_FLAG( uiCode,
"sample_adaptive_offset_enabled_flag" ); pcSPS->
setUseSAO ( uiCode ?
true :
false );
750 #if O0043_BEST_EFFORT_DECODING
757 READ_UVLC_CHK( uiCode,
"log2_min_pcm_luma_coding_block_size_minus3", std::min<UInt>(minCbLog2SizeY, 5 )-3, std::min<UInt>(ctbLog2SizeY, 5)-3);
758 const UInt log2MinIpcmCbSizeY = uiCode+3;
760 READ_UVLC_CHK( uiCode,
"log2_diff_max_min_pcm_luma_coding_block_size", 0, (std::min<UInt>(ctbLog2SizeY,5) - log2MinIpcmCbSizeY) );
765 READ_UVLC_CHK( uiCode,
"num_short_term_ref_pic_sets", 0, 64 );
766 assert(uiCode <= 64);
780 READ_UVLC_CHK( uiCode,
"num_long_term_ref_pics_sps", 0, 32 );
786 READ_FLAG( uiCode,
"used_by_curr_pic_lt_sps_flag[i]");
801 READ_FLAG( uiCode,
"sps_extension_present_flag");
804 #if ENC_DEC_TRACE || RExt__DECODER_DEBUG_BIT_STATISTICS
805 static const TChar *syntaxStrings[]={
"sps_range_extension_flag",
806 "sps_multilayer_extension_flag",
807 "sps_extension_6bits[0]",
808 "sps_extension_6bits[1]",
809 "sps_extension_6bits[2]",
810 "sps_extension_6bits[3]",
811 "sps_extension_6bits[4]",
812 "sps_extension_6bits[5]" };
819 sps_extension_flags[i] = uiCode!=0;
822 Bool bSkipTrailingExtensionBits=
false;
825 if (sps_extension_flags[i])
830 assert(!bSkipTrailingExtensionBits);
845 bSkipTrailingExtensionBits=
true;
850 if (bSkipTrailingExtensionBits)
854 READ_FLAG( uiCode,
"sps_extension_data_flag");
870 READ_FLAG( uiCode,
"vps_base_layer_internal_flag" ); assert(uiCode == 1);
871 READ_FLAG( uiCode,
"vps_base_layer_available_flag" ); assert(uiCode == 1);
872 READ_CODE( 6, uiCode,
"vps_max_layers_minus1" );
876 READ_CODE( 16, uiCode,
"vps_reserved_0xffff_16bits" ); assert(uiCode == 0xffff);
878 UInt subLayerOrderingInfoPresentFlag;
879 READ_FLAG(subLayerOrderingInfoPresentFlag,
"vps_sub_layer_ordering_info_present_flag");
886 if (!subLayerOrderingInfoPresentFlag)
945 READ_FLAG( uiCode,
"vps_extension_flag" );
950 READ_FLAG( uiCode,
"vps_extension_data_flag");
968 UInt firstSliceSegmentInPic;
969 READ_FLAG( firstSliceSegmentInPic,
"first_slice_segment_in_pic_flag" );
972 READ_FLAG( uiCode,
"no_output_of_prior_pics_flag" );
976 pps = parameterSetManager->
getPPS(uiCode);
996 UInt sliceSegmentAddress = 0;
997 Int bitsSliceSegmentAddress = 0;
998 while(numCTUs>(1<<bitsSliceSegmentAddress))
1000 bitsSliceSegmentAddress++;
1003 if(!firstSliceSegmentInPic)
1005 READ_CODE( bitsSliceSegmentAddress, sliceSegmentAddress,
"slice_segment_address" );
1021 READ_FLAG(uiCode,
"slice_reserved_flag[]");
1048 Int iPOClsb = uiCode;
1049 Int iPrevPOC = prevTid0POC;
1051 Int iPrevPOClsb = iPrevPOC & (iMaxPOClsb - 1);
1052 Int iPrevPOCmsb = iPrevPOC-iPrevPOClsb;
1054 if( ( iPOClsb < iPrevPOClsb ) && ( ( iPrevPOClsb - iPOClsb ) >= ( iMaxPOClsb / 2 ) ) )
1056 iPOCmsb = iPrevPOCmsb + iMaxPOClsb;
1058 else if( (iPOClsb > iPrevPOClsb ) && ( (iPOClsb - iPrevPOClsb ) > ( iMaxPOClsb / 2 ) ) )
1060 iPOCmsb = iPrevPOCmsb - iMaxPOClsb;
1064 iPOCmsb = iPrevPOCmsb;
1073 pcSlice->
setPOC (iPOCmsb+iPOClsb);
1080 READ_FLAG( uiCode,
"short_term_ref_pic_set_sps_flag" );
1094 READ_CODE( numBits, uiCode,
"short_term_ref_pic_set_idx");
1107 UInt numLtrpInSPS = 0;
1110 READ_UVLC( uiCode,
"num_long_term_sps");
1111 numLtrpInSPS = uiCode;
1112 numOfLtrp += numLtrpInSPS;
1115 Int bitsForLtrpInSPS = 0;
1121 numOfLtrp += uiCode;
1124 Int prevDeltaMSB = 0, deltaPocMSBCycleLT = 0;
1128 if (k < numLtrpInSPS)
1131 if (bitsForLtrpInSPS > 0)
1133 READ_CODE(bitsForLtrpInSPS, uiCode,
"lt_idx_sps[i]");
1138 rps->
setUsed(j,usedByCurrFromSPS);
1145 READ_FLAG(uiCode,
"delta_poc_msb_present_flag");
1146 Bool mSBPresentFlag = uiCode ?
true :
false;
1149 READ_UVLC( uiCode,
"delta_poc_msb_cycle_lt[i]" );
1150 Bool deltaFlag =
false;
1158 deltaPocMSBCycleLT = uiCode;
1162 deltaPocMSBCycleLT = uiCode + prevDeltaMSB;
1165 Int pocLTCurr = pcSlice->
getPOC() - deltaPocMSBCycleLT * maxPicOrderCntLSB
1166 - iPOClsb + pocLsbLt;
1167 rps->
setPOC (j, pocLTCurr);
1173 rps->
setPOC (j, pocLsbLt);
1178 if( j == offset+(numOfLtrp-numLtrpInSPS)-1 )
1180 deltaPocMSBCycleLT = 0;
1183 prevDeltaMSB = deltaPocMSBCycleLT;
1199 READ_FLAG( uiCode,
"slice_temporal_mvp_enabled_flag" );
1224 READ_FLAG( uiCode,
"num_ref_idx_active_override_flag");
1268 if ( numRpsCurrTempList0 > 1 )
1271 numRpsCurrTempList0 --;
1272 while ( numRpsCurrTempList0 >>= 1)
1278 READ_CODE( length, uiCode,
"list_entry_l0" );
1310 if ( numRpsCurrTempList1 > 1 )
1313 numRpsCurrTempList1 --;
1314 while ( numRpsCurrTempList1 >>= 1)
1320 READ_CODE( length, uiCode,
"list_entry_l1" );
1353 READ_FLAG( uiCode,
"collocated_from_l0_flag" );
1365 READ_UVLC( uiCode,
"collocated_ref_idx" );
1380 READ_UVLC( uiCode,
"five_minus_max_num_merge_cand");
1394 READ_SVLC( iCode,
"slice_cb_qp_offset" );
1404 READ_SVLC( iCode,
"slice_cr_qp_offset" );
1464 READ_FLAG( uiCode,
"slice_loop_filter_across_slices_enabled_flag");
1474 std::vector<UInt> entryPointOffset;
1477 UInt numEntryPointOffsets;
1478 UInt offsetLenMinus1;
1479 READ_UVLC(numEntryPointOffsets,
"num_entry_point_offsets");
1480 if (numEntryPointOffsets>0)
1482 READ_UVLC(offsetLenMinus1,
"offset_len_minus1");
1483 entryPointOffset.resize(numEntryPointOffsets);
1484 for (
UInt idx=0; idx<numEntryPointOffsets; idx++)
1486 READ_CODE(offsetLenMinus1+1, uiCode,
"entry_point_offset_minus1");
1487 entryPointOffset[ idx ] = uiCode + 1;
1494 READ_UVLC(uiCode,
"slice_segment_header_extension_length");
1495 for(
Int i=0; i<uiCode; i++)
1498 READ_CODE(8,ignore,
"slice_segment_header_extension_data_byte");
1501 #if RExt__DECODER_DEBUG_BIT_STATISTICS
1518 endOfSliceHeaderLocation++;
1522 Int curEntryPointOffset = 0;
1523 Int prevEntryPointOffset = 0;
1524 for (
UInt idx=0; idx<entryPointOffset.size(); idx++)
1526 curEntryPointOffset += entryPointOffset[ idx ];
1528 Int emulationPreventionByteCount = 0;
1534 emulationPreventionByteCount++;
1538 entryPointOffset[ idx ] -= emulationPreventionByteCount;
1539 prevEntryPointOffset = curEntryPointOffset;
1550 if(profilePresentFlag)
1556 for (
Int i = 0; i < maxNumSubLayersMinus1; i++)
1562 if (maxNumSubLayersMinus1 > 0)
1564 for (
Int i = maxNumSubLayersMinus1; i < 8; i++)
1566 READ_CODE(2, uiCode,
"reserved_zero_2bits");
1567 assert(uiCode == 0);
1571 for(
Int i = 0; i < maxNumSubLayersMinus1; i++)
1584 #if ENC_DEC_TRACE || RExt__DECODER_DEBUG_BIT_STATISTICS
1586 #define PTL_TRACE_TEXT(txt) bIsSubLayer?("sub_layer_" txt) : ("general_" txt)
1589 #define PTL_TRACE_TEXT(txt) txt
1596 for(
Int j = 0; j < 32; j++)
1611 UInt maxBitDepth=16;
1663 #undef PTL_TRACE_TEXT
1673 if (uiPeekValue == (1<<(iBitsLeft-1)))
1682 if (noTrailingBytesExpected)
1685 assert (numberOfRemainingSubstreamBytes == 0);
1692 if (trailingNullByte!=0)
1694 printf(
"Trailing byte should be 0, but has value %02x\n", trailingNullByte);
1695 assert(trailingNullByte==0);
1831 const Int iNbRef = (eSliceType ==
B_SLICE ) ? (2) : (1);
1832 UInt uiLog2WeightDenomLuma=0, uiLog2WeightDenomChroma=0;
1833 UInt uiTotalSignalledWeightFlags = 0;
1837 READ_UVLC( uiLog2WeightDenomLuma,
"luma_log2_weight_denom" );
1838 assert( uiLog2WeightDenomLuma <= 7 );
1841 READ_SVLC( iDeltaDenom,
"delta_chroma_log2_weight_denom" );
1842 assert((iDeltaDenom + (
Int)uiLog2WeightDenomLuma)>=0);
1843 assert((iDeltaDenom + (
Int)uiLog2WeightDenomLuma)<=7);
1844 uiLog2WeightDenomChroma = (
UInt)(iDeltaDenom + uiLog2WeightDenomLuma);
1847 for (
Int iNumRef=0 ; iNumRef<iNbRef ; iNumRef++ )
1850 for (
Int iRefIdx=0 ; iRefIdx<pcSlice->
getNumRefIdx(eRefPicList) ; iRefIdx++ )
1855 for(
Int j=1; j<numValidComp; j++)
1861 READ_FLAG( uiCode, iNumRef==0?
"luma_weight_l0_flag[i]":
"luma_weight_l1_flag[i]" );
1868 for (
Int iRefIdx=0 ; iRefIdx<pcSlice->
getNumRefIdx(eRefPicList) ; iRefIdx++ )
1871 READ_FLAG( uiCode, iNumRef==0?
"chroma_weight_l0_flag[i]":
"chroma_weight_l1_flag[i]" );
1872 for(
Int j=1; j<numValidComp; j++)
1879 for (
Int iRefIdx=0 ; iRefIdx<pcSlice->
getNumRefIdx(eRefPicList) ; iRefIdx++ )
1885 READ_SVLC( iDeltaWeight, iNumRef==0?
"delta_luma_weight_l0[i]":
"delta_luma_weight_l1[i]" );
1886 assert( iDeltaWeight >= -128 );
1887 assert( iDeltaWeight <= 127 );
1891 assert( wp[0].iOffset >= -range );
1892 assert( wp[0].iOffset < range );
1904 for (
Int j=1 ; j<numValidComp ; j++ )
1907 READ_SVLC( iDeltaWeight, iNumRef==0?
"delta_chroma_weight_l0[i]":
"delta_chroma_weight_l1[i]" );
1908 assert( iDeltaWeight >= -128 );
1909 assert( iDeltaWeight <= 127 );
1913 READ_SVLC( iDeltaChroma, iNumRef==0?
"delta_chroma_offset_l0[i]":
"delta_chroma_offset_l1[i]" );
1914 assert( iDeltaChroma >= -4*range);
1915 assert( iDeltaChroma < 4*range);
1916 Int pred = ( range - ( ( range*wp[j].
iWeight)>>(wp[j].uiLog2WeightDenom) ) );
1917 wp[j].
iOffset =
Clip3(-range, range-1, (iDeltaChroma + pred) );
1922 for (
Int j=1 ; j<numValidComp ; j++ )
1940 assert(uiTotalSignalledWeightFlags<=24);
1948 UInt code, sizeId, listId;
1949 Bool scalingListPredModeFlag;
1960 for(
Int i=0; i<size; i++)
1962 src[i] = srcNextSmallerSize[i];
1968 READ_FLAG( code,
"scaling_list_pred_mode_flag");
1969 scalingListPredModeFlag = (code) ?
true :
false;
1971 if(!scalingListPredModeFlag)
1973 READ_UVLC( code,
"scaling_list_pred_matrix_id_delta");
2007 Int scalingListDcCoefMinus8 = 0;
2014 READ_SVLC( scalingListDcCoefMinus8,
"scaling_list_dc_coef_minus8");
2019 for(i = 0; i < coefNum; i++)
2021 READ_SVLC( data,
"scaling_list_delta_coef");
2022 nextCoef = (nextCoef + data + 256 ) % 256;
2023 dst[scan[i]] = nextCoef;
2041 while ((cnt>0) && ((lastByte & 1) == 0))
Void setNumTileColumnsMinus1(Int i)
Int getNumberOfPositivePictures() const
Void setColourDescriptionPresentFlag(Bool i)
Bool getNalHrdParametersPresentFlag() const
Int getNumTileRowsMinus1() const
Void parseCrossComponentPrediction(class TComTU &rTu, ComponentID compID)
Void setSliceSegmentCurEndCtuTsAddr(UInt ctuTsAddr)
Void parsePTL(TComPTL *rpcPTL, Bool profilePresentFlag, Int maxNumSubLayersMinus1)
Void parseVPS(TComVPS *pcVPS)
Void setNoOutputPriorPicsFlag(Bool val)
Void setMaxTotalCUDepth(UInt u)
Int getPicInitQPMinus26() const
Void setTransformSkipRotationEnabledFlag(const Bool value)
static const Int SCALING_LIST_NUM
list number for quantization matrix
Void setUsed(Int bufferNum, Bool used)
Void setQuadtreeTULog2MaxSize(UInt u)
Void clearSubstreamSizes()
UInt getMaxNuhReservedZeroLayerId() const
SliceType
supported slice type
Bool getFixedPicRateFlag(Int layer) const
Bool getVclHrdParametersPresentFlag() const
UInt getMaxLatencyIncrease(UInt tLayer) const
Void setVideoSignalTypePresentFlag(Bool i)
Bool getSPSTemporalMVPEnabledFlag() const
Void setDeblockingFilterTcOffsetDiv2(Int i)
Bool getUsedByCurrPicLtSPSFlag(Int i) const
UInt getMaxTLayers() const
Void setMaxCUHeight(UInt u)
Int * getScalingListAddress(UInt sizeId, UInt listId)
get matrix coefficient
Void setColRefIdx(UInt refIdx)
SliceType getSliceType() const
Void setDependentSliceSegmentFlag(Bool val)
Void setColFromL0Flag(Bool colFromL0)
Void setFixedPicRateFlag(Int layer, Bool flag)
Void setRefPicSetIdxL0(UInt idx, UInt refPicSetIdx)
Int getNumTileColumnsMinus1() const
#define READ_FLAG_CHK(code, name, minValIncl, maxValIncl)
Void printDeltaPOC() const
Void processRefMatrix(UInt sizeId, UInt listId, UInt refListId)
Void parseIntraDirLumaAng(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Void setMatrixCoefficients(Int i)
#define READ_CODE(length, code, name)
Void setTierFlag(Level::Tier x)
Bool getCprmsPresentFlag(UInt i) const
Void setVideoFullRangeFlag(Bool i)
Void setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx)
Void parseInterDir(TComDataCU *pcCU, UInt &ruiInterDir, UInt uiAbsPartIdx)
Void setDuCpbSizeScale(UInt value)
Void setScalingListPredModeFlag(UInt sizeId, UInt listId, Bool bIsDPCM)
Void parseQtCbf(class TComTU &rTu, const ComponentID compID, const Bool lowestLevel)
Void setNumberOfNegativePictures(Int number)
const TComPPSRExt & getPpsRangeExtension() const
Void parseQtRootCbf(UInt uiAbsPartIdx, UInt &uiQtRootCbf)
Bool getSliceChromaQpFlag() const
Void setMinSpatialSegmentationIdc(Int i)
static const Int MRG_MAX_NUM_CANDS
MERGE.
const TComSPSRExt & getSpsRangeExtension() const
Void parseExplicitRdpcmMode(TComTU &rTu, ComponentID compID)
Void setTransquantBypassEnabledFlag(Bool b)
Void setDependentSliceSegmentsEnabledFlag(Bool val)
Void setMaxCUWidth(UInt u)
Void setDeblockingFilterBetaOffsetDiv2(Int i)
Int getWindowLeftOffset() const
Void setScalingListPresentFlag(Bool b)
Void parseCoeffNxN(class TComTU &rTu, ComponentID compID)
Void setSubLayerProfilePresentFlag(Int i, Bool x)
Void parseRemainingBytes(Bool noTrailingBytesExpected)
Void setChromaSampleLocTypeTopField(Int i)
Void setEnableTMVPFlag(Bool b)
static const Int SCALING_LIST_START_VALUE
start value for dpcm mode
Int getNumExtraSliceHeaderBits() const
Void parseVUI(TComVUI *pcVUI, TComSPS *pcSPS)
UInt getBitsForPOC() const
Void setCabacInitPresentFlag(Bool flag)
Void addSubstreamSize(UInt size)
#define READ_SVLC(code, name)
Void setPCMFilterDisableFlag(Bool bValue)
Void setFrameOnlyConstraintFlag(Bool b)
Bool getCabacInitPresentFlag() const
Void setPersistentRiceAdaptationEnabledFlag(const Bool value)
UInt getNumHrdParameters() const
Bool getScalingListPresentFlag() const
Void setDuCpbSizeValueMinus1(Int layer, Int cpbcnt, Int nalOrVcl, UInt value)
Bool getHrdParametersPresentFlag() const
Void setSaoEnabledFlag(ChannelType chType, Bool s)
Void setDeltaPOC(Int bufferNum, Int deltaPOC)
Void setCprmsPresentFlag(Bool val, UInt i)
Void setDiffCuChromaQpOffsetDepth(UInt u)
Void setMaxBytesPerPicDenom(Int i)
static Int getWinUnitY(Int chromaFormatIdc)
Void setLowerBitRateConstraintFlag(Bool b)
Void setMaxBitsPerMinCuDenom(Int i)
Void setMaxCuDQPDepth(UInt u)
Void setQuadtreeTUMaxDepthInter(UInt u)
Void setLtRefPicPocLsbSps(UInt index, UInt val)
Void setQpOffset(ComponentID compID, Int i)
Void setNumHrdParameters(UInt v)
const TComRPSList * getRPSList() const
Void setTransformSkipContextEnabledFlag(const Bool value)
Int getDeblockingFilterBetaOffsetDiv2() const
Void setPicHeightInLumaSamples(UInt u)
UInt getMaxCUHeight() const
Void setCpbRemovalDelayLengthMinus1(UInt value)
Bool getLowDelayHrdFlag(Int layer) const
UInt getMaxDecPicBuffering(UInt tlayer) const
Void setNumReorderPics(Int i, UInt tlayer)
Void xDecodeScalingList(TComScalingList *scalingList, UInt sizeId, UInt listId)
TComRefPicListModification * getRefPicListModification()
Bool getPPSDeblockingFilterDisabledFlag() const
get offset for deblocking filter disabled
Void setSliceCurStartCtuTsAddr(UInt ctuTsAddr)
Void setChromaFormatConstraint(ChromaFormat fmt)
Reference Picture Lists class.
Window & getDefaultDisplayWindow()
Void setMaxLatencyIncreasePlus1(UInt ui, UInt tlayer)
Int getDeblockingFilterTcOffsetDiv2() const
Void parseSPS(TComSPS *pcSPS)
static const Int MAX_NUM_REF
max. number of entries in picture reference list
ChromaFormat getChromaFormatIdc() const
Int getScalingListDC(UInt sizeId, UInt listId) const
get DC value
Void setNumReorderPics(UInt v, UInt tLayer)
Void setChromaSampleLocTypeBottomField(Int i)
Void setRPS(const TComReferencePictureSet *pcRPS)
Void setCrossComponentPredictionEnabledFlag(Bool value)
Int getChromaQpOffsetListLen() const
Int getNumRefIdx(RefPicList e) const
Void setEntropyCodingSyncEnabledFlag(Bool val)
Void setIntraConstraintFlag(Bool b)
ProfileTierLevel * getSubLayerPTL(Int i)
Void setTimeScale(UInt value)
Void setNalHrdParametersPresentFlag(Bool flag)
Bool getSubLayerProfilePresentFlag(Int i) const
Bool getRefPicListModificationFlagL1() const
Void xParsePredWeightTable(TComSlice *pcSlice, const TComSPS *sps)
parse explicit wp tables
Bool getSaoEnabledFlag(ChannelType chType) const
Void setRefPicListModificationFlagL1(Bool flag)
Bool getLongTermRefsPresent() const
Void setBitsForPOC(UInt u)
Void setChromaFormatIdc(ChromaFormat i)
Void setCpbSizeScale(UInt value)
Void setTileUniformSpacingFlag(Bool b)
TComInputBitstream * m_pcBitstream
TComVUI * getVuiParameters()
Void setFieldSeqFlag(Bool i)
Void setUsedByCurrPicLtSPSFlag(Int i, Bool x)
Void setDuCpbRemovalDelayLengthMinus1(UInt value)
Void setLog2MaxMvLengthVertical(Int i)
Bool getTilesEnabledFlag() const
Void setLFCrossSliceBoundaryFlag(Bool val)
static const Int MAX_VPS_OP_SETS_PLUS1
Void setRestrictedRefPicListsFlag(Bool b)
Void setInterRPSPrediction(Bool flag)
Void setAspectRatioIdc(Int i)
Void setWindowBottomOffset(Int val)
Void setSignDataHidingEnabledFlag(Bool b)
Void setRefPicListModificationFlagL0(Bool flag)
UInt getLtRefPicPocLsbSps(UInt index) const
Bool getDependentSliceSegmentFlag() const
Void setPOC(Int bufferNum, Int deltaPOC)
Void parseMvd(TComDataCU *pcCU, UInt uiAbsPartAddr, UInt uiPartIdx, UInt uiDepth, RefPicList eRefList)
Void setLog2DiffMaxMinCodingBlockSize(Int val)
Void setSliceChromaQpFlag(Bool b)
Void setRefIdc(Int bufferNum, Int refIdc)
set the reference idc value at uiBufferNum entry to the value of iRefIdc
Void setPocProportionalToTimingFlag(Bool x)
ProfileTierLevel * getGeneralPTL()
Bool getListsModificationPresentFlag() const
Bool getLoopFilterAcrossSlicesEnabledFlag() const
Void setDeblockingFilterBetaOffsetDiv2(Int val)
set beta offset for deblocking filter
Void parseTransformSubdivFlag(UInt &ruiSubdivFlag, UInt uiLog2TransformBlockSize)
Void parseIntraDirChroma(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Void setNonPackedConstraintFlag(Bool b)
CAVLC decoder class (header)
Void setMaxDecPicBuffering(UInt v, UInt tLayer)
Void setSliceType(SliceType e)
UInt getNumRefIdxL1DefaultActive() const
Void parseSplitFlag(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Void setTileColumnWidth(const std::vector< Int > &columnWidth)
Void setLevelIdc(Level::Name x)
Void setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id)
Void setQuadtreeTULog2MinSize(UInt u)
UInt getMaxOpSets() const
Void setNumberOfPositivePictures(Int number)
Void setTilesFixedStructureFlag(Bool i)
Void parseMergeIndex(TComDataCU *pcCU, UInt &ruiMergeIndex)
Void setDpbOutputDelayDuLengthMinus1(UInt value)
Void clearChromaQpOffsetList()
Void setMaxLatencyIncrease(UInt v, UInt tLayer)
Bool getSubLayerLevelPresentFlag(Int i) const
Void setWindowRightOffset(Int val)
Int getQpBDOffset(ChannelType type) const
TComScalingList & getScalingList()
Void setScalingListDC(UInt sizeId, UInt listId, UInt u)
set DC value
Void parsePPS(TComPPS *pcPPS)
Void setOverscanInfoPresentFlag(Bool i)
Bool getUseTransformSkip() const
Void setLog2ParallelMergeLevelMinus2(UInt mrgLevel)
Void parseMVPIdx(Int &riMVPIdx)
Bool getSubPicCpbParamsPresentFlag() const
Void setBitRateValueMinus1(Int layer, Int cpbcnt, Int nalOrVcl, UInt value)
TComReferencePictureSet * getReferencePictureSet(Int referencePictureSetNum)
Void setVclHrdParametersPresentFlag(Bool flag)
static const Int MAX_MATRIX_COEF_NUM
max coefficient number for quantization matrix
Void setPicDurationInTcMinus1(Int layer, UInt value)
Void setCbrFlag(Int layer, Int cpbcnt, Int nalOrVcl, Bool value)
Bool getRefPicListModificationFlagL0() const
#define READ_SVLC_CHK(code, name, minValIncl, maxValIncl)
Void setProfileSpace(Int x)
Bool getColourDescriptionPresentFlag() const
Void setLog2MaxTransformSkipBlockSize(UInt u)
Void parseProfileTier(ProfileTierLevel *ptl, const Bool bIsSubLayer)
Bool getOverscanInfoPresentFlag() const
Void setColourPrimaries(Int i)
Void parseHrdParameters(TComHRD *hrd, Bool cprms_present_flag, UInt tempLevelHigh)
Void parseShortTermRefPicSet(TComSPS *pcSPS, TComReferencePictureSet *pcRPS, Int idx)
UInt getPicHeightInLumaSamples() const
Void setMaxTLayers(UInt uiMaxTLayers)
Void setWindowTopOffset(Int val)
Void setUseSAO(Bool bVal)
TimingInfo * getTimingInfo()
Void parseRefFrmIdx(TComDataCU *pcCU, Int &riRefFrmIdx, RefPicList eRefList)
Void setProfileCompatibilityFlag(Int i, Bool x)
Int getDeltaPOC(Int bufferNum) const
UInt getPCMLog2MinSize() const
Void setMaxTLayers(UInt t)
Void setScalingListPresentFlag(Bool b)
Int getAspectRatioIdc() const
Void setLog2MaxMvLengthHorizontal(Int i)
Bool getPocProportionalToTimingFlag() const
T Clip3(const T minVal, const T maxVal, const T a)
general min/max clip
UInt getMaxLatencyIncreasePlus1(UInt tlayer) const
Reference Picture Set set class.
UInt * g_scanOrder[SCAN_NUMBER_OF_GROUP_TYPES][SCAN_NUMBER_OF_TYPES][MAX_CU_DEPTH][MAX_CU_DEPTH]
Void setTileRowHeight(const std::vector< Int > &rowHeight)
Void setHrdParametersPresentFlag(Bool i)
Int getBitDepth(ChannelType type) const
Void setDeblockingFilterOverrideFlag(Bool b)
Void setNumTicksPocDiffOneMinus1(Int x)
Bool getTemporalNestingFlag() const
Void setTilesEnabledFlag(Bool val)
UInt getNumLongTermRefPicSPS() const
RefPicList
reference list index
Bool getColFromL0Flag() const
Void setSliceCurEndCtuTsAddr(UInt ctuTsAddr)
Void setUseStrongIntraSmoothing(Bool bVal)
Bool getEnableTMVPFlag() const
const TComPTL * getPTL() const
Void parseIPCMInfo(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Void getWpScaling(RefPicList e, Int iRefIdx, WPScalingParam *&wp)
get tables for weighted prediction
ChromaFormat
chroma formats (according to semantics of chroma_format_idc)
Void setCheckLTMSBPresent(Int bufferNum, Bool b)
Void setScalingListFlag(Bool b)
Bool getTimingInfoPresentFlag() const
UInt getQuadtreeTULog2MinSize() const
Void setPCMBitDepth(ChannelType type, UInt u)
const UInt g_scalingListSize[SCALING_LIST_SIZE_NUM]
Bool getAspectRatioInfoPresentFlag() const
Void setNumberOfPictures(Int numberOfPictures)
Void setMaxNuhReservedZeroLayerId(UInt v)
UInt getNumRefIdxL0DefaultActive() const
Void parseScalingList(TComScalingList *scalingList)
Int getDeblockingFilterBetaOffsetDiv2() const
get beta offset for deblocking filter
UInt getPicWidthInLumaSamples() const
Void setQpBDOffset(ChannelType type, Int i)
Void setMaxTrSize(UInt u)
Void setSliceChromaQpDelta(ComponentID compID, Int i)
Void setMaxNumMergeCand(UInt val)
Bool getIdrPicFlag() const
Void parseTransformSkipFlags(class TComTU &rTu, ComponentID component)
Void setExtendedPrecisionProcessingFlag(Bool value)
Void setCpbCntMinus1(Int layer, UInt value)
Profile::Name getProfileIdc() const
#define PTL_TRACE_TEXT(txt)
Void parseDeltaQP(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Void parsePredMode(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Void parseMergeFlag(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx)
Bool getProfileCompatibilityFlag(Int i) const
#define READ_FLAG(code, name)
Bool getScalingListPresentFlag() const
Void setProfileIdc(Profile::Name x)
Void initWpScaling(const TComSPS *sps)
init WP table
Void setHighPrecisionOffsetsEnabledFlag(Bool value)
Void setFrameFieldInfoPresentFlag(Bool i)
Void setPCMLog2MinSize(UInt u)
#define READ_UVLC(code, name)
Void parseSkipFlag(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Bool getDeblockingFilterControlPresentFlag() const
Void setAspectRatioInfoPresentFlag(Bool i)
Bool getEntropyCodingSyncEnabledFlag() const
Void setSPSTemporalMVPEnabledFlag(Bool b)
TimingInfo * getTimingInfo()
Void setListsModificationPresentFlag(Bool b)
Void setHrdOpSetIdx(UInt val, UInt i)
Void setWindowLeftOffset(Int val)
#define READ_UVLC_CHK(code, name, minValIncl, maxValIncl)
static const Int MAX_TLAYER
Explicit temporal layer QP offset - max number of temporal layer.
Void setMaxDecPicBuffering(UInt ui, UInt tlayer)
Bool getVideoSignalTypePresentFlag() const
Void setProgressiveSourceFlag(Bool b)
Bool getScalingListFlag() const
Void setLongTermRefsPresent(Bool b)
Void setOnePictureOnlyConstraintFlag(Bool b)
Void setDpbOutputDelayLengthMinus1(UInt value)
Void setCabacInitFlag(Bool val)
set CABAC initial flag
Void setNumTileRowsMinus1(Int i)
Int getNumberOfReferencePictureSets() const
Void setInterlacedSourceFlag(Bool b)
Void setNumRefIdxL1DefaultActive(UInt ui)
Void setSubPicCpbParamsInPicTimingSEIFlag(Bool flag)
Void setNumUnitsInTick(UInt value)
Void setQuadtreeTUMaxDepthIntra(UInt u)
Bool getFixedPicRateWithinCvsFlag(Int layer) const
Void setBitstreamRestrictionFlag(Bool i)
TComPPS * getPPS(Int ppsId)
get pointer to existing picture parameter set
Void createHrdParamBuffer()
Void setChromaLocInfoPresentFlag(Bool i)
Void setMotionVectorsOverPicBoundariesFlag(Bool i)
Void setCpbSizeValueMinus1(Int layer, Int cpbcnt, Int nalOrVcl, UInt value)
Void setTransferCharacteristics(Int i)
Int getNumberOfNegativePictures() const
Void setLoopFilterAcrossSlicesEnabledFlag(Bool bValue)
Void setBitRateScale(UInt value)
Bool getDependentSliceSegmentsEnabledFlag() const
Int getQpOffset(ComponentID compID) const
slice decoder class (header)
static Int getWinUnitX(Int chromaFormatIdc)
Void setRefMatrixId(UInt sizeId, UInt listId, UInt u)
set reference matrix ID
Void setCabacBypassAlignmentEnabledFlag(const Bool value)
Void setNumRefIdxL0DefaultActive(UInt ui)
Void createRPSList(Int numRPS)
Void setDeblockingFilterControlPresentFlag(Bool val)
Void setFixedPicRateWithinCvsFlag(Int layer, Bool flag)
Void setDuBitRateValueMinus1(Int layer, Int cpbcnt, Int nalOrVcl, UInt value)
Void setTimingInfoPresentFlag(Bool flag)
Void setLowDelayHrdFlag(Int layer, Bool flag)
Void setVideoFormat(Int i)
UInt getMaxDecPicBuffering(UInt tLayer) const
Bool getSliceHeaderExtensionPresentFlag() const
Bool getChromaLocInfoPresentFlag() const
Void setLog2MinCodingBlockSize(Int val)
Void setOutputFlagPresentFlag(Bool b)
TComScalingList & getScalingList()
Int getNumberOfPictures() const
Void setNumExtraSliceHeaderBits(Int i)
Void setLoopFilterAcrossTilesEnabledFlag(Bool b)
Window & getConformanceWindow()
Void setVuiParametersPresentFlag(Bool b)
Bool getBitstreamRestrictionFlag() const
Void setSliceSegmentCurStartCtuTsAddr(UInt ctuTsAddr)
Void setPicWidthInLumaSamples(UInt u)
UInt getMaxTLayers() const
TComSPS * getSPS(Int spsId)
get pointer to existing sequence parameter set
Void setPPSDeblockingFilterDisabledFlag(Bool val)
set offset for deblocking filter disabled
Int getNumRpsCurrTempList() const
Int getSliceChromaQpDelta(ComponentID compID) const
Bool getRapPicFlag() const
Void xReadRbspTrailingBits()
Void setSubPicCpbParamsPresentFlag(Bool flag)
Bool getTileUniformSpacingFlag() const
Void setNumLongTermRefPicSPS(UInt val)
Void setTickDivisorMinus2(UInt value)
Void parseCUTransquantBypassFlag(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Void setRdpcmEnabledFlag(const RDPCMSignallingMode signallingMode, const Bool value)
Int getWindowRightOffset() const
UInt getCpbCntMinus1(Int layer) const
Void setPCMLog2MaxSize(UInt u)
Int getNumberOfLongtermPictures() const
Void setLog2SaoOffsetScale(ChannelType type, UInt uiBitShift)
UInt getNumReorderPics(UInt tLayer) const
Bool getDeblockingFilterOverrideFlag() const
#define READ_CODE_CHK(length, code, name, minValIncl, maxValIncl)
Void setUseChromaQpAdj(Bool b)
Void setBitDepthConstraint(UInt bitDepth)
Void setOverscanAppropriateFlag(Bool i)
Bool getChromaQpOffsetListEnabledFlag() const
Void setChromaQpOffsetListEntry(Int cuChromaQpOffsetIdxPlus1, Int cbOffset, Int crOffset)
Void setDeblockingFilterDisable(Bool b)
Void setDeblockingFilterOverrideEnabledFlag(Bool val)
Void setDeblockingFilterTcOffsetDiv2(Int val)
set tc offset for deblocking filter
Void setConstrainedIntraPred(Bool b)
Reference Picture Set class.
Bool getDeblockingFilterDisable() const
NalUnitType getNalUnitType() const
Void setNumRefIdx(RefPicList e, Int i)
TComHRD * getHrdParameters(UInt i)
static const Int MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1
Void setPicOutputFlag(Bool b)
Void setBitDepth(ChannelType type, Int u)
Int getDeblockingFilterTcOffsetDiv2() const
get tc offset for deblocking filter
Void setMvdL1ZeroFlag(Bool b)
Void setTemporalNestingFlag(Bool t)
Void setNeutralChromaIndicationFlag(Bool i)
static Void IncrementStatisticEP(const TComCodingStatisticsClassType &stat, const Int numBits, const Int value)
Void setSubLayerLevelPresentFlag(Int i, Bool x)
reading funtionality for SEI messages
Void setIntraSmoothingDisabledFlag(Bool bValue)
Bool getDeblockingFilterOverrideEnabledFlag() const
Void setTemporalIdNestingFlag(Bool bValue)
UInt getRefMatrixId(UInt sizeId, UInt listId) const
get reference matrix ID
Void setMaxOpSets(UInt v)
TComReferencePictureSet * getLocalRPS()
TComHRD * getHrdParameters()
Bool getVuiParametersPresentFlag() const
Void setNumberOfLongtermPictures(Int number)
Void setInitialCpbRemovalDelayLengthMinus1(UInt value)
Void parseSliceHeader(TComSlice *pcSlice, ParameterSetManager *parameterSetManager, const Int prevTid0POC)
Void setUseTransformSkip(Bool b)
Void setPicInitQPMinus26(Int i)
Void parseTerminatingBit(UInt &ruiBit)
Int getNumReorderPics(UInt tlayer) const
UInt getMaxCUWidth() const
Bool getOutputFlagPresentFlag() const
Void setSliceHeaderExtensionPresentFlag(Bool val)
Void parseChromaQpAdjustment(TComDataCU *cu, UInt absPartIdx, UInt depth)
Bool getHighPrecisionOffsetsEnabledFlag() const
static const Int MAX_QP_OFFSET_LIST_SIZE
Maximum size of QP offset list is 6 entries.
Void parsePartSize(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)