45 Void xTraceSEIHeader()
47 fprintf( g_hTrace,
"=========== SEI message ===========\n");
179 #if ERP_SR_OV_SEI_MESSAGE
206 assert(!
"Trying to write unhandled SEI message");
218 if (g_HLSTraceEnable)
224 for (SEIMessages::const_iterator sei=seiList.begin(); sei!=seiList.end(); sei++)
232 Bool traceEnable = g_HLSTraceEnable;
233 g_HLSTraceEnable =
false;
237 g_HLSTraceEnable = traceEnable;
240 assert(0 == payload_data_num_bits % 8);
243 UInt payloadType = (*sei)->payloadType();
244 for (; payloadType >= 0xff; payloadType -= 0xff)
250 UInt payloadSize = payload_data_num_bits/8;
251 for (; payloadSize >= 0xff; payloadSize -= 0xff)
259 if (g_HLSTraceEnable)
260 xTraceSEIMessageType((*sei)->payloadType());
276 if (g_HLSTraceEnable)
288 Bool traceEnable = g_HLSTraceEnable;
289 g_HLSTraceEnable =
false;
293 g_HLSTraceEnable = traceEnable;
296 assert(0 == payload_data_num_bits % 8);
300 for (; payloadType >= 0xff; payloadType -= 0xff)
306 UInt payloadSize = payload_data_num_bits/8;
307 for (; payloadSize >= 0xff; payloadSize -= 0xff)
315 if (g_HLSTraceEnable)
316 xTraceSEIMessageType((*sei)->payloadType());
341 for( nalOrVcl = 0; nalOrVcl < 2; nalOrVcl ++ )
410 WRITE_UVLC( numRegions - 1,
"pan_scan_cnt_minus1" );
411 for(
UInt region=0; region<numRegions; region++)
455 for (std::size_t i = 0; i < sei.
m_userData.size(); i++)
523 for(
Int c=0; c<3; c++)
530 for(
Int c=0; c<3; c++)
535 if (cm.
bPresentFlag && numIntensityIntervals>0 && numModelValues>0)
537 assert(numIntensityIntervals<=256);
538 assert(numModelValues<=256);
539 WRITE_CODE( numIntensityIntervals-1, 8,
"num_intensity_intervals_minus1[c]");
540 WRITE_CODE( numModelValues-1, 8,
"num_model_values_minus1[c]");
541 for(
UInt interval=0; interval<numIntensityIntervals; interval++)
602 for(i = 0; i < num; i++)
642 assert(!
"Undefined SEIToneMapModelId");
768 const TChar *traceString=
"\0";
774 default: assert(
false);
break;
777 if (traceString != 0)
997 WRITE_UVLC(numVerticalFilter,
"num_vertical_filters");
998 if(numVerticalFilter > 0)
1000 for(
Int i = 0; i < numVerticalFilter; i ++)
1003 WRITE_UVLC(verTapLengthMinus1,
"ver_tap_length_minus_1");
1004 for(
Int j = 0; j < (verTapLengthMinus1 + 1); j ++)
1014 WRITE_UVLC(numHorizontalFilter,
"num_horizontal_filters");
1015 if(numHorizontalFilter > 0)
1017 for(
Int i = 0; i < numHorizontalFilter; i ++)
1020 WRITE_UVLC(horTapLengthMinus1,
"hor_tap_length_minus_1");
1021 for(
Int j = 0; j < (horTapLengthMinus1 + 1); j ++)
1089 #if ERP_SR_OV_SEI_MESSAGE
1097 WRITE_CODE( 0, 2,
"erp_reserved_zero_2bits" );
1113 WRITE_CODE( 0, 6,
"sphere_rotation_reserved_zero_6bits" );
1128 WRITE_CODE( numRegions - 1, 4,
"omni_viewport_cnt_minus1" );
1129 for(
UInt region=0; region<numRegions; region++)
1159 WRITE_CODE( 0, 5,
"rwp_reserved_zero_5bits" );
1167 WRITE_CODE( 0, 4,
"rwp_reserved_zero_4bits" );
1183 WRITE_CODE( (
UInt)sei. m_rwpBottomGuardBandHeight[i], 8,
"rwp_bottom_guard_band_height");
1185 for(
Int j=0; j < 4; j++ )
1189 WRITE_CODE( 0, 3,
"rwp_guard_band_reserved_zero_3bits" );
1213 for(
Int c=0 ; c<3 ; c++ )
1229 for(
Int c=0 ; c<3 ; c++ )
1231 for(
Int i=0 ; i<3 ; i++ )
1238 for(
Int c=0 ; c<3 ; c++ )
1302 for(RNSEIWindowVec::const_iterator it = regions.begin(); it != regions.end(); it++)
1304 assert((*it).getWindowEnabledFlag());
1305 WRITE_CODE((*it).getRegionId(), 8,
"regional_nesting_rect_region_id[i]");
1306 WRITE_CODE((*it).getWindowLeftOffset(), 16,
"regional_nesting_rect_left_offset[i]");
1307 WRITE_CODE((*it).getWindowRightOffset(), 16,
"regional_nesting_rect_right_offset[i]");
1308 WRITE_CODE((*it).getWindowTopOffset(), 16,
"regional_nesting_rect_top_offset[i]");
1309 WRITE_CODE((*it).getWindowBottomOffset(), 16,
"regional_nesting_rect_bottom_offset[i]");
1313 const std::vector< std::pair< std::vector<UInt>,
SEI* > > seiMessages = sei.
getRnSEIMessages();
1314 std::vector<std::pair< std::vector<UInt>,
SEI* > >::const_iterator it;
1315 for(it = seiMessages.begin(); it != seiMessages.end(); it++)
1317 std::vector<UInt> listOfRegions = (*it).first;
1318 SEI *nestedSEI = (*it).second;
1319 WRITE_CODE(listOfRegions.size(), 8,
"num_regions_for_sei_message[i]");
1320 for(
Int j = 0; j < listOfRegions.size(); j++)
1322 WRITE_CODE(listOfRegions[j], 8,
"regional_nesting_sei_region_idx[i][j]");
1335 WRITE_FLAG( 0,
"payload_bit_equal_to_zero" );
UChar m_filmGrainMatrixCoeffs
Bool getNalHrdParametersPresentFlag() const
std::vector< UShort > m_packedRegionLeft
UChar m_uuid_iso_iec_11578[ISO_IEC_11578_LEN]
Int m_postLutNumValMinus1[3]
Bool m_currentFrameIsFrame0Flag
Int m_duSptCpbRemovalDelay
std::vector< UChar > m_rwpTopGuardBandHeight
UInt getDuCpbRemovalDelayLengthMinus1() const
UChar m_filmGrainBitDepthChromaMinus8
Bool getVclHrdParametersPresentFlag() const
Bool m_selfContainedCvsFlag
Void xWriteSEIEquirectangularProjection(const SEIEquirectangularProjection &sei)
Bool m_exposureCompensationValueSignFlag
TComSEIMasteringDisplay values
std::vector< UShort > m_packedRegionWidth
UInt m_sopDescVclNaluType[MAX_NUM_PICS_IN_SOP]
Bool m_max_mcs_tier_level_idc_present_flag
UInt m_sopDescStRpsIdx[MAX_NUM_PICS_IN_SOP]
Void xWriteSEIAlternativeTransferCharacteristics(const SEIAlternativeTransferCharacteristics &sei)
Int m_frame1GridPositionX
std::vector< Bool > m_rwpGuardBandFlag
Bool m_constituentPictureMatchingFlag
Void xWriteSEIPostFilterHint(const SEIPostFilterHint &sei, const TComSPS *sps)
Int m_contentInterpretationType
Void xWriteSEITempMotionConstrainedTileSets(const SEITempMotionConstrainedTileSets &sei)
Void xWriteSEIDecodingUnitInfo(const SEIDecodingUnitInfo &sei, const TComSPS *sps)
UInt m_initialCpbRemovalDelay[MAX_CPB_CNT][2]
Void xWriteSEIFilmGrainCharacteristics(const SEIFilmGrainCharacteristics &sei)
Bool m_frame1SelfContainedFlag
UInt getNumRectRegions() const
std::vector< Int > compModelValue
Void xWriteSEICubemapProjection(const SEICubemapProjection &sei)
Int m_ccvPrimariesY[MAX_NUM_COMPONENT]
Int m_exposureCompensationValueNumerator
std::vector< Int > m_targetPivotValue
#define WRITE_CODE(value, length, name)
Void xWriteSEIUserDataRegistered(const SEIUserDataRegistered &sei)
Bool m_arrangementPersistenceFlag
pure virtual class for basic bit handling
Int m_colourRemapMatrixCoefficients
Void xWriteSEIPictureTiming(const SEIPictureTiming &sei, const TComSPS *sps)
UChar m_filmGrainColourPrimaries
Bool m_kneePersistenceFlag
UChar m_filmGrainBitDepthLumaMinus8
Void xWriteSEISphereRotation(const SEISphereRotation &sei)
Bool m_display_tile_set_flag
slice header and SPS class (header)
std::vector< Int > m_kneeOutputKneePoint
Void xWriteSEIGreenMetadataInfo(const SEIGreenMetadataInfo &sei)
Void setBitstream(TComBitIf *p)
Int getNumberOfTileRects() const
std::vector< Int > m_kneeInputKneePoint
Void xWriteSEITemporalLevel0Index(const SEITemporalLevel0Index &sei)
Void xWriteSEIFramePacking(const SEIFramePacking &sei)
Bool m_rapCpbParamsPresentFlag
Int m_frame0GridPositionX
Void writeSEImessages(TComBitIf &bs, const SEIMessages &seiList, const TComSPS *sps, Bool isNested)
Bool m_colourRemapVideoSignalInfoPresentFlag
std::vector< Bool > m_rwpGuardBandNotUsedForPredFlag
Bool m_frame0SelfContainedFlag
Void xWriteSEIRegionalNesting(TComBitIf &bs, const SEIRegionalNesting &sei, const TComSPS *sps)
Bool m_deinterlacedPictureSourceParityFlag
Bool m_ccvAvgLuminanceValuePresentFlag
Bool m_arrangementCancelFlag
Bool m_ccvPersistenceFlag
TileSetData & tileSetData(const Int index)
std::vector< UInt > m_numNalusInDuMinus1
std::vector< UInt > m_projRegionWidth
Void xWriteSEISceneInfo(const SEISceneInfo &sei)
Bool m_panScanRectPersistenceFlag
Void xWriteSEIPictureSnapshot(const SEIPictureSnapshot &sei)
std::vector< UInt > m_projRegionHeight
Void xWriteSEIContentColourVolume(const SEIContentColourVolume &sei)
Bool m_cmpPersistenceFlag
Bool m_sphereRotationPersistenceFlag
Void writeSEImessageHdrPayload(TComBitIf &bs, const SEI *sei, const TComSPS *sps)
ChromaFormat getChromaFormatIdc() const
Bool m_max_mcts_tier_flag
UInt m_ccvAvgLuminanceValue
Int m_nominalBlackLevelLumaCodeValue
std::vector< Int > activeSeqParameterSetId
static const TChar * getSEIMessageString(SEI::PayloadType payloadType)
Void xWriteSEIpayloadData(TComBitIf &bs, const SEI &sei, const TComSPS *sps)
TComVUI * getVuiParameters()
Bool m_mcts_tier_level_idc_present_flag
Void xWriteRbspTrailingBits()
std::vector< UChar > m_rwpRightGuardBandWidth
Bool m_separateColourDescriptionPresentFlag
UChar intensityIntervalLowerBound
#define WRITE_FLAG(value,name)
Bool m_colourRemapCancelFlag
Bool m_colourRemapMatrixPresentFlag
Void xWriteSEIPanScanRect(const SEIPanScanRect &sei)
std::vector< CRIlut > m_postLut[3]
std::vector< OmniViewport > m_omniViewportRegions
Void xWriteSEIOmniViewport(const SEIOmniViewport &sei)
Bool m_limited_tile_set_display_flag
Bool m_colourRemapFullRangeFlag
Int m_contentInterpretationType
Int m_picSptDpbOutputDuDelay
Void xWriteSEIDecodedPictureHash(const SEIDecodedPictureHash &sei)
std::vector< UInt > m_rwpProjRegionTop
Void xWriteSEICodedRegionCompletion(const SEICodedRegionCompletion &sei)
UInt getNumRnSEIMessage() const
UInt m_sopDescTemporalId[MAX_NUM_PICS_IN_SOP]
Void xWriteSEIProgressiveRefinementSegmentEnd(const SEIProgressiveRefinementSegmentEnd &sei)
UInt m_progressiveRefinementId
std::vector< UShort > m_packedRegionTop
std::vector< UChar > m_userData
Int m_frame1GridPositionY
Int m_kneeInputDispLuminance
std::vector< Int > m_startOfCodedInterval
Bool m_bPrevSceneIdValidFlag
std::vector< PanScanRect > m_panScanRectRegions
TComSEITimeSet timeSetArray[MAX_TIMECODE_SEI_SETS]
UInt m_numPicsInSopMinus1
Void xWriteSEIRecoveryPoint(const SEIRecoveryPoint &sei)
Bool m_ccvMaxLuminanceValuePresentFlag
Int m_colourRemapCoeffs[3][3]
static const UInt ISO_IEC_11578_LEN
Bool m_independentSliceSegmentFlag
CompModel m_compModel[MAX_NUM_COMPONENT]
Bool m_verFilteringFieldProcessingFlag
Void xWriteSEIFillerPayload(const SEIFillerPayload &sei)
Bool m_ccvPrimariesPresentFlag
Bool getSubPicCpbParamsPresentFlag() const
TComPictureHash m_pictureHash
std::vector< UChar > m_rwpLeftGuardBandWidth
Bool getSubPicCpbParamsInPicTimingSEIFlag() const
Int m_nominalWhiteLevelLumaCodeValue
Bool numUnitFieldBasedFlag
Void xWriteSEIScalableNesting(TComBitIf &bs, const SEIScalableNesting &sei, const TComSPS *sps)
UInt m_maxContentLightLevel
virtual PayloadType payloadType() const =0
UInt m_numDecodingUnitsMinus1
std::vector< CRIlut > m_preLut[3]
UInt m_bpSeqParameterSetId
Bool m_quincunxSamplingFlag
Void xWriteSEIBufferingPeriod(const SEIBufferingPeriod &sei, const TComSPS *sps)
UInt m_nestingNumOpsMinus1
Int & bottomRightTileIndex(const Int tileRectIndex)
Bool getFrameFieldInfoPresentFlag() const
UInt m_initialAltCpbRemovalDelayOffset[MAX_CPB_CNT][2]
std::vector< std::vector< Int > > m_horFilterCoeff
Bool m_omniViewportPersistenceFlag
std::vector< UShort > m_packedRegionHeight
Bool m_filmGrainCharacteristicsCancelFlag
Void xWriteSEIUserDataUnregistered(const SEIUserDataUnregistered &sei)
Bool m_exact_sample_value_match_flag
Int m_preLutNumValMinus1[3]
UInt m_auCpbRemovalDelayDelta
Bool m_erpPersistenceFlag
UInt getInitialCpbRemovalDelayLengthMinus1() const
UInt m_nextSegmentAddress
std::vector< std::vector< Int > > m_verFilterCoeff
UInt getDpbOutputDelayLengthMinus1() const
class for handling bitstream (header)
UInt m_maxPicAverageLightLevel
Bool m_arrangementCancelFlag
#define WRITE_SCODE(value, length, name)
Void xWriteSEIDependentRAPIndication(const SEIDependentRAPIndication &sei)
UInt m_nestingNoOpMaxTemporalIdPlus1
Int m_colourRemapInputBitDepth
Int m_ccvPrimariesX[MAX_NUM_COMPONENT]
Bool m_filmGrainCharacteristicsPersistenceFlag
Int m_extendedWhiteLevelLumaCodeValue
Bool m_bSceneInfoPresentFlag
UInt m_initialCpbRemovalDelayOffset[MAX_CPB_CNT][2]
UInt m_duCommonCpbRemovalDelayMinus1
Bool m_filmGrainFullRangeFlag
std::vector< UChar > m_rwpTransformType
picture YUV buffer class (header)
Int getNumberOfTileSets() const
UInt anticlockwiseRotation
UInt m_ccvMinLuminanceValue
Bool m_spatialFlippingFlag
Void xWriteSEIRegionRefreshInfo(const SEIRegionRefreshInfo &sei)
Void xWriteSEISOPDescription(const SEISOPDescription &sei)
std::vector< Int > m_filterHintValues
std::vector< UChar > m_userData
UInt getCpbRemovalDelayLengthMinus1() const
UInt m_nestingMaxTemporalIdPlus1[MAX_TLAYER]
Void xWriteSEIAmbientViewingEnvironment(const SEIAmbientViewingEnvironment &sei)
Void xWriteSEIMasteringDisplayColourVolume(const SEIMasteringDisplayColourVolume &sei)
Void xWriteSEIProgressiveRefinementSegmentStart(const SEIProgressiveRefinementSegmentStart &sei)
std::vector< UChar > hash
std::vector< RNSEIWindow > RNSEIWindowVec
UInt getDpbOutputDelayDuLengthMinus1() const
Bool m_omniViewportCancelFlag
Void xWriteSEIContentLightLevelInfo(const SEIContentLightLevelInfo &sei)
Bool getCpbDpbDelaysPresentFlag() const
UInt m_initialAltCpbRemovalDelay[MAX_CPB_CNT][2]
Int m_colourRemapPrimaries
Bool m_duCommonCpbRemovalDelayFlag
Int m_exposureCompensationValueDenomIdc
Bool m_sphereRotationCancelFlag
Int & topLeftTileIndex(const Int tileRectIndex)
UChar m_filmGrainTransferCharacteristics
std::vector< Int > m_codedPivotValue
Void xWriteSEIChromaResamplingFilterHint(const SEIChromaResamplingFilterHint &sei)
Int m_kneeOutputDispLuminance
Void xWriteSEIKneeFunctionInfo(const SEIKneeFunctionInfo &sei)
std::vector< UInt > m_duCpbRemovalDelayMinus1
UInt getNumberOfWrittenBits() const
std::list< SEI * > SEIMessages
Int m_sopDescPocDelta[MAX_NUM_PICS_IN_SOP]
Void xWriteSEIColourRemappingInfo(const SEIColourRemappingInfo &sei)
std::vector< UInt > m_projRegionLeft
const std::vector< RNSEIWindow > & getRegions() const
Int m_extendedRangeWhiteLevel
UInt m_nestingNumLayersMinus1
#define WRITE_SVLC(value,name)
Void xWriteSEIDeinterlaceFieldIdentification(const SEIDeinterlaceFieldIdentification &sei)
Void xWriteSEIRegionWisePacking(const SEIRegionWisePacking &sei)
Bool m_mc_all_tiles_exact_sample_value_match_flag
UInt m_preferredTransferCharacteristics
UInt m_ambientIlluminance
Int m_sphereRotationPitch
Int m_refScreenLuminanceWhite
Bool m_toneMapPersistenceFlag
Bool m_colourRemapPersistenceFlag
UInt getCpbCntMinus1(Int layer) const
Int m_kneeNumKneePointsMinus1
Void xWriteSEIActiveParameterSets(const SEIActiveParameterSets &sei)
#define WRITE_UVLC(value,name)
Int m_frame0GridPositionY
std::vector< UChar > m_rwpGuardBandType
UInt m_picDpbOutputDuDelay
Void xWriteSEIToneMappingInfo(const SEIToneMappingInfo &sei)
Void xWriteSEIDisplayOrientation(const SEIDisplayOrientation &sei)
Void xWriteSEISegmentedRectFramePacking(const SEISegmentedRectFramePacking &sei)
UInt m_ccvMaxLuminanceValue
Void xWriteSEITimeCode(const SEITimeCode &sei)
Void xWriteSEINoDisplay(const SEINoDisplay &sei)
Int m_cameraIsoSpeedValue
std::vector< CompModelIntensityValues > intensityValues
Bool m_dpbOutputDuDelayPresentFlag
Bool m_noParameterSetUpdateFlag
UChar intensityIntervalUpperBound
const std::vector< std::pair< std::vector< UInt >, SEI * > > & getRnSEIMessages() const
Class for counting bits (header)
Bool m_upsampledAspectRatio
UInt m_progressiveRefinementId
UChar m_nestingLayerId[MAX_NESTING_NUM_LAYER]
Int m_colourRemapBitDepth
Bool m_panScanRectCancelFlag
Int m_arrangementReservedByte
Int m_packedPictureHeight
UInt m_nestingOpIdx[MAX_NESTING_NUM_OPS]
Bool m_rwpPersistenceFlag
UChar m_erpLeftGuardBandWidth
Bool m_bitStreamSubsetFlag
UInt m_sopSeqParameterSetId
Int m_colourRemapTransferFunction
Bool m_each_tile_one_tile_set_flag
UChar m_erpRightGuardBandWidth
UInt m_sceneTransitionType
TComHRD * getHrdParameters()
virtual UInt getNumberOfWrittenBits() const =0
Bool m_ccvMinLuminanceValuePresentFlag
Bool m_arrangementPersistenceFlag