Changeset 588 in SHVCSoftware for trunk/source
- Timestamp:
- 1 Feb 2014, 23:50:54 (11 years ago)
- Location:
- trunk
- Files:
-
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/SHM-5.0-dev (added) merged: 548-585,587
- Property svn:mergeinfo changed
-
trunk/source
- Property svn:mergeinfo changed
/branches/SHM-5.0-dev/source (added) merged: 549-585 /trunk/source removed
- Property svn:mergeinfo changed
-
trunk/source/App/TAppDecoder/TAppDecCfg.cpp
r547 r588 148 148 #endif 149 149 #if OUTPUT_LAYER_SET_INDEX 150 this->getCommonDecoderParams()->set OutputLayerSetIdx( olsIdx );150 this->getCommonDecoderParams()->setTargetOutputLayerSetIdx( olsIdx ); 151 151 this->getCommonDecoderParams()->setTargetLayerId ( m_tgtLayerId ); 152 152 #endif -
trunk/source/App/TAppDecoder/TAppDecTop.cpp
r540 r588 81 81 } 82 82 #if SVC_EXTENSION 83 for( Int i = 0; i < m_tgtLayerId; i++ )83 for( Int i = 0; i <= m_tgtLayerId; i++ ) 84 84 { 85 85 if( m_pchReconFile[i] ) -
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r547 r588 80 80 { 81 81 m_acLayerCfg[layer].setAppEncCfg(this); 82 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG83 m_ilSampleOnlyPred[layer] = 0;84 #endif85 82 } 86 83 memset( m_scalabilityMask, 0, sizeof(m_scalabilityMask) ); … … 146 143 { 147 144 #if VPS_EXTN_DIRECT_REF_LAYERS 148 #if M0457_PREDICTION_INDICATIONS149 145 for(Int layer = 0; layer < MAX_LAYERS; layer++) 150 146 { … … 152 148 { 153 149 delete [] m_acLayerCfg[layer].m_samplePredRefLayerIds; 154 } 155 } 156 for(Int layer = 0; layer < MAX_LAYERS; layer++) 157 { 150 m_acLayerCfg[layer].m_samplePredRefLayerIds = NULL; 151 } 158 152 if( m_acLayerCfg[layer].m_numMotionPredRefLayers > 0 ) 159 153 { 160 154 delete [] m_acLayerCfg[layer].m_motionPredRefLayerIds; 161 } 162 } 163 #else 164 for(Int layer = 0; layer < MAX_LAYERS; layer++) 165 { 166 if( m_acLayerCfg[layer].m_numDirectRefLayers > 0 ) 167 { 168 delete [] m_acLayerCfg[layer].m_refLayerIds; 169 } 170 } 171 #endif 172 for(Int layer = 0; layer < MAX_LAYERS; layer++) 173 { 155 m_acLayerCfg[layer].m_motionPredRefLayerIds = NULL; 156 } 174 157 if( m_acLayerCfg[layer].m_numActiveRefLayers > 0 ) 175 158 { 176 159 delete [] m_acLayerCfg[layer].m_predLayerIds; 160 m_acLayerCfg[layer].m_predLayerIds = NULL; 177 161 } 178 162 } … … 383 367 #endif 384 368 #if VPS_EXTN_DIRECT_REF_LAYERS 385 #if M0457_PREDICTION_INDICATIONS386 369 Int* cfg_numSamplePredRefLayers [MAX_LAYERS]; 387 370 string cfg_samplePredRefLayerIds [MAX_LAYERS]; … … 390 373 string cfg_motionPredRefLayerIds [MAX_LAYERS]; 391 374 string* cfg_motionPredRefLayerIdsPtr[MAX_LAYERS]; 392 #else393 Int* cfg_numDirectRefLayers [MAX_LAYERS];394 string cfg_refLayerIds [MAX_LAYERS];395 string* cfg_refLayerIdsPtr [MAX_LAYERS];396 #endif397 375 Int* cfg_numActiveRefLayers [MAX_LAYERS]; 398 376 string cfg_predLayerIds [MAX_LAYERS]; … … 462 440 #endif 463 441 #if VPS_EXTN_DIRECT_REF_LAYERS 464 #if M0457_PREDICTION_INDICATIONS465 442 cfg_numSamplePredRefLayers [layer] = &m_acLayerCfg[layer].m_numSamplePredRefLayers; 466 443 cfg_samplePredRefLayerIdsPtr[layer] = &cfg_samplePredRefLayerIds[layer]; 467 444 cfg_numMotionPredRefLayers [layer] = &m_acLayerCfg[layer].m_numMotionPredRefLayers; 468 445 cfg_motionPredRefLayerIdsPtr[layer] = &cfg_motionPredRefLayerIds[layer]; 469 #else470 cfg_numDirectRefLayers [layer] = &m_acLayerCfg[layer].m_numDirectRefLayers;471 cfg_refLayerIdsPtr [layer] = &cfg_refLayerIds[layer];472 #endif473 446 cfg_numActiveRefLayers [layer] = &m_acLayerCfg[layer].m_numActiveRefLayers; 474 447 cfg_predLayerIdsPtr [layer] = &cfg_predLayerIds[layer]; … … 551 524 #endif 552 525 #if VPS_EXTN_DIRECT_REF_LAYERS 553 #if M0457_PREDICTION_INDICATIONS554 526 ("NumSamplePredRefLayers%d",cfg_numSamplePredRefLayers, -1, MAX_LAYERS, "Number of sample prediction reference layers") 555 527 ("SamplePredRefLayerIds%d", cfg_samplePredRefLayerIdsPtr, string(""), MAX_LAYERS, "sample pred reference layer IDs") 556 528 ("NumMotionPredRefLayers%d",cfg_numMotionPredRefLayers, -1, MAX_LAYERS, "Number of motion prediction reference layers") 557 529 ("MotionPredRefLayerIds%d", cfg_motionPredRefLayerIdsPtr, string(""), MAX_LAYERS, "motion pred reference layer IDs") 558 #else559 ("NumDirectRefLayers%d", cfg_numDirectRefLayers, -1, MAX_LAYERS, "Number of direct reference layers")560 ("RefLayerIds%d", cfg_refLayerIdsPtr, string(""), MAX_LAYERS, "direct reference layer IDs")561 #endif562 530 ("NumActiveRefLayers%d", cfg_numActiveRefLayers, -1, MAX_LAYERS, "Number of active reference layers") 563 531 ("PredLayerIds%d", cfg_predLayerIdsPtr, string(""), MAX_LAYERS, "inter-layer prediction layer IDs") … … 619 587 #endif 620 588 #if N0147_IRAP_ALIGN_FLAG 621 ("CrossLayerIrapAlignFlag", m_crossLayerIrapAlignFlag, true, "align IRAP across layers" ) 589 ("CrossLayerIrapAlignFlag", m_crossLayerIrapAlignFlag, true, "align IRAP across layers" ) 590 #endif 591 #if O0194_WEIGHTED_PREDICTION_CGS 592 ("InterLayerWeightedPred", m_useInterLayerWeightedPred, false, "enable IL WP parameters estimation at encoder" ) 622 593 #endif 623 594 #if AVC_BASE … … 629 600 #endif 630 601 ("EnableElRapB,-use-rap-b", m_elRapSliceBEnabled, 0, "Set ILP over base-layer I picture to B picture (default is P picture)") 631 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG632 ("IlSampleOnlyPred%d", m_ilSampleOnlyPred, 0, MAX_LAYERS, "Set inter_layer_sample_pred_only_flag for all slices")633 #endif634 602 #else //SVC_EXTENSION 635 603 ("InputFile,i", cfg_InputFile, string(""), "Original YUV input file name") … … 956 924 ("SEIGradualDecodingRefreshInfo", m_gradualDecodingRefreshInfoEnabled, 0, "Control generation of gradual decoding refresh information SEI message") 957 925 ("SEIDecodingUnitInfo", m_decodingUnitInfoSEIEnabled, 0, "Control generation of decoding unit information SEI message.") 958 #if M0043_LAYERS_PRESENT_SEI959 ("SEILayers Present", m_layersPresentSEIEnabled, 0, "Control generation of layerspresent SEI message")926 #if LAYERS_NOT_PRESENT_SEI 927 ("SEILayersNotPresent", m_layersNotPresentSEIEnabled, 0, "Control generation of layers not present SEI message") 960 928 #endif 961 929 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, 0, "Control generation of SOP description SEI messages") … … 1190 1158 } 1191 1159 #if VPS_EXTN_DIRECT_REF_LAYERS 1192 #if M0457_PREDICTION_INDICATIONS1193 1160 for(Int layer = 0; layer < MAX_LAYERS; layer++) 1194 1161 { … … 1253 1220 } 1254 1221 } 1255 #else 1256 for(Int layer = 0; layer < MAX_LAYERS; layer++) 1257 { 1258 Char* pRefLayerIds = cfg_refLayerIds[layer].empty() ? NULL: strdup(cfg_refLayerIds[layer].c_str()); 1259 if( m_acLayerCfg[layer].m_numDirectRefLayers > 0 ) 1260 { 1261 char *refLayerId; 1262 int i=0; 1263 m_acLayerCfg[layer].m_refLayerIds = new Int[m_acLayerCfg[layer].m_numDirectRefLayers]; 1264 refLayerId = strtok(pRefLayerIds, " ,-"); 1265 while(refLayerId != NULL) 1266 { 1267 if( i >= m_acLayerCfg[layer].m_numDirectRefLayers ) 1268 { 1269 printf( "NumDirectRefLayers: The number of columns whose width are defined is larger than the allowed number of columns.\n" ); 1270 exit( EXIT_FAILURE ); 1271 } 1272 *( m_acLayerCfg[layer].m_refLayerIds + i ) = atoi( refLayerId ); 1273 refLayerId = strtok(NULL, " ,-"); 1274 i++; 1275 } 1276 if( i < m_acLayerCfg[layer].m_numDirectRefLayers ) 1277 { 1278 printf( "NumDirectRefLayers: The width of some columns is not defined.\n" ); 1279 exit( EXIT_FAILURE ); 1280 } 1281 } 1282 else 1283 { 1284 m_acLayerCfg[layer].m_refLayerIds = NULL; 1285 } 1286 } 1287 #endif 1222 1288 1223 #if AUXILIARY_PICTURES 1289 1224 for(UInt layer = 0; layer < MAX_LAYERS; layer++) … … 2231 2166 } 2232 2167 #if VPS_EXTN_DIRECT_REF_LAYERS 2233 #if M0457_PREDICTION_INDICATIONS2234 2168 xConfirmPara( (m_acLayerCfg[0].m_numSamplePredRefLayers != 0) && (m_acLayerCfg[0].m_numSamplePredRefLayers != -1), "Layer 0 cannot have any reference layers" ); 2235 2169 // NOTE: m_numSamplePredRefLayers (for any layer) could be -1 (not signalled in cfg), in which case only the "previous layer" would be taken for reference … … 2254 2188 } 2255 2189 } 2256 #else 2257 xConfirmPara( (m_acLayerCfg[0].m_numDirectRefLayers != 0) && (m_acLayerCfg[0].m_numDirectRefLayers != -1), "Layer 0 cannot have any reference layers" ); 2258 // NOTE: m_numDirectRefLayers (for any layer) could be -1 (not signalled in cfg), in which case only the "previous layer" would be taken for reference 2259 for(Int layer = 1; layer < MAX_LAYERS; layer++) 2260 { 2261 xConfirmPara(m_acLayerCfg[layer].m_numDirectRefLayers > layer, "Cannot reference more layers than before current layer"); 2262 for(Int i = 0; i < m_acLayerCfg[layer].m_numDirectRefLayers; i++) 2263 { 2264 xConfirmPara(m_acLayerCfg[layer].m_refLayerIds[i] > layer, "Cannot reference higher layers"); 2265 xConfirmPara(m_acLayerCfg[layer].m_refLayerIds[i] == layer, "Cannot reference the current layer itself"); 2266 } 2267 } 2268 #endif 2190 2269 2191 xConfirmPara( (m_acLayerCfg[0].m_numActiveRefLayers != 0) && (m_acLayerCfg[0].m_numActiveRefLayers != -1), "Layer 0 cannot have any active reference layers" ); 2270 2192 // NOTE: m_numActiveRefLayers (for any layer) could be -1 (not signalled in cfg), in which case only the "previous layer" would be taken for reference 2271 2193 for(Int layer = 1; layer < MAX_LAYERS; layer++) 2272 2194 { 2273 #if M0457_PREDICTION_INDICATIONS2274 2195 Bool predEnabledFlag[MAX_LAYERS]; 2275 2196 for (Int refLayer = 0; refLayer < layer; refLayer++) … … 2295 2216 xConfirmPara(m_acLayerCfg[layer].m_predLayerIds[i] >= numDirectRefLayers, "Cannot reference higher layers"); 2296 2217 } 2297 #else 2298 xConfirmPara(m_acLayerCfg[layer].m_numActiveRefLayers > m_acLayerCfg[layer].m_numDirectRefLayers, "Cannot reference more layers than NumDirectRefLayers"); 2299 for(Int i = 0; i < m_acLayerCfg[layer].m_numActiveRefLayers; i++) 2300 { 2301 xConfirmPara(m_acLayerCfg[layer].m_predLayerIds[i] >= m_acLayerCfg[layer].m_numDirectRefLayers, "Cannot reference higher layers"); 2302 } 2303 #endif 2304 } 2305 #endif 2218 } 2219 #endif //VPS_EXTN_DIRECT_REF_LAYERS 2306 2220 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 2307 2221 if (m_adaptiveResolutionChange > 0) … … 2435 2349 #if N0147_IRAP_ALIGN_FLAG 2436 2350 printf("Cross layer IRAP alignment : %d\n", m_crossLayerIrapAlignFlag ); 2351 #endif 2352 #if O0194_WEIGHTED_PREDICTION_CGS 2353 printf("InterLayerWeightedPred : %d\n", m_useInterLayerWeightedPred ); 2437 2354 #endif 2438 2355 for(UInt layer=0; layer<m_numLayers; layer++) … … 2581 2498 printf("O0194_DIFFERENT_BITDEPTH_EL_BL: %d ", O0194_DIFFERENT_BITDEPTH_EL_BL); 2582 2499 printf("O0194_JOINT_US_BITSHIFT: %d ", O0194_JOINT_US_BITSHIFT); 2583 printf("O0194_WEIGHTED_PREDICTION_CGS: %d ",O0194_WEIGHTED_PREDICTION_CGS);2584 2500 #else 2585 2501 printf("RecalQP:%d", m_recalculateQPAccordingToLambda ? 1 : 0 ); -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r540 r588 72 72 #if AVC_SYNTAX 73 73 Char* m_BLSyntaxFile; ///< input syntax file 74 #endif75 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG76 Int m_ilSampleOnlyPred[ MAX_LAYERS ];77 74 #endif 78 75 #if N0120_MAX_TID_REF_CFG … … 283 280 Int m_gradualDecodingRefreshInfoEnabled; 284 281 Int m_decodingUnitInfoSEIEnabled; 285 #if M0043_LAYERS_PRESENT_SEI286 Int m_layers PresentSEIEnabled;282 #if LAYERS_NOT_PRESENT_SEI 283 Int m_layersNotPresentSEIEnabled; 287 284 #endif 288 285 Int m_SOPDescriptionSEIEnabled; … … 384 381 #endif 385 382 #if O0215_PHASE_ALIGNMENT 386 Bool m_phaseAlignFlag;383 Bool m_phaseAlignFlag; 387 384 #endif 388 385 #if O0223_PICTURE_TYPES_ALIGN_FLAG 389 Bool m_crossLayerPictureTypeAlignFlag;386 Bool m_crossLayerPictureTypeAlignFlag; 390 387 #endif 391 388 #if N0147_IRAP_ALIGN_FLAG 392 Bool m_crossLayerIrapAlignFlag;389 Bool m_crossLayerIrapAlignFlag; 393 390 #endif 394 391 #if O0149_CROSS_LAYER_BLA_FLAG 395 bool m_crossLayerBLAFlag; 392 Bool m_crossLayerBLAFlag; 393 #endif 394 #if O0194_WEIGHTED_PREDICTION_CGS 395 Bool m_useInterLayerWeightedPred; 396 396 #endif 397 397 public: -
trunk/source/App/TAppEncoder/TAppEncLayerCfg.h
r540 r588 48 48 #endif 49 49 #if VPS_EXTN_DIRECT_REF_LAYERS 50 #if M0457_PREDICTION_INDICATIONS51 50 Int *m_samplePredRefLayerIds; 52 51 Int m_numSamplePredRefLayers; 53 52 Int *m_motionPredRefLayerIds; 54 53 Int m_numMotionPredRefLayers; 55 #else56 Int *m_refLayerIds;57 Int m_numDirectRefLayers;58 #endif59 54 Int *m_predLayerIds; 60 55 Int m_numActiveRefLayers; … … 153 148 Int* getdQPs() {return m_aidQP; } 154 149 #if VPS_EXTN_DIRECT_REF_LAYERS 155 #if M0457_PREDICTION_INDICATIONS156 150 Int getNumSamplePredRefLayers() {return m_numSamplePredRefLayers; } 157 151 Int* getSamplePredRefLayerIds() {return m_samplePredRefLayerIds; } … … 160 154 Int* getMotionPredRefLayerIds() {return m_motionPredRefLayerIds; } 161 155 Int getMotionPredRefLayerId(Int i) {return m_motionPredRefLayerIds[i]; } 162 #else163 Int getNumDirectRefLayers() {return m_numDirectRefLayers;}164 Int* getRefLayerIds() {return m_refLayerIds; }165 Int getRefLayerId(Int i) {return m_refLayerIds[i]; }166 #endif167 156 168 157 Int getNumActiveRefLayers() {return m_numActiveRefLayers;} -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r547 r588 177 177 delete [] mapIdxToLayer; 178 178 #endif 179 179 180 for(UInt layer=0; layer<m_numLayers; layer++) 180 181 { … … 190 191 g_bitDepthYLayer[layer] = g_bitDepthY; 191 192 g_bitDepthCLayer[layer] = g_bitDepthC; 193 194 #if O0194_WEIGHTED_PREDICTION_CGS 195 m_acTEncTop[layer].setInterLayerWeightedPredFlag( m_useInterLayerWeightedPred ); 196 #endif 192 197 #endif 193 198 //m_acTEncTop[layer].setVPS(&vps); … … 209 214 #if REF_IDX_MFM 210 215 #if AVC_BASE 211 #if M0457_PREDICTION_INDICATIONS212 216 m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_avcBaseLayerFlag ? AVC_SYNTAX : true ) && m_acLayerCfg[layer].getNumMotionPredRefLayers()); 213 217 #else 214 m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_avcBaseLayerFlag ? AVC_SYNTAX : true ));215 #endif216 #else217 #if M0457_PREDICTION_INDICATIONS218 218 m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_acLayerCfg[layer].getNumMotionPredRefLayers() > 0 ) ); 219 #else220 m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : true);221 #endif222 #endif223 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG224 m_acTEncTop[layer].setIlSampleOnlyPred( layer == 0 ? 0 : m_ilSampleOnlyPred[layer] );225 219 #endif 226 220 #endif … … 261 255 if(layer) 262 256 { 263 #if M0457_PREDICTION_INDICATIONS264 257 for(Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1; i++) 265 258 { … … 309 302 } 310 303 m_acTEncTop[layer].setNumDirectRefLayers(numDirectRefLayers); 311 #else 312 if(m_acLayerCfg[layer].getNumDirectRefLayers() == -1) 313 { 314 // Not included in the configuration file; assume that each layer depends on previous layer 315 m_acTEncTop[layer].setNumDirectRefLayers (1); // One ref. layer 316 m_acTEncTop[layer].setRefLayerId (0, layer - 1); // Previous layer 317 } 318 else 319 { 320 m_acTEncTop[layer].setNumDirectRefLayers ( m_acLayerCfg[layer].getNumDirectRefLayers() ); 321 for(Int i = 0; i < m_acTEncTop[layer].getNumDirectRefLayers(); i++) 322 { 323 m_acTEncTop[layer].setRefLayerId ( i, m_acLayerCfg[layer].getRefLayerId(i)); 324 } 325 } 326 #endif 304 327 305 if(m_acLayerCfg[layer].getNumActiveRefLayers() == -1) 328 306 { 329 #if M0457_PREDICTION_INDICATIONS330 307 m_acTEncTop[layer].setNumActiveRefLayers( m_acTEncTop[layer].getNumDirectRefLayers() ); 331 #else332 m_acTEncTop[layer].setNumActiveRefLayers( m_acLayerCfg[layer].getNumDirectRefLayers() );333 #endif334 308 for( Int i = 0; i < m_acTEncTop[layer].getNumActiveRefLayers(); i++ ) 335 309 { … … 346 320 } 347 321 } 348 #endif 322 #endif //VPS_EXTN_DIRECT_REF_LAYERS 349 323 //===== Slice ======== 350 324 … … 426 400 m_acTEncTop[layer].setWPBiPred ( m_useWeightedBiPred ); 427 401 #if O0194_WEIGHTED_PREDICTION_CGS 428 if (layer!=0)402 if( layer != 0 && m_useInterLayerWeightedPred ) 429 403 { 430 404 // Enable weighted prediction for enhancement layer … … 514 488 m_acTEncTop[layer].setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled ); 515 489 m_acTEncTop[layer].setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled ); 516 #if M0043_LAYERS_PRESENT_SEI517 m_acTEncTop[layer].setLayers PresentSEIEnabled( m_layersPresentSEIEnabled );490 #if LAYERS_NOT_PRESENT_SEI 491 m_acTEncTop[layer].setLayersNotPresentSEIEnabled( m_layersNotPresentSEIEnabled ); 518 492 #endif 519 493 m_acTEncTop[layer].setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); … … 828 802 m_cTEncTop.setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled ); 829 803 m_cTEncTop.setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled ); 830 #if M0043_LAYERS_PRESENT_SEI831 m_cTEncTop.setLayers PresentSEIEnabled( m_layersPresentSEIEnabled );804 #if LAYERS_NOT_PRESENT_SEI 805 m_cTEncTop.setLayersNotPresentSEIEnabled( m_layersNotPresentSEIEnabled ); 832 806 #endif 833 807 m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); … … 1171 1145 vps->setNumOutputLayerSets(vps->getNumLayerSets()); 1172 1146 vps->setNumProfileTierLevel(vps->getNumLayerSets()); 1147 #if P0295_DEFAULT_OUT_LAYER_IDC 1148 vps->setDefaultTargetOutputLayerIdc(1); 1149 #else 1173 1150 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC 1174 1151 vps->setDefaultOneTargetOutputLayerIdc(1); 1175 1152 #else 1176 1153 vps->setDefaultOneTargetOutputLayerFlag(true); 1154 #endif 1177 1155 #endif 1178 1156 for(i = 1; i < vps->getNumLayerSets(); i++) … … 1199 1177 vps->deriveLayerIdListVariables(); 1200 1178 #endif 1179 #if RESOLUTION_BASED_DPB 1180 vps->assignSubDpbIndices(); 1181 #else 1201 1182 vps->deriveNumberOfSubDpbs(); 1183 #endif 1202 1184 // Initialize dpb_size_table() for all ouput layer sets in the VPS extension 1203 1185 for(i = 1; i < vps->getNumOutputLayerSets(); i++) 1204 1186 { 1187 #if CHANGE_NUMSUBDPB_IDX 1188 Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx( i ); 1189 #endif 1205 1190 Int layerSetId = vps->getOutputLayerSetIdx(i); 1206 1191 1207 // For each output layer set, set the DPB size for each layer and the reorder/latency value the maximum for all layers1208 Bool checkFlagOuter = false; // Used to calculate sub_layer_flag_info_present_flag1209 Bool checkFlagInner[MAX_TLAYER]; // Used to calculate sub_layer_dpb_info_present_flag1210 1211 1192 for(Int j = 0; j < vps->getMaxTLayers(); j++) 1212 1193 { 1213 1194 1214 1195 Int maxNumReorderPics = -1; 1196 #if CHANGE_NUMSUBDPB_IDX 1197 #if RESOLUTION_BASED_DPB 1198 for(Int k = 0; k < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet); k++) 1199 #else 1200 for(Int k = 0; k < vps->getNumSubDpbs(layerSetIdxForOutputLayerSet); k++) 1201 #endif 1202 #else 1215 1203 for(Int k = 0; k < vps->getNumSubDpbs(i); k++) 1204 #endif 1216 1205 { 1217 1206 Int layerId = vps->getLayerSetLayerIdList(layerSetId, k); // k-th layer in the output layer set 1207 #if RESOLUTION_BASED_DPB 1208 vps->setMaxVpsLayerDecPicBuffMinus1( i, k, j, m_acTEncTop[layerId].getMaxDecPicBuffering(j) - 1 ); 1209 // Add sub-DPB sizes of layers belonging to a sub-DPB. If a different sub-DPB size is calculated 1210 // at the encoder, modify below 1211 Int oldValue = vps->getMaxVpsDecPicBufferingMinus1( i, vps->getSubDpbAssigned( layerSetIdxForOutputLayerSet, k ), j ); 1212 oldValue += vps->getMaxVpsLayerDecPicBuffMinus1( i, k, j ); 1213 vps->setMaxVpsDecPicBufferingMinus1( i, vps->getSubDpbAssigned( layerSetIdxForOutputLayerSet, k ), j, oldValue ); 1214 #else 1218 1215 vps->setMaxVpsDecPicBufferingMinus1( i, k, j, m_acTEncTop[layerId].getMaxDecPicBuffering(j) - 1 ); 1216 #endif 1219 1217 maxNumReorderPics = std::max( maxNumReorderPics, m_acTEncTop[layerId].getNumReorderPics(j)); 1220 1218 } 1221 1219 vps->setMaxVpsNumReorderPics(i, j, maxNumReorderPics); 1222 1223 if( j == 0 ) // checkFlagInner[0] is always 1 1224 { 1225 checkFlagInner[j] = true; // Always signal sub-layer DPB information for the first sub-layer 1226 } 1227 else 1228 { 1229 checkFlagInner[j] = false; // Initialize to be false. If the values of the current sub-layers matches with the earlier sub-layer, 1230 // then will be continue to be false - i.e. the j-th sub-layer DPB info is not signaled 1231 checkFlagInner[j] |= ( maxNumReorderPics != vps->getMaxVpsNumReorderPics(i, j - 1) ); 1232 for(Int k = 0; k < vps->getNumSubDpbs(i) && !checkFlagInner[j]; k++) // If checkFlagInner[j] is true, break and signal the values 1233 { 1234 checkFlagInner[j] |= ( vps->getMaxVpsDecPicBufferingMinus1(i, k, j - 1) != vps->getMaxVpsDecPicBufferingMinus1(i, k, j) ); 1235 } 1236 } 1237 // If checkFlagInner[j] = true, then some value needs to be signalled for the j-th sub-layer 1238 vps->setSubLayerDpbInfoPresentFlag( i, j, checkFlagInner[j] ); 1239 } 1240 for(Int j = 1; j < vps->getMaxTLayers(); j++) // Check if DPB info of any of non-zero sub-layers is signaled. If so set flag to one 1241 { 1242 if( vps->getSubLayerDpbInfoPresentFlag(i, j) ) 1243 { 1244 checkFlagOuter = true; 1245 break; 1246 } 1247 } 1248 vps->setSubLayerFlagInfoPresentFlag( i, checkFlagOuter ); 1220 vps->determineSubDpbInfoFlags(); 1221 } 1249 1222 } 1250 1223 #endif … … 1274 1247 vps->setDirectDependencyFlag( layerCtr, vps->getLayerIdInVps(m_acTEncTop[layerCtr].getRefLayerId(i)), true); 1275 1248 } 1276 #if M0457_PREDICTION_INDICATIONS 1249 // prediction indications 1277 1250 vps->setDirectDepTypeLen(2); // sample and motion types are encoded 1278 1251 for(Int refLayerCtr = 0; refLayerCtr < layerCtr; refLayerCtr++) … … 1301 1274 } 1302 1275 } 1303 #endif1304 1276 } 1305 1277 … … 1318 1290 #endif 1319 1291 #endif 1320 #if JCTVC_M0458_INTERLAYER_RPS_SIG1321 1292 vps->setMaxOneActiveRefLayerFlag(maxDirectRefLayers > 1 ? false : true); 1322 #endif1323 1293 #if O0062_POC_LSB_NOT_PRESENT_FLAG 1324 1294 for(i = 1; i< vps->getMaxLayers(); i++) … … 1361 1331 vps->setHigherLayerIrapSkipFlag(m_skipPictureAtArcSwitch); 1362 1332 #endif 1333 #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED 1363 1334 #if !VPS_EXTN_OFFSET_CALC 1364 1335 #if VPS_EXTN_OFFSET 1365 1336 // to be updated according to the current semantics 1366 1337 vps->setExtensionOffset( 0xffff ); 1338 #endif 1367 1339 #endif 1368 1340 #endif … … 1653 1625 if(iTotalNumEncoded) 1654 1626 { 1627 #if P0130_EOB 1628 if( bEos ) 1629 { 1630 OutputNALUnit nalu(NAL_UNIT_EOB); 1631 nalu.m_layerId = 0; 1632 1633 AccessUnit& accessUnit = outputAccessUnits.back(); 1634 nalu.m_temporalId = accessUnit.front()->m_temporalId; 1635 accessUnit.push_back(new NALUnitEBSP(nalu)); 1636 } 1637 #endif 1655 1638 xWriteStream(bitstreamFile, iTotalNumEncoded, outputAccessUnits); 1656 1639 outputAccessUnits.clear(); -
trunk/source/Lib/TLibCommon/CommonDef.h
r540 r588 57 57 #if SVC_EXTENSION 58 58 #include <vector> 59 #define NV_VERSION " 4.1" ///< Current software version59 #define NV_VERSION "5.0 (HM-12.1)" ///< Current software version 60 60 #else 61 61 #define NV_VERSION "12.1" ///< Current software version … … 284 284 { 285 285 Int m_targetLayerId; 286 Int m_ outputLayerSetIdx;286 Int m_targetOutputLayerSetIdx; 287 287 std::vector<Int> *m_targetDecLayerIdSet; 288 288 Bool m_valueCheckedFlag; … … 290 290 CommonDecoderParams(): 291 291 m_targetLayerId(0) 292 , m_ outputLayerSetIdx(-1)292 , m_targetOutputLayerSetIdx(-1) 293 293 , m_targetDecLayerIdSet(NULL) 294 294 , m_valueCheckedFlag(false) … … 298 298 Int getTargetLayerId() { return m_targetLayerId;} 299 299 300 Void set OutputLayerSetIdx(const Int x) { m_outputLayerSetIdx = x; }301 Int get OutputLayerSetIdx() { return m_outputLayerSetIdx;}300 Void setTargetOutputLayerSetIdx(const Int x) { m_targetOutputLayerSetIdx = x; } 301 Int getTargetOutputLayerSetIdx() { return m_targetOutputLayerSetIdx;} 302 302 303 303 Void setTargetDecLayerIdSet(std::vector<Int> *x) { m_targetDecLayerIdSet = x; } -
trunk/source/Lib/TLibCommon/SEI.cpp
r313 r588 41 41 //Table D-7 Meaning of camera iso sensitivity indicator and exposure index rating indicator 42 42 Int Table_exp_indicator[32] = {0, 10, 12, 16, 20, 25, 32, 40, 50, 64, 80, 100, 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 8000, -1}; 43 44 #if SUB_BITSTREAM_PROPERTY_SEI 45 SEISubBitstreamProperty::SEISubBitstreamProperty() 46 { 47 m_activeVpsId = -1; 48 m_numAdditionalSubStreams = 0; 49 ::memset(m_subBitstreamMode , 0, sizeof(m_subBitstreamMode)); 50 ::memset(m_outputLayerSetIdxToVps , 0, sizeof(m_outputLayerSetIdxToVps)); 51 ::memset(m_highestSublayerId , 0, sizeof(m_highestSublayerId)); 52 ::memset(m_avgBitRate , 0, sizeof(m_avgBitRate)); 53 ::memset(m_maxBitRate , 0, sizeof(m_maxBitRate)); 54 } 55 #endif 43 56 44 57 SEIMessages getSeisByType(SEIMessages &seiList, SEI::PayloadType seiType) -
trunk/source/Lib/TLibCommon/SEI.h
r442 r588 72 72 SCALABLE_NESTING = 133, 73 73 REGION_REFRESH_INFO = 134, 74 #if M0043_LAYERS_PRESENT_SEI75 LAYERS_ PRESENT= 137,74 #if LAYERS_NOT_PRESENT_SEI 75 LAYERS_NOT_PRESENT = 137, 76 76 #endif 77 77 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 78 78 INTER_LAYER_CONSTRAINED_TILE_SETS = 138 79 #endif 80 #if SUB_BITSTREAM_PROPERTY_SEI 81 ,SUB_BITSTREAM_PROPERTY = 139 // Final PayloadType to be defined after finalization 79 82 #endif 80 83 }; … … 319 322 }; 320 323 321 #if M0043_LAYERS_PRESENT_SEI322 class SEILayers Present : public SEI323 { 324 public: 325 PayloadType payloadType() const { return LAYERS_ PRESENT; }326 327 SEILayers Present() {}328 virtual ~SEILayers Present() {}324 #if LAYERS_NOT_PRESENT_SEI 325 class SEILayersNotPresent : public SEI 326 { 327 public: 328 PayloadType payloadType() const { return LAYERS_NOT_PRESENT; } 329 330 SEILayersNotPresent() {} 331 virtual ~SEILayersNotPresent() {} 329 332 330 333 UInt m_activeVpsId; 331 334 UInt m_vpsMaxLayers; 332 Bool m_layer PresentFlag[MAX_LAYERS];335 Bool m_layerNotPresentFlag[MAX_LAYERS]; 333 336 }; 334 337 #endif … … 407 410 #endif 408 411 412 #if SUB_BITSTREAM_PROPERTY_SEI 413 class SEISubBitstreamProperty : public SEI 414 { 415 public: 416 PayloadType payloadType() const { return SUB_BITSTREAM_PROPERTY; } 417 418 SEISubBitstreamProperty(); 419 virtual ~SEISubBitstreamProperty() {} 420 421 Int m_activeVpsId; 422 Int m_numAdditionalSubStreams; 423 Int m_subBitstreamMode [MAX_SUB_STREAMS]; 424 Int m_outputLayerSetIdxToVps [MAX_SUB_STREAMS]; 425 Int m_highestSublayerId [MAX_SUB_STREAMS]; 426 Int m_avgBitRate [MAX_SUB_STREAMS]; 427 Int m_maxBitRate [MAX_SUB_STREAMS]; 428 }; 429 #endif 409 430 410 431 typedef std::list<SEI*> SEIMessages; -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r540 r588 3438 3438 3439 3439 // use coldir. 3440 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING3441 TComPic *pColPic;3442 if (m_layerId > 0 && getSlice()->getAltColIndicationFlag())3443 {3444 pColPic = getSlice()->getMotionPredIlp();3445 }3446 else3447 {3448 pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx());3449 }3450 #else3451 3440 TComPic *pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx()); 3452 #endif3453 3441 TComDataCU *pColCU = pColPic->getCU( uiCUAddr ); 3454 3442 if(pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==SIZE_NONE) -
trunk/source/Lib/TLibCommon/TComRom.cpp
r540 r588 530 530 Int g_mvScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; 531 531 Int g_posScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; 532 533 std::string NaluToStr( NalUnitType nalu ) 534 { 535 switch( nalu ) 536 { 537 case NAL_UNIT_CODED_SLICE_TRAIL_N: 538 case NAL_UNIT_CODED_SLICE_TRAIL_R: 539 return "TRAIL"; 540 541 case NAL_UNIT_CODED_SLICE_TSA_N: 542 case NAL_UNIT_CODED_SLICE_TSA_R: 543 return " TSA"; 544 545 case NAL_UNIT_CODED_SLICE_STSA_N: 546 case NAL_UNIT_CODED_SLICE_STSA_R: 547 return " STSA"; 548 549 case NAL_UNIT_CODED_SLICE_RADL_N: 550 case NAL_UNIT_CODED_SLICE_RADL_R: 551 return " RADL"; 552 553 case NAL_UNIT_CODED_SLICE_RASL_N: 554 case NAL_UNIT_CODED_SLICE_RASL_R: 555 return " RASL"; 556 557 case NAL_UNIT_CODED_SLICE_BLA_W_LP: 558 case NAL_UNIT_CODED_SLICE_BLA_W_RADL: 559 case NAL_UNIT_CODED_SLICE_BLA_N_LP: 560 return " BLA"; 561 562 case NAL_UNIT_CODED_SLICE_IDR_W_RADL: 563 case NAL_UNIT_CODED_SLICE_IDR_N_LP: 564 return " IDR"; 565 566 case NAL_UNIT_CODED_SLICE_CRA: 567 return " CRA"; 568 569 default: 570 return " "; 571 }; 572 } 532 573 #endif 533 574 -
trunk/source/Lib/TLibCommon/TComRom.h
r540 r588 288 288 #if SVC_EXTENSION 289 289 extern Int g_mvScalingFactor [MAX_LAYERS][2]; 290 extern Int g_posScalingFactor [MAX_LAYERS][2]; 290 extern Int g_posScalingFactor [MAX_LAYERS][2]; 291 std::string NaluToStr( NalUnitType nalu ); 291 292 #endif 292 293 -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r547 r588 117 117 #if SVC_EXTENSION 118 118 memset( m_pcBaseColPic, 0, sizeof( m_pcBaseColPic ) ); 119 #if JCTVC_M0458_INTERLAYER_RPS_SIG120 119 m_activeNumILRRefIdx = 0; 121 120 m_interLayerPredEnabledFlag = 0; 122 121 ::memset( m_interLayerPredLayerIdc, 0, sizeof(m_interLayerPredLayerIdc) ); 123 #else124 m_numILRRefIdx = 0;125 #endif126 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING127 m_altColIndicationFlag = false;128 m_colRefLayerIdx = 0;129 #endif130 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG131 m_numSamplePredRefLayers = 0;132 m_interLayerSamplePredOnlyFlag = false;133 #endif134 122 #endif //SVC_EXTENSION 135 123 … … 175 163 #if SVC_EXTENSION 176 164 m_layerId = layerId; 177 #if JCTVC_M0458_INTERLAYER_RPS_SIG178 165 m_activeNumILRRefIdx = 0; 179 166 m_interLayerPredEnabledFlag = 0; 180 #else181 m_numILRRefIdx = 0;182 #endif183 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG184 m_numSamplePredRefLayers = 0;185 m_interLayerSamplePredOnlyFlag = false;186 #endif187 167 #endif 188 168 m_aiNumRefIdx[0] = 0; … … 410 390 pcRefPic->getPicYuvRec()->extendPicBorder(); 411 391 RefPicSetStCurr0[NumPocStCurr0] = pcRefPic; 412 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG413 if( !m_interLayerSamplePredOnlyFlag || pcRefPic->getLayerId() < getLayerId())414 #endif415 392 NumPocStCurr0++; 416 393 pcRefPic->setCheckLTMSBPresent(false); … … 426 403 pcRefPic->getPicYuvRec()->extendPicBorder(); 427 404 RefPicSetStCurr1[NumPocStCurr1] = pcRefPic; 428 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG429 if( !m_interLayerSamplePredOnlyFlag || pcRefPic->getLayerId() < getLayerId())430 #endif431 405 NumPocStCurr1++; 432 406 pcRefPic->setCheckLTMSBPresent(false); … … 442 416 pcRefPic->getPicYuvRec()->extendPicBorder(); 443 417 RefPicSetLtCurr[NumPocLtCurr] = pcRefPic; 444 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG445 if( !m_interLayerSamplePredOnlyFlag || pcRefPic->getLayerId() < getLayerId())446 #endif447 418 NumPocLtCurr++; 448 419 } … … 470 441 { 471 442 #if REF_IDX_MFM 472 #if M0457_COL_PICTURE_SIGNALING473 443 if(!(m_eNalUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_eNalUnitType <= NAL_UNIT_CODED_SLICE_CRA) && getMFMEnabledFlag()) 474 #else475 if(!(m_eNalUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_eNalUnitType <= NAL_UNIT_CODED_SLICE_CRA) && m_pcSPS->getMFMEnabledFlag())476 #endif477 444 { 478 445 ilpPic[refLayerIdc]->copyUpsampledMvField( refLayerIdc, m_pcBaseColPic[refLayerIdc] ); … … 508 475 { 509 476 numInterLayerRPSPics++; 510 } 511 } 512 #if JCTVC_M0458_INTERLAYER_RPS_SIG 477 #if DISCARDABLE_PIC_RPS 478 assert( ilpPic[i]->getSlice(0)->getDiscardableFlag() == 0 ); // Inter-layer RPS shall not contain picture with discardable_flag = 1. 479 #endif 480 } 481 } 513 482 if (numInterLayerRPSPics < m_activeNumILRRefIdx) 514 483 { … … 589 558 #endif 590 559 } 591 #endif 592 #else 593 if (numInterLayerRPSPics < m_numILRRefIdx) 594 { 595 m_numILRRefIdx = numInterLayerRPSPics; 596 } 597 #endif 598 } 599 #if JCTVC_M0458_INTERLAYER_RPS_SIG 560 #endif 561 } 600 562 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + m_activeNumILRRefIdx; 601 #else602 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + m_numILRRefIdx;603 #endif604 563 #else //SVC_EXTENSION 605 564 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr; … … 609 568 { 610 569 // The variable NumPocTotalCurr is derived as specified in subclause 7.4.7.2. It is a requirement of bitstream conformance that the following applies to the value of NumPocTotalCurr: 611 #if ILP_RAP// inter-layer prediction is allowed for BLA, CRA pictures of nuh_layer_id>0570 #if SVC_EXTENSION // inter-layer prediction is allowed for BLA, CRA pictures of nuh_layer_id>0 612 571 // – If the current picture is a BLA or CRA picture with nuh_layer_id equal to 0, the value of NumPocTotalCurr shall be equal to 0. 613 572 // – Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0. … … 623 582 624 583 if (m_eSliceType == I_SLICE) 625 {584 { 626 585 ::memset( m_apcRefPicList, 0, sizeof (m_apcRefPicList)); 627 586 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx )); 628 587 629 588 return; 630 589 } 631 590 632 591 assert(numPocTotalCurr > 0); 633 592 634 593 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0); 635 594 m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1); 636 595 } 637 596 638 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG639 if( m_interLayerSamplePredOnlyFlag && getLayerId() )640 {641 m_aiNumRefIdx[0] = m_aiNumRefIdx[0] > m_activeNumILRRefIdx ? m_activeNumILRRefIdx : m_aiNumRefIdx[0];642 m_aiNumRefIdx[1] = m_aiNumRefIdx[1] > m_activeNumILRRefIdx ? m_activeNumILRRefIdx : m_aiNumRefIdx[1];643 }644 #endif645 646 597 Int cIdx = 0; 647 598 for ( i=0; i<NumPocStCurr0; i++, cIdx++) … … 653 604 if( m_layerId > 0 ) 654 605 { 655 #if JCTVC_M0458_INTERLAYER_RPS_SIG656 606 for( i = 0; i < m_activeNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++) 657 #else658 for( i = 0; i < m_numILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)659 #endif660 607 { 661 608 Int refLayerIdc = m_interLayerPredLayerIdc[i]; … … 685 632 if( m_layerId > 0 ) 686 633 { 687 #if JCTVC_M0458_INTERLAYER_RPS_SIG688 634 for( i = 0; i < m_activeNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++) 689 #else690 for( i = 0; i < m_numILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)691 #endif692 635 { 693 636 Int refLayerIdc = m_interLayerPredLayerIdc[i]; … … 726 669 if( m_layerId > 0 ) 727 670 { 728 #if JCTVC_M0458_INTERLAYER_RPS_SIG729 671 for( i = 0; i < m_activeNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++) 730 #else731 for( i = 0; i < m_numILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)732 #endif733 672 { 734 673 Int refLayerIdc = m_interLayerPredLayerIdc[i]; … … 832 771 else 833 772 { 834 #if JCTVC_M0458_INTERLAYER_RPS_SIG835 773 for(Int i = m_activeNumILRRefIdx; i > 0; i-- ) 836 #else837 for(Int i = m_numILRRefIdx; i > 0; i-- )838 #endif839 774 { 840 775 #if RPL_INIT_N0316_N0082 … … 881 816 else 882 817 { 883 #if JCTVC_M0458_INTERLAYER_RPS_SIG884 818 for(Int i = m_activeNumILRRefIdx; i > 0; i-- ) 885 #else886 for(Int i = m_numILRRefIdx; i > 0; i-- )887 #endif888 819 { 889 820 refPicListModification->setRefPicSetIdxL1(m_aiNumRefIdx[REF_PIC_LIST_1] - i, numberOfRpsCurrTempList - i); … … 927 858 { 928 859 #if SVC_EXTENSION 929 #if JCTVC_M0458_INTERLAYER_RPS_SIG930 860 return m_activeNumILRRefIdx; 931 #else932 return getNumILRRefIdx();933 #endif934 861 #else 935 862 return 0; … … 946 873 if( m_layerId > 0 ) 947 874 { 948 #if JCTVC_M0458_INTERLAYER_RPS_SIG949 875 numRpsCurrTempList += m_activeNumILRRefIdx; 950 #else951 numRpsCurrTempList += getNumILRRefIdx();952 #endif953 876 } 954 877 #endif … … 1179 1102 m_pcVPS = pSrc->m_pcVPS; 1180 1103 m_layerId = pSrc->m_layerId; 1181 #if JCTVC_M0458_INTERLAYER_RPS_SIG1182 1104 m_activeNumILRRefIdx = pSrc->m_activeNumILRRefIdx; 1183 1105 m_interLayerPredEnabledFlag = pSrc->m_interLayerPredEnabledFlag; 1184 1106 memcpy( m_interLayerPredLayerIdc, pSrc->m_interLayerPredLayerIdc, sizeof( m_interLayerPredLayerIdc ) ); 1185 #endif1186 1107 #endif 1187 1108 m_pcSPS = pSrc->m_pcSPS; … … 1508 1429 1509 1430 } 1431 #if DISCARDABLE_PIC_RPS 1432 if( isReference ) // Current picture is in the temporal RPS 1433 { 1434 assert( rpcPic->getSlice(0)->getDiscardableFlag() == 0 ); // Temporal RPS shall not contain picture with discardable_flag equal to 1 1435 } 1436 #endif 1510 1437 // mark the picture as "unused for reference" if it is not in 1511 1438 // the Reference Picture Set … … 2010 1937 , m_bitDepthVpsChroma (0) 2011 1938 {} 1939 #if RESOLUTION_BASED_DPB 1940 Void RepFormat::init() 1941 { 1942 m_chromaFormatVpsIdc = CHROMA_420; 1943 m_separateColourPlaneVpsFlag = false; 1944 m_picWidthVpsInLumaSamples = 0; 1945 m_picHeightVpsInLumaSamples = 0; 1946 m_bitDepthVpsLuma = 0; 1947 m_bitDepthVpsChroma = 0; 1948 } 1949 #endif 2012 1950 #endif 2013 1951 … … 2036 1974 #endif 2037 1975 , m_numProfileTierLevel (0) 1976 #if !VPS_EXTN_UEV_CODING 2038 1977 , m_moreOutputLayerSetsThanDefaultFlag (false) 1978 #endif 2039 1979 , m_numAddOutputLayerSets (0) 1980 #if P0295_DEFAULT_OUT_LAYER_IDC 1981 , m_defaultTargetOutputLayerIdc (0) 1982 #else 2040 1983 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC 2041 1984 , m_defaultOneTargetOutputLayerIdc (0) 2042 1985 #else 2043 1986 , m_defaultOneTargetOutputLayerFlag (false) 1987 #endif 2044 1988 #endif 2045 1989 #if VPS_VUI_BITRATE_PICRATE … … 2058 2002 #endif 2059 2003 #endif 2004 #if !P0307_REMOVE_VPS_VUI_OFFSET 2060 2005 #if VPS_VUI_OFFSET 2061 2006 , m_vpsVuiOffset (0) 2007 #endif 2008 #endif 2009 #if P0307_VPS_NON_VUI_EXTENSION 2010 , m_vpsNonVuiExtLength (0) 2062 2011 #endif 2063 2012 { … … 2082 2031 #if VPS_EXTN_PROFILE_INFO 2083 2032 ::memset(m_profilePresentFlag, 0, sizeof(m_profilePresentFlag)); 2033 #if !P0048_REMOVE_PROFILE_REF 2084 2034 ::memset(m_profileLayerSetRef, 0, sizeof(m_profileLayerSetRef)); 2035 #endif 2085 2036 #endif 2086 2037 #if VPS_EXTN_OP_LAYER_SETS … … 2094 2045 ::memset(m_numDirectRefLayers, 0, sizeof(m_numDirectRefLayers )); 2095 2046 ::memset(m_refLayerId, 0, sizeof(m_refLayerId )); 2096 #if M0457_PREDICTION_INDICATIONS2097 2047 m_directDepTypeLen = 2; 2098 2048 ::memset(m_directDependencyType, 0, sizeof(m_directDependencyType)); 2099 #endif2100 2049 #endif 2101 2050 #if DERIVE_LAYER_ID_LIST_VARIABLES … … 2104 2053 #endif 2105 2054 ::memset(m_profileLevelTierIdx, 0, sizeof(m_profileLevelTierIdx)); 2106 #if JCTVC_M0458_INTERLAYER_RPS_SIG2107 2055 m_maxOneActiveRefLayerFlag = true; 2108 #endif2109 2056 #if O0062_POC_LSB_NOT_PRESENT_FLAG 2110 2057 ::memset(m_pocLsbNotPresentFlag, 0, sizeof(m_pocLsbNotPresentFlag)); … … 2116 2063 m_crossLayerIrapAlignFlag = true; 2117 2064 #endif 2118 #if JCTVC_M0203_INTERLAYER_PRED_IDC2119 2065 #if N0120_MAX_TID_REF_PRESENT_FLAG 2120 2066 m_maxTidRefPresentFlag = true; … … 2123 2069 { 2124 2070 #if O0225_MAX_TID_FOR_REF_LAYERS 2125 for( Int j = 0; j < MAX_VPS_LAYER_ID_PLUS1; j++)2126 {2127 m_maxTidIlRefPicsPlus1[i][j] = m_uiMaxTLayers + 1;2128 }2071 for( Int j = 0; j < MAX_VPS_LAYER_ID_PLUS1; j++) 2072 { 2073 m_maxTidIlRefPicsPlus1[i][j] = m_uiMaxTLayers + 1; 2074 } 2129 2075 #else 2130 2076 m_maxTidIlRefPicsPlus1[i] = m_uiMaxTLayers + 1; 2131 2077 #endif 2132 2078 } 2133 #endif2134 2079 #if VPS_VUI_TILES_NOT_IN_USE__FLAG 2135 2136 2137 2080 m_tilesNotInUseFlag = true; 2081 ::memset(m_tilesInUseFlag, 0, sizeof(m_tilesInUseFlag)); 2082 ::memset(m_loopFilterNotAcrossTilesFlag, 0, sizeof(m_loopFilterNotAcrossTilesFlag)); 2138 2083 #endif 2139 2084 #if TILE_BOUNDARY_ALIGNED_FLAG 2140 2085 ::memset(m_tileBoundariesAlignedFlag, 0, sizeof(m_tileBoundariesAlignedFlag)); 2141 2086 #endif 2142 2087 #if VPS_VUI_WPP_NOT_IN_USE__FLAG 2143 2144 2088 m_wppNotInUseFlag = true; 2089 ::memset(m_wppInUseFlag, 0, sizeof(m_wppInUseFlag)); 2145 2090 #endif 2146 2091 #if N0160_VUI_EXT_ILP_REF 2147 m_numIlpRestrictedRefLayers= false;2148 2149 2150 2092 m_ilpRestrictedRefLayersFlag = false; 2093 ::memset(m_minSpatialSegmentOffsetPlus1, 0, sizeof(m_minSpatialSegmentOffsetPlus1)); 2094 ::memset(m_ctuBasedOffsetEnabledFlag, 0, sizeof(m_ctuBasedOffsetEnabledFlag)); 2095 ::memset(m_minHorizontalCtuOffsetPlus1, 0, sizeof(m_minHorizontalCtuOffsetPlus1)); 2151 2096 #endif 2152 2097 #if VPS_VUI_VIDEO_SIGNAL 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2098 m_vidSigPresentVpsFlag=true; 2099 m_vpsVidSigInfo=1; 2100 ::memset( m_vpsVidSigIdx, 0, sizeof(m_vpsVidSigIdx) ); 2101 m_vpsVidSigIdx[0]=0; 2102 for (Int i=0; i < 16; i++) 2103 { 2104 m_vpsVidFormat[i] = 5; 2105 m_vpsFullRangeFlag[i] = false; 2106 m_vpsColorPrimaries[i] = 2; 2107 m_vpsTransChar[i] = 2; 2108 m_vpsMatCoeff[i] = 2; 2109 } 2165 2110 #endif 2166 2111 #if VPS_VUI_BITRATE_PICRATE … … 2192 2137 ::memset( m_subLayerDpbInfoPresentFlag, 0, sizeof(m_subLayerDpbInfoPresentFlag ) ); 2193 2138 ::memset( m_maxVpsDecPicBufferingMinus1, 0, sizeof(m_maxVpsDecPicBufferingMinus1 ) ); 2139 #if RESOLUTION_BASED_DPB 2140 ::memset( m_maxVpsLayerDecPicBuffMinus1, 0, sizeof(m_maxVpsLayerDecPicBuffMinus1 ) ); 2141 #endif 2194 2142 ::memset( m_maxVpsNumReorderPics, 0, sizeof(m_maxVpsNumReorderPics ) ); 2195 2143 ::memset( m_maxVpsLatencyIncreasePlus1, 0, sizeof(m_maxVpsLatencyIncreasePlus1 ) ); … … 2248 2196 } 2249 2197 #endif 2198 #if !RESOLUTION_BASED_DPB 2250 2199 #if VPS_DPB_SIZE_TABLE 2251 2200 Void TComVPS::deriveNumberOfSubDpbs() 2252 2201 { 2253 2202 // Derive number of sub-DPBs 2203 #if CHANGE_NUMSUBDPB_IDX 2204 // For layer set 0 2205 setNumSubDpbs(0, 1); 2206 // For other layer sets 2207 for( Int i = 1; i < getNumLayerSets(); i++) 2208 { 2209 setNumSubDpbs( i, getNumLayersInIdList( i ) ); 2210 } 2211 #else 2254 2212 // For output layer set 0 2255 2213 setNumSubDpbs(0, 1); … … 2259 2217 setNumSubDpbs( i, getNumLayersInIdList( getOutputLayerSetIdx(i)) ); 2260 2218 } 2261 } 2219 #endif 2220 } 2221 #endif 2262 2222 #endif 2263 2223 #if VPS_VUI_TILES_NOT_IN_USE__FLAG … … 2358 2318 2359 2319 return scalIdx; 2320 } 2321 #endif 2322 #if VPS_DPB_SIZE_TABLE 2323 Void TComVPS::determineSubDpbInfoFlags() 2324 { 2325 for(Int i = 1; i < getNumOutputLayerSets(); i++) 2326 { 2327 Int layerSetIdxForOutputLayerSet = getOutputLayerSetIdx( i ); 2328 // For each output layer set, set the DPB size for each layer and the reorder/latency value the maximum for all layers 2329 Bool checkFlagOuter = false; // Used to calculate sub_layer_flag_info_present_flag 2330 Bool checkFlagInner[MAX_TLAYER]; // Used to calculate sub_layer_dpb_info_present_flag 2331 2332 for(Int j = 0; j < getMaxTLayers(); j++) 2333 { 2334 // -------------------------------------------------------- 2335 // To determine value of m_subLayerDpbInfoPresentFlag 2336 // -------------------------------------------------------- 2337 if( j == 0 ) // checkFlagInner[0] is always 1 2338 { 2339 checkFlagInner[j] = true; // Always signal sub-layer DPB information for the first sub-layer 2340 } 2341 else 2342 { 2343 checkFlagInner[j] = false; // Initialize to be false. If the values of the current sub-layers matches with the earlier sub-layer, 2344 // then will be continue to be false - i.e. the j-th sub-layer DPB info is not signaled 2345 checkFlagInner[j] |= ( getMaxVpsNumReorderPics(i, j) != getMaxVpsNumReorderPics(i, j - 1) ); 2346 #if CHANGE_NUMSUBDPB_IDX 2347 for(Int subDpbIdx = 0; subDpbIdx < getNumSubDpbs(layerSetIdxForOutputLayerSet) && !checkFlagInner[j]; subDpbIdx++) // If checkFlagInner[j] is true, break and signal the values 2348 #else 2349 for(Int k = 0; k < getNumSubDpbs(i) && !checkFlagInner[j]; k++) // If checkFlagInner[j] is true, break and signal the values 2350 #endif 2351 { 2352 checkFlagInner[j] |= ( getMaxVpsDecPicBufferingMinus1(i, subDpbIdx, j - 1) != getMaxVpsDecPicBufferingMinus1(i, subDpbIdx, j) ); 2353 } 2354 #if RESOLUTION_BASED_DPB 2355 for(Int layerIdx = 0; layerIdx < this->getNumLayersInIdList(layerSetIdxForOutputLayerSet) && !checkFlagInner[j]; layerIdx++) // If checkFlagInner[j] is true, break and signal the values 2356 { 2357 checkFlagInner[j] |= ( getMaxVpsLayerDecPicBuffMinus1(i, layerIdx, j - 1) != getMaxVpsLayerDecPicBuffMinus1(i, layerIdx, j) ); 2358 } 2359 #endif 2360 } 2361 // If checkFlagInner[j] = true, then some value needs to be signalled for the j-th sub-layer 2362 setSubLayerDpbInfoPresentFlag( i, j, checkFlagInner[j] ); 2363 } 2364 2365 // -------------------------------------------------------- 2366 // To determine value of m_subLayerFlagInfoPresentFlag 2367 // -------------------------------------------------------- 2368 2369 for(Int j = 1; j < getMaxTLayers(); j++) // Check if DPB info of any of non-zero sub-layers is signaled. If so set flag to one 2370 { 2371 if( getSubLayerDpbInfoPresentFlag(i, j) ) 2372 { 2373 checkFlagOuter = true; 2374 break; 2375 } 2376 } 2377 setSubLayerFlagInfoPresentFlag( i, checkFlagOuter ); 2378 } 2379 } 2380 #endif 2381 #if RESOLUTION_BASED_DPB 2382 Void TComVPS::assignSubDpbIndices() 2383 { 2384 RepFormat layerRepFormat [MAX_LAYERS]; 2385 RepFormat subDpbRepFormat [MAX_LAYERS]; 2386 2387 for(Int lsIdx = 0; lsIdx < this->getNumLayerSets(); lsIdx++) 2388 { 2389 for(Int j = 0; j < MAX_LAYERS; j++) 2390 { 2391 layerRepFormat [j].init(); 2392 subDpbRepFormat[j].init(); 2393 } 2394 2395 // Assign resolution, bit-depth, colour format for each layer in the layer set 2396 for(Int i = 0; i < this->getNumLayersInIdList( lsIdx ); i++) 2397 { 2398 Int layerIdxInVps = this->getLayerIdInVps( this->getLayerSetLayerIdList(lsIdx, i) ); 2399 Int repFormatIdx = this->getVpsRepFormatIdx( layerIdxInVps ); 2400 RepFormat* repFormat = this->getVpsRepFormat( repFormatIdx ); 2401 2402 // Assign the rep_format() to the layer 2403 layerRepFormat[i] = *repFormat; 2404 } 2405 2406 // ---------------------------------------- 2407 // Sub-DPB assignment 2408 // ---------------------------------------- 2409 // For the base layer 2410 m_subDpbAssigned[lsIdx][0] = 0; 2411 subDpbRepFormat[0] = layerRepFormat[0]; 2412 2413 // Sub-DPB counter 2414 Int subDpbCtr = 1; 2415 2416 for(Int i = 1; i < this->getNumLayersInIdList( lsIdx ); i++) 2417 { 2418 Bool newSubDpbFlag = true; 2419 for(Int j = 0; (j < subDpbCtr) && (newSubDpbFlag); j++) 2420 { 2421 if( RepFormat::checkSameSubDpb( layerRepFormat[i], subDpbRepFormat[j] ) ) 2422 { 2423 // Belong to i-th sub-DPB 2424 m_subDpbAssigned[lsIdx][i] = j; 2425 newSubDpbFlag = false; 2426 } 2427 } 2428 if( newSubDpbFlag ) 2429 { 2430 // New sub-DPB 2431 subDpbRepFormat[subDpbCtr] = layerRepFormat[i]; 2432 m_subDpbAssigned[lsIdx][i] = subDpbCtr; 2433 subDpbCtr++; // Increment # subDpbs 2434 } 2435 } 2436 m_numSubDpbs[lsIdx] = subDpbCtr; 2437 } 2438 } 2439 Int TComVPS::findLayerIdxInLayerSet ( Int lsIdx, Int nuhLayerId ) 2440 { 2441 for(Int i = 0; i < this->getNumLayersInIdList(lsIdx); i++) 2442 { 2443 if( this->getLayerSetLayerIdList( lsIdx, i) == nuhLayerId ) 2444 { 2445 return i; 2446 } 2447 } 2448 return -1; // Layer not found 2449 } 2450 // RepFormat Assignment operator 2451 RepFormat& RepFormat::operator= (const RepFormat &other) 2452 { 2453 if( this != &other) 2454 { 2455 m_chromaAndBitDepthVpsPresentFlag = other.m_chromaAndBitDepthVpsPresentFlag; 2456 m_chromaFormatVpsIdc = other.m_chromaFormatVpsIdc; 2457 m_separateColourPlaneVpsFlag = other.m_separateColourPlaneVpsFlag; 2458 m_picWidthVpsInLumaSamples = other.m_picWidthVpsInLumaSamples; 2459 m_picHeightVpsInLumaSamples = other.m_picHeightVpsInLumaSamples; 2460 m_bitDepthVpsLuma = other.m_bitDepthVpsLuma; 2461 m_bitDepthVpsChroma = other.m_bitDepthVpsChroma; 2462 } 2463 return *this; 2464 } 2465 2466 // Check whether x and y share the same resolution, chroma format and bit-depth. 2467 Bool RepFormat::checkSameSubDpb(const RepFormat &x, const RepFormat &y) 2468 { 2469 return ( (x.m_chromaFormatVpsIdc == y.m_chromaFormatVpsIdc) 2470 && (x.m_picWidthVpsInLumaSamples == y.m_picWidthVpsInLumaSamples) 2471 && (x.m_picHeightVpsInLumaSamples == y.m_picHeightVpsInLumaSamples) 2472 && (x.m_bitDepthVpsLuma == y.m_bitDepthVpsLuma) 2473 && (x.m_bitDepthVpsChroma == y.m_bitDepthVpsChroma) 2474 ); 2360 2475 } 2361 2476 #endif … … 2404 2519 , m_vuiParameters () 2405 2520 #if SVC_EXTENSION 2406 #if M0463_VUI_EXT_ILP_REF2407 , m_interViewMvVertConstraintFlag (false)2408 , m_numIlpRestrictedRefLayers ( 0 )2409 #endif2410 2521 , m_layerId ( 0 ) 2411 2522 , m_numScaledRefLayerOffsets ( 0 ) … … 2431 2542 ::memset(m_ltRefPicPocLsbSps, 0, sizeof(m_ltRefPicPocLsbSps)); 2432 2543 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); 2433 #if M0463_VUI_EXT_ILP_REF2434 for (Int i = 0; i < MAX_LAYERS; i++ )2435 {2436 m_minSpatialSegmentOffsetPlus1[ i ] = 0;2437 m_ctuBasedOffsetEnabledFlag [ i ] = false;2438 m_minHorizontalCtuOffsetPlus1 [ i ] = 0;2439 }2440 #endif2441 2544 } 2442 2545 -
trunk/source/Lib/TLibCommon/TComSlice.h
r547 r588 422 422 public: 423 423 RepFormat(); 424 424 #if RESOLUTION_BASED_DPB 425 Void init(); 426 RepFormat& operator= (const RepFormat &); 427 static Bool checkSameSubDpb(const RepFormat &x, const RepFormat &y); 428 #endif 425 429 #if REPN_FORMAT_CONTROL_FLAG 426 430 Bool getChromaAndBitDepthVpsPresentFlag() { return m_chromaAndBitDepthVpsPresentFlag; } … … 483 487 Int m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1]; 484 488 #endif 489 #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED 485 490 #if VPS_EXTN_OFFSET 486 491 UInt m_extensionOffset; 492 #endif 487 493 #endif 488 494 #if VPS_RENAME … … 514 520 // Profile-tier-level signalling related 515 521 Bool m_profilePresentFlag[MAX_VPS_LAYER_SETS_PLUS1]; // The value with index 0 will not be used. 522 #if !P0048_REMOVE_PROFILE_REF 516 523 UInt m_profileLayerSetRef[MAX_VPS_LAYER_SETS_PLUS1]; // The value with index 0 will not be used. 524 #endif 517 525 std::vector<TComPTL> m_pcPTLForExtn; 518 526 #endif … … 528 536 UInt m_numDirectRefLayers[MAX_VPS_LAYER_ID_PLUS1]; 529 537 UInt m_refLayerId[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 530 #if M0457_PREDICTION_INDICATIONS531 538 UInt m_directDepTypeLen; 532 539 #if O0096_DEFAULT_DEPENDENCY_TYPE … … 536 543 UInt m_directDependencyType[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 537 544 #endif 538 #endif539 545 UInt m_numProfileTierLevel; 546 #if !VPS_EXTN_UEV_CODING 540 547 Bool m_moreOutputLayerSetsThanDefaultFlag; 548 #endif 541 549 Int m_numAddOutputLayerSets; 550 #if P0295_DEFAULT_OUT_LAYER_IDC 551 UInt m_defaultTargetOutputLayerIdc; 552 #else 542 553 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC 543 554 UInt m_defaultOneTargetOutputLayerIdc; … … 545 556 Bool m_defaultOneTargetOutputLayerFlag; 546 557 #endif 558 #endif 547 559 Int m_profileLevelTierIdx[64]; 548 #if JCTVC_M0458_INTERLAYER_RPS_SIG549 560 Bool m_maxOneActiveRefLayerFlag; 550 #endif551 561 #if O0062_POC_LSB_NOT_PRESENT_FLAG 552 562 Bool m_pocLsbNotPresentFlag[MAX_VPS_LAYER_ID_PLUS1]; … … 558 568 Bool m_crossLayerIrapAlignFlag; 559 569 #endif 560 #if JCTVC_M0203_INTERLAYER_PRED_IDC561 570 #if O0225_MAX_TID_FOR_REF_LAYERS 562 571 UInt m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1][MAX_VPS_LAYER_ID_PLUS1]; 563 572 #else 564 573 UInt m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1]; 565 #endif566 574 #endif 567 575 #if N0120_MAX_TID_REF_PRESENT_FLAG … … 591 599 #endif 592 600 #if N0160_VUI_EXT_ILP_REF 593 Bool m_ numIlpRestrictedRefLayers;601 Bool m_ilpRestrictedRefLayersFlag; 594 602 Int m_minSpatialSegmentOffsetPlus1[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 595 603 Bool m_ctuBasedOffsetEnabledFlag [MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; … … 597 605 #endif 598 606 #if VPS_VUI_VIDEO_SIGNAL 599 600 601 602 603 604 605 606 607 Bool m_vidSigPresentVpsFlag; 608 Int m_vpsVidSigInfo; 609 Int m_vpsVidSigIdx[MAX_VPS_LAYER_ID_PLUS1]; 610 Int m_vpsVidFormat[16]; 611 Bool m_vpsFullRangeFlag[16]; 612 Int m_vpsColorPrimaries[16]; 613 Int m_vpsTransChar[16]; 614 Int m_vpsMatCoeff[16]; 607 615 #endif 608 616 #if VPS_VUI_BITRATE_PICRATE … … 646 654 Bool m_subLayerDpbInfoPresentFlag [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; 647 655 Int m_maxVpsDecPicBufferingMinus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS][MAX_TLAYER]; 656 #if RESOLUTION_BASED_DPB 657 Int m_maxVpsLayerDecPicBuffMinus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS][MAX_TLAYER]; 658 #endif 648 659 Int m_maxVpsNumReorderPics [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; 649 660 Int m_maxVpsLatencyIncreasePlus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; 661 #if CHANGE_NUMSUBDPB_IDX 662 Int m_numSubDpbs [MAX_VPS_LAYER_SETS_PLUS1]; 663 #else 650 664 Int m_numSubDpbs [MAX_VPS_OP_LAYER_SETS_PLUS1]; 665 #endif 651 666 #endif 652 667 … … 655 670 #endif 656 671 657 # endif //SVC_EXTENSION672 #if !P0307_REMOVE_VPS_VUI_OFFSET 658 673 #if VPS_VUI_OFFSET 659 674 Int m_vpsVuiOffset; 660 675 #endif 676 #endif 677 #if P0307_VPS_NON_VUI_EXTENSION 678 Int m_vpsNonVuiExtLength; 679 #endif 680 #if RESOLUTION_BASED_DPB 681 Int m_subDpbAssigned [MAX_VPS_LAYER_SETS_PLUS1][MAX_LAYERS]; 682 #endif 683 #endif //SVC_EXTENSION 661 684 public: 662 685 TComVPS(); … … 777 800 Void setProfilePresentFlag(Int id, Bool x) { m_profilePresentFlag[id] = x; } 778 801 802 #if !P0048_REMOVE_PROFILE_REF 779 803 UInt getProfileLayerSetRef(Int id) { return m_profileLayerSetRef[id]; } 780 804 Void setProfileLayerSetRef(Int id, Bool x) { m_profileLayerSetRef[id] = x; } 805 #endif 781 806 782 807 std::vector<TComPTL>* getPTLForExtnPtr() { return &m_pcPTLForExtn; } … … 805 830 Void setRefLayerId(Int layerId, Int refLayerIdx, UInt refLayerId) { m_refLayerId[layerId][refLayerIdx] = refLayerId; } 806 831 807 #if M0457_PREDICTION_INDICATIONS808 832 UInt getDirectDepTypeLen() { return m_directDepTypeLen; } 809 833 Void setDirectDepTypeLen(UInt x) { m_directDepTypeLen = x; } … … 817 841 Void setDirectDependencyType(Int currLayerId, Int refLayerId, UInt x) { m_directDependencyType[currLayerId][refLayerId] = x; } 818 842 #endif 819 #endif820 843 UInt getNumProfileTierLevel() { return m_numProfileTierLevel; } 821 844 Void setNumProfileTierLevel(Int x) { m_numProfileTierLevel = x; } 822 845 846 #if !VPS_EXTN_UEV_CODING 823 847 Bool getMoreOutputLayerSetsThanDefaultFlag() { return m_moreOutputLayerSetsThanDefaultFlag;} 824 848 Void setMoreOutputLayerSetsThanDefaultFlag(Bool x) { m_moreOutputLayerSetsThanDefaultFlag = x ;} 849 #endif 825 850 826 851 Int getNumAddOutputLayerSets() { return m_numAddOutputLayerSets; } 827 852 Void setNumAddOutputLayerSets(Int x) { m_numAddOutputLayerSets = x ; } 828 853 854 #if P0295_DEFAULT_OUT_LAYER_IDC 855 UInt getDefaultTargetOutputLayerIdc() { return m_defaultTargetOutputLayerIdc;} 856 Void setDefaultTargetOutputLayerIdc(UInt x) { m_defaultTargetOutputLayerIdc = x ;} 857 #else 829 858 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC 830 859 UInt getDefaultOneTargetOutputLayerIdc() { return m_defaultOneTargetOutputLayerIdc;} … … 834 863 Void setDefaultOneTargetOutputLayerFlag(Bool x) { m_defaultOneTargetOutputLayerFlag= x ;} 835 864 #endif 865 #endif 836 866 Int getProfileLevelTierIdx(Int i) { return m_profileLevelTierIdx[i]; } 837 867 Void setProfileLevelTierIdx(Int i, Int x) { m_profileLevelTierIdx[i] = x ; } 838 #if JCTVC_M0458_INTERLAYER_RPS_SIG839 868 Bool getMaxOneActiveRefLayerFlag() { return m_maxOneActiveRefLayerFlag; } 840 869 Void setMaxOneActiveRefLayerFlag(Bool x) { m_maxOneActiveRefLayerFlag = x; } 841 #endif842 870 #if O0062_POC_LSB_NOT_PRESENT_FLAG 843 871 UInt getPocLsbNotPresentFlag(Int i) { return m_pocLsbNotPresentFlag[i]; } … … 852 880 Void setCrossLayerIrapAlignFlag(Bool x) { m_crossLayerIrapAlignFlag = x; } 853 881 #endif 854 #if JCTVC_M0203_INTERLAYER_PRED_IDC855 882 #if O0225_MAX_TID_FOR_REF_LAYERS 856 883 UInt getMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId) { return m_maxTidIlRefPicsPlus1[layerId][refLayerId]; } … … 859 886 UInt getMaxTidIlRefPicsPlus1(Int layerId) { return m_maxTidIlRefPicsPlus1[layerId]; } 860 887 Void setMaxTidIlRefPicsPlus1(Int layerId, UInt maxSublayer) { m_maxTidIlRefPicsPlus1[layerId] = maxSublayer; } 861 #endif862 888 #endif 863 889 #if N0120_MAX_TID_REF_PRESENT_FLAG … … 898 924 #endif 899 925 #if N0160_VUI_EXT_ILP_REF 900 Bool get NumIlpRestrictedRefLayers ( ) { return m_numIlpRestrictedRefLayers;}901 Void set NumIlpRestrictedRefLayers ( Int val ) { m_numIlpRestrictedRefLayers= val;}926 Bool getIlpRestrictedRefLayersFlag ( ) { return m_ilpRestrictedRefLayersFlag ;} 927 Void setIlpRestrictedRefLayersFlag ( Int val ) { m_ilpRestrictedRefLayersFlag = val;} 902 928 903 929 Int getMinSpatialSegmentOffsetPlus1( Int currLayerId, Int refLayerId ) { return m_minSpatialSegmentOffsetPlus1[currLayerId][refLayerId];} … … 983 1009 Int scalTypeToScalIdx( ScalabilityType scalType ); 984 1010 #endif 1011 #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED 985 1012 #if VPS_EXTN_OFFSET 986 1013 Int getExtensionOffset() { return m_extensionOffset; } 987 1014 Void setExtensionOffset( UInt offset ) { m_extensionOffset = offset; } 988 1015 #endif 1016 #endif 989 1017 #if O0215_PHASE_ALIGNMENT 990 1018 Bool getPhaseAlignFlag() { return m_phaseAlignFlag; } … … 1002 1030 Void setMaxVpsDecPicBufferingMinus1(Int i, Int k, Int j, Int x) { m_maxVpsDecPicBufferingMinus1[i][k][j] = x; } 1003 1031 1032 #if RESOLUTION_BASED_DPB 1033 Int getMaxVpsLayerDecPicBuffMinus1(Int i, Int k, Int j) { assert(i != 0); return m_maxVpsLayerDecPicBuffMinus1[i][k][j]; } 1034 Void setMaxVpsLayerDecPicBuffMinus1(Int i, Int k, Int j, Int x) { m_maxVpsLayerDecPicBuffMinus1[i][k][j] = x; } 1035 #endif 1036 1004 1037 Int getMaxVpsNumReorderPics(Int i, Int j) { assert(i != 0); return m_maxVpsNumReorderPics[i][j]; } 1005 1038 Void setMaxVpsNumReorderPics(Int i, Int j, Int x) { m_maxVpsNumReorderPics[i][j] = x; } … … 1010 1043 Int getNumSubDpbs(Int i) { return m_numSubDpbs[i]; } 1011 1044 Void setNumSubDpbs(Int i, Int x) { m_numSubDpbs[i] = x; } 1045 Void determineSubDpbInfoFlags(); 1012 1046 #endif 1013 1047 … … 1017 1051 #endif 1018 1052 1053 #if !P0307_REMOVE_VPS_VUI_OFFSET 1019 1054 #if VPS_VUI_OFFSET 1020 1055 Int getVpsVuiOffset() { return m_vpsVuiOffset; } 1021 1056 Void setVpsVuiOffset(Int x) { m_vpsVuiOffset = x; } 1057 #endif 1058 #endif 1059 #if P0307_VPS_NON_VUI_EXTENSION 1060 Int getVpsNonVuiExtLength() { return m_vpsNonVuiExtLength; } 1061 Void setVpsNonVuiExtLength(Int x) { m_vpsNonVuiExtLength = x; } 1062 #endif 1063 #if RESOLUTION_BASED_DPB 1064 Void assignSubDpbIndices(); 1065 Int getSubDpbAssigned (Int lsIdx, Int layerIdx) { return m_subDpbAssigned[lsIdx][layerIdx]; } 1066 Int findLayerIdxInLayerSet ( Int lsIdx, Int nuhLayerId ); 1022 1067 #endif 1023 1068 #endif //SVC_EXTENSION … … 1312 1357 1313 1358 #if SVC_EXTENSION 1314 #if M0463_VUI_EXT_ILP_REF1315 Bool m_interViewMvVertConstraintFlag;1316 Int m_numIlpRestrictedRefLayers ;1317 Int m_minSpatialSegmentOffsetPlus1[MAX_LAYERS];1318 Bool m_ctuBasedOffsetEnabledFlag [MAX_LAYERS];1319 Int m_minHorizontalCtuOffsetPlus1 [MAX_LAYERS];1320 #endif1321 1322 1359 UInt m_layerId; 1323 1324 #if REF_IDX_MFM1325 #if !M0457_COL_PICTURE_SIGNALING1326 Bool m_bMFMEnabledFlag;1327 #endif1328 #endif1329 1360 UInt m_numScaledRefLayerOffsets; 1330 1361 #if O0098_SCALED_REF_LAYER_ID … … 1485 1516 1486 1517 #if SVC_EXTENSION 1487 #if M0463_VUI_EXT_ILP_REF1488 Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; }1489 Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;}1490 1491 //// sps_extension_vui_parameters( )1492 Void setNumIlpRestrictedRefLayers ( Int val ) { m_numIlpRestrictedRefLayers = val;}1493 Int getNumIlpRestrictedRefLayers ( ) { return m_numIlpRestrictedRefLayers ;}1494 1495 Void setMinSpatialSegmentOffsetPlus1( Int i, Int val ) { m_minSpatialSegmentOffsetPlus1[ i ] = val;}1496 Int getMinSpatialSegmentOffsetPlus1( Int i ) { return m_minSpatialSegmentOffsetPlus1[ i ];}1497 1498 Void setCtuBasedOffsetEnabledFlag ( Int i, Bool flag ) { m_ctuBasedOffsetEnabledFlag [ i ] = flag;}1499 Bool getCtuBasedOffsetEnabledFlag ( Int i ) { return m_ctuBasedOffsetEnabledFlag [ i ];}1500 1501 Void setMinHorizontalCtuOffsetPlus1 ( Int i, Int val ) { m_minHorizontalCtuOffsetPlus1 [ i ] = val;}1502 Int getMinHorizontalCtuOffsetPlus1 ( Int i ) { return m_minHorizontalCtuOffsetPlus1 [ i ];}1503 #endif1504 1518 Void setLayerId(UInt layerId) { m_layerId = layerId; } 1505 1519 UInt getLayerId() { return m_layerId; } 1506 #if REF_IDX_MFM1507 #if !M0457_COL_PICTURE_SIGNALING1508 Void setMFMEnabledFlag(Bool flag) {m_bMFMEnabledFlag = flag;}1509 Bool getMFMEnabledFlag() {return m_bMFMEnabledFlag;}1510 #endif1511 #endif1512 1520 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } 1513 1521 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } … … 1889 1897 TComPic* m_pcBaseColPic[MAX_LAYERS]; 1890 1898 TComPicYuv* m_pcFullPelBaseRec[MAX_LAYERS]; 1891 #if M0457_COL_PICTURE_SIGNALING1892 1899 Int m_numMotionPredRefLayers; 1893 1900 #if REF_IDX_MFM … … 1897 1904 TComPic* m_pcIlpPic; 1898 1905 #endif 1899 #endif 1900 1901 #if JCTVC_M0458_INTERLAYER_RPS_SIG 1906 1902 1907 Bool m_interLayerPredEnabledFlag; 1903 1908 Int m_activeNumILRRefIdx; //< Active inter-layer reference pictures 1904 1909 Int m_interLayerPredLayerIdc [MAX_VPS_LAYER_ID_PLUS1]; 1905 #else1906 #if SVC_EXTENSION1907 Int m_numILRRefIdx; //< for inter-layer reference picture ser1908 #endif1909 #endif1910 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG1911 Int m_numSamplePredRefLayers;1912 Bool m_interLayerSamplePredOnlyFlag;1913 #endif1914 1910 #if POC_RESET_FLAG 1915 1911 Bool m_bPocResetFlag; … … 2174 2170 #endif 2175 2171 2176 #if JCTVC_M0458_INTERLAYER_RPS_SIG2177 2172 Int getActiveNumILRRefIdx ( ) { return m_activeNumILRRefIdx; } 2178 2173 Void setActiveNumILRRefIdx ( Int i ) { m_activeNumILRRefIdx = i; } … … 2183 2178 Void setInterLayerPredEnabledFlag ( Bool val ) { m_interLayerPredEnabledFlag = val; } 2184 2179 Bool getInterLayerPredEnabledFlag () { return m_interLayerPredEnabledFlag;} 2185 #else 2186 Void setNumILRRefIdx ( Int i ) { m_numILRRefIdx = i; } 2187 #endif 2188 2189 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG 2190 Int getNumSamplePredRefLayers ( ) { return m_numSamplePredRefLayers; } 2191 Void setNumSamplePredRefLayers ( Int i ) { m_numSamplePredRefLayers = i; } 2192 Bool getInterLayerSamplePredOnlyFlag( ) { return m_interLayerSamplePredOnlyFlag; } 2193 Void setInterLayerSamplePredOnlyFlag( Bool val ) { m_interLayerSamplePredOnlyFlag = val; } 2194 #endif 2195 2196 #if M0457_COL_PICTURE_SIGNALING 2180 2197 2181 Void setNumMotionPredRefLayers(int i) { m_numMotionPredRefLayers = i; } 2198 2182 Int getNumMotionPredRefLayers() { return m_numMotionPredRefLayers; } … … 2200 2184 Void setMFMEnabledFlag(Bool flag) { m_bMFMEnabledFlag = flag; } 2201 2185 Bool getMFMEnabledFlag() { return m_bMFMEnabledFlag; } 2202 #if !REMOVE_COL_PICTURE_SIGNALING2203 Void setColRefLayerIdx(Int i) { m_colRefLayerIdx = i; }2204 Int getColRefLayerIdx() { return m_colRefLayerIdx; }2205 Void setAltColIndicationFlag(Bool i) { m_altColIndicationFlag = i; }2206 Bool getAltColIndicationFlag() { return m_altColIndicationFlag; }2207 Void setMotionPredIlp(TComPic *ilpPic) { m_pcIlpPic = ilpPic; }2208 TComPic* getMotionPredIlp() { return m_pcIlpPic; }2209 #endif2210 #endif2211 2186 #endif 2212 2187 2213 2188 TComPic* getRefPic(TComList<TComPic*>& rcListPic, Int poc) { return xGetRefPic( rcListPic, poc ); } 2214 2189 2215 #if RESTR_CHK 2216 Bool isRADL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_R); } 2217 Bool isRASL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_R); } 2218 #endif 2190 Bool isRADL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_R); } 2191 Bool isRASL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_R); } 2219 2192 2220 2193 #if POC_RESET_FLAG -
trunk/source/Lib/TLibCommon/TypeDef.h
r547 r588 43 43 #define SYNTAX_BYTES 10 ///< number of bytes taken by syntaxes per 4x4 block [RefIdxL0(1byte), RefIdxL1(1byte), MVxL0(2bytes), MVyL0(2bytes), MVxL1(2bytes), MVyL1(2bytes)] 44 44 45 #if SVC_EXTENSION 46 #define MAX_LAYERS 8 ///< max number of layers the codec is supposed to handle 47 45 48 #define VPS_VUI_OFFSET 1 ///< N0085: Signal VPS VUI offset in the VPS extension 46 47 49 #define RANDOM_ACCESS_SEI_FIX 1 48 #if SVC_EXTENSION49 #define MAX_LAYERS 2 ///< max number of layers the codec is supposed to handle50 51 50 #define O0137_MAX_LAYERID 1 ///< JCTVC-O0137, JCTVC-O0200, JCTVC-O0223: restrict nuh_layer_id and vps_max_layers_minus1 52 51 52 #define P0130_EOB 1 ///< JCTVC-P0130, set layer Id of EOB NALU to be fixed to 0 53 #define P0307_REMOVE_VPS_VUI_OFFSET 1 ///< JCTVC-P0307, remove implementation related to VPS VUI offset signalling 54 #define P0307_VPS_NON_VUI_EXTENSION 1 ///< JCTVC-P0307, implementation related to NON VUI VPS Extension signalling 55 56 #define DISCARDABLE_PIC_RPS 1 ///< JCTVC-P0130: Inter-layer RPS and temporal RPS should not contain picture with discardable_flag equal to 1 57 #define VPS_EXTN_UEV_CODING 1 ///< JCTVC-P0306: Code some syntax elements as ue(v), and remove some syntax elements that duplicate behaviour 58 #define CHANGE_NUMSUBDPB_IDX 1 ///< Change index of NumSubDpb from output layer set to layer set, to be more aligned with the Spec 59 #define RESOLUTION_BASED_DPB 1 ///< JCTVC-P0192: Assign layers to sub-DPBs based on the rep_format() signaled in the VPS 60 #define SUB_BITSTREAM_PROPERTY_SEI 1 ///< JCTVC-P0204: Sub-bitstream property SEI message 53 61 #define O0109_O0199_FLAGS_TO_VUI 1 ///< JCTVC-O0109, O0199: move single_layer_for_non_irap_flag and higher_layer_flag to vps_vui 54 62 #define O0109_VIEW_ID_LEN 1 ///< JCTVC-O0109: view_id_len_minus1 to view_id_len, and add constraint (1<<view_id_len) is greater than or equal to NumViews 63 64 #define P0048_REMOVE_PROFILE_REF 1 ///< JCTVC-P0048: remove profile_ref_minus1 65 #if !P0048_REMOVE_PROFILE_REF 55 66 #define O0109_PROF_REF_MINUS1 1 ///< JCTVC-O0109: constraint that profile_ref_minus1[i] shall be less than or equal to i 67 #endif 68 69 #define P0295_DEFAULT_OUT_LAYER_IDC 1 ///< JCTVC-P0295: modifify default_one_target_output_layer_idc to default_target_output_layer_idc 56 70 #define O0109_DEFAULT_ONE_OUT_LAYER_IDC 1 ///< JCTVC-O0109: default_one_target_output_layer_flag to default_one_target_output_layer_idc 57 71 #define O0109_MOVE_VPS_VUI_FLAG 1 ///< JCTVC-O0109: move vps_vui_present_flag before vps_vui_offset … … 63 77 #define O0194_JOINT_US_BITSHIFT 1 ///< JCTVC-O0194: Joint Upsampling and bit-shift 64 78 #endif 65 #define O0194_WEIGHTED_PREDICTION_CGS 0///< JCTVC-O0194: Weighted prediciton for color gamut scalability79 #define O0194_WEIGHTED_PREDICTION_CGS 1 ///< JCTVC-O0194: Weighted prediciton for color gamut scalability 66 80 #define MFM_ENCCONSTRAINT 1 ///< JCTVC-O0216: Encoder constraint for motion field mapping 67 81 #define VPS_NUH_LAYER_ID 1 ///< JCTVC-N0085: Assert that the nuh_layer_id of VPS NAL unit should be 0 … … 76 90 77 91 #define SCALINGLIST_INFERRING 1 ///< JCTVC-N0371: inter-layer scaling list 78 #define M0463_VUI_EXT_ILP_REF 0 ///< JCTVC-M0463: VUI extension inter-layer dependency offset signalling79 92 #define SPS_EXTENSION 1 ///< Define sps_extension() syntax structure 80 93 #if SPS_EXTENSION 81 94 #define O0142_CONDITIONAL_SPS_EXTENSION 1 ///< JCTVC-O0142: Conditional SPS extension 82 95 #endif 83 #define VERT_MV_CONSTRAINT 1 ///< Vertical MV component constraint flag84 96 #define SCALABILITY_MASK_E0104 1 ///< JCT3V-E0104: scalability mask for depth 85 97 #define LAYER_CTB 0 ///< enable layer-specific CTB structure … … 103 115 #define VPS_EXTN_PROFILE_INFO 1 ///< Include profile information for layer sets in VPS extension 104 116 #define VPS_EXTN_DIRECT_REF_LAYERS 1 ///< Include indication of direct dependency of layers in VPS extension 105 #define M0457_PREDICTION_INDICATIONS 1106 117 #define M0040_ADAPTIVE_RESOLUTION_CHANGE 1 107 118 #define VPS_VUI 1 ///< Include function structure for VPS VUI … … 117 128 #endif 118 129 #define VPS_VUI_VIDEO_SIGNAL 1 ///< JCTVC-O0118 video signal information 130 #if VPS_VUI_VIDEO_SIGNAL 131 #define VPS_VUI_VIDEO_SIGNAL_MOVE 1 ///< JCTVC-P0076 Move video signal information syntax structure earlier in the VPS VUI 132 #endif 119 133 #endif //VPS_VUI 120 134 121 135 #endif 122 136 137 #define P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED 1 ///< JCTVC-P0125 -- Keep it as a reserved FFFF value --- The following two macros (VPS_EXTN_OFFSET & VPS_EXTN_OFFSET_CALC) will have no effect when this macro is set to 1. 123 138 #define VPS_EXTN_OFFSET 1 ///< implementation of vps_extension_offset syntax element 124 139 #define VPS_EXTN_OFFSET_CALC 1 ///< Calculation of VPS extension offset … … 133 148 134 149 #define JCTVC_M0259_LAMBDAREFINEMENT 1 ///< JCTVC-M0259: lambda refinement (encoder only optimization) 135 #define RESTR_CHK 1 ///< JCTVC-M0208 proposal 1136 #define ILP_RAP 1 ///< JCTVC-M0208 proposal 3137 150 138 151 #define AVC_BASE 1 ///< YUV BL reading for AVC base SVC … … 144 157 #define ENCODER_FAST_MODE 1 ///< JCTVC-L0174: enable encoder fast mode. TestMethod 1 is enabled by setting to 1 and TestMethod 2 is enable by setting to 2. By default it is set to 1. 145 158 #define REF_IDX_MFM 1 ///< JCTVC-L0336: motion vector mapping of inter-layer reference picture 146 #define JCTVC_M0458_INTERLAYER_RPS_SIG 1 ///< implementation of JCTVC-L0178147 #if JCTVC_M0458_INTERLAYER_RPS_SIG148 159 #define MAX_ONE_RESAMPLING_DIRECT_LAYERS 1 ///< Allow maximum of one resampling process for direct reference layers 149 160 #define MOTION_RESAMPLING_CONSTRAINT 1 ///< JCTVC-N0108: Allow maximum of one motion resampling process for direct reference layers, and use motion inter-layer prediction from the same layer as texture inter-layer prediction. 150 #endif151 #define JCTVC_M0203_INTERLAYER_PRED_IDC 1 ///< JCTVC-M0203: implementation of Inter-layer Prediction Indication152 #if JCTVC_M0203_INTERLAYER_PRED_IDC153 161 #define EARLY_REF_PIC_MARKING 1 ///< Decoded picture marking of sub-layer non-reference pictures 154 162 #define N0120_MAX_TID_REF_PRESENT_FLAG 1 ///< JCTVC-N0120: max_tid_ref_pics_plus1_present_flag … … 156 164 #define O0225_MAX_TID_FOR_REF_LAYERS 1 157 165 #define O0225_TID_BASED_IL_RPS_DERIV 1 158 159 166 #define VPS_TSLAYERS 1 ///< JCTVC-O0120 signal max temporal sub-layers for each layer 160 167 #define TSLAYERS_IL_RPS 1 ///< JCTVC-O0120 IL RPS based on max temporal sub-layers 161 # endif168 #define P0079_DERIVE_NUMACTIVE_REF_PICS 1 ///< JCTVC-P0079 Modification of derivation of variable NumActiveRefLayerPics 162 169 #if REF_IDX_MFM 163 #define REMOVE_COL_PICTURE_SIGNALING 1 ///< JCTVC-N0107: remove alternative collocated picture signalling164 #define M0457_COL_PICTURE_SIGNALING 1165 170 #define N0139_POSITION_ROUNDING_OFFSET 1 ///< JCTVC-N0139: offset for collocated block in motion mapping 166 #endif167 168 #if !VPS_EXTN_DIRECT_REF_LAYERS || !M0457_PREDICTION_INDICATIONS || !JCTVC_M0458_INTERLAYER_RPS_SIG169 #define M0457_IL_SAMPLE_PRED_ONLY_FLAG 0 ///< shall be 0, JCTVC-N0107170 #else171 #define M0457_IL_SAMPLE_PRED_ONLY_FLAG 0 ///< shall be 0, JCTVC-N0107172 171 #endif 173 172 … … 190 189 191 190 #define VIEW_ID_RELATED_SIGNALING 1 ///< Introduce syntax elements view_id and view_id_val 192 #define M0043_LAYERS_PRESENT_SEI 0 ///< JCTVC-M0043: add layers present SEI. Macro shall be equal to 0 according to the JCTVC-N0174 discussion. The code is to be removed.191 #define LAYERS_NOT_PRESENT_SEI 1 ///< JCTVC-M0043: add layers not present SEI. 193 192 #define N0383_IL_CONSTRAINED_TILE_SETS_SEI 1 194 193 #define N0065_LAYER_POC_ALIGNMENT 1 … … 252 251 #define MAX_VPS_OP_SETS_PLUS1 1024 253 252 #define MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 1 253 #endif 254 255 #if SUB_BITSTREAM_PROPERTY_SEI 256 #define MAX_SUB_STREAMS 1024 254 257 #endif 255 258 -
trunk/source/Lib/TLibDecoder/SEIread.cpp
r442 r588 93 93 fprintf( g_hTrace, "===========Tone Mapping Info SEI message ===========\n"); 94 94 break; 95 #if M0043_LAYERS_PRESENT_SEI96 case SEI::LAYERS_ PRESENT:95 #if LAYERS_NOT_PRESENT_SEI 96 case SEI::LAYERS_NOT_PRESENT: 97 97 fprintf( g_hTrace, "=========== Layers Present SEI message ===========\n"); 98 98 break; … … 106 106 break; 107 107 #endif 108 #if SUB_BITSTREAM_PROPERTY_SEI 109 case SEI::SUB_BITSTREAM_PROPERTY: 110 fprintf( g_hTrace, "=========== Sub-bitstream property SEI message ===========\n"); 111 break; 112 #endif 108 113 case SEI::SCALABLE_NESTING: 109 114 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n"); … … 119 124 * unmarshal a single SEI message from bitstream bs 120 125 */ 121 #if M0043_LAYERS_PRESENT_SEI126 #if LAYERS_NOT_PRESENT_SEI 122 127 void SEIReader::parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, TComVPS *vps, TComSPS *sps) 123 128 #else … … 130 135 do 131 136 { 132 #if M0043_LAYERS_PRESENT_SEI137 #if LAYERS_NOT_PRESENT_SEI 133 138 xReadSEImessage(seis, nalUnitType, vps, sps); 134 139 #else … … 145 150 } 146 151 147 #if M0043_LAYERS_PRESENT_SEI152 #if LAYERS_NOT_PRESENT_SEI 148 153 Void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, TComVPS *vps, TComSPS *sps) 149 154 #else … … 254 259 xParseSEIToneMappingInfo((SEIToneMappingInfo&) *sei, payloadSize); 255 260 break; 256 #if M0043_LAYERS_PRESENT_SEI257 case SEI::LAYERS_ PRESENT:261 #if LAYERS_NOT_PRESENT_SEI 262 case SEI::LAYERS_NOT_PRESENT: 258 263 if (!vps) 259 264 { 260 printf ("Warning: Found Layers present SEI message, but no active VPS is available. Ignoring.");265 printf ("Warning: Found Layers not present SEI message, but no active VPS is available. Ignoring."); 261 266 } 262 267 else 263 268 { 264 sei = new SEILayers Present;265 xParseSEILayers Present((SEILayersPresent&) *sei, payloadSize, vps);269 sei = new SEILayersNotPresent; 270 xParseSEILayersNotPresent((SEILayersNotPresent&) *sei, payloadSize, vps); 266 271 } 267 272 break; … … 277 282 break; 278 283 #endif 284 #if SUB_BITSTREAM_PROPERTY_SEI 285 case SEI::SUB_BITSTREAM_PROPERTY: 286 sei = new SEISubBitstreamProperty; 287 xParseSEISubBitstreamProperty((SEISubBitstreamProperty&) *sei); 288 break; 289 #endif 279 290 case SEI::SCALABLE_NESTING: 280 291 sei = new SEIScalableNesting; 281 #if M0043_LAYERS_PRESENT_SEI292 #if LAYERS_NOT_PRESENT_SEI 282 293 xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, vps, sps); 283 294 #else … … 741 752 } 742 753 743 #if M0043_LAYERS_PRESENT_SEI744 Void SEIReader::xParseSEILayers Present(SEILayersPresent &sei, UInt payloadSize, TComVPS *vps)754 #if LAYERS_NOT_PRESENT_SEI 755 Void SEIReader::xParseSEILayersNotPresent(SEILayersNotPresent &sei, UInt payloadSize, TComVPS *vps) 745 756 { 746 757 UInt uiCode; … … 752 763 for (; i < sei.m_vpsMaxLayers; i++) 753 764 { 754 READ_FLAG( uiCode, "layer_ present_flag" ); sei.m_layerPresentFlag[i] = uiCode ? true : false;765 READ_FLAG( uiCode, "layer_not_present_flag" ); sei.m_layerNotPresentFlag[i] = uiCode ? true : false; 755 766 } 756 767 for (; i < MAX_LAYERS; i++) 757 768 { 758 sei.m_layer PresentFlag[i] = false;769 sei.m_layerNotPresentFlag[i] = false; 759 770 } 760 771 xParseByteAlign(); … … 829 840 } 830 841 #endif 831 832 #if M0043_LAYERS_PRESENT_SEI 842 #if SUB_BITSTREAM_PROPERTY_SEI 843 Void SEIReader::xParseSEISubBitstreamProperty(SEISubBitstreamProperty &sei) 844 { 845 UInt uiCode; 846 READ_CODE( 4, uiCode, "active_vps_id" ); sei.m_activeVpsId = uiCode; 847 READ_UVLC( uiCode, "num_additional_sub_streams_minus1" ); sei.m_numAdditionalSubStreams = uiCode + 1; 848 849 for( Int i = 0; i < sei.m_numAdditionalSubStreams; i++ ) 850 { 851 READ_CODE( 2, uiCode, "sub_bitstream_mode[i]" ); sei.m_subBitstreamMode[i] = uiCode; 852 READ_UVLC( uiCode, "output_layer_set_idx_to_vps[i]" ); sei.m_outputLayerSetIdxToVps[i] = uiCode; 853 READ_CODE( 3, uiCode, "highest_sub_layer_id[i]" ); sei.m_highestSublayerId[i] = uiCode; 854 READ_CODE( 16, uiCode, "avg_bit_rate[i]" ); sei.m_avgBitRate[i] = uiCode; 855 READ_CODE( 16, uiCode, "max_bit_rate[i]" ); sei.m_maxBitRate[i] = uiCode; 856 } 857 xParseByteAlign(); 858 } 859 #endif 860 #if LAYERS_NOT_PRESENT_SEI 833 861 Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComVPS *vps, TComSPS *sps) 834 862 #else … … 876 904 // read nested SEI messages 877 905 do { 878 #if M0043_LAYERS_PRESENT_SEI906 #if LAYERS_NOT_PRESENT_SEI 879 907 xReadSEImessage(sei.m_nestedSEIs, nalUnitType, vps, sps); 880 908 #else -
trunk/source/Lib/TLibDecoder/SEIread.h
r442 r588 56 56 SEIReader() {}; 57 57 virtual ~SEIReader() {}; 58 #if M0043_LAYERS_PRESENT_SEI58 #if LAYERS_NOT_PRESENT_SEI 59 59 Void parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, TComVPS *vps, TComSPS *sps); 60 60 #else … … 62 62 #endif 63 63 protected: 64 #if M0043_LAYERS_PRESENT_SEI64 #if LAYERS_NOT_PRESENT_SEI 65 65 Void xReadSEImessage (SEIMessages& seis, const NalUnitType nalUnitType, TComVPS *vps, TComSPS *sps); 66 66 #else … … 83 83 Void xParseSEIInterLayerConstrainedTileSets (SEIInterLayerConstrainedTileSets &sei, UInt payloadSize); 84 84 #endif 85 #if M0043_LAYERS_PRESENT_SEI 86 Void xParseSEILayersPresent (SEILayersPresent &sei, UInt payloadSize, TComVPS *vps); 85 #if SUB_BITSTREAM_PROPERTY_SEI 86 Void xParseSEISubBitstreamProperty (SEISubBitstreamProperty &sei); 87 #endif 88 #if LAYERS_NOT_PRESENT_SEI 89 Void xParseSEILayersNotPresent (SEILayersNotPresent &sei, UInt payloadSize, TComVPS *vps); 87 90 Void xParseSEIScalableNesting (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComVPS *vps, TComSPS *sps); 88 91 #else -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r547 r588 756 756 } 757 757 READ_FLAG( uiCode, "sps_temporal_mvp_enable_flag" ); pcSPS->setTMVPFlagsPresent(uiCode); 758 #if REF_IDX_MFM759 #if !M0457_COL_PICTURE_SIGNALING760 if(pcSPS->getLayerId() > 0)761 {762 READ_FLAG( uiCode, "sps_enh_mfm_enable_flag" );763 pcSPS->setMFMEnabledFlag( uiCode ? true : false );764 }765 #endif766 #endif767 758 READ_FLAG( uiCode, "sps_strong_intra_smoothing_enable_flag" ); pcSPS->setUseStrongIntraSmoothing(uiCode); 768 759 … … 815 806 // more syntax elements to be parsed here 816 807 817 #if VERT_MV_CONSTRAINT818 808 READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" ); 819 809 // Vertical MV component restriction is not used in SHVC CTC 820 810 assert( uiCode == 0 ); 821 #endif 811 822 812 if( pcSPS->getLayerId() > 0 ) 823 813 { … … 836 826 } 837 827 } 838 #if M0463_VUI_EXT_ILP_REF839 //// sps_extension_vui_parameters( )840 if( pcSPS->getVuiParameters()->getBitstreamRestrictionFlag() )841 {842 READ_UVLC( uiCode, "num_ilp_restricted_ref_layers" ); pcSPS->setNumIlpRestrictedRefLayers( uiCode );843 for( Int i = 0; i < pcSPS->getNumIlpRestrictedRefLayers( ); i++ )844 {845 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcSPS->setMinSpatialSegmentOffsetPlus1( i, uiCode );846 if( pcSPS->getMinSpatialSegmentOffsetPlus1( i ) > 0 )847 {848 READ_FLAG( uiCode, "ctu_based_offset_enabled_flag[ i ]"); pcSPS->setCtuBasedOffsetEnabledFlag(i, uiCode == 1 );849 if( pcSPS->getCtuBasedOffsetEnabledFlag( i ) )850 {851 READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1[ i ]"); pcSPS->setMinHorizontalCtuOffsetPlus1( i, uiCode );852 }853 }854 }855 }856 //// sps_extension_vui_parameters( ) END857 #endif858 828 } 859 829 #endif … … 877 847 READ_FLAG( uiCode, "vps_temporal_id_nesting_flag" ); pcVPS->setTemporalNestingFlag( uiCode ? true:false ); 878 848 assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag()); 849 #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED 879 850 #if VPS_EXTN_OFFSET 880 851 READ_CODE( 16, uiCode, "vps_extension_offset" ); pcVPS->setExtensionOffset( uiCode ); 852 #else 853 READ_CODE( 16, uiCode, "vps_reserved_ffff_16bits" ); assert(uiCode == 0xffff); 854 #endif 881 855 #else 882 856 READ_CODE( 16, uiCode, "vps_reserved_ffff_16bits" ); assert(uiCode == 0xffff); … … 995 969 READ_FLAG( uiCode, "avc_base_layer_flag" ); vps->setAvcBaseLayerFlag(uiCode ? true : false); 996 970 971 #if !P0307_REMOVE_VPS_VUI_OFFSET 997 972 #if O0109_MOVE_VPS_VUI_FLAG 998 973 READ_FLAG( uiCode, "vps_vui_present_flag"); vps->setVpsVuiPresentFlag(uiCode ? true : false); … … 1005 980 #if O0109_MOVE_VPS_VUI_FLAG 1006 981 } 982 #endif 1007 983 #endif 1008 984 READ_FLAG( uiCode, "splitting_flag" ); vps->setSplittingFlag(uiCode ? true : false); … … 1122 1098 } 1123 1099 #endif 1124 #if JCTVC_M0203_INTERLAYER_PRED_IDC1125 1100 #if N0120_MAX_TID_REF_PRESENT_FLAG 1126 1101 READ_FLAG( uiCode, "max_tid_ref_present_flag"); vps->setMaxTidRefPresentFlag(uiCode ? true : false); … … 1180 1155 } 1181 1156 #endif 1182 #endif1183 1157 #if ILP_SSH_SIG 1184 1158 READ_FLAG( uiCode, "all_ref_layers_active_flag" ); vps->setIlpSshSignalingEnabledFlag(uiCode ? true : false); … … 1186 1160 #if VPS_EXTN_PROFILE_INFO 1187 1161 // Profile-tier-level signalling 1162 #if !VPS_EXTN_UEV_CODING 1188 1163 READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1" ); assert( uiCode == (vps->getNumLayerSets() - 1) ); 1189 1164 READ_CODE( 6, uiCode, "vps_num_profile_tier_level_minus1"); vps->setNumProfileTierLevel( uiCode + 1 ); 1165 #else 1166 READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1"); vps->setNumProfileTierLevel( uiCode + 1 ); 1167 #endif 1190 1168 vps->getPTLForExtnPtr()->resize(vps->getNumProfileTierLevel()); 1191 1169 for(Int idx = 1; idx <= vps->getNumProfileTierLevel() - 1; idx++) … … 1194 1172 if( !vps->getProfilePresentFlag(idx) ) 1195 1173 { 1174 #if P0048_REMOVE_PROFILE_REF 1175 // Copy profile information from previous one 1176 vps->getPTLForExtn(idx)->copyProfileInfo( (idx==1) ? vps->getPTL() : vps->getPTLForExtn( idx - 1 ) ); 1177 #else 1196 1178 READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1); 1197 1179 #if O0109_PROF_REF_MINUS1 … … 1202 1184 // Copy profile information as indicated 1203 1185 vps->getPTLForExtn(idx)->copyProfileInfo( vps->getPTLForExtn( vps->getProfileLayerSetRef(idx) ) ); 1186 #endif 1204 1187 } 1205 1188 parsePTL( vps->getPTLForExtn(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 ); … … 1207 1190 #endif 1208 1191 1192 #if !VPS_EXTN_UEV_CODING 1209 1193 READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); vps->setMoreOutputLayerSetsThanDefaultFlag( uiCode ? true : false ); 1210 1194 Int numOutputLayerSets = 0; … … 1218 1202 numOutputLayerSets = vps->getNumLayerSets() + vps->getNumAddOutputLayerSets(); 1219 1203 } 1204 #else 1205 READ_UVLC( uiCode, "num_add_output_layer_sets" ); vps->setNumAddOutputLayerSets( uiCode ); 1206 Int numOutputLayerSets = vps->getNumLayerSets() + vps->getNumAddOutputLayerSets(); 1207 #endif 1208 1209 #if P0295_DEFAULT_OUT_LAYER_IDC 1210 if( numOutputLayerSets > 1 ) 1211 { 1212 READ_CODE( 2, uiCode, "default_target_output_layer_idc" ); vps->setDefaultTargetOutputLayerIdc( uiCode ); 1213 } 1214 vps->setNumOutputLayerSets( numOutputLayerSets ); 1215 1216 for(i = 1; i < numOutputLayerSets; i++) 1217 { 1218 if( i > (vps->getNumLayerSets() - 1) ) 1219 { 1220 Int numBits = 1; 1221 while ((1 << numBits) < (vps->getNumLayerSets() - 1)) 1222 { 1223 numBits++; 1224 } 1225 READ_CODE( numBits, uiCode, "output_layer_set_idx_minus1"); vps->setOutputLayerSetIdx( i, uiCode + 1); 1226 } 1227 else 1228 { 1229 vps->setOutputLayerSetIdx( i, i ); 1230 } 1231 if ( i > (vps->getNumLayerSets() - 1) || vps->getDefaultTargetOutputLayerIdc() >= 2 ) 1232 { 1233 Int lsIdx = vps->getOutputLayerSetIdx(i); 1234 for(j = 0; j < vps->getNumLayersInIdList(lsIdx) - 1; j++) 1235 { 1236 READ_FLAG( uiCode, "output_layer_flag[i][j]"); vps->setOutputLayerFlag(i, j, uiCode); 1237 } 1238 } 1239 else 1240 { 1241 // i <= (vps->getNumLayerSets() - 1) 1242 // Assign OutputLayerFlag depending on default_one_target_output_layer_flag 1243 Int lsIdx = i; 1244 if( vps->getDefaultTargetOutputLayerIdc() == 1 ) 1245 { 1246 for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++) 1247 { 1248 vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(lsIdx)-1)) && (vps->getDimensionId(j,1) == 0) ); 1249 } 1250 } 1251 else if ( vps->getDefaultTargetOutputLayerIdc() == 0 ) 1252 { 1253 for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++) 1254 { 1255 vps->setOutputLayerFlag(i, j, 1); 1256 } 1257 } 1258 } 1259 Int numBits = 1; 1260 while ((1 << numBits) < (vps->getNumProfileTierLevel())) 1261 { 1262 numBits++; 1263 } 1264 READ_CODE( numBits, uiCode, "profile_level_tier_idx[i]" ); vps->setProfileLevelTierIdx(i, uiCode); 1265 } 1266 #else 1220 1267 if( numOutputLayerSets > 1 ) 1221 1268 { … … 1299 1346 READ_CODE( numBits, uiCode, "profile_level_tier_idx[i]" ); vps->setProfileLevelTierIdx(i, uiCode); 1300 1347 } 1348 #endif 1301 1349 1302 1350 #if O0153_ALT_OUTPUT_LAYER_FLAG … … 1315 1363 { 1316 1364 #if O0096_REP_FORMAT_INDEX 1365 #if !VPS_EXTN_UEV_CODING 1317 1366 READ_CODE( 8, uiCode, "vps_num_rep_formats_minus1" ); 1367 #else 1368 READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); 1369 #endif 1318 1370 #else 1319 1371 READ_CODE( 4, uiCode, "vps_num_rep_formats_minus1" ); … … 1342 1394 { 1343 1395 #if O0096_REP_FORMAT_INDEX 1396 #if !VPS_EXTN_UEV_CODING 1344 1397 READ_CODE( 8, uiCode, "vps_rep_format_idx[i]" ); 1398 #else 1399 Int numBits = 1; 1400 while ((1 << numBits) < (vps->getVpsNumRepFormats())) 1401 { 1402 numBits++; 1403 } 1404 READ_CODE( numBits, uiCode, "vps_rep_format_idx[i]" ); 1405 #endif 1345 1406 #else 1346 1407 READ_CODE( 4, uiCode, "vps_rep_format_idx[i]" ); … … 1364 1425 } 1365 1426 #endif 1366 #if JCTVC_M0458_INTERLAYER_RPS_SIG 1427 #if RESOLUTION_BASED_DPB 1428 vps->assignSubDpbIndices(); 1429 #endif 1367 1430 READ_FLAG(uiCode, "max_one_active_ref_layer_flag" ); 1368 1431 vps->setMaxOneActiveRefLayerFlag(uiCode); 1369 #endif1370 1432 #if O0062_POC_LSB_NOT_PRESENT_FLAG 1371 1433 for(i = 1; i< vps->getMaxLayers(); i++) … … 1388 1450 1389 1451 #if VPS_DPB_SIZE_TABLE 1390 vps->deriveNumberOfSubDpbs(); 1391 for(i = 1; i < vps->getNumOutputLayerSets(); i++) 1392 { 1393 READ_FLAG( uiCode, "sub_layer_flag_info_present_flag[i]"); vps->setSubLayerFlagInfoPresentFlag( i, uiCode ? true : false ); 1394 for(j = 0; j < vps->getMaxTLayers(); j++) 1395 { 1396 if( j > 0 && vps->getSubLayerFlagInfoPresentFlag(i) ) 1397 { 1398 READ_FLAG( uiCode, "sub_layer_dpb_info_present_flag[i]"); vps->setSubLayerDpbInfoPresentFlag( i, j, uiCode ? true : false); 1399 } 1400 else 1401 { 1402 if( j == 0 ) // Always signal for the first sub-layer 1403 { 1404 vps->setSubLayerDpbInfoPresentFlag( i, j, true ); 1405 } 1406 else // if (j != 0) && !vps->getSubLayerFlagInfoPresentFlag(i) 1407 { 1408 vps->setSubLayerDpbInfoPresentFlag( i, j, false ); 1409 } 1410 } 1411 if( vps->getSubLayerDpbInfoPresentFlag(i, j) ) // If sub-layer DPB information is present 1412 { 1413 for(Int k = 0; k < vps->getNumSubDpbs(i); k++) 1414 { 1415 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1[i][k][j]" ); vps->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); 1416 } 1417 READ_UVLC( uiCode, "max_vps_num_reorder_pics[i][j]" ); vps->setMaxVpsNumReorderPics( i, j, uiCode); 1418 READ_UVLC( uiCode, "max_vps_latency_increase_plus1[i][j]" ); vps->setMaxVpsLatencyIncreasePlus1( i, j, uiCode); 1419 } 1420 } 1421 } 1422 #endif 1423 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS 1452 parseVpsDpbSizeTable(vps); 1453 #endif 1454 1455 #if VPS_EXTN_DIRECT_REF_LAYERS 1424 1456 READ_UVLC( uiCode, "direct_dep_type_len_minus2"); vps->setDirectDepTypeLen(uiCode+2); 1425 1457 #if O0096_DEFAULT_DEPENDENCY_TYPE … … 1470 1502 #endif 1471 1503 1504 #if P0307_VPS_NON_VUI_EXTENSION 1505 READ_UVLC( uiCode, "vps_non_vui_extension_length"); vps->setVpsNonVuiExtLength((Int)uiCode); 1506 if ( vps->getVpsNonVuiExtLength() > 0 ) 1507 { 1508 printf("\n\nUp to the current spec, the value of vps_non_vui_extension_length is supposed to be 0\n"); 1509 } 1510 #endif 1511 1472 1512 #if !O0109_O0199_FLAGS_TO_VUI 1473 1513 #if M0040_ADAPTIVE_RESOLUTION_CHANGE … … 1477 1517 READ_FLAG(uiCode, "higher_layer_irap_skip_flag" ); vps->setHigherLayerIrapSkipFlag(uiCode == 1 ? true : false); 1478 1518 #endif 1519 #endif 1520 1521 #if P0307_REMOVE_VPS_VUI_OFFSET 1522 READ_FLAG( uiCode, "vps_vui_present_flag"); vps->setVpsVuiPresentFlag(uiCode ? true : false); 1479 1523 #endif 1480 1524 … … 1540 1584 READ_CODE( 4, uiCode, "bit_depth_chroma_minus8" ); repFormat->setBitDepthVpsChroma( uiCode + 8 ); 1541 1585 #endif 1586 } 1587 #endif 1588 #if VPS_DPB_SIZE_TABLE 1589 Void TDecCavlc::parseVpsDpbSizeTable( TComVPS *vps ) 1590 { 1591 UInt uiCode; 1592 #if !RESOLUTION_BASED_DPB 1593 vps->deriveNumberOfSubDpbs(); 1594 #endif 1595 for(Int i = 1; i < vps->getNumOutputLayerSets(); i++) 1596 { 1597 #if CHANGE_NUMSUBDPB_IDX 1598 Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx( i ); 1599 #endif 1600 READ_FLAG( uiCode, "sub_layer_flag_info_present_flag[i]"); vps->setSubLayerFlagInfoPresentFlag( i, uiCode ? true : false ); 1601 for(Int j = 0; j < vps->getMaxTLayers(); j++) 1602 { 1603 if( j > 0 && vps->getSubLayerFlagInfoPresentFlag(i) ) 1604 { 1605 READ_FLAG( uiCode, "sub_layer_dpb_info_present_flag[i]"); vps->setSubLayerDpbInfoPresentFlag( i, j, uiCode ? true : false); 1606 } 1607 else 1608 { 1609 if( j == 0 ) // Always signal for the first sub-layer 1610 { 1611 vps->setSubLayerDpbInfoPresentFlag( i, j, true ); 1612 } 1613 else // if (j != 0) && !vps->getSubLayerFlagInfoPresentFlag(i) 1614 { 1615 vps->setSubLayerDpbInfoPresentFlag( i, j, false ); 1616 } 1617 } 1618 if( vps->getSubLayerDpbInfoPresentFlag(i, j) ) // If sub-layer DPB information is present 1619 { 1620 #if CHANGE_NUMSUBDPB_IDX 1621 for(Int k = 0; k < vps->getNumSubDpbs(layerSetIdxForOutputLayerSet); k++) 1622 #else 1623 for(Int k = 0; k < vps->getNumSubDpbs(i); k++) 1624 #endif 1625 { 1626 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1[i][k][j]" ); vps->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); 1627 } 1628 READ_UVLC( uiCode, "max_vps_num_reorder_pics[i][j]" ); vps->setMaxVpsNumReorderPics( i, j, uiCode); 1629 #if RESOLUTION_BASED_DPB 1630 if( vps->getNumSubDpbs(layerSetIdxForOutputLayerSet) != vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ) ) 1631 { 1632 for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++) 1633 { 1634 READ_UVLC( uiCode, "max_vps_layer_dec_pic_buff_minus1[i][k][j]" ); vps->setMaxVpsLayerDecPicBuffMinus1( i, k, j, uiCode); 1635 } 1636 } 1637 else // vps->getNumSubDpbs(layerSetIdxForOutputLayerSet) == vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ) 1638 { 1639 for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++) 1640 { 1641 vps->setMaxVpsLayerDecPicBuffMinus1( i, k, j, vps->getMaxVpsDecPicBufferingMinus1( i, k, j)); 1642 } 1643 } 1644 #endif 1645 READ_UVLC( uiCode, "max_vps_latency_increase_plus1[i][j]" ); vps->setMaxVpsLatencyIncreasePlus1( i, j, uiCode); 1646 } 1647 } 1648 } 1542 1649 } 1543 1650 #endif … … 1614 1721 } 1615 1722 #endif 1723 #if VPS_VUI_VIDEO_SIGNAL_MOVE 1724 READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); vps->setVideoSigPresentVpsFlag( uiCode == 1 ); 1725 if (vps->getVideoSigPresentVpsFlag()) 1726 { 1727 READ_CODE(4, uiCode, "vps_num_video_signal_info_minus1" ); vps->setNumVideoSignalInfo(uiCode + 1); 1728 } 1729 else 1730 { 1731 vps->setNumVideoSignalInfo(vps->getMaxLayers()); 1732 } 1733 1734 1735 for(i = 0; i < vps->getNumVideoSignalInfo(); i++) 1736 { 1737 READ_CODE(3, uiCode, "video_vps_format" ); vps->setVideoVPSFormat(i,uiCode); 1738 READ_FLAG(uiCode, "video_full_range_vps_flag" ); vps->setVideoFullRangeVpsFlag(i,uiCode); 1739 READ_CODE(8, uiCode, "color_primaries_vps" ); vps->setColorPrimaries(i,uiCode); 1740 READ_CODE(8, uiCode, "transfer_characteristics_vps" ); vps->setTransCharacter(i,uiCode); 1741 READ_CODE(8, uiCode, "matrix_coeffs_vps" );vps->setMaxtrixCoeff(i,uiCode); 1742 } 1743 if(!vps->getVideoSigPresentVpsFlag()) 1744 { 1745 for (i=0; i < vps->getMaxLayers(); i++) 1746 { 1747 vps->setVideoSignalInfoIdx(i,i); 1748 } 1749 } 1750 else { 1751 vps->setVideoSignalInfoIdx(0,0); 1752 if (vps->getNumVideoSignalInfo() > 1 ) 1753 { 1754 for (i=1; i < vps->getMaxLayers(); i++) 1755 READ_CODE(4, uiCode, "vps_video_signal_info_idx" ); vps->setVideoSignalInfoIdx(i, uiCode); 1756 } 1757 else { 1758 for (i=1; i < vps->getMaxLayers(); i++) 1759 { 1760 vps->setVideoSignalInfoIdx(i,0); 1761 } 1762 } 1763 } 1764 #endif 1616 1765 #if VPS_VUI_TILES_NOT_IN_USE__FLAG 1617 1766 UInt layerIdx; … … 1672 1821 1673 1822 #if N0160_VUI_EXT_ILP_REF 1674 READ_FLAG( uiCode, "num_ilp_restricted_ref_layers" ); vps->setNumIlpRestrictedRefLayers( uiCode == 1 );1675 if( vps->get NumIlpRestrictedRefLayers())1823 READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); vps->setIlpRestrictedRefLayersFlag( uiCode == 1 ); 1824 if( vps->getIlpRestrictedRefLayersFlag()) 1676 1825 { 1677 1826 for(i = 1; i < vps->getMaxLayers(); i++) … … 1693 1842 #endif 1694 1843 #if VPS_VUI_VIDEO_SIGNAL 1844 #if VPS_VUI_VIDEO_SIGNAL_MOVE 1845 #else 1695 1846 READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); vps->setVideoSigPresentVpsFlag( uiCode == 1 ); 1696 1847 if (vps->getVideoSigPresentVpsFlag()) … … 1733 1884 } 1734 1885 } 1886 #endif 1735 1887 #endif 1736 1888 } … … 1820 1972 if(rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits) 1821 1973 { 1974 #if DISCARDABLE_PIC_RPS 1975 READ_FLAG(uiCode, "discardable_flag"); rpcSlice->setDiscardableFlag( uiCode ? true : false ); 1976 #else 1822 1977 READ_FLAG(uiCode, "discardable_flag"); // ignored 1978 #endif 1823 1979 iBits++; 1824 1980 } … … 2064 2220 2065 2221 #if SVC_EXTENSION 2066 #if JCTVC_M0458_INTERLAYER_RPS_SIG2067 2222 rpcSlice->setActiveNumILRRefIdx(0); 2068 2223 #if ILP_SSH_SIG … … 2094 2249 else 2095 2250 { 2251 #if P0079_DERIVE_NUMACTIVE_REF_PICS 2252 Int numRefLayerPics = 0; 2253 Int i = 0; 2254 Int refLayerPicIdc [MAX_VPS_LAYER_ID_PLUS1]; 2255 for(i = 0, numRefLayerPics = 0; i < rpcSlice->getNumILRRefIdx(); i++ ) 2256 { 2257 if(rpcSlice->getVPS()->getMaxTidIlRefPicsPlus1(rpcSlice->getVPS()->getLayerIdInVps(i),rpcSlice->getLayerId()) > rpcSlice->getTLayer() && 2258 (rpcSlice->getVPS()->getMaxTSLayersMinus1(rpcSlice->getVPS()->getLayerIdInVps(i)) >= rpcSlice->getTLayer()) ) 2259 { 2260 refLayerPicIdc[ numRefLayerPics++ ] = i; 2261 } 2262 } 2263 if (numRefLayerPics) 2264 rpcSlice->setActiveNumILRRefIdx(1); 2265 #else 2096 2266 rpcSlice->setActiveNumILRRefIdx(1); 2267 #endif 2097 2268 } 2098 2269 #if ILP_NUM_REF_CHK … … 2166 2337 } 2167 2338 #endif 2168 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG2169 rpcSlice->setInterLayerSamplePredOnlyFlag( false );2170 if( rpcSlice->getNumSamplePredRefLayers() > 0 && rpcSlice->getActiveNumILRRefIdx() > 0 )2171 {2172 READ_FLAG( uiCode, "inter_layer_sample_pred_only_flag" );2173 rpcSlice->setInterLayerSamplePredOnlyFlag( uiCode > 0 );2174 }2175 #endif2176 #else2177 if( rpcSlice->getLayerId() > 0 )2178 {2179 rpcSlice->setNumILRRefIdx( rpcSlice->getVPS()->getNumDirectRefLayers( rpcSlice->getLayerId() ) );2180 }2181 #endif2182 2339 #endif 2183 2340 … … 2357 2514 if ( rpcSlice->getEnableTMVPFlag() ) 2358 2515 { 2359 #if M0457_COL_PICTURE_SIGNALING2360 #if REMOVE_COL_PICTURE_SIGNALING 2516 #if SVC_EXTENSION && REF_IDX_MFM 2517 // set motion mapping flag 2361 2518 rpcSlice->setMFMEnabledFlag( ( rpcSlice->getNumMotionPredRefLayers() > 0 && rpcSlice->getActiveNumILRRefIdx() ) ? true : false ); 2362 #else2363 rpcSlice->setMFMEnabledFlag( false );2364 rpcSlice->setColRefLayerIdx( 0 );2365 rpcSlice->setAltColIndicationFlag( false );2366 if ( sps->getLayerId() > 0 && rpcSlice->getActiveNumILRRefIdx() > 0 && rpcSlice->getNumMotionPredRefLayers() > 0 )2367 {2368 READ_FLAG( uiCode, "alt_collocated_indication_flag" );2369 rpcSlice->setAltColIndicationFlag( uiCode == 1 ? true : false );2370 rpcSlice->setMFMEnabledFlag( uiCode == 1 ? true : false );2371 if ( rpcSlice->getNumMotionPredRefLayers() > 1 )2372 {2373 READ_UVLC( uiCode, "collocated_ref_layer_idx" );2374 rpcSlice->setColRefLayerIdx( uiCode );2375 }2376 }2377 else2378 {2379 #endif //REMOVE_COL_PICTURE_SIGNALING2380 2519 #endif 2381 2520 if ( rpcSlice->getSliceType() == B_SLICE ) … … 2400 2539 rpcSlice->setColRefIdx(0); 2401 2540 } 2402 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING2403 }2404 #endif2405 2541 } 2406 2542 if ( (pps->getUseWP() && rpcSlice->getSliceType()==P_SLICE) || (pps->getWPBiPred() && rpcSlice->getSliceType()==B_SLICE) ) -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r494 r588 83 83 Void parseRepFormat ( RepFormat *repFormat ); 84 84 #endif 85 #if VPS_DPB_SIZE_TABLE 86 Void parseVpsDpbSizeTable( TComVPS *vps ); 87 #endif 85 88 Void parseSPS ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager ); 86 89 Void parseSPSExtension ( TComSPS* pcSPS ); -
trunk/source/Lib/TLibDecoder/TDecGop.cpp
r540 r588 234 234 //-- For time output for each slice 235 235 #if SVC_EXTENSION 236 printf("\nPOC %4d LId: %1d TId: %1d ( %c-SLICE , QP%3d ) ", pcSlice->getPOC(),236 printf("\nPOC %4d LId: %1d TId: %1d ( %c-SLICE %s, QP%3d ) ", pcSlice->getPOC(), 237 237 rpcPic->getLayerId(), 238 238 pcSlice->getTLayer(), 239 239 c, 240 NaluToStr( pcSlice->getNalUnitType() ).data(), 240 241 pcSlice->getSliceQp() ); 241 242 #else -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r547 r588 86 86 m_bRefreshPending = false; 87 87 #endif 88 #if RESOLUTION_BASED_DPB 89 m_subDpbIdx = -1; 90 #endif 88 91 } 89 92 … … 178 181 { 179 182 #if USE_DPB_SIZE_TABLE 180 if( getCommonDecoderParams()->get OutputLayerSetIdx() == 0 )183 if( getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 ) 181 184 { 182 185 assert( this->getLayerId() == 0 ); … … 187 190 TComVPS *vps = slice->getVPS(); 188 191 // SHM decoders will use DPB size table in the VPS to determine the number of reorder pictures. 189 numReorderPics[temporalLayer] = vps->getMaxVpsNumReorderPics( getCommonDecoderParams()->get OutputLayerSetIdx() , temporalLayer);192 numReorderPics[temporalLayer] = vps->getMaxVpsNumReorderPics( getCommonDecoderParams()->getTargetOutputLayerSetIdx() , temporalLayer); 190 193 } 191 194 #else … … 196 199 if (m_cIlpPic[0] == NULL) 197 200 { 198 for (Int j=0; j < MAX_LAYERS /*MAX_NUM_REF*/; j++) // consider to set to NumDirectRefLayers[LayerIdInVps[nuh_layer_id]]201 for (Int j=0; j < m_numDirectRefLayers; j++) 199 202 { 200 203 … … 282 285 { 283 286 #if USE_DPB_SIZE_TABLE 284 if( getCommonDecoderParams()->get OutputLayerSetIdx() == 0 )287 if( getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 ) 285 288 { 286 289 assert( this->getLayerId() == 0 ); … … 291 294 TComVPS *vps = pcSlice->getVPS(); 292 295 // SHM decoders will use DPB size table in the VPS to determine the number of reorder pictures. 293 numReorderPics[temporalLayer] = vps->getMaxVpsNumReorderPics( getCommonDecoderParams()->get OutputLayerSetIdx() , temporalLayer);296 numReorderPics[temporalLayer] = vps->getMaxVpsNumReorderPics( getCommonDecoderParams()->getTargetOutputLayerSetIdx() , temporalLayer); 294 297 } 295 298 #else … … 299 302 300 303 #if USE_DPB_SIZE_TABLE 301 if( getCommonDecoderParams()->get OutputLayerSetIdx() == 0 )304 if( getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 ) 302 305 { 303 306 assert( this->getLayerId() == 0 ); … … 306 309 else 307 310 { 308 m_iMaxRefPicNum = pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1( getCommonDecoderParams()->getOutputLayerSetIdx(), pcSlice->getLayerId(), pcSlice->getTLayer() ) + 1; // m_uiMaxDecPicBuffering has the space for the picture currently being decoded 311 #if RESOLUTION_BASED_DPB 312 Int layerSetIdxForOutputLayerSet = pcSlice->getVPS()->getOutputLayerSetIdx( getCommonDecoderParams()->getTargetOutputLayerSetIdx() ); 313 Int layerIdx = pcSlice->getVPS()->findLayerIdxInLayerSet( layerSetIdxForOutputLayerSet, pcSlice->getLayerId() ); assert( layerIdx != -1 ); 314 m_iMaxRefPicNum = pcSlice->getVPS()->getMaxVpsLayerDecPicBuffMinus1( getCommonDecoderParams()->getTargetOutputLayerSetIdx(), layerIdx, pcSlice->getTLayer() ) + 1; // m_uiMaxDecPicBuffering has the space for the picture currently being decoded 315 #else 316 m_iMaxRefPicNum = pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1( getCommonDecoderParams()->getTargetOutputLayerSetIdx(), pcSlice->getLayerId(), pcSlice->getTLayer() ) + 1; // m_uiMaxDecPicBuffering has the space for the picture currently being decoded 317 #endif 309 318 } 310 319 #else … … 815 824 #if OUTPUT_LAYER_SET_INDEX 816 825 // Following check should go wherever the VPS is activated 817 checkValueOfOutputLayerSetIdx( m_apcSlicePilot->getVPS()); 826 checkValueOfTargetOutputLayerSetIdx( m_apcSlicePilot->getVPS()); 827 #endif 828 #if RESOLUTION_BASED_DPB 829 // Following assignment should go wherever a new VPS is activated 830 assignSubDpbs(m_apcSlicePilot->getVPS()); 818 831 #endif 819 832 m_apcSlicePilot->initSlice( nalu.m_layerId ); … … 845 858 #if SVC_EXTENSION 846 859 m_apcSlicePilot->setSliceIdx( m_uiSliceIdx ); // it should be removed if HM will reflect it in above 847 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS860 #if VPS_EXTN_DIRECT_REF_LAYERS 848 861 setRefLayerParams(m_apcSlicePilot->getVPS()); 849 862 #endif 850 #if M0457_COL_PICTURE_SIGNALING851 863 m_apcSlicePilot->setNumMotionPredRefLayers(m_numMotionPredRefLayers); 852 #endif853 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG854 m_apcSlicePilot->setNumSamplePredRefLayers( getNumSamplePredRefLayers() );855 #endif856 864 #endif 857 865 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder); … … 1478 1486 1479 1487 #if REF_IDX_MFM 1480 #if M0457_COL_PICTURE_SIGNALING1481 1488 if( pcSlice->getMFMEnabledFlag() ) 1482 #else1483 if( pcSlice->getSPS()->getMFMEnabledFlag() )1484 #endif1485 1489 { 1486 1490 pcSlice->setRefPOCListILP(m_ppcTDecTop[m_layerId]->m_cIlpPic, pcSlice->getBaseColPic()); 1487 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING1488 pcSlice->setMotionPredIlp(getMotionPredIlp(pcSlice));1489 #endif1490 1491 } 1491 1492 pcSlice->setRefPicList( m_cListPic, false, m_cIlpPic); … … 1668 1669 } 1669 1670 #endif 1670 #if M0043_LAYERS_PRESENT_SEI1671 #if LAYERS_NOT_PRESENT_SEI 1671 1672 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveVPS(), m_parameterSetManagerDecoder.getActiveSPS() ); 1672 1673 #else … … 1676 1677 else 1677 1678 { 1678 #if M0043_LAYERS_PRESENT_SEI1679 #if LAYERS_NOT_PRESENT_SEI 1679 1680 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveVPS(), m_parameterSetManagerDecoder.getActiveSPS() ); 1680 1681 #else … … 1696 1697 if(nalUnitType == NAL_UNIT_SUFFIX_SEI) 1697 1698 { 1698 #if M0043_LAYERS_PRESENT_SEI1699 #if LAYERS_NOT_PRESENT_SEI 1699 1700 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveVPS(), m_parameterSetManagerDecoder.getActiveSPS() ); 1700 1701 #else … … 1704 1705 else 1705 1706 { 1706 #if M0043_LAYERS_PRESENT_SEI1707 #if LAYERS_NOT_PRESENT_SEI 1707 1708 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveVPS(), m_parameterSetManagerDecoder.getActiveSPS() ); 1708 1709 #else … … 1865 1866 1866 1867 case NAL_UNIT_EOB: 1868 #if P0130_EOB 1869 //Check layer id of the nalu. if it is not 0, give a warning message. 1870 if (nalu.m_layerId > 0) 1871 { 1872 printf( "\n\nThis bitstream is ended with EOB NALU that has layer id greater than 0\n" ); 1873 } 1874 #endif 1867 1875 return false; 1868 1876 … … 1959 1967 #endif 1960 1968 1961 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS1969 #if VPS_EXTN_DIRECT_REF_LAYERS 1962 1970 1963 1971 Void TDecTop::setRefLayerParams( TComVPS* vps ) … … 2013 2021 #endif 2014 2022 2015 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING2016 TComPic* TDecTop::getMotionPredIlp(TComSlice* pcSlice)2017 {2018 TComPic* ilpPic = NULL;2019 Int activeMotionPredReflayerIdx = 0;2020 2021 for( Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )2022 {2023 UInt refLayerIdc = pcSlice->getInterLayerPredLayerIdc(i);2024 if( getMotionPredEnabledFlag( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) ) )2025 {2026 if (activeMotionPredReflayerIdx == pcSlice->getColRefLayerIdx())2027 {2028 ilpPic = m_cIlpPic[refLayerIdc];2029 break;2030 }2031 else2032 {2033 activeMotionPredReflayerIdx++;2034 }2035 }2036 }2037 2038 assert(ilpPic != NULL);2039 2040 return ilpPic;2041 }2042 #endif2043 2023 #if OUTPUT_LAYER_SET_INDEX 2044 Void TDecTop::checkValueOf OutputLayerSetIdx(TComVPS *vps)2024 Void TDecTop::checkValueOfTargetOutputLayerSetIdx(TComVPS *vps) 2045 2025 { 2046 2026 CommonDecoderParams* params = this->getCommonDecoderParams(); 2027 2028 assert( params->getTargetLayerId() < vps->getMaxLayers() ); 2029 2047 2030 if( params->getValueCheckedFlag() ) 2048 2031 { 2049 2032 return; // Already checked 2050 2033 } 2051 if( params->get OutputLayerSetIdx() == -1 ) // Output layer set index not specified2034 if( params->getTargetOutputLayerSetIdx() == -1 ) // Output layer set index not specified 2052 2035 { 2053 2036 Bool layerSetMatchFound = false; … … 2096 2079 // Match found 2097 2080 layerSetMatchFound = true; 2098 params->set OutputLayerSetIdx( i );2081 params->setTargetOutputLayerSetIdx( i ); 2099 2082 params->setValueCheckedFlag( true ); 2100 2083 break; … … 2107 2090 { 2108 2091 // Check if the target decoded layer is the highest layer in the list 2109 Int layerSetIdx = vps->getOutputLayerSetIdx( params->getOutputLayerSetIdx() ); // Index to the layer set 2092 assert( params->getTargetOutputLayerSetIdx() < vps->getNumLayerSets() ); 2093 Int layerSetIdx = vps->getOutputLayerSetIdx( params->getTargetOutputLayerSetIdx() ); // Index to the layer set 2110 2094 assert( params->getTargetLayerId() == vps->getNumLayersInIdList( layerSetIdx ) - 1); 2111 2095 … … 2138 2122 } 2139 2123 #endif 2124 #if RESOLUTION_BASED_DPB 2125 Void TDecTop::assignSubDpbs(TComVPS *vps) 2126 { 2127 if( m_subDpbIdx == -1 ) // Sub-DPB index is not already assigned 2128 { 2129 Int lsIdx = vps->getOutputLayerSetIdx( getCommonDecoderParams()->getTargetOutputLayerSetIdx() ); 2130 2131 Int layerIdx = vps->findLayerIdxInLayerSet( lsIdx, getLayerId() ); 2132 assert( layerIdx != -1 ); // Current layer should be found in the layer set. 2133 2134 // Copy from the active VPS based on the layer ID. 2135 m_subDpbIdx = vps->getSubDpbAssigned( lsIdx, layerIdx ); 2136 } 2137 } 2138 #endif 2140 2139 //! \} -
trunk/source/Lib/TLibDecoder/TDecTop.h
r540 r588 117 117 Int m_iBLSourceHeight; 118 118 #endif 119 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS119 #if VPS_EXTN_DIRECT_REF_LAYERS 120 120 Int m_numDirectRefLayers; 121 121 Int m_refLayerId[MAX_VPS_LAYER_ID_PLUS1]; … … 144 144 Bool m_bRefreshPending; 145 145 #endif 146 146 #if RESOLUTION_BASED_DPB 147 Int m_subDpbIdx; // Index to the sub-DPB that the layer belongs to. 148 // When new VPS is activated, this should be re-initialized to -1 149 #endif 147 150 public: 148 151 TDecTop(); … … 177 180 #if VPS_EXTN_DIRECT_REF_LAYERS 178 181 TDecTop* getRefLayerDec(UInt refLayerIdc); 179 #if M0457_PREDICTION_INDICATIONS180 182 Int getNumDirectRefLayers () { return m_numDirectRefLayers; } 181 183 Void setNumDirectRefLayers (Int num) { m_numDirectRefLayers = num; } … … 206 208 207 209 Void setRefLayerParams( TComVPS* vps ); 208 #endif209 210 #endif 210 211 #if AVC_BASE … … 244 245 Void xDecodePPS(); 245 246 Void xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType ); 246 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING247 TComPic* getMotionPredIlp(TComSlice* pcSlice);248 #endif249 247 250 248 #if NO_CLRAS_OUTPUT_FLAG … … 262 260 CommonDecoderParams* getCommonDecoderParams() { return m_commonDecoderParams; } 263 261 Void setCommonDecoderParams(CommonDecoderParams* x) { m_commonDecoderParams = x; } 264 Void checkValueOf OutputLayerSetIdx(TComVPS *vps);262 Void checkValueOfTargetOutputLayerSetIdx(TComVPS *vps); 265 263 #endif 266 264 #if SCALINGLIST_INFERRING 267 265 ParameterSetManagerDecoder* getParameterSetManager() { return &m_parameterSetManagerDecoder; } 268 266 #endif 267 #if RESOLUTION_BASED_DPB 268 Void setSubDpbIdx(Int idx) { m_subDpbIdx = idx; } 269 Int getSubDpbIdx() { return m_subDpbIdx; } 270 Void assignSubDpbs(TComVPS *vps); 271 #endif 269 272 };// END CLASS DEFINITION TDecTop 270 273 -
trunk/source/Lib/TLibEncoder/NALwrite.cpp
r313 r588 91 91 vector<uint8_t>& rbsp = nalu.m_Bitstream.getFIFO(); 92 92 93 #if P0130_EOB 94 if (rbsp.size() == 0) return; 95 #endif 96 93 97 for (vector<uint8_t>::iterator it = rbsp.begin(); it != rbsp.end();) 94 98 { -
trunk/source/Lib/TLibEncoder/SEIwrite.cpp
r442 r588 87 87 fprintf( g_hTrace, "=========== Tone Mapping Info SEI message ===========\n"); 88 88 break; 89 #if M0043_LAYERS_PRESENT_SEI90 case SEI::LAYERS_ PRESENT:89 #if LAYERS_NOT_PRESENT_SEI 90 case SEI::LAYERS_NOT_PRESENT: 91 91 fprintf( g_hTrace, "=========== Layers Present SEI message ===========\n"); 92 92 break; … … 99 99 fprintf( g_hTrace, "=========== Inter Layer Constrained Tile Sets SEI message ===========\n"); 100 100 break; 101 #endif 102 #if SUB_BITSTREAM_PROPERTY_SEI 103 case SEI::SUB_BITSTREAM_PROPERTY: 104 fprintf( g_hTrace, "=========== Sub-bitstream property SEI message ===========\n"); 105 break; 101 106 #endif 102 107 case SEI::SCALABLE_NESTING: … … 150 155 xWriteSEIToneMappingInfo(*static_cast<const SEIToneMappingInfo*>(&sei)); 151 156 break; 152 #if M0043_LAYERS_PRESENT_SEI153 case SEI::LAYERS_ PRESENT:154 xWriteSEILayers Present(*static_cast<const SEILayersPresent*>(&sei));157 #if LAYERS_NOT_PRESENT_SEI 158 case SEI::LAYERS_NOT_PRESENT: 159 xWriteSEILayersNotPresent(*static_cast<const SEILayersNotPresent*>(&sei)); 155 160 break; 156 161 #endif … … 162 167 xWriteSEIInterLayerConstrainedTileSets(*static_cast<const SEIInterLayerConstrainedTileSets*>(&sei)); 163 168 break; 169 #endif 170 #if SUB_BITSTREAM_PROPERTY_SEI 171 case SEI::SUB_BITSTREAM_PROPERTY: 172 xWriteSEISubBitstreamProperty(*static_cast<const SEISubBitstreamProperty*>(&sei)); 173 break; 164 174 #endif 165 175 case SEI::SCALABLE_NESTING: … … 536 546 } 537 547 538 #if M0043_LAYERS_PRESENT_SEI539 Void SEIWriter::xWriteSEILayers Present(const SEILayersPresent& sei)548 #if LAYERS_NOT_PRESENT_SEI 549 Void SEIWriter::xWriteSEILayersNotPresent(const SEILayersNotPresent& sei) 540 550 { 541 551 WRITE_UVLC( sei.m_activeVpsId, "lp_sei_active_vps_id" ); 542 552 for (UInt i = 0; i < sei.m_vpsMaxLayers; i++) 543 553 { 544 WRITE_FLAG( sei.m_layer PresentFlag[i], "layer_present_flag" );554 WRITE_FLAG( sei.m_layerNotPresentFlag[i], "layer_not_present_flag" ); 545 555 } 546 556 xWriteByteAlign(); … … 606 616 } 607 617 #endif 608 618 #if SUB_BITSTREAM_PROPERTY_SEI 619 Void SEIWriter::xWriteSEISubBitstreamProperty(const SEISubBitstreamProperty &sei) 620 { 621 WRITE_CODE( sei.m_activeVpsId, 4, "active_vps_id" ); 622 assert( sei.m_numAdditionalSubStreams >= 1 ); 623 WRITE_UVLC( sei.m_numAdditionalSubStreams - 1, "num_additional_sub_streams_minus1" ); 624 625 for( Int i = 0; i < sei.m_numAdditionalSubStreams; i++ ) 626 { 627 WRITE_CODE( sei.m_subBitstreamMode[i], 2, "sub_bitstream_mode[i]" ); 628 WRITE_UVLC( sei.m_outputLayerSetIdxToVps[i], "output_layer_set_idx_to_vps[i]" ); 629 WRITE_CODE( sei.m_highestSublayerId[i], 3, "highest_sub_layer_id[i]" ); 630 WRITE_CODE( sei.m_avgBitRate[i], 16, "avg_bit_rate[i]" ); 631 WRITE_CODE( sei.m_maxBitRate[i], 16, "max_bit_rate[i]" ); 632 } 633 xWriteByteAlign(); 634 } 635 #endif 609 636 Void SEIWriter::xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps) 610 637 { -
trunk/source/Lib/TLibEncoder/SEIwrite.h
r442 r588 64 64 Void xWriteSEIGradualDecodingRefreshInfo(const SEIGradualDecodingRefreshInfo &sei); 65 65 Void xWriteSEIToneMappingInfo(const SEIToneMappingInfo& sei); 66 #if M0043_LAYERS_PRESENT_SEI67 Void xWriteSEILayers Present(const SEILayersPresent& sei);66 #if LAYERS_NOT_PRESENT_SEI 67 Void xWriteSEILayersNotPresent(const SEILayersNotPresent& sei); 68 68 #endif 69 69 Void xWriteSEISOPDescription(const SEISOPDescription& sei); 70 70 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 71 71 Void xWriteSEIInterLayerConstrainedTileSets(const SEIInterLayerConstrainedTileSets& sei); 72 #endif 73 #if SUB_BITSTREAM_PROPERTY_SEI 74 Void xWriteSEISubBitstreamProperty(const SEISubBitstreamProperty &sei); 72 75 #endif 73 76 Void xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps); -
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r547 r588 579 579 } 580 580 WRITE_FLAG( pcSPS->getTMVPFlagsPresent() ? 1 : 0, "sps_temporal_mvp_enable_flag" ); 581 #if REF_IDX_MFM582 #if !M0457_COL_PICTURE_SIGNALING583 if( pcSPS->getLayerId() > 0 )584 {585 WRITE_FLAG( pcSPS->getMFMEnabledFlag() ? 1 : 0, "sps_enh_mfm_enable_flag" );586 }587 #endif588 #endif589 581 WRITE_FLAG( pcSPS->getUseStrongIntraSmoothing(), "sps_strong_intra_smoothing_enable_flag" ); 590 582 … … 623 615 // more syntax elements to be written here 624 616 625 #if VERT_MV_CONSTRAINT626 617 // Vertical MV component restriction is not used in SHVC CTC 627 618 WRITE_FLAG( 0, "inter_view_mv_vert_constraint_flag" ); 628 #endif 619 629 620 if( pcSPS->getLayerId() > 0 ) 630 621 { … … 642 633 } 643 634 } 644 #if M0463_VUI_EXT_ILP_REF645 //// sps_extension_vui_parameters( )646 if( pcSPS->getVuiParameters()->getBitstreamRestrictionFlag() )647 {648 WRITE_UVLC( pcSPS->getNumIlpRestrictedRefLayers( ), "num_ilp_restricted_ref_layers" );649 for( Int i = 0; i < pcSPS->getNumIlpRestrictedRefLayers( ); i++ )650 {651 WRITE_UVLC( pcSPS->getMinSpatialSegmentOffsetPlus1( i ), "min_spatial_segment_offset_plus1" );652 if( pcSPS->getMinSpatialSegmentOffsetPlus1( i ) > 0 )653 {654 WRITE_FLAG( pcSPS->getCtuBasedOffsetEnabledFlag( i ), "ctu_based_offset_enabled_flag[ i ]");655 if( pcSPS->getCtuBasedOffsetEnabledFlag( i ) )656 {657 WRITE_UVLC( pcSPS->getMinHorizontalCtuOffsetPlus1( i ), "min_horizontal_ctu_offset_plus1[ i ]");658 }659 }660 }661 }662 //// sps_extension_vui_parameters( ) END663 #endif664 635 } 665 636 #endif 666 637 Void TEncCavlc::codeVPS( TComVPS* pcVPS ) 667 638 { 639 #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED 668 640 #if VPS_EXTN_OFFSET_CALC 669 641 UInt numBytesInVps = this->m_pcBitIf->getNumberOfWrittenBits(); 670 642 #endif 643 #endif 644 #if !P0307_REMOVE_VPS_VUI_OFFSET 671 645 #if VPS_VUI_OFFSET 672 646 m_vpsVuiCounter = this->m_pcBitIf->getNumberOfWrittenBits(); 647 #endif 673 648 #endif 674 649 WRITE_CODE( pcVPS->getVPSId(), 4, "vps_video_parameter_set_id" ); … … 682 657 WRITE_FLAG( pcVPS->getTemporalNestingFlag(), "vps_temporal_id_nesting_flag" ); 683 658 assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag()); 659 #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED 684 660 #if VPS_EXTN_OFFSET 685 661 WRITE_CODE( pcVPS->getExtensionOffset(), 16, "vps_extension_offset" ); 662 #else 663 WRITE_CODE( 0xffff, 16, "vps_reserved_ffff_16bits" ); 664 #endif 686 665 #else 687 666 WRITE_CODE( 0xffff, 16, "vps_reserved_ffff_16bits" ); … … 775 754 WRITE_FLAG(1, "vps_extension_alignment_bit_equal_to_one"); 776 755 } 756 #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED 777 757 #if VPS_EXTN_OFFSET_CALC 778 758 Int vpsExntOffsetValueInBits = this->m_pcBitIf->getNumberOfWrittenBits() - numBytesInVps + 16; // 2 bytes for NUH … … 780 760 pcVPS->setExtensionOffset( vpsExntOffsetValueInBits >> 3 ); 781 761 #endif 762 #endif 782 763 codeVPSExtension(pcVPS); 783 764 WRITE_FLAG( 0, "vps_extension2_flag" ); // Flag value of 1 reserved … … 798 779 799 780 WRITE_FLAG( vps->getAvcBaseLayerFlag(), "avc_base_layer_flag" ); 781 #if !P0307_REMOVE_VPS_VUI_OFFSET 800 782 #if O0109_MOVE_VPS_VUI_FLAG 801 783 #if !VPS_VUI … … 819 801 WRITE_FLAG( vps->getSplittingFlag(), "splitting_flag" ); 820 802 #endif // O0109_MOVE_VPS_VUI_FLAG 803 #endif 804 WRITE_FLAG( vps->getSplittingFlag(), "splitting_flag" ); 821 805 822 806 for(i = 0; i < MAX_VPS_NUM_SCALABILITY_TYPES; i++) … … 908 892 } 909 893 #endif 910 #if JCTVC_M0203_INTERLAYER_PRED_IDC911 894 #if N0120_MAX_TID_REF_PRESENT_FLAG 912 895 WRITE_FLAG( vps->getMaxTidRefPresentFlag(), "max_tid_ref_present_flag"); … … 944 927 } 945 928 #endif 946 #endif947 929 #if ILP_SSH_SIG 948 930 WRITE_FLAG( vps->getIlpSshSignalingEnabledFlag(), "all_ref_layers_active_flag" ); … … 950 932 #if VPS_EXTN_PROFILE_INFO 951 933 // Profile-tier-level signalling 934 #if !VPS_EXTN_UEV_CODING 952 935 WRITE_CODE( vps->getNumLayerSets() - 1 , 10, "vps_number_layer_sets_minus1" ); 953 936 WRITE_CODE( vps->getNumProfileTierLevel() - 1, 6, "vps_num_profile_tier_level_minus1"); 937 #else 938 WRITE_UVLC( vps->getNumProfileTierLevel() - 1, "vps_num_profile_tier_level_minus1"); 939 #endif 954 940 for(Int idx = 1; idx <= vps->getNumProfileTierLevel() - 1; idx++) 955 941 { 956 942 WRITE_FLAG( vps->getProfilePresentFlag(idx), "vps_profile_present_flag[i]" ); 943 #if !P0048_REMOVE_PROFILE_REF 957 944 if( !vps->getProfilePresentFlag(idx) ) 958 945 { 959 946 WRITE_CODE( vps->getProfileLayerSetRef(idx) - 1, 6, "profile_ref_minus1[i]" ); 960 947 } 948 #endif 961 949 codePTL( vps->getPTLForExtn(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 ); 962 950 } 963 951 #endif 964 952 953 #if !VPS_EXTN_UEV_CODING 965 954 Int numOutputLayerSets = vps->getNumOutputLayerSets() ; 966 955 WRITE_FLAG( (numOutputLayerSets > vps->getNumLayerSets()), "more_output_layer_sets_than_default_flag" ); … … 969 958 WRITE_CODE( numOutputLayerSets - vps->getNumLayerSets(), 10, "num_add_output_layer_sets" ); 970 959 } 960 #else 961 Int numOutputLayerSets = vps->getNumOutputLayerSets() ; 962 assert( numOutputLayerSets - (Int)vps->getNumLayerSets() >= 0 ); 963 WRITE_UVLC( numOutputLayerSets - vps->getNumLayerSets(), "num_add_output_layer_sets" ); 964 #endif 971 965 if( numOutputLayerSets > 1 ) 972 966 { 967 #if P0295_DEFAULT_OUT_LAYER_IDC 968 WRITE_CODE( vps->getDefaultTargetOutputLayerIdc(), 2, "default_target_output_layer_idc" ); 969 #else 973 970 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC 974 971 WRITE_CODE( vps->getDefaultOneTargetOutputLayerIdc(), 2, "default_one_target_output_layer_idc" ); … … 976 973 WRITE_FLAG( vps->getDefaultOneTargetOutputLayerFlag(), "default_one_target_output_layer_flag" ); 977 974 #endif 975 #endif 978 976 } 979 977 … … 987 985 numBits++; 988 986 } 989 WRITE_CODE( vps->getOutputLayerSetIdx(i) - 1, numBits, "output_layer_set_idx_minus1"); 987 WRITE_CODE( vps->getOutputLayerSetIdx(i) - 1, numBits, "output_layer_set_idx_minus1"); 988 #if P0295_DEFAULT_OUT_LAYER_IDC 989 } 990 if ( i > (vps->getNumLayerSets() - 1) || vps->getDefaultTargetOutputLayerIdc() >= 2 ) //Instead of == 2, >= 2 is used to follow the agreement that value 3 should be interpreted as 2 991 { 992 #endif 990 993 Int lsIdx = vps->getOutputLayerSetIdx(i); 991 994 for(j = 0; j < vps->getNumLayersInIdList(lsIdx) - 1; j++) … … 1015 1018 { 1016 1019 #if O0096_REP_FORMAT_INDEX 1020 #if !VPS_EXTN_UEV_CODING 1017 1021 WRITE_CODE( vps->getVpsNumRepFormats() - 1, 8, "vps_num_rep_formats_minus1" ); 1022 #else 1023 WRITE_UVLC( vps->getVpsNumRepFormats() - 1, "vps_num_rep_formats_minus1" ); 1024 #endif 1018 1025 #else 1019 1026 WRITE_CODE( vps->getVpsNumRepFormats() - 1, 4, "vps_num_rep_formats_minus1" ); … … 1033 1040 { 1034 1041 #if O0096_REP_FORMAT_INDEX 1042 #if !VPS_EXTN_UEV_CODING 1035 1043 WRITE_CODE( vps->getVpsRepFormatIdx(i), 8, "vps_rep_format_idx[i]" ); 1036 1044 #else 1045 Int numBits = 1; 1046 while ((1 << numBits) < (vps->getVpsNumRepFormats())) 1047 { 1048 numBits++; 1049 } 1050 WRITE_CODE( vps->getVpsRepFormatIdx(i), numBits, "vps_rep_format_idx[i]" ); 1051 #endif 1052 #else 1037 1053 WRITE_CODE( vps->getVpsRepFormatIdx(i), 4, "vps_rep_format_idx[i]" ); 1038 1054 #endif … … 1042 1058 #endif 1043 1059 1044 #if JCTVC_M0458_INTERLAYER_RPS_SIG 1045 WRITE_FLAG(vps->getMaxOneActiveRefLayerFlag(), "max_one_active_ref_layer_flag"); 1046 #endif 1060 WRITE_FLAG(vps->getMaxOneActiveRefLayerFlag(), "max_one_active_ref_layer_flag"); 1047 1061 #if O0062_POC_LSB_NOT_PRESENT_FLAG 1048 1062 for(i = 1; i< vps->getMaxLayers(); i++) … … 1061 1075 #endif 1062 1076 #if VPS_DPB_SIZE_TABLE 1063 for(i = 1; i < vps->getNumOutputLayerSets(); i++) 1064 { 1065 WRITE_FLAG( vps->getSubLayerFlagInfoPresentFlag( i ), "sub_layer_flag_info_present_flag[i]"); 1066 for(j = 0; j < vps->getMaxTLayers(); j++) 1067 { 1068 if( j > 0 && vps->getSubLayerFlagInfoPresentFlag(i) ) 1069 { 1070 WRITE_FLAG( vps->getSubLayerDpbInfoPresentFlag( i, j), "sub_layer_dpb_info_present_flag[i]"); 1071 } 1072 if( vps->getSubLayerDpbInfoPresentFlag(i, j) ) 1073 { 1074 for(Int k = 0; k < vps->getNumSubDpbs(i); k++) 1075 { 1076 WRITE_UVLC( vps->getMaxVpsDecPicBufferingMinus1( i, k, j), "max_vps_dec_pic_buffering_minus1[i][k][j]" ); 1077 } 1078 WRITE_UVLC( vps->getMaxVpsNumReorderPics( i, j), "max_vps_num_reorder_pics[i][j]" ); 1079 WRITE_UVLC( vps->getMaxVpsLatencyIncreasePlus1( i, j), "max_vps_latency_increase_plus1[i][j]" ); 1080 } 1081 } 1082 } 1083 #endif 1084 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS 1077 codeVpsDpbSizeTable(vps); 1078 #endif 1079 #if VPS_EXTN_DIRECT_REF_LAYERS 1085 1080 WRITE_UVLC( vps->getDirectDepTypeLen()-2, "direct_dep_type_len_minus2"); 1086 1081 #if O0096_DEFAULT_DEPENDENCY_TYPE … … 1126 1121 #endif 1127 1122 1123 #if P0307_VPS_NON_VUI_EXTENSION 1124 WRITE_UVLC( vps->getVpsNonVuiExtLength(), "vps_non_vui_extension_length" ); 1125 if ( vps->getVpsNonVuiExtLength() > 0 ) 1126 { 1127 printf("\n\nUp to the current spec, the value of vps_non_vui_extension_length is supposed to be 0\n"); 1128 } 1129 #endif 1130 1128 1131 #if !O0109_MOVE_VPS_VUI_FLAG 1129 1132 #if !VPS_VUI … … 1146 1149 #endif 1147 1150 #else 1151 #if P0307_REMOVE_VPS_VUI_OFFSET 1152 WRITE_FLAG( 1, "vps_vui_present_flag" ); 1153 vps->setVpsVuiPresentFlag(true); 1154 #endif 1148 1155 if(vps->getVpsVuiPresentFlag()) // Should be conditioned on the value of vps_vui_present_flag 1149 1156 { … … 1152 1159 WRITE_FLAG(1, "vps_vui_alignment_bit_equal_to_one"); 1153 1160 } 1161 #if !P0307_REMOVE_VPS_VUI_OFFSET 1154 1162 #if VPS_VUI_OFFSET 1155 1163 Int vpsVuiOffsetValeInBits = this->m_pcBitIf->getNumberOfWrittenBits() - m_vpsVuiCounter + 16; // 2 bytes for NUH 1156 1164 assert( vpsVuiOffsetValeInBits % 8 == 0 ); 1157 1165 vps->setVpsVuiOffset( vpsVuiOffsetValeInBits >> 3 ); 1166 #endif 1158 1167 #endif 1159 1168 codeVPSVUI(vps); … … 1204 1213 } 1205 1214 #endif 1215 #if VPS_DPB_SIZE_TABLE 1216 Void TEncCavlc::codeVpsDpbSizeTable(TComVPS *vps) 1217 { 1218 for(Int i = 1; i < vps->getNumOutputLayerSets(); i++) 1219 { 1220 #if CHANGE_NUMSUBDPB_IDX 1221 Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx( i ); 1222 #endif 1223 WRITE_FLAG( vps->getSubLayerFlagInfoPresentFlag( i ), "sub_layer_flag_info_present_flag[i]"); 1224 for(Int j = 0; j < vps->getMaxTLayers(); j++) 1225 { 1226 if( j > 0 && vps->getSubLayerFlagInfoPresentFlag(i) ) 1227 { 1228 WRITE_FLAG( vps->getSubLayerDpbInfoPresentFlag( i, j), "sub_layer_dpb_info_present_flag[i]"); 1229 } 1230 if( vps->getSubLayerDpbInfoPresentFlag(i, j) ) 1231 { 1232 #if CHANGE_NUMSUBDPB_IDX 1233 for(Int k = 0; k < vps->getNumSubDpbs(layerSetIdxForOutputLayerSet); k++) 1234 #else 1235 for(Int k = 0; k < vps->getNumSubDpbs(i); k++) 1236 #endif 1237 { 1238 WRITE_UVLC( vps->getMaxVpsDecPicBufferingMinus1( i, k, j), "max_vps_dec_pic_buffering_minus1[i][k][j]" ); 1239 } 1240 WRITE_UVLC( vps->getMaxVpsNumReorderPics( i, j), "max_vps_num_reorder_pics[i][j]" ); 1241 #if RESOLUTION_BASED_DPB 1242 if( vps->getNumSubDpbs(layerSetIdxForOutputLayerSet) != vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ) ) // NumSubDpbs 1243 { 1244 for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++) 1245 { 1246 WRITE_UVLC( vps->getMaxVpsLayerDecPicBuffMinus1( i, k, j), "max_vps_layer_dec_pic_buff_minus1[i][k][j]" ); 1247 } 1248 } 1249 #endif 1250 WRITE_UVLC( vps->getMaxVpsLatencyIncreasePlus1( i, j), "max_vps_latency_increase_plus1[i][j]" ); 1251 } 1252 } 1253 } 1254 } 1255 #endif 1206 1256 #if VPS_VUI 1207 1257 Void TEncCavlc::codeVPSVUI (TComVPS *vps) … … 1251 1301 } 1252 1302 #endif 1303 #if VPS_VUI_VIDEO_SIGNAL_MOVE 1304 WRITE_FLAG( vps->getVideoSigPresentVpsFlag(), "video_signal_info_idx_present_flag" ); 1305 if (vps->getVideoSigPresentVpsFlag()) 1306 { 1307 WRITE_CODE(vps->getNumVideoSignalInfo()-1, 4, "vps_num_video_signal_info_minus1" ); 1308 } 1309 1310 for(i = 0; i < vps->getNumVideoSignalInfo(); i++) 1311 { 1312 WRITE_CODE(vps->getVideoVPSFormat(i), 3, "video_vps_format" ); 1313 WRITE_FLAG(vps->getVideoFullRangeVpsFlag(i), "video_full_range_vps_flag" ); 1314 WRITE_CODE(vps->getColorPrimaries(i), 8, "color_primaries_vps" ); 1315 WRITE_CODE(vps->getTransCharacter(i), 8, "transfer_characteristics_vps" ); 1316 WRITE_CODE(vps->getMaxtrixCoeff(i), 8, "matrix_coeffs_vps" ); 1317 } 1318 1319 if (vps->getVideoSigPresentVpsFlag() && vps->getNumVideoSignalInfo() > 1 ) 1320 { 1321 for (i=1; i < vps->getMaxLayers(); i++) 1322 WRITE_CODE(vps->getVideoSignalInfoIdx(i), 4, "vps_video_signal_info_idx" ); 1323 } 1324 #endif 1253 1325 #if VPS_VUI_TILES_NOT_IN_USE__FLAG 1254 1326 UInt layerIdx; … … 1304 1376 #endif 1305 1377 #if N0160_VUI_EXT_ILP_REF 1306 WRITE_FLAG( vps->get NumIlpRestrictedRefLayers() ? 1 : 0 , "num_ilp_restricted_ref_layers" );1307 if( vps->get NumIlpRestrictedRefLayers())1378 WRITE_FLAG( vps->getIlpRestrictedRefLayersFlag() ? 1 : 0 , "ilp_restricted_ref_layers_flag" ); 1379 if( vps->getIlpRestrictedRefLayersFlag()) 1308 1380 { 1309 1381 for(i = 1; i < vps->getMaxLayers(); i++) … … 1327 1399 #endif 1328 1400 #if VPS_VUI_VIDEO_SIGNAL 1401 #if VPS_VUI_VIDEO_SIGNAL_MOVE 1402 #else 1329 1403 WRITE_FLAG( vps->getVideoSigPresentVpsFlag(), "video_signal_info_idx_present_flag" ); 1330 1404 if (vps->getVideoSigPresentVpsFlag()) … … 1347 1421 WRITE_CODE(vps->getVideoSignalInfoIdx(i), 4, "vps_video_signal_info_idx" ); 1348 1422 } 1423 #endif 1349 1424 #endif 1350 1425 } … … 1611 1686 } 1612 1687 1613 #if JCTVC_M0458_INTERLAYER_RPS_SIG1688 #if SVC_EXTENSION 1614 1689 #if ILP_SSH_SIG 1615 1690 #if ILP_SSH_SIG_FIX … … 1650 1725 } 1651 1726 } 1652 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG 1653 if( pcSlice->getNumSamplePredRefLayers() > 0 && pcSlice->getActiveNumILRRefIdx() > 0 ) 1654 { 1655 WRITE_FLAG( pcSlice->getInterLayerSamplePredOnlyFlag(), "inter_layer_sample_pred_only_flag" ); 1656 } 1657 #endif 1658 #endif 1727 #endif //SVC_EXTENSION 1659 1728 1660 1729 if(pcSlice->getSPS()->getUseSAO()) … … 1772 1841 if ( pcSlice->getEnableTMVPFlag() ) 1773 1842 { 1774 #if SVC_EXTENSION && M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING1775 if ( !pcSlice->getIdrPicFlag() && pcSlice->getLayerId() > 0 && pcSlice->getActiveNumILRRefIdx() > 0 && pcSlice->getNumMotionPredRefLayers() > 0 )1776 {1777 WRITE_FLAG( pcSlice->getAltColIndicationFlag() ? 1 : 0, "alt_collocated_indication_flag" );1778 if (pcSlice->getAltColIndicationFlag() && pcSlice->getNumMotionPredRefLayers() > 1)1779 {1780 WRITE_UVLC(0, "collocated_ref_layer_idx");1781 }1782 }1783 else1784 {1785 #endif1786 1843 if ( pcSlice->getSliceType() == B_SLICE ) 1787 1844 { … … 1795 1852 WRITE_UVLC( pcSlice->getColRefIdx(), "collocated_ref_idx" ); 1796 1853 } 1797 #if SVC_EXTENSION && M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING1798 }1799 #endif1800 1854 } 1801 1855 if ( (pcSlice->getPPS()->getUseWP() && pcSlice->getSliceType()==P_SLICE) || (pcSlice->getPPS()->getWPBiPred() && pcSlice->getSliceType()==B_SLICE) ) -
trunk/source/Lib/TLibEncoder/TEncCavlc.h
r547 r588 68 68 TComSlice* m_pcSlice; 69 69 UInt m_uiCoeffCost; 70 #if !P0307_REMOVE_VPS_VUI_OFFSET 70 71 #if VPS_VUI_OFFSET 71 72 Int m_vpsVuiCounter; 73 #endif 72 74 #endif 73 75 Void codeShortTermRefPicSet ( TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Bool calledFromSliceHeader, Int idx ); … … 95 97 #if REPN_FORMAT_IN_VPS 96 98 Void codeRepFormat ( RepFormat *repFormat ); 99 #endif 100 #if VPS_DPB_SIZE_TABLE 101 Void codeVpsDpbSizeTable (TComVPS *vps); 97 102 #endif 98 103 Void codeVUI ( TComVUI *pcVUI, TComSPS* pcSPS ); -
trunk/source/Lib/TLibEncoder/TEncCfg.h
r540 r588 168 168 Int m_numActiveRefLayers; 169 169 Int m_predLayerId[MAX_VPS_LAYER_ID_PLUS1]; 170 #if M0457_PREDICTION_INDICATIONS171 170 Int m_numSamplePredRefLayers; 172 171 Int m_samplePredRefLayerId[MAX_VPS_LAYER_ID_PLUS1]; … … 175 174 Bool m_samplePredEnabledFlag[MAX_VPS_LAYER_ID_PLUS1]; 176 175 Bool m_motionPredEnabledFlag[MAX_VPS_LAYER_ID_PLUS1]; 177 #endif178 176 #endif 179 177 #if N0120_MAX_TID_REF_CFG … … 307 305 Int m_gradualDecodingRefreshInfoEnabled; 308 306 Int m_decodingUnitInfoSEIEnabled; 309 #if M0043_LAYERS_PRESENT_SEI310 Int m_layers PresentSEIEnabled;307 #if LAYERS_NOT_PRESENT_SEI 308 Int m_layersNotPresentSEIEnabled; 311 309 #endif 312 310 Int m_SOPDescriptionSEIEnabled; … … 452 450 Void setPredLayerId (Int i, Int refLayerId) { m_predLayerId[i] = refLayerId; } 453 451 454 #if M0457_PREDICTION_INDICATIONS455 452 Int getNumSamplePredRefLayers () { return m_numSamplePredRefLayers; } 456 453 Void setNumSamplePredRefLayers (Int num) { m_numSamplePredRefLayers = num; } … … 470 467 Bool getMotionPredEnabledFlag (Int i) { return m_motionPredEnabledFlag[i]; } 471 468 Void setMotionPredEnabledFlag (Int i,Bool flag) { m_motionPredEnabledFlag[i] = flag; } 472 #endif473 469 #endif 474 470 #if N0120_MAX_TID_REF_CFG … … 752 748 Void setDecodingUnitInfoSEIEnabled(Int b) { m_decodingUnitInfoSEIEnabled = b; } 753 749 Int getDecodingUnitInfoSEIEnabled() { return m_decodingUnitInfoSEIEnabled; } 754 #if M0043_LAYERS_PRESENT_SEI755 Void setLayers PresentSEIEnabled(Int b) { m_layersPresentSEIEnabled = b; }756 Int getLayers PresentSEIEnabled() { return m_layersPresentSEIEnabled; }750 #if LAYERS_NOT_PRESENT_SEI 751 Void setLayersNotPresentSEIEnabled(Int b) { m_layersNotPresentSEIEnabled = b; } 752 Int getLayersNotPresentSEIEnabled() { return m_layersNotPresentSEIEnabled; } 757 753 #endif 758 754 Void setSOPDescriptionSEIEnabled(Int b) { m_SOPDescriptionSEIEnabled = b; } -
trunk/source/Lib/TLibEncoder/TEncCu.cpp
r540 r588 462 462 testInter = false; 463 463 } 464 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG465 if( pcSlice->getInterLayerSamplePredOnlyFlag() )466 {467 testInter = false;468 }469 #endif470 464 } 471 465 #endif -
trunk/source/Lib/TLibEncoder/TEncGOP.cpp
r547 r588 167 167 } 168 168 169 #if M0043_LAYERS_PRESENT_SEI170 SEILayers Present* TEncGOP::xCreateSEILayersPresent ()169 #if LAYERS_NOT_PRESENT_SEI 170 SEILayersNotPresent* TEncGOP::xCreateSEILayersNotPresent () 171 171 { 172 172 UInt i = 0; 173 SEILayers Present *seiLayersPresent = new SEILayersPresent();174 seiLayers Present->m_activeVpsId = m_pcCfg->getVPS()->getVPSId();175 seiLayers Present->m_vpsMaxLayers = m_pcCfg->getVPS()->getMaxLayers();176 for ( ; i < seiLayers Present->m_vpsMaxLayers; i++)177 { 178 seiLayers Present->m_layerPresentFlag[i] = true;173 SEILayersNotPresent *seiLayersNotPresent = new SEILayersNotPresent(); 174 seiLayersNotPresent->m_activeVpsId = m_pcCfg->getVPS()->getVPSId(); 175 seiLayersNotPresent->m_vpsMaxLayers = m_pcCfg->getVPS()->getMaxLayers(); 176 for ( ; i < seiLayersNotPresent->m_vpsMaxLayers; i++) 177 { 178 seiLayersNotPresent->m_layerNotPresentFlag[i] = true; 179 179 } 180 180 for ( ; i < MAX_LAYERS; i++) 181 181 { 182 seiLayers Present->m_layerPresentFlag[i] = false;183 } 184 return seiLayers Present;182 seiLayersNotPresent->m_layerNotPresentFlag[i] = false; 183 } 184 return seiLayersNotPresent; 185 185 } 186 186 #endif … … 363 363 } 364 364 365 #if M0043_LAYERS_PRESENT_SEI366 if(m_pcCfg->getLayers PresentSEIEnabled())367 { 368 SEILayers Present *sei = xCreateSEILayersPresent ();365 #if LAYERS_NOT_PRESENT_SEI 366 if(m_pcCfg->getLayersNotPresentSEIEnabled()) 367 { 368 SEILayersNotPresent *sei = xCreateSEILayersNotPresent (); 369 369 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); 370 370 m_seiWriter.writeSEImessage(nalu.m_Bitstream, *sei, sps); … … 690 690 pcSlice->setActiveNumILRRefIdx(0); 691 691 pcSlice->setInterLayerPredEnabledFlag(false); 692 #if M0457_COL_PICTURE_SIGNALING693 692 pcSlice->setMFMEnabledFlag(false); 694 #if !REMOVE_COL_PICTURE_SIGNALING695 pcSlice->setAltColIndicationFlag(false);696 #endif697 #endif698 }699 #endif700 701 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG702 pcSlice->setNumSamplePredRefLayers( m_pcEncTop->getNumSamplePredRefLayers() );703 pcSlice->setInterLayerSamplePredOnlyFlag( 0 );704 if( pcSlice->getNumSamplePredRefLayers() > 0 && pcSlice->getActiveNumILRRefIdx() > 0 )705 {706 if( m_pcEncTop->getIlSampleOnlyPred() > 0 )707 {708 pcSlice->setInterLayerSamplePredOnlyFlag( true );709 }710 693 } 711 694 #endif … … 1159 1142 if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() ) 1160 1143 { 1161 #if RESTR_CHK1162 1144 #if POC_RESET_FLAG 1163 1145 if ( pocCurr > 0 && pcSlice->isRADL() && pcPic->getSlice(0)->getBaseColPic(pcPic->getSlice(0)->getInterLayerPredLayerIdc(0))->getSlice(0)->isRASL()) … … 1166 1148 #endif 1167 1149 { 1168 #if JCTVC_M0458_INTERLAYER_RPS_SIG1169 1150 pcSlice->setActiveNumILRRefIdx(0); 1170 1151 pcSlice->setInterLayerPredEnabledFlag(0); 1171 #else 1172 pcSlice->setNumILRRefIdx(0); 1173 #endif 1174 } 1175 #endif 1176 #if JCTVC_M0458_INTERLAYER_RPS_SIG 1152 } 1177 1153 if( pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA ) 1178 1154 { … … 1185 1161 pcSlice->setNumRefIdx(REF_PIC_LIST_1, pcSlice->getNumRefIdx(REF_PIC_LIST_1)+pcSlice->getActiveNumILRRefIdx()); 1186 1162 } 1187 #else1188 if( pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA )1189 {1190 pcSlice->setNumRefIdx(REF_PIC_LIST_0, pcSlice->getNumILRRefIdx());1191 pcSlice->setNumRefIdx(REF_PIC_LIST_1, pcSlice->getNumILRRefIdx());1192 }1193 else1194 {1195 pcSlice->setNumRefIdx(REF_PIC_LIST_0, pcSlice->getNumRefIdx(REF_PIC_LIST_0)+pcSlice->getNumILRRefIdx());1196 pcSlice->setNumRefIdx(REF_PIC_LIST_1, pcSlice->getNumRefIdx(REF_PIC_LIST_1)+pcSlice->getNumILRRefIdx());1197 }1198 #endif1199 1163 } 1200 1164 #endif //SVC_EXTENSION … … 1205 1169 1206 1170 #if SVC_EXTENSION 1207 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING1208 if ( pcSlice->getSliceType() == B_SLICE && !(pcSlice->getActiveNumILRRefIdx() > 0 && m_pcEncTop->getNumMotionPredRefLayers() > 0) )1209 #else1210 1171 if( pcSlice->getSliceType() == B_SLICE ) 1211 #endif1212 1172 { 1213 1173 pcSlice->setColFromL0Flag(1-uiColDir); … … 1224 1184 pcSlice->setILRPic( m_pcEncTop->getIlpList() ); 1225 1185 #if REF_IDX_MFM 1226 #if M0457_COL_PICTURE_SIGNALING1227 1186 if( pcSlice->getMFMEnabledFlag() ) 1228 #else1229 if( pcSlice->getSPS()->getMFMEnabledFlag() )1230 #endif1231 1187 { 1232 1188 pcSlice->setRefPOCListILP(m_pcEncTop->getIlpList(), pcSlice->getBaseColPic()); 1233 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING1234 pcSlice->setMotionPredIlp(getMotionPredIlp(pcSlice));1235 #endif1236 1189 } 1237 1190 #else … … 1243 1196 1244 1197 #if REF_IDX_MFM 1245 #if M0457_COL_PICTURE_SIGNALING1246 #if REMOVE_COL_PICTURE_SIGNALING1247 1198 if( pcSlice->getMFMEnabledFlag() ) 1248 #else1249 if( pcSlice->getMFMEnabledFlag() && !(pcSlice->getActiveNumILRRefIdx() > 0 && m_pcEncTop->getNumMotionPredRefLayers() > 0) )1250 #endif1251 #else1252 if( pcSlice->getSPS()->getMFMEnabledFlag() )1253 #endif1254 1199 { 1255 1200 Bool found = false; … … 1308 1253 } 1309 1254 1310 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG1311 if (pcSlice->getSliceType() == B_SLICE && m_pcEncTop->getIlSampleOnlyPred() == 0)1312 #else1313 1255 if (pcSlice->getSliceType() == B_SLICE) 1314 #endif1315 1256 { 1316 1257 #if !SVC_EXTENSION … … 1617 1558 #if O0194_WEIGHTED_PREDICTION_CGS 1618 1559 // Calculate for the base layer to be used in EL as Inter layer reference 1619 m_pcSliceEncoder->estimateILWpParam( pcSlice ); 1560 if( m_pcEncTop->getInterLayerWeightedPredFlag() ) 1561 { 1562 m_pcSliceEncoder->estimateILWpParam( pcSlice ); 1563 } 1620 1564 #endif 1621 1565 #if AVC_SYNTAX … … 1756 1700 // The following code also calculates the VPS VUI offset 1757 1701 #endif 1702 #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED 1758 1703 #if VPS_EXTN_OFFSET_CALC 1759 1704 OutputNALUnit tempNalu(NAL_UNIT_VPS, 0, 0 ); // The value of nuh_layer_id of VPS NAL unit shall be equal to 0. 1760 1705 m_pcEntropyCoder->setBitstream(&tempNalu.m_Bitstream); 1761 1706 m_pcEntropyCoder->encodeVPS(m_pcEncTop->getVPS()); // Use to calculate the VPS extension offset 1707 #endif 1762 1708 #endif 1763 1709 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); … … 2068 2014 startCUAddrSliceSegmentIdx++; 2069 2015 } 2070 #if SVC_EXTENSION && M0457_COL_PICTURE_SIGNALING2016 #if SVC_EXTENSION 2071 2017 pcSlice->setNumMotionPredRefLayers(m_pcEncTop->getNumMotionPredRefLayers()); 2072 2018 #endif … … 3111 3057 3112 3058 #if SVC_EXTENSION 3113 #if ADAPTIVE_QP_SELECTION 3114 printf("POC %4d LId: %1d TId: %1d ( %c-SLICE , nQP %d QP %d ) %10d bits",3059 #if ADAPTIVE_QP_SELECTION 3060 printf("POC %4d LId: %1d TId: %1d ( %c-SLICE %s, nQP %d QP %d ) %10d bits", 3115 3061 pcSlice->getPOC(), 3116 3062 pcSlice->getLayerId(), 3117 3063 pcSlice->getTLayer(), 3118 3064 c, 3065 NaluToStr( pcSlice->getNalUnitType() ).data(), 3119 3066 pcSlice->getSliceQpBase(), 3120 3067 pcSlice->getSliceQp(), 3121 3068 uibits ); 3122 3069 #else 3123 printf("POC %4d LId: %1d TId: %1d ( %c-SLICE , QP %d ) %10d bits",3070 printf("POC %4d LId: %1d TId: %1d ( %c-SLICE %s, QP %d ) %10d bits", 3124 3071 pcSlice->getPOC()-pcSlice->getLastIDR(), 3125 3072 pcSlice->getLayerId(), 3126 3073 pcSlice->getTLayer(), 3127 3074 c, 3075 NaluToStr( pcSlice->getNalUnitType() ).data(). 3128 3076 pcSlice->getSliceQp(), 3129 3077 uibits ); … … 3750 3698 free(rowSAD); 3751 3699 } 3752 3753 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING3754 TComPic* TEncGOP::getMotionPredIlp(TComSlice* pcSlice)3755 {3756 TComPic* ilpPic = NULL;3757 Int activeMotionPredReflayerIdx = 0;3758 3759 for( Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )3760 {3761 UInt refLayerIdc = pcSlice->getInterLayerPredLayerIdc(i);3762 if( m_pcEncTop->getMotionPredEnabledFlag( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) ) )3763 {3764 if (activeMotionPredReflayerIdx == pcSlice->getColRefLayerIdx())3765 {3766 ilpPic = m_pcEncTop->getIlpList()[refLayerIdc];3767 break;3768 }3769 else3770 {3771 activeMotionPredReflayerIdx++;3772 }3773 }3774 }3775 3776 assert(ilpPic != NULL);3777 3778 return ilpPic;3779 }3780 #endif3781 3782 3700 //! \} -
trunk/source/Lib/TLibEncoder/TEncGOP.h
r442 r588 181 181 182 182 SEIActiveParameterSets* xCreateSEIActiveParameterSets (TComSPS *sps); 183 #if M0043_LAYERS_PRESENT_SEI184 SEILayers Present* xCreateSEILayersPresent ();183 #if LAYERS_NOT_PRESENT_SEI 184 SEILayersNotPresent* xCreateSEILayersNotPresent (); 185 185 #endif 186 186 SEIFramePacking* xCreateSEIFramePacking(); … … 210 210 #endif 211 211 Void dblMetric( TComPic* pcPic, UInt uiNumSlices ); 212 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING213 TComPic* getMotionPredIlp(TComSlice* pcSlice);214 #endif215 212 };// END CLASS DEFINITION TEncGOP 216 213 -
trunk/source/Lib/TLibEncoder/TEncSlice.cpp
r540 r588 523 523 if( layerId > 0 ) 524 524 { 525 #if JCTVC_M0458_INTERLAYER_RPS_SIG526 525 if( rpcSlice->getNumILRRefIdx() > 0 ) 527 526 { … … 533 532 rpcSlice->setInterLayerPredEnabledFlag(1); 534 533 } 535 #else536 rpcSlice->setNumILRRefIdx( rpcSlice->getVPS()->getNumDirectRefLayers( layerId ) );537 #endif538 #if M0457_COL_PICTURE_SIGNALING539 534 rpcSlice->setMFMEnabledFlag(m_ppcTEncTop[layerId]->getMFMEnabledFlag()); 540 #if !REMOVE_COL_PICTURE_SIGNALING541 rpcSlice->setAltColIndicationFlag(rpcSlice->getMFMEnabledFlag());542 #endif543 #endif544 535 } 545 536 … … 820 811 } 821 812 #if O0194_WEIGHTED_PREDICTION_CGS 822 else 813 else if( m_ppcTEncTop[pcSlice->getLayerId()]->getInterLayerWeightedPredFlag() ) 823 814 { 824 815 // Calculate for the base layer to be used in EL as Inter layer reference -
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r540 r588 934 934 #if SVC_EXTENSION 935 935 m_cSPS.setLayerId(m_layerId); 936 #if REF_IDX_MFM937 #if !M0457_COL_PICTURE_SIGNALING938 m_cSPS.setMFMEnabledFlag(m_bMFMEnabledFlag);939 #endif940 #endif941 936 m_cSPS.setNumScaledRefLayerOffsets(m_numScaledRefLayerOffsets); 942 937 for(Int i = 0; i < m_cSPS.getNumScaledRefLayerOffsets(); i++) … … 1632 1627 if (m_cIlpPic[0] == NULL) 1633 1628 { 1634 for (Int j=0; j < MAX_LAYERS /*MAX_NUM_REF*/; j++) // consider to set to NumDirectRefLayers[LayerIdInVps[nuh_layer_id]]1629 for (Int j=0; j < m_numLayer; j++) // consider to set to NumDirectRefLayers[LayerIdInVps[nuh_layer_id]] 1635 1630 { 1636 1631 m_cIlpPic[j] = new TComPic; … … 1699 1694 if (m_cIlpPic[0] == NULL) 1700 1695 { 1701 for (Int j=0; j < MAX_LAYERS /*MAX_NUM_REF*/; j++) // consider to set to NumDirectRefLayers[LayerIdInVps[nuh_layer_id]]1696 for (Int j=0; j < m_numDirectRefLayers; j++) 1702 1697 { 1703 1698 m_cIlpPic[j] = new TComPic; -
trunk/source/Lib/TLibEncoder/TEncTop.h
r540 r588 137 137 Bool m_bMFMEnabledFlag; 138 138 #endif 139 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG140 Int m_ilSampleOnlyPred;141 #endif142 139 UInt m_numScaledRefLayerOffsets; 143 140 #if O0098_SCALED_REF_LAYER_ID … … 153 150 Bool m_firstPicInLayerDecodedFlag; 154 151 Bool m_noOutputOfPriorPicsFlags; 152 #endif 153 #if O0194_WEIGHTED_PREDICTION_CGS 154 Bool m_interLayerWeightedPredFlag; 155 155 #endif 156 156 #endif //SVC_EXTENSION … … 237 237 Bool getMFMEnabledFlag() {return m_bMFMEnabledFlag;} 238 238 #endif 239 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG240 Void setI lSampleOnlyPred( Int i ) { m_ilSampleOnlyPred = i;}241 Int getIlSampleOnlyPred() { return m_ilSampleOnlyPred; }239 #if O0194_WEIGHTED_PREDICTION_CGS 240 Void setInterLayerWeightedPredFlag(Bool flag) { m_interLayerWeightedPredFlag = flag; } 241 Bool getInterLayerWeightedPredFlag() { return m_interLayerWeightedPredFlag; } 242 242 #endif 243 243 #if AVC_SYNTAX
Note: See TracChangeset for help on using the changeset viewer.