Changeset 1349 in 3DVCSoftware
- Timestamp:
- 14 Oct 2015, 04:03:38 (9 years ago)
- Location:
- branches/HTM-15.1-dev0-NICT
- Files:
-
- 29 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-15.1-dev0-NICT/build/HM_vc10.sln
r1313 r1349 1 1 2 2 Microsoft Visual Studio Solution File, Format Version 11.00 3 3 # Visual Studio 2010 … … 24 24 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppExtractor", "vc10\TAppExtractor_vc10.vcxproj", "{F46F95E9-7174-4328-90DD-092450E4DCF6}" 25 25 EndProject 26 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibDecoderAnalyser", "vc10\TLibDecoderAnalyser_vc10.vcxproj", "{68C1251A-55D8-47C9-9052-62F785BD437A}" 27 EndProject 26 28 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppDecoderAnalyser", "vc10\TAppDecoderAnalyser_vc10.vcxproj", "{6BB4C8D8-449D-4CC1-A5E1-E98AAF94012F}" 27 EndProject28 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibDecoderAnalyser", "vc10\TLibDecoderAnalyser_vc10.vcxproj", "{68C1251A-55D8-47C9-9052-62F785BD437A}"29 29 EndProject 30 30 Global … … 124 124 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|x64.ActiveCfg = Release|x64 125 125 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|x64.Build.0 = Release|x64 126 {68C1251A-55D8-47C9-9052-62F785BD437A}.Debug|Win32.ActiveCfg = Debug|Win32 127 {68C1251A-55D8-47C9-9052-62F785BD437A}.Debug|Win32.Build.0 = Debug|Win32 128 {68C1251A-55D8-47C9-9052-62F785BD437A}.Debug|x64.ActiveCfg = Debug|x64 129 {68C1251A-55D8-47C9-9052-62F785BD437A}.Debug|x64.Build.0 = Debug|x64 130 {68C1251A-55D8-47C9-9052-62F785BD437A}.Release|Win32.ActiveCfg = Release|Win32 131 {68C1251A-55D8-47C9-9052-62F785BD437A}.Release|Win32.Build.0 = Release|Win32 132 {68C1251A-55D8-47C9-9052-62F785BD437A}.Release|x64.ActiveCfg = Release|x64 133 {68C1251A-55D8-47C9-9052-62F785BD437A}.Release|x64.Build.0 = Release|x64 126 134 {6BB4C8D8-449D-4CC1-A5E1-E98AAF94012F}.Debug|Win32.ActiveCfg = Debug|Win32 127 135 {6BB4C8D8-449D-4CC1-A5E1-E98AAF94012F}.Debug|Win32.Build.0 = Debug|Win32 … … 132 140 {6BB4C8D8-449D-4CC1-A5E1-E98AAF94012F}.Release|x64.ActiveCfg = Release|x64 133 141 {6BB4C8D8-449D-4CC1-A5E1-E98AAF94012F}.Release|x64.Build.0 = Release|x64 134 {68C1251A-55D8-47C9-9052-62F785BD437A}.Debug|Win32.ActiveCfg = Debug|Win32135 {68C1251A-55D8-47C9-9052-62F785BD437A}.Debug|Win32.Build.0 = Debug|Win32136 {68C1251A-55D8-47C9-9052-62F785BD437A}.Debug|x64.ActiveCfg = Debug|x64137 {68C1251A-55D8-47C9-9052-62F785BD437A}.Debug|x64.Build.0 = Debug|x64138 {68C1251A-55D8-47C9-9052-62F785BD437A}.Release|Win32.ActiveCfg = Release|Win32139 {68C1251A-55D8-47C9-9052-62F785BD437A}.Release|Win32.Build.0 = Release|Win32140 {68C1251A-55D8-47C9-9052-62F785BD437A}.Release|x64.ActiveCfg = Release|x64141 {68C1251A-55D8-47C9-9052-62F785BD437A}.Release|x64.Build.0 = Release|x64142 142 EndGlobalSection 143 143 GlobalSection(SolutionProperties) = preSolution -
branches/HTM-15.1-dev0-NICT/cfg/SEI/alternativeDepthInfoSei_gvd.cfg
r1344 r1349 3 3 4 4 #======== Applicability ========== ( SEI is only send for pictures in intersection ) 5 ApplicableLayerIds : 6 ApplicablePocs : 7 ApplicableTids : 8 ApplicableVclNaluTypes : 5 ApplicableLayerIds : # LayerIds of layers to which the SEI is added. (all when empty) 6 ApplicablePocs : # POCs of pictures to which the SEI is added. (all when empty) 7 ApplicableTids : # Tids of pictures to which the SEI is added. (all when empty) 8 ApplicableVclNaluTypes : # NaluUnitTypes of picture to which the SEI is added. (all when empty) 9 9 10 10 #======== Position in bit stream ============ 11 SeiNaluId : 0 12 PositionInSeiNalu : 0 11 SeiNaluId : 0 # Identifies to which NAL unit the SEI is added 12 PositionInSeiNalu : 0 # Identifies the position within the NAL unit 13 13 14 14 #======== Payload modification ============= 15 ModifyByEncoder : 0 #0: Use payload as specified in cfg file 1: Modify SEI by encoder.15 ModifyByEncoder : 0 # 0: Use payload as specified in cfg file 1: Modify SEI by encoder. 16 16 17 #======== Payload specification ============= 17 #======== Payload specification ============= # FP Value by ATM 13.3 SEI dump 18 # Poznan Street 19 #======== Part 0 ============================ 18 20 AlternativeDepthInfoCancelFlag : 0 19 DepthType : 0 20 NumConstituentViewsGvdMinus1 : 021 DepthType : 0 # 0: NICT-GVD, 1: Nagoya-Warpmap 22 NumConstituentViewsGvdMinus1 : 1 # 1: 3View 21 23 DepthPresentGvdFlag : 0 22 ZGvdFlag : 0 23 IntrinsicParamGvdFlag : 0 24 RotationGvdFlag : 0 25 TranslationGvdFlag : 0 26 SignGvdZNearFlag : 0 27 ExpGvdZNear : 0 28 ManLenGvdZNearMinus1 : 0 29 ManGvdZNear : 0 30 SignGvdZFarFlag : 0 31 ExpGvdZFar : 0 32 ManLenGvdZFarMinus1 : 0 33 ManGvdZFar : 0 34 PrecGvdFocalLength : 0 35 PrecGvdPrincipalPoint : 0 36 PrecGvdRotationParam : 0 37 PrecGvdTranslationParam : 0 38 SignGvdFocalLengthX : 0 39 ExpGvdFocalLengthX : 0 40 ManGvdFocalLengthX : 0 41 SignGvdFocalLengthY : 0 42 ExpGvdFocalLengthY : 0 43 ManGvdFocalLengthY : 0 44 SignGvdPrincipalPointX : 0 45 ExpGvdPrincipalPointX : 0 46 ManGvdPrincipalPointX : 0 47 SignGvdPrincipalPointY : 0 48 ExpGvdPrincipalPointY : 0 49 ManGvdPrincipalPointY : 0 50 SignGvdR_0_0 : 0 51 ExpGvdR_0_0 : 0 52 ManGvdR_0_0 : 0 53 SignGvdTX : 0 54 ExpGvdTX : 0 55 ManGvdTX : 0 24 ZGvdFlag : 1 25 IntrinsicParamGvdFlag : 1 26 RotationGvdFlag : 1 27 TranslationGvdFlag : 1 28 #======== Part 1 ============================ 29 #======== 0 ============================ 30 SignGvdZNearFlag_0 : 1 # -34.506386 31 ExpGvdZNear_0 : 36 32 ManLenGvdZNearMinus1_0 : 24 33 ManGvdZNear_0 : 2628136 34 SignGvdZFarFlag_0 : 1 # -2760.510889 35 ExpGvdZFar_0 : 42 36 ManLenGvdZFarMinus1_0 : 24 37 ManGvdZFar_0 : 11673778 38 #======== 1 ============================ 39 SignGvdZNearFlag_1 : 1 # -34.506386 40 ExpGvdZNear_1 : 36 41 ManLenGvdZNearMinus1_1 : 24 42 ManGvdZNear_1 : 2628136 43 SignGvdZFarFlag_1 : 1 # -2760.510889 44 ExpGvdZFar_1 : 42 45 ManLenGvdZFarMinus1_1 : 24 46 ManGvdZFar_1 : 11673778 47 #======== 2 ============================ 48 SignGvdZNearFlag_2 : 1 # -34.506386 49 ExpGvdZNear_2 : 36 50 ManLenGvdZNearMinus1_2 : 24 51 ManGvdZNear_2 : 2628136 52 SignGvdZFarFlag_2 : 1 # -2760.510889 53 ExpGvdZFar_2 : 42 54 ManLenGvdZFarMinus1_2 : 24 55 ManGvdZFar_2 : 11673778 56 #======== Part 2 ============================ 57 PrecGvdFocalLength : 18 # ATM code embeded value. 58 PrecGvdPrincipalPoint : 18 59 PrecGvdRotationParam : 18 60 PrecGvdTranslationParam : 18 61 #======== Part 3 ============================ 62 #======== 0 ============================ 63 SignGvdFocalLengthX_0 : 0 # 1732.875727 64 ExpGvdFocalLengthX_0 : 41 65 ManGvdFocalLengthX_0 : 185827518 66 SignGvdFocalLengthY_0 : 0 # 1729.908923 67 ExpGvdFocalLengthY_0 : 41 68 ManGvdFocalLengthY_0 : 185049788 69 SignGvdPrincipalPointX_0 : 0 # 943.231169 70 ExpGvdPrincipalPointX_0 : 40 71 ManGvdPrincipalPointX_0 : 113044663 72 SignGvdPrincipalPointY_0 : 0 # 548.845040 73 ExpGvdPrincipalPointY_0 : 40 74 ManGvdPrincipalPointY_0 : 9658706 75 SignGvdR_0_0_0 : 0 # 1.000000 76 ExpGvdR_0_0_0 : 31 77 ManGvdR_0_0_0 : 0 78 SignGvdR_0_0_1 : 0 # 0.000000 79 ExpGvdR_0_0_1 : 0 80 ManGvdR_0_0_1 : 0 81 SignGvdR_0_0_2 : 0 # 0.000000 82 ExpGvdR_0_0_2 : 0 83 ManGvdR_0_0_2 : 0 84 SignGvdR_0_1_0 : 0 # 0.000000 85 ExpGvdR_0_1_0 : 0 86 ManGvdR_0_1_0 : 0 87 SignGvdR_0_1_1 : 0 # 1.000000 88 ExpGvdR_0_1_1 : 31 89 ManGvdR_0_1_1 : 0 90 SignGvdR_0_1_2 : 0 # 0.000000 91 ExpGvdR_0_1_2 : 0 92 ManGvdR_0_1_2 : 0 93 SignGvdR_0_2_0 : 0 # 0.000000 94 ExpGvdR_0_2_0 : 0 95 ManGvdR_0_2_0 : 0 96 SignGvdR_0_2_1 : 0 # 0.000000 97 ExpGvdR_0_2_1 : 0 98 ManGvdR_0_2_1 : 0 99 SignGvdR_0_2_2 : 0 # 1.000000 100 ExpGvdR_0_2_2 : 31 101 ManGvdR_0_2_2 : 0 102 SignGvdTX_0 : 0 # 6.372093 103 ExpGvdTX_0 : 33 104 ManGvdTX_0 : 621829 105 #======== 1 ============================ 106 SignGvdFocalLengthX_1 : 0 # 1732.875727 107 ExpGvdFocalLengthX_1 : 41 108 ManGvdFocalLengthX_1 : 185827518 109 SignGvdFocalLengthY_1 : 0 # 1729.908923 110 ExpGvdFocalLengthY_1 : 41 111 ManGvdFocalLengthY_1 : 185049788 112 SignGvdPrincipalPointX_1 : 0 # 943.231169 113 ExpGvdPrincipalPointX_1 : 40 114 ManGvdPrincipalPointX_1 : 113044663 115 SignGvdPrincipalPointY_1 : 0 # 548.845040 116 ExpGvdPrincipalPointY_1 : 40 117 ManGvdPrincipalPointY_1 : 9658706 118 SignGvdR_1_0_0 : 0 # 1.000000 119 ExpGvdR_1_0_0 : 31 120 ManGvdR_1_0_0 : 0 121 SignGvdR_1_0_1 : 0 # 0.000000 122 ExpGvdR_1_0_1 : 0 123 ManGvdR_1_0_1 : 0 124 SignGvdR_1_0_2 : 0 # 0.000000 125 ExpGvdR_1_0_2 : 0 126 ManGvdR_1_0_2 : 0 127 SignGvdR_1_1_0 : 0 # 0.000000 128 ExpGvdR_1_1_0 : 0 129 ManGvdR_1_1_0 : 0 130 SignGvdR_1_1_1 : 0 # 1.000000 131 ExpGvdR_1_1_1 : 31 132 ManGvdR_1_1_1 : 0 133 SignGvdR_1_1_2 : 0 # 0.000000 134 ExpGvdR_1_1_2 : 0 135 ManGvdR_1_1_2 : 0 136 SignGvdR_1_2_0 : 0 # 0.000000 137 ExpGvdR_1_2_0 : 0 138 ManGvdR_1_2_0 : 0 139 SignGvdR_1_2_1 : 0 # 0.000000 140 ExpGvdR_1_2_1 : 0 141 ManGvdR_1_2_1 : 0 142 SignGvdR_1_2_2 : 0 # 1.000000 143 ExpGvdR_1_2_2 : 31 144 ManGvdR_1_2_2 : 0 145 SignGvdTX_1 : 0 # 7.965116 146 ExpGvdTX_1 : 33 147 ManGvdTX_1 : 1039431 148 #======== 2 ============================ 149 SignGvdFocalLengthX_2 : 0 # 1732.875727 150 ExpGvdFocalLengthX_2 : 41 151 ManGvdFocalLengthX_2 : 185827518 152 SignGvdFocalLengthY_2 : 0 # 1729.908923 153 ExpGvdFocalLengthY_2 : 41 154 ManGvdFocalLengthY_2 : 185049788 155 SignGvdPrincipalPointX_2 : 0 # 943.231169 156 ExpGvdPrincipalPointX_2 : 40 157 ManGvdPrincipalPointX_2 : 113044663 158 SignGvdPrincipalPointY_2 : 0 # 548.845040 159 ExpGvdPrincipalPointY_2 : 40 160 ManGvdPrincipalPointY_2 : 9658706 161 SignGvdR_2_0_0 : 0 # 1.000000 162 ExpGvdR_2_0_0 : 31 163 ManGvdR_2_0_0 : 0 164 SignGvdR_2_0_1 : 0 # 0.000000 165 ExpGvdR_2_0_1 : 0 166 ManGvdR_2_0_1 : 0 167 SignGvdR_2_0_2 : 0 # 0.000000 168 ExpGvdR_2_0_2 : 0 169 ManGvdR_2_0_2 : 0 170 SignGvdR_2_1_0 : 0 # 0.000000 171 ExpGvdR_2_1_0 : 0 172 ManGvdR_2_1_0 : 0 173 SignGvdR_2_1_1 : 0 # 1.000000 174 ExpGvdR_2_1_1 : 31 175 ManGvdR_2_1_1 : 0 176 SignGvdR_2_1_2 : 0 # 0.000000 177 ExpGvdR_2_1_2 : 0 178 ManGvdR_2_1_2 : 0 179 SignGvdR_2_2_0 : 0 # 0.000000 180 ExpGvdR_2_2_0 : 0 181 ManGvdR_2_2_0 : 0 182 SignGvdR_2_2_1 : 0 # 0.000000 183 ExpGvdR_2_2_1 : 0 184 ManGvdR_2_2_1 : 0 185 SignGvdR_2_2_2 : 0 # 1.000000 186 ExpGvdR_2_2_2 : 31 187 ManGvdR_2_2_2 : 0 188 SignGvdTX_2 : 0 # 4.779070 189 ExpGvdTX_2 : 33 190 ManGvdTX_2 : 204228 -
branches/HTM-15.1-dev0-NICT/source/App/TAppDecoder/TAppDecCfg.h
r1321 r1349 82 82 Int m_targetOptLayerSetIdx; ///< target output layer set index 83 83 Int m_targetDecLayerSetIdx; 84 Int m_baseLayerOutputFlag; 85 Int m_baseLayerPicOutputFlag; 86 Int m_auOutputFlag; 84 Int m_baseLayerOutputFlag; 85 Int m_baseLayerPicOutputFlag; 86 Int m_auOutputFlag; 87 87 Int m_maxLayerId; ///< maximum nuh_layer_id decoded 88 std::ifstream m_bitstreamFile; 88 std::ifstream m_bitstreamFile; 89 89 Int m_highestTid; 90 90 Bool m_targetDecLayerIdSetFileEmpty; ///< indication if target layers are given by file 91 91 92 Bool m_printVpsInfo; ///< Output VPS information 92 Bool m_printVpsInfo; ///< Output VPS information 93 93 Bool m_printPicOutput; ///< Print information on picture output 94 94 Bool m_printReceivedNalus; ///< Print information on received NAL units 95 95 #if NH_3D 96 Char* m_pchScaleOffsetFile ; ///< output coded scale and offset parameters96 Char* m_pchScaleOffsetFile = nullptr; ///< output coded scale and offset parameters // NICT FIX 97 97 Bool m_depth420OutputFlag; ///< output depth layers in 4:2:0 98 98 #endif -
branches/HTM-15.1-dev0-NICT/source/Lib/TLibCommon/SEI.cpp
r1347 r1349 189 189 #if NH_MV_SEI_TBD 190 190 ////////////////////////////////////////////////////////////////////////// 191 // TBD: Modify version 1 SEIs to use the same interfaces as Annex GFI SEI messages. 191 // TBD: Modify version 1 SEIs to use the same interfaces as Annex GFI SEI messages. 192 192 ////////////////////////////////////////////////////////////////////////// 193 193 194 case SEI::BUFFERING_PERIOD: return new SEIBufferingPeriod; 194 case SEI::BUFFERING_PERIOD: return new SEIBufferingPeriod; 195 195 case SEI::PICTURE_TIMING: return new SEIPictureTiming; 196 196 case SEI::PAN_SCAN_RECT: return new SEIPanScanRectangle; // not currently decoded 197 197 case SEI::FILLER_PAYLOAD: return new SEIFillerPaylod; // not currently decoded 198 198 case SEI::USER_DATA_REGISTERED_ITU_T_T35: return new SEIUserDataRegistered; // not currently decoded 199 case SEI::USER_DATA_UNREGISTERED: return new SEIuserDataUnregistered; 199 case SEI::USER_DATA_UNREGISTERED: return new SEIuserDataUnregistered; 200 200 case SEI::RECOVERY_POINT: return new SEIRecoveryPoint; 201 201 case SEI::SCENE_INFO: return new SEISceneInformation; // not currently decoded … … 215 215 case SEI::DECODED_PICTURE_HASH: return new SEIDecodedPictureHash; 216 216 case SEI::SCALABLE_NESTING: return new SEIScalableNesting; 217 case SEI::REGION_REFRESH_INFO: return new SEIRegionRefreshInfo; 217 case SEI::REGION_REFRESH_INFO: return new SEIRegionRefreshInfo; 218 218 case SEI::NO_DISPLAY: return new SEINoDisplay; 219 219 case SEI::TIME_CODE: return new SEITimeCode; 220 220 case SEI::MASTERING_DISPLAY_COLOUR_VOLUME: return new SEIMasteringDisplayColourVolume; 221 221 case SEI::SEGM_RECT_FRAME_PACKING: return new SEISegmentedRectFramePacking; 222 case SEI::TEMP_MOTION_CONSTRAINED_TILE_SETS: return new SEITempMotionConstrainedTileSets; 222 case SEI::TEMP_MOTION_CONSTRAINED_TILE_SETS: return new SEITempMotionConstrainedTileSets; 223 223 case SEI::CHROMA_SAMPLING_FILTER_HINT: return new SEIChromaSamplingFilterHint 224 224 #endif … … 241 241 case SEI::THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO: return new SEIThreeDimensionalReferenceDisplaysInfo; 242 242 #if SEI_DRI_F0169 243 case SEI::DEPTH_REPRESENTATION_INFO : return new SEIDepthRepresentationInfo; 244 #endif 243 case SEI::DEPTH_REPRESENTATION_INFO : return new SEIDepthRepresentationInfo; 244 #endif 245 245 case SEI::MULTIVIEW_SCENE_INFO : return new SEIMultiviewSceneInfo; 246 246 case SEI::MULTIVIEW_ACQUISITION_INFO : return new SEIMultiviewAcquisitionInfo; … … 262 262 SEI* SEI::getCopy() const 263 263 { 264 assert( 0 ); 264 assert( 0 ); 265 265 return NULL; 266 266 } … … 273 273 Bool SEI::insertSei( Int curLayerId, Int curPoc, Int curTid, Int curNaluType ) const 274 274 { 275 Bool insertSeiHere = true; 275 Bool insertSeiHere = true; 276 276 if( !m_applicableLayerIds.empty() ) 277 277 { … … 295 295 Bool SEI::checkCfg( const TComSlice* slice ) 296 296 { 297 assert( false ); 297 assert( false ); 298 298 return true; 299 299 } … … 309 309 { 310 310 xPrintCfgErrorIntro(); 311 std::cout << "The value of " << seName << "shall be in the range of " << minVal << " to " << maxVal << ", inclusive." << std::endl; 312 wrongConfig = true; 313 } 314 } 315 316 Void SEI::xAddGeneralOpts(po::Options &opts, IntAry1d defAppLayerIds, IntAry1d deftApplicablePocs, 317 IntAry1d defAppTids, IntAry1d defAppVclNaluTypes, 311 std::cout << "The value of " << seName << "shall be in the range of " << minVal << " to " << maxVal << ", inclusive." << std::endl; 312 wrongConfig = true; 313 } 314 } 315 316 Void SEI::xAddGeneralOpts(po::Options &opts, IntAry1d defAppLayerIds, IntAry1d deftApplicablePocs, 317 IntAry1d defAppTids, IntAry1d defAppVclNaluTypes, 318 318 Int defSeiNaluId, Int defPositionInSeiNalu, Bool defModifyByEncoder) 319 319 { … … 334 334 { 335 335 xPrintCfgErrorIntro(); 336 std::cout << errStr << std::endl; 337 wrongConfig = true; 336 std::cout << errStr << std::endl; 337 wrongConfig = true; 338 338 } 339 339 } … … 342 342 #if NH_MV_LAYERS_NOT_PRESENT_SEI 343 343 Void SEILayersNotPresent::setupFromCfgFile(const Char* cfgFile) 344 { 344 { 345 345 // Set default values 346 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 347 348 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 346 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 347 348 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 349 349 // This SEI message doesn't need to be added by default to any Layer / POC / NAL Unit / T Layer. Not sure if empty is right. 350 350 defAppLayerIds .empty( ); … … 354 354 355 355 Int defSeiNaluId = 0; 356 Int defPositionInSeiNalu = 0; 356 Int defPositionInSeiNalu = 0; 357 357 Bool defModifyByEncoder = false; //0: Use payload as specified in cfg file 1: Modify SEI by encoder 358 358 359 359 // Setup config file options 360 po::Options opts; 361 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 360 po::Options opts; 361 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 362 362 363 363 opts.addOptions() … … 375 375 376 376 Bool SEILayersNotPresent::checkCfg( const TComSlice* slice ) 377 { 377 { 378 378 // Check config values 379 Bool wrongConfig = false; 379 Bool wrongConfig = false; 380 380 // 381 const TComVPS* vps = slice->getVPS(); 382 // // TBD: Add constraints on presence of SEI here. 381 const TComVPS* vps = slice->getVPS(); 382 // // TBD: Add constraints on presence of SEI here. 383 383 xCheckCfg ( wrongConfig, m_lnpSeiActiveVpsId == vps->getVPSId(), "The value of lnp_sei_active_vps_id shall be equal to the value of vps_video_parameter_set_id of the active VPS for the VCL NAL units of the access unit containing the SEI message." ); 384 384 xCheckCfg ( wrongConfig, m_lnpSeiMaxLayers == vps->getMaxLayersMinus1(), "The number of LayerNotPresent flags shall be equal to vpsMaxLayersMinus1." ); … … 396 396 } 397 397 398 return wrongConfig; 398 return wrongConfig; 399 399 }; 400 400 #endif … … 402 402 403 403 Void SEIInterLayerConstrainedTileSets::setupFromCfgFile(const Char* cfgFile) 404 { 404 { 405 405 // Set default values 406 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 407 408 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 409 defAppLayerIds .empty( ); 410 defAppPocs .push_back( 0 ); 411 defAppTids .empty( ); 412 defAppVclNaluTypes.empty( ); 413 414 Int defSeiNaluId = 0; 415 Int defPositionInSeiNalu = 0; 416 Bool defModifyByEncoder = false; 406 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 407 408 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 409 defAppLayerIds .empty( ); 410 defAppPocs .push_back( 0 ); 411 defAppTids .empty( ); 412 defAppVclNaluTypes.empty( ); 413 414 Int defSeiNaluId = 0; 415 Int defPositionInSeiNalu = 0; 416 Bool defModifyByEncoder = false; 417 417 418 418 // Setup config file options 419 po::Options opts; 420 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 421 422 const Int maxNumTileInSet = 100; 419 po::Options opts; 420 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 421 422 const Int maxNumTileInSet = 100; 423 423 424 424 opts.addOptions() … … 444 444 445 445 Bool SEIInterLayerConstrainedTileSets::checkCfg( const TComSlice* slice ) 446 { 446 { 447 447 // Check config values 448 Bool wrongConfig = false; 449 const TComPPS* pps = slice->getPPS(); 450 451 // Currently only the active PPS checked. 448 Bool wrongConfig = false; 449 const TComPPS* pps = slice->getPPS(); 450 451 // Currently only the active PPS checked. 452 452 xCheckCfg ( wrongConfig, pps->getTilesEnabledFlag() , "The inter-layer constrained tile sets SEI message shall not be present for the layer with nuh_layer_id equal to targetLayerId when tiles_enabled_flag is equal to 0 for any PPS that is active for the pictures of the CLVS of the layer with nuh_layer_id equal to targetLayerId." ); 453 453 454 454 if ( m_ilOneTilePerTileSetFlag ) 455 455 { 456 456 xCheckCfg( wrongConfig, ( pps->getNumTileColumnsMinus1() + 1 ) * ( pps->getNumTileRowsMinus1() + 1 ) <= 256, "It is a requirement of bitstream conformance that when il_one_tile_per_tile_set_flag is equal to 1, the value of ( num_tile_columns_minus1 + 1 ) * ( num_tile_rows_minus1 + 1 ) shall be less than or equal to 256." ); 457 457 } 458 Int numSignificantSets = m_ilNumSetsInMessageMinus1 - m_skippedTileSetPresentFlag + 1; 458 Int numSignificantSets = m_ilNumSetsInMessageMinus1 - m_skippedTileSetPresentFlag + 1; 459 459 460 460 for (Int i = 0 ; i < numSignificantSets; i++) 461 461 { 462 462 xCheckCfgRange( wrongConfig, m_ilctsId[i] , 0 , (1 << 30) - 1, "ilcts_id" ); 463 } 464 465 return wrongConfig; 463 } 464 465 return wrongConfig; 466 466 }; 467 467 #if NH_MV_SEI_TBD … … 484 484 485 485 Void SEIBspNesting::setupFromCfgFile(const Char* cfgFile) 486 { 486 { 487 487 // Set default values 488 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 489 490 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 488 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 489 490 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 491 491 defAppLayerIds .push_back( TBD ); 492 492 defAppPocs .push_back( TBD ); … … 494 494 defAppVclNaluTypes.push_back( TBD ); 495 495 496 Int defSeiNaluId = 0; 497 Int defPositionInSeiNalu = 0; 498 Bool defModifyByEncoder = TBD; 496 Int defSeiNaluId = 0; 497 Int defPositionInSeiNalu = 0; 498 Bool defModifyByEncoder = TBD; 499 499 500 500 // Setup config file options 501 po::Options opts; 502 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 501 po::Options opts; 502 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 503 503 504 504 opts.addOptions() … … 518 518 519 519 Bool SEIBspNesting::checkCfg( const TComSlice* slice ) 520 { 520 { 521 521 // Check config values 522 Bool wrongConfig = false; 523 524 // TBD: Add constraints on presence of SEI here. 522 Bool wrongConfig = false; 523 524 // TBD: Add constraints on presence of SEI here. 525 525 xCheckCfg ( wrongConfig, TBD , "TBD" ); 526 526 xCheckCfg ( wrongConfig, TBD , "TBD" ); 527 527 528 // TBD: Modify constraints according to the SEI semantics. 528 // TBD: Modify constraints according to the SEI semantics. 529 529 xCheckCfgRange( wrongConfig, m_seiOlsIdx , MINVAL , MAXVAL, "sei_ols_idx" ); 530 530 xCheckCfgRange( wrongConfig, m_seiPartitioningSchemeIdx , MINVAL , MAXVAL, "sei_partitioning_scheme_idx" ); … … 533 533 xCheckCfgRange( wrongConfig, m_numSeisInBspMinus1 , MINVAL , MAXVAL, "num_seis_in_bsp_minus1" ); 534 534 535 return wrongConfig; 535 return wrongConfig; 536 536 537 537 }; … … 557 557 558 558 Void SEIBspInitialArrivalTime::setupFromCfgFile(const Char* cfgFile) 559 { 559 { 560 560 // Set default values 561 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 562 563 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 561 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 562 563 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 564 564 defAppLayerIds .push_back( TBD ); 565 565 defAppPocs .push_back( TBD ); … … 567 567 defAppVclNaluTypes.push_back( TBD ); 568 568 569 Int defSeiNaluId = 0; 570 Int defPositionInSeiNalu = 0; 571 Bool defModifyByEncoder = TBD; 569 Int defSeiNaluId = 0; 570 Int defPositionInSeiNalu = 0; 571 Bool defModifyByEncoder = TBD; 572 572 573 573 // Setup config file options 574 po::Options opts; 575 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 574 po::Options opts; 575 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 576 576 577 577 opts.addOptions() … … 588 588 589 589 Bool SEIBspInitialArrivalTime::checkCfg( const TComSlice* slice ) 590 { 590 { 591 591 // Check config values 592 Bool wrongConfig = false; 593 594 // TBD: Add constraints on presence of SEI here. 592 Bool wrongConfig = false; 593 594 // TBD: Add constraints on presence of SEI here. 595 595 xCheckCfg ( wrongConfig, TBD , "TBD" ); 596 596 xCheckCfg ( wrongConfig, TBD , "TBD" ); 597 597 598 // TBD: Modify constraints according to the SEI semantics. 598 // TBD: Modify constraints according to the SEI semantics. 599 599 xCheckCfgRange( wrongConfig, m_nalInitialArrivalDelay[i] , MINVAL , MAXVAL, "nal_initial_arrival_delay" ); 600 600 xCheckCfgRange( wrongConfig, m_vclInitialArrivalDelay[i] , MINVAL , MAXVAL, "vcl_initial_arrival_delay" ); 601 601 602 return wrongConfig; 602 return wrongConfig; 603 603 604 604 }; … … 606 606 607 607 Void SEISubBitstreamProperty::setupFromCfgFile(const Char* cfgFile) 608 { 608 { 609 609 // Set default values 610 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 611 612 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 610 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 611 612 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 613 613 defAppLayerIds .push_back( 0 ); 614 614 defAppPocs .push_back( 0 ); … … 616 616 defAppVclNaluTypes = IRAP_NAL_UNIT_TYPES; 617 617 618 Int defSeiNaluId = 0; 619 Int defPositionInSeiNalu = 0; 620 Bool defModifyByEncoder = false; 618 Int defSeiNaluId = 0; 619 Int defPositionInSeiNalu = 0; 620 Bool defModifyByEncoder = false; 621 621 622 622 // Setup config file options 623 po::Options opts; 624 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 623 po::Options opts; 624 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 625 625 626 626 opts.addOptions() … … 642 642 643 643 Bool SEISubBitstreamProperty::checkCfg( const TComSlice* slice ) 644 { 644 { 645 645 // Check config values 646 646 Bool wrongConfig = false; 647 647 648 // For the current encoder, the initial IRAP access unit has always POC zero. 648 // For the current encoder, the initial IRAP access unit has always POC zero. 649 649 xCheckCfg ( wrongConfig, slice->isIRAP() && (slice->getPOC() == 0), "When present, the sub-bitstream property SEI message shall be associated with an initial IRAP access unit and the information provided by the SEI messages applies to the bitstream corresponding to the CVS containing the associated initial IRAP access unit."); 650 650 651 Bool sizeNotCorrect = 651 Bool sizeNotCorrect = 652 652 ( ( m_numAdditionalSubStreamsMinus1 + 1 ) != m_subBitstreamMode .size() ) 653 653 || ( ( m_numAdditionalSubStreamsMinus1 + 1 ) != m_olsIdxToVps .size() ) … … 660 660 661 661 xCheckCfgRange( wrongConfig, m_numAdditionalSubStreamsMinus1 , 0 , (1 << 10) - 1 , "num_additional_sub_streams_minus1"); 662 662 663 663 if ( !sizeNotCorrect ) 664 664 { … … 669 669 } 670 670 } 671 return wrongConfig; 671 return wrongConfig; 672 672 }; 673 673 674 674 Void SEISubBitstreamProperty::resizeArrays( ) 675 675 { 676 m_subBitstreamMode .resize( m_numAdditionalSubStreamsMinus1 + 1); 677 m_olsIdxToVps .resize( m_numAdditionalSubStreamsMinus1 + 1); 678 m_highestSublayerId .resize( m_numAdditionalSubStreamsMinus1 + 1); 679 m_avgSbPropertyBitRate.resize( m_numAdditionalSubStreamsMinus1 + 1); 680 m_maxSbPropertyBitRate.resize( m_numAdditionalSubStreamsMinus1 + 1); 676 m_subBitstreamMode .resize( m_numAdditionalSubStreamsMinus1 + 1); 677 m_olsIdxToVps .resize( m_numAdditionalSubStreamsMinus1 + 1); 678 m_highestSublayerId .resize( m_numAdditionalSubStreamsMinus1 + 1); 679 m_avgSbPropertyBitRate.resize( m_numAdditionalSubStreamsMinus1 + 1); 680 m_maxSbPropertyBitRate.resize( m_numAdditionalSubStreamsMinus1 + 1); 681 681 } 682 682 683 683 Void SEIAlphaChannelInfo::setupFromCfgFile(const Char* cfgFile) 684 { 684 { 685 685 // Set default values 686 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 687 688 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 686 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 687 688 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 689 689 defAppLayerIds .clear(); 690 690 defAppPocs .push_back( 0 ); … … 692 692 defAppVclNaluTypes = IDR_NAL_UNIT_TYPES; 693 693 694 Int defSeiNaluId = 0; 695 Int defPositionInSeiNalu = 0; 694 Int defSeiNaluId = 0; 695 Int defPositionInSeiNalu = 0; 696 696 Bool defModifyByEncoder = false; 697 697 698 698 // Setup config file options 699 po::Options opts; 700 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 699 po::Options opts; 700 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 701 701 702 702 opts.addOptions() … … 720 720 721 721 Bool SEIAlphaChannelInfo::checkCfg( const TComSlice* slice ) 722 { 722 { 723 723 // Check config values 724 Bool wrongConfig = false; 724 Bool wrongConfig = false; 725 725 726 726 int maxInterpretationValue = (1 << (m_alphaChannelBitDepthMinus8+9)) - 1; … … 734 734 xCheckCfgRange( wrongConfig, m_alphaChannelClipTypeFlag , 0 , 1, "alpha_channel_clip_type_flag" ); 735 735 736 return wrongConfig; 737 738 }; 739 740 SEIOverlayInfo::SEIOverlayInfo ( ) 736 return wrongConfig; 737 738 }; 739 740 SEIOverlayInfo::SEIOverlayInfo ( ) 741 741 : m_numOverlaysMax(16) 742 742 , m_numOverlayElementsMax(256) … … 745 745 746 746 Void SEIOverlayInfo::setupFromCfgFile(const Char* cfgFile) 747 { 747 { 748 748 // Set default values 749 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 750 751 // Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 749 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 750 751 // Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 752 752 defAppLayerIds .clear(); 753 753 defAppPocs .push_back( 0 ); … … 755 755 defAppVclNaluTypes = IDR_NAL_UNIT_TYPES; 756 756 757 Int defSeiNaluId = 0; 758 Int defPositionInSeiNalu = 0; 759 Bool defModifyByEncoder = false; 757 Int defSeiNaluId = 0; 758 Int defPositionInSeiNalu = 0; 759 Bool defModifyByEncoder = false; 760 760 761 761 // Setup config file options 762 po::Options opts; 763 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 762 po::Options opts; 763 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 764 764 765 765 opts.addOptions() … … 779 779 ("NumOverlayElementsMinus1" , m_numOverlayElementsMinus1 , IntAry1d (16,0) , "NumOverlayElementsMinus1" ) 780 780 ("OverlayElementLabelMin_%d" , m_overlayElementLabelMin , IntAry1d (256,0) ,16 , "OverlayElementLabelMin" ) 781 ("OverlayElementLabelMax_%d" , m_overlayElementLabelMax , IntAry1d (256,0) ,16 , "OverlayElementLabelMax" ) 781 ("OverlayElementLabelMax_%d" , m_overlayElementLabelMax , IntAry1d (256,0) ,16 , "OverlayElementLabelMax" ) 782 782 ("OverlayLanguage_%d" , m_overlayLanguage , std::string(""), 16 , "OverlayLanguage" ) 783 783 ("OverlayName_%d" , m_overlayName , std::string(""), 16 , "OverlayName" ) 784 784 ("OverlayElementName_%d_%d" , m_overlayElementName , std::string(""), 256 ,16 , "OverlayElementName" ) 785 785 ("OverlayInfoPersistenceFlag" , m_overlayInfoPersistenceFlag , false , "OverlayInfoPersistenceFlag" ) 786 ; 786 ; 787 787 788 788 po::setDefaults(opts); … … 795 795 796 796 Bool SEIOverlayInfo::checkCfg( const TComSlice* slice ) 797 { 797 { 798 798 // Check config values 799 Bool wrongConfig = false; 799 Bool wrongConfig = false; 800 800 801 801 xCheckCfgRange( wrongConfig, m_overlayInfoCancelFlag , 0 , 1, "overlay_info_cancel_flag" ); … … 808 808 xCheckCfgRange( wrongConfig, m_overlayIdx[i] , 0 , 255, "overlay_idx" ); 809 809 xCheckCfgRange( wrongConfig, m_languageOverlayPresentFlag[i] , 0 , 1, "language_overlay_present_flag" ); 810 xCheckCfgRange( wrongConfig, m_overlayLabelPresentFlag[i] , 0 , 1, "overlay_label_present_flag" ); 810 xCheckCfgRange( wrongConfig, m_overlayLabelPresentFlag[i] , 0 , 1, "overlay_label_present_flag" ); 811 811 xCheckCfgRange( wrongConfig, m_overlayAlphaPresentFlag[i] , 0 , 1, "overlay_alpha_present_flag" ); 812 812 xCheckCfgRange( wrongConfig, m_overlayContentLayerId[i] , 0 , 63, "overlay_content_layer_id" ); 813 813 xCheckCfgRange( wrongConfig, m_overlayLabelLayerId[i] , 0 , 63, "overlay_label_layer_id" ); 814 xCheckCfgRange( wrongConfig, m_overlayAlphaLayerId[i] , 0 , 63, "overlay_alpha_layer_id" ); 815 xCheckCfgRange( wrongConfig, m_numOverlayElementsMinus1[i] , 0 , m_numOverlayElementsMax-1, "num_overlay_elements_minus1" ); 814 xCheckCfgRange( wrongConfig, m_overlayAlphaLayerId[i] , 0 , 63, "overlay_alpha_layer_id" ); 815 xCheckCfgRange( wrongConfig, m_numOverlayElementsMinus1[i] , 0 , m_numOverlayElementsMax-1, "num_overlay_elements_minus1" ); 816 816 for (Int j=0 ; j<=m_numOverlayElementsMinus1[i] ; ++j) 817 { 817 { 818 818 Int maxLabelMinMaxValue = ( 1 << ( m_overlayElementLabelValueLengthMinus8 + 8 ) )-1; 819 819 xCheckCfgRange( wrongConfig, m_overlayElementLabelMin[i][j] , 0 , maxLabelMinMaxValue , "overlay_element_label_min" ); 820 xCheckCfgRange( wrongConfig, m_overlayElementLabelMax[i][j] , 0 , maxLabelMinMaxValue , "overlay_element_label_max" ); 821 } 822 } 820 xCheckCfgRange( wrongConfig, m_overlayElementLabelMax[i][j] , 0 , maxLabelMinMaxValue , "overlay_element_label_max" ); 821 } 822 } 823 823 xCheckCfgRange( wrongConfig, m_overlayInfoPersistenceFlag , 0 , 1, "overlay_info_persistence_flag" ); 824 824 825 return wrongConfig; 825 return wrongConfig; 826 826 827 827 }; … … 829 829 830 830 Void SEITemporalMvPredictionConstraints::setupFromCfgFile(const Char* cfgFile) 831 { 831 { 832 832 // Set default values 833 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 834 835 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 836 defAppLayerIds .clear ( ); 833 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 834 835 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 836 defAppLayerIds .clear ( ); 837 837 defAppPocs .push_back( 0 ); 838 838 defAppTids .push_back( 0 ); 839 839 defAppVclNaluTypes.clear ( ); 840 840 841 Int defSeiNaluId = 0; 842 Int defPositionInSeiNalu = 0; 843 Bool defModifyByEncoder = false; 841 Int defSeiNaluId = 0; 842 Int defPositionInSeiNalu = 0; 843 Bool defModifyByEncoder = false; 844 844 845 845 // Setup config file options 846 po::Options opts; 847 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 846 po::Options opts; 847 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 848 848 849 849 opts.addOptions() … … 860 860 861 861 Bool SEITemporalMvPredictionConstraints::checkCfg( const TComSlice* slice ) 862 { 862 { 863 863 // Check config values 864 Bool wrongConfig = false; 864 Bool wrongConfig = false; 865 865 866 866 xCheckCfg ( wrongConfig, slice->getTemporalId() == 0 , "The temporal motion vector prediction constraints SEI message may be present in an access unit with TemporalId equal to 0 and shall not be present in an access unit with TemporalId greater than 0." ); 867 867 868 return wrongConfig; 868 return wrongConfig; 869 869 }; 870 870 871 871 #if NH_MV_SEI_TBD 872 872 Void SEIFrameFieldInfo::setupFromCfgFile(const Char* cfgFile) 873 { 873 { 874 874 // Set default values 875 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 876 877 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 875 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 876 877 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 878 878 defAppLayerIds .push_back( TBD ); 879 879 defAppPocs .push_back( TBD ); … … 886 886 887 887 // Setup config file options 888 po::Options opts; 889 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 888 po::Options opts; 889 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 890 890 891 891 opts.addOptions() … … 904 904 905 905 Bool SEIFrameFieldInfo::checkCfg( const TComSlice* slice ) 906 { 906 { 907 907 // Check config values 908 Bool wrongConfig = false; 909 910 // TBD: Add constraints on presence of SEI here. 908 Bool wrongConfig = false; 909 910 // TBD: Add constraints on presence of SEI here. 911 911 xCheckCfg ( wrongConfig, TBD , "TBD" ); 912 912 xCheckCfg ( wrongConfig, TBD , "TBD" ); 913 913 914 // TBD: Modify constraints according to the SEI semantics. 914 // TBD: Modify constraints according to the SEI semantics. 915 915 xCheckCfgRange( wrongConfig, m_ffinfoPicStruct , MINVAL , MAXVAL, "ffinfo_pic_struct" ); 916 916 xCheckCfgRange( wrongConfig, m_ffinfoSourceScanType , MINVAL , MAXVAL, "ffinfo_source_scan_type" ); 917 917 xCheckCfgRange( wrongConfig, m_ffinfoDuplicateFlag , MINVAL , MAXVAL, "ffinfo_duplicate_flag" ); 918 918 919 return wrongConfig; 919 return wrongConfig; 920 920 921 921 }; … … 923 923 924 924 Void SEIThreeDimensionalReferenceDisplaysInfo::setupFromCfgFile(const Char* cfgFile) 925 { 925 { 926 926 // Set default values 927 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 928 929 // Default values for which layers, POCS, Tids or Nalu types the SEI should be sent. 930 defAppLayerIds .push_back( 0 ); 927 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 928 929 // Default values for which layers, POCS, Tids or Nalu types the SEI should be sent. 930 defAppLayerIds .push_back( 0 ); 931 931 defAppPocs .push_back( 0 ); 932 932 defAppTids .push_back( 0 ); 933 933 defAppVclNaluTypes = IRAP_NAL_UNIT_TYPES; 934 934 935 Int defSeiNaluId = 0; 936 Int defPositionInSeiNalu = 0; 937 Bool defModifyByEncoder = 0; 935 Int defSeiNaluId = 0; 936 Int defPositionInSeiNalu = 0; 937 Bool defModifyByEncoder = 0; 938 938 939 939 // Setup config file options 940 po::Options opts; 941 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 940 po::Options opts; 941 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 942 942 943 943 opts.addOptions() … … 977 977 UInt SEIThreeDimensionalReferenceDisplaysInfo::xGetSyntaxElementLen( Int expo, Int prec, Int val ) const 978 978 { 979 UInt len; 979 UInt len; 980 980 if( expo == 0 ) 981 981 { … … 987 987 } 988 988 989 assert( val >= 0 ); 989 assert( val >= 0 ); 990 990 assert( val <= ( ( 1 << len )- 1) ); 991 return len; 991 return len; 992 992 } 993 993 994 994 Bool SEIThreeDimensionalReferenceDisplaysInfo::checkCfg( const TComSlice* slice ) 995 { 995 { 996 996 // Check config values 997 Bool wrongConfig = false; 998 999 // The 3D reference display SEI should preferably be sent along with the multiview acquisition SEI. For now the multiview acquisition SEI is restricted to POC = 0, so 3D reference displays SEI is restricted to POC = 0 as well. 1000 xCheckCfg ( wrongConfig, slice->isIRAP() && (slice->getPOC() == 0) , "The 3D reference displays SEI message currently is associated with an access unit that contains an IRAP picture." ); 997 Bool wrongConfig = false; 998 999 // The 3D reference display SEI should preferably be sent along with the multiview acquisition SEI. For now the multiview acquisition SEI is restricted to POC = 0, so 3D reference displays SEI is restricted to POC = 0 as well. 1000 xCheckCfg ( wrongConfig, slice->isIRAP() && (slice->getPOC() == 0) , "The 3D reference displays SEI message currently is associated with an access unit that contains an IRAP picture." ); 1001 1001 1002 1002 xCheckCfgRange( wrongConfig, m_precRefDisplayWidth , 0 , 31, "prec_ref_display_width" ); … … 1006 1006 1007 1007 for (Int i = 0; i <= getNumRefDisplaysMinus1(); i++ ) 1008 { 1008 { 1009 1009 xCheckCfgRange( wrongConfig, m_exponentRefDisplayWidth[i] , 0 , 62, "exponent_ref_display_width" ); 1010 1010 xCheckCfgRange( wrongConfig, m_exponentRefViewingDistance[i] , 0 , 62, "exponent_ref_viewing_distance"); … … 1014 1014 xCheckCfgRange( wrongConfig, m_threeDimensionalReferenceDisplaysExtensionFlag, 0 , 1, "three_dimensional_reference_displays_extension_flag"); 1015 1015 1016 return wrongConfig; 1016 return wrongConfig; 1017 1017 1018 1018 }; … … 1026 1026 1027 1027 Void SEIDepthRepresentationInfo::setupFromCfgFile(const Char* cfgFile) 1028 { 1028 { 1029 1029 // Set default values 1030 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1031 1032 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 1030 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1031 1032 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 1033 1033 //defAppLayerIds .push_back( TBD ); 1034 1034 defAppPocs .push_back( 0 ); … … 1036 1036 //defAppVclNaluTypes.push_back( TBD ); 1037 1037 1038 Int defSeiNaluId = 0; 1039 Int defPositionInSeiNalu = 0; 1040 Bool defModifyByEncoder = true; 1038 Int defSeiNaluId = 0; 1039 Int defPositionInSeiNalu = 0; 1040 Bool defModifyByEncoder = true; 1041 1041 1042 1042 // Setup config file options 1043 po::Options opts; 1044 1045 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1043 po::Options opts; 1044 1045 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1046 1046 1047 1047 opts.addOptions() … … 1165 1165 1166 1166 Bool SEIDepthRepresentationInfo::checkCfg( const TComSlice* slice ) 1167 { 1167 { 1168 1168 // Check config values 1169 Bool wrongConfig = false; 1169 Bool wrongConfig = false; 1170 1170 assert(m_currLayerID>=0); 1171 1171 … … 1175 1175 assert(false); 1176 1176 } 1177 // TBD: Add constraints on presence of SEI here. 1177 // TBD: Add constraints on presence of SEI here. 1178 1178 xCheckCfg ( wrongConfig, m_depthRepresentationType[m_currLayerID][0] >=0 , "depth_representation_type must be equal to or greater than 0" ); 1179 1179 if ( m_dMaxFlag[m_currLayerID] || m_dMinFlag[m_currLayerID]) 1180 1180 { 1181 xCheckCfg( wrongConfig , m_disparityRefViewId[m_currLayerID][0]>=0, "disparity_ref_view_id must be equal to or greater than 0 when d_min or d_max are present"); 1182 } 1183 1184 if (m_depthRepresentationType[m_currLayerID][0]==3) 1181 xCheckCfg( wrongConfig , m_disparityRefViewId[m_currLayerID][0]>=0, "disparity_ref_view_id must be equal to or greater than 0 when d_min or d_max are present"); 1182 } 1183 1184 if (m_depthRepresentationType[m_currLayerID][0]==3) 1185 1185 { 1186 1186 xCheckCfg(wrongConfig , m_depthNonlinearRepresentationNumMinus1[m_currLayerID][0]>=0, "depth_nonlinear_representation_num_minus1 must be greater than or equal to 0"); … … 1193 1193 } 1194 1194 1195 return wrongConfig; 1195 return wrongConfig; 1196 1196 } 1197 1197 #endif 1198 1198 1199 1199 Void SEIMultiviewSceneInfo::setupFromCfgFile(const Char* cfgFile) 1200 { 1200 { 1201 1201 // Set default values 1202 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1203 1204 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 1205 defAppLayerIds .clear(); 1206 defAppPocs .clear(); 1202 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1203 1204 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 1205 defAppLayerIds .clear(); 1206 defAppPocs .clear(); 1207 1207 defAppTids .push_back( 0 ); 1208 1208 defAppVclNaluTypes = IRAP_NAL_UNIT_TYPES; 1209 1209 1210 Int defSeiNaluId = 0; 1211 Int defPositionInSeiNalu = 0; 1212 Bool defModifyByEncoder = false; 1210 Int defSeiNaluId = 0; 1211 Int defPositionInSeiNalu = 0; 1212 Bool defModifyByEncoder = false; 1213 1213 1214 1214 // Setup config file options 1215 po::Options opts; 1216 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1215 po::Options opts; 1216 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1217 1217 1218 1218 opts.addOptions() … … 1225 1225 // Parse the cfg file 1226 1226 po::ErrorReporter err; 1227 po::parseConfigFile( opts, cfgFile, err ); 1227 po::parseConfigFile( opts, cfgFile, err ); 1228 1228 }; 1229 1229 1230 1230 1231 1231 Bool SEIMultiviewSceneInfo::checkCfg( const TComSlice* slice ) 1232 { 1232 { 1233 1233 // Check config values 1234 Bool wrongConfig = false; 1235 1234 Bool wrongConfig = false; 1235 1236 1236 xCheckCfg ( wrongConfig, slice->isIRAP(), "When present, the multiview scene information SEI message shall be associated with an IRAP access unit." ); 1237 1237 1238 1238 xCheckCfgRange( wrongConfig, m_minDisparity , -1024 , 1023, "min_disparity" ); 1239 1239 xCheckCfgRange( wrongConfig, m_maxDisparityRange , 0 , 2047, "max_disparity_range" ); 1240 1240 1241 return wrongConfig; 1241 return wrongConfig; 1242 1242 1243 1243 }; 1244 1244 1245 1245 Void SEIMultiviewAcquisitionInfo::setupFromCfgFile(const Char* cfgFile) 1246 { 1246 { 1247 1247 // Set default values 1248 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1249 1250 defAppLayerIds .clear(); 1248 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1249 1250 defAppLayerIds .clear(); 1251 1251 defAppPocs .push_back( 0 ); 1252 1252 defAppTids .push_back( 0 ); 1253 1253 defAppVclNaluTypes = IDR_NAL_UNIT_TYPES; 1254 1255 1256 Int defSeiNaluId = 0; 1257 Int defPositionInSeiNalu = 0; 1258 Bool defModifyByEncoder = false; 1254 1255 1256 Int defSeiNaluId = 0; 1257 Int defPositionInSeiNalu = 0; 1258 Bool defModifyByEncoder = false; 1259 1259 1260 1260 // Setup config file options 1261 po::Options opts; 1262 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1261 po::Options opts; 1262 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1263 1263 1264 1264 opts.addOptions() … … 1298 1298 // Parse the cfg file 1299 1299 po::ErrorReporter err; 1300 po::parseConfigFile( opts, cfgFile, err ); 1300 po::parseConfigFile( opts, cfgFile, err ); 1301 1301 }; 1302 1302 … … 1307 1307 1308 1308 Bool SEIMultiviewAcquisitionInfo::checkCfg( const TComSlice* slice ) 1309 { 1309 { 1310 1310 // Check config values 1311 Bool wrongConfig = false; 1312 1313 // Currently the encoder starts with POC 0 for all layers. The condition on POC 0 should be changed, when this changes. 1314 xCheckCfg ( wrongConfig, slice->isIRAP() && (slice->getPOC() == 0) , "When present, the multiview acquisition information SEI message that applies to the current layer shall be included in an access unit that contains an IRAP picture that is the first picture of a CLVS of the current layer." ); 1311 Bool wrongConfig = false; 1312 1313 // Currently the encoder starts with POC 0 for all layers. The condition on POC 0 should be changed, when this changes. 1314 xCheckCfg ( wrongConfig, slice->isIRAP() && (slice->getPOC() == 0) , "When present, the multiview acquisition information SEI message that applies to the current layer shall be included in an access unit that contains an IRAP picture that is the first picture of a CLVS of the current layer." ); 1315 1315 1316 1316 xCheckCfgRange( wrongConfig, m_precFocalLength , 0, 31, "prec_focal_length" ); … … 1319 1319 1320 1320 for (Int i = 0; i <= getNumViewsMinus1(); i++ ) 1321 { 1321 { 1322 1322 xCheckCfgRange( wrongConfig, m_exponentFocalLengthX [ i ], 0, 62, "exponent_focal_length_x" ); 1323 1323 xCheckCfgRange( wrongConfig, m_exponentFocalLengthY [ i ], 0, 62, "exponent_focal_length_y" ); … … 1331 1331 1332 1332 for (Int i = 0; i <= getNumViewsMinus1(); i++ ) 1333 { 1333 { 1334 1334 for (Int j = 0; j <= 2; j++) 1335 1335 { 1336 1336 xCheckCfgRange( wrongConfig, m_exponentT[i][j] , 0, 62, "exponent_skew_factor" ); 1337 1337 for (Int k = 0; k <= 2; k++ ) 1338 { 1339 xCheckCfgRange( wrongConfig, m_exponentR[i][j][k], 0, 62, "exponent_principal_point_y"); 1338 { 1339 xCheckCfgRange( wrongConfig, m_exponentR[i][j][k], 0, 62, "exponent_principal_point_y"); 1340 1340 } 1341 1341 } 1342 } 1343 1344 return wrongConfig; 1342 } 1343 1344 return wrongConfig; 1345 1345 1346 1346 }; … … 1378 1378 UInt SEIMultiviewAcquisitionInfo::xGetSyntaxElementLen( Int expo, Int prec, Int val ) const 1379 1379 { 1380 UInt len; 1380 UInt len; 1381 1381 if( expo == 0 ) 1382 1382 { … … 1388 1388 } 1389 1389 1390 assert( val >= 0 ); 1390 assert( val >= 0 ); 1391 1391 assert( val <= ( ( 1 << len )- 1) ); 1392 return len; 1392 return len; 1393 1393 } 1394 1394 1395 1395 Void SEIMultiviewViewPosition::setupFromSlice ( const TComSlice* slice ) 1396 1396 { 1397 const TComVPS* vps = slice->getVPS(); 1398 m_numViewsMinus1 = vps->getNumViews() - 1; 1399 m_viewPosition.resize( m_numViewsMinus1 + 1 ); 1397 const TComVPS* vps = slice->getVPS(); 1398 m_numViewsMinus1 = vps->getNumViews() - 1; 1399 m_viewPosition.resize( m_numViewsMinus1 + 1 ); 1400 1400 for (Int i = 0; i <= m_numViewsMinus1; i++ ) 1401 1401 { 1402 // Assuming that view ids indicate the position 1402 // Assuming that view ids indicate the position 1403 1403 m_viewPosition[i] = vps->getViewIdVal( i ); 1404 1404 } … … 1406 1406 1407 1407 Void SEIMultiviewViewPosition::setupFromCfgFile(const Char* cfgFile) 1408 { 1408 { 1409 1409 // Set default values 1410 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1410 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1411 1411 1412 1412 defAppLayerIds .push_back( 0 ); 1413 1413 defAppPocs .push_back( 0 ); 1414 1414 defAppTids .push_back( 0 ); 1415 defAppVclNaluTypes = IDR_NAL_UNIT_TYPES; 1416 1417 Int defSeiNaluId = 0; 1418 Int defPositionInSeiNalu = 0; 1419 Bool defModifyByEncoder = true; 1415 defAppVclNaluTypes = IDR_NAL_UNIT_TYPES; 1416 1417 Int defSeiNaluId = 0; 1418 Int defPositionInSeiNalu = 0; 1419 Bool defModifyByEncoder = true; 1420 1420 1421 1421 // Setup config file options 1422 po::Options opts; 1423 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1422 po::Options opts; 1423 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1424 1424 1425 1425 opts.addOptions() 1426 1426 ("NumViewsMinus1" , m_numViewsMinus1 , 0 , "NumViewsMinus1") 1427 ("ViewPosition" , m_viewPosition , IntAry1d (1,0) , "ViewPosition" ); 1427 ("ViewPosition" , m_viewPosition , IntAry1d (1,0) , "ViewPosition" ); 1428 1428 ; 1429 1429 … … 1436 1436 1437 1437 Bool SEIMultiviewViewPosition::checkCfg( const TComSlice* slice ) 1438 { 1438 { 1439 1439 // Check config values 1440 Bool wrongConfig = false; 1441 1442 // TBD: Add constraints on presence of SEI here. 1440 Bool wrongConfig = false; 1441 1442 // TBD: Add constraints on presence of SEI here. 1443 1443 xCheckCfg ( wrongConfig, slice->isIRAP() , "When present, the multiview view position SEI message shall be associated with an IRAP access unit." ); 1444 1444 1445 // TBD: Modify constraints according to the SEI semantics. 1445 // TBD: Modify constraints according to the SEI semantics. 1446 1446 xCheckCfgRange( wrongConfig, m_numViewsMinus1 , 0 , 62, "num_views_minus1"); 1447 1447 for(Int i = 0; i <= m_numViewsMinus1; i++) … … 1450 1450 } 1451 1451 1452 return wrongConfig; 1452 return wrongConfig; 1453 1453 1454 1454 }; … … 1457 1457 #if NH_3D 1458 1458 Void SEIAlternativeDepthInfo::setupFromCfgFile(const Char* cfgFile) 1459 { 1459 { 1460 1460 // Set default values 1461 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1461 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1462 1462 1463 1463 defAppLayerIds .clear(); … … 1465 1465 defAppTids .clear(); 1466 1466 defAppVclNaluTypes.clear(); 1467 1468 Int defSeiNaluId = 0; 1469 Int defPositionInSeiNalu = 0; 1470 Bool defModifyByEncoder = 0;1467 1468 Int defSeiNaluId = 0; 1469 Int defPositionInSeiNalu = 0; 1470 Bool defModifyByEncoder = false; 1471 1471 1472 1472 // Setup config file options 1473 po::Options opts; 1474 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1475 1473 po::Options opts; 1474 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1475 1476 // 3 = m_numConstituentViewsGvdMinus1 + 2 1476 1477 opts.addOptions() 1477 ("AlternativeDepthInfoCancelFlag" , m_alternativeDepthInfoCancelFlag , false , "AlternativeDepthInfoCancelFlag" ) 1478 ("DepthType" , m_depthType , 1 , "DepthType" ) 1479 #if NH_MV_SEI_TBD 1480 ("NumConstituentViewsGvdMinus1" , m_numConstituentViewsGvdMinus1 , 0 , "NumConstituentViewsGvdMinus1" ) 1481 ("DepthPresentGvdFlag" , m_depthPresentGvdFlag , false , "DepthPresentGvdFlag" ) 1482 ("ZGvdFlag" , m_zGvdFlag , false , "ZGvdFlag" ) 1483 ("IntrinsicParamGvdFlag" , m_intrinsicParamGvdFlag , false , "IntrinsicParamGvdFlag" ) 1484 ("RotationGvdFlag" , m_rotationGvdFlag , false , "RotationGvdFlag" ) 1485 ("TranslationGvdFlag" , m_translationGvdFlag , false , "TranslationGvdFlag" ) 1486 ("SignGvdZNearFlag" , m_signGvdZNearFlag , BoolAry1d(1,0) , "SignGvdZNearFlag" ) 1487 ("ExpGvdZNear" , m_expGvdZNear , IntAry1d (1,0) , "ExpGvdZNear" ) 1488 ("ManLenGvdZNearMinus1" , m_manLenGvdZNearMinus1 , IntAry1d (1,0) , "ManLenGvdZNearMinus1" ) 1489 ("ManGvdZNear" , m_manGvdZNear , IntAry1d (1,0) , "ManGvdZNear" ) 1490 ("SignGvdZFarFlag" , m_signGvdZFarFlag , BoolAry1d(1,0) , "SignGvdZFarFlag" ) 1491 ("ExpGvdZFar" , m_expGvdZFar , IntAry1d (1,0) , "ExpGvdZFar" ) 1492 ("ManLenGvdZFarMinus1" , m_manLenGvdZFarMinus1 , IntAry1d (1,0) , "ManLenGvdZFarMinus1" ) 1493 ("ManGvdZFar" , m_manGvdZFar , IntAry1d (1,0) , "ManGvdZFar" ) 1494 ("PrecGvdFocalLength" , m_precGvdFocalLength , 0 , "PrecGvdFocalLength" ) 1495 ("PrecGvdPrincipalPoint" , m_precGvdPrincipalPoint , 0 , "PrecGvdPrincipalPoint" ) 1496 ("PrecGvdRotationParam" , m_precGvdRotationParam , 0 , "PrecGvdRotationParam" ) 1497 ("PrecGvdTranslationParam" , m_precGvdTranslationParam , 0 , "PrecGvdTranslationParam" ) 1498 ("SignGvdFocalLengthX" , m_signGvdFocalLengthX , BoolAry1d(1,0) , "SignGvdFocalLengthX" ) 1499 ("ExpGvdFocalLengthX" , m_expGvdFocalLengthX , IntAry1d (1,0) , "ExpGvdFocalLengthX" ) 1500 ("ManGvdFocalLengthX" , m_manGvdFocalLengthX , IntAry1d (1,0) , "ManGvdFocalLengthX" ) 1501 ("SignGvdFocalLengthY" , m_signGvdFocalLengthY , BoolAry1d(1,0) , "SignGvdFocalLengthY" ) 1502 ("ExpGvdFocalLengthY" , m_expGvdFocalLengthY , IntAry1d (1,0) , "ExpGvdFocalLengthY" ) 1503 ("ManGvdFocalLengthY" , m_manGvdFocalLengthY , IntAry1d (1,0) , "ManGvdFocalLengthY" ) 1504 ("SignGvdPrincipalPointX" , m_signGvdPrincipalPointX , BoolAry1d(1,0) , "SignGvdPrincipalPointX" ) 1505 ("ExpGvdPrincipalPointX" , m_expGvdPrincipalPointX , IntAry1d (1,0) , "ExpGvdPrincipalPointX" ) 1506 ("ManGvdPrincipalPointX" , m_manGvdPrincipalPointX , IntAry1d (1,0) , "ManGvdPrincipalPointX" ) 1507 ("SignGvdPrincipalPointY" , m_signGvdPrincipalPointY , BoolAry1d(1,0) , "SignGvdPrincipalPointY" ) 1508 ("ExpGvdPrincipalPointY" , m_expGvdPrincipalPointY , IntAry1d (1,0) , "ExpGvdPrincipalPointY" ) 1509 ("ManGvdPrincipalPointY" , m_manGvdPrincipalPointY , IntAry1d (1,0) , "ManGvdPrincipalPointY" ) 1510 ("SignGvdR" , m_signGvdR , BoolAry1d(1,0) ,ADDNUM ,ADDNUM , "SignGvdR" ) 1511 ("ExpGvdR" , m_expGvdR , IntAry1d (1,0) ,ADDNUM ,ADDNUM , "ExpGvdR" ) 1512 ("ManGvdR" , m_manGvdR , IntAry1d (1,0) ,ADDNUM ,ADDNUM , "ManGvdR" ) 1513 ("SignGvdTX" , m_signGvdTX , BoolAry1d(1,0) , "SignGvdTX" ) 1514 ("ExpGvdTX" , m_expGvdTX , IntAry1d (1,0) , "ExpGvdTX" ) 1515 ("ManGvdTX" , m_manGvdTX , IntAry1d (1,0) , "ManGvdTX" ) 1516 #endif 1517 ("MinOffsetXInt" , m_minOffsetXInt , 0 , "MinOffsetXInt" ) 1518 ("MinOffsetXFrac" , m_minOffsetXFrac , 0 , "MinOffsetXFrac" ) 1519 ("MaxOffsetXInt" , m_maxOffsetXInt , 0 , "MaxOffsetXInt" ) 1520 ("MaxOffsetXFrac" , m_maxOffsetXFrac , 0 , "MaxOffsetXFrac" ) 1521 ("OffsetYPresentFlag" , m_offsetYPresentFlag , false , "OffsetYPresentFlag" ) 1522 ("MinOffsetYInt" , m_minOffsetYInt , 0 , "MinOffsetYInt" ) 1523 ("MinOffsetYFrac" , m_minOffsetYFrac , 0 , "MinOffsetYFrac" ) 1524 ("MaxOffsetYInt" , m_maxOffsetYInt , 0 , "MaxOffsetYInt" ) 1525 ("MaxOffsetYFrac" , m_maxOffsetYFrac , 0 , "MaxOffsetYFrac" ) 1526 ("WarpMapSizePresentFlag" , m_warpMapSizePresentFlag , false , "WarpMapSizePresentFlag" ) 1527 ("WarpMapWidthMinus2" , m_warpMapWidthMinus2 , 0 , "WarpMapWidthMinus2" ) 1528 ("WarpMapHeightMinus2" , m_warpMapHeightMinus2 , 0 , "WarpMapHeightMinus2" ) 1478 ("AlternativeDepthInfoCancelFlag" , m_alternativeDepthInfoCancelFlag , false , "AlternativeDepthInfoCancelFlag" ) 1479 ("DepthType" , m_depthType , 1 , "DepthType" ) 1480 ("NumConstituentViewsGvdMinus1" , m_numConstituentViewsGvdMinus1 , 1 , "NumConstituentViewsGvdMinus1" ) 1481 ("DepthPresentGvdFlag" , m_depthPresentGvdFlag , false , "DepthPresentGvdFlag" ) 1482 ("ZGvdFlag" , m_zGvdFlag , false , "ZGvdFlag" ) 1483 ("IntrinsicParamGvdFlag" , m_intrinsicParamGvdFlag , false , "IntrinsicParamGvdFlag" ) 1484 ("RotationGvdFlag" , m_rotationGvdFlag , false , "RotationGvdFlag" ) 1485 ("TranslationGvdFlag" , m_translationGvdFlag , false , "TranslationGvdFlag" ) 1486 ("SignGvdZNearFlag_%d" , m_signGvdZNearFlag , BoolAry1d(3,0), 3 , "SignGvdZNearFlag" ) 1487 ("ExpGvdZNear_%d" , m_expGvdZNear , IntAry1d (3,0), 3 , "ExpGvdZNear" ) 1488 ("ManLenGvdZNearMinus1_%d" , m_manLenGvdZNearMinus1 , IntAry1d (3,0), 3 , "ManLenGvdZNearMinus1" ) 1489 ("ManGvdZNear_%d" , m_manGvdZNear , IntAry1d (3,0), 3 , "ManGvdZNear" ) 1490 ("SignGvdZFarFlag_%d" , m_signGvdZFarFlag , BoolAry1d(3,0), 3 , "SignGvdZFarFlag" ) 1491 ("ExpGvdZFar_%d" , m_expGvdZFar , IntAry1d (3,0), 3 , "ExpGvdZFar" ) 1492 ("ManLenGvdZFarMinus1_%d" , m_manLenGvdZFarMinus1 , IntAry1d (3,0), 3 , "ManLenGvdZFarMinus1" ) 1493 ("ManGvdZFar_%d" , m_manGvdZFar , IntAry1d (3,0), 3 , "ManGvdZFar" ) 1494 ("PrecGvdFocalLength" , m_precGvdFocalLength , 18 , "PrecGvdFocalLength" ) 1495 ("PrecGvdPrincipalPoint" , m_precGvdPrincipalPoint , 18 , "PrecGvdPrincipalPoint" ) 1496 ("PrecGvdRotationParam" , m_precGvdRotationParam , 18 , "PrecGvdRotationParam" ) 1497 ("PrecGvdTranslationParam" , m_precGvdTranslationParam , 18 , "PrecGvdTranslationParam" ) 1498 ("SignGvdFocalLengthX_%d" , m_signGvdFocalLengthX , BoolAry1d(3,0), 3 ,"SignGvdFocalLengthX" ) 1499 ("ExpGvdFocalLengthX_%d" , m_expGvdFocalLengthX , IntAry1d (3,0), 3 ,"ExpGvdFocalLengthX" ) 1500 ("ManGvdFocalLengthX_%d" , m_manGvdFocalLengthX , IntAry1d (3,0), 3 ,"ManGvdFocalLengthX" ) 1501 ("SignGvdFocalLengthY_%d" , m_signGvdFocalLengthY , BoolAry1d(3,0), 3 ,"SignGvdFocalLengthY" ) 1502 ("ExpGvdFocalLengthY_%d" , m_expGvdFocalLengthY , IntAry1d (3,0), 3 ,"ExpGvdFocalLengthY" ) 1503 ("ManGvdFocalLengthY_%d" , m_manGvdFocalLengthY , IntAry1d (3,0), 3 ,"ManGvdFocalLengthY" ) 1504 ("SignGvdPrincipalPointX_%d" , m_signGvdPrincipalPointX , BoolAry1d(3,0), 3 ,"SignGvdPrincipalPointX" ) 1505 ("ExpGvdPrincipalPointX_%d" , m_expGvdPrincipalPointX , IntAry1d (3,0), 3 ,"ExpGvdPrincipalPointX" ) 1506 ("ManGvdPrincipalPointX_%d" , m_manGvdPrincipalPointX , IntAry1d (3,0), 3 ,"ManGvdPrincipalPointX" ) 1507 ("SignGvdPrincipalPointY_%d" , m_signGvdPrincipalPointY , BoolAry1d(3,0), 3 ,"SignGvdPrincipalPointY" ) 1508 ("ExpGvdPrincipalPointY_%d" , m_expGvdPrincipalPointY , IntAry1d (3,0), 3 ,"ExpGvdPrincipalPointY" ) 1509 ("ManGvdPrincipalPointY_%d" , m_manGvdPrincipalPointY , IntAry1d (3,0), 3 ,"ManGvdPrincipalPointY" ) 1510 ("SignGvdR_%d_%d" , m_signGvdR , BoolAry1d(3,0), 3, 3,"SignGvdR" ) 1511 ("ExpGvdR_%d_%d" , m_expGvdR , IntAry1d (3,0), 3, 3,"ExpGvdR" ) 1512 ("ManGvdR_%d_%d" , m_manGvdR , IntAry1d (3,0), 3, 3,"ManGvdR" ) 1513 ("SignGvdTX_%d" , m_signGvdTX , BoolAry1d(3,0), 3 ,"SignGvdTX" ) 1514 ("ExpGvdTX_%d" , m_expGvdTX , IntAry1d (3,0), 3 ,"ExpGvdTX" ) 1515 ("ManGvdTX_%d" , m_manGvdTX , IntAry1d (3,0), 3 ,"ManGvdTX" ) 1516 ("MinOffsetXInt" , m_minOffsetXInt , 0 , "MinOffsetXInt" ) 1517 ("MinOffsetXFrac" , m_minOffsetXFrac , 0 , "MinOffsetXFrac" ) 1518 ("MaxOffsetXInt" , m_maxOffsetXInt , 0 , "MaxOffsetXInt" ) 1519 ("MaxOffsetXFrac" , m_maxOffsetXFrac , 0 , "MaxOffsetXFrac" ) 1520 ("OffsetYPresentFlag" , m_offsetYPresentFlag , false , "OffsetYPresentFlag" ) 1521 ("MinOffsetYInt" , m_minOffsetYInt , 0 , "MinOffsetYInt" ) 1522 ("MinOffsetYFrac" , m_minOffsetYFrac , 0 , "MinOffsetYFrac" ) 1523 ("MaxOffsetYInt" , m_maxOffsetYInt , 0 , "MaxOffsetYInt" ) 1524 ("MaxOffsetYFrac" , m_maxOffsetYFrac , 0 , "MaxOffsetYFrac" ) 1525 ("WarpMapSizePresentFlag" , m_warpMapSizePresentFlag , false , "WarpMapSizePresentFlag" ) 1526 ("WarpMapWidthMinus2" , m_warpMapWidthMinus2 , 0 , "WarpMapWidthMinus2" ) 1527 ("WarpMapHeightMinus2" , m_warpMapHeightMinus2 , 0 , "WarpMapHeightMinus2" ) 1529 1528 ; 1530 1529 … … 1536 1535 }; 1537 1536 Bool SEIAlternativeDepthInfo::checkCfg( const TComSlice* slice ) 1538 { 1537 { 1539 1538 // Check config values 1540 Bool wrongConfig = false; 1541 1542 1539 Bool wrongConfig = false; 1540 1541 1543 1542 xCheckCfgRange( wrongConfig, m_alternativeDepthInfoCancelFlag , 0 , 1, "alternative_depth_info_cancel_flag"); 1544 1543 xCheckCfgRange( wrongConfig, m_depthType , 0 , 1, "depth_type" ); 1545 1544 1546 // TBD: Modify constraints according to the SEI semantics. 1547 #if NH_MV_SEI_TBD 1548 xCheckCfgRange( wrongConfig, m_numConstituentViewsGvdMinus1 , MINVAL , MAXVAL, "num_constituent_views_gvd_minus1 "); 1549 xCheckCfgRange( wrongConfig, m_depthPresentGvdFlag , MINVAL , MAXVAL, "depth_present_gvd_flag" ); 1550 xCheckCfgRange( wrongConfig, m_zGvdFlag , MINVAL , MAXVAL, "z_gvd_flag" ); 1551 xCheckCfgRange( wrongConfig, m_intrinsicParamGvdFlag , MINVAL , MAXVAL, "intrinsic_param_gvd_flag" ); 1552 xCheckCfgRange( wrongConfig, m_rotationGvdFlag , MINVAL , MAXVAL, "rotation_gvd_flag" ); 1553 xCheckCfgRange( wrongConfig, m_translationGvdFlag , MINVAL , MAXVAL, "translation_gvd_flag" ); 1554 xCheckCfgRange( wrongConfig, m_signGvdZNearFlag[i] , MINVAL , MAXVAL, "sign_gvd_z_near_flag" ); 1555 xCheckCfgRange( wrongConfig, m_expGvdZNear[i] , MINVAL , MAXVAL, "exp_gvd_z_near" ); 1556 xCheckCfgRange( wrongConfig, m_manLenGvdZNearMinus1[i] , MINVAL , MAXVAL, "man_len_gvd_z_near_minus1" ); 1557 xCheckCfgRange( wrongConfig, m_manGvdZNear[i] , MINVAL , MAXVAL, "man_gvd_z_near" ); 1558 xCheckCfgRange( wrongConfig, m_signGvdZFarFlag[i] , MINVAL , MAXVAL, "sign_gvd_z_far_flag" ); 1559 xCheckCfgRange( wrongConfig, m_expGvdZFar[i] , MINVAL , MAXVAL, "exp_gvd_z_far" ); 1560 xCheckCfgRange( wrongConfig, m_manLenGvdZFarMinus1[i] , MINVAL , MAXVAL, "man_len_gvd_z_far_minus1" ); 1561 xCheckCfgRange( wrongConfig, m_manGvdZFar[i] , MINVAL , MAXVAL, "man_gvd_z_far" ); 1562 xCheckCfgRange( wrongConfig, m_precGvdFocalLength , MINVAL , MAXVAL, "prec_gvd_focal_length" ); 1563 xCheckCfgRange( wrongConfig, m_precGvdPrincipalPoint , MINVAL , MAXVAL, "prec_gvd_principal_point" ); 1564 xCheckCfgRange( wrongConfig, m_precGvdRotationParam , MINVAL , MAXVAL, "prec_gvd_rotation_param" ); 1565 xCheckCfgRange( wrongConfig, m_precGvdTranslationParam , MINVAL , MAXVAL, "prec_gvd_translation_param" ); 1566 xCheckCfgRange( wrongConfig, m_signGvdFocalLengthX[i] , MINVAL , MAXVAL, "sign_gvd_focal_length_x" ); 1567 xCheckCfgRange( wrongConfig, m_expGvdFocalLengthX[i] , MINVAL , MAXVAL, "exp_gvd_focal_length_x" ); 1568 xCheckCfgRange( wrongConfig, m_manGvdFocalLengthX[i] , MINVAL , MAXVAL, "man_gvd_focal_length_x" ); 1569 xCheckCfgRange( wrongConfig, m_signGvdFocalLengthY[i] , MINVAL , MAXVAL, "sign_gvd_focal_length_y" ); 1570 xCheckCfgRange( wrongConfig, m_expGvdFocalLengthY[i] , MINVAL , MAXVAL, "exp_gvd_focal_length_y" ); 1571 xCheckCfgRange( wrongConfig, m_manGvdFocalLengthY[i] , MINVAL , MAXVAL, "man_gvd_focal_length_y" ); 1572 xCheckCfgRange( wrongConfig, m_signGvdPrincipalPointX[i] , MINVAL , MAXVAL, "sign_gvd_principal_point_x" ); 1573 xCheckCfgRange( wrongConfig, m_expGvdPrincipalPointX[i] , MINVAL , MAXVAL, "exp_gvd_principal_point_x" ); 1574 xCheckCfgRange( wrongConfig, m_manGvdPrincipalPointX[i] , MINVAL , MAXVAL, "man_gvd_principal_point_x" ); 1575 xCheckCfgRange( wrongConfig, m_signGvdPrincipalPointY[i] , MINVAL , MAXVAL, "sign_gvd_principal_point_y" ); 1576 xCheckCfgRange( wrongConfig, m_expGvdPrincipalPointY[i] , MINVAL , MAXVAL, "exp_gvd_principal_point_y" ); 1577 xCheckCfgRange( wrongConfig, m_manGvdPrincipalPointY[i] , MINVAL , MAXVAL, "man_gvd_principal_point_y" ); 1578 xCheckCfgRange( wrongConfig, m_signGvdR[i][j][k] , MINVAL , MAXVAL, "sign_gvd_r" ); 1579 xCheckCfgRange( wrongConfig, m_expGvdR[i][j][k] , MINVAL , MAXVAL, "exp_gvd_r" ); 1580 xCheckCfgRange( wrongConfig, m_manGvdR[i][j][k] , MINVAL , MAXVAL, "man_gvd_r" ); 1581 xCheckCfgRange( wrongConfig, m_signGvdTX[i] , MINVAL , MAXVAL, "sign_gvd_t_x" ); 1582 xCheckCfgRange( wrongConfig, m_expGvdTX[i] , MINVAL , MAXVAL, "exp_gvd_t_x" ); 1583 xCheckCfgRange( wrongConfig, m_manGvdTX[i] , MINVAL , MAXVAL, "man_gvd_t_x" ); 1584 #endif 1585 xCheckCfgRange( wrongConfig, m_minOffsetXFrac , 0 , 255, "min_offset_x_frac" ); 1586 xCheckCfgRange( wrongConfig, m_maxOffsetXFrac , 0 , 255, "max_offset_x_frac" ); 1587 xCheckCfgRange( wrongConfig, m_offsetYPresentFlag , 0 , 1, "offset_y_present_flag" ); 1588 xCheckCfgRange( wrongConfig, m_minOffsetYFrac , 0 , 255, "min_offset_y_frac" ); 1589 xCheckCfgRange( wrongConfig, m_maxOffsetYFrac , 0 , 255, "max_offset_y_frac" ); 1590 xCheckCfgRange( wrongConfig, m_warpMapSizePresentFlag , 0 , 1, "warp_map_size_present_flag" ); 1591 xCheckCfgRange( wrongConfig, m_warpMapWidthMinus2 , 0 , (slice->getSPS()->getPicWidthInLumaSamples()-2), "warp_map_width_minus2" ); 1592 xCheckCfgRange( wrongConfig, m_warpMapHeightMinus2 , 0 , ((slice->getSPS()->getPicHeightInLumaSamples()>>(Int)m_offsetYPresentFlag)-2), "warp_map_height_minus2" ); 1593 1594 return wrongConfig; 1595 1596 }; 1545 xCheckCfgRange( wrongConfig, m_numConstituentViewsGvdMinus1 , 1 , 1, "num_constituent_views_gvd_minus1 "); // 1: 3 views only, cuurent. 1546 xCheckCfgRange( wrongConfig, m_depthPresentGvdFlag , 0 , 1, "depth_present_gvd_flag" ); 1547 xCheckCfgRange( wrongConfig, m_zGvdFlag , 0 , 1, "z_gvd_flag" ); 1548 xCheckCfgRange( wrongConfig, m_intrinsicParamGvdFlag , 0 , 1, "intrinsic_param_gvd_flag" ); 1549 xCheckCfgRange( wrongConfig, m_rotationGvdFlag , 0 , 1, "rotation_gvd_flag" ); 1550 xCheckCfgRange( wrongConfig, m_translationGvdFlag , 0 , 1, "translation_gvd_flag" ); 1551 1552 return wrongConfig; 1553 1554 }; 1555 1597 1556 #endif 1598 1557 -
branches/HTM-15.1-dev0-NICT/source/Lib/TLibCommon/SEI.h
r1347 r1349 42 42 #include "CommonDef.h" 43 43 #include "libmd5/MD5.h" 44 44 45 45 46 46 #if NH_MV_SEI … … 54 54 class TComSPS; 55 55 #if NH_MV_SEI 56 class TComSlice; 57 class SEIScalableNesting; 56 class TComSlice; 57 class SEIScalableNesting; 58 58 #endif 59 59 … … 128 128 129 129 #if NH_MV_SEI 130 static SEI* getNewSEIMessage ( SEI::PayloadType payloadType ); 131 Bool insertSei ( Int curLayerId, Int curPoc, Int curTid, Int curNaluType ) const; 130 static SEI* getNewSEIMessage ( SEI::PayloadType payloadType ); 131 Bool insertSei ( Int curLayerId, Int curPoc, Int curTid, Int curNaluType ) const; 132 132 133 133 … … 139 139 Void xCheckCfgRange ( Bool& wrongConfig, Int val, Int minVal, Int maxVal, const Char* seName ); 140 140 Void xCheckCfg ( Bool& wrongConfig, Bool cond, const Char* errStr ); 141 Void xAddGeneralOpts ( po::Options &opts, IntAry1d defAppLayerIds, IntAry1d defAppPocs, IntAry1d defAppTids, IntAry1d defAppVclNaluTypes, 141 Void xAddGeneralOpts ( po::Options &opts, IntAry1d defAppLayerIds, IntAry1d defAppPocs, IntAry1d defAppTids, IntAry1d defAppVclNaluTypes, 142 142 Int defSeiNaluId, Int defPositionInSeiNalu, Bool defModifyByEncoder ); 143 // Filters where to insert SEI in the bitstream. 144 // When the respected vector is empty, all layersIds, POCs, Tids, and Nalu types are used. 145 IntAry1d m_applicableLayerIds; 146 IntAry1d m_applicablePocs; 147 IntAry1d m_applicableTids; 148 IntAry1d m_applicableVclNaluTypes; 143 // Filters where to insert SEI in the bitstream. 144 // When the respected vector is empty, all layersIds, POCs, Tids, and Nalu types are used. 145 IntAry1d m_applicableLayerIds; 146 IntAry1d m_applicablePocs; 147 IntAry1d m_applicableTids; 148 IntAry1d m_applicableVclNaluTypes; 149 149 150 150 Int m_payloadType; // Payload type 151 Int m_seiNaluId; // Identifies to which NAL unit the SEI is added. 151 Int m_seiNaluId; // Identifies to which NAL unit the SEI is added. 152 152 Int m_positionInSeiNalu; // Identifies the order within the NAL unit 153 Bool m_modifyByEncoder; // Don't use the SEI cfg-file, but let let the encoder setup the NALU. 153 Bool m_modifyByEncoder; // Don't use the SEI cfg-file, but let let the encoder setup the NALU. 154 154 155 155 SEIScalableNesting* m_scalNestSeiContThisSei; // Pointer to scalable nesting SEI containing the SEI. When NULL, the SEI is not nested. … … 214 214 Bool m_noParameterSetUpdateFlag; 215 215 Int numSpsIdsMinus1; 216 std::vector<Int> activeSeqParameterSetId; 216 std::vector<Int> activeSeqParameterSetId; 217 217 }; 218 218 … … 527 527 SEIMasteringDisplayColourVolume() {} 528 528 virtual ~SEIMasteringDisplayColourVolume(){} 529 529 530 530 TComSEIMasteringDisplay values; 531 531 }; … … 611 611 612 612 public: 613 Int m_mcts_id; 613 Int m_mcts_id; 614 614 Bool m_display_tile_set_flag; 615 615 Int m_num_tile_rects_in_set; //_minus1; … … 667 667 SEILayersNotPresent ( ) { }; 668 668 ~SEILayersNotPresent( ) { }; 669 SEI* getCopy( ) const { return new SEILayersNotPresent(*this); }; 669 SEI* getCopy( ) const { return new SEILayersNotPresent(*this); }; 670 670 671 671 Void setupFromCfgFile( const Char* cfgFile ); … … 689 689 SEIInterLayerConstrainedTileSets ( ) { }; 690 690 ~SEIInterLayerConstrainedTileSets( ) { }; 691 SEI* getCopy( ) const { return new SEIInterLayerConstrainedTileSets(*this); }; 691 SEI* getCopy( ) const { return new SEIInterLayerConstrainedTileSets(*this); }; 692 692 693 693 Void setupFromCfgFile( const Char* cfgFile ); … … 731 731 SEIBspNesting ( ) { }; 732 732 ~SEIBspNesting( ) { }; 733 SEI* getCopy( ) const { return new SEIBspNesting(*this); }; 733 SEI* getCopy( ) const { return new SEIBspNesting(*this); }; 734 734 735 735 Void setupFromCfgFile( const Char* cfgFile ); … … 750 750 SEIBspInitialArrivalTime ( ) { }; 751 751 ~SEIBspInitialArrivalTime( ) { }; 752 SEI* getCopy( ) const { return new SEIBspInitialArrivalTime(*this); }; 752 SEI* getCopy( ) const { return new SEIBspInitialArrivalTime(*this); }; 753 753 754 754 Void setupFromCfgFile( const Char* cfgFile ); … … 767 767 SEISubBitstreamProperty ( ) { }; 768 768 ~SEISubBitstreamProperty( ) { }; 769 SEI* getCopy( ) const { return new SEISubBitstreamProperty(*this); }; 770 771 Void setupFromCfgFile( const Char* cfgFile ); 772 Bool checkCfg ( const TComSlice* slice ); 773 Void resizeArrays ( ); 769 SEI* getCopy( ) const { return new SEISubBitstreamProperty(*this); }; 770 771 Void setupFromCfgFile( const Char* cfgFile ); 772 Bool checkCfg ( const TComSlice* slice ); 773 Void resizeArrays ( ); 774 774 775 775 Int m_sbPropertyActiveVpsId; … … 788 788 SEIAlphaChannelInfo ( ) { }; 789 789 ~SEIAlphaChannelInfo( ) { }; 790 SEI* getCopy( ) const { return new SEIAlphaChannelInfo(*this); }; 790 SEI* getCopy( ) const { return new SEIAlphaChannelInfo(*this); }; 791 791 792 792 Void setupFromCfgFile( const Char* cfgFile ); … … 807 807 public: 808 808 PayloadType payloadType( ) const { return OVERLAY_INFO; } 809 SEIOverlayInfo ( ); 809 SEIOverlayInfo ( ); 810 810 ~SEIOverlayInfo( ) { }; 811 SEI* getCopy( ) const { return new SEIOverlayInfo(*this); }; 812 813 Void setupFromCfgFile( const Char* cfgFile ); 814 Bool checkCfg ( const TComSlice* slice ); 815 816 const Int m_numOverlaysMax; 817 const Int m_numOverlayElementsMax; 811 SEI* getCopy( ) const { return new SEIOverlayInfo(*this); }; 812 813 Void setupFromCfgFile( const Char* cfgFile ); 814 Bool checkCfg ( const TComSlice* slice ); 815 816 const Int m_numOverlaysMax; 817 const Int m_numOverlayElementsMax; 818 818 const Int m_numStringBytesMax; //incl. null termination byte 819 819 820 820 Bool m_overlayInfoCancelFlag; 821 821 Int m_overlayContentAuxIdMinus128; … … 833 833 IntAry1d m_numOverlayElementsMinus1; 834 834 IntAry2d m_overlayElementLabelMin; 835 IntAry2d m_overlayElementLabelMax; 835 IntAry2d m_overlayElementLabelMax; 836 836 StringAry1d m_overlayLanguage; 837 837 StringAry1d m_overlayName; … … 846 846 SEITemporalMvPredictionConstraints ( ) { }; 847 847 ~SEITemporalMvPredictionConstraints( ) { }; 848 SEI* getCopy( ) const { return new SEITemporalMvPredictionConstraints(*this); }; 848 SEI* getCopy( ) const { return new SEITemporalMvPredictionConstraints(*this); }; 849 849 850 850 Void setupFromCfgFile( const Char* cfgFile ); … … 862 862 SEIFrameFieldInfo ( ) { }; 863 863 ~SEIFrameFieldInfo( ) { }; 864 SEI* getCopy( ) const { return new SEIFrameFieldInfo(*this); }; 864 SEI* getCopy( ) const { return new SEIFrameFieldInfo(*this); }; 865 865 866 866 Void setupFromCfgFile( const Char* cfgFile ); … … 880 880 SEIThreeDimensionalReferenceDisplaysInfo ( ) { }; 881 881 ~SEIThreeDimensionalReferenceDisplaysInfo( ) { }; 882 SEI* getCopy( ) const { return new SEIThreeDimensionalReferenceDisplaysInfo(*this); }; 882 SEI* getCopy( ) const { return new SEIThreeDimensionalReferenceDisplaysInfo(*this); }; 883 883 884 884 Void setupFromCfgFile( const Char* cfgFile ); … … 887 887 Int getNumRefDisplaysMinus1( ) const 888 888 { 889 return m_numRefDisplaysMinus1; 889 return m_numRefDisplaysMinus1; 890 890 } 891 891 … … 907 907 { 908 908 Int numReferenceDiaplays = getNumRefDisplaysMinus1() + 1; 909 909 910 910 m_leftViewId .resize( numReferenceDiaplays ); 911 911 m_rightViewId .resize( numReferenceDiaplays ); … … 920 920 UInt getMantissaReferenceDisplayWidthLen ( Int i ) const ; 921 921 UInt getMantissaReferenceViewingDistanceLen ( Int i ) const ; 922 private: 923 UInt xGetSyntaxElementLen( Int expo, Int prec, Int val ) const; 922 private: 923 UInt xGetSyntaxElementLen( Int expo, Int prec, Int val ) const; 924 924 }; 925 925 … … 929 929 public: 930 930 PayloadType payloadType( ) const { return DEPTH_REPRESENTATION_INFO; } 931 SEIDepthRepresentationInfo ( ) 931 SEIDepthRepresentationInfo ( ) 932 932 { 933 933 m_currLayerID=-1; 934 934 }; 935 935 ~SEIDepthRepresentationInfo( ) { }; 936 SEI* getCopy( ) const { return new SEIDepthRepresentationInfo(*this); }; 936 SEI* getCopy( ) const { return new SEIDepthRepresentationInfo(*this); }; 937 937 938 938 Void setupFromCfgFile( const Char* cfgFile ); … … 977 977 for(i=0;i<m_depth_nonlinear_representation_model.size();i++) 978 978 m_depth_nonlinear_representation_model[i].clear(); 979 m_depth_nonlinear_representation_model.clear(); 979 m_depth_nonlinear_representation_model.clear(); 980 980 981 981 } … … 1001 1001 SEIMultiviewSceneInfo ( ) { }; 1002 1002 ~SEIMultiviewSceneInfo( ) { }; 1003 SEI* getCopy( ) const { return new SEIMultiviewSceneInfo(*this); }; 1003 SEI* getCopy( ) const { return new SEIMultiviewSceneInfo(*this); }; 1004 1004 1005 1005 Void setupFromCfgFile( const Char* cfgFile ); … … 1017 1017 SEIMultiviewAcquisitionInfo ( ) { }; 1018 1018 ~SEIMultiviewAcquisitionInfo( ) { }; 1019 SEI* getCopy( ) const { return new SEIMultiviewAcquisitionInfo(*this); }; 1019 SEI* getCopy( ) const { return new SEIMultiviewAcquisitionInfo(*this); }; 1020 1020 1021 1021 Void setupFromCfgFile( const Char* cfgFile ); … … 1024 1024 Int getNumViewsMinus1( ) const 1025 1025 { 1026 Int numViewsMinus1; 1026 Int numViewsMinus1; 1027 1027 if( m_scalNestSeiContThisSei != NULL ) 1028 1028 { 1029 1029 numViewsMinus1 = m_scalNestSeiContThisSei->m_nestingNumLayersMinus1; 1030 } 1030 } 1031 1031 else 1032 1032 { 1033 numViewsMinus1 = 0; 1033 numViewsMinus1 = 0; 1034 1034 } 1035 return numViewsMinus1; 1035 return numViewsMinus1; 1036 1036 } 1037 1037 1038 1038 Void resizeArrays( ) 1039 1039 { 1040 Int numViews = getNumViewsMinus1() + 1; 1040 Int numViews = getNumViewsMinus1() + 1; 1041 1041 m_signFocalLengthX .resize( numViews ); 1042 1042 m_exponentFocalLengthX .resize( numViews ); … … 1055 1055 m_mantissaSkewFactor .resize( numViews ); 1056 1056 1057 m_signR .resize( numViews ); 1057 m_signR .resize( numViews ); 1058 1058 m_exponentR .resize( numViews ); 1059 m_mantissaR .resize( numViews ); 1059 m_mantissaR .resize( numViews ); 1060 1060 m_signT .resize( numViews ); 1061 1061 m_exponentT .resize( numViews ); … … 1064 1064 for( Int i = 0; i < numViews ; i++ ) 1065 1065 { 1066 m_signR [i].resize( 3 ); 1066 m_signR [i].resize( 3 ); 1067 1067 m_exponentR[i].resize( 3 ); 1068 m_mantissaR[i].resize( 3 ); 1068 m_mantissaR[i].resize( 3 ); 1069 1069 m_signT [i].resize( 3 ); 1070 1070 m_exponentT[i].resize( 3 ); … … 1073 1073 for (Int j = 0; j < 3; j++) 1074 1074 { 1075 m_signR [i][j].resize( 3 ); 1075 m_signR [i][j].resize( 3 ); 1076 1076 m_exponentR[i][j].resize( 3 ); 1077 m_mantissaR[i][j].resize( 3 ); 1077 m_mantissaR[i][j].resize( 3 ); 1078 1078 } 1079 1079 } 1080 1080 } 1081 1081 1082 1082 UInt getMantissaFocalLengthXLen ( Int i ) const ; 1083 1083 UInt getMantissaFocalLengthYLen ( Int i ) const ; … … 1117 1117 IntAry2d m_exponentT; 1118 1118 IntAry2d m_mantissaT; 1119 private: 1120 UInt xGetSyntaxElementLen( Int expo, Int prec, Int val ) const; 1119 private: 1120 UInt xGetSyntaxElementLen( Int expo, Int prec, Int val ) const; 1121 1121 }; 1122 1122 … … 1129 1129 SEIMultiviewViewPosition ( ) { }; 1130 1130 ~SEIMultiviewViewPosition( ) { }; 1131 SEI* getCopy( ) const { return new SEIMultiviewViewPosition(*this); }; 1131 SEI* getCopy( ) const { return new SEIMultiviewViewPosition(*this); }; 1132 1132 1133 1133 Void setupFromCfgFile( const Char* cfgFile ); 1134 1134 Void setupFromSlice ( const TComSlice* slice ); 1135 1135 Bool checkCfg ( const TComSlice* slice ); 1136 1136 1137 1137 Int m_numViewsMinus1; 1138 1138 IntAry1d m_viewPosition; … … 1146 1146 SEIAlternativeDepthInfo ( ) { }; 1147 1147 ~SEIAlternativeDepthInfo( ) { }; 1148 SEI* getCopy( ) const { return new SEIAlternativeDepthInfo(*this); }; 1149 1150 Void setupFromCfgFile( const Char* cfgFile ); 1151 Bool checkCfg ( const TComSlice* slice ); 1148 SEI* getCopy( ) const { return new SEIAlternativeDepthInfo(*this); }; 1149 1150 Void setupFromCfgFile( const Char* cfgFile ); 1151 Bool checkCfg ( const TComSlice* slice ); 1152 1153 Void resizeArrays( ) 1154 { 1155 const Int numViews = 3; // getNumConstituentViewsGvdMinus1() + 1; 1156 1157 m_signGvdZNearFlag.resize(3); 1158 m_expGvdZNear.resize(3); 1159 m_manLenGvdZNearMinus1.resize(3); 1160 m_manGvdZNear.resize(3); 1161 m_signGvdZFarFlag.resize(3); 1162 m_expGvdZFar.resize(3); 1163 m_manLenGvdZFarMinus1.resize(3); 1164 m_manGvdZFar.resize(3); 1165 1166 m_signGvdFocalLengthX.resize(3); 1167 m_expGvdFocalLengthX.resize(3); 1168 m_manGvdFocalLengthX.resize(3); 1169 m_signGvdFocalLengthY.resize(3); 1170 m_expGvdFocalLengthY.resize(3); 1171 m_manGvdFocalLengthY.resize(3); 1172 m_signGvdPrincipalPointX.resize(3); 1173 m_expGvdPrincipalPointX.resize(3); 1174 m_manGvdPrincipalPointX.resize(3); 1175 m_signGvdPrincipalPointY.resize(3); 1176 m_expGvdPrincipalPointY.resize(3); 1177 m_manGvdPrincipalPointY.resize(3); 1178 1179 m_signGvdR.resize(3); 1180 m_expGvdR.resize(3); 1181 m_manGvdR.resize(3); 1182 1183 m_signGvdTX.resize(3); 1184 m_expGvdTX.resize(3); 1185 m_manGvdTX.resize(3); 1186 1187 for( Int i = 0; i < numViews; i++ ) 1188 { 1189 m_signGvdZNearFlag[i].resize(3); 1190 m_expGvdZNear[i].resize(3); 1191 m_manLenGvdZNearMinus1[i].resize(3); 1192 m_manGvdZNear[i].resize(3); 1193 m_signGvdZFarFlag[i].resize(3); 1194 m_expGvdZFar[i].resize(3); 1195 m_manLenGvdZFarMinus1[i].resize(3); 1196 m_manGvdZFar[i].resize(3); 1197 1198 m_signGvdFocalLengthX[i].resize(3); 1199 m_expGvdFocalLengthX[i].resize(3); 1200 m_manGvdFocalLengthX[i].resize(3); 1201 m_signGvdFocalLengthY[i].resize(3); 1202 m_expGvdFocalLengthY[i].resize(3); 1203 m_manGvdFocalLengthY[i].resize(3); 1204 m_signGvdPrincipalPointX[i].resize(3); 1205 m_expGvdPrincipalPointX[i].resize(3); 1206 m_manGvdPrincipalPointX[i].resize(3); 1207 m_signGvdPrincipalPointY[i].resize(3); 1208 m_expGvdPrincipalPointY[i].resize(3); 1209 m_manGvdPrincipalPointY[i].resize(3); 1210 1211 m_signGvdR[i].resize(3); 1212 m_expGvdR[i].resize(3); 1213 m_manGvdR[i].resize(3); 1214 for( Int j = 0; j < 3; j++ ) 1215 { 1216 m_signGvdR[i][j].resize(3); 1217 m_expGvdR[i][j].resize(3); 1218 m_manGvdR[i][j].resize(3); 1219 } 1220 1221 m_signGvdTX[i].resize(3); 1222 m_expGvdTX[i].resize(3); 1223 m_manGvdTX[i].resize(3); 1224 } 1225 1226 } 1152 1227 1153 1228 Bool m_alternativeDepthInfoCancelFlag; 1154 1229 Int m_depthType; 1155 #if NH_MV_SEI_TBD1156 1230 Int m_numConstituentViewsGvdMinus1; 1157 1231 Bool m_depthPresentGvdFlag; … … 1160 1234 Bool m_rotationGvdFlag; 1161 1235 Bool m_translationGvdFlag; 1162 BoolAry 1d m_signGvdZNearFlag;1163 IntAry 1d m_expGvdZNear;1164 IntAry 1d m_manLenGvdZNearMinus1;1165 IntAry 1d m_manGvdZNear;1166 BoolAry 1d m_signGvdZFarFlag;1167 IntAry 1d m_expGvdZFar;1168 IntAry 1d m_manLenGvdZFarMinus1;1169 IntAry 1d m_manGvdZFar;1236 BoolAry2d m_signGvdZNearFlag; 1237 IntAry2d m_expGvdZNear; 1238 IntAry2d m_manLenGvdZNearMinus1; 1239 IntAry2d m_manGvdZNear; 1240 BoolAry2d m_signGvdZFarFlag; 1241 IntAry2d m_expGvdZFar; 1242 IntAry2d m_manLenGvdZFarMinus1; 1243 IntAry2d m_manGvdZFar; 1170 1244 Int m_precGvdFocalLength; 1171 1245 Int m_precGvdPrincipalPoint; 1172 1246 Int m_precGvdRotationParam; 1173 1247 Int m_precGvdTranslationParam; 1174 BoolAry 1d m_signGvdFocalLengthX;1175 IntAry 1d m_expGvdFocalLengthX;1176 IntAry 1d m_manGvdFocalLengthX;1177 BoolAry 1d m_signGvdFocalLengthY;1178 IntAry 1d m_expGvdFocalLengthY;1179 IntAry 1d m_manGvdFocalLengthY;1180 BoolAry 1d m_signGvdPrincipalPointX;1181 IntAry 1d m_expGvdPrincipalPointX;1182 IntAry 1d m_manGvdPrincipalPointX;1183 BoolAry 1d m_signGvdPrincipalPointY;1184 IntAry 1d m_expGvdPrincipalPointY;1185 IntAry 1d m_manGvdPrincipalPointY;1248 BoolAry2d m_signGvdFocalLengthX; 1249 IntAry2d m_expGvdFocalLengthX; 1250 IntAry2d m_manGvdFocalLengthX; 1251 BoolAry2d m_signGvdFocalLengthY; 1252 IntAry2d m_expGvdFocalLengthY; 1253 IntAry2d m_manGvdFocalLengthY; 1254 BoolAry2d m_signGvdPrincipalPointX; 1255 IntAry2d m_expGvdPrincipalPointX; 1256 IntAry2d m_manGvdPrincipalPointX; 1257 BoolAry2d m_signGvdPrincipalPointY; 1258 IntAry2d m_expGvdPrincipalPointY; 1259 IntAry2d m_manGvdPrincipalPointY; 1186 1260 BoolAry3d m_signGvdR; 1187 1261 IntAry3d m_expGvdR; 1188 1262 IntAry3d m_manGvdR; 1189 BoolAry1d m_signGvdTX; 1190 IntAry1d m_expGvdTX; 1191 IntAry1d m_manGvdTX; 1192 #endif 1263 BoolAry2d m_signGvdTX; 1264 IntAry2d m_expGvdTX; 1265 IntAry2d m_manGvdTX; 1193 1266 Int m_minOffsetXInt; 1194 1267 Int m_minOffsetXFrac; -
branches/HTM-15.1-dev0-NICT/source/Lib/TLibCommon/TComBitStream.cpp
r1321 r1349 113 113 { 114 114 assert( uiNumberOfBits <= 32 ); 115 #if !NH_3D 115 116 assert( uiNumberOfBits == 32 || (uiBits & (~0 << uiNumberOfBits)) == 0 ); 117 #endif 116 118 117 119 /* any modulo 8 remainder of num_total_bits cannot be written this time, … … 264 266 { 265 267 Bool oldJustDoIt = g_bJustDoIt; 266 g_bJustDoIt = true; 268 g_bJustDoIt = true; 267 269 writeToTraceFile( "Bits: ", m_numBitsRead, true ); 268 g_bJustDoIt = oldJustDoIt; 270 g_bJustDoIt = oldJustDoIt; 269 271 } 270 272 #endif -
branches/HTM-15.1-dev0-NICT/source/Lib/TLibCommon/TypeDef.h
r1344 r1349 43 43 //! \{ 44 44 ///////////////////////////////////////////////////////////////////////////////////////// 45 ///////////////////////////////// EXTENSION SELECTION /////////////////////////////////// 45 ///////////////////////////////// EXTENSION SELECTION /////////////////////////////////// 46 46 ///////////////////////////////////////////////////////////////////////////////////////// 47 47 /* HEVC_EXT might be defined by compiler/makefile options. 48 Linux makefiles support the following settings: 49 make -> HEVC_EXT not defined 48 Linux makefiles support the following settings: 49 make -> HEVC_EXT not defined 50 50 make HEVC_EXT=0 -> NH_MV=0 H_3D=0 --> plain HM 51 make HEVC_EXT=1 -> NH_MV=1 H_3D=0 --> MV only 52 make HEVC_EXT=2 -> NH_MV=1 H_3D=1 --> full 3D 51 make HEVC_EXT=1 -> NH_MV=1 H_3D=0 --> MV only 52 make HEVC_EXT=2 -> NH_MV=1 H_3D=1 --> full 3D 53 53 */ 54 54 #ifndef HEVC_EXT … … 56 56 #endif 57 57 #if ( HEVC_EXT < 0 )||( HEVC_EXT > 2 ) 58 #error HEVC_EXT must be in the range of 0 to 2, inclusive. 58 #error HEVC_EXT must be in the range of 0 to 2, inclusive. 59 59 #endif 60 60 #define NH_MV ( HEVC_EXT != 0) … … 66 66 #define NH_MV_SEI_TBD 0 67 67 #define NH_MV_SEI 1 68 #define NH_MV_FIX_TICKET_106 1 // Identical motion check. 69 #define NH_MV_FIX_NO_REF_PICS_CHECK 1 // !!SPEC!! 70 #define NH_MV_FIX_INIT_NUM_ACTIVE_REF_LAYER_PICS 1 // Derivation of NumActiveRefLayerPIcs. !!SPEC!! 68 #define NH_MV_FIX_TICKET_106 1 // Identical motion check. 69 #define NH_MV_FIX_NO_REF_PICS_CHECK 1 // !!SPEC!! 70 #define NH_MV_FIX_INIT_NUM_ACTIVE_REF_LAYER_PICS 1 // Derivation of NumActiveRefLayerPIcs. !!SPEC!! 71 71 #define NH_MV_FIX_NUM_POC_TOTAL_CUR 1 // Derivation of NumPocTotalCur for IDR pictures. !!SPEC!! 72 72 #define NH_MV_LAYERS_NOT_PRESENT_SEI 1 // Layers not present SEI message JCTMV-M0043 … … 79 79 #endif 80 80 ///////////////////////////////////////////////////////////////////////////////////////// 81 /////////////////////////////////// MAJOR DEFINES /////////////////////////////////// 81 /////////////////////////////////// MAJOR DEFINES /////////////////////////////////// 82 82 ///////////////////////////////////////////////////////////////////////////////////////// 83 83 #if NH_MV … … 96 96 // LGE_ARP_CTX_F0161 JCT3V-F0161 97 97 // MTK_ARP_FLAG_CABAC_SIMP_G0061 Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061 98 // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053 98 // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053 99 99 // MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085 Align the SW and WD for the bi-prediction ARP PUs by disallowing non-normative fast bi-prediction for ARP PUs, JCT3V-H0085 100 // QC_I0051_ARP_SIMP 101 // SHARP_ARP_CHROMA_I0104 100 // QC_I0051_ARP_SIMP 101 // SHARP_ARP_CHROMA_I0104 102 102 // MTK_I0072_IVARP_SCALING_FIX 103 103 // SEC_ARP_VIEW_REF_CHECK_J0037 Signaling iv_res_pred_weight_idx when the current slice has both view and temporal reference picture(s), JCT3V-J0037 item1 104 104 // SEC_ARP_REM_ENC_RESTRICT_K0035 Removal of encoder restriction of ARP, JCT3V-K0035 105 105 #define NH_3D_QTLPC 1 // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068 106 // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units 106 // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units 107 107 // MTK_TEX_DEP_PAR_G0055 Texture-partition-dependent depth partition. JCT3V-G0055 108 #define NH_3D_VSO 1 // VSO, View synthesis optimization, includes: 108 #define NH_3D_VSO 1 // VSO, View synthesis optimization, includes: 109 109 // HHI_VSO 110 110 // HHI_VSO_LS_TABLE_M23714 enable table base Lagrange multiplier optimization … … 112 112 // LGE_WVSO_A0119 113 113 // SCU_HS_VSD_BUGFIX_IMPROV_G0163 114 #define NH_3D_NBDV 1 // Neighboring block disparity derivation 115 // QC_JCT3V-A0097 114 #define NH_3D_NBDV 1 // Neighboring block disparity derivation 115 // QC_JCT3V-A0097 116 116 // LGE_DVMCP_A0126 117 // LGE_DVMCP_MEM_REDUCTION_B0135 117 // LGE_DVMCP_MEM_REDUCTION_B0135 118 118 // QC_SIMPLE_NBDV_B0047 119 119 // FIX_LGE_DVMCP_B0133 120 120 // QC_NBDV_LDB_FIX_C0055 121 121 // MTK_SAIT_TEMPORAL_FIRST_ORDER_C0141_C0097 122 // MTK_SIMPLIFY_DVTC_C0135 122 // MTK_SIMPLIFY_DVTC_C0135 123 123 // QC_CU_NBDV_D0181 124 124 // SEC_DEFAULT_DV_D0112 … … 160 160 // NTT_VSP_DC_BUGFIX_E0208 bugfix for sub-PU based DC in VSP, JCT3V-E0208 161 161 // NTT_VSP_COMMON_E0207_E0208 common part of JCT3V-E0207 and JCT3V-E0208 162 // MTK_F0109_LG_F0120_VSP_BLOCK MTK_LG_SIMPLIFY_VSP_BLOCK_PARTITION_F0109_F0120 162 // MTK_F0109_LG_F0120_VSP_BLOCK MTK_LG_SIMPLIFY_VSP_BLOCK_PARTITION_F0109_F0120 163 163 // SHARP_VSP_BLOCK_IN_AMP_F0102 VSP partitioning for AMP 164 164 // MTK_VSP_SIMPLIFICATION_F0111 1. Inherited VSP also use NBDV of current CU, 2. VSP cannot be inherited from above LCU rowss 165 // LGE_SHARP_VSP_INHERIT_F0104 165 // LGE_SHARP_VSP_INHERIT_F0104 166 166 // NTT_STORE_SPDV_VSP_G0148 Storing Sub-PU based DV for VSP 167 167 // Restricted bi-prediction for VSP … … 170 170 #define NH_3D_MLC 1 171 171 #define NH_3D_IV_MERGE 1 // Inter-view motion merge candidate 172 // HHI_INTER_VIEW_MOTION_PRED 172 // HHI_INTER_VIEW_MOTION_PRED 173 173 // SAIT_IMPROV_MOTION_PRED_M24829, improved inter-view motion vector prediction 174 174 // QC_MRG_CANS_B0048 , JCT3V-B0048, B0086, B0069 175 175 // OL_DISMV_POS_B0069 , different pos for disparity MV candidate, B0069 176 176 // MTK_INTERVIEW_MERGE_A0049 , second part 177 // QC_AMVP_MRG_UNIFY_IVCAN_C0051 178 // QC_INRIA_MTK_MRG_E0126 177 // QC_AMVP_MRG_UNIFY_IVCAN_C0051 178 // QC_INRIA_MTK_MRG_E0126 179 179 // ETRIKHU_MERGE_REUSE_F0093 QC_DEPTH_IV_MRG_F0125, JCT3V-F0125: Depth oriented Inter-view MV candidate 180 180 // MTK_NBDV_IVREF_FIX_G0067 , Disable IvMC, VSP when IVREF is not available, JCT3V-G0067 … … 193 193 // TEXTURE MERGING CANDIDATE , JCT3V-C0137 194 194 // EC_MPI_ENABLING_MERGE_F0150, MPI flag in VPS and enabling in Merge mode 195 #define NH_3D_TMVP 1 // QC_TMVP_C0047 195 #define NH_3D_TMVP 1 // QC_TMVP_C0047 196 196 // Sony_M23639 197 197 // H_3D_TMVP_SCALING_FIX_K0053 1 // QC/CY for K0053 … … 213 213 // QC_DIM_DELTADC_UNIFY_F0132 Unify delta DC coding in depth intra modes 214 214 // LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135 Use only one context for CABAC of dim_not_present_flag 215 // QC_SIMP_DELTADC_CODING_H0131 Simplify detaDC entropy coding 215 // QC_SIMP_DELTADC_CODING_H0131 Simplify detaDC entropy coding 216 216 // MTK_DMM_SIMP_CODE_H0092 Remove CABAC context for DMM1 mode coding 217 217 // MTK_DELTA_DC_FLAG_ONE_CONTEXT_H0084_H0100_H0113 Use only one context for CABAC of delta_dc_flag as in JCTVC-H0084, JCTVC-H0100 and JCTVC-H0113 218 218 // HS_DMM_SIGNALLING_I0120 219 // SHARP_DMM1_I0110 LUT size reduction for DMM1 proposed in JCT3V-I0110 219 // SHARP_DMM1_I0110 LUT size reduction for DMM1 proposed in JCT3V-I0110 220 220 // MTK_DMM_SIM_J0035 221 // SHARP_DMM_CLEAN_K0042 1 // Generate DMM pattern with rotation 221 // SHARP_DMM_CLEAN_K0042 1 // Generate DMM pattern with rotation 222 222 #define NH_3D_DLT 1 // Depth Lookup Table 223 223 // HHI_DELTADC_DLT_D0035 224 224 // LGE_PRED_RES_CODING_DLT_DOMAIN_F0159 JCT3V-F0159 225 // SEC_NO_RESI_DLT_H0105 226 // MTK_DLT_CODING_FIX_H0091 225 // SEC_NO_RESI_DLT_H0105 226 // MTK_DLT_CODING_FIX_H0091 227 227 // H_3D_DELTA_DLT 228 228 // RWTH_DLT_CLIP_I0057 229 // SHARP_DLT_SIMP_J0029 DLT(DepthValue2Idx[]) table derivation cleanup 229 // SHARP_DLT_SIMP_J0029 DLT(DepthValue2Idx[]) table derivation cleanup 230 230 #define NH_3D_SDC_INTRA 1 // Segment-wise DC Coding method for INTRA 231 #define NH_3D_SDC_INTER 1 // Segment-wise DC Coding method for INTER 231 #define NH_3D_SDC_INTER 1 // Segment-wise DC Coding method for INTER 232 232 // RWTH_SDC_DLT_B0036 233 233 // INTEL_SDC64_D0193 … … 255 255 // MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 256 256 #define NH_3D_DBBP 1 // DBBP: Depth-based Block Partitioning and Merging 257 // MTK_DBBP_AMP_REM_H0072 258 // RWTH_DBBP_NO_SPU_H0057 259 // SEC_DBBP_FILTERING_H0104 260 // MTK_DBBP_SIGNALING_H0094 261 // H_3D_FIX_DBBP_IVMP Fix . Enable IVMP is always disabled, when DBBP is enabled. The original intention is to disable Sub-PU IVMP when DBBP is enabled, not to disable IVMP itself. 257 // MTK_DBBP_AMP_REM_H0072 258 // RWTH_DBBP_NO_SPU_H0057 259 // SEC_DBBP_FILTERING_H0104 260 // MTK_DBBP_SIGNALING_H0094 261 // H_3D_FIX_DBBP_IVMP Fix . Enable IVMP is always disabled, when DBBP is enabled. The original intention is to disable Sub-PU IVMP when DBBP is enabled, not to disable IVMP itself. 262 262 // SEC_DBBP_EXPLICIT_SIG_I0077 Remove the partition derivation and signal dbbp_flag only when the partition mode is 2NxN/Nx2N, JCT3V-I0077 263 263 // Disallow DBBP in 8x8 CU, JCT3V-I0078 … … 267 267 // RWTH_DBBP_NO_SATD_K0028 268 268 // HS_DBBP_CLEAN_K0048 269 #define NH_3D_DIS 1 // Depth intra skip 269 #define NH_3D_DIS 1 // Depth intra skip 270 270 // SEC_DEPTH_INTRA_SKIP_MODE_K0033 Depth intra skip mode 271 271 #define H_3D_FCO 0 // Flexible coding order for 3D … … 278 278 // HHI_VPS_3D_EXTENSION_I3_J0107 279 279 // HHI_INTER_COMP_PRED_K0052 280 // HHI_RES_PRED_K0052 281 // HHI_CAM_PARA_K0052 282 // H_3D_DIRECT_DEP_TYPE 280 // HHI_RES_PRED_K0052 281 // HHI_CAM_PARA_K0052 282 // H_3D_DIRECT_DEP_TYPE 283 283 // Rate Control 284 284 #define KWU_FIX_URQ 0 … … 287 287 #endif // NH_3D 288 288 ///////////////////////////////////////////////////////////////////////////////////////// 289 /////////////////////////////////// DERIVED DEFINES /////////////////////////////////// 289 /////////////////////////////////// DERIVED DEFINES /////////////////////////////////// 290 290 ///////////////////////////////////////////////////////////////////////////////////////// 291 291 #if NH_3D … … 294 294 #endif 295 295 ///// ***** VIEW SYNTHESIS OPTIMIZAION ********* 296 #if NH_3D_VSO 296 #if NH_3D_VSO 297 297 #define H_3D_VSO_DIST_INT 1 // Allow negative synthesized view distortion change 298 #define H_3D_VSO_COLOR_PLANES 1 // Compute VSO distortion on color planes 298 #define H_3D_VSO_COLOR_PLANES 1 // Compute VSO distortion on color planes 299 299 #define H_3D_VSO_EARLY_SKIP 1 // LGE_VSO_EARLY_SKIP_A0093, A0093 modification 4 300 300 #define H_3D_VSO_RM_ASSERTIONS 0 // Output VSO assertions … … 338 338 /////////////////////////////////// MV_HEVC HLS ////////////////////////////// 339 339 ///////////////////////////////////////////////////////////////////////////////// 340 // TBD: Check if integration is necessary. 340 // TBD: Check if integration is necessary. 341 341 #define H_MV_HLS_PTL_LIMITS 0 342 342 ///////////////////////////////////////////////////////////////////////////////////////// … … 358 358 #ifndef RExt__DECODER_DEBUG_BIT_STATISTICS 359 359 #define RExt__DECODER_DEBUG_BIT_STATISTICS 0 ///< 0 (default) = decoder reports as normal, 1 = decoder produces bit usage statistics (will impact decoder run time by up to ~10%) 360 #endif 361 #if NH_3D 362 #define DEBUG_NH_3D_SEI 0 ///< When enabled, prints out SEI values 360 363 #endif 361 364 // This can be enabled by the makefile … … 491 494 typedef UInt Distortion; ///< distortion measurement 492 495 #endif 493 #if NH_MV 494 typedef std::vector< std::string > StringAry1d; 495 typedef std::vector< StringAry1d > StringAry2d; 496 #if NH_MV 497 typedef std::vector< std::string > StringAry1d; 498 typedef std::vector< StringAry1d > StringAry2d; 496 499 typedef std::vector< Int > IntAry1d; 497 typedef std::vector< IntAry1d > IntAry2d; 498 typedef std::vector< IntAry2d > IntAry3d; 499 typedef std::vector< IntAry3d > IntAry4d; 500 typedef std::vector< IntAry4d > IntAry5d; 500 typedef std::vector< IntAry1d > IntAry2d; 501 typedef std::vector< IntAry2d > IntAry3d; 502 typedef std::vector< IntAry3d > IntAry4d; 503 typedef std::vector< IntAry4d > IntAry5d; 501 504 typedef std::vector< Bool > BoolAry1d; 502 typedef std::vector< BoolAry1d > BoolAry2d; 503 typedef std::vector< BoolAry2d > BoolAry3d; 504 typedef std::vector< BoolAry3d > BoolAry4d; 505 typedef std::vector< BoolAry4d > BoolAry5d; 505 typedef std::vector< BoolAry1d > BoolAry2d; 506 typedef std::vector< BoolAry2d > BoolAry3d; 507 typedef std::vector< BoolAry3d > BoolAry4d; 508 typedef std::vector< BoolAry4d > BoolAry5d; 506 509 #endif 507 510 #if NH_3D_VSO … … 512 515 #if H_3D_VSO_DIST_INT 513 516 typedef Int64 Dist; ///< RDO distortion 514 typedef Int64 Dist64; 517 typedef Int64 Dist64; 515 518 #define RDO_DIST_MIN MIN_INT 516 519 #define RDO_DIST_MAX MAX_INT 517 520 #else 518 521 typedef UInt Dist; ///< RDO distortion 519 typedef UInt64 Dist; 522 typedef UInt64 Dist; 520 523 #define RDO_DIST_MIN 0 521 524 #define RDO_DIST_MAX MAX_UINT … … 805 808 ANNEX_G, 806 809 ANNEX_H, 807 ANNEX_I 810 ANNEX_I 808 811 }; 809 812 #endif … … 821 824 ,MULTIVIEWMAIN = 6, 822 825 #if NH_3D 823 MAIN3D = 8, 826 MAIN3D = 8, 824 827 #endif 825 828 #endif … … 949 952 enum ScalabilityType 950 953 { 951 DEPTH_ID = 0, 954 DEPTH_ID = 0, 952 955 VIEW_ORDER_INDEX = 1, 953 956 DEPENDENCY_ID = 2, -
branches/HTM-15.1-dev0-NICT/source/Lib/TLibDecoder/SEIread.cpp
r1344 r1349 100 100 101 101 Void SEIReader::sei_read_string(std::ostream *pOS, UInt uiBufSize, UChar* pucCode, UInt& ruiLength, const Char *pSymbolName) 102 { 102 { 103 103 READ_STRING(uiBufSize, pucCode, ruiLength, pSymbolName); 104 104 if (pOS) … … 119 119 (*pDecodedMessageOutputStream) << std::setfill('-') << std::setw(seiMessageHdr.size()) << "-" << std::setfill(' ') << "\n" << seiMessageHdr << " (" << payloadSize << " bytes)"<< "\n"; 120 120 #if NH_MV_SEI 121 (*pDecodedMessageOutputStream) << std::setfill(' ') << "LayerId: " << m_layerId << std::setw(2) << " Picture: " << m_decOrder << std::setw( 5 ) << std::endl; 121 (*pDecodedMessageOutputStream) << std::setfill(' ') << "LayerId: " << m_layerId << std::setw(2) << " Picture: " << m_decOrder << std::setw( 5 ) << std::endl; 122 122 #endif 123 123 } … … 566 566 Void SEIReader::xParseSEIActiveParameterSets(SEIActiveParameterSets& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream) 567 567 { 568 UInt val; 568 UInt val; 569 569 output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize); 570 570 … … 992 992 sei_read_code( pDecodedMessageOutputStream, 16, code, "avg_bit_rate[i]" ); sei.m_avgBitRate[i] = code; 993 993 sei_read_code( pDecodedMessageOutputStream, 16, code, "max_bit_rate[i]" ); sei.m_maxBitRate[i] = code; 994 } 994 } 995 995 } 996 996 … … 1235 1235 for (Int i = 0; i < sei.m_lnpSeiMaxLayers; i++) 1236 1236 { 1237 sei_read_flag( pDecodedMessageOutputStream, code, "layer_not_present_flag" ); 1237 sei_read_flag( pDecodedMessageOutputStream, code, "layer_not_present_flag" ); 1238 1238 sei.m_layerNotPresentFlag[i] = (code == 1); 1239 1239 } … … 1256 1256 } 1257 1257 Int numSignificantSets = sei.m_ilNumSetsInMessageMinus1 - sei.m_skippedTileSetPresentFlag + 1; 1258 1258 1259 1259 sei.resizeDimI( numSignificantSets ); 1260 1260 for( Int i = 0; i < numSignificantSets; i++ ) … … 1262 1262 sei_read_uvlc( pDecodedMessageOutputStream, code, "ilcts_id" ); sei.m_ilctsId [i] = code; 1263 1263 sei_read_uvlc( pDecodedMessageOutputStream, code, "il_num_tile_rects_in_set_minus1" ); sei.m_ilNumTileRectsInSetMinus1[i] = code; 1264 1264 1265 1265 sei.resizeDimJ( i, sei.m_ilNumTileRectsInSetMinus1[ i ] + 1 ); 1266 1266 for( Int j = 0; j <= sei.m_ilNumTileRectsInSetMinus1[ i ]; j++ ) … … 1332 1332 sei_read_code( pDecodedMessageOutputStream, 4, code, "sb_property_active_vps_id" ); sei.m_sbPropertyActiveVpsId = code; 1333 1333 sei_read_uvlc( pDecodedMessageOutputStream, code, "num_additional_sub_streams_minus1" ); sei.m_numAdditionalSubStreamsMinus1 = code; 1334 sei.resizeArrays( ); 1334 sei.resizeArrays( ); 1335 1335 for( Int i = 0; i <= sei.m_numAdditionalSubStreamsMinus1; i++ ) 1336 1336 { … … 1419 1419 while ( m_pcBitstream->getNumBitsRead() % 8 != 0 ) 1420 1420 { 1421 sei_read_flag( pDecodedMessageOutputStream, code, "overlay_zero_bit" ); 1422 assert( code==0 ); 1423 } 1424 1421 sei_read_flag( pDecodedMessageOutputStream, code, "overlay_zero_bit" ); 1422 assert( code==0 ); 1423 } 1424 1425 1425 UChar* sval = new UChar[sei.m_numStringBytesMax]; 1426 UInt slen; 1427 sei.m_overlayLanguage .resize( sei.m_numOverlaysMinus1 + 1 ); 1428 sei.m_overlayName .resize( sei.m_numOverlaysMinus1 + 1 ); 1429 sei.m_overlayElementName.resize( sei.m_numOverlaysMinus1 + 1 ); 1426 UInt slen; 1427 sei.m_overlayLanguage .resize( sei.m_numOverlaysMinus1 + 1 ); 1428 sei.m_overlayName .resize( sei.m_numOverlaysMinus1 + 1 ); 1429 sei.m_overlayElementName.resize( sei.m_numOverlaysMinus1 + 1 ); 1430 1430 for( Int i = 0; i <= sei.m_numOverlaysMinus1; i++ ) 1431 1431 { 1432 1432 if( sei.m_languageOverlayPresentFlag[i] ) 1433 { 1433 { 1434 1434 sei_read_string(pDecodedMessageOutputStream, sei.m_numStringBytesMax, sval, slen, "overlay_language"); 1435 sei.m_overlayLanguage[i] = std::string((const char*) sval); 1435 sei.m_overlayLanguage[i] = std::string((const char*) sval); 1436 1436 } 1437 1437 sei_read_string(pDecodedMessageOutputStream, sei.m_numStringBytesMax, sval, slen, "overlay_name"); 1438 sei.m_overlayName[i] = std::string((const char*) sval); 1438 sei.m_overlayName[i] = std::string((const char*) sval); 1439 1439 if( sei.m_overlayLabelPresentFlag[i] ) 1440 1440 { 1441 sei.m_overlayElementName[i].resize( sei.m_numOverlayElementsMinus1[i]+1 ); 1441 sei.m_overlayElementName[i].resize( sei.m_numOverlayElementsMinus1[i]+1 ); 1442 1442 for( Int j = 0; j <= sei.m_numOverlayElementsMinus1[i]; j++ ) 1443 1443 { 1444 1444 sei_read_string(pDecodedMessageOutputStream, sei.m_numStringBytesMax, sval, slen, "overlay_element_name"); 1445 sei.m_overlayElementName[i][j] = std::string((const char*) sval); 1445 sei.m_overlayElementName[i][j] = std::string((const char*) sval); 1446 1446 } 1447 1447 } … … 1449 1449 delete [] sval; 1450 1450 sei_read_flag( pDecodedMessageOutputStream, code, "overlay_info_persistence_flag" ); sei.m_overlayInfoPersistenceFlag = (code == 1); 1451 } 1451 } 1452 1452 }; 1453 1453 … … 1613 1613 { 1614 1614 UInt code; 1615 Int sCode; 1615 Int sCode; 1616 1616 output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize); 1617 1617 … … 1636 1636 1637 1637 for( Int i = 0; i <= ( sei.m_intrinsicParamsEqualFlag ? 0 : sei.getNumViewsMinus1() ); i++ ) 1638 { 1638 { 1639 1639 sei_read_flag( pDecodedMessageOutputStream, code, "sign_focal_length_x" ); sei.m_signFocalLengthX [i] = (code == 1); 1640 1640 sei_read_code( pDecodedMessageOutputStream, 6, code, "exponent_focal_length_x" ); sei.m_exponentFocalLengthX [i] = code ; … … 1685 1685 1686 1686 sei_read_uvlc( pDecodedMessageOutputStream, code, "num_views_minus1" ); sei.m_numViewsMinus1 = code; 1687 sei.m_viewPosition.resize( sei.m_numViewsMinus1 + 1 ); 1687 sei.m_viewPosition.resize( sei.m_numViewsMinus1 + 1 ); 1688 1688 for( Int i = 0; i <= sei.m_numViewsMinus1; i++ ) 1689 1689 { … … 1699 1699 output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize); 1700 1700 1701 sei.resizeArrays( ); 1701 1702 sei_read_flag( pDecodedMessageOutputStream, code, "alternative_depth_info_cancel_flag" ); sei.m_alternativeDepthInfoCancelFlag = (code == 1); 1702 1703 if( sei.m_alternativeDepthInfoCancelFlag == 0 ) 1703 1704 { 1704 1705 sei_read_code( pDecodedMessageOutputStream, 2, code, "depth_type" ); sei.m_depthType = code; 1705 #if NH_MV_SEI_TBD1706 1706 if( sei.m_depthType == 0 ) 1707 1707 { … … 1714 1714 if( sei.m_zGvdFlag ) 1715 1715 { 1716 for( Int i = 0 ; i <= sei.m_numConstituentViewsGvdMinus1 + 1; i++ )1717 { 1718 sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_z_near_flag" ); sei.m_signGvdZNearFlag[i] = (code == 1);1719 sei_read_code( pDecodedMessageOutputStream, 7, code, "exp_gvd_z_near" ); sei.m_expGvdZNear[i] = code;1720 sei_read_code( pDecodedMessageOutputStream, 5, code, "man_len_gvd_z_near_minus1" ); sei.m_manLenGvdZNearMinus1[i] = code;1721 sei_read_code( pDecodedMessageOutputStream, getManGvdZNearLen ), code, "man_gvd_z_near" ); sei.m_manGvdZNear[i] = code;1722 sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_z_far_flag" ); sei.m_signGvdZFarFlag[i] = (code == 1);1723 sei_read_code( pDecodedMessageOutputStream, 7, code, "exp_gvd_z_far" ); sei.m_expGvdZFar[i] = code;1724 sei_read_code( pDecodedMessageOutputStream, 5, code, "man_len_gvd_z_far_minus1" ); sei.m_manLenGvdZFarMinus1[i] = code;1725 sei_read_code( pDecodedMessageOutputStream, getManGvdZFarLen ), code, "man_gvd_z_far" ); sei.m_manGvdZFar[i] = code;1716 for( Int i = 0, j = 0; j <= sei.m_numConstituentViewsGvdMinus1 + 1; j++ ) 1717 { 1718 sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_z_near_flag" ); sei.m_signGvdZNearFlag[i][j] = (code == 1); 1719 sei_read_code( pDecodedMessageOutputStream, 7, code, "exp_gvd_z_near" ); sei.m_expGvdZNear[i][j] = code; 1720 sei_read_code( pDecodedMessageOutputStream, 5, code, "man_len_gvd_z_near_minus1" ); sei.m_manLenGvdZNearMinus1[i][j] = code; 1721 sei_read_code( pDecodedMessageOutputStream, sei.m_manLenGvdZNearMinus1[i][j]+1, code, "man_gvd_z_near" ); sei.m_manGvdZNear[i][j] = code; 1722 sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_z_far_flag" ); sei.m_signGvdZFarFlag[i][j] = (code == 1); 1723 sei_read_code( pDecodedMessageOutputStream, 7, code, "exp_gvd_z_far" ); sei.m_expGvdZFar[i][j] = code; 1724 sei_read_code( pDecodedMessageOutputStream, 5, code, "man_len_gvd_z_far_minus1" ); sei.m_manLenGvdZFarMinus1[i][j] = code; 1725 sei_read_code( pDecodedMessageOutputStream, sei.m_manLenGvdZFarMinus1[i][j]+1, code, "man_gvd_z_far" ); sei.m_manGvdZFar[i][j] = code; 1726 1726 } 1727 1727 } … … 1739 1739 sei_read_uvlc( pDecodedMessageOutputStream, code, "prec_gvd_translation_param" ); sei.m_precGvdTranslationParam = code; 1740 1740 } 1741 for( Int i = 0 ; i <= sei.m_numConstituentViewsGvdMinus1 + 1; i++ )1741 for( Int i = 0, j = 0; j <= sei.m_numConstituentViewsGvdMinus1 + 1; j++ ) 1742 1742 { 1743 1743 if( sei.m_intrinsicParamGvdFlag ) 1744 1744 { 1745 sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_focal_length_x" ); sei.m_signGvdFocalLengthX[i] = (code == 1);1746 sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_focal_length_x" ); sei.m_expGvdFocalLengthX[i] = code;1747 sei_read_code( pDecodedMessageOutputStream, getManGvdFocalLengthXLen ), code, "man_gvd_focal_length_x" ); sei.m_manGvdFocalLengthX[i] = code;1748 sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_focal_length_y" ); sei.m_signGvdFocalLengthY[i] = (code == 1);1749 sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_focal_length_y" ); sei.m_expGvdFocalLengthY[i] = code;1750 sei_read_code( pDecodedMessageOutputStream, getManGvdFocalLengthYLen ), code, "man_gvd_focal_length_y" ); sei.m_manGvdFocalLengthY[i] = code;1751 sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_principal_point_x" ); sei.m_signGvdPrincipalPointX[i] = (code == 1);1752 sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_principal_point_x" ); sei.m_expGvdPrincipalPointX[i] = code;1753 sei_read_code( pDecodedMessageOutputStream, getManGvdPrincipalPointXLen ), code, "man_gvd_principal_point_x" ); sei.m_manGvdPrincipalPointX[i] = code;1754 sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_principal_point_y" ); sei.m_signGvdPrincipalPointY[i] = (code == 1);1755 sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_principal_point_y" ); sei.m_expGvdPrincipalPointY[i] = code;1756 sei_read_code( pDecodedMessageOutputStream, getManGvdPrincipalPointYLen ), code, "man_gvd_principal_point_y" ); sei.m_manGvdPrincipalPointY[i] = code;1745 sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_focal_length_x" ); sei.m_signGvdFocalLengthX[i][j] = (code == 1); 1746 sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_focal_length_x" ); sei.m_expGvdFocalLengthX[i][j] = code; 1747 sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdFocalLength, code, "man_gvd_focal_length_x" ); sei.m_manGvdFocalLengthX[i][j] = code; 1748 sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_focal_length_y" ); sei.m_signGvdFocalLengthY[i][j] = (code == 1); 1749 sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_focal_length_y" ); sei.m_expGvdFocalLengthY[i][j] = code; 1750 sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdFocalLength, code, "man_gvd_focal_length_y" ); sei.m_manGvdFocalLengthY[i][j] = code; 1751 sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_principal_point_x" ); sei.m_signGvdPrincipalPointX[i][j] = (code == 1); 1752 sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_principal_point_x" ); sei.m_expGvdPrincipalPointX[i][j] = code; 1753 sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdPrincipalPoint, code, "man_gvd_principal_point_x" ); sei.m_manGvdPrincipalPointX[i][j] = code; 1754 sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_principal_point_y" ); sei.m_signGvdPrincipalPointY[i][j] = (code == 1); 1755 sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_principal_point_y" ); sei.m_expGvdPrincipalPointY[i][j] = code; 1756 sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdPrincipalPoint, code, "man_gvd_principal_point_y" ); sei.m_manGvdPrincipalPointY[i][j] = code; 1757 1757 } 1758 1758 if( sei.m_rotationGvdFlag ) 1759 1759 { 1760 for( Int j = 10; j <= 3; j++ ) /* row*/1760 for( Int k = 0; k < 3; k++ ) /* column */ 1761 1761 { 1762 for( Int k = 10; k <= 3; k++ ) /* column */ 1763 { 1764 sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_r" ); sei.m_signGvdR[i][j][k] = (code == 1); 1765 sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_r" ); sei.m_expGvdR[i][j][k] = code; 1766 sei_read_code( pDecodedMessageOutputStream, getManGvdRLen ), code, "man_gvd_r" ); sei.m_manGvdR[i][j][k] = code; 1767 } 1762 sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_r" ); sei.m_signGvdR[i][j][k] = (code == 1); 1763 sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_r" ); sei.m_expGvdR[i][j][k] = code; 1764 sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdRotationParam, code, "man_gvd_r" ); sei.m_manGvdR[i][j][k] = code; 1768 1765 } 1769 1766 } 1770 1767 if( sei.m_translationGvdFlag ) 1771 1768 { 1772 sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_t_x" ); sei.m_signGvdTX[i] = (code == 1); 1773 sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_t_x" ); sei.m_expGvdTX[i] = code; 1774 sei_read_code( pDecodedMessageOutputStream, getManGvdTXLen ), code, "man_gvd_t_x" ); sei.m_manGvdTX[i] = code; 1775 } 1776 } 1777 } 1778 #endif 1769 #if NH_MV_SEI_TBD 1770 sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_t_x" ); sei.m_signGvdTX[i][j] = (code == 1); 1771 sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_t_x" ); sei.m_expGvdTX[i][j] = code; 1772 sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdTranslationParam, code, "man_gvd_t_x" ); sei.m_manGvdTX[i][j] = code; 1773 #endif 1774 } 1775 } 1776 } 1779 1777 1780 1778 if( sei.m_depthType == 1 ) -
branches/HTM-15.1-dev0-NICT/source/Lib/TLibDecoder/TDecTop.cpp
r1331 r1349 59 59 m_iLog2Precision = LOG2_DISP_PREC_LUT; 60 60 m_uiBitDepthForLUT = 8; // fixed 61 m_receivedIdc = NULL; 62 m_vps = NULL; 61 m_receivedIdc = NULL; 62 m_vps = NULL; 63 63 } 64 64 … … 75 75 xDeleteArray( m_adBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 ); 76 76 xDeleteArray( m_aiBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 ); 77 xDeleteArray( m_receivedIdc, m_vps->getNumViews() ); 77 if (m_receivedIdc != nullptr) // NICT FIX 78 xDeleteArray( m_receivedIdc, m_vps->getNumViews() ); 78 79 } 79 80 … … 84 85 assert( !isInitialized() ); // Only one initialization currently supported 85 86 m_bInitialized = true; 86 m_vps = vps; 87 m_bCamParsVaryOverTime = false; 88 m_lastPoc = -1; 89 m_firstReceivedPoc = -2; 87 m_vps = vps; 88 m_bCamParsVaryOverTime = false; 89 m_lastPoc = -1; 90 m_firstReceivedPoc = -2; 90 91 91 92 for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++) 92 93 { 93 Int curViewIdxInVps = m_vps->getVoiInVps( m_vps->getViewIndex( m_vps->getLayerIdInNuh( i ) ) ) ; 94 m_bCamParsVaryOverTime = m_bCamParsVaryOverTime || vps->getCpInSliceSegmentHeaderFlag( curViewIdxInVps ); 95 } 96 97 assert( m_receivedIdc == NULL ); 98 m_receivedIdc = new Int*[ m_vps->getNumViews() ]; 94 Int curViewIdxInVps = m_vps->getVoiInVps( m_vps->getViewIndex( m_vps->getLayerIdInNuh( i ) ) ) ; 95 m_bCamParsVaryOverTime = m_bCamParsVaryOverTime || vps->getCpInSliceSegmentHeaderFlag( curViewIdxInVps ); 96 } 97 98 assert( m_receivedIdc == NULL ); 99 m_receivedIdc = new Int*[ m_vps->getNumViews() ]; 99 100 for (Int i = 0; i < m_vps->getNumViews(); i++) 100 101 { 101 m_receivedIdc[i] = new Int[ m_vps->getNumViews() ]; 102 } 103 104 xResetReceivedIdc( true ); 102 m_receivedIdc[i] = new Int[ m_vps->getNumViews() ]; 103 } 104 105 xResetReceivedIdc( true ); 105 106 106 107 for (Int voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ ) 107 108 { 108 if( !m_vps->getCpInSliceSegmentHeaderFlag( voiInVps ) ) 109 if( !m_vps->getCpInSliceSegmentHeaderFlag( voiInVps ) ) 109 110 { 110 111 for (Int baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ ) 111 { 112 { 112 113 if( m_vps->getCpPresentFlag( voiInVps, baseVoiInVps ) ) 113 114 { 114 m_receivedIdc [ baseVoiInVps ][ voiInVps ] = -1; 115 m_receivedIdc [ baseVoiInVps ][ voiInVps ] = -1; 115 116 m_aaiCodedScale [ baseVoiInVps ][ voiInVps ] = m_vps->getCodedScale (voiInVps) [ baseVoiInVps ]; 116 117 m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ] = m_vps->getCodedOffset (voiInVps) [ baseVoiInVps ]; 117 118 118 m_receivedIdc [ voiInVps ][ baseVoiInVps ] = -1; 119 m_receivedIdc [ voiInVps ][ baseVoiInVps ] = -1; 119 120 m_aaiCodedScale [ voiInVps ][ baseVoiInVps ] = m_vps->getInvCodedScale (voiInVps) [ baseVoiInVps ]; 120 121 m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ] = m_vps->getInvCodedOffset(voiInVps) [ baseVoiInVps ]; … … 131 132 { 132 133 for (Int i = 0; i < m_vps->getNumViews(); i++) 133 { 134 { 134 135 for (Int j = 0; j < m_vps->getNumViews(); j++) 135 136 { 136 137 if ( overWriteFlag || ( m_receivedIdc[i][j] != -1 ) ) 137 138 { 138 m_receivedIdc[i][j] = 0; 139 } 139 m_receivedIdc[i][j] = 0; 140 } 140 141 } 141 142 } … … 171 172 } 172 173 173 Void 174 Void 174 175 CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT) 175 176 { … … 234 235 if( m_firstReceivedPoc == -2 ) 235 236 { 236 m_firstReceivedPoc = curPoc; 237 } 238 239 Bool newPocFlag = ( m_lastPoc != curPoc ); 237 m_firstReceivedPoc = curPoc; 238 } 239 240 Bool newPocFlag = ( m_lastPoc != curPoc ); 240 241 241 242 if ( newPocFlag ) 242 { 243 { 243 244 if( m_lastPoc != -1 ) 244 245 { … … 246 247 } 247 248 248 xResetReceivedIdc( false ); 249 xResetReceivedIdc( false ); 249 250 m_lastPoc = pcSlice->getPOC(); 250 251 } 251 252 252 UInt voiInVps = m_vps->getVoiInVps(pcSlice->getViewIndex()); 253 UInt voiInVps = m_vps->getVoiInVps(pcSlice->getViewIndex()); 253 254 if( m_vps->getCpInSliceSegmentHeaderFlag( voiInVps ) ) // check consistency of slice parameters here 254 { 255 { 255 256 for( Int baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ ) 256 { 257 { 257 258 if ( m_vps->getCpPresentFlag( voiInVps, baseVoiInVps ) ) 258 259 { 259 260 if ( m_receivedIdc[ voiInVps ][ baseVoiInVps ] != 0 ) 260 { 261 { 261 262 AOF( m_aaiCodedScale [ voiInVps ][ baseVoiInVps ] == pcSlice->getInvCodedScale () [ baseVoiInVps ] ); 262 263 AOF( m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ] == pcSlice->getInvCodedOffset() [ baseVoiInVps ] ); 263 264 } 264 265 else 265 { 266 m_receivedIdc [ voiInVps ][ baseVoiInVps ] = 1; 266 { 267 m_receivedIdc [ voiInVps ][ baseVoiInVps ] = 1; 267 268 m_aaiCodedScale [ voiInVps ][ baseVoiInVps ] = pcSlice->getInvCodedScale () [ baseVoiInVps ]; 268 269 m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ] = pcSlice->getInvCodedOffset() [ baseVoiInVps ]; … … 270 271 } 271 272 if ( m_receivedIdc[ baseVoiInVps ][ voiInVps ] != 0 ) 272 { 273 { 273 274 AOF( m_aaiCodedScale [ baseVoiInVps ][ voiInVps ] == pcSlice->getCodedScale () [ baseVoiInVps ] ); 274 275 AOF( m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ] == pcSlice->getCodedOffset () [ baseVoiInVps ] ); 275 276 } 276 277 else 277 { 278 m_receivedIdc [ baseVoiInVps ][ voiInVps ] = 1; 278 { 279 m_receivedIdc [ baseVoiInVps ][ voiInVps ] = 1; 279 280 m_aaiCodedScale [ baseVoiInVps ][ voiInVps ] = pcSlice->getCodedScale () [ baseVoiInVps ]; 280 281 m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ] = pcSlice->getCodedOffset () [ baseVoiInVps ]; … … 283 284 } 284 285 } 285 } 286 } 286 287 } 287 288 … … 295 296 fprintf( m_pCodedScaleOffsetFile, "#ViewOrderIdx ViewIdVal\n" ); 296 297 fprintf( m_pCodedScaleOffsetFile, "#------------ -------------\n" ); 297 298 298 299 for( UInt voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ ) 299 300 { … … 315 316 { 316 317 if ( m_receivedIdc[baseVoiInVps][voiInVps] != 0 ) 317 { 318 { 318 319 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n", 319 iS, iE, m_vps->getViewOIdxList( voiInVps ), m_vps->getViewOIdxList( baseVoiInVps ), 320 m_aaiCodedScale [ baseVoiInVps ][ voiInVps ], 320 iS, iE, m_vps->getViewOIdxList( voiInVps ), m_vps->getViewOIdxList( baseVoiInVps ), 321 m_aaiCodedScale [ baseVoiInVps ][ voiInVps ], 321 322 m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_vps->getCpPrecision() ); 322 } 323 } 323 324 } 324 325 } … … 334 335 #if !NH_MV 335 336 , m_associatedIRAPType(NAL_UNIT_INVALID) 336 , m_pocCRA(0) 337 , m_pocCRA(0) 337 338 , m_pocRandomAccess(MAX_INT) 338 339 , m_cListPic() … … 426 427 fclose( g_hTrace ); 427 428 } 428 #endif 429 #endif 429 430 #endif 430 431 while (!m_prefixSEINALUs.empty()) … … 465 466 #endif 466 467 #if NH_MV 467 m_cCavlcDecoder.setDecTop( this ); 468 m_cCavlcDecoder.setDecTop( this ); 468 469 #endif 469 470 m_cGopDecoder.init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO); … … 653 654 #if NH_MV 654 655 const TComVPS* vps = m_parameterSetManager.getVPS(sps->getVPSId()); 655 assert (vps != 0); 656 // TBD: check the condition on m_firstPicInLayerDecodedFlag 656 assert (vps != 0); 657 // TBD: check the condition on m_firstPicInLayerDecodedFlag 657 658 if (!m_parameterSetManager.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP() || !m_firstPicInLayerDecodedFlag[m_layerId] , m_layerId ) ) 658 659 #else … … 671 672 { 672 673 //, it is a requirement of bitstream conformance that the value of update_rep_format_flag shall be equal to 0. 673 assert( sps->getUpdateRepFormatFlag() == false ); 674 } 675 sps->checkRpsMaxNumPics( vps, getLayerId() ); 676 677 // It is a requirement of bitstream conformance that, when the SPS is referred to by 678 // any current picture that belongs to an independent non-base layer, the value of 674 assert( sps->getUpdateRepFormatFlag() == false ); 675 } 676 sps->checkRpsMaxNumPics( vps, getLayerId() ); 677 678 // It is a requirement of bitstream conformance that, when the SPS is referred to by 679 // any current picture that belongs to an independent non-base layer, the value of 679 680 // MultiLayerExtSpsFlag derived from the SPS shall be equal to 0. 680 681 681 682 if ( m_layerId > 0 && vps->getNumRefLayers( m_layerId ) == 0 ) 682 { 683 assert( sps->getMultiLayerExtSpsFlag() == 0 ); 683 { 684 assert( sps->getMultiLayerExtSpsFlag() == 0 ); 684 685 } 685 686 } 686 687 #if NH_MV_SEI 687 m_seiReader.setLayerId ( newPic->getLayerId ( ) ); 688 m_seiReader.setLayerId ( newPic->getLayerId ( ) ); 688 689 m_seiReader.setDecOrder( newPic->getDecodingOrder( ) ); 689 690 #endif … … 711 712 m_apcSlicePilot->applyReferencePictureSet(m_cListPic, m_apcSlicePilot->getRPS()); 712 713 #else 713 m_pcPic = newPic; 714 m_pcPic = newPic; 714 715 #endif 715 716 … … 727 728 #if NH_MV 728 729 pSlice->setPic( m_pcPic ); 729 vps=pSlice->getVPS(); 730 vps=pSlice->getVPS(); 730 731 // The nuh_layer_id value of the NAL unit containing the PPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA. 731 assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getDependencyFlag( m_layerId, pps->getLayerId() ) ); 732 assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getDependencyFlag( m_layerId, pps->getLayerId() ) ); 732 733 // The nuh_layer_id value of the NAL unit containing the SPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA. 733 734 assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getDependencyFlag( m_layerId, sps->getLayerId() ) ); … … 779 780 { 780 781 #if NH_MV 781 assert( m_pcPic != NULL ); 782 assert( newPic == NULL ); 782 assert( m_pcPic != NULL ); 783 assert( newPic == NULL ); 783 784 #endif 784 785 // make the slice-pilot a real slice, and set up the slice-pilot for the next slice … … 863 864 m_cEntropyDecoder.setBitstream (&(nalu.getBitstream())); 864 865 865 assert( nalu.m_nuhLayerId == m_layerId ); 866 assert( nalu.m_nuhLayerId == m_layerId ); 866 867 m_apcSlicePilot->initSlice(); // the slice pilot is an object to prepare for a new slice 867 868 // it is not associated with picture, sps or pps structures. 868 m_apcSlicePilot->setLayerId( nalu.m_nuhLayerId ); 869 m_cEntropyDecoder.decodeFirstSliceSegmentInPicFlag( m_apcSlicePilot ); 869 m_apcSlicePilot->setLayerId( nalu.m_nuhLayerId ); 870 m_cEntropyDecoder.decodeFirstSliceSegmentInPicFlag( m_apcSlicePilot ); 870 871 if ( m_apcSlicePilot->getFirstSliceSegementInPicFlag() ) 871 872 { 872 #endif 873 #endif 873 874 m_uiSliceIdx = 0; 874 875 } … … 916 917 if (m_apcSlicePilot->getRapPicFlag()) 917 918 { 918 if ((m_apcSlicePilot->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_apcSlicePilot->getNalUnitType() <= NAL_UNIT_CODED_SLICE_IDR_N_LP) || 919 if ((m_apcSlicePilot->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_apcSlicePilot->getNalUnitType() <= NAL_UNIT_CODED_SLICE_IDR_N_LP) || 919 920 (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA && m_bFirstSliceInSequence) || 920 921 (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA && m_apcSlicePilot->getHandleCraAsBlaFlag())) … … 932 933 else 933 934 { 934 m_apcSlicePilot->setNoOutputPriorPicsFlag(false); 935 m_apcSlicePilot->setNoOutputPriorPicsFlag(false); 935 936 } 936 937 … … 958 959 } 959 960 } 960 961 961 962 if (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA && m_craNoRaslOutputFlag) //Reset POC MSB when CRA has NoRaslOutputFlag equal to 1 962 963 { … … 1052 1053 { 1053 1054 //Check Multiview Main profile constraint in G.11.1.1 1054 // When ViewOrderIdx[ i ] derived according to any active VPS is equal to 1 1055 // for the layer with nuh_layer_id equal to i in subBitstream, 1056 // inter_view_mv_vert_constraint_flag shall be equal to 1 1055 // When ViewOrderIdx[ i ] derived according to any active VPS is equal to 1 1056 // for the layer with nuh_layer_id equal to i in subBitstream, 1057 // inter_view_mv_vert_constraint_flag shall be equal to 1 1057 1058 // in the sps_multilayer_extension( ) syntax structure in each active SPS for that layer. 1058 1059 if( pcSlice->getSPS()->getPTL()->getGeneralPTL()->getProfileIdc()==Profile::MULTIVIEWMAIN 1059 1060 && 1060 pcSlice->getVPS()->getViewOrderIdx(pcSlice->getVPS()->getLayerIdInNuh(getLayerId()))==1 1061 pcSlice->getVPS()->getViewOrderIdx(pcSlice->getVPS()->getLayerIdInNuh(getLayerId()))==1 1061 1062 ) 1062 1063 { … … 1069 1070 m_pcPic->setViewIndex( getViewIndex() ); 1070 1071 m_pcPic->setIsDepth ( getIsDepth () ); 1071 pcSlice->setIvPicLists( m_dpb ); 1072 #endif 1073 #endif 1074 1072 pcSlice->setIvPicLists( m_dpb ); 1073 #endif 1074 #endif 1075 1075 1076 // When decoding the slice header, the stored start and end addresses were actually RS addresses, not TS addresses. 1076 1077 // Now, having set up the maps, convert them to the correct form. … … 1105 1106 else 1106 1107 { 1107 assert( false ); 1108 assert( false ); 1108 1109 } 1109 1110 } … … 1112 1113 #endif 1113 1114 #if NH_3D_ARP 1114 pcSlice->setPocsInCurrRPSs(); 1115 pcSlice->setPocsInCurrRPSs(); 1115 1116 pcSlice->setARPStepNum(m_dpb); 1116 #endif 1117 #endif 1117 1118 #endif 1118 1119 … … 1199 1200 if ( decProcAnnexI() ) 1200 1201 { 1201 pcSlice->checkInCompPredRefLayers(); 1202 pcSlice->checkInCompPredRefLayers(); 1202 1203 } 1203 1204 #endif … … 1238 1239 TComSPS* sps = new TComSPS(); 1239 1240 #if NH_MV 1240 sps->setLayerId( getLayerId() ); 1241 sps->setLayerId( getLayerId() ); 1241 1242 #endif 1242 1243 #if O0043_BEST_EFFORT_DECODING … … 1254 1255 TComPPS* pps = new TComPPS(); 1255 1256 #if NH_MV 1256 pps->setLayerId( getLayerId() ); 1257 pps->setLayerId( getLayerId() ); 1257 1258 #endif 1258 1259 #if NH_3D_DLT … … 1344 1345 case NAL_UNIT_CODED_SLICE_RASL_R: 1345 1346 #if NH_MV 1346 assert( false ); 1347 return 1; 1347 assert( false ); 1348 return 1; 1348 1349 #else 1349 1350 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay); … … 1518 1519 { 1519 1520 //Output of this process is PicOrderCntVal, the picture order count of the current picture. 1520 // Picture order counts are used to identify pictures, for deriving motion parameters in merge mode and 1521 // Picture order counts are used to identify pictures, for deriving motion parameters in merge mode and 1521 1522 // motion vector prediction and for decoder conformance checking (see clause F.13.5). 1522 1523 … … 1525 1526 TComSlice* slice = m_apcSlicePilot; 1526 1527 const Int nuhLayerId = slice->getLayerId(); 1527 const TComVPS* vps = slice->getVPS(); 1528 const TComSPS* sps = slice->getSPS(); 1529 1530 Int pocDecrementedInDpbFlag = m_pocDecrementedInDpbFlag[ nuhLayerId ]; 1528 const TComVPS* vps = slice->getVPS(); 1529 const TComSPS* sps = slice->getSPS(); 1530 1531 Int pocDecrementedInDpbFlag = m_pocDecrementedInDpbFlag[ nuhLayerId ]; 1531 1532 1532 1533 if ( isFstPicOfAllLayOfPocResetPer ) 1533 1534 { 1534 // When the current picture is the first picture among all layers of a POC resetting period, 1535 // When the current picture is the first picture among all layers of a POC resetting period, 1535 1536 // the variable PocDecrementedInDPBFlag[ i ] is set equal to 0 for each value of i in the range of 0 to 62, inclusive. 1536 pocDecrementedInDpbFlag = false; 1537 pocDecrementedInDpbFlag = false; 1537 1538 } 1538 1539 1539 1540 // The variable pocResettingFlag is derived as follows: 1540 Bool pocResettingFlag; 1541 Bool pocResettingFlag; 1541 1542 if ( isPocResettingPicture ) 1542 1543 { 1543 //- If the current picture is a POC resetting picture, the following applies: 1544 //- If the current picture is a POC resetting picture, the following applies: 1544 1545 if( vps->getVpsPocLsbAlignedFlag() ) 1545 1546 { 1546 1547 // - If vps_poc_lsb_aligned_flag is equal to 0, pocResettingFlag is set equal to 1. 1547 pocResettingFlag = true; 1548 pocResettingFlag = true; 1548 1549 } 1549 1550 else if ( pocDecrementedInDpbFlag ) 1550 1551 { 1551 1552 // - Otherwise, if PocDecrementedInDPBFlag[ nuh_layer_id ] is equal to 1, pocResettingFlag is set equal to 0. 1552 pocResettingFlag = false; 1553 pocResettingFlag = false; 1553 1554 } 1554 1555 else 1555 1556 { 1556 1557 // - Otherwise, pocResettingFlag is set equal to 1. 1557 pocResettingFlag = true; 1558 pocResettingFlag = true; 1558 1559 } 1559 1560 } … … 1561 1562 { 1562 1563 // - Otherwise, pocResettingFlag is set equal to 0. 1563 pocResettingFlag = false; 1564 } 1565 1566 Int picOrderCntMsb; 1567 Int picOrderCntVal; 1564 pocResettingFlag = false; 1565 } 1566 1567 Int picOrderCntMsb; 1568 Int picOrderCntVal; 1568 1569 1569 1570 // Depending on pocResettingFlag, the following applies: … … 1573 1574 if( slice->getPocResetIdc() == 1 ) 1574 1575 { 1575 picOrderCntVal = slice->getSlicePicOrderCntLsb(); 1576 } 1577 else if (slice->getPocResetIdc() == 2 ) 1578 { 1579 picOrderCntVal = 0; 1576 picOrderCntVal = slice->getSlicePicOrderCntLsb(); 1577 } 1578 else if (slice->getPocResetIdc() == 2 ) 1579 { 1580 picOrderCntVal = 0; 1580 1581 } 1581 1582 else 1582 1583 { 1583 picOrderCntMsb = xGetCurrMsb( slice->getSlicePicOrderCntLsb(), slice->getFullPocResetFlag() ? 0 : slice->getPocLsbVal(), 0, sps->getMaxPicOrderCntLsb() ); 1584 picOrderCntVal = picOrderCntMsb + slice->getSlicePicOrderCntLsb(); 1584 picOrderCntMsb = xGetCurrMsb( slice->getSlicePicOrderCntLsb(), slice->getFullPocResetFlag() ? 0 : slice->getPocLsbVal(), 0, sps->getMaxPicOrderCntLsb() ); 1585 picOrderCntVal = picOrderCntMsb + slice->getSlicePicOrderCntLsb(); 1585 1586 } 1586 1587 } … … 1592 1593 if( slice->getPocMsbCycleValPresentFlag() ) 1593 1594 { 1594 picOrderCntMsb = slice->getPocMsbCycleVal() * sps->getMaxPicOrderCntLsb(); 1595 picOrderCntMsb = slice->getPocMsbCycleVal() * sps->getMaxPicOrderCntLsb(); 1595 1596 } 1596 1597 else if( !firstPicInLayerDecodedFlag || … … 1598 1599 { 1599 1600 picOrderCntMsb = 0; // (F 62) 1600 } 1601 } 1601 1602 else 1602 1603 { 1603 1604 Int prevPicOrderCntLsb = m_prevPicOrderCnt & ( sps->getMaxPicOrderCntLsb() - 1 ); 1604 Int prevPicOrderCntMsb = m_prevPicOrderCnt - prevPicOrderCntLsb; 1605 picOrderCntMsb = xGetCurrMsb( slice->getSlicePicOrderCntLsb(), prevPicOrderCntLsb, prevPicOrderCntMsb, sps->getMaxPicOrderCntLsb() ); 1606 } 1607 picOrderCntVal = picOrderCntMsb + slice->getSlicePicOrderCntLsb(); 1608 } 1605 Int prevPicOrderCntMsb = m_prevPicOrderCnt - prevPicOrderCntLsb; 1606 picOrderCntMsb = xGetCurrMsb( slice->getSlicePicOrderCntLsb(), prevPicOrderCntLsb, prevPicOrderCntMsb, sps->getMaxPicOrderCntLsb() ); 1607 } 1608 picOrderCntVal = picOrderCntMsb + slice->getSlicePicOrderCntLsb(); 1609 } 1609 1610 return picOrderCntVal; 1610 1611 } … … 1619 1620 if ( m_lastPresentPocResetIdc[ m_apcSlicePilot->getLayerId() ] != MIN_INT ) 1620 1621 { 1621 // - If the previous picture picA that has poc_reset_period_id present in the slice segment header is present in the same layer 1622 // of the bitstream as the current picture, the value of poc_reset_period_id is inferred to be equal to the value of the 1622 // - If the previous picture picA that has poc_reset_period_id present in the slice segment header is present in the same layer 1623 // of the bitstream as the current picture, the value of poc_reset_period_id is inferred to be equal to the value of the 1623 1624 // poc_reset_period_id of picA. 1624 1625 1625 m_apcSlicePilot->setPocResetPeriodId( m_lastPresentPocResetIdc[ m_apcSlicePilot->getLayerId() ] ); 1626 m_apcSlicePilot->setPocResetPeriodId( m_lastPresentPocResetIdc[ m_apcSlicePilot->getLayerId() ] ); 1626 1627 } 1627 1628 else 1628 1629 { 1629 1630 //- Otherwise, the value of poc_reset_period_id is inferred to be equal to 0. 1630 m_apcSlicePilot->setPocResetPeriodId( 0 ); 1631 m_apcSlicePilot->setPocResetPeriodId( 0 ); 1631 1632 } 1632 1633 } 1633 1634 else 1634 1635 { 1635 m_lastPresentPocResetIdc[ m_apcSlicePilot->getLayerId() ] = m_apcSlicePilot->getPocResetPeriodId(); 1636 m_lastPresentPocResetIdc[ m_apcSlicePilot->getLayerId() ] = m_apcSlicePilot->getPocResetPeriodId(); 1636 1637 } 1637 1638 } … … 1639 1640 1640 1641 Void TDecTop::decodePocAndRps( ) 1641 { 1642 { 1642 1643 assert( m_uiSliceIdx == 0 ); 1643 1644 Int nuhLayerId = m_pcPic->getLayerId(); … … 1646 1647 // 8.1.3 Decoding process for a coded picture with nuh_layer_id equal to 0 1647 1648 1648 // Variables and functions relating to picture order count are derived as 1649 // specified in clause 8.3.1. This needs to be invoked only for the first slice 1649 // Variables and functions relating to picture order count are derived as 1650 // specified in clause 8.3.1. This needs to be invoked only for the first slice 1650 1651 // segment of a picture. 1651 1652 x831DecProcForPicOrderCount( ); 1652 1653 1653 // The decoding process for RPS in clause 8.3.2 is invoked, wherein reference 1654 // pictures may be marked as "unused for reference" or "used for long-term 1655 // reference". This needs to be invoked only for the first slice segment of a 1654 // The decoding process for RPS in clause 8.3.2 is invoked, wherein reference 1655 // pictures may be marked as "unused for reference" or "used for long-term 1656 // reference". This needs to be invoked only for the first slice segment of a 1656 1657 // picture. 1657 1658 x832DecProcForRefPicSet ( false ); … … 1666 1667 // --> Clause 8.1.3 is invoked with replacments of 8.3.1, 8.3.2, and 8.3.3 by F.8.3.1, 8.3.2, and 8.3.3 1667 1668 1668 // Variables and functions relating to picture order count are derived as 1669 // specified in clause 8.3.1. This needs to be invoked only for the first slice 1669 // Variables and functions relating to picture order count are derived as 1670 // specified in clause 8.3.1. This needs to be invoked only for the first slice 1670 1671 // segment of a picture. 1671 1672 xF831DecProcForPicOrderCount( ); 1672 1673 1673 // The decoding process for RPS in clause 8.3.2 is invoked, wherein reference 1674 // pictures may be marked as "unused for reference" or "used for long-term 1675 // reference". This needs to be invoked only for the first slice segment of a 1674 // The decoding process for RPS in clause 8.3.2 is invoked, wherein reference 1675 // pictures may be marked as "unused for reference" or "used for long-term 1676 // reference". This needs to be invoked only for the first slice segment of a 1676 1677 // picture. 1677 1678 xF832DecProcForRefPicSet( ); … … 1682 1683 // nuh_layer_id greater than 0 1683 1684 1684 // Variables and functions relating to picture order count are derived in clause F.8.3.1. 1685 // This needs to be invoked only for the first slice segment of a picture. It is a requirement 1686 // of bitstream conformance that PicOrderCntVal of each picture in an access unit shall have the 1685 // Variables and functions relating to picture order count are derived in clause F.8.3.1. 1686 // This needs to be invoked only for the first slice segment of a picture. It is a requirement 1687 // of bitstream conformance that PicOrderCntVal of each picture in an access unit shall have the 1687 1688 // same value during and at the end of decoding of the access unit 1688 1689 xF831DecProcForPicOrderCount( ); 1689 1690 1690 // The decoding process for RPS in clause F.8.3.2 is invoked, wherein only reference pictures with 1691 // nuh_layer_id equal to that of CurrPic may be marked as "unused for reference" or "used for 1692 // long-term reference" and any picture with a different value of nuh_layer_id is not marked. 1691 // The decoding process for RPS in clause F.8.3.2 is invoked, wherein only reference pictures with 1692 // nuh_layer_id equal to that of CurrPic may be marked as "unused for reference" or "used for 1693 // long-term reference" and any picture with a different value of nuh_layer_id is not marked. 1693 1694 // This needs to be invoked only for the first slice segment of a picture. 1694 1695 xF832DecProcForRefPicSet( ); … … 1697 1698 else 1698 1699 { 1699 assert( false ); 1700 assert( false ); 1700 1701 } 1701 1702 } 1702 1703 1703 1704 Void TDecTop::genUnavailableRefPics( ) 1704 { 1705 { 1705 1706 assert( m_uiSliceIdx == 0 ); 1706 1707 Int nuhLayerId = m_pcPic->getLayerId(); … … 1711 1712 if ( m_pcPic->isBla() || ( m_pcPic->isCra() && m_pcPic->getNoRaslOutputFlag() ) ) 1712 1713 { 1713 // When the current picture is a BLA picture or is a CRA picture 1714 // with NoRaslOutputFlag equal to 1, the decoding process for generating 1715 // unavailable reference pictures specified in clause 8.3.3 is invoked, 1714 // When the current picture is a BLA picture or is a CRA picture 1715 // with NoRaslOutputFlag equal to 1, the decoding process for generating 1716 // unavailable reference pictures specified in clause 8.3.3 is invoked, 1716 1717 // which needs to be invoked only for the first slice segment of a picture. 1717 x8331GenDecProcForGenUnavilRefPics(); 1718 x8331GenDecProcForGenUnavilRefPics(); 1718 1719 } 1719 1720 } … … 1729 1730 if ( m_pcPic->isBla() || ( m_pcPic->isCra() && m_pcPic->getNoRaslOutputFlag() ) ) 1730 1731 { 1731 // When the current picture is a BLA picture or is a CRA picture 1732 // with NoRaslOutputFlag equal to 1, the decoding process for generating 1733 // unavailable reference pictures specified in clause 8.3.3 is invoked, 1732 // When the current picture is a BLA picture or is a CRA picture 1733 // with NoRaslOutputFlag equal to 1, the decoding process for generating 1734 // unavailable reference pictures specified in clause 8.3.3 is invoked, 1734 1735 // which needs to be invoked only for the first slice segment of a picture. 1735 xF833DecProcForGenUnavRefPics(); 1736 xF833DecProcForGenUnavRefPics(); 1736 1737 } 1737 1738 #if NH_MV_FIX_INIT_NUM_ACTIVE_REF_LAYER_PICS 1738 TComDecodedRps* decRps = m_pcPic->getDecodedRps(); 1739 TComDecodedRps* decRps = m_pcPic->getDecodedRps(); 1739 1740 decRps->m_numActiveRefLayerPics0 = 0; 1740 decRps->m_numActiveRefLayerPics1 = 0; 1741 decRps->m_numActiveRefLayerPics1 = 0; 1741 1742 #endif 1742 1743 } … … 1748 1749 if ( !m_firstPicInLayerDecodedFlag[ nuhLayerId ] ) 1749 1750 { 1750 // When FirstPicInLayerDecodedFlag[ nuh_layer_id ] is equal to 0, the decoding process for generating 1751 // unavailable reference pictures for pictures first in decoding order within a layer specified in 1751 // When FirstPicInLayerDecodedFlag[ nuh_layer_id ] is equal to 0, the decoding process for generating 1752 // unavailable reference pictures for pictures first in decoding order within a layer specified in 1752 1753 // clause F.8.1.7 is invoked, which needs to be invoked only for the first slice segment of a picture. 1753 1754 xF817DecProcForGenUnavRefPicForPicsFrstInDecOrderInLay(); … … 1756 1757 if ( m_firstPicInLayerDecodedFlag[ nuhLayerId ] && ( m_pcPic->isIrap() && m_pcPic->getNoRaslOutputFlag() ) ) 1757 1758 { 1758 // When FirstPicInLayerDecodedFlag[ nuh_layer_id ] is equal to 1 and the current picture is an IRAP 1759 // picture with NoRaslOutputFlag equal to 1, the decoding process for generating unavailable reference 1760 // pictures specified in clause F.8.3.3 is invoked, which needs to be invoked only for the first slice 1759 // When FirstPicInLayerDecodedFlag[ nuh_layer_id ] is equal to 1 and the current picture is an IRAP 1760 // picture with NoRaslOutputFlag equal to 1, the decoding process for generating unavailable reference 1761 // pictures specified in clause F.8.3.3 is invoked, which needs to be invoked only for the first slice 1761 1762 // segment of a picture. 1762 xF833DecProcForGenUnavRefPics(); 1763 xF833DecProcForGenUnavRefPics(); 1763 1764 } 1764 1765 … … 1772 1773 else 1773 1774 { 1774 assert( false ); 1775 } 1776 1777 xCheckUnavailableRefPics(); 1775 assert( false ); 1776 } 1777 1778 xCheckUnavailableRefPics(); 1778 1779 } 1779 1780 Void TDecTop::executeLoopFilters( ) 1780 1781 { 1781 assert( m_pcPic != NULL ); 1782 assert( m_pcPic != NULL ); 1782 1783 if ( !m_pcPic->getHasGeneratedRefPics() && !m_pcPic->getIsGenerated() ) 1783 1784 { … … 1791 1792 if( m_pcPic->isIrap() ) 1792 1793 { 1793 m_prevIrapPoc = m_pcPic->getPOC(); 1794 m_prevIrapDecodingOrder = m_pcPic->getDecodingOrder(); 1794 m_prevIrapPoc = m_pcPic->getPOC(); 1795 m_prevIrapDecodingOrder = m_pcPic->getDecodingOrder(); 1795 1796 } 1796 1797 if( m_pcPic->isStsa() ) … … 1803 1804 1804 1805 Void TDecTop::initFromActiveVps( const TComVPS* vps ) 1805 { 1806 setViewId ( vps->getViewId ( getLayerId() ) ); 1806 { 1807 setViewId ( vps->getViewId ( getLayerId() ) ); 1807 1808 #if NH_3D 1808 setViewIndex( vps->getViewIndex( getLayerId() ) ); 1809 setIsDepth ( vps->getDepthId ( getLayerId() ) == 1 ); 1809 setViewIndex( vps->getViewIndex( getLayerId() ) ); 1810 setIsDepth ( vps->getDepthId ( getLayerId() ) == 1 ); 1810 1811 #endif 1811 1812 1812 1813 if ( !vps->getVpsExtensionFlag() ) 1813 1814 { 1814 m_decodingProcess = CLAUSE_8; 1815 m_decodingProcess = CLAUSE_8; 1815 1816 m_isInOwnTargetDecLayerIdList = ( getLayerId() == 0 ); 1816 1817 } 1817 1818 else 1818 { 1819 { 1819 1820 if ( m_targetOlsIdx == -1 ) 1820 1821 { 1821 // Corresponds to specification by "External Means". (Should be set equal to 0, when no external means available. ) 1822 m_targetOlsIdx = vps->getVpsNumLayerSetsMinus1(); 1823 } 1824 1825 Int targetDecLayerSetIdx = vps->olsIdxToLsIdx( m_targetOlsIdx ); 1822 // Corresponds to specification by "External Means". (Should be set equal to 0, when no external means available. ) 1823 m_targetOlsIdx = vps->getVpsNumLayerSetsMinus1(); 1824 } 1825 1826 Int targetDecLayerSetIdx = vps->olsIdxToLsIdx( m_targetOlsIdx ); 1826 1827 1827 1828 if ( targetDecLayerSetIdx <= vps->getVpsNumLayerSetsMinus1() && vps->getVpsBaseLayerInternalFlag() ) 1828 1829 { 1829 m_smallestLayerId = 0; 1830 m_smallestLayerId = 0; 1830 1831 } 1831 1832 else if ( targetDecLayerSetIdx <= vps->getVpsNumLayerSetsMinus1() && !vps->getVpsBaseLayerInternalFlag() ) 1832 1833 { 1833 m_smallestLayerId = 0; 1834 m_smallestLayerId = 0; 1834 1835 } 1835 1836 else if ( targetDecLayerSetIdx > vps->getVpsNumLayerSetsMinus1() && vps->getNumLayersInIdList( targetDecLayerSetIdx) == 1 ) 1836 1837 { 1837 1838 // m_smallestLayerId = 0; 1839 // For now don't do change of layer id here. 1840 m_smallestLayerId = vps->getTargetDecLayerIdList( targetDecLayerSetIdx )[ 0 ]; 1838 1839 // m_smallestLayerId = 0; 1840 // For now don't do change of layer id here. 1841 m_smallestLayerId = vps->getTargetDecLayerIdList( targetDecLayerSetIdx )[ 0 ]; 1841 1842 } 1842 1843 else 1843 1844 { 1844 m_smallestLayerId = vps->getTargetDecLayerIdList( targetDecLayerSetIdx )[ 0 ]; 1845 m_smallestLayerId = vps->getTargetDecLayerIdList( targetDecLayerSetIdx )[ 0 ]; 1845 1846 } 1846 1847 … … 1848 1849 // Set profile 1849 1850 Int lsIdx = vps->olsIdxToLsIdx( m_targetOlsIdx ); 1850 Int lIdx = -1; 1851 Int lIdx = -1; 1851 1852 for (Int j = 0; j < vps->getNumLayersInIdList( lsIdx ) ; j++ ) 1852 1853 { 1853 1854 if ( vps->getLayerSetLayerIdList( lsIdx, j ) == getLayerId() ) 1854 { 1855 lIdx = j; 1856 break; 1857 } 1858 } 1859 m_isInOwnTargetDecLayerIdList = (lIdx != -1); 1855 { 1856 lIdx = j; 1857 break; 1858 } 1859 } 1860 m_isInOwnTargetDecLayerIdList = (lIdx != -1); 1860 1861 1861 1862 if ( m_isInOwnTargetDecLayerIdList ) 1862 1863 { 1863 1864 Int profileIdc = vps->getPTL( vps->getProfileTierLevelIdx( m_targetOlsIdx, lIdx ) )->getGeneralPTL()->getProfileIdc(); 1864 assert( profileIdc == 1 || profileIdc == 6 || profileIdc == 8 ); 1865 assert( profileIdc == 1 || profileIdc == 6 || profileIdc == 8 ); 1865 1866 1866 1867 if ( profileIdc == 6 ) … … 1893 1894 1894 1895 // Output of this process is PicOrderCntVal, the picture order count of the current picture. 1895 // Picture order counts are used to identify pictures, for deriving motion parameters in merge mode and 1896 // Picture order counts are used to identify pictures, for deriving motion parameters in merge mode and 1896 1897 // motion vector prediction, and for decoder conformance checking (see clause C.5). 1897 1898 // Each coded picture is associated with a picture order count variable, denoted as PicOrderCntVal. 1898 1899 1899 const TComSlice* curSlice = m_pcPic->getSlice(0); 1900 1901 Int prevPicOrderCntLsb = MIN_INT; 1902 Int prevPicOrderCntMsb = MIN_INT; 1903 if (!(m_pcPic->isIrap() && m_pcPic->getNoRaslOutputFlag() ) ) 1904 { 1905 // When the current picture is not an IRAP picture with NoRaslOutputFlag equal to 1, 1900 const TComSlice* curSlice = m_pcPic->getSlice(0); 1901 1902 Int prevPicOrderCntLsb = MIN_INT; 1903 Int prevPicOrderCntMsb = MIN_INT; 1904 if (!(m_pcPic->isIrap() && m_pcPic->getNoRaslOutputFlag() ) ) 1905 { 1906 // When the current picture is not an IRAP picture with NoRaslOutputFlag equal to 1, 1906 1907 // the variables prevPicOrderCntLsb and prevPicOrderCntMsb are derived as follows: 1907 1908 1908 // - Let prevTid0Pic be the previous picture in decoding order that has TemporalId equal to 0 and that is not a RASL picture, 1909 // - Let prevTid0Pic be the previous picture in decoding order that has TemporalId equal to 0 and that is not a RASL picture, 1909 1910 // a RADL picture or an SLNR picture. 1910 1911 1911 1912 // - The variable prevPicOrderCntLsb is set equal to slice_pic_order_cnt_lsb of prevTid0Pic. 1912 prevPicOrderCntLsb = m_prevTid0PicSlicePicOrderCntLsb; 1913 prevPicOrderCntLsb = m_prevTid0PicSlicePicOrderCntLsb; 1913 1914 1914 1915 // - The variable prevPicOrderCntMsb is set equal to PicOrderCntMsb of prevTid0Pic. 1915 prevPicOrderCntMsb = m_prevTid0PicPicOrderCntMsb; 1916 } 1917 1918 // The variable PicOrderCntMsb of the current picture is derived as follows: 1919 1916 prevPicOrderCntMsb = m_prevTid0PicPicOrderCntMsb; 1917 } 1918 1919 // The variable PicOrderCntMsb of the current picture is derived as follows: 1920 1920 1921 Int slicePicOrderCntLsb = curSlice->getSlicePicOrderCntLsb(); 1921 1922 1922 Int picOrderCntMsb; 1923 Int picOrderCntMsb; 1923 1924 1924 1925 if (m_pcPic->isIrap() && m_pcPic->getNoRaslOutputFlag() ) 1925 1926 { 1926 1927 //- If the current picture is an IRAP picture with NoRaslOutputFlag equal to 1, PicOrderCntMsb is set equal to 0. 1927 picOrderCntMsb = 0; 1928 picOrderCntMsb = 0; 1928 1929 } 1929 1930 else 1930 1931 { 1931 Int maxPicOrderCntLsb = curSlice->getSPS()->getMaxPicOrderCntLsb(); 1932 Int maxPicOrderCntLsb = curSlice->getSPS()->getMaxPicOrderCntLsb(); 1932 1933 1933 1934 // - Otherwise, PicOrderCntMsb is derived as follows: … … 1945 1946 else 1946 1947 { 1947 picOrderCntMsb = prevPicOrderCntMsb; 1948 } 1949 } 1950 1948 picOrderCntMsb = prevPicOrderCntMsb; 1949 } 1950 } 1951 1951 1952 //PicOrderCntVal is derived as follows: 1952 1953 Int picOrderCntVal = picOrderCntMsb + slicePicOrderCntLsb; // (8 2) 1953 1954 1954 // NOTE 1 - All IDR pictures will have PicOrderCntVal equal to 0 since slice_pic_order_cnt_lsb is inferred to be 0 for IDR 1955 // NOTE 1 - All IDR pictures will have PicOrderCntVal equal to 0 since slice_pic_order_cnt_lsb is inferred to be 0 for IDR 1955 1956 // pictures and prevPicOrderCntLsb and prevPicOrderCntMsb are both set equal to 0. 1956 1957 1957 m_pcPic->getSlice(0)->setPOC( picOrderCntVal ); 1958 m_pcPic->getSlice(0)->setPOC( picOrderCntVal ); 1958 1959 1959 1960 // Update prevTid0Pic … … 1961 1962 if( curSlice->getTemporalId() == 0 && !m_pcPic->isRasl() && !m_pcPic->isRadl() && !m_pcPic->isSlnr() ) 1962 1963 { 1963 m_prevTid0PicSlicePicOrderCntLsb = slicePicOrderCntLsb; 1964 m_prevTid0PicPicOrderCntMsb = picOrderCntMsb; 1964 m_prevTid0PicSlicePicOrderCntLsb = slicePicOrderCntLsb; 1965 m_prevTid0PicPicOrderCntMsb = picOrderCntMsb; 1965 1966 } 1966 1967 } … … 1969 1970 { 1970 1971 //Output of this process is PicOrderCntVal, the picture order count of the current picture. 1971 // Picture order counts are used to identify pictures, for deriving motion parameters in merge mode and 1972 // Picture order counts are used to identify pictures, for deriving motion parameters in merge mode and 1972 1973 // motion vector prediction and for decoder conformance checking (see clause F.13.5). 1973 1974 1974 1975 // Each coded picture is associated with a picture order count variable, denoted as PicOrderCntVal. 1975 1976 1976 const TComSlice* slice = m_pcPic->getSlice(0); 1977 const Int nuhLayerId = m_pcPic->getLayerId(); 1978 const TComVPS* vps = slice->getVPS(); 1979 const TComSPS* sps = slice->getSPS(); 1977 const TComSlice* slice = m_pcPic->getSlice(0); 1978 const Int nuhLayerId = m_pcPic->getLayerId(); 1979 const TComVPS* vps = slice->getVPS(); 1980 const TComSPS* sps = slice->getSPS(); 1980 1981 if ( m_pcPic->getIsFstPicOfAllLayOfPocResetPer() ) 1981 1982 { 1982 // When the current picture is the first picture among all layers of a POC resetting period, 1983 // When the current picture is the first picture among all layers of a POC resetting period, 1983 1984 // the variable PocDecrementedInDPBFlag[ i ] is set equal to 0 for each value of i in the range of 0 to 62, inclusive. 1984 1985 for (Int i = 0; i <= 62; i++) 1985 1986 { 1986 m_pocDecrementedInDpbFlag[ i ] = 0; 1987 m_pocDecrementedInDpbFlag[ i ] = 0; 1987 1988 } 1988 1989 } 1989 1990 1990 1991 // The variable pocResettingFlag is derived as follows: 1991 Bool pocResettingFlag; 1992 Bool pocResettingFlag; 1992 1993 if (m_pcPic->getIsPocResettingPic() ) 1993 1994 { 1994 //- If the current picture is a POC resetting picture, the following applies: 1995 //- If the current picture is a POC resetting picture, the following applies: 1995 1996 if( vps->getVpsPocLsbAlignedFlag() ) 1996 1997 { 1997 1998 // - If vps_poc_lsb_aligned_flag is equal to 0, pocResettingFlag is set equal to 1. 1998 pocResettingFlag = true; 1999 pocResettingFlag = true; 1999 2000 } 2000 2001 else if ( m_pocDecrementedInDpbFlag[ nuhLayerId ] ) 2001 2002 { 2002 2003 // - Otherwise, if PocDecrementedInDPBFlag[ nuh_layer_id ] is equal to 1, pocResettingFlag is set equal to 0. 2003 pocResettingFlag = false; 2004 pocResettingFlag = false; 2004 2005 } 2005 2006 else 2006 2007 { 2007 2008 // - Otherwise, pocResettingFlag is set equal to 1. 2008 pocResettingFlag = true; 2009 pocResettingFlag = true; 2009 2010 } 2010 2011 } … … 2012 2013 { 2013 2014 // - Otherwise, pocResettingFlag is set equal to 0. 2014 pocResettingFlag = false; 2015 pocResettingFlag = false; 2015 2016 } 2016 2017 2017 2018 // The list affectedLayerList is derived as follows: 2018 std::vector<Int> affectedLayerList; 2019 std::vector<Int> affectedLayerList; 2019 2020 if (! vps->getVpsPocLsbAlignedFlag() ) 2020 2021 { 2021 2022 //- If vps_poc_lsb_aligned_flag is equal to 0, affectedLayerList consists of the nuh_layer_id of the current picture. 2022 affectedLayerList.push_back( nuhLayerId ); 2023 affectedLayerList.push_back( nuhLayerId ); 2023 2024 } 2024 2025 else 2025 2026 { 2026 // - Otherwise, affectedLayerList consists of the nuh_layer_id of the current picture and the nuh_layer_id values 2027 // equal to IdPredictedLayer[ currNuhLayerId ][ j ] for all values of j in the range of 0 to NumPredictedLayers[ currNuhLayerId ] - 1, 2027 // - Otherwise, affectedLayerList consists of the nuh_layer_id of the current picture and the nuh_layer_id values 2028 // equal to IdPredictedLayer[ currNuhLayerId ][ j ] for all values of j in the range of 0 to NumPredictedLayers[ currNuhLayerId ] - 1, 2028 2029 // inclusive, where currNuhLayerId is the nuh_layer_id value of the current picture. 2029 affectedLayerList.push_back( nuhLayerId ); 2030 Int currNuhLayerId = nuhLayerId; 2030 affectedLayerList.push_back( nuhLayerId ); 2031 Int currNuhLayerId = nuhLayerId; 2031 2032 for (Int j = 0; j <= vps->getNumPredictedLayers( currNuhLayerId )-1; j++ ) 2032 2033 { … … 2034 2035 } 2035 2036 } 2036 2037 Int picOrderCntMsb; 2038 Int picOrderCntVal; 2037 2038 Int picOrderCntMsb; 2039 Int picOrderCntVal; 2039 2040 2040 2041 // Depending on pocResettingFlag, the following applies: … … 2045 2046 { 2046 2047 //- The variables pocMsbDelta, pocLsbDelta and DeltaPocVal are derived as follows: 2047 Int pocMsbDelta; 2048 Int pocLsbDelta; 2049 Int deltaPocVal; 2050 2051 { 2052 Int pocLsbVal; 2053 Int prevPicOrderCntLsb; 2054 Int prevPicOrderCntMsb; 2048 Int pocMsbDelta; 2049 Int pocLsbDelta; 2050 Int deltaPocVal; 2051 2052 { 2053 Int pocLsbVal; 2054 Int prevPicOrderCntLsb; 2055 Int prevPicOrderCntMsb; 2055 2056 2056 2057 if( slice->getPocResetIdc() == 3 ) 2057 2058 { 2058 pocLsbVal = slice->getPocLsbVal(); 2059 } 2059 pocLsbVal = slice->getPocLsbVal(); 2060 } 2060 2061 else 2061 2062 { 2062 pocLsbVal = slice->getSlicePicOrderCntLsb(); 2063 pocLsbVal = slice->getSlicePicOrderCntLsb(); 2063 2064 } 2064 2065 … … 2066 2067 { 2067 2068 pocMsbDelta = slice->getPocMsbCycleVal() * sps->getMaxPicOrderCntLsb(); // (F 60) 2068 }2069 else2070 {2071 prevPicOrderCntLsb = m_prevPicOrderCnt & ( sps->getMaxPicOrderCntLsb() - 1 );2072 prevPicOrderCntMsb = m_prevPicOrderCnt - prevPicOrderCntLsb;2073 2074 pocMsbDelta = xGetCurrMsb( pocLsbVal, prevPicOrderCntLsb, prevPicOrderCntMsb, sps->getMaxPicOrderCntLsb() );2075 }2076 2077 if( slice->getPocResetIdc() == 2 || ( slice->getPocResetIdc() == 3 && slice->getFullPocResetFlag() ) )2078 {2079 pocLsbDelta = pocLsbVal;2080 2069 } 2081 2070 else 2082 2071 { 2083 pocLsbDelta = 0; 2072 prevPicOrderCntLsb = m_prevPicOrderCnt & ( sps->getMaxPicOrderCntLsb() - 1 ); 2073 prevPicOrderCntMsb = m_prevPicOrderCnt - prevPicOrderCntLsb; 2074 2075 pocMsbDelta = xGetCurrMsb( pocLsbVal, prevPicOrderCntLsb, prevPicOrderCntMsb, sps->getMaxPicOrderCntLsb() ); 2084 2076 } 2085 deltaPocVal = pocMsbDelta + pocLsbDelta; 2086 } 2087 2088 //- The PicOrderCntVal of each picture that has nuh_layer_id value nuhLayerId for which PocDecrementedInDPBFlag[ nuhLayerId ] is equal to 0 2077 2078 if( slice->getPocResetIdc() == 2 || ( slice->getPocResetIdc() == 3 && slice->getFullPocResetFlag() ) ) 2079 { 2080 pocLsbDelta = pocLsbVal; 2081 } 2082 else 2083 { 2084 pocLsbDelta = 0; 2085 } 2086 deltaPocVal = pocMsbDelta + pocLsbDelta; 2087 } 2088 2089 //- The PicOrderCntVal of each picture that has nuh_layer_id value nuhLayerId for which PocDecrementedInDPBFlag[ nuhLayerId ] is equal to 0 2089 2090 // and that is equal to any value in affectedLayerList is decremented by DeltaPocVal. 2090 2091 for (Int i = 0; i < (Int) affectedLayerList.size(); i++ ) … … 2092 2093 if ( !m_pocDecrementedInDpbFlag[ affectedLayerList[i] ] ) 2093 2094 { 2094 m_dpb->decrementPocsInSubDpb( affectedLayerList[i], deltaPocVal ); 2095 m_dpb->decrementPocsInSubDpb( affectedLayerList[i], deltaPocVal ); 2095 2096 } 2096 2097 } … … 2099 2100 for (Int i = 0; i < (Int) affectedLayerList.size(); i++ ) 2100 2101 { 2101 m_pocDecrementedInDpbFlag[ affectedLayerList[i] ] = true; 2102 } 2103 } 2102 m_pocDecrementedInDpbFlag[ affectedLayerList[i] ] = true; 2103 } 2104 } 2104 2105 2105 2106 //- The PicOrderCntVal of the current picture is derived as follows: 2106 2107 if( slice->getPocResetIdc() == 1 ) 2107 2108 { 2108 picOrderCntVal = slice->getSlicePicOrderCntLsb(); 2109 } 2110 else if (slice->getPocResetIdc() == 2 ) 2111 { 2112 picOrderCntVal = 0; 2109 picOrderCntVal = slice->getSlicePicOrderCntLsb(); 2110 } 2111 else if (slice->getPocResetIdc() == 2 ) 2112 { 2113 picOrderCntVal = 0; 2113 2114 } 2114 2115 else 2115 2116 { 2116 picOrderCntMsb = xGetCurrMsb( slice->getSlicePicOrderCntLsb(), slice->getFullPocResetFlag() ? 0 : slice->getPocLsbVal(), 0, sps->getMaxPicOrderCntLsb() ); 2117 picOrderCntVal = picOrderCntMsb + slice->getSlicePicOrderCntLsb(); 2117 picOrderCntMsb = xGetCurrMsb( slice->getSlicePicOrderCntLsb(), slice->getFullPocResetFlag() ? 0 : slice->getPocLsbVal(), 0, sps->getMaxPicOrderCntLsb() ); 2118 picOrderCntVal = picOrderCntMsb + slice->getSlicePicOrderCntLsb(); 2118 2119 } 2119 2120 } … … 2122 2123 //- Otherwise (pocResettingFlag is equal to 0), the following applies: 2123 2124 //- The PicOrderCntVal of the current picture is derived as follows: 2124 2125 2125 2126 if( slice->getPocMsbCycleValPresentFlag() ) 2126 2127 { 2127 picOrderCntMsb = slice->getPocMsbCycleVal() * sps->getMaxPicOrderCntLsb(); 2128 picOrderCntMsb = slice->getPocMsbCycleVal() * sps->getMaxPicOrderCntLsb(); 2128 2129 } 2129 2130 else if( !m_firstPicInLayerDecodedFlag[ nuhLayerId ] || … … 2131 2132 { 2132 2133 picOrderCntMsb = 0; // (F 62) 2133 } 2134 } 2134 2135 else 2135 2136 { 2136 2137 Int prevPicOrderCntLsb = m_prevPicOrderCnt & ( sps->getMaxPicOrderCntLsb() - 1 ); 2137 Int prevPicOrderCntMsb = m_prevPicOrderCnt - prevPicOrderCntLsb; 2138 picOrderCntMsb = xGetCurrMsb( slice->getSlicePicOrderCntLsb(), prevPicOrderCntLsb, prevPicOrderCntMsb, sps->getMaxPicOrderCntLsb() ); 2139 } 2140 picOrderCntVal = picOrderCntMsb + slice->getSlicePicOrderCntLsb(); 2141 } 2142 2143 m_pcPic->getSlice(0)->setPOC( picOrderCntVal ); 2144 2138 Int prevPicOrderCntMsb = m_prevPicOrderCnt - prevPicOrderCntLsb; 2139 picOrderCntMsb = xGetCurrMsb( slice->getSlicePicOrderCntLsb(), prevPicOrderCntLsb, prevPicOrderCntMsb, sps->getMaxPicOrderCntLsb() ); 2140 } 2141 picOrderCntVal = picOrderCntMsb + slice->getSlicePicOrderCntLsb(); 2142 } 2143 2144 m_pcPic->getSlice(0)->setPOC( picOrderCntVal ); 2145 2145 2146 for (Int lId = 0; lId < (Int) affectedLayerList.size(); lId++ ) 2146 { 2147 { 2147 2148 // The value of PrevPicOrderCnt[ lId ] for each of the lId values included in affectedLayerList is derived as follows: 2148 2149 2149 2150 if (!m_pcPic->isRasl() && !m_pcPic->isRadl() && !m_pcPic->isSlnr() && slice->getTemporalId() == 0 && !slice->getDiscardableFlag() ) 2150 2151 { 2151 //- If the current picture is not a RASL picture, a RADL picture or a sub-layer non-reference picture, and the current picture 2152 //- If the current picture is not a RASL picture, a RADL picture or a sub-layer non-reference picture, and the current picture 2152 2153 // has TemporalId equal to 0 and discardable_flag equal to 0, PrevPicOrderCnt[ lId ] is set equal to PicOrderCntVal. 2153 m_prevPicOrderCnt = picOrderCntVal; 2154 m_prevPicOrderCnt = picOrderCntVal; 2154 2155 } 2155 2156 else if ( slice->getPocResetIdc() == 3 && ( 2156 ( !m_firstPicInLayerDecodedFlag[ nuhLayerId ]) || 2157 ( m_firstPicInLayerDecodedFlag[ nuhLayerId ] && m_pcPic->getIsPocResettingPic() ) 2157 ( !m_firstPicInLayerDecodedFlag[ nuhLayerId ]) || 2158 ( m_firstPicInLayerDecodedFlag[ nuhLayerId ] && m_pcPic->getIsPocResettingPic() ) 2158 2159 ) ) 2159 2160 { … … 2161 2162 // - FirstPicInLayerDecodedFlag[ nuh_layer_id ] is equal to 0. 2162 2163 // - FirstPicInLayerDecodedFlag[ nuh_layer_id ] is equal to 1 and the current picture is a POC resetting picture. 2163 m_prevPicOrderCnt = ( slice->getFullPocResetFlag() ? 0 : slice->getPocLsbVal() ); 2164 m_prevPicOrderCnt = ( slice->getFullPocResetFlag() ? 0 : slice->getPocLsbVal() ); 2164 2165 } 2165 2166 } … … 2168 2169 Int TDecTop::xGetCurrMsb( Int cl, Int pl, Int pm, Int ml ) 2169 2170 { 2170 Int currMsb; 2171 Int currMsb; 2171 2172 if ((pl - cl) >= (ml/ 2)) 2172 2173 { … … 2175 2176 else if ( (cl - pl) > (ml / 2)) 2176 2177 { 2177 currMsb = pm - ml; 2178 currMsb = pm - ml; 2178 2179 } 2179 2180 else 2180 2181 { 2181 currMsb = pm; 2182 } 2183 2184 return currMsb; 2185 } 2182 currMsb = pm; 2183 } 2184 2185 return currMsb; 2186 } 2186 2187 2187 2188 … … 2193 2194 /////////////////////////////////////////////////////////////////////////////////////// 2194 2195 2195 TComSlice* slice = m_pcPic->getSlice( 0 ); 2196 const TComSPS* sps = slice->getSPS(); 2197 // This process is invoked once per picture, after decoding of a slice header but prior to the decoding of any coding unit and prior 2198 // to the decoding process for reference picture list construction for the slice as specified in clause 8.3.3. 2199 // This process may result in one or more reference pictures in the DPB being marked as "unused for reference" or 2196 TComSlice* slice = m_pcPic->getSlice( 0 ); 2197 const TComSPS* sps = slice->getSPS(); 2198 // This process is invoked once per picture, after decoding of a slice header but prior to the decoding of any coding unit and prior 2199 // to the decoding process for reference picture list construction for the slice as specified in clause 8.3.3. 2200 // This process may result in one or more reference pictures in the DPB being marked as "unused for reference" or 2200 2201 // "used for long-term reference". 2201 2202 2202 2203 // The variable currPicLayerId is set equal to nuh_layer_id of the current picture. 2203 Int currPicLayerId = m_pcPic->getLayerId(); 2204 Int picOrderCntVal = m_pcPic->getPOC(); 2204 Int currPicLayerId = m_pcPic->getLayerId(); 2205 Int picOrderCntVal = m_pcPic->getPOC(); 2205 2206 2206 2207 if (m_pcPic->isIrap() && m_pcPic->getNoRaslOutputFlag() ) 2207 { 2208 // When the current picture is an IRAP picture with NoRaslOutputFlag equal to 1, 2209 // all reference pictures with nuh_layer_id equal to currPicLayerId currently in the 2208 { 2209 // When the current picture is an IRAP picture with NoRaslOutputFlag equal to 1, 2210 // all reference pictures with nuh_layer_id equal to currPicLayerId currently in the 2210 2211 // DPB (if any) are marked as "unused for reference". 2211 m_dpb->markSubDpbAsUnusedForReference( currPicLayerId ); 2212 } 2213 // Short-term reference pictures are identified by their PicOrderCntVal values. Long-term reference pictures are identified either by 2212 m_dpb->markSubDpbAsUnusedForReference( currPicLayerId ); 2213 } 2214 // Short-term reference pictures are identified by their PicOrderCntVal values. Long-term reference pictures are identified either by 2214 2215 // their PicOrderCntVal values or their slice_pic_order_cnt_lsb values. 2215 2216 2216 // Five lists of picture order count values are constructed to derive the RPS. These five lists are PocStCurrBefore, 2217 // PocStCurrAfter, PocStFoll, PocLtCurr and PocLtFoll, with NumPocStCurrBefore, NumPocStCurrAfter, NumPocStFoll, 2217 // Five lists of picture order count values are constructed to derive the RPS. These five lists are PocStCurrBefore, 2218 // PocStCurrAfter, PocStFoll, PocLtCurr and PocLtFoll, with NumPocStCurrBefore, NumPocStCurrAfter, NumPocStFoll, 2218 2219 // NumPocLtCurr and NumPocLtFoll number of elements, respectively. The five lists and the five variables are derived as follows: 2219 2220 TComDecodedRps* decRps = m_pcPic->getDecodedRps(); 2220 2221 TComDecodedRps* decRps = m_pcPic->getDecodedRps(); 2221 2222 2222 2223 std::vector<Int>& pocStCurrBefore = decRps->m_pocStCurrBefore; … … 2226 2227 std::vector<Int>& pocLtFoll = decRps->m_pocLtFoll; 2227 2228 2228 Int& numPocStCurrBefore = decRps->m_numPocStCurrBefore; 2229 Int& numPocStCurrBefore = decRps->m_numPocStCurrBefore; 2229 2230 Int& numPocStCurrAfter = decRps->m_numPocStCurrAfter; 2230 2231 Int& numPocStFoll = decRps->m_numPocStFoll; 2231 2232 Int& numPocLtCurr = decRps->m_numPocLtCurr; 2232 Int& numPocLtFoll = decRps->m_numPocLtFoll; 2233 2234 std::vector<Int> currDeltaPocMsbPresentFlag, follDeltaPocMsbPresentFlag; 2233 Int& numPocLtFoll = decRps->m_numPocLtFoll; 2234 2235 std::vector<Int> currDeltaPocMsbPresentFlag, follDeltaPocMsbPresentFlag; 2235 2236 2236 2237 if (m_pcPic->isIdr() ) 2237 2238 { 2238 // - If the current picture is an IDR picture, PocStCurrBefore, PocStCurrAfter, PocStFoll, 2239 // PocLtCurr and PocLtFoll are all set to be empty, and NumPocStCurrBefore, 2239 // - If the current picture is an IDR picture, PocStCurrBefore, PocStCurrAfter, PocStFoll, 2240 // PocLtCurr and PocLtFoll are all set to be empty, and NumPocStCurrBefore, 2240 2241 // NumPocStCurrAfter, NumPocStFoll, NumPocLtCurr and NumPocLtFoll are all set equal to 0. 2241 2242 … … 2245 2246 pocLtCurr .clear(); 2246 2247 pocLtFoll .clear(); 2247 numPocStCurrBefore = 0; 2248 numPocStCurrAfter = 0; 2249 numPocStFoll = 0; 2250 numPocLtCurr = 0; 2251 numPocLtFoll = 0; 2248 numPocStCurrBefore = 0; 2249 numPocStCurrAfter = 0; 2250 numPocStFoll = 0; 2251 numPocLtCurr = 0; 2252 numPocLtFoll = 0; 2252 2253 } 2253 2254 else … … 2256 2257 // - Otherwise, the following applies: 2257 2258 2258 Int j = 0; 2259 Int k = 0; 2259 Int j = 0; 2260 Int k = 0; 2260 2261 for( Int i = 0; i < stRps->getNumNegativePicsVar() ; i++ ) 2261 2262 { … … 2269 2270 } 2270 2271 } 2271 numPocStCurrBefore = j; 2272 2273 j = 0; 2272 numPocStCurrBefore = j; 2273 2274 j = 0; 2274 2275 for (Int i = 0; i < stRps->getNumPositivePicsVar(); i++ ) 2275 2276 { 2276 2277 if (stRps->getUsedByCurrPicS1Var( i ) ) 2277 2278 { 2278 pocStCurrAfter.push_back( picOrderCntVal + stRps->getDeltaPocS1Var( i ) ); j++; 2279 pocStCurrAfter.push_back( picOrderCntVal + stRps->getDeltaPocS1Var( i ) ); j++; 2279 2280 } 2280 2281 else … … 2287 2288 2288 2289 2289 j = 0; 2290 k = 0; 2290 j = 0; 2291 k = 0; 2291 2292 for( Int i = 0; i < slice->getNumLongTermSps( ) + slice->getNumLongTermPics(); i++ ) 2292 2293 { 2293 Int pocLt = slice->getPocLsbLtVar( i ); 2294 Int pocLt = slice->getPocLsbLtVar( i ); 2294 2295 if( slice->getDeltaPocMsbPresentFlag( i ) ) 2295 2296 { … … 2298 2299 } 2299 2300 2300 if( slice->getUsedByCurrPicLtVar(i)) 2301 if( slice->getUsedByCurrPicLtVar(i)) 2301 2302 { 2302 2303 pocLtCurr.push_back( pocLt ); 2303 currDeltaPocMsbPresentFlag.push_back( slice->getDeltaPocMsbPresentFlag( i ) ); j++; 2304 } 2304 currDeltaPocMsbPresentFlag.push_back( slice->getDeltaPocMsbPresentFlag( i ) ); j++; 2305 } 2305 2306 else 2306 2307 { 2307 2308 pocLtFoll.push_back( pocLt ); 2308 follDeltaPocMsbPresentFlag.push_back( slice->getDeltaPocMsbPresentFlag( i ) ); k++; 2309 follDeltaPocMsbPresentFlag.push_back( slice->getDeltaPocMsbPresentFlag( i ) ); k++; 2309 2310 } 2310 2311 } … … 2315 2316 assert(numPocStCurrAfter == pocStCurrAfter .size() ); 2316 2317 assert(numPocStCurrBefore == pocStCurrBefore .size() ); 2317 assert(numPocStFoll == pocStFoll .size() ); 2318 assert(numPocLtCurr == pocLtCurr .size() ); 2318 assert(numPocStFoll == pocStFoll .size() ); 2319 assert(numPocLtCurr == pocLtCurr .size() ); 2319 2320 assert(numPocLtFoll == pocLtFoll .size() ); 2320 2321 2321 2322 // where PicOrderCntVal is the picture order count of the current picture as specified in clause 8.3.1. 2322 2323 2323 // NOTE 2 - A value of CurrRpsIdx in the range of 0 to num_short_term_ref_pic_sets - 1, inclusive, 2324 // indicates that a candidate short-term RPS from the active SPS for the current layer is being used, 2325 // where CurrRpsIdx is the index of the candidate short-term RPS into the list of candidate short-term RPSs signalled 2326 // in the active SPS for the current layer. CurrRpsIdx equal to num_short_term_ref_pic_sets indicates that 2324 // NOTE 2 - A value of CurrRpsIdx in the range of 0 to num_short_term_ref_pic_sets - 1, inclusive, 2325 // indicates that a candidate short-term RPS from the active SPS for the current layer is being used, 2326 // where CurrRpsIdx is the index of the candidate short-term RPS into the list of candidate short-term RPSs signalled 2327 // in the active SPS for the current layer. CurrRpsIdx equal to num_short_term_ref_pic_sets indicates that 2327 2328 // the short-term RPS of the current picture is directly signalled in the slice header. 2328 2329 2329 2330 for (Int i = 0; i <= numPocLtCurr - 1; i++ ) 2330 2331 { 2331 // For each i in the range of 0 to NumPocLtCurr - 1, inclusive, when CurrDeltaPocMsbPresentFlag[ i ] is equal to 1, 2332 // For each i in the range of 0 to NumPocLtCurr - 1, inclusive, when CurrDeltaPocMsbPresentFlag[ i ] is equal to 1, 2332 2333 // it is a requirement of bitstream conformance that the following conditions apply: 2333 2334 if ( currDeltaPocMsbPresentFlag[i] ) 2334 2335 { 2335 // - There shall be no j in the range of 0 to NumPocStCurrBefore - 1, inclusive, 2336 // - There shall be no j in the range of 0 to NumPocStCurrBefore - 1, inclusive, 2336 2337 // for which PocLtCurr[ i ] is equal to PocStCurrBefore[ j ]. 2337 2338 for (Int j = 0; j <= numPocStCurrBefore - 1; j++ ) … … 2340 2341 } 2341 2342 2342 // - There shall be no j in the range of 0 to NumPocStCurrAfter - 1, inclusive, 2343 // for which PocLtCurr[ i ] is equal to PocStCurrAfter[ j ]. 2343 // - There shall be no j in the range of 0 to NumPocStCurrAfter - 1, inclusive, 2344 // for which PocLtCurr[ i ] is equal to PocStCurrAfter[ j ]. 2344 2345 for (Int j = 0; j <= numPocStCurrAfter - 1; j++ ) 2345 2346 { … … 2347 2348 } 2348 2349 2349 // - There shall be no j in the range of 0 to NumPocStFoll - 1, inclusive, 2350 // - There shall be no j in the range of 0 to NumPocStFoll - 1, inclusive, 2350 2351 // for which PocLtCurr[ i ] is equal to PocStFoll[ j ]. 2351 2352 for (Int j = 0; j <= numPocStFoll - 1; j++ ) … … 2354 2355 } 2355 2356 2356 // - There shall be no j in the range of 0 to NumPocLtCurr - 1, inclusive, 2357 // - There shall be no j in the range of 0 to NumPocLtCurr - 1, inclusive, 2357 2358 // where j is not equal to i, for which PocLtCurr[ i ] is equal to PocLtCurr[ j ]. 2358 2359 for (Int j = 0; j <= numPocLtCurr - 1; j++ ) 2359 2360 { 2360 2361 if ( i != j ) 2361 { 2362 { 2362 2363 assert(!( pocLtCurr[ i ] == pocLtCurr[ j ] ) ); 2363 2364 } … … 2368 2369 for (Int i = 0; i <= numPocLtFoll - 1; i++ ) 2369 2370 { 2370 // For each i in the range of 0 to NumPocLtFoll - 1, inclusive, when FollDeltaPocMsbPresentFlag[ i ] is equal to 1, 2371 // For each i in the range of 0 to NumPocLtFoll - 1, inclusive, when FollDeltaPocMsbPresentFlag[ i ] is equal to 1, 2371 2372 // it is a requirement of bitstream conformance that the following conditions apply: 2372 2373 if ( follDeltaPocMsbPresentFlag[i] ) 2373 2374 { 2374 // - There shall be no j in the range of 0 to NumPocStCurrBefore - 1, inclusive, 2375 // - There shall be no j in the range of 0 to NumPocStCurrBefore - 1, inclusive, 2375 2376 // for which PocLtFoll[ i ] is equal to PocStCurrBefore[ j ]. 2376 2377 for (Int j = 0; j <= numPocStCurrBefore - 1; j++ ) … … 2379 2380 } 2380 2381 2381 // - There shall be no j in the range of 0 to NumPocStCurrAfter - 1, inclusive, 2382 // - There shall be no j in the range of 0 to NumPocStCurrAfter - 1, inclusive, 2382 2383 // for which PocLtFoll[ i ] is equal to PocStCurrAfter[ j ]. 2383 2384 for (Int j = 0; j <= numPocStCurrAfter - 1; j++ ) … … 2386 2387 } 2387 2388 2388 // - There shall be no j in the range of 0 to NumPocStFoll - 1, inclusive, 2389 // - There shall be no j in the range of 0 to NumPocStFoll - 1, inclusive, 2389 2390 // for which PocLtFoll[ i ] is equal to PocStFoll[ j ]. 2390 2391 for (Int j = 0; j <= numPocStFoll - 1; j++ ) … … 2393 2394 } 2394 2395 2395 // - There shall be no j in the range of 0 to NumPocLtFoll - 1, inclusive, 2396 // - There shall be no j in the range of 0 to NumPocLtFoll - 1, inclusive, 2396 2397 // where j is not equal to i, for which PocLtFoll[ i ] is equal to PocLtFoll[ j ]. 2397 2398 for (Int j = 0; j <= numPocLtFoll - 1; j++ ) … … 2403 2404 } 2404 2405 2405 // - There shall be no j in the range of 0 to NumPocLtCurr - 1, inclusive, 2406 // - There shall be no j in the range of 0 to NumPocLtCurr - 1, inclusive, 2406 2407 // for which PocLtFoll[ i ] is equal to PocLtCurr[ j ]. 2407 2408 for (Int j = 0; j <= numPocLtCurr - 1; j++ ) … … 2412 2413 } 2413 2414 2414 Int maxPicOrderCntLsb = sps->getMaxPicOrderCntLsb(); 2415 Int maxPicOrderCntLsb = sps->getMaxPicOrderCntLsb(); 2415 2416 for (Int i = 0; i <= numPocLtCurr - 1; i++ ) 2416 2417 { 2417 // For each i in the range of 0 to NumPocLtCurr - 1, inclusive, when CurrDeltaPocMsbPresentFlag[ i ] is equal to 0, 2418 // For each i in the range of 0 to NumPocLtCurr - 1, inclusive, when CurrDeltaPocMsbPresentFlag[ i ] is equal to 0, 2418 2419 // it is a requirement of bitstream conformance that the following conditions apply: 2419 2420 if ( currDeltaPocMsbPresentFlag[ i ] == 0 ) 2420 2421 { 2421 // - There shall be no j in the range of 0 to NumPocStCurrBefore - 1, inclusive, 2422 // - There shall be no j in the range of 0 to NumPocStCurrBefore - 1, inclusive, 2422 2423 // for which PocLtCurr[ i ] is equal to ( PocStCurrBefore[ j ] & ( MaxPicOrderCntLsb - 1 ) ). 2423 2424 for (Int j = 0; j <= numPocStCurrBefore - 1; j++ ) … … 2454 2455 for (Int i = 0; i <= numPocLtFoll - 1; i++ ) 2455 2456 { 2456 // For each i in the range of 0 to NumPocLtFoll - 1, inclusive, when FollDeltaPocMsbPresentFlag[ i ] is equal to 0, 2457 // For each i in the range of 0 to NumPocLtFoll - 1, inclusive, when FollDeltaPocMsbPresentFlag[ i ] is equal to 0, 2457 2458 // it is a requirement of bitstream conformance that the following conditions apply: 2458 2459 if ( follDeltaPocMsbPresentFlag[ i ] == 0 ) … … 2486 2487 { 2487 2488 assert(!( pocLtFoll[ i ] == ( pocLtFoll[ j ] & ( maxPicOrderCntLsb - 1 ) ) ) ); 2488 } 2489 } 2489 2490 } 2490 2491 … … 2499 2500 2500 2501 if ( !annexFModifications ) 2501 { 2502 // The variable NumPicTotalCurr is derived as specified in clause 7.4.7.2. 2502 { 2503 // The variable NumPicTotalCurr is derived as specified in clause 7.4.7.2. 2503 2504 2504 2505 // It is a requirement of bitstream conformance that the following applies to the value of NumPicTotalCurr: … … 2506 2507 { 2507 2508 // - If the current picture is a BLA or CRA picture, the value of NumPicTotalCurr shall be equal to 0. 2508 assert( slice->getNumPicTotalCurr() == 0 ); 2509 assert( slice->getNumPicTotalCurr() == 0 ); 2509 2510 } 2510 2511 else 2511 2512 { 2512 // - Otherwise, 2513 // - Otherwise, 2513 2514 if ( slice->isInterP() || slice->isInterB() ) 2514 2515 { 2515 2516 // when the current picture contains a P or B slice, the value of NumPicTotalCurr shall not be equal to 0. 2516 assert( slice->getNumPicTotalCurr() != 0 ); 2517 } 2518 } 2519 } 2520 2521 // The RPS of the current picture consists of five RPS lists; RefPicSetStCurrBefore, RefPicSetStCurrAfter, RefPicSetStFoll, 2522 // RefPicSetLtCurr and RefPicSetLtFoll. RefPicSetStCurrBefore, RefPicSetStCurrAfter and RefPicSetStFoll are collectively 2517 assert( slice->getNumPicTotalCurr() != 0 ); 2518 } 2519 } 2520 } 2521 2522 // The RPS of the current picture consists of five RPS lists; RefPicSetStCurrBefore, RefPicSetStCurrAfter, RefPicSetStFoll, 2523 // RefPicSetLtCurr and RefPicSetLtFoll. RefPicSetStCurrBefore, RefPicSetStCurrAfter and RefPicSetStFoll are collectively 2523 2524 // referred to as the short-term RPS. RefPicSetLtCurr and RefPicSetLtFoll are collectively referred to as the long-term RPS. 2524 2525 … … 2528 2529 std::vector<TComPic*>& refPicSetLtCurr = decRps->m_refPicSetLtCurr ; 2529 2530 std::vector<TComPic*>& refPicSetLtFoll = decRps->m_refPicSetLtFoll ; 2530 2531 2531 2532 std::vector<TComPic*>** refPicSetsCurr = decRps->m_refPicSetsCurr ; 2532 2533 std::vector<TComPic*>** refPicSetsLt = decRps->m_refPicSetsLt ; 2533 2534 std::vector<TComPic*>** refPicSetsAll = decRps->m_refPicSetsAll ; 2534 // NOTE 3 - RefPicSetStCurrBefore, RefPicSetStCurrAfter and RefPicSetLtCurr contain all reference pictures that may be 2535 // NOTE 3 - RefPicSetStCurrBefore, RefPicSetStCurrAfter and RefPicSetLtCurr contain all reference pictures that may be 2535 2536 // used for inter prediction of the current picture and one or more pictures that follow the current picture in decoding order. 2536 // RefPicSetStFoll and RefPicSetLtFoll consist of all reference pictures that are not used for inter prediction of the current 2537 // RefPicSetStFoll and RefPicSetLtFoll consist of all reference pictures that are not used for inter prediction of the current 2537 2538 // picture but may be used in inter prediction for one or more pictures that follow the current picture in decoding order. 2538 2539 … … 2540 2541 // 1. The following applies: 2541 2542 2542 TComSubDpb* dpb = m_dpb->getSubDpb( getLayerId(), false ); 2543 TComSubDpb* dpb = m_dpb->getSubDpb( getLayerId(), false ); 2543 2544 assert( refPicSetLtCurr.empty() ); 2544 for( Int i = 0; i < numPocLtCurr; i++ ) 2545 { 2546 if( !currDeltaPocMsbPresentFlag[ i ] ) 2547 { 2548 refPicSetLtCurr.push_back( dpb->getPicFromLsb( pocLtCurr[ i ], maxPicOrderCntLsb ) ); 2545 for( Int i = 0; i < numPocLtCurr; i++ ) 2546 { 2547 if( !currDeltaPocMsbPresentFlag[ i ] ) 2548 { 2549 refPicSetLtCurr.push_back( dpb->getPicFromLsb( pocLtCurr[ i ], maxPicOrderCntLsb ) ); 2549 2550 } 2550 2551 else 2551 2552 { 2552 refPicSetLtCurr.push_back(dpb->getPic( pocLtCurr[ i ] )); 2553 } 2553 refPicSetLtCurr.push_back(dpb->getPic( pocLtCurr[ i ] )); 2554 } 2554 2555 } 2555 2556 … … 2563 2564 else 2564 2565 { 2565 refPicSetLtFoll.push_back(dpb->getPic( pocLtFoll[ i ] )); 2566 refPicSetLtFoll.push_back(dpb->getPic( pocLtFoll[ i ] )); 2566 2567 } 2567 2568 } 2568 2569 // 2. All reference pictures that are included in RefPicSetLtCurr or RefPicSetLtFoll and have nuh_layer_id equal 2569 2570 // 2. All reference pictures that are included in RefPicSetLtCurr or RefPicSetLtFoll and have nuh_layer_id equal 2570 2571 // to currPicLayerId are marked as "used for long-term reference". 2571 2572 for (Int i = 0; i < numPocLtCurr; i++) … … 2573 2574 if ( refPicSetLtCurr[i] != NULL ) 2574 2575 { 2575 refPicSetLtCurr[i]->markAsUsedForLongTermReference(); 2576 } 2576 refPicSetLtCurr[i]->markAsUsedForLongTermReference(); 2577 } 2577 2578 } 2578 2579 … … 2581 2582 if ( refPicSetLtFoll[i] != NULL ) 2582 2583 { 2583 refPicSetLtFoll[i]->markAsUsedForLongTermReference(); 2584 } 2584 refPicSetLtFoll[i]->markAsUsedForLongTermReference(); 2585 } 2585 2586 } 2586 2587 … … 2589 2590 for( Int i = 0; i < numPocStCurrBefore; i++ ) 2590 2591 { 2591 refPicSetStCurrBefore.push_back(dpb->getShortTermRefPic( pocStCurrBefore[ i ] )); 2592 refPicSetStCurrBefore.push_back(dpb->getShortTermRefPic( pocStCurrBefore[ i ] )); 2592 2593 } 2593 2594 … … 2595 2596 for( Int i = 0; i < numPocStCurrAfter; i++ ) 2596 2597 { 2597 refPicSetStCurrAfter.push_back(dpb->getShortTermRefPic( pocStCurrAfter[ i ] )); 2598 refPicSetStCurrAfter.push_back(dpb->getShortTermRefPic( pocStCurrAfter[ i ] )); 2598 2599 } 2599 2600 … … 2601 2602 for( Int i = 0; i < numPocStFoll; i++ ) 2602 2603 { 2603 refPicSetStFoll.push_back(dpb->getShortTermRefPic( pocStFoll[ i ] )); 2604 } 2605 2606 // 4. All reference pictures in the DPB that are not included in RefPicSetLtCurr, RefPicSetLtFoll, RefPicSetStCurrBefore, 2604 refPicSetStFoll.push_back(dpb->getShortTermRefPic( pocStFoll[ i ] )); 2605 } 2606 2607 // 4. All reference pictures in the DPB that are not included in RefPicSetLtCurr, RefPicSetLtFoll, RefPicSetStCurrBefore, 2607 2608 // RefPicSetStCurrAfter, or RefPicSetStFoll and have nuh_layer_id equal to currPicLayerId are marked as "unused for reference". 2608 TComSubDpb picsToMark = (*dpb); 2609 TComSubDpb picsToMark = (*dpb); 2609 2610 for (Int j = 0; j < 5; j++ ) 2610 2611 { 2611 picsToMark.removePics( *refPicSetsAll[j] ); 2612 } 2613 picsToMark.markAllAsUnusedForReference(); 2614 2615 // NOTE 4 - There may be one or more entries in the RPS lists that are equal to "no reference picture" because 2616 // the corresponding pictures are not present in the DPB. Entries in RefPicSetStFoll or RefPicSetLtFoll that are equal 2617 // to "no reference picture" should be ignored. An unintentional picture loss should be inferred for each entry in 2612 picsToMark.removePics( *refPicSetsAll[j] ); 2613 } 2614 picsToMark.markAllAsUnusedForReference(); 2615 2616 // NOTE 4 - There may be one or more entries in the RPS lists that are equal to "no reference picture" because 2617 // the corresponding pictures are not present in the DPB. Entries in RefPicSetStFoll or RefPicSetLtFoll that are equal 2618 // to "no reference picture" should be ignored. An unintentional picture loss should be inferred for each entry in 2618 2619 // RefPicSetStCurrBefore, RefPicSetStCurrAfter, or RefPicSetLtCurr that is equal to "no reference picture". 2619 2620 2620 2621 // NOTE 5 - A picture cannot be included in more than one of the five RPS lists. 2621 2622 2622 2623 2623 2624 // It is a requirement of bitstream conformance that the RPS is restricted as follows: 2624 2625 … … 2626 2627 #if NH_MV_FIX_NO_REF_PICS_CHECK 2627 2628 if ( !annexFModifications || m_firstPicInLayerDecodedFlag[ m_pcPic->getLayerId() ] ) 2628 { 2629 { 2629 2630 #endif 2630 2631 for (Int j = 0; j < 3; j++ ) 2631 2632 { 2632 // - There shall be no entry in RefPicSetStCurrBefore, RefPicSetStCurrAfter or RefPicSetLtCurr 2633 // - There shall be no entry in RefPicSetStCurrBefore, RefPicSetStCurrAfter or RefPicSetLtCurr 2633 2634 // for which one or more of the following are true: 2634 2635 2635 std::vector<TComPic*>* currSet = refPicSetsCurr[j]; 2636 std::vector<TComPic*>* currSet = refPicSetsCurr[j]; 2636 2637 for (Int i = 0; i < currSet->size(); i++) 2637 2638 { 2638 TComPic* pic = (*currSet)[i]; 2639 TComPic* pic = (*currSet)[i]; 2639 2640 2640 2641 // - The entry is equal to "no reference picture". 2641 assert( ! (pic == NULL ) ); 2642 assert( ! (pic == NULL ) ); 2642 2643 2643 2644 // - The entry is an SLNR picture and has TemporalId equal to that of the current picture. 2644 assert( !( pic->isSlnr() && pic->getTemporalId() == m_pcPic->getTemporalId() ) ); 2645 assert( !( pic->isSlnr() && pic->getTemporalId() == m_pcPic->getTemporalId() ) ); 2645 2646 2646 2647 // - The entry is a picture that has TemporalId greater than that of the current picture. 2647 assert( !( pic->getTemporalId() > m_pcPic->getTemporalId() ) ); 2648 } 2648 assert( !( pic->getTemporalId() > m_pcPic->getTemporalId() ) ); 2649 } 2649 2650 } 2650 2651 #if NH_MV_FIX_NO_REF_PICS_CHECK 2651 2652 } 2652 2653 #endif 2653 2654 // - There shall be no entry in RefPicSetLtCurr or RefPicSetLtFoll for which the 2655 // difference between the picture order count value of the current picture and the picture order count 2654 2655 // - There shall be no entry in RefPicSetLtCurr or RefPicSetLtFoll for which the 2656 // difference between the picture order count value of the current picture and the picture order count 2656 2657 // value of the entry is greater than or equal to 2^24. 2657 2658 for (Int j = 0; j < 2; j++ ) 2658 { 2659 std::vector<TComPic*>* ltSet = refPicSetsLt[j]; 2659 { 2660 std::vector<TComPic*>* ltSet = refPicSetsLt[j]; 2660 2661 for (Int i = 0; i < ltSet->size(); i++) 2661 2662 { 2662 TComPic* pic = (*ltSet)[i]; 2663 TComPic* pic = (*ltSet)[i]; 2663 2664 if( pic != NULL ) 2664 2665 { 2665 assert(!( abs( m_pcPic->getPOC() - pic->getPOC() ) >= (1 << 24) )); 2666 } 2667 } 2668 } 2669 2670 // - When the current picture is a temporal sub-layer access (TSA) picture, there shall be no picture 2666 assert(!( abs( m_pcPic->getPOC() - pic->getPOC() ) >= (1 << 24) )); 2667 } 2668 } 2669 } 2670 2671 // - When the current picture is a temporal sub-layer access (TSA) picture, there shall be no picture 2671 2672 // included in the RPS with TemporalId greater than or equal to the TemporalId of the current picture. 2672 2673 if (m_pcPic->isTsa() ) 2673 2674 { 2674 2675 for (Int j = 0; j < 5; j++ ) 2675 { 2676 std::vector<TComPic*>* aSet = refPicSetsAll[j]; 2676 { 2677 std::vector<TComPic*>* aSet = refPicSetsAll[j]; 2677 2678 for (Int i = 0; i < aSet->size(); i++) 2678 2679 { 2679 TComPic* pic = (*aSet)[i]; 2680 TComPic* pic = (*aSet)[i]; 2680 2681 if( pic != NULL ) 2681 2682 { 2682 assert( ! (pic->getTemporalId() >= m_pcPic->getTemporalId() ) ); 2683 assert( ! (pic->getTemporalId() >= m_pcPic->getTemporalId() ) ); 2683 2684 } 2684 2685 } … … 2686 2687 } 2687 2688 2688 // - When the current picture is a step-wise temporal sub-layer access (STSA) picture, 2689 // - When the current picture is a step-wise temporal sub-layer access (STSA) picture, 2689 2690 // there shall be no picture included in RefPicSetStCurrBefore, RefPicSetStCurrAfter or RefPicSetLtCurr that has 2690 2691 // TemporalId equal to that of the current picture. … … 2692 2693 { 2693 2694 for (Int j = 0; j < 3; j++ ) 2694 { 2695 std::vector<TComPic*>* cSet = refPicSetsCurr[j]; 2695 { 2696 std::vector<TComPic*>* cSet = refPicSetsCurr[j]; 2696 2697 for (Int i = 0; i < cSet->size(); i++) 2697 2698 { 2698 TComPic* pic = (*cSet)[i]; 2699 TComPic* pic = (*cSet)[i]; 2699 2700 if( pic != NULL ) 2700 2701 { 2701 assert( ! (pic->getTemporalId() == m_pcPic->getTemporalId() ) ); 2702 assert( ! (pic->getTemporalId() == m_pcPic->getTemporalId() ) ); 2702 2703 } 2703 2704 } … … 2712 2713 { 2713 2714 for (Int j = 0; j < 3; j++ ) 2714 { 2715 std::vector<TComPic*>* cSet = refPicSetsCurr[j]; 2715 { 2716 std::vector<TComPic*>* cSet = refPicSetsCurr[j]; 2716 2717 for (Int i = 0; i < cSet->size(); i++) 2717 2718 { 2718 TComPic* pic = (*cSet)[i]; 2719 TComPic* pic = (*cSet)[i]; 2719 2720 if( pic != NULL ) 2720 2721 { 2721 assert( ! (pic->getTemporalId() == m_pcPic->getTemporalId() && pic->getDecodingOrder() < m_prevStsaDecOrder ) ); 2722 assert( ! (pic->getTemporalId() == m_pcPic->getTemporalId() && pic->getDecodingOrder() < m_prevStsaDecOrder ) ); 2722 2723 } 2723 2724 } 2724 2725 } 2725 2726 } 2726 2727 2727 2728 // - When the current picture is a CRA picture, there shall be no picture included in the RPS that 2728 2729 // precedes, in output order or decoding order, any preceding IRAP picture in decoding order (when present). … … 2730 2731 { 2731 2732 for (Int j = 0; j < 5; j++ ) 2732 { 2733 std::vector<TComPic*>* aSet = refPicSetsAll[j]; 2733 { 2734 std::vector<TComPic*>* aSet = refPicSetsAll[j]; 2734 2735 for (Int i = 0; i < aSet->size(); i++) 2735 2736 { 2736 2737 // TBD check whether it sufficient to test only the last IRAP 2737 TComPic* pic = (*aSet)[i]; 2738 TComPic* pic = (*aSet)[i]; 2738 2739 if( pic != NULL ) 2739 { 2740 assert( ! (pic->getPOC() < m_prevIrapPoc ) ); 2741 assert( ! (pic->getDecodingOrder() < m_prevIrapDecodingOrder ) ); 2740 { 2741 assert( ! (pic->getPOC() < m_prevIrapPoc ) ); 2742 assert( ! (pic->getDecodingOrder() < m_prevIrapDecodingOrder ) ); 2742 2743 } 2743 2744 } 2744 2745 } 2745 2746 } 2746 2747 2747 2748 Bool isTrailingPicture = ( !m_pcPic->isIrap() ) && ( m_pcPic->getPOC() > m_prevIrapPoc ); 2748 2749 // - When the current picture is a trailing picture, there shall be no picture in RefPicSetStCurrBefore, … … 2752 2753 { 2753 2754 for (Int j = 0; j < 3; j++ ) 2754 { 2755 std::vector<TComPic*>* cSet = refPicSetsCurr[j]; 2755 { 2756 std::vector<TComPic*>* cSet = refPicSetsCurr[j]; 2756 2757 for (Int i = 0; i < cSet->size(); i++) 2757 2758 { 2758 TComPic* pic = (*cSet)[i]; 2759 TComPic* pic = (*cSet)[i]; 2759 2760 if( pic != NULL ) 2760 2761 { 2761 assert( ! (pic->getIsGeneratedCl833() ) ); 2762 assert( ! (pic->getIsGeneratedCl833() ) ); 2762 2763 } 2763 2764 } … … 2770 2771 { 2771 2772 for (Int j = 0; j < 5; j++ ) 2772 { 2773 std::vector<TComPic*>* aSet = refPicSetsAll[j]; 2773 { 2774 std::vector<TComPic*>* aSet = refPicSetsAll[j]; 2774 2775 for (Int i = 0; i < aSet->size(); i++) 2775 2776 { 2776 2777 // TBD check whether it sufficient to test only the last IRAP 2777 TComPic* pic = (*aSet)[i]; 2778 TComPic* pic = (*aSet)[i]; 2778 2779 if( pic != NULL ) 2779 { 2780 assert( ! (pic->getPOC() < m_prevIrapPoc ) ); 2781 assert( ! (pic->getDecodingOrder() < m_prevIrapDecodingOrder ) ); 2780 { 2781 assert( ! (pic->getPOC() < m_prevIrapPoc ) ); 2782 assert( ! (pic->getDecodingOrder() < m_prevIrapDecodingOrder ) ); 2782 2783 } 2783 2784 } … … 2790 2791 { 2791 2792 for (Int j = 0; j < 3; j++ ) 2792 { 2793 std::vector<TComPic*>* cSet = refPicSetsCurr[j]; 2793 { 2794 std::vector<TComPic*>* cSet = refPicSetsCurr[j]; 2794 2795 for (Int i = 0; i < cSet->size(); i++) 2795 { 2796 TComPic* pic = (*cSet)[i]; 2796 { 2797 TComPic* pic = (*cSet)[i]; 2797 2798 if( pic != NULL ) 2798 { 2799 { 2799 2800 // - A RASL picture 2800 assert( ! (pic->isRasl() ) ); 2801 // - A picture that was generated by the decoding process for generating unavailable reference pictures 2801 assert( ! (pic->isRasl() ) ); 2802 // - A picture that was generated by the decoding process for generating unavailable reference pictures 2802 2803 // as specified in clause 8.3.3 2803 assert( ! (pic->getIsGeneratedCl833() ) ); 2804 assert( ! (pic->getIsGeneratedCl833() ) ); 2804 2805 // - A picture that precedes the associated IRAP picture in decoding order 2805 assert( ! (pic->getDecodingOrder() < m_prevIrapDecodingOrder ) ); 2806 assert( ! (pic->getDecodingOrder() < m_prevIrapDecodingOrder ) ); 2806 2807 } 2807 2808 } 2808 2809 } 2809 2810 } 2810 2811 2811 2812 2812 2813 if ( sps->getTemporalIdNestingFlag() ) 2813 2814 { 2814 2815 // - When sps_temporal_id_nesting_flag is equal to 1, the following applies: 2815 2816 // - Let tIdA be the value of TemporalId of the current picture picA. 2816 TComPic* picA = m_pcPic; 2817 TComPic* picA = m_pcPic; 2817 2818 Int tIdA = picA->getTemporalId(); 2818 // - Any picture picB with TemporalId equal to tIdB that is less than or equal to tIdA shall not be included in 2819 // RefPicSetStCurrBefore, RefPicSetStCurrAfter or RefPicSetLtCurr of picA when there exists a picture picC that 2819 // - Any picture picB with TemporalId equal to tIdB that is less than or equal to tIdA shall not be included in 2820 // RefPicSetStCurrBefore, RefPicSetStCurrAfter or RefPicSetLtCurr of picA when there exists a picture picC that 2820 2821 // has TemporalId less than tIdB, follows picB in decoding order, and precedes picA in decoding order. 2821 2822 for (Int j = 0; j < 3; j++ ) 2822 { 2823 std::vector<TComPic*>* cSet = refPicSetsCurr[j]; 2823 { 2824 std::vector<TComPic*>* cSet = refPicSetsCurr[j]; 2824 2825 for (Int i = 0; i < cSet->size(); i++) 2825 2826 { 2826 TComPic* picB = (*cSet)[i]; 2827 TComPic* picB = (*cSet)[i]; 2827 2828 if( picB != NULL ) 2828 2829 { 2829 Int tIdB = picB->getTemporalId(); 2830 Int tIdB = picB->getTemporalId(); 2830 2831 2831 2832 if (tIdB <= tIdA) … … 2833 2834 for ( TComSubDpb::iterator itP = dpb->begin(); itP != dpb->end(); itP++ ) 2834 2835 { 2835 TComPic* picC = (*itP); 2836 assert(! ( picC->getTemporalId() < tIdB && picC->getDecodingOrder() > picB->getDecodingOrder() && picC->getDecodingOrder() < picA->getDecodingOrder() ) ); 2836 TComPic* picC = (*itP); 2837 assert(! ( picC->getTemporalId() < tIdB && picC->getDecodingOrder() > picB->getDecodingOrder() && picC->getDecodingOrder() < picA->getDecodingOrder() ) ); 2837 2838 } 2838 2839 } … … 2840 2841 } 2841 2842 } 2842 } 2843 } 2843 2844 } 2844 2845 … … 2851 2852 2852 2853 // The specifications in clause 8.3.2 apply with the following changes: 2853 // - The references to clauses 7.4.7.2, 8.3.1, 8.3.3 and 8.3.4 are replaced with references to 2854 // - The references to clauses 7.4.7.2, 8.3.1, 8.3.3 and 8.3.4 are replaced with references to 2854 2855 // clauses F.7.4.7.2, F.8.3.1, F.8.3.3 and F.8.3.4, respectively. 2855 2856 2856 x832DecProcForRefPicSet( true ); 2857 x832DecProcForRefPicSet( true ); 2857 2858 2858 2859 // - The following specifications are added: 2859 2860 if (m_pcPic->isIrap() && m_pcPic->getLayerId() == m_smallestLayerId ) 2860 2861 { 2861 // - When the current picture is an IRAP picture with nuh_layer_id equal to SmallestLayerId, 2862 // all reference pictures with any value of nuh_layer_id currently in the DPB (if any) are marked 2862 // - When the current picture is an IRAP picture with nuh_layer_id equal to SmallestLayerId, 2863 // all reference pictures with any value of nuh_layer_id currently in the DPB (if any) are marked 2863 2864 // as "unused for reference" when at least one of the following conditions is true: 2864 2865 … … 2872 2873 2873 2874 // - It is a requirement of bitstream conformance that the RPS is restricted as follows: 2874 // - When the current picture is a CRA picture, there shall be no picture in RefPicSetStCurrBefore, RefPicSetStCurrAfter 2875 // - When the current picture is a CRA picture, there shall be no picture in RefPicSetStCurrBefore, RefPicSetStCurrAfter 2875 2876 // or RefPicSetLtCurr. 2876 2877 … … 2879 2880 if ( m_pcPic->isCra() ) 2880 2881 { 2881 for (Int j = 0; j < 3; j++ ) 2882 { 2883 std::vector<TComPic*>* cSet = refPicSetsCurr[j]; 2884 assert ( cSet->size() == 0 ); 2882 for (Int j = 0; j < 3; j++ ) 2883 { 2884 std::vector<TComPic*>* cSet = refPicSetsCurr[j]; 2885 assert ( cSet->size() == 0 ); 2885 2886 } 2886 2887 } … … 2888 2889 // - The constraints specified in clause 8.3.2 on the value of NumPicTotalCurr are replaced with the following: 2889 2890 // - It is a requirement of bitstream conformance that the following applies to the value of NumPicTotalCurr: 2890 Int numPicTotalCurr = m_pcPic->getSlice(0)->getNumPicTotalCurr(); 2891 Int currPicLayerId = m_pcPic->getLayerId(); 2892 const TComVPS* vps = m_pcPic->getSlice(0)->getVPS(); 2891 Int numPicTotalCurr = m_pcPic->getSlice(0)->getNumPicTotalCurr(); 2892 Int currPicLayerId = m_pcPic->getLayerId(); 2893 const TComVPS* vps = m_pcPic->getSlice(0)->getVPS(); 2893 2894 2894 2895 if ( ( m_pcPic->isBla() || m_pcPic->isCra() ) && ( (currPicLayerId == 0 ) || ( vps->getNumDirectRefLayers( currPicLayerId ) == 0 ) ) ) 2895 { 2896 assert( numPicTotalCurr == 0 ); 2897 // - If the current picture is a BLA or CRA picture and either currPicLayerId is equal to 0 or 2896 { 2897 assert( numPicTotalCurr == 0 ); 2898 // - If the current picture is a BLA or CRA picture and either currPicLayerId is equal to 0 or 2898 2899 // NumDirectRefLayers[ currPicLayerId ] is equal to 0, the value of NumPicTotalCurr shall be equal to 0. 2899 2900 } … … 2904 2905 { 2905 2906 // - Otherwise, when the current picture contains a P or B slice, the value of NumPicTotalCurr shall not be equal to 0. 2906 assert( numPicTotalCurr != 0 ); 2907 assert( numPicTotalCurr != 0 ); 2907 2908 } 2908 2909 } … … 2916 2917 //////////////////////////////////////////////////////////////////// 2917 2918 2918 // Outputs of this process are updated lists of inter-layer reference pictures RefPicSetInterLayer0 and RefPicSetInterLayer1 2919 // Outputs of this process are updated lists of inter-layer reference pictures RefPicSetInterLayer0 and RefPicSetInterLayer1 2919 2920 // and the variables NumActiveRefLayerPics0 and NumActiveRefLayerPics1. 2920 2921 2921 TComDecodedRps* decRps = m_pcPic->getDecodedRps(); 2922 TComSlice* slice = m_pcPic->getSlice( 0 ); 2923 const TComVPS* vps = slice->getVPS(); 2922 TComDecodedRps* decRps = m_pcPic->getDecodedRps(); 2923 TComSlice* slice = m_pcPic->getSlice( 0 ); 2924 const TComVPS* vps = slice->getVPS(); 2924 2925 2925 2926 Int& numActiveRefLayerPics0 = decRps->m_numActiveRefLayerPics0; … … 2927 2928 2928 2929 std::vector<TComPic*>& refPicSetInterLayer0 = decRps->m_refPicSetInterLayer0; 2929 std::vector<TComPic*>& refPicSetInterLayer1 = decRps->m_refPicSetInterLayer1; 2930 std::vector<TComPic*>& refPicSetInterLayer1 = decRps->m_refPicSetInterLayer1; 2930 2931 2931 2932 // The variable currLayerId is set equal to nuh_layer_id of the current picture. 2932 Int currLayerId = getLayerId(); 2933 2934 // The lists RefPicSetInterLayer0 and RefPicSetInterLayer1 are first emptied, NumActiveRefLayerPics0 and NumActiveRefLayerPics1 2933 Int currLayerId = getLayerId(); 2934 2935 // The lists RefPicSetInterLayer0 and RefPicSetInterLayer1 are first emptied, NumActiveRefLayerPics0 and NumActiveRefLayerPics1 2935 2936 // are set equal to 0 and the following applies: 2936 2937 2937 refPicSetInterLayer0.clear(); 2938 refPicSetInterLayer1.clear(); 2939 2940 numActiveRefLayerPics0 = 0; 2941 numActiveRefLayerPics1 = 0; 2942 2943 Int viewIdCurrLayerId = vps->getViewId( currLayerId ); 2938 refPicSetInterLayer0.clear(); 2939 refPicSetInterLayer1.clear(); 2940 2941 numActiveRefLayerPics0 = 0; 2942 numActiveRefLayerPics1 = 0; 2943 2944 Int viewIdCurrLayerId = vps->getViewId( currLayerId ); 2944 2945 Int viewId0 = vps->getViewId( 0 ); 2945 2946 2946 for( Int i = 0; i < slice->getNumActiveRefLayerPics(); i++ ) 2947 { 2948 Int viewIdRefPicLayerIdi = vps->getViewId( slice->getRefPicLayerId( i ) ); 2947 for( Int i = 0; i < slice->getNumActiveRefLayerPics(); i++ ) 2948 { 2949 Int viewIdRefPicLayerIdi = vps->getViewId( slice->getRefPicLayerId( i ) ); 2949 2950 2950 2951 Bool refPicSet0Flag = … … 2956 2957 { 2957 2958 // there is a picture picX in the DPB that is in the same access unit as the current picture and has 2958 // nuh_layer_id equal to RefPicLayerId[ i ] 2959 // nuh_layer_id equal to RefPicLayerId[ i ] 2959 2960 2960 2961 if ( refPicSet0Flag ) … … 2972 2973 assert( ! picX->getSlice(0)->getDiscardableFlag() ); 2973 2974 2974 // If the current picture is a RADL picture, there shall be no entry in RefPicSetInterLayer0 or RefPicSetInterLayer1 2975 // If the current picture is a RADL picture, there shall be no entry in RefPicSetInterLayer0 or RefPicSetInterLayer1 2975 2976 // that is a RASL picture. 2976 2977 if ( m_pcPic->isRadl() ) … … 3004 3005 /////////////////////////////////////////////////////////////////////////////////////// 3005 3006 3006 // This process is invoked once per coded picture when the current picture is a 3007 // This process is invoked once per coded picture when the current picture is a 3007 3008 // BLA picture or is a CRA picture with NoRaslOutputFlag equal to 1. 3008 3009 3009 3010 assert( m_pcPic->isBla() || (m_pcPic->isCra() && m_pcPic->getNoRaslOutputFlag() ) ); 3010 TComDecodedRps* decRps = m_pcPic->getDecodedRps(); 3011 TComDecodedRps* decRps = m_pcPic->getDecodedRps(); 3011 3012 3012 3013 std::vector<TComPic*>& refPicSetStFoll = decRps->m_refPicSetStFoll; 3013 std::vector<TComPic*>& refPicSetLtFoll = decRps->m_refPicSetLtFoll; 3014 std::vector<TComPic*>& refPicSetLtFoll = decRps->m_refPicSetLtFoll; 3014 3015 3015 3016 const std::vector<Int>& pocStFoll = decRps->m_pocStFoll; … … 3017 3018 3018 3019 const Int numPocStFoll = decRps->m_numPocStFoll; 3019 const Int numPocLtFoll = decRps->m_numPocLtFoll; 3020 const Int numPocLtFoll = decRps->m_numPocLtFoll; 3020 3021 3021 3022 // When this process is invoked, the following applies: … … 3024 3025 if ( refPicSetStFoll[ i ] == NULL ) 3025 3026 { 3026 //- For each RefPicSetStFoll[ i ], with i in the range of 0 to NumPocStFoll - 1, inclusive, that is equal 3027 //- For each RefPicSetStFoll[ i ], with i in the range of 0 to NumPocStFoll - 1, inclusive, that is equal 3027 3028 // to "no reference picture", a picture is generated as specified in clause 8.3.3.2, and the following applies: 3028 TComPic* genPic = x8332GenOfOneUnavailPic( true ); 3029 TComPic* genPic = x8332GenOfOneUnavailPic( true ); 3029 3030 3030 3031 // - The value of PicOrderCntVal for the generated picture is set equal to PocStFoll[ i ]. 3031 3032 genPic->getSlice(0)->setPOC( pocStFoll[ i ] ); 3032 3033 3033 //- The value of PicOutputFlag for the generated picture is set equal to 0. 3034 genPic->setPicOutputFlag( false ); 3034 //- The value of PicOutputFlag for the generated picture is set equal to 0. 3035 genPic->setPicOutputFlag( false ); 3035 3036 3036 3037 // - The generated picture is marked as "used for short-term reference". … … 3041 3042 3042 3043 // - The value of nuh_layer_id for the generated picture is set equal to nuh_layer_id of the current picture. 3043 genPic->setLayerId( m_pcPic-> getLayerId() ); 3044 genPic->setLayerId( m_pcPic-> getLayerId() ); 3044 3045 3045 3046 // Insert to DPB 3046 m_dpb->addNewPic( genPic ); 3047 m_dpb->addNewPic( genPic ); 3047 3048 } 3048 3049 } … … 3052 3053 if ( refPicSetLtFoll[ i ] == NULL ) 3053 3054 { 3054 //- For each RefPicSetLtFoll[ i ], with i in the range of 0 to NumPocLtFoll - 1, inclusive, that is equal to 3055 //- For each RefPicSetLtFoll[ i ], with i in the range of 0 to NumPocLtFoll - 1, inclusive, that is equal to 3055 3056 // "no reference picture", a picture is generated as specified in clause 8.3.3.2, and the following applies: 3056 TComPic* genPic = x8332GenOfOneUnavailPic( true ); 3057 TComPic* genPic = x8332GenOfOneUnavailPic( true ); 3057 3058 3058 3059 //- The value of PicOrderCntVal for the generated picture is set equal to PocLtFoll[ i ]. … … 3060 3061 3061 3062 // - The value of slice_pic_order_cnt_lsb for the generated picture is inferred to be equal to ( PocLtFoll[ i ] & ( MaxPicOrderCntLsb - 1 ) ). 3062 genPic->getSlice(0)->setSlicePicOrderCntLsb( ( pocLtFoll[ i ] & ( m_pcPic->getSlice(0)->getSPS()->getMaxPicOrderCntLsb() - 1 ) ) ); 3063 3064 // - The value of PicOutputFlag for the generated picture is set equal to 0. 3065 genPic->setPicOutputFlag( false ); 3063 genPic->getSlice(0)->setSlicePicOrderCntLsb( ( pocLtFoll[ i ] & ( m_pcPic->getSlice(0)->getSPS()->getMaxPicOrderCntLsb() - 1 ) ) ); 3064 3065 // - The value of PicOutputFlag for the generated picture is set equal to 0. 3066 genPic->setPicOutputFlag( false ); 3066 3067 3067 3068 // - The generated picture is marked as "used for long-term reference". … … 3072 3073 3073 3074 // - The value of nuh_layer_id for the generated picture is set equal to nuh_layer_id of the current picture. 3074 genPic->setLayerId( m_pcPic-> getLayerId() ); 3075 genPic->setLayerId( m_pcPic-> getLayerId() ); 3075 3076 3076 3077 // Insert to DPB 3077 m_dpb->addNewPic( genPic ); 3078 m_dpb->addNewPic( genPic ); 3078 3079 } 3079 3080 } … … 3087 3088 /////////////////////////////////////////////////////////////////////////////////////// 3088 3089 3089 TComPic* genPic = new TComPic; 3090 genPic->create( *m_pcPic->getSlice(0)->getSPS(), *m_pcPic->getSlice(0)->getPPS(), true ); 3091 genPic->setIsGenerated( true ); 3092 genPic->setIsGeneratedCl833( calledFromCl8331 ); 3090 TComPic* genPic = new TComPic; 3091 genPic->create( *m_pcPic->getSlice(0)->getSPS(), *m_pcPic->getSlice(0)->getPPS(), true ); 3092 genPic->setIsGenerated( true ); 3093 genPic->setIsGeneratedCl833( calledFromCl8331 ); 3093 3094 return genPic; 3094 3095 } … … 3098 3099 { 3099 3100 /////////////////////////////////////////////////////////////////////////////////////// 3100 // F.8.1.7 Decoding process for generating unavailable reference pictures for pictures 3101 // F.8.1.7 Decoding process for generating unavailable reference pictures for pictures 3101 3102 // first in decoding order within a layer 3102 3103 /////////////////////////////////////////////////////////////////////////////////////// 3103 3104 3104 // This process is invoked for a picture with nuh_layer_id equal to layerId, when FirstPicInLayerDecodedFlag[layerId ] is equal to 0. 3105 // This process is invoked for a picture with nuh_layer_id equal to layerId, when FirstPicInLayerDecodedFlag[layerId ] is equal to 0. 3105 3106 assert( !m_firstPicInLayerDecodedFlag[ getLayerId() ] ); 3106 3107 3107 3108 3108 TComDecodedRps* decRps = m_pcPic->getDecodedRps(); 3109 3110 std::vector<TComPic*>& refPicSetStCurrBefore = decRps->m_refPicSetStCurrBefore; 3109 TComDecodedRps* decRps = m_pcPic->getDecodedRps(); 3110 3111 std::vector<TComPic*>& refPicSetStCurrBefore = decRps->m_refPicSetStCurrBefore; 3111 3112 std::vector<TComPic*>& refPicSetStCurrAfter = decRps->m_refPicSetStCurrAfter; 3112 3113 std::vector<TComPic*>& refPicSetStFoll = decRps->m_refPicSetStFoll; 3113 std::vector<TComPic*>& refPicSetLtCurr = decRps->m_refPicSetLtCurr; 3114 std::vector<TComPic*>& refPicSetLtFoll = decRps->m_refPicSetLtFoll; 3114 std::vector<TComPic*>& refPicSetLtCurr = decRps->m_refPicSetLtCurr; 3115 std::vector<TComPic*>& refPicSetLtFoll = decRps->m_refPicSetLtFoll; 3115 3116 3116 3117 … … 3121 3122 const std::vector<Int>& pocLtFoll = decRps->m_pocLtFoll; 3122 3123 3123 const Int numPocStCurrBefore = decRps->m_numPocStCurrBefore; 3124 const Int numPocStCurrBefore = decRps->m_numPocStCurrBefore; 3124 3125 const Int numPocStCurrAfter = decRps->m_numPocStCurrAfter; 3125 3126 const Int numPocStFoll = decRps->m_numPocStFoll; 3126 3127 const Int numPocLtCurr = decRps->m_numPocLtCurr; 3127 const Int numPocLtFoll = decRps->m_numPocLtFoll; 3128 3129 Int nuhLayerId = m_pcPic-> getLayerId(); 3128 const Int numPocLtFoll = decRps->m_numPocLtFoll; 3129 3130 Int nuhLayerId = m_pcPic-> getLayerId(); 3130 3131 for ( Int i = 0 ; i <= numPocStCurrBefore - 1; i++ ) 3131 3132 { 3132 3133 if ( refPicSetStCurrBefore[ i ] == NULL ) 3133 3134 { 3134 //- For each RefPicSetStCurrBefore[ i ], with i in the range of 0 to NumPocStCurrBefore - 1, inclusive, that is 3135 //- For each RefPicSetStCurrBefore[ i ], with i in the range of 0 to NumPocStCurrBefore - 1, inclusive, that is 3135 3136 // equal to "no reference picture", a picture is generated as specified in clause 8.3.3.2 and the following applies: 3136 TComPic* genPic = x8332GenOfOneUnavailPic( false ); 3137 TComPic* genPic = x8332GenOfOneUnavailPic( false ); 3137 3138 3138 3139 //- The value of PicOrderCntVal for the generated picture is set equal to PocStCurrBefore[ i ]. … … 3140 3141 3141 3142 // - The value of PicOutputFlag for the generated picture is set equal to 0. 3142 genPic->setPicOutputFlag( false ); 3143 genPic->setPicOutputFlag( false ); 3143 3144 3144 3145 // - The generated picture is marked as "used for short-term reference". … … 3149 3150 3150 3151 // - The value of nuh_layer_id for the generated picture is set equal to nuh_layer_id. 3151 genPic->setLayerId( nuhLayerId ); 3152 genPic->setLayerId( nuhLayerId ); 3152 3153 3153 3154 // Insert to DPB 3154 m_dpb->addNewPic( genPic ); 3155 m_dpb->addNewPic( genPic ); 3155 3156 } 3156 3157 } … … 3160 3161 if ( refPicSetStCurrAfter[ i ] == NULL ) 3161 3162 { 3162 // - For each RefPicSetStCurrAfter[ i ], with i in the range of 0 to NumPocStCurrAfter - 1, inclusive, that is equal 3163 // - For each RefPicSetStCurrAfter[ i ], with i in the range of 0 to NumPocStCurrAfter - 1, inclusive, that is equal 3163 3164 // to "no reference picture", a picture is generated as specified in clause 8.3.3.2 and the following applies: 3164 TComPic* genPic = x8332GenOfOneUnavailPic( false ); 3165 TComPic* genPic = x8332GenOfOneUnavailPic( false ); 3165 3166 3166 3167 // - The value of PicOrderCntVal for the generated picture is set equal to PocStCurrAfter[ i ]. … … 3168 3169 3169 3170 // - The value of PicOutputFlag for the generated picture is set equal to 0. 3170 genPic->setPicOutputFlag( false ); 3171 genPic->setPicOutputFlag( false ); 3171 3172 3172 3173 // - The generated picture is marked as "used for short-term reference". … … 3177 3178 3178 3179 // - The value of nuh_layer_id for the generated picture is set equal to nuh_layer_id. 3179 genPic->setLayerId( nuhLayerId ); 3180 genPic->setLayerId( nuhLayerId ); 3180 3181 3181 3182 // Insert to DPB 3182 m_dpb->addNewPic( genPic ); 3183 m_dpb->addNewPic( genPic ); 3183 3184 3184 3185 } … … 3189 3190 if ( refPicSetStFoll[ i ] == NULL ) 3190 3191 { 3191 // - For each RefPicSetStFoll[ i ], with i in the range of 0 to NumPocStFoll - 1, inclusive, that is equal to "no 3192 // - For each RefPicSetStFoll[ i ], with i in the range of 0 to NumPocStFoll - 1, inclusive, that is equal to "no 3192 3193 // reference picture", a picture is generated as specified in clause 8.3.3.2 and the following applies: 3193 TComPic* genPic = x8332GenOfOneUnavailPic( false ); 3194 TComPic* genPic = x8332GenOfOneUnavailPic( false ); 3194 3195 3195 3196 // - The value of PicOrderCntVal for the generated picture is set equal to PocStFoll[ i ]. … … 3197 3198 3198 3199 // - The value of PicOutputFlag for the generated picture is set equal to 0. 3199 genPic->setPicOutputFlag( false ); 3200 genPic->setPicOutputFlag( false ); 3200 3201 3201 3202 // - The generated picture is marked as "used for short-term reference". … … 3206 3207 3207 3208 // - The value of nuh_layer_id for the generated picture is set equal to nuh_layer_id. 3208 genPic->setLayerId( nuhLayerId ); 3209 genPic->setLayerId( nuhLayerId ); 3209 3210 3210 3211 // Insert to DPB 3211 m_dpb->addNewPic( genPic ); 3212 } 3213 } 3214 3215 Int maxPicOrderCntLsb = m_pcPic->getSlice(0)->getSPS()->getMaxPicOrderCntLsb(); 3212 m_dpb->addNewPic( genPic ); 3213 } 3214 } 3215 3216 Int maxPicOrderCntLsb = m_pcPic->getSlice(0)->getSPS()->getMaxPicOrderCntLsb(); 3216 3217 for ( Int i = 0 ; i <= numPocLtCurr - 1; i++ ) 3217 3218 { 3218 3219 if ( refPicSetLtCurr[ i ] == NULL ) 3219 3220 { 3220 // - For each RefPicSetLtCurr[ i ], with i in the range of 0 to NumPocLtCurr - 1, inclusive, that is equal to "no 3221 // - For each RefPicSetLtCurr[ i ], with i in the range of 0 to NumPocLtCurr - 1, inclusive, that is equal to "no 3221 3222 // reference picture", a picture is generated as specified in clause 8.3.3.2 and the following applies: 3222 TComPic* genPic = x8332GenOfOneUnavailPic( false ); 3223 TComPic* genPic = x8332GenOfOneUnavailPic( false ); 3223 3224 3224 3225 // - The value of PicOrderCntVal for the generated picture is set equal to PocLtCurr[ i ]. 3225 3226 genPic->getSlice(0)->setPOC( pocLtCurr[ i ] ); 3226 3227 3227 // - The value of slice_pic_order_cnt_lsb for the generated picture is inferred to be equal to ( PocLtCurr[ i ] & ( 3228 // - The value of slice_pic_order_cnt_lsb for the generated picture is inferred to be equal to ( PocLtCurr[ i ] & ( 3228 3229 // MaxPicOrderCntLsb - 1 ) ). 3229 genPic->getSlice(0)->setSlicePicOrderCntLsb( ( pocLtCurr[ i ] & ( maxPicOrderCntLsb - 1 ) ) ); 3230 genPic->getSlice(0)->setSlicePicOrderCntLsb( ( pocLtCurr[ i ] & ( maxPicOrderCntLsb - 1 ) ) ); 3230 3231 3231 3232 // - The value of PicOutputFlag for the generated picture is set equal to 0. 3232 genPic->setPicOutputFlag( false ); 3233 genPic->setPicOutputFlag( false ); 3233 3234 3234 3235 // - The generated picture is marked as "used for long-term reference". … … 3239 3240 3240 3241 // - The value of nuh_layer_id for the generated picture is set equal to nuh_layer_id. 3241 genPic->setLayerId( nuhLayerId ); 3242 genPic->setLayerId( nuhLayerId ); 3242 3243 3243 3244 // Insert to DPB 3244 m_dpb->addNewPic( genPic ); 3245 m_dpb->addNewPic( genPic ); 3245 3246 } 3246 3247 } … … 3250 3251 if ( refPicSetLtFoll[ i ] == NULL ) 3251 3252 { 3252 // - For each RefPicSetLtFoll[ i ], with i in the range of 0 to NumPocLtFoll - 1, inclusive, that is equal to "no 3253 // - For each RefPicSetLtFoll[ i ], with i in the range of 0 to NumPocLtFoll - 1, inclusive, that is equal to "no 3253 3254 // reference picture", a picture is generated as specified in clause 8.3.3.2 and the following applies: 3254 TComPic* genPic = x8332GenOfOneUnavailPic( false ); 3255 TComPic* genPic = x8332GenOfOneUnavailPic( false ); 3255 3256 3256 3257 // - The value of PicOrderCntVal for the generated picture is set equal to PocLtFoll[ i ]. 3257 3258 genPic->getSlice(0)->setPOC( pocLtFoll[ i ] ); 3258 3259 3259 // - The value of slice_pic_order_cnt_lsb for the generated picture is inferred to be equal to ( PocLtCurr[ i ] & ( 3260 // - The value of slice_pic_order_cnt_lsb for the generated picture is inferred to be equal to ( PocLtCurr[ i ] & ( 3260 3261 // MaxPicOrderCntLsb - 1 ) ). 3261 genPic->getSlice(0)->setSlicePicOrderCntLsb( ( pocLtCurr[ i ] & ( maxPicOrderCntLsb - 1 ) ) ); 3262 genPic->getSlice(0)->setSlicePicOrderCntLsb( ( pocLtCurr[ i ] & ( maxPicOrderCntLsb - 1 ) ) ); 3262 3263 3263 3264 // - The value of PicOutputFlag for the generated picture is set equal to 0. 3264 genPic->setPicOutputFlag( false ); 3265 genPic->setPicOutputFlag( false ); 3265 3266 3266 3267 // - The generated picture is marked as "used for long-term reference". … … 3271 3272 3272 3273 // - The value of nuh_layer_id for the generated picture is set equal to nuh_layer_id. 3273 genPic->setLayerId( nuhLayerId ); 3274 genPic->setLayerId( nuhLayerId ); 3274 3275 3275 3276 // Insert to DPB 3276 m_dpb->addNewPic( genPic ); 3277 m_dpb->addNewPic( genPic ); 3277 3278 } 3278 3279 } … … 3292 3293 std::vector<TComPic*>** refPicSetsCurr = m_pcPic->getDecodedRps()->m_refPicSetsCurr; 3293 3294 3294 Bool hasGeneratedRefPic = false; 3295 for (Int j = 0; j < 3; j++ ) 3296 { 3297 std::vector<TComPic*>* cSet = refPicSetsCurr[j]; 3295 Bool hasGeneratedRefPic = false; 3296 for (Int j = 0; j < 3; j++ ) 3297 { 3298 std::vector<TComPic*>* cSet = refPicSetsCurr[j]; 3298 3299 for (Int i = 0 ; i < cSet->size(); i++ ) 3299 3300 { … … 3301 3302 if ((*cSet)[i]->getIsGenerated() ) 3302 3303 { 3303 hasGeneratedRefPic = true; 3304 } 3305 } 3306 } 3307 m_pcPic->setHasGeneratedRefPics( hasGeneratedRefPic ); 3304 hasGeneratedRefPic = true; 3305 } 3306 } 3307 } 3308 m_pcPic->setHasGeneratedRefPics( hasGeneratedRefPic ); 3308 3309 } 3309 3310 -
branches/HTM-15.1-dev0-NICT/source/Lib/TLibEncoder/SEIwrite.cpp
r1344 r1349 132 132 case SEI::LAYERS_NOT_PRESENT: 133 133 xWriteSEILayersNotPresent(*static_cast<const SEILayersNotPresent*>(&sei)); 134 break; 134 break; 135 135 #endif 136 136 case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS: 137 137 xWriteSEIInterLayerConstrainedTileSets(*static_cast<const SEIInterLayerConstrainedTileSets*>(&sei)); 138 break; 138 break; 139 139 #if NH_MV_SEI_TBD 140 140 case SEI::BSP_NESTING: 141 141 xWriteSEIBspNesting(*static_cast<const SEIBspNesting*>(&sei)); 142 break; 142 break; 143 143 case SEI::BSP_INITIAL_ARRIVAL_TIME: 144 144 xWriteSEIBspInitialArrivalTime(*static_cast<const SEIBspInitialArrivalTime*>(&sei)); 145 break; 145 break; 146 146 #endif 147 147 case SEI::SUB_BITSTREAM_PROPERTY: 148 148 xWriteSEISubBitstreamProperty(*static_cast<const SEISubBitstreamProperty*>(&sei)); 149 break; 149 break; 150 150 case SEI::ALPHA_CHANNEL_INFO: 151 151 xWriteSEIAlphaChannelInfo(*static_cast<const SEIAlphaChannelInfo*>(&sei)); … … 153 153 case SEI::OVERLAY_INFO: 154 154 xWriteSEIOverlayInfo(*static_cast<const SEIOverlayInfo*>(&sei)); 155 break; 155 break; 156 156 case SEI::TEMPORAL_MV_PREDICTION_CONSTRAINTS: 157 157 xWriteSEITemporalMvPredictionConstraints(*static_cast<const SEITemporalMvPredictionConstraints*>(&sei)); 158 break; 158 break; 159 159 #if NH_MV_SEI_TBD 160 160 case SEI::FRAME_FIELD_INFO: 161 161 xWriteSEIFrameFieldInfo(*static_cast<const SEIFrameFieldInfo*>(&sei)); 162 break; 162 break; 163 163 #endif 164 164 case SEI::THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO: 165 165 xWriteSEIThreeDimensionalReferenceDisplaysInfo(*static_cast<const SEIThreeDimensionalReferenceDisplaysInfo*>(&sei)); 166 break; 166 break; 167 167 #if SEI_DRI_F0169 168 168 case SEI::DEPTH_REPRESENTATION_INFO: 169 169 xWriteSEIDepthRepresentationInfo(*static_cast<const SEIDepthRepresentationInfo*>(&sei)); 170 170 break; 171 #endif 171 #endif 172 172 case SEI::MULTIVIEW_SCENE_INFO: 173 173 xWriteSEIMultiviewSceneInfo(*static_cast<const SEIMultiviewSceneInfo*>(&sei)); 174 break; 174 break; 175 175 case SEI::MULTIVIEW_ACQUISITION_INFO: 176 176 xWriteSEIMultiviewAcquisitionInfo(*static_cast<const SEIMultiviewAcquisitionInfo*>(&sei)); 177 break; 177 break; 178 178 179 179 case SEI::MULTIVIEW_VIEW_POSITION: 180 180 xWriteSEIMultiviewViewPosition(*static_cast<const SEIMultiviewViewPosition*>(&sei)); 181 break; 181 break; 182 182 #if NH_3D 183 183 case SEI::ALTERNATIVE_DEPTH_INFO: 184 184 xWriteSEIAlternativeDepthInfo(*static_cast<const SEIAlternativeDepthInfo*>(&sei)); 185 break; 185 break; 186 186 #endif 187 187 #endif … … 307 307 for (Int i = 0; i < sei.activeSeqParameterSetId.size(); i++) 308 308 { 309 WRITE_UVLC(sei.activeSeqParameterSetId[i], "active_seq_parameter_set_id"); 309 WRITE_UVLC(sei.activeSeqParameterSetId[i], "active_seq_parameter_set_id"); 310 310 } 311 311 } … … 445 445 { 446 446 WRITE_FLAG( sei.m_arrangementCancelFlag, "segmented_rect_frame_packing_arrangement_cancel_flag" ); 447 if( sei.m_arrangementCancelFlag == 0 ) 447 if( sei.m_arrangementCancelFlag == 0 ) 448 448 { 449 449 WRITE_CODE( sei.m_contentInterpretationType, 2, "segmented_rect_content_interpretation_type" ); … … 614 614 { 615 615 //UInt code; 616 WRITE_FLAG((sei.m_mc_all_tiles_exact_sample_value_match_flag ? 1 : 0), "mc_all_tiles_exact_sample_value_match_flag"); 616 WRITE_FLAG((sei.m_mc_all_tiles_exact_sample_value_match_flag ? 1 : 0), "mc_all_tiles_exact_sample_value_match_flag"); 617 617 WRITE_FLAG((sei.m_each_tile_one_tile_set_flag ? 1 : 0), "each_tile_one_tile_set_flag" ); 618 618 … … 629 629 630 630 if(sei.m_limited_tile_set_display_flag) 631 { 632 WRITE_FLAG((sei.tileSetData(i).m_display_tile_set_flag ? 1 : 0), "display_tile_set_flag"); 633 } 634 635 WRITE_UVLC((sei.tileSetData(i).getNumberOfTileRects() - 1), "num_tile_rects_in_set_minus1"); 636 631 { 632 WRITE_FLAG((sei.tileSetData(i).m_display_tile_set_flag ? 1 : 0), "display_tile_set_flag"); 633 } 634 635 WRITE_UVLC((sei.tileSetData(i).getNumberOfTileRects() - 1), "num_tile_rects_in_set_minus1"); 636 637 637 for(Int j = 0; j < sei.tileSetData(i).getNumberOfTileRects(); j++) 638 638 { 639 WRITE_UVLC(sei.tileSetData(i).topLeftTileIndex (j), "top_left_tile_index"); 640 WRITE_UVLC(sei.tileSetData(i).bottomRightTileIndex(j), "bottom_right_tile_index"); 639 WRITE_UVLC(sei.tileSetData(i).topLeftTileIndex (j), "top_left_tile_index"); 640 WRITE_UVLC(sei.tileSetData(i).bottomRightTileIndex(j), "bottom_right_tile_index"); 641 641 } 642 642 643 643 if(!sei.m_mc_all_tiles_exact_sample_value_match_flag) 644 644 { 645 WRITE_FLAG((sei.tileSetData(i).m_exact_sample_value_match_flag ? 1 : 0), "exact_sample_value_match_flag"); 645 WRITE_FLAG((sei.tileSetData(i).m_exact_sample_value_match_flag ? 1 : 0), "exact_sample_value_match_flag"); 646 646 } 647 647 … … 651 651 { 652 652 WRITE_FLAG((sei.tileSetData(i).m_mcts_tier_flag ? 1 : 0), "mcts_tier_flag"); 653 WRITE_CODE( sei.tileSetData(i).m_mcts_level_idc, 8, "mcts_level_idc"); 653 WRITE_CODE( sei.tileSetData(i).m_mcts_level_idc, 8, "mcts_level_idc"); 654 654 } 655 655 } … … 662 662 if(sei.m_max_mcs_tier_level_idc_present_flag) 663 663 { 664 WRITE_FLAG((sei.m_max_mcts_tier_flag ? 1 : 0), "max_mcts_tier_flag"); 665 WRITE_CODE( sei.m_max_mcts_level_idc, 8, "max_mcts_level_idc"); 664 WRITE_FLAG((sei.m_max_mcts_tier_flag ? 1 : 0), "max_mcts_tier_flag"); 665 WRITE_CODE( sei.m_max_mcts_level_idc, 8, "max_mcts_level_idc"); 666 666 } 667 667 } … … 763 763 userVerticalCoefficients[2][2] = 100; 764 764 userVerticalCoefficients[2][3] = -10; 765 765 766 766 Int const iNumHorizontalFilters = 1; 767 767 Int horizontalTapLength_minus1[iNumHorizontalFilters] = {3}; … … 832 832 { 833 833 WRITE_UVLC( sei.m_kneeId, "knee_function_id" ); 834 WRITE_FLAG( sei.m_kneeCancelFlag, "knee_function_cancel_flag" ); 834 WRITE_FLAG( sei.m_kneeCancelFlag, "knee_function_cancel_flag" ); 835 835 if ( !sei.m_kneeCancelFlag ) 836 836 { … … 863 863 WRITE_CODE( sei.values.whitePoint[0], 16, "white_point_x" ); 864 864 WRITE_CODE( sei.values.whitePoint[1], 16, "white_point_y" ); 865 865 866 866 WRITE_CODE( sei.values.maxLuminance, 32, "max_display_mastering_luminance" ); 867 867 WRITE_CODE( sei.values.minLuminance, 32, "min_display_mastering_luminance" ); … … 1033 1033 1034 1034 // byte alignment 1035 while ( m_pcBitIf->getNumberOfWrittenBits() % 8 != 0 ) 1035 while ( m_pcBitIf->getNumberOfWrittenBits() % 8 != 0 ) 1036 1036 { 1037 1037 WRITE_FLAG( 0, "overlay_zero_bit" ); 1038 1038 } 1039 1039 1040 1040 UChar* stmp; 1041 1041 UInt ilength; … … 1044 1044 if( sei.m_languageOverlayPresentFlag[i] ) 1045 1045 { 1046 stmp = (UChar*) strdup( sei.m_overlayLanguage[i].c_str() ); 1046 stmp = (UChar*) strdup( sei.m_overlayLanguage[i].c_str() ); 1047 1047 ilength = (UInt) sei.m_overlayLanguage[i].size(); 1048 1048 WRITE_STRING( stmp, ilength, "overlay_language" ); … … 1065 1065 } 1066 1066 WRITE_FLAG( ( sei.m_overlayInfoPersistenceFlag ? 1 : 0 ), "overlay_info_persistence_flag" ); 1067 } 1067 } 1068 1068 }; 1069 1069 … … 1157 1157 { 1158 1158 UInt x_sign, x_exp, x_mantissa,x_mantissa_len; 1159 if (f < 0) 1159 if (f < 0) 1160 1160 { 1161 1161 f = f * (-1); … … 1317 1317 if( sei.m_alternativeDepthInfoCancelFlag == 0 ) 1318 1318 { 1319 #if DEBUG_NH_3D_SEI 1320 printf("\n################## xWriteSEIAlternativeDepthInfo() ################\n"); 1321 #endif 1319 1322 WRITE_CODE( sei.m_depthType, 2, "depth_type" ); 1320 1323 1321 #if NH_MV_SEI_TBD1322 1324 if( sei.m_depthType == 0 ) 1323 1325 { … … 1330 1332 if( sei.m_zGvdFlag ) 1331 1333 { 1332 for( Int i = 0; i <= sei.m_numConstituentViewsGvdMinus1 + 1; i++ ) 1333 { 1334 WRITE_FLAG( ( sei.m_signGvdZNearFlag[i] ? 1 : 0 ), "sign_gvd_z_near_flag" ); 1335 WRITE_CODE( sei.m_expGvdZNear[i], 7, "exp_gvd_z_near" ); 1336 WRITE_CODE( sei.m_manLenGvdZNearMinus1[i], 5, "man_len_gvd_z_near_minus1" ); 1337 WRITE_CODE( sei.m_manGvdZNear[i], getManGvdZNearLen ), "man_gvd_z_near" ); 1338 WRITE_FLAG( ( sei.m_signGvdZFarFlag[i] ? 1 : 0 ), "sign_gvd_z_far_flag" ); 1339 WRITE_CODE( sei.m_expGvdZFar[i], 7, "exp_gvd_z_far" ); 1340 WRITE_CODE( sei.m_manLenGvdZFarMinus1[i], 5, "man_len_gvd_z_far_minus1" ); 1341 WRITE_CODE( sei.m_manGvdZFar[i], getManGvdZFarLen ), "man_gvd_z_far" ); 1334 for( Int i = 0, j = 0; j <= sei.m_numConstituentViewsGvdMinus1 + 1; j++ ) 1335 { 1336 #if DEBUG_NH_3D_SEI 1337 printf("sign_gvd_z_near_flag : sei.m_signGvdZNearFlag[%d][%d]: %u\n", i, j, sei.m_signGvdZNearFlag[i][j]); 1338 printf("exp_gvd_z_near : sei.m_expGvdZNear[%d][%d]: %u\n", i, j, sei.m_expGvdZNear[i][j]); 1339 printf("man_len_gvd_z_near_minus1 : sei.m_manLenGvdZNearMinus1[%d][%d]: %u\n", i, j, sei.m_manLenGvdZNearMinus1[i][j]); 1340 printf("man_gvd_z_near : sei.m_manGvdZNear[%d][%d]: %u\n", i, j, sei.m_manGvdZNear[i][j]); 1341 printf("sign_gvd_z_far_flag : sei.m_signGvdZFarFlag[%d][%d]: %u\n", i, j, sei.m_signGvdZFarFlag[i][j]); 1342 printf("exp_gvd_z_far : sei.m_expGvdZFar[%d][%d]: %u\n", i, j, sei.m_expGvdZFar[i][j]); 1343 printf("man_len_gvd_z_far_minus1 : sei.m_manLenGvdZFarMinus1[%d][%d]: %u\n", i, j, sei.m_manLenGvdZFarMinus1[i][j]); 1344 printf("man_gvd_z_far : sei.m_manGvdZFar[%d][%d]: %u\n", i, j, sei.m_manGvdZFar[i][j]); 1345 #endif 1346 WRITE_FLAG( ( sei.m_signGvdZNearFlag[i][j] ? 1 : 0 ), "sign_gvd_z_near_flag" ); 1347 WRITE_CODE( sei.m_expGvdZNear[i][j], 7, "exp_gvd_z_near" ); 1348 WRITE_CODE( sei.m_manLenGvdZNearMinus1[i][j], 5, "man_len_gvd_z_near_minus1" ); 1349 WRITE_CODE( sei.m_manGvdZNear[i][j], sei.m_manLenGvdZNearMinus1[i][j] + 1, "man_gvd_z_near" ); 1350 WRITE_FLAG( ( sei.m_signGvdZFarFlag[i][j] ? 1 : 0 ), "sign_gvd_z_far_flag" ); 1351 WRITE_CODE( sei.m_expGvdZFar[i][j], 7, "exp_gvd_z_far" ); 1352 WRITE_CODE( sei.m_manLenGvdZFarMinus1[i][j], 5, "man_len_gvd_z_far_minus1" ); 1353 WRITE_CODE( sei.m_manGvdZFar[i][j], sei.m_manLenGvdZFarMinus1[i][j] + 1, "man_gvd_z_far" ); 1342 1354 } 1343 1355 } 1344 1356 if( sei.m_intrinsicParamGvdFlag ) 1345 1357 { 1358 #if DEBUG_NH_3D_SEI 1359 printf("prec_gvd_focal_length : sei.m_precGvdFocalLength: %u\n", sei.m_precGvdFocalLength); 1360 printf("prec_gvd_principal_point : sei.m_precGvdPrincipalPoint: %u\n", sei.m_precGvdPrincipalPoint); 1361 #endif 1346 1362 WRITE_UVLC( sei.m_precGvdFocalLength, "prec_gvd_focal_length" ); 1347 1363 WRITE_UVLC( sei.m_precGvdPrincipalPoint, "prec_gvd_principal_point" ); … … 1349 1365 if( sei.m_rotationGvdFlag ) 1350 1366 { 1367 #if DEBUG_NH_3D_SEI 1368 printf("prec_gvd_focal_length : sei.m_precGvdFocalLength: %u\n", sei.m_precGvdFocalLength); 1369 #endif 1351 1370 WRITE_UVLC( sei.m_precGvdRotationParam, "prec_gvd_rotation_param" ); 1352 1371 } 1353 1372 if( sei.m_translationGvdFlag ) 1354 1373 { 1374 #if DEBUG_NH_3D_SEI 1375 printf("prec_gvd_focal_length : sei.m_precGvdFocalLength: %u\n", sei.m_precGvdFocalLength); 1376 #endif 1355 1377 WRITE_UVLC( sei.m_precGvdTranslationParam, "prec_gvd_translation_param" ); 1356 1378 } 1357 for( Int i = 0 ; i <= sei.m_numConstituentViewsGvdMinus1 + 1; i++ )1379 for( Int i = 0, j = 0; j <= sei.m_numConstituentViewsGvdMinus1 + 1; j++ ) 1358 1380 { 1359 1381 if( sei.m_intrinsicParamGvdFlag ) 1360 1382 { 1361 WRITE_FLAG( ( sei.m_signGvdFocalLengthX[i] ? 1 : 0 ), "sign_gvd_focal_length_x" ); 1362 WRITE_CODE( sei.m_expGvdFocalLengthX[i], 6, "exp_gvd_focal_length_x" ); 1363 WRITE_CODE( sei.m_manGvdFocalLengthX[i], getManGvdFocalLengthXLen ), "man_gvd_focal_length_x" ); 1364 WRITE_FLAG( ( sei.m_signGvdFocalLengthY[i] ? 1 : 0 ), "sign_gvd_focal_length_y" ); 1365 WRITE_CODE( sei.m_expGvdFocalLengthY[i], 6, "exp_gvd_focal_length_y" ); 1366 WRITE_CODE( sei.m_manGvdFocalLengthY[i], getManGvdFocalLengthYLen ), "man_gvd_focal_length_y" ); 1367 WRITE_FLAG( ( sei.m_signGvdPrincipalPointX[i] ? 1 : 0 ), "sign_gvd_principal_point_x" ); 1368 WRITE_CODE( sei.m_expGvdPrincipalPointX[i], 6, "exp_gvd_principal_point_x" ); 1369 WRITE_CODE( sei.m_manGvdPrincipalPointX[i], getManGvdPrincipalPointXLen ), "man_gvd_principal_point_x" ); 1370 WRITE_FLAG( ( sei.m_signGvdPrincipalPointY[i] ? 1 : 0 ), "sign_gvd_principal_point_y" ); 1371 WRITE_CODE( sei.m_expGvdPrincipalPointY[i], 6, "exp_gvd_principal_point_y" ); 1372 WRITE_CODE( sei.m_manGvdPrincipalPointY[i], getManGvdPrincipalPointYLen ), "man_gvd_principal_point_y" ); 1383 #if DEBUG_NH_3D_SEI 1384 printf("sign_gvd_focal_length_x : sei.m_signGvdFocalLengthX[%d][%d]: %u\n", i, j, sei.m_signGvdFocalLengthX[i][j]); 1385 printf("exp_gvd_focal_length_x : sei.m_expGvdFocalLengthX[%d][%d]: %u\n", i, j, sei.m_expGvdFocalLengthX[i][j]); 1386 printf("man_gvd_focal_length_x : sei.m_manGvdFocalLengthX[%d][%d]: %u\n", i, j, sei.m_manGvdFocalLengthX[i][j]); 1387 printf("sign_gvd_focal_length_y : sei.m_signGvdFocalLengthY[%d][%d]: %u\n", i, j, sei.m_signGvdFocalLengthY[i][j]); 1388 printf("exp_gvd_focal_length_y : sei.m_expGvdFocalLengthY[%d][%d]: %u\n", i, j, sei.m_expGvdFocalLengthY[i][j]); 1389 printf("man_gvd_focal_length_y : sei.m_manGvdFocalLengthY[%d][%d]: %u\n", i, j, sei.m_manGvdFocalLengthY[i][j]); 1390 printf("sign_gvd_principal_point_x : sei.m_signGvdPrincipalPointX[%d][%d]: %u\n", i, j, sei.m_signGvdPrincipalPointX[i][j]); 1391 printf("exp_gvd_principal_point_x : sei.m_expGvdPrincipalPointX[%d][%d]: %u\n", i, j, sei.m_expGvdPrincipalPointX[i][j]); 1392 printf("man_gvd_principal_point_x : sei.m_manGvdPrincipalPointX[%d][%d]: %u\n", i, j, sei.m_manGvdPrincipalPointX[i][j]); 1393 printf("sign_gvd_principal_point_y : sei.m_signGvdPrincipalPointY[%d][%d]: %u\n", i, j, sei.m_signGvdPrincipalPointY[i][j]); 1394 printf("exp_gvd_principal_point_y : sei.m_expGvdPrincipalPointY[%d][%d]: %u\n", i, j, sei.m_expGvdPrincipalPointY[i][j]); 1395 printf("man_gvd_principal_point_y : sei.m_manGvdPrincipalPointY[%d][%d]: %u\n", i, j, sei.m_manGvdPrincipalPointY[i][j]); 1396 #endif 1397 WRITE_FLAG( ( sei.m_signGvdFocalLengthX[i][j] ? 1 : 0 ), "sign_gvd_focal_length_x" ); 1398 WRITE_CODE( sei.m_expGvdFocalLengthX[i][j], 6, "exp_gvd_focal_length_x" ); 1399 WRITE_CODE( sei.m_manGvdFocalLengthX[i][j], sei.m_precGvdFocalLength, "man_gvd_focal_length_x" ); 1400 WRITE_FLAG( ( sei.m_signGvdFocalLengthY[i][j] ? 1 : 0 ), "sign_gvd_focal_length_y" ); 1401 WRITE_CODE( sei.m_expGvdFocalLengthY[i][j], 6, "exp_gvd_focal_length_y" ); 1402 WRITE_CODE( sei.m_manGvdFocalLengthY[i][j], sei.m_precGvdFocalLength, "man_gvd_focal_length_y" ); 1403 WRITE_FLAG( ( sei.m_signGvdPrincipalPointX[i][j] ? 1 : 0 ), "sign_gvd_principal_point_x" ); 1404 WRITE_CODE( sei.m_expGvdPrincipalPointX[i][j], 6, "exp_gvd_principal_point_x" ); 1405 WRITE_CODE( sei.m_manGvdPrincipalPointX[i][j], sei.m_precGvdPrincipalPoint, "man_gvd_principal_point_x" ); 1406 WRITE_FLAG( ( sei.m_signGvdPrincipalPointY[i][j] ? 1 : 0 ), "sign_gvd_principal_point_y" ); 1407 WRITE_CODE( sei.m_expGvdPrincipalPointY[i][j], 6, "exp_gvd_principal_point_y" ); 1408 WRITE_CODE( sei.m_manGvdPrincipalPointY[i][j], sei.m_precGvdPrincipalPoint, "man_gvd_principal_point_y" ); 1373 1409 } 1374 1410 if( sei.m_rotationGvdFlag ) 1375 1411 { 1376 for( Int j = 10; j <= 3; j++ ) /* row */1412 for( Int k = 0; k < 3; k++ ) // column 1377 1413 { 1378 for( Int k = 10; k <= 3; k++ ) /* column */ 1379 { 1380 WRITE_FLAG( ( sei.m_signGvdR[i][j][k] ? 1 : 0 ), "sign_gvd_r" ); 1381 WRITE_CODE( sei.m_expGvdR[i][j][k], 6, "exp_gvd_r" ); 1382 WRITE_CODE( sei.m_manGvdR[i][j][k], getManGvdRLen ), "man_gvd_r" ); 1383 } 1414 #if DEBUG_NH_3D_SEI 1415 printf("sign_gvd_r : sei.m_signGvdR[%d][%d][%d]: %u\n", i, j, k, sei.m_signGvdR[i][j][k]); 1416 printf("exp_gvd_r : sei.m_expGvdR[%d][%d][%d]: %u\n", i, j, k, sei.m_expGvdR[i][j][k]); 1417 printf("man_gvd_r : sei.m_manGvdR[%d][%d][%d]: %u\n", i, j, k, sei.m_manGvdR[i][j][k]); 1418 #endif 1419 WRITE_FLAG( ( sei.m_signGvdR[i][j][k] ? 1 : 0 ), "sign_gvd_r" ); 1420 WRITE_CODE( sei.m_expGvdR[i][j][k], 6, "exp_gvd_r" ); 1421 WRITE_CODE( sei.m_manGvdR[i][j][k], sei.m_precGvdTranslationParam, "man_gvd_r" ); 1384 1422 } 1385 1423 } 1386 1424 if( sei.m_translationGvdFlag ) 1387 1425 { 1388 WRITE_FLAG( ( sei.m_signGvdTX[i] ? 1 : 0 ), "sign_gvd_t_x" ); 1389 WRITE_CODE( sei.m_expGvdTX[i], 6, "exp_gvd_t_x" ); 1390 WRITE_CODE( sei.m_manGvdTX[i], getManGvdTXLen ), "man_gvd_t_x" ); 1391 } 1392 } 1393 } 1394 #endif 1426 #if DEBUG_NH_3D_SEI 1427 printf("sign_gvd_t_x : sei.m_signGvdTX[%d][%d]: %u\n", i, j, sei.m_signGvdTX[i][j]); 1428 printf("exp_gvd_t_x : sei.m_expGvdTX[%d][%d]: %u\n", i, j, sei.m_expGvdTX[i][j]); 1429 printf("man_gvd_t_x : sei.m_manGvdTX[%d][%d]: %u\n", i, j, sei.m_manGvdTX[i][j]); 1430 #endif 1431 WRITE_FLAG( ( sei.m_signGvdTX[i][j] ? 1 : 0 ), "sign_gvd_t_x" ); 1432 WRITE_CODE( sei.m_expGvdTX[i][j], 6, "exp_gvd_t_x" ); 1433 WRITE_CODE( sei.m_manGvdTX[i][j], sei.m_numConstituentViewsGvdMinus1, "man_gvd_t_x" ); 1434 } 1435 } 1436 } 1395 1437 1396 1438 if( sei.m_depthType == 1 ) -
branches/HTM-15.1-dev0-NICT/source/Lib/TLibEncoder/TEncGOP.cpp
r1331 r1349 100 100 m_layerId = 0; 101 101 m_viewId = 0; 102 m_pocLastCoded = -1; 102 m_pocLastCoded = -1; 103 103 #if NH_3D 104 m_viewIndex = 0; 104 m_viewIndex = 0; 105 105 m_isDepth = false; 106 106 #endif … … 147 147 148 148 #if NH_MV 149 m_ivPicLists = pcTEncTop->getIvPicLists(); 149 m_ivPicLists = pcTEncTop->getIvPicLists(); 150 150 m_layerId = pcTEncTop->getLayerId(); 151 151 m_viewId = pcTEncTop->getViewId(); … … 156 156 #endif 157 157 #if NH_3D_IC 158 m_aICEnableCandidate = pcTEncTop->getICEnableCandidate(); 159 m_aICEnableNum = pcTEncTop->getICEnableNum(); 158 m_aICEnableCandidate = pcTEncTop->getICEnableCandidate(); 159 m_aICEnableNum = pcTEncTop->getICEnableNum(); 160 160 #endif 161 161 #if KWU_FIX_URQ … … 207 207 #if NH_MV 208 208 if ( getLayerId() == 0 ) 209 { 209 { 210 210 actualTotalBits += xWriteVPS(accessUnit, m_pcEncTop->getVPS()); 211 211 } … … 232 232 OutputNALUnit nalu(naluType, temporalId); 233 233 #endif 234 printf("\nDEBUG: TEncGOP::xWriteSEI() call SEIWriter::writeSEImessages()\n"); 234 235 m_seiWriter.writeSEImessages(nalu.m_Bitstream, seiMessages, sps, false); 235 236 auPos = accessUnit.insert(auPos, new NALUnitEBSP(nalu)); … … 277 278 278 279 while ( (itNalu!=accessUnit.end())&& 279 ( (*itNalu)->m_nalUnitType==NAL_UNIT_ACCESS_UNIT_DELIMITER 280 ( (*itNalu)->m_nalUnitType==NAL_UNIT_ACCESS_UNIT_DELIMITER 280 281 || (*itNalu)->m_nalUnitType==NAL_UNIT_VPS 281 282 || (*itNalu)->m_nalUnitType==NAL_UNIT_SPS … … 288 289 SEIMessages localMessages = seiMessages; 289 290 SEIMessages currentMessages; 290 291 291 292 #if ENC_DEC_TRACE 292 293 g_HLSTraceEnable = !testWrite; … … 299 300 xWriteSEI(NAL_UNIT_PREFIX_SEI, currentMessages, accessUnit, itNalu, temporalId, sps); 300 301 xClearSEIs(currentMessages, !testWrite); 301 302 302 303 // Buffering period SEI must always be following active parameter sets 303 304 currentMessages = extractSeisByType(localMessages, SEI::BUFFERING_PERIOD); … … 476 477 seiMessages.push_back(sei); 477 478 } 478 479 479 480 if(m_pcCfg->getMasteringDisplaySEI().colourVolumeSEIEnabled) 480 481 { … … 490 491 { 491 492 SEISubBitstreamProperty *sei = new SEISubBitstreamProperty; 492 m_seiEncoder.initSEISubBitstreamProperty( sei, sps ); 493 m_seiEncoder.initSEISubBitstreamProperty( sei, sps ); 493 494 seiMessages.push_back(sei); 494 495 } … … 685 686 } 686 687 } 687 688 688 689 if( m_pcCfg->getPictureTimingSEIEnabled() ) 689 690 { … … 721 722 return; 722 723 } 723 // fix first 724 // fix first 724 725 UInt numNalUnits = (UInt)testAU.size(); 725 726 UInt numRBSPBytes = 0; … … 933 934 IRAPGOPid = iGOPid; 934 935 IRAPtoReorder = true; 935 swapIRAPForward = true; 936 swapIRAPForward = true; 936 937 break; 937 938 } … … 941 942 IRAPGOPid = iGOPid; 942 943 IRAPtoReorder = true; 943 swapIRAPForward = false; 944 swapIRAPForward = false; 944 945 break; 945 946 } … … 1072 1073 #endif 1073 1074 #if NH_MV 1074 Void TEncGOP::compressPicInGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, 1075 TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP, 1075 Void TEncGOP::compressPicInGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, 1076 TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP, 1076 1077 Bool isField, Bool isTff, const InputColourSpaceConversion snr_conversion, const Bool printFrameMSE, Int iGOPid ) 1077 1078 #else … … 1176 1177 pcPic->setCurrSliceIdx(0); 1177 1178 #if NH_MV 1178 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iGOPid, pcSlice, m_pcEncTop->getVPS(), getLayerId(), isField ); 1179 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iGOPid, pcSlice, m_pcEncTop->getVPS(), getLayerId(), isField ); 1179 1180 #else 1180 1181 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iGOPid, pcSlice, isField ); … … 1187 1188 pcSlice->setSliceIdx(0); 1188 1189 #if NH_MV 1189 pcSlice->setRefPicSetInterLayer ( &m_refPicSetInterLayer0, &m_refPicSetInterLayer1 ); 1190 pcSlice->setRefPicSetInterLayer ( &m_refPicSetInterLayer0, &m_refPicSetInterLayer1 ); 1190 1191 pcPic ->setLayerId ( getLayerId() ); 1191 pcPic ->setViewId ( getViewId() ); 1192 pcPic ->setViewId ( getViewId() ); 1192 1193 #if !NH_3D 1193 1194 pcSlice->setLayerId ( getLayerId() ); 1194 pcSlice->setViewId ( getViewId() ); 1195 pcSlice->setViewId ( getViewId() ); 1195 1196 pcSlice->setVPS ( m_pcEncTop->getVPS() ); 1196 1197 #else 1197 pcPic ->setViewIndex ( getViewIndex() ); 1198 pcPic ->setViewIndex ( getViewIndex() ); 1198 1199 pcPic ->setIsDepth( getIsDepth() ); 1199 pcSlice->setCamparaSlice( pcPic->getCodedScale(), pcPic->getCodedOffset() ); 1200 #endif 1201 #endif 1200 pcSlice->setCamparaSlice( pcPic->getCodedScale(), pcPic->getCodedOffset() ); 1201 #endif 1202 #endif 1202 1203 //set default slice level flag to the same as SPS level flag 1203 1204 pcSlice->setLFCrossSliceBoundaryFlag( pcSlice->getPPS()->getLoopFilterAcrossSlicesEnabledFlag() ); … … 1207 1208 if( pcSlice->getSliceType() == B_SLICE ) 1208 1209 { 1209 if( m_pcCfg->getGOPEntry( ( pcSlice->getRapPicFlag() && getLayerId() > 0 ) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) 1210 { 1210 if( m_pcCfg->getGOPEntry( ( pcSlice->getRapPicFlag() && getLayerId() > 0 ) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) 1211 { 1211 1212 pcSlice->setSliceType( P_SLICE ); 1212 1213 } … … 1216 1217 if( pcSlice->getSliceType() == B_SLICE ) 1217 1218 { 1218 if( m_pcCfg->getGOPEntry( ( pcSlice->getRapPicFlag() && getLayerId() > 0 ) ? MAX_GOP : iGOPid ).m_sliceType == 'I' ) 1219 { 1219 if( m_pcCfg->getGOPEntry( ( pcSlice->getRapPicFlag() && getLayerId() > 0 ) ? MAX_GOP : iGOPid ).m_sliceType == 'I' ) 1220 { 1220 1221 pcSlice->setSliceType( I_SLICE ); 1221 1222 } … … 1231 1232 pcSlice->setSliceType(I_SLICE); 1232 1233 } 1233 1234 1234 1235 // Set the nal unit type 1235 1236 pcSlice->setNalUnitType(getNalUnitType(pocCurr, m_iLastIDR, isField)); … … 1285 1286 pcSlice->setAssociatedIRAPPOC(m_associatedIRAPPOC); 1286 1287 } 1287 if ((pcSlice->checkThatAllRefPicsAreAvailable(rcListPic, pcSlice->getRPS(), false, m_iLastRecoveryPicPOC, m_pcCfg->getDecodingRefreshType() == 3) != 0) || (pcSlice->isIRAP()) 1288 if ((pcSlice->checkThatAllRefPicsAreAvailable(rcListPic, pcSlice->getRPS(), false, m_iLastRecoveryPicPOC, m_pcCfg->getDecodingRefreshType() == 3) != 0) || (pcSlice->isIRAP()) 1288 1289 || (m_pcCfg->getEfficientFieldIRAPEnabled() && isField && pcSlice->getAssociatedIRAPType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getAssociatedIRAPType() <= NAL_UNIT_CODED_SLICE_CRA && pcSlice->getAssociatedIRAPPOC() == pcSlice->getPOC()+1) 1289 1290 ) … … 1294 1295 pcSlice->applyReferencePictureSet(rcListPic, pcSlice->getRPS()); 1295 1296 1296 if(pcSlice->getTLayer() > 0 1297 if(pcSlice->getTLayer() > 0 1297 1298 && !( pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_N // Check if not a leading picture 1298 1299 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_R … … 1364 1365 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 ) 1365 1366 { 1366 // Some more sophisticated algorithm to determine discardable_flag might be added here. 1367 pcSlice->setDiscardableFlag ( false ); 1368 } 1369 1370 const TComVPS* vps = pcSlice->getVPS(); 1367 // Some more sophisticated algorithm to determine discardable_flag might be added here. 1368 pcSlice->setDiscardableFlag ( false ); 1369 } 1370 1371 const TComVPS* vps = pcSlice->getVPS(); 1371 1372 #if NH_3D 1372 Int numDirectRefLayers = vps ->getNumRefListLayers( getLayerId() ); 1373 Int numDirectRefLayers = vps ->getNumRefListLayers( getLayerId() ); 1373 1374 #else 1374 Int numDirectRefLayers = vps ->getNumDirectRefLayers( getLayerId() ); 1375 Int numDirectRefLayers = vps ->getNumDirectRefLayers( getLayerId() ); 1375 1376 #endif 1376 1377 #if NH_3D 1377 pcSlice->setIvPicLists( m_ivPicLists ); 1378 pcSlice->setIvPicLists( m_ivPicLists ); 1378 1379 1379 1380 Int gopNum = (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid; 1380 GOPEntry gopEntry = m_pcCfg->getGOPEntry( gopNum ); 1381 GOPEntry gopEntry = m_pcCfg->getGOPEntry( gopNum ); 1381 1382 #else 1382 GOPEntry gopEntry = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid ); 1383 #endif 1384 1385 1386 1387 Bool interLayerPredLayerIdcPresentFlag = false; 1383 GOPEntry gopEntry = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid ); 1384 #endif 1385 1386 1387 1388 Bool interLayerPredLayerIdcPresentFlag = false; 1388 1389 if ( getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && numDirectRefLayers > 0 ) 1389 { 1390 pcSlice->setInterLayerPredEnabledFlag ( gopEntry.m_numActiveRefLayerPics > 0 ); 1390 { 1391 pcSlice->setInterLayerPredEnabledFlag ( gopEntry.m_numActiveRefLayerPics > 0 ); 1391 1392 if ( pcSlice->getInterLayerPredEnabledFlag() && numDirectRefLayers > 1 ) 1392 1393 { 1393 1394 if ( !vps->getMaxOneActiveRefLayerFlag() ) 1394 { 1395 pcSlice->setNumInterLayerRefPicsMinus1( gopEntry.m_numActiveRefLayerPics - 1 ); 1395 { 1396 pcSlice->setNumInterLayerRefPicsMinus1( gopEntry.m_numActiveRefLayerPics - 1 ); 1396 1397 } 1397 1398 #if NH_3D … … 1400 1401 if ( gopEntry.m_numActiveRefLayerPics != vps->getNumDirectRefLayers( getLayerId() ) ) 1401 1402 #endif 1402 { 1403 interLayerPredLayerIdcPresentFlag = true; 1403 { 1404 interLayerPredLayerIdcPresentFlag = true; 1404 1405 for (Int i = 0; i < gopEntry.m_numActiveRefLayerPics; i++ ) 1405 1406 { 1406 pcSlice->setInterLayerPredLayerIdc( i, gopEntry.m_interLayerPredLayerIdc[ i ] ); 1407 pcSlice->setInterLayerPredLayerIdc( i, gopEntry.m_interLayerPredLayerIdc[ i ] ); 1407 1408 } 1408 1409 } … … 1411 1412 if ( !interLayerPredLayerIdcPresentFlag ) 1412 1413 { 1413 for( Int i = 0; i < pcSlice->getNumActiveRefLayerPics(); i++ ) 1414 for( Int i = 0; i < pcSlice->getNumActiveRefLayerPics(); i++ ) 1414 1415 { 1415 1416 pcSlice->setInterLayerPredLayerIdc(i, pcSlice->getRefLayerPicIdc( i ) ); … … 1418 1419 1419 1420 1420 assert( pcSlice->getNumActiveRefLayerPics() == gopEntry.m_numActiveRefLayerPics ); 1421 1421 assert( pcSlice->getNumActiveRefLayerPics() == gopEntry.m_numActiveRefLayerPics ); 1422 1422 1423 #if NH_3D 1423 1424 if ( m_pcEncTop->decProcAnnexI() ) 1424 { 1425 pcSlice->deriveInCmpPredAndCpAvailFlag( ); 1425 { 1426 pcSlice->deriveInCmpPredAndCpAvailFlag( ); 1426 1427 if ( pcSlice->getInCmpPredAvailFlag() ) 1427 { 1428 pcSlice->setInCompPredFlag( gopEntry.m_interCompPredFlag ); 1428 { 1429 pcSlice->setInCompPredFlag( gopEntry.m_interCompPredFlag ); 1429 1430 } 1430 1431 else … … 1440 1441 printf( "\nError: Frame%d_l%d cannot enable inter-component prediction on slice level. All reference layers need to be available and at least one tool using inter-component prediction must be enabled in the SPS. \n", gopNum, pcSlice->getVPS()->getLayerIdInVps( getLayerId() ) ); 1441 1442 } 1442 1443 1443 1444 exit(EXIT_FAILURE); 1444 1445 } 1445 1446 } 1446 pcSlice->init3dToolParameters(); 1447 pcSlice->checkInCompPredRefLayers(); 1448 } 1447 pcSlice->init3dToolParameters(); 1448 pcSlice->checkInCompPredRefLayers(); 1449 } 1449 1450 #if NH_3D_IV_MERGE 1450 1451 // This needs to be done after initialization of 3D tool parameters. … … 1453 1454 #endif 1454 1455 1455 pcSlice->createInterLayerReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 1456 pcSlice->createInterLayerReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 1456 1457 pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer0.size() + (Int) m_refPicSetInterLayer1.size()) ) ); 1457 1458 pcSlice->setNumRefIdx(REF_PIC_LIST_1,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer0.size() + (Int) m_refPicSetInterLayer1.size()) ) ); … … 1462 1463 1463 1464 pcSlice->getTempRefPicLists( rcListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true ); 1464 1465 1466 xSetRefPicListModificationsMv( tempRefPicLists, pcSlice, iGOPid ); 1465 1466 1467 xSetRefPicListModificationsMv( tempRefPicLists, pcSlice, iGOPid ); 1467 1468 #else 1468 1469 pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive,pcSlice->getRPS()->getNumberOfPictures())); … … 1470 1471 #endif 1471 1472 // Set reference list 1472 #if NH_MV 1473 pcSlice->setRefPicList( tempRefPicLists, usedAsLongTerm, numPocTotalCurr ); 1473 #if NH_MV 1474 pcSlice->setRefPicList( tempRefPicLists, usedAsLongTerm, numPocTotalCurr ); 1474 1475 #else 1475 1476 pcSlice->setRefPicList ( rcListPic ); … … 1483 1484 #endif 1484 1485 #if NH_3D_IC 1485 pcSlice->setICEnableCandidate( m_aICEnableCandidate ); 1486 pcSlice->setICEnableNum( m_aICEnableNum ); 1486 pcSlice->setICEnableCandidate( m_aICEnableCandidate ); 1487 pcSlice->setICEnableNum( m_aICEnableNum ); 1487 1488 #endif 1488 1489 … … 1491 1492 if ( pcSlice->getSliceType() == B_SLICE ) 1492 1493 { 1493 if( m_pcCfg->getGOPEntry( ( pcSlice->getRapPicFlag() == true && getLayerId() > 0 ) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) 1494 { 1495 pcSlice->setSliceType( P_SLICE ); 1494 if( m_pcCfg->getGOPEntry( ( pcSlice->getRapPicFlag() == true && getLayerId() > 0 ) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) 1495 { 1496 pcSlice->setSliceType( P_SLICE ); 1496 1497 } 1497 1498 } … … 1572 1573 1573 1574 #if NH_3D_VSO 1574 // Should be moved to TEncTop !!! 1575 // Should be moved to TEncTop !!! 1575 1576 Bool bUseVSO = m_pcEncTop->getUseVSO(); 1576 1577 TComRdCost* pcRdCost = m_pcEncTop->getRdCost(); 1577 1578 TComRdCost* pcRdCost = m_pcEncTop->getRdCost(); 1578 1579 1579 1580 pcRdCost->setUseVSO( bUseVSO ); … … 1731 1732 #endif 1732 1733 #if NH_3D 1733 pcSlice->setDepthToDisparityLUTs(); 1734 pcSlice->setDepthToDisparityLUTs(); 1734 1735 1735 1736 #endif … … 1990 1991 cabac_zero_word_padding(pcSlice, pcPic, binCountsInNalUnits, numBytesInVclNalUnits, accessUnit.back()->m_nalUnitData, m_pcCfg->getCabacZeroWordPaddingEnabled()); 1991 1992 #if NH_3D 1992 pcPic->compressMotion(2); 1993 pcPic->compressMotion(2); 1993 1994 #else 1994 1995 pcPic->compressMotion(); … … 2065 2066 pcPic->setReconMark ( true ); 2066 2067 #if NH_MV 2067 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 2068 std::vector<Int> temp; 2069 TComSlice::markCurrPic( pcPic ); 2068 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 2069 std::vector<Int> temp; 2070 TComSlice::markCurrPic( pcPic ); 2070 2071 #endif 2071 2072 m_bFirst = false; … … 2104 2105 //-- all 2105 2106 #if NH_MV 2106 printf( "\n\nSUMMARY -------------------------------------------- LayerId %2d\n", getLayerId() ); 2107 printf( "\n\nSUMMARY -------------------------------------------- LayerId %2d\n", getLayerId() ); 2107 2108 #else 2108 2109 printf( "\n\nSUMMARY --------------------------------------------------------\n" ); … … 2412 2413 #if H_3D_VSO_SYNTH_DIST_OUT 2413 2414 } 2414 #endif 2415 #endif 2415 #endif 2416 #endif 2416 2417 /* calculate the size of the access unit, excluding: 2417 2418 * - any AnnexB contributions (start_code_prefix, zero_byte, etc.,) … … 2536 2537 2537 2538 #if NH_MV 2538 assert( 0 ); // Field coding and MV need to be aligned. 2539 assert( 0 ); // Field coding and MV need to be aligned. 2539 2540 #else 2540 2541 … … 2979 2980 #if NH_MV 2980 2981 Void TEncGOP::xSetRefPicListModificationsMv( std::vector<TComPic*> tempPicLists[2], TComSlice* pcSlice, UInt iGOPid ) 2981 { 2982 2982 { 2983 2983 2984 if( pcSlice->getSliceType() == I_SLICE || !(pcSlice->getPPS()->getListsModificationPresentFlag()) || pcSlice->getNumActiveRefLayerPics() == 0 ) 2984 2985 { 2985 2986 return; 2986 2987 } 2987 2988 2988 2989 GOPEntry ge = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && ( pcSlice->getLayerId( ) > 0) ) ? MAX_GOP : iGOPid ); 2989 assert( ge.m_numActiveRefLayerPics == pcSlice->getNumActiveRefLayerPics() ); 2990 2991 Int numPicsInTempList = pcSlice->getNumRpsCurrTempList(); 2992 2993 // GT: check if SliceType should be checked here. 2990 assert( ge.m_numActiveRefLayerPics == pcSlice->getNumActiveRefLayerPics() ); 2991 2992 Int numPicsInTempList = pcSlice->getNumRpsCurrTempList(); 2993 2994 // GT: check if SliceType should be checked here. 2994 2995 for (Int li = 0; li < 2; li ++) // Loop over lists L0 and L1 2995 2996 { 2996 Int numPicsInFinalRefList = pcSlice->getNumRefIdx( ( li == 0 ) ? REF_PIC_LIST_0 : REF_PIC_LIST_1 ); 2997 2997 Int numPicsInFinalRefList = pcSlice->getNumRefIdx( ( li == 0 ) ? REF_PIC_LIST_0 : REF_PIC_LIST_1 ); 2998 2998 2999 Int finalIdxToTempIdxMap[16]; 2999 3000 for( Int k = 0; k < 16; k++ ) … … 3009 3010 // get position in temp. list 3010 3011 Int refPicLayerId = pcSlice->getRefPicLayerId(k); 3011 Int idxInTempList = 0; 3012 Int idxInTempList = 0; 3012 3013 for (; idxInTempList < numPicsInTempList; idxInTempList++) 3013 3014 { 3014 3015 if ( (tempPicLists[li][idxInTempList])->getLayerId() == refPicLayerId ) 3015 3016 { 3016 break; 3017 break; 3017 3018 } 3018 3019 } 3019 3020 3020 3021 Int idxInFinalList = ge.m_interViewRefPosL[ li ][ k ]; 3021 3022 // Add negative from behind 3023 idxInFinalList = ( idxInFinalList < 0 )? ( numPicsInTempList + idxInFinalList ) : idxInFinalList; 3024 3022 3023 // Add negative from behind 3024 idxInFinalList = ( idxInFinalList < 0 )? ( numPicsInTempList + idxInFinalList ) : idxInFinalList; 3025 3025 3026 Bool curIsModified = ( idxInFinalList != idxInTempList ) && ( ( idxInTempList < numPicsInFinalRefList ) || ( idxInFinalList < numPicsInFinalRefList ) ) ; 3026 3027 if ( curIsModified ) 3027 3028 { 3028 isModified = true; 3029 isModified = true; 3029 3030 assert( finalIdxToTempIdxMap[ idxInFinalList ] == -1 ); // Assert when two inter layer reference pictures are sorted to the same position 3030 3031 } 3031 finalIdxToTempIdxMap[ idxInFinalList ] = idxInTempList; 3032 finalIdxToTempIdxMap[ idxInFinalList ] = idxInTempList; 3032 3033 } 3033 3034 } 3034 3035 3035 3036 TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification(); 3036 refPicListModification->setRefPicListModificationFlagL( li, isModified ); 3037 refPicListModification->setRefPicListModificationFlagL( li, isModified ); 3037 3038 3038 3039 if( isModified ) 3039 3040 { 3040 3041 Int refIdx = 0; 3041 3042 3042 3043 for( Int i = 0; i < numPicsInFinalRefList; i++ ) 3043 3044 { 3044 if( finalIdxToTempIdxMap[i] >= 0 ) 3045 if( finalIdxToTempIdxMap[i] >= 0 ) 3045 3046 { 3046 3047 refPicListModification->setRefPicSetIdxL( li, i, finalIdxToTempIdxMap[i] ); … … 3052 3053 while( ( refIdx < numPicsInTempList ) && ( tempPicLists[li][refIdx]->getLayerId() != getLayerId()) ) 3053 3054 { 3054 refIdx++; 3055 refIdx++; 3055 3056 } 3056 3057 refPicListModification->setRefPicSetIdxL( li, i, refIdx );
Note: See TracChangeset for help on using the changeset viewer.