Changeset 849 in SHVCSoftware
- Timestamp:
- 29 Jul 2014, 14:03:05 (10 years ago)
- Location:
- branches/SHM-dev
- Files:
-
- 35 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/cfg/per-sequence-svc-avcbase/BQTerrace-2x.cfg
r752 r849 22 22 IntraPeriod1 : 64 # Period of I-Frame ( -1 = only first) 23 23 ConformanceMode1 : 1 # conformance mode 24 NumScaledRefLayerOffsets1 : 1 # Number of scaled entry offsets for this layer 25 ScaledRefLayerId1 : 0 # Scaled reference layer ID 26 ScaledRefLayerBottomOffset1 : -4 # offset for spatial alignment of the base and enhancement layers 24 NumScaledRefLayerOffsets1 : 1 # Number of reference location offset parameters 25 ScaledRefLayerId1 : 0 # List of ref layer id (i-th entry for i-th ref loc offset parameters) 26 ScaledRefLayerOffsetPresentFlag1 : 0 # List of scaled ref layer offset present flags 27 RefRegionOffsetPresentFlag1 : 1 # List of ref region offset present flags 28 RefRegionBottomOffset1 : 2 # List of ref region bottom offsets 29 ResamplePhaseSetPresentFlag1 : 0 # List of resample phase set present flags 27 30 QP1 : 20 31 -
branches/SHM-dev/cfg/per-sequence-svc-avcbase/BQTerrace-SNR.cfg
r595 r849 22 22 IntraPeriod1 : 64 # Period of I-Frame ( -1 = only first) 23 23 ConformanceMode1 : 1 # conformance mode 24 NumScaledRefLayerOffsets1 : 1 # Number of scaled entry offsets for this layer 25 ScaledRefLayerId1 : 0 # Scaled reference layer ID 26 ScaledRefLayerBottomOffset1 : -4 # offset for spatial alignment of the base and enhancement layers 24 NumScaledRefLayerOffsets1 : 1 # Number of reference location offset parameters 25 ScaledRefLayerId1 : 0 # List of ref layer id (i-th entry for i-th ref loc offset parameters) 26 ScaledRefLayerOffsetPresentFlag1 : 0 # List of scaled ref layer offset present flags 27 RefRegionOffsetPresentFlag1 : 1 # List of ref region offset present flags 28 RefRegionBottomOffset1 : 4 # List of ref region bottom offsets 29 ResamplePhaseSetPresentFlag1 : 0 # List of resample phase set present flags 27 30 QP1 : 20 -
branches/SHM-dev/cfg/per-sequence-svc-avcbase/BasketballDrive-2x.cfg
r752 r849 22 22 IntraPeriod1 : 48 # Period of I-Frame ( -1 = only first) 23 23 ConformanceMode1 : 1 # conformance mode 24 NumScaledRefLayerOffsets1 : 1 # Number of scaled entry offsets for this layer 25 ScaledRefLayerId1 : 0 # Scaled reference layer ID 26 ScaledRefLayerBottomOffset1 : -4 # offset for spatial alignment of the base and enhancement layers 24 NumScaledRefLayerOffsets1 : 1 # Number of reference location offset parameters 25 ScaledRefLayerId1 : 0 # List of ref layer id (i-th entry for i-th ref loc offset parameters) 26 ScaledRefLayerOffsetPresentFlag1 : 0 # List of scaled ref layer offset present flags 27 RefRegionOffsetPresentFlag1 : 1 # List of ref region offset present flags 28 RefRegionBottomOffset1 : 2 # List of ref region bottom offsets 29 ResamplePhaseSetPresentFlag1 : 0 # List of resample phase set present flags 27 30 QP1 : 20 31 -
branches/SHM-dev/cfg/per-sequence-svc-avcbase/BasketballDrive-SNR.cfg
r595 r849 22 22 IntraPeriod1 : 48 # Period of I-Frame ( -1 = only first) 23 23 ConformanceMode1 : 1 # conformance mode 24 NumScaledRefLayerOffsets1 : 1 # Number of scaled entry offsets for this layer 25 ScaledRefLayerId1 : 0 # Scaled reference layer ID 26 ScaledRefLayerBottomOffset1 : -4 # offset for spatial alignment of the base and enhancement layers 24 NumScaledRefLayerOffsets1 : 1 # Number of reference location offset parameters 25 ScaledRefLayerId1 : 0 # List of ref layer id (i-th entry for i-th ref loc offset parameters) 26 ScaledRefLayerOffsetPresentFlag1 : 0 # List of scaled ref layer offset present flags 27 RefRegionOffsetPresentFlag1 : 1 # List of ref region offset present flags 28 RefRegionBottomOffset1 : 4 # List of ref region bottom offsets 29 ResamplePhaseSetPresentFlag1 : 0 # List of resample phase set present flags 27 30 QP1 : 20 -
branches/SHM-dev/cfg/per-sequence-svc-avcbase/Cactus-2x.cfg
r752 r849 22 22 IntraPeriod1 : 48 # Period of I-Frame ( -1 = only first) 23 23 ConformanceMode1 : 1 # conformance mode 24 NumScaledRefLayerOffsets1 : 1 # Number of scaled entry offsets for this layer 25 ScaledRefLayerId1 : 0 # Scaled reference layer ID 26 ScaledRefLayerBottomOffset1 : -4 # offset for spatial alignment of the base and enhancement layers 24 NumScaledRefLayerOffsets1 : 1 # Number of reference location offset parameters 25 ScaledRefLayerId1 : 0 # List of ref layer id (i-th entry for i-th ref loc offset parameters) 26 ScaledRefLayerOffsetPresentFlag1 : 0 # List of scaled ref layer offset present flags 27 RefRegionOffsetPresentFlag1 : 1 # List of ref region offset present flags 28 RefRegionBottomOffset1 : 2 # List of ref region bottom offsets 29 ResamplePhaseSetPresentFlag1 : 0 # List of resample phase set present flags 27 30 QP1 : 20 31 -
branches/SHM-dev/cfg/per-sequence-svc-avcbase/Cactus-SNR.cfg
r595 r849 22 22 IntraPeriod1 : 48 # Period of I-Frame ( -1 = only first) 23 23 ConformanceMode1 : 1 # conformance mode 24 NumScaledRefLayerOffsets1 : 1 # Number of scaled entry offsets for this layer 25 ScaledRefLayerId1 : 0 # Scaled reference layer ID 26 ScaledRefLayerBottomOffset1 : -4 # offset for spatial alignment of the base and enhancement layers 24 NumScaledRefLayerOffsets1 : 1 # Number of reference location offset parameters 25 ScaledRefLayerId1 : 0 # List of ref layer id (i-th entry for i-th ref loc offset parameters) 26 ScaledRefLayerOffsetPresentFlag1 : 0 # List of scaled ref layer offset present flags 27 RefRegionOffsetPresentFlag1 : 1 # List of ref region offset present flags 28 RefRegionBottomOffset1 : 4 # List of ref region bottom offsets 29 ResamplePhaseSetPresentFlag1 : 0 # List of resample phase set present flags 27 30 QP1 : 20 -
branches/SHM-dev/cfg/per-sequence-svc-avcbase/Kimono-2x.cfg
r752 r849 22 22 IntraPeriod1 : 24 # Period of I-Frame ( -1 = only first) 23 23 ConformanceMode1 : 1 # conformance mode 24 NumScaledRefLayerOffsets1 : 1 # Number of scaled entry offsets for this layer 25 ScaledRefLayerId1 : 0 # Scaled reference layer ID 26 ScaledRefLayerBottomOffset1 : -4 # offset for spatial alignment of the base and enhancement layers 24 NumScaledRefLayerOffsets1 : 1 # Number of reference location offset parameters 25 ScaledRefLayerId1 : 0 # List of ref layer id (i-th entry for i-th ref loc offset parameters) 26 ScaledRefLayerOffsetPresentFlag1 : 0 # List of scaled ref layer offset present flags 27 RefRegionOffsetPresentFlag1 : 1 # List of ref region offset present flags 28 RefRegionBottomOffset1 : 2 # List of ref region bottom offsets 29 ResamplePhaseSetPresentFlag1 : 0 # List of resample phase set present flags 27 30 QP1 : 20 -
branches/SHM-dev/cfg/per-sequence-svc-avcbase/Kimono-SNR.cfg
r595 r849 22 22 IntraPeriod1 : 24 # Period of I-Frame ( -1 = only first) 23 23 ConformanceMode1 : 1 # conformance mode 24 NumScaledRefLayerOffsets1 : 1 # Number of scaled entry offsets for this layer 25 ScaledRefLayerId1 : 0 # Scaled reference layer ID 26 ScaledRefLayerBottomOffset1 : -4 # offset for spatial alignment of the base and enhancement layers 24 NumScaledRefLayerOffsets1 : 1 # Number of reference location offset parameters 25 ScaledRefLayerId1 : 0 # List of ref layer id (i-th entry for i-th ref loc offset parameters) 26 ScaledRefLayerOffsetPresentFlag1 : 0 # List of scaled ref layer offset present flags 27 RefRegionOffsetPresentFlag1 : 1 # List of ref region offset present flags 28 RefRegionBottomOffset1 : 4 # List of ref region bottom offsets 29 ResamplePhaseSetPresentFlag1 : 0 # List of resample phase set present flags 27 30 QP1 : 20 -
branches/SHM-dev/cfg/per-sequence-svc-avcbase/ParkScene-2x.cfg
r752 r849 22 22 IntraPeriod1 : 24 # Period of I-Frame ( -1 = only first) 23 23 ConformanceMode1 : 1 # conformance mode 24 NumScaledRefLayerOffsets1 : 1 # Number of scaled entry offsets for this layer 25 ScaledRefLayerId1 : 0 # Scaled reference layer ID 26 ScaledRefLayerBottomOffset1 : -4 # offset for spatial alignment of the base and enhancement layers 24 NumScaledRefLayerOffsets1 : 1 # Number of reference location offset parameters 25 ScaledRefLayerId1 : 0 # List of ref layer id (i-th entry for i-th ref loc offset parameters) 26 ScaledRefLayerOffsetPresentFlag1 : 0 # List of scaled ref layer offset present flags 27 RefRegionOffsetPresentFlag1 : 1 # List of ref region offset present flags 28 RefRegionBottomOffset1 : 2 # List of ref region bottom offsets 29 ResamplePhaseSetPresentFlag1 : 0 # List of resample phase set present flags 27 30 QP1 : 20 -
branches/SHM-dev/cfg/per-sequence-svc-avcbase/ParkScene-SNR.cfg
r595 r849 22 22 IntraPeriod1 : 24 # Period of I-Frame ( -1 = only first) 23 23 ConformanceMode1 : 1 # conformance mode 24 NumScaledRefLayerOffsets1 : 1 # Number of scaled entry offsets for this layer 25 ScaledRefLayerId1 : 0 # Scaled reference layer ID 26 ScaledRefLayerBottomOffset1 : -4 # offset for spatial alignment of the base and enhancement layers 24 NumScaledRefLayerOffsets1 : 1 # Number of reference location offset parameters 25 ScaledRefLayerId1 : 0 # List of ref layer id (i-th entry for i-th ref loc offset parameters) 26 ScaledRefLayerOffsetPresentFlag1 : 0 # List of scaled ref layer offset present flags 27 RefRegionOffsetPresentFlag1 : 1 # List of ref region offset present flags 28 RefRegionBottomOffset1 : 4 # List of ref region bottom offsets 29 ResamplePhaseSetPresentFlag1 : 0 # List of resample phase set present flags 27 30 QP1 : 20 -
branches/SHM-dev/cfg/per-sequence-svc/BQTerrace-2x.cfg
r713 r849 24 24 ConformanceMode1 : 1 # conformance mode 25 25 QP1 : 20 26 27 #============= Reference location offset parameters ================== 28 NumScaledRefLayerOffsets1 : 1 # Number of reference location offset parameters 29 ScaledRefLayerId1 : 0 # List of ref layer id (i-th entry for i-th ref loc offset parameters) 30 ScaledRefLayerOffsetPresentFlag1 : 0 # List of scaled ref layer offset present flags 31 RefRegionOffsetPresentFlag1 : 1 # List of ref region offset present flags 32 RefRegionBottomOffset1 : 2 # List of ref region bottom offsets 33 ResamplePhaseSetPresentFlag1 : 0 # List of resample phase set present flags -
branches/SHM-dev/cfg/per-sequence-svc/BasketballDrive-2x.cfg
r713 r849 24 24 ConformanceMode1 : 1 # conformance mode 25 25 QP1 : 20 26 27 #============= Reference location offset parameters ================== 28 NumScaledRefLayerOffsets1 : 1 # Number of reference location offset parameters 29 ScaledRefLayerId1 : 0 # List of ref layer id (i-th entry for i-th ref loc offset parameters) 30 ScaledRefLayerOffsetPresentFlag1 : 0 # List of scaled ref layer offset present flags 31 RefRegionOffsetPresentFlag1 : 1 # List of ref region offset present flags 32 RefRegionBottomOffset1 : 2 # List of ref region bottom offsets 33 ResamplePhaseSetPresentFlag1 : 0 # List of resample phase set present flags -
branches/SHM-dev/cfg/per-sequence-svc/Cactus-2x.cfg
r713 r849 24 24 ConformanceMode1 : 1 # conformance mode 25 25 QP1 : 20 26 27 #============= Reference location offset parameters ================== 28 NumScaledRefLayerOffsets1 : 1 # Number of reference location offset parameters 29 ScaledRefLayerId1 : 0 # List of ref layer id (i-th entry for i-th ref loc offset parameters) 30 ScaledRefLayerOffsetPresentFlag1 : 0 # List of scaled ref layer offset present flags 31 RefRegionOffsetPresentFlag1 : 1 # List of ref region offset present flags 32 RefRegionBottomOffset1 : 2 # List of ref region bottom offsets 33 ResamplePhaseSetPresentFlag1 : 0 # List of resample phase set present flags -
branches/SHM-dev/cfg/per-sequence-svc/Kimono-2x.cfg
r713 r849 24 24 ConformanceMode1 : 1 # conformance mode 25 25 QP1 : 20 26 27 #============= Reference location offset parameters ================== 28 NumScaledRefLayerOffsets1 : 1 # Number of reference location offset parameters 29 ScaledRefLayerId1 : 0 # List of ref layer id (i-th entry for i-th ref loc offset parameters) 30 ScaledRefLayerOffsetPresentFlag1 : 0 # List of scaled ref layer offset present flags 31 RefRegionOffsetPresentFlag1 : 1 # List of ref region offset present flags 32 RefRegionBottomOffset1 : 2 # List of ref region bottom offsets 33 ResamplePhaseSetPresentFlag1 : 0 # List of resample phase set present flags -
branches/SHM-dev/cfg/per-sequence-svc/ParkScene-2x.cfg
r713 r849 24 24 ConformanceMode1 : 1 # conformance mode 25 25 QP1 : 20 26 27 #============= Reference location offset parameters ================== 28 NumScaledRefLayerOffsets1 : 1 # Number of reference location offset parameters 29 ScaledRefLayerId1 : 0 # List of ref layer id (i-th entry for i-th ref loc offset parameters) 30 ScaledRefLayerOffsetPresentFlag1 : 0 # List of scaled ref layer offset present flags 31 RefRegionOffsetPresentFlag1 : 1 # List of ref region offset present flags 32 RefRegionBottomOffset1 : 2 # List of ref region bottom offsets 33 ResamplePhaseSetPresentFlag1 : 0 # List of resample phase set present flags -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r829 r849 384 384 string cfg_scaledRefLayerBottomOffset [MAX_LAYERS]; 385 385 Int* cfg_numScaledRefLayerOffsets[MAX_LAYERS]; 386 #if REF_REGION_OFFSET 387 string cfg_scaledRefLayerOffsetPresentFlag [MAX_LAYERS]; 388 string cfg_refRegionOffsetPresentFlag [MAX_LAYERS]; 389 string cfg_refRegionLeftOffset [MAX_LAYERS]; 390 string cfg_refRegionTopOffset [MAX_LAYERS]; 391 string cfg_refRegionRightOffset [MAX_LAYERS]; 392 string cfg_refRegionBottomOffset [MAX_LAYERS]; 393 #endif 394 #if R0209_GENERIC_PHASE 395 string cfg_resamplePhaseSetPresentFlag [MAX_LAYERS]; 396 string cfg_phaseHorLuma [MAX_LAYERS]; 397 string cfg_phaseVerLuma [MAX_LAYERS]; 398 string cfg_phaseHorChroma [MAX_LAYERS]; 399 string cfg_phaseVerChroma [MAX_LAYERS]; 400 #else 386 401 #if P0312_VERT_PHASE_ADJ 387 402 string cfg_vertPhasePositionEnableFlag[MAX_LAYERS]; 403 #endif 388 404 #endif 389 405 … … 395 411 string* cfg_scaledRefLayerRightOffsetPtr [MAX_LAYERS]; 396 412 string* cfg_scaledRefLayerBottomOffsetPtr [MAX_LAYERS]; 413 #if REF_REGION_OFFSET 414 string* cfg_scaledRefLayerOffsetPresentFlagPtr [MAX_LAYERS]; 415 string* cfg_refRegionOffsetPresentFlagPtr [MAX_LAYERS]; 416 string* cfg_refRegionLeftOffsetPtr [MAX_LAYERS]; 417 string* cfg_refRegionTopOffsetPtr [MAX_LAYERS]; 418 string* cfg_refRegionRightOffsetPtr [MAX_LAYERS]; 419 string* cfg_refRegionBottomOffsetPtr [MAX_LAYERS]; 420 #endif 421 #if R0209_GENERIC_PHASE 422 string* cfg_resamplePhaseSetPresentFlagPtr [MAX_LAYERS]; 423 string* cfg_phaseHorLumaPtr [MAX_LAYERS]; 424 string* cfg_phaseVerLumaPtr [MAX_LAYERS]; 425 string* cfg_phaseHorChromaPtr [MAX_LAYERS]; 426 string* cfg_phaseVerChromaPtr [MAX_LAYERS]; 427 #endif 397 428 #if P0312_VERT_PHASE_ADJ 398 429 string* cfg_vertPhasePositionEnableFlagPtr[MAX_LAYERS]; … … 466 497 #if P0312_VERT_PHASE_ADJ 467 498 cfg_vertPhasePositionEnableFlagPtr[layer] = &cfg_vertPhasePositionEnableFlag[layer]; 499 #endif 500 #if REF_REGION_OFFSET 501 cfg_scaledRefLayerOffsetPresentFlagPtr [layer] = &cfg_scaledRefLayerOffsetPresentFlag [layer]; 502 cfg_refRegionOffsetPresentFlagPtr [layer] = &cfg_refRegionOffsetPresentFlag [layer]; 503 cfg_refRegionLeftOffsetPtr [layer] = &cfg_refRegionLeftOffset [layer]; 504 cfg_refRegionTopOffsetPtr [layer] = &cfg_refRegionTopOffset [layer]; 505 cfg_refRegionRightOffsetPtr [layer] = &cfg_refRegionRightOffset [layer]; 506 cfg_refRegionBottomOffsetPtr[layer] = &cfg_refRegionBottomOffset[layer]; 507 #endif 508 #if R0209_GENERIC_PHASE 509 cfg_resamplePhaseSetPresentFlagPtr [layer] = &cfg_resamplePhaseSetPresentFlag [layer]; 510 cfg_phaseHorLumaPtr [layer] = &cfg_phaseHorLuma [layer]; 511 cfg_phaseVerLumaPtr [layer] = &cfg_phaseVerLuma [layer]; 512 cfg_phaseHorChromaPtr [layer] = &cfg_phaseHorChroma [layer]; 513 cfg_phaseVerChromaPtr [layer] = &cfg_phaseVerChroma [layer]; 468 514 #endif 469 515 } … … 597 643 ("ScaledRefLayerBottomOffset%d", cfg_scaledRefLayerBottomOffsetPtr,string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to" 598 644 " bottom-right luma sample of the EL picture, in units of two luma samples") 645 #if REF_REGION_OFFSET 646 ("ScaledRefLayerOffsetPresentFlag%d", cfg_scaledRefLayerOffsetPresentFlagPtr, string(""), MAX_LAYERS, "presense flag of scaled reference layer offsets") 647 ("RefRegionOffsetPresentFlag%d", cfg_refRegionOffsetPresentFlagPtr, string(""), MAX_LAYERS, "presense flag of reference region offsets") 648 ("RefRegionLeftOffset%d", cfg_refRegionLeftOffsetPtr, string(""), MAX_LAYERS, "Horizontal offset of top-left luma sample of ref region with respect to" 649 " top-left luma sample of the BL picture, in units of two luma samples") 650 ("RefRegionTopOffset%d", cfg_refRegionTopOffsetPtr, string(""), MAX_LAYERS, "Vertical offset of top-left luma sample of ref region with respect to" 651 " top-left luma sample of the BL picture, in units of two luma samples") 652 ("RefRegionRightOffset%d", cfg_refRegionRightOffsetPtr, string(""), MAX_LAYERS, "Horizontal offset of bottom-right luma sample of ref region with respect to" 653 " bottom-right luma sample of the BL picture, in units of two luma samples") 654 ("RefRegionBottomOffset%d", cfg_refRegionBottomOffsetPtr,string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of ref region with respect to" 655 " bottom-right luma sample of the BL picture, in units of two luma samples") 656 #endif 657 #if R0209_GENERIC_PHASE 658 ("ResamplePhaseSetPresentFlag%d", cfg_resamplePhaseSetPresentFlagPtr, string(""), MAX_LAYERS, "presense flag of resample phase set") 659 ("PhaseHorLuma%d", cfg_phaseHorLumaPtr, string(""), MAX_LAYERS, "luma shift in the horizontal direction used in resampling proces") 660 ("PhaseVerLuma%d", cfg_phaseVerLumaPtr, string(""), MAX_LAYERS, "luma shift in the vertical direction used in resampling proces") 661 ("PhaseHorChroma%d", cfg_phaseHorChromaPtr, string(""), MAX_LAYERS, "chroma shift in the horizontal direction used in resampling proces") 662 ("PhaseVerChroma%d", cfg_phaseVerChromaPtr, string(""), MAX_LAYERS, "chroma shift in the vertical direction used in resampling proces") 663 #endif 599 664 #if P0312_VERT_PHASE_ADJ 600 665 ("VertPhasePositionEnableFlag%d", cfg_vertPhasePositionEnableFlagPtr,string(""), MAX_LAYERS, "VertPhasePositionEnableFlag for layer %d") … … 1187 1252 assert( strcmp(cfg_scaledRefLayerId[layer].c_str(), "")); 1188 1253 #endif 1254 #if REF_REGION_OFFSET 1255 Bool srloFlag = 1256 strcmp(cfg_scaledRefLayerLeftOffset [layer].c_str(), "") || 1257 strcmp(cfg_scaledRefLayerRightOffset [layer].c_str(), "") || 1258 strcmp(cfg_scaledRefLayerTopOffset [layer].c_str(), "") || 1259 strcmp(cfg_scaledRefLayerBottomOffset [layer].c_str(), ""); 1260 Bool rroFlag = 1261 strcmp(cfg_refRegionLeftOffset [layer].c_str(), "") || 1262 strcmp(cfg_refRegionRightOffset [layer].c_str(), "") || 1263 strcmp(cfg_refRegionTopOffset [layer].c_str(), "") || 1264 strcmp(cfg_refRegionBottomOffset [layer].c_str(), ""); 1265 #if R0209_GENERIC_PHASE 1266 Bool phaseSetFlag = 1267 strcmp(cfg_phaseHorLuma [layer].c_str(), "") || 1268 strcmp(cfg_phaseVerLuma [layer].c_str(), "") || 1269 strcmp(cfg_phaseHorChroma [layer].c_str(), "") || 1270 strcmp(cfg_phaseVerChroma [layer].c_str(), ""); 1271 assert( srloFlag || rroFlag || phaseSetFlag); 1272 #else 1273 assert( srloFlag || rroFlag ); 1274 #endif 1275 #else 1189 1276 #if P0312_VERT_PHASE_ADJ 1190 1277 assert( strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(), "") || … … 1199 1286 strcmp(cfg_scaledRefLayerBottomOffset[layer].c_str(),"") ); 1200 1287 #endif 1288 #endif 1201 1289 } 1202 1290 … … 1219 1307 #endif 1220 1308 1309 #if REF_REGION_OFFSET 1310 // Presense Flag // 1311 if(strcmp(cfg_scaledRefLayerOffsetPresentFlag[layer].c_str(), "")) 1312 { 1313 cfgStringToArray( &tempArray, cfg_scaledRefLayerOffsetPresentFlag[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "ScaledRefLayerOffsetPresentFlag"); 1314 if(tempArray) 1315 { 1316 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 1317 { 1318 m_acLayerCfg[layer].m_scaledRefLayerOffsetPresentFlag[i] = tempArray[i]; 1319 } 1320 delete [] tempArray; tempArray = NULL; 1321 } 1322 } 1323 #endif 1324 1221 1325 // Left offset // 1222 1326 if(strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(), "")) … … 1289 1393 } 1290 1394 #endif 1291 } 1395 #if REF_REGION_OFFSET 1396 // Presense Flag // 1397 if(strcmp(cfg_refRegionOffsetPresentFlag[layer].c_str(), "")) 1398 { 1399 cfgStringToArray( &tempArray, cfg_refRegionOffsetPresentFlag[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "RefRegionOffsetPresentFlag"); 1400 if(tempArray) 1401 { 1402 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 1403 { 1404 m_acLayerCfg[layer].m_refRegionOffsetPresentFlag[i] = tempArray[i]; 1405 } 1406 delete [] tempArray; tempArray = NULL; 1407 } 1408 } 1409 1410 // Left offset // 1411 if(strcmp(cfg_refRegionLeftOffset[layer].c_str(), "")) 1412 { 1413 cfgStringToArray( &tempArray, cfg_refRegionLeftOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "RefRegionLeftOffset"); 1414 if(tempArray) 1415 { 1416 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 1417 { 1418 m_acLayerCfg[layer].m_refRegionLeftOffset[i] = tempArray[i]; 1419 } 1420 delete [] tempArray; tempArray = NULL; 1421 } 1422 } 1423 1424 // Top offset // 1425 if(strcmp(cfg_refRegionTopOffset[layer].c_str(), "")) 1426 { 1427 cfgStringToArray( &tempArray, cfg_refRegionTopOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "RefRegionTopOffset"); 1428 if(tempArray) 1429 { 1430 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 1431 { 1432 m_acLayerCfg[layer].m_refRegionTopOffset[i] = tempArray[i]; 1433 } 1434 delete [] tempArray; tempArray = NULL; 1435 } 1436 } 1437 1438 // Right offset // 1439 if(strcmp(cfg_refRegionRightOffset[layer].c_str(), "")) 1440 { 1441 cfgStringToArray( &tempArray, cfg_refRegionRightOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "RefRegionRightOffset"); 1442 if(tempArray) 1443 { 1444 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 1445 { 1446 m_acLayerCfg[layer].m_refRegionRightOffset[i] = tempArray[i]; 1447 } 1448 delete [] tempArray; tempArray = NULL; 1449 } 1450 } 1451 1452 // Bottom offset // 1453 if(strcmp(cfg_refRegionBottomOffset[layer].c_str(), "")) 1454 { 1455 cfgStringToArray( &tempArray, cfg_refRegionBottomOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "RefRegionBottomOffset"); 1456 if(tempArray) 1457 { 1458 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 1459 { 1460 m_acLayerCfg[layer].m_refRegionBottomOffset[i] = tempArray[i]; 1461 } 1462 delete [] tempArray; tempArray = NULL; 1463 } 1464 } 1465 #endif 1466 #if R0209_GENERIC_PHASE 1467 Int numPhaseSet = m_acLayerCfg[layer].m_numScaledRefLayerOffsets; 1468 1469 // Presense Flag // 1470 if(strcmp(cfg_resamplePhaseSetPresentFlag[layer].c_str(), "")) 1471 { 1472 cfgStringToArray( &tempArray, cfg_resamplePhaseSetPresentFlag[layer], numPhaseSet, "resamplePhaseSetPresentFlag"); 1473 if(tempArray) 1474 { 1475 for(Int i = 0; i < numPhaseSet; i++) 1476 { 1477 m_acLayerCfg[layer].m_resamplePhaseSetPresentFlag[i] = tempArray[i]; 1478 } 1479 delete [] tempArray; tempArray = NULL; 1480 } 1481 } 1482 1483 // Luma horizontal phase // 1484 if(strcmp(cfg_phaseHorLuma[layer].c_str(), "")) 1485 { 1486 cfgStringToArray( &tempArray, cfg_phaseHorLuma[layer], numPhaseSet, "phaseHorLuma"); 1487 if(tempArray) 1488 { 1489 for(Int i = 0; i < numPhaseSet; i++) 1490 { 1491 m_acLayerCfg[layer].m_phaseHorLuma[i] = tempArray[i]; 1492 } 1493 delete [] tempArray; tempArray = NULL; 1494 } 1495 } 1496 1497 // Luma vertical phase // 1498 if(strcmp(cfg_phaseVerLuma[layer].c_str(), "")) 1499 { 1500 cfgStringToArray( &tempArray, cfg_phaseVerLuma[layer], numPhaseSet, "phaseVerLuma"); 1501 if(tempArray) 1502 { 1503 for(Int i = 0; i < numPhaseSet; i++) 1504 { 1505 m_acLayerCfg[layer].m_phaseVerLuma[i] = tempArray[i]; 1506 } 1507 delete [] tempArray; tempArray = NULL; 1508 } 1509 } 1510 1511 // Chroma horizontal phase // 1512 if(strcmp(cfg_phaseHorChroma[layer].c_str(), "")) 1513 { 1514 cfgStringToArray( &tempArray, cfg_phaseHorChroma[layer], numPhaseSet, "phaseHorChroma"); 1515 if(tempArray) 1516 { 1517 for(Int i = 0; i < numPhaseSet; i++) 1518 { 1519 m_acLayerCfg[layer].m_phaseHorChroma[i] = tempArray[i]; 1520 } 1521 delete [] tempArray; tempArray = NULL; 1522 } 1523 } 1524 1525 // Chroma vertical phase // 1526 if(strcmp(cfg_phaseVerChroma[layer].c_str(), "")) 1527 { 1528 cfgStringToArray( &tempArray, cfg_phaseVerChroma[layer], numPhaseSet, "phaseVerChroma"); 1529 if(tempArray) 1530 { 1531 for(Int i = 0; i < numPhaseSet; i++) 1532 { 1533 m_acLayerCfg[layer].m_phaseVerChroma[i] = tempArray[i]; 1534 } 1535 delete [] tempArray; tempArray = NULL; 1536 } 1537 } 1538 #endif 1539 } 1540 1292 1541 #if VPS_EXTN_DIRECT_REF_LAYERS 1293 1542 for(Int layer = 0; layer < MAX_LAYERS; layer++) -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r823 r849 60 60 ::memset(m_scaledRefLayerRightOffset, 0, sizeof(m_scaledRefLayerRightOffset)); 61 61 ::memset(m_scaledRefLayerBottomOffset, 0, sizeof(m_scaledRefLayerBottomOffset)); 62 #if REF_REGION_OFFSET 63 ::memset(m_scaledRefLayerOffsetPresentFlag, 0, sizeof(m_scaledRefLayerOffsetPresentFlag)); 64 ::memset(m_refRegionOffsetPresentFlag, 0, sizeof(m_refRegionOffsetPresentFlag)); 65 ::memset(m_refRegionLeftOffset, 0, sizeof(m_refRegionLeftOffset)); 66 ::memset(m_refRegionTopOffset, 0, sizeof(m_refRegionTopOffset)); 67 ::memset(m_refRegionRightOffset, 0, sizeof(m_refRegionRightOffset)); 68 ::memset(m_refRegionBottomOffset, 0, sizeof(m_refRegionBottomOffset)); 69 #endif 70 #if R0209_GENERIC_PHASE 71 ::memset(m_resamplePhaseSetPresentFlag, 0, sizeof(m_resamplePhaseSetPresentFlag)); 72 ::memset(m_phaseHorLuma, 0, sizeof(m_phaseHorLuma)); 73 ::memset(m_phaseVerLuma, 0, sizeof(m_phaseVerLuma)); 74 ::memset(m_phaseHorChroma, 0, sizeof(m_phaseHorChroma)); 75 ::memset(m_phaseVerChroma, 0, sizeof(m_phaseVerChroma)); 76 #else 62 77 #if P0312_VERT_PHASE_ADJ 63 78 ::memset(m_vertPhasePositionEnableFlag, 0, sizeof(m_vertPhasePositionEnableFlag)); 79 #endif 64 80 #endif 65 81 } -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r823 r849 98 98 Int m_scaledRefLayerRightOffset [MAX_LAYERS]; 99 99 Int m_scaledRefLayerBottomOffset[MAX_LAYERS]; 100 #if P0312_VERT_PHASE_ADJ 100 #if REF_REGION_OFFSET 101 Bool m_scaledRefLayerOffsetPresentFlag [MAX_LAYERS]; 102 Bool m_refRegionOffsetPresentFlag [MAX_LAYERS]; 103 Int m_refRegionLeftOffset [MAX_LAYERS]; 104 Int m_refRegionTopOffset [MAX_LAYERS]; 105 Int m_refRegionRightOffset [MAX_LAYERS]; 106 Int m_refRegionBottomOffset[MAX_LAYERS]; 107 #endif 108 #if P0312_VERT_PHASE_ADJ 101 109 Bool m_vertPhasePositionEnableFlag[MAX_LAYERS]; 110 #endif 111 #if R0209_GENERIC_PHASE 112 Int m_phaseHorLuma [MAX_LAYERS]; 113 Int m_phaseVerLuma [MAX_LAYERS]; 114 Int m_phaseHorChroma[MAX_LAYERS]; 115 Int m_phaseVerChroma[MAX_LAYERS]; 116 Bool m_resamplePhaseSetPresentFlag [MAX_LAYERS]; 102 117 #endif 103 118 -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r835 r849 351 351 } 352 352 } 353 #if REF_REGION_OFFSET 354 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 355 { 356 #if AUXILIARY_PICTURES 357 Int cf = m_acLayerCfg[i].m_chromaFormatIDC; 358 Int rlSubWidthC = ( cf == CHROMA_420 || cf == CHROMA_422 ) ? 2 : 1; 359 Int rlSubHeightC = ( cf == CHROMA_420 ) ? 2 : 1; 360 #else 361 Int rlSubWidthC = 2; 362 Int rlSubHeightC = 2; 363 #endif 364 m_acTEncTop[layer].setRefRegionOffsetPresentFlag( i, m_acLayerCfg[layer].m_refRegionOffsetPresentFlag ); 365 m_acTEncTop[layer].getRefLayerWindow(i).setWindow( rlSubWidthC * m_acLayerCfg[layer].m_refRegionLeftOffset[i], rlSubWidthC * m_acLayerCfg[layer].m_refRegionRightOffset[i], 366 rlSubHeightC * m_acLayerCfg[layer].m_refRegionTopOffset[i], rlSubHeightC * m_acLayerCfg[layer].m_refRegionBottomOffset[i]); 367 } 368 #endif 353 369 } 354 370 else … … 622 638 if( layer > 0 ) 623 639 { 640 #if REF_REGION_OFFSET 641 #if AUXILIARY_PICTURES 642 Int cf = m_acLayerCfg[layer].m_chromaFormatIDC; 643 Int subWidthC = ( cf == CHROMA_420 || cf == CHROMA_422 ) ? 2 : 1; 644 Int subHeightC = ( cf == CHROMA_420 ) ? 2 : 1; 645 #else 646 Int subWidthC = 2; 647 Int subHeightC = 2; 648 #endif 649 #endif 624 650 m_acTEncTop[layer].setNumScaledRefLayerOffsets( m_acLayerCfg[layer].m_numScaledRefLayerOffsets ); 625 651 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) … … 628 654 m_acTEncTop[layer].setScaledRefLayerId(i, m_acLayerCfg[layer].m_scaledRefLayerId[i]); 629 655 #endif 656 #if REF_REGION_OFFSET 657 m_acTEncTop[layer].setScaledRefLayerOffsetPresentFlag( i, m_acLayerCfg[layer].m_scaledRefLayerOffsetPresentFlag[i] ); 658 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow( subWidthC * m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], subWidthC * m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i], 659 subHeightC * m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], subHeightC * m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]); 660 #else 630 661 #if P0312_VERT_PHASE_ADJ 631 662 m_acTEncTop[layer].setVertPhasePositionEnableFlag( i, m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i] ); … … 635 666 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i], 636 667 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]); 668 #endif 669 #endif 670 #if R0209_GENERIC_PHASE 671 m_acTEncTop[layer].setResamplePhaseSetPresentFlag( i, m_acLayerCfg[layer].m_resamplePhaseSetPresentFlag[i] ); 672 m_acTEncTop[layer].setPhaseHorLuma( i, m_acLayerCfg[layer].m_phaseHorLuma[i] ); 673 m_acTEncTop[layer].setPhaseVerLuma( i, m_acLayerCfg[layer].m_phaseVerLuma[i] ); 674 m_acTEncTop[layer].setPhaseHorChroma( i, m_acLayerCfg[layer].m_phaseHorChroma[i] ); 675 m_acTEncTop[layer].setPhaseVerChroma( i, m_acLayerCfg[layer].m_phaseVerChroma[i] ); 637 676 #endif 638 677 } -
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
r828 r849 3509 3509 #endif 3510 3510 3511 #if MOVE_SCALED_OFFSET_TO_PPS 3512 #if O0098_SCALED_REF_LAYER_ID 3513 Int leftStartL = baseColPic->getSlice(0)->getPPS()->getScaledRefLayerWindowForLayer(baseColPic->getSlice(0)->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowLeftOffset(); 3514 Int topStartL = baseColPic->getSlice(0)->getPPS()->getScaledRefLayerWindowForLayer(baseColPic->getSlice(0)->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowTopOffset(); 3515 #else 3516 Int leftStartL = baseColPic->getSlice(0)->getPPS()->getScaledRefLayerWindow(refLayerIdc).getWindowLeftOffset(); 3517 Int topStartL = baseColPic->getSlice(0)->getPPS()->getScaledRefLayerWindow(refLayerIdc).getWindowTopOffset(); 3518 #endif 3519 #else 3511 3520 #if O0098_SCALED_REF_LAYER_ID 3512 3521 Int leftStartL = baseColPic->getSlice(0)->getSPS()->getScaledRefLayerWindowForLayer(baseColPic->getSlice(0)->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowLeftOffset(); … … 3516 3525 Int topStartL = baseColPic->getSlice(0)->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowTopOffset(); 3517 3526 #endif 3518 3527 #endif 3528 3529 #if REF_REGION_OFFSET 3530 const Window &windowRL = baseColPic->getSlice(0)->getPPS()->getRefLayerWindow(refLayerIdc); 3531 Int iBX = (((uiPelX - leftStartL)*g_posScalingFactor[refLayerIdc][0] + (1<<15)) >> 16) + windowRL.getWindowLeftOffset(); 3532 Int iBY = (((uiPelY - topStartL )*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16) + windowRL.getWindowTopOffset(); 3533 #else 3519 3534 #if Q0200_CONFORMANCE_BL_SIZE 3520 3535 Int chromaFormatIdc = baseColPic->getSlice(0)->getChromaFormatIdc(); … … 3525 3540 Int iBY = ((uiPelY - topStartL )*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16; 3526 3541 #endif 3542 #endif 3527 3543 3528 3544 #if REF_IDX_MFM -
branches/SHM-dev/source/Lib/TLibCommon/TComPrediction.cpp
r815 r849 796 796 #else 797 797 #if O0194_JOINT_US_BITSHIFT 798 #if REF_REGION_OFFSET 799 Void TComPrediction::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, const Window altRefWindow ) 800 { 801 m_cUsf.upsampleBasePic( refLayerIdc, pcUsPic, pcBasePic, pcTempPic, window, altRefWindow ); 802 } 803 #else 798 804 Void TComPrediction::upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window) 799 805 { 800 806 m_cUsf.upsampleBasePic( refLayerIdc, pcUsPic, pcBasePic, pcTempPic, window); 801 807 } 808 #endif 802 809 #else 803 810 Void TComPrediction::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window) -
branches/SHM-dev/source/Lib/TLibCommon/TComPrediction.h
r815 r849 126 126 #else 127 127 #if O0194_JOINT_US_BITSHIFT 128 #if REF_REGION_OFFSET 129 Void upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, const Window altRefWindow ); 130 #else 128 131 Void upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ); 132 #endif 129 133 #else 130 134 Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ); -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r848 r849 571 571 UInt refLayerId = m_pcVPS->getRefLayerId( m_layerId, refLayerIdc ); 572 572 #if RESAMPLING_CONSTRAINT_BUG_FIX 573 #if MOVE_SCALED_OFFSET_TO_PPS 574 #if O0098_SCALED_REF_LAYER_ID 575 const Window &scalEL = getPPS()->getScaledRefLayerWindowForLayer(refLayerId); 576 #else 577 const Window &scalEL = getPPS()->getScaledRefLayerWindow(m_interLayerPredLayerIdc[i]); 578 #endif 579 #else 573 580 #if O0098_SCALED_REF_LAYER_ID 574 581 const Window &scalEL = getSPS()->getScaledRefLayerWindowForLayer(refLayerId); 575 582 #else 576 583 const Window &scalEL = getSPS()->getScaledRefLayerWindow(m_interLayerPredLayerIdc[i]); 584 #endif 577 585 #endif 578 586 Int scalingOffset = ((scalEL.getWindowLeftOffset() == 0 ) && … … 3061 3069 , m_layerId ( 0 ) 3062 3070 , m_extensionFlag ( false ) 3071 #if !MOVE_SCALED_OFFSET_TO_PPS 3063 3072 , m_numScaledRefLayerOffsets ( 0 ) 3073 #endif 3064 3074 #if REPN_FORMAT_IN_VPS 3065 3075 , m_updateRepFormatFlag (false) … … 3084 3094 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); 3085 3095 3096 #if !MOVE_SCALED_OFFSET_TO_PPS 3086 3097 #if P0312_VERT_PHASE_ADJ 3087 3098 ::memset(m_vertPhasePositionEnableFlag, 0, sizeof(m_vertPhasePositionEnableFlag)); 3099 #endif 3088 3100 #endif 3089 3101 } … … 3217 3229 const Int TComSPS::m_winUnitY[]={1,2,1,1}; 3218 3230 3231 #if !MOVE_SCALED_OFFSET_TO_PPS 3219 3232 #if O0098_SCALED_REF_LAYER_ID 3220 3233 Window& TComSPS::getScaledRefLayerWindowForLayer(Int layerId) … … 3233 3246 return win; 3234 3247 } 3248 #endif 3249 #if REF_REGION_OFFSET 3250 Window& TComSPS::getRefLayerWindowForLayer(Int layerId) 3251 { 3252 static Window win; 3253 3254 for (Int i = 0; i < m_numRefLayerOffsets; i++) 3255 { 3256 if (layerId == m_refLayerId[i]) 3257 { 3258 return m_refLayerWindow[i]; 3259 } 3260 } 3261 3262 win.resetWindow(); // reference region offsets are inferred to be zero when not present 3263 return win; 3264 } 3265 #endif 3235 3266 #endif 3236 3267 … … 3276 3307 , m_pocResetInfoPresentFlag (false) 3277 3308 #endif 3309 #if MOVE_SCALED_OFFSET_TO_PPS 3310 , m_numScaledRefLayerOffsets ( 0 ) 3311 #endif 3278 3312 #if Q0048_CGS_3D_ASYMLUT 3279 3313 , m_nCGSFlag(0) … … 3284 3318 { 3285 3319 m_scalingList = new TComScalingList; 3320 #if REF_REGION_OFFSET 3321 ::memset(m_scaledRefLayerOffsetPresentFlag, 0, sizeof(m_scaledRefLayerOffsetPresentFlag)); 3322 ::memset(m_refRegionOffsetPresentFlag, 0, sizeof(m_refRegionOffsetPresentFlag)); 3323 #endif 3324 #if R0209_GENERIC_PHASE 3325 ::memset(m_resamplePhaseSetPresentFlag, 0, sizeof(m_resamplePhaseSetPresentFlag)); 3326 ::memset(m_phaseHorLuma, 0, sizeof(m_phaseHorLuma)); 3327 ::memset(m_phaseVerLuma, 0, sizeof(m_phaseVerLuma)); 3328 ::memset(m_phaseHorChroma, 0, sizeof(m_phaseHorChroma)); 3329 ::memset(m_phaseVerChroma, 0, sizeof(m_phaseVerChroma)); 3330 #endif 3286 3331 } 3287 3332 … … 3293 3338 delete m_scalingList; 3294 3339 } 3340 3341 #if MOVE_SCALED_OFFSET_TO_PPS 3342 #if O0098_SCALED_REF_LAYER_ID 3343 Window& TComPPS::getScaledRefLayerWindowForLayer(Int layerId) 3344 { 3345 static Window win; 3346 3347 for (Int i = 0; i < m_numScaledRefLayerOffsets; i++) 3348 { 3349 if (layerId == m_scaledRefLayerId[i]) 3350 { 3351 return m_scaledRefLayerWindow[i]; 3352 } 3353 } 3354 3355 win.resetWindow(); // scaled reference layer offsets are inferred to be zero when not present 3356 return win; 3357 } 3358 #endif 3359 #if REF_REGION_OFFSET 3360 Window& TComPPS::getRefLayerWindowForLayer(Int layerId) 3361 { 3362 static Window win; 3363 3364 for (Int i = 0; i < m_numScaledRefLayerOffsets; i++) 3365 { 3366 if (layerId == m_scaledRefLayerId[i]) 3367 { 3368 return m_refLayerWindow[i]; 3369 } 3370 } 3371 3372 win.resetWindow(); // reference region offsets are inferred to be zero when not present 3373 return win; 3374 } 3375 #endif 3376 #endif 3295 3377 3296 3378 TComReferencePictureSet::TComReferencePictureSet() -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r848 r849 1243 1243 1244 1244 Bool getWindowEnabledFlag() const { return m_enabledFlag; } 1245 #if P0312_VERT_PHASE_ADJ 1245 #if P0312_VERT_PHASE_ADJ 1246 1246 Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0; m_vertPhasePositionEnableFlag = false; } 1247 1247 #else … … 1256 1256 Int getWindowBottomOffset() const { return m_enabledFlag ? m_winBottomOffset: 0; } 1257 1257 Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; } 1258 1259 1258 #if P0312_VERT_PHASE_ADJ 1260 1259 Bool getVertPhasePositionEnableFlag() const { return m_vertPhasePositionEnableFlag; } 1261 1260 Void setVertPhasePositionEnableFlag(Bool val) { m_vertPhasePositionEnableFlag = val; } 1261 #endif 1262 1263 #if P0312_VERT_PHASE_ADJ 1262 1264 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom, Bool vertPhasePositionEnableFlag = 0) 1263 1265 #else … … 1532 1534 Bool m_vertPhasePositionEnableFlag[MAX_LAYERS]; 1533 1535 #endif 1536 #if !MOVE_SCALED_OFFSET_TO_PPS 1534 1537 #if O0098_SCALED_REF_LAYER_ID 1535 1538 UInt m_scaledRefLayerId[MAX_LAYERS]; 1536 1539 #endif 1537 1540 Window m_scaledRefLayerWindow[MAX_LAYERS]; 1541 #endif 1538 1542 #if REPN_FORMAT_IN_VPS 1539 Bool 1543 Bool m_updateRepFormatFlag; 1540 1544 #if O0096_REP_FORMAT_INDEX 1541 1545 UInt m_updateRepFormatIndex; … … 1547 1551 #endif 1548 1552 #endif //SVC_EXTENSION 1553 1549 1554 public: 1550 1555 TComSPS(); … … 1693 1698 Int getExtensionFlag() { return m_extensionFlag; } 1694 1699 Void setExtensionFlag(Int n) { m_extensionFlag = n; } 1700 #if !MOVE_SCALED_OFFSET_TO_PPS 1695 1701 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } 1696 1702 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } … … 1705 1711 #endif 1706 1712 Window& getScaledRefLayerWindow( Int x ) { return m_scaledRefLayerWindow[x]; } 1713 #endif 1707 1714 #if REPN_FORMAT_IN_VPS 1708 1715 Bool getUpdateRepFormatFlag() { return m_updateRepFormatFlag; } … … 1816 1823 #if POC_RESET_IDC 1817 1824 Bool m_pocResetInfoPresentFlag; 1825 #endif 1826 #if MOVE_SCALED_OFFSET_TO_PPS 1827 UInt m_numScaledRefLayerOffsets; 1828 #if O0098_SCALED_REF_LAYER_ID 1829 UInt m_scaledRefLayerId[MAX_LAYERS]; 1830 #endif 1831 Window m_scaledRefLayerWindow[MAX_LAYERS]; 1832 #if REF_REGION_OFFSET 1833 Window m_refLayerWindow[MAX_LAYERS]; 1834 Bool m_scaledRefLayerOffsetPresentFlag[MAX_LAYERS]; 1835 Bool m_refRegionOffsetPresentFlag[MAX_LAYERS]; 1836 #endif 1837 #if R0209_GENERIC_PHASE 1838 Int m_phaseHorLuma[MAX_LAYERS]; 1839 Int m_phaseVerLuma[MAX_LAYERS]; 1840 Int m_phaseHorChroma[MAX_LAYERS]; 1841 Int m_phaseVerChroma[MAX_LAYERS]; 1842 Bool m_resamplePhaseSetPresentFlag[MAX_LAYERS]; 1843 #endif 1818 1844 #endif 1819 1845 #if Q0048_CGS_3D_ASYMLUT … … 1944 1970 Bool getPocResetInfoPresentFlag () { return m_pocResetInfoPresentFlag; } 1945 1971 Void setPocResetInfoPresentFlag (const Bool val) { m_pocResetInfoPresentFlag = val; } 1972 #endif 1973 #if MOVE_SCALED_OFFSET_TO_PPS 1974 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } 1975 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } 1976 #if O0098_SCALED_REF_LAYER_ID 1977 UInt getScaledRefLayerId(Int x) { return m_scaledRefLayerId[x]; } 1978 Void setScaledRefLayerId(Int x, UInt id) { m_scaledRefLayerId[x] = id; } 1979 Window& getScaledRefLayerWindowForLayer( Int layerId ); 1980 #endif 1981 Window& getScaledRefLayerWindow( Int x ) { return m_scaledRefLayerWindow[x]; } 1982 #if REF_REGION_OFFSET 1983 Window& getRefLayerWindowForLayer( Int layerId ); 1984 Window& getRefLayerWindow( Int x ) { return m_refLayerWindow[x]; } 1985 Bool getScaledRefLayerOffsetPresentFlag(Int x) { return m_scaledRefLayerOffsetPresentFlag[x]; } 1986 Void setScaledRefLayerOffsetPresentFlag(Int x, Bool b) { m_scaledRefLayerOffsetPresentFlag[x] = b; } 1987 Bool getRefRegionOffsetPresentFlag(Int x) { return m_refRegionOffsetPresentFlag[x]; } 1988 Void setRefRegionOffsetPresentFlag(Int x, Bool b) { m_refRegionOffsetPresentFlag[x] = b; } 1989 #endif 1990 #if R0209_GENERIC_PHASE 1991 Int getPhaseHorLuma(Int x) { return m_phaseHorLuma[x]; } 1992 Int getPhaseVerLuma(Int x) { return m_phaseVerLuma[x]; } 1993 Int getPhaseHorChroma(Int x) { return m_phaseHorChroma[x]; } 1994 Int getPhaseVerChroma(Int x) { return m_phaseVerChroma[x]; } 1995 Void setPhaseHorLuma(Int x, Int val) { m_phaseHorLuma[x] = val; } 1996 Void setPhaseVerLuma(Int x, Int val) { m_phaseVerLuma[x] = val; } 1997 Void setPhaseHorChroma(Int x, Int val) { m_phaseHorChroma[x] = val; } 1998 Void setPhaseVerChroma(Int x, Int val) { m_phaseVerChroma[x] = val; } 1999 Bool getResamplePhaseSetPresentFlag(Int x) { return m_resamplePhaseSetPresentFlag[x]; } 2000 Void setResamplePhaseSetPresentFlag(Int x, Bool b) { m_resamplePhaseSetPresentFlag[x] = b; } 2001 #endif 1946 2002 #endif 1947 2003 #if Q0048_CGS_3D_ASYMLUT -
branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r815 r849 59 59 #else 60 60 #if O0194_JOINT_US_BITSHIFT 61 #if REF_REGION_OFFSET 62 Void TComUpsampleFilter::upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, const Window altRefWindow ) 63 #else 61 64 Void TComUpsampleFilter::upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ) 65 #endif 62 66 #else 63 67 Void TComUpsampleFilter::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ) … … 75 79 #endif 76 80 81 #if MOVE_SCALED_OFFSET_TO_PPS 82 #if O0098_SCALED_REF_LAYER_ID 83 const Window &scalEL = currSlice->getPPS()->getScaledRefLayerWindowForLayer(refLayerId); 84 #else 85 const Window &scalEL = currSlice->getPPS()->getScaledRefLayerWindow(refLayerIdc); 86 #endif 87 #if REF_REGION_OFFSET 88 const Window &windowRL = currSlice->getPPS()->getRefLayerWindow(refLayerIdc); 89 #endif 90 #else 77 91 #if O0098_SCALED_REF_LAYER_ID 78 92 const Window &scalEL = currSlice->getSPS()->getScaledRefLayerWindowForLayer(refLayerId); 79 93 #else 80 94 const Window &scalEL = currSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc); 95 #endif 81 96 #endif 82 97 … … 91 106 92 107 #if Q0200_CONFORMANCE_BL_SIZE 108 const Window &confBL = currSlice->getBaseColPic(refLayerIdc)->getConformanceWindow(); 109 #endif 110 #if Q0200_CONFORMANCE_BL_SIZE || REF_REGION_OFFSET 93 111 Int chromaFormatIdc = currSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getChromaFormatIdc(); 94 const Window &confBL = currSlice->getBaseColPic(refLayerIdc)->getConformanceWindow();95 112 Int xScal = TComSPS::getWinUnitX( chromaFormatIdc ); 96 113 Int yScal = TComSPS::getWinUnitY( chromaFormatIdc ); 114 #endif 115 #if R0209_GENERIC_PHASE 116 Int phaseHorLuma = currSlice->getPPS()->getPhaseHorLuma(refLayerIdc); 117 Int phaseVerLuma = currSlice->getPPS()->getPhaseVerLuma(refLayerIdc); 118 Int phaseHorChroma = currSlice->getPPS()->getPhaseHorChroma(refLayerIdc); 119 Int phaseVerChroma; 120 if (currSlice->getPPS()->getResamplePhaseSetPresentFlag(refLayerIdc)) 121 { 122 phaseVerChroma = currSlice->getPPS()->getPhaseVerChroma(refLayerIdc); 123 } 124 else 125 { 126 Int refRegionHeight = heightBL - windowRL.getWindowTopOffset() - windowRL.getWindowBottomOffset(); 127 phaseVerChroma = (4 * heightEL + (refRegionHeight >> 1)) / refRegionHeight - 4; 128 } 97 129 #endif 98 130 #if P0312_VERT_PHASE_ADJ … … 223 255 Int shiftY = 16; 224 256 257 #if R0209_GENERIC_PHASE 258 Int phaseX = phaseHorLuma; 259 Int phaseY = phaseVerLuma; 260 Int addX = ( ( phaseX * scaleX + 8 ) >> 4 ) - (1 << ( shiftX - 5 )); 261 Int addY = ( ( phaseY * scaleY + 8 ) >> 4 ) - (1 << ( shiftX - 5 )); 262 #if REF_REGION_OFFSET 263 Int refOffsetX = windowRL.getWindowLeftOffset() << 4; 264 Int refOffsetY = windowRL.getWindowTopOffset() << 4; 265 #else 266 #if Q0200_CONFORMANCE_BL_SIZE 267 Int refOffsetX = ( confBL.getWindowLeftOffset() * xScal ) << 4; 268 Int refOffsetY = ( confBL.getWindowTopOffset() * yScal ) << 4; 269 #endif 270 #endif 271 #else 225 272 #if O0215_PHASE_ALIGNMENT //for Luma, if Phase 0, then both PhaseX and PhaseY should be 0. If symmetric: both PhaseX and PhaseY should be 2 226 273 Int phaseX = 2*phaseAlignFlag; … … 258 305 #endif 259 306 307 #if REF_REGION_OFFSET 308 Int refOffsetX = windowRL.getWindowLeftOffset() << 4; 309 Int refOffsetY = windowRL.getWindowTopOffset() << 4; 310 #else 260 311 #if Q0200_CONFORMANCE_BL_SIZE 261 312 deltaX -= ( confBL.getWindowLeftOffset() * xScal ) << 4; 262 313 deltaY -= ( confBL.getWindowTopOffset() * yScal ) << 4; 263 314 #endif 315 #endif 316 #endif 264 317 265 318 Int shiftXM4 = shiftX - 4; … … 272 325 heightBL = min<Int>( pcBasePic->getHeight(), heightEL ); 273 326 327 #if R0220_REMOVE_EL_CLIP 328 Int phaseXL = scalEL.getWindowLeftOffset(); 329 Int phaseYL = scalEL.getWindowTopOffset(); 330 Int rlClipL = -(NTAPS_US_LUMA>>1); 331 Int rlClipR = widthBL -1 + (NTAPS_US_LUMA>>1); 332 Int rlClipT = -(NTAPS_US_LUMA>>1); 333 Int rlClipB = heightBL - 1 + (NTAPS_US_LUMA>>1); 334 #else 274 335 Int leftStartL = scalEL.getWindowLeftOffset(); 275 336 Int rightEndL = pcUsPic->getWidth() - scalEL.getWindowRightOffset(); … … 277 338 Int bottomEndL = pcUsPic->getHeight() - scalEL.getWindowBottomOffset(); 278 339 Int leftOffset = leftStartL > 0 ? leftStartL : 0; 340 #endif 279 341 #if O0194_JOINT_US_BITSHIFT 280 342 // g_bitDepthY was set to EL bit-depth, but shift1 should be calculated using BL bit-depth … … 293 355 for( i = 0; i < widthEL; i++ ) 294 356 { 357 #if R0220_REMOVE_EL_CLIP 358 Int x = i; 359 #if R0209_GENERIC_PHASE 360 refPos16 = (((x - phaseXL)*scaleX - addX) >> shiftXM4) + refOffsetX; 361 #else 362 #if REF_REGION_OFFSET 363 refPos16 = (((x - phaseXL)*scaleX + addX) >> shiftXM4) - deltaX + refOffsetX; 364 #else 365 refPos16 = (((x - phaseXL)*scaleX + addX) >> shiftXM4) - deltaX; 366 #endif 367 #endif 368 #else 295 369 Int x = Clip3( leftStartL, rightEndL - 1, i ); 370 #if REF_REGION_OFFSET 371 refPos16 = (((x - leftStartL)*scaleX + addX) >> shiftXM4) - deltaX + refOffsetX; 372 #else 296 373 refPos16 = (((x - leftStartL)*scaleX + addX) >> shiftXM4) - deltaX; 374 #endif 375 #endif 297 376 phase = refPos16 & 15; 298 377 refPos = refPos16 >> 4; 378 #if R0220_REMOVE_EL_CLIP 379 refPos = Clip3( rlClipL, rlClipR, refPos ); 380 #endif 299 381 coeff = m_lumaFilter[phase]; 300 382 … … 325 407 for( j = 0; j < pcTempPic->getHeight(); j++ ) 326 408 { 409 #if R0220_REMOVE_EL_CLIP 410 Int y = j; 411 #if R0209_GENERIC_PHASE 412 refPos16 = ((( y - phaseYL )*scaleY - addY) >> shiftYM4) + refOffsetY; 413 #else 414 #if REF_REGION_OFFSET 415 refPos16 = ((( y - phaseYL )*scaleY + addY) >> shiftYM4) - deltaY + refOffsetY; 416 #else 417 refPos16 = ((( y - pahseYL )*scaleY + addY) >> shiftYM4) - deltaY; 418 #endif 419 #endif 420 #else 327 421 Int y = Clip3(topStartL, bottomEndL - 1, j); 422 #if REF_REGION_OFFSET 423 refPos16 = ((( y - topStartL )*scaleY + addY) >> shiftYM4) - deltaY + refOffsetY; 424 #else 328 425 refPos16 = ((( y - topStartL )*scaleY + addY) >> shiftYM4) - deltaY; 426 #endif 427 #endif 329 428 phase = refPos16 & 15; 330 429 refPos = refPos16 >> 4; 430 #if R0220_REMOVE_EL_CLIP 431 refPos = Clip3( rlClipT, rlClipB, refPos ); 432 #endif 331 433 coeff = m_lumaFilter[phase]; 332 434 333 435 piSrcY = piTempBufY + (refPos -((NTAPS_US_LUMA>>1) - 1))*strideEL; 334 436 Pel* piDstY0 = piDstBufY + j * strideEL; 335 piDstY = piDstY0 + leftOffset; 336 piSrcY += leftOffset; 337 338 for( i = min<Int>(rightEndL, pcTempPic->getWidth()) - max<Int>(0, leftStartL); i > 0; i-- ) 437 438 #if R0220_REMOVE_EL_CLIP 439 piDstY = piDstY0; 440 441 for( i = pcTempPic->getWidth(); i > 0; i-- ) 339 442 { 340 443 *piDstY = ClipY( (sumLumaVer(piSrcY, coeff, strideEL) + iOffset) >> (nShift)); … … 342 445 piDstY++; 343 446 } 447 #else 448 piDstY = piDstY0 + leftOffset; 449 piSrcY += leftOffset; 450 451 for( i = min<Int>(rightEndL, pcTempPic->getWidth()) - max<Int>(0, leftStartL); i > 0; i-- ) 452 { 453 *piDstY = ClipY( (sumLumaVer(piSrcY, coeff, strideEL) + iOffset) >> (nShift)); 454 piSrcY++; 455 piDstY++; 456 } 344 457 345 458 for( i = rightEndL; i < pcTempPic->getWidth(); i++ ) … … 355 468 piDstY++; 356 469 } 357 470 #endif 358 471 } 359 472 … … 374 487 strideEL = pcUsPic->getCStride(); 375 488 489 #if R0220_REMOVE_EL_CLIP 490 Int srlLOffsetC = scalEL.getWindowLeftOffset() >> 1; 491 Int srlTOffsetC = scalEL.getWindowTopOffset() >> 1; 492 rlClipL = -(NTAPS_US_CHROMA>>1); 493 rlClipR = widthBL -1 + (NTAPS_US_CHROMA>>1); 494 rlClipT = -(NTAPS_US_CHROMA>>1); 495 rlClipB = heightBL - 1 + (NTAPS_US_CHROMA>>1); 496 #else 376 497 Int leftStartC = scalEL.getWindowLeftOffset() >> 1; 377 498 Int rightEndC = (pcUsPic->getWidth() >> 1) - (scalEL.getWindowRightOffset() >> 1); … … 379 500 Int bottomEndC = (pcUsPic->getHeight() >> 1) - (scalEL.getWindowBottomOffset() >> 1); 380 501 leftOffset = leftStartC > 0 ? leftStartC : 0; 502 #endif 381 503 shiftX = 16; 382 504 shiftY = 16; 383 505 506 #if R0209_GENERIC_PHASE 507 addX = ( ( phaseHorChroma * scaleX + 8 ) >> 4 ) - (1 << ( shiftX - 5 )); 508 addY = ( ( phaseVerChroma * scaleY + 8 ) >> 4 ) - (1 << ( shiftX - 5 )); 509 Int refOffsetXC = (windowRL.getWindowLeftOffset() / xScal) << 4; 510 Int refOffsetYC = (windowRL.getWindowTopOffset() / yScal) << 4; 511 #else 384 512 #if O0215_PHASE_ALIGNMENT 385 513 Int phaseXC = phaseAlignFlag; … … 417 545 #endif 418 546 547 #if REF_REGION_OFFSET 548 Int refOffsetXC = (windowRL.getWindowLeftOffset() / xScal) << 4; 549 Int refOffsetYC = (windowRL.getWindowTopOffset() / yScal) << 4; 550 #else 419 551 #if Q0200_CONFORMANCE_BL_SIZE 420 552 deltaX -= ( ( confBL.getWindowLeftOffset() * xScal ) >> 1 ) << 4; 421 553 deltaY -= ( ( confBL.getWindowTopOffset() * yScal ) >> 1 ) << 4; 554 #endif 555 #endif 422 556 #endif 423 557 … … 447 581 for( i = 0; i < widthEL; i++ ) 448 582 { 583 #if R0220_REMOVE_EL_CLIP 584 Int x = i; 585 #if R0209_GENERIC_PHASE 586 refPos16 = (((x - srlLOffsetC)*scaleX - addX) >> shiftXM4) + refOffsetXC; 587 #else 588 #if REF_REGION_OFFSET 589 refPos16 = (((x - srlLOffsetC)*scaleX + addX) >> shiftXM4) - deltaX + refOffsetXC; 590 #else 591 refPos16 = (((x - srlLOffsetC)*scaleX + addX) >> shiftXM4) - deltaX; 592 #endif 593 #endif 594 #else 449 595 Int x = Clip3(leftStartC, rightEndC - 1, i); 596 #if REF_REGION_OFFSET 597 refPos16 = (((x - leftStartC)*scaleX + addX) >> shiftXM4) - deltaX + refOffsetXC; 598 #else 450 599 refPos16 = (((x - leftStartC)*scaleX + addX) >> shiftXM4) - deltaX; 600 #endif 601 #endif 451 602 phase = refPos16 & 15; 452 603 refPos = refPos16 >> 4; 604 #if R0220_REMOVE_EL_CLIP 605 refPos = Clip3(rlClipL, rlClipR, refPos); 606 #endif 453 607 coeff = m_chromaFilter[phase]; 454 608 … … 485 639 for( j = 0; j < pcTempPic->getHeight() >> 1; j++ ) 486 640 { 641 #if R0220_REMOVE_EL_CLIP 642 Int y = j; 643 #if R0209_GENERIC_PHASE 644 refPos16 = (((y - srlTOffsetC)*scaleX - addY) >> shiftYM4) + refOffsetYC; 645 #else 646 #if REF_REGION_OFFSET 647 refPos16 = (((y - srlTOffsetC)*scaleY + addY) >> shiftYM4) - deltaY + refOffsetYC; 648 #else 649 refPos16 = (((y - srlTOffsetC)*scaleY + addY) >> shiftYM4) - deltaY; 650 #endif 651 #endif 652 #else 487 653 Int y = Clip3(topStartC, bottomEndC - 1, j); 654 #if REF_REGION_OFFSET 655 refPos16 = (((y - topStartC)*scaleY + addY) >> shiftYM4) - deltaY + refOffsetYC; 656 #else 488 657 refPos16 = (((y - topStartC)*scaleY + addY) >> shiftYM4) - deltaY; 658 #endif 659 #endif 489 660 phase = refPos16 & 15; 490 661 refPos = refPos16 >> 4; 662 #if R0220_REMOVE_EL_CLIP 663 refPos = Clip3(rlClipT, rlClipB, refPos); 664 #endif 491 665 coeff = m_chromaFilter[phase]; 492 666 … … 496 670 Pel* piDstU0 = piDstBufU + j*strideEL; 497 671 Pel* piDstV0 = piDstBufV + j*strideEL; 498 piDstU = piDstU0 + leftOffset; 499 piDstV = piDstV0 + leftOffset; 500 pi SrcU += leftOffset;501 pi SrcV += leftOffset;502 503 for( i = min<Int>(rightEndC, pcTempPic->getWidth() >> 1) - max<Int>(0, leftStartC); i > 0; i-- )672 673 #if R0220_REMOVE_EL_CLIP 674 piDstU = piDstU0; 675 piDstV = piDstV0; 676 677 for( i = pcTempPic->getWidth() >> 1; i > 0; i-- ) 504 678 { 505 679 *piDstU = ClipC( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift)); … … 510 684 piDstV++; 511 685 } 686 #else 687 piDstU = piDstU0 + leftOffset; 688 piDstV = piDstV0 + leftOffset; 689 piSrcU += leftOffset; 690 piSrcV += leftOffset; 691 692 for( i = min<Int>(rightEndC, pcTempPic->getWidth() >> 1) - max<Int>(0, leftStartC); i > 0; i-- ) 693 { 694 *piDstU = ClipC( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift)); 695 *piDstV = ClipC( (sumChromaVer(piSrcV, coeff, strideEL) + iOffset) >> (nShift)); 696 piSrcU++; 697 piSrcV++; 698 piDstU++; 699 piDstV++; 700 } 512 701 513 702 for( i = rightEndC; i < pcTempPic->getWidth() >> 1; i++ ) … … 528 717 piDstV++; 529 718 } 719 #endif 530 720 531 721 } -
branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.h
r713 r849 51 51 #else 52 52 #if O0194_JOINT_US_BITSHIFT 53 #if REF_REGION_OFFSET 54 Void upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, const Window altRefWindow ); 55 #else 53 56 Void upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ); 57 #endif 54 58 #else 55 59 Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ); -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r848 r849 62 62 #define Q0146_SSH_EXT_DATA_BIT 1 ///< JCTVC-Q0146; Bug-fix -- the SSH_EXT_DATA_BIT can have any value -- not required to be 1 63 63 64 #define Q0200_CONFORMANCE_BL_SIZE 1 ///< JCTVC-Q0200; use conformance picture size in re-sampling processs65 #define P0312_VERT_PHASE_ADJ 1 ///< JCTVC-P0312: vertical phase adjustment in re-sampling process (BoG report)66 #if P0312_VERT_PHASE_ADJ67 #define Q0120_PHASE_CALCULATION 1 ///< JCTVC-Q0120 phase offset derivation for combination of spatial scalibility and field coding.68 #endif69 64 #define P0130_EOB 1 ///< JCTVC-P0130, set layer Id of EOB NALU to be fixed to 0 70 65 #define T_ID_EOB_BUG_FIX 1 ///< Bug fix for the value of temporal id of EOB NALU. It must be set to 0 … … 235 230 #define HRD_BPB 1 ///< JCTVC-Q0101 Bitstream Partition Buffering Proposals 236 231 #define DPB_CONSTRAINTS 1 ///< JCTVC-Q0100 RPS DPB constraints 232 233 #define R0340_RESAMPLING_MODIFICATION 1 ///< JCTVC-R0340: set of changes regarding resampling (as listed below) 234 #if R0340_RESAMPLING_MODIFICATION 235 #define MOVE_SCALED_OFFSET_TO_PPS 1 ///< JCTVC-R0013: move scaled reference layer offset from SPS to PPS 236 #if MOVE_SCALED_OFFSET_TO_PPS 237 #define REF_REGION_OFFSET 1 ///< JCTVC-Q0159/R0220: reference region offset 238 #define R0209_GENERIC_PHASE 1 ///< JCTVC-R0209: resampling with generic phase 239 #define R0220_REMOVE_EL_CLIP 1 ///< JCTVC-R0220: remove clip to scaled ref window in resampling process 240 #endif 241 #else 242 #define Q0200_CONFORMANCE_BL_SIZE 1 ///< JCTVC-Q0200; use conformance picture size in re-sampling processs 243 #define P0312_VERT_PHASE_ADJ 1 ///< JCTVC-P0312: vertical phase adjustment in re-sampling process (BoG report) 244 #if P0312_VERT_PHASE_ADJ 245 #define Q0120_PHASE_CALCULATION 1 ///< JCTVC-Q0120 phase offset derivation for combination of spatial scalibility and field coding. 246 #endif 247 #endif 237 248 238 249 /// scalability types -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r848 r849 359 359 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); 360 360 pcPPS->setPocResetInfoPresentFlag(uiCode ? true : false); 361 #if REF_REGION_OFFSET 362 READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcPPS->setNumScaledRefLayerOffsets(uiCode); 363 for(Int i = 0; i < pcPPS->getNumScaledRefLayerOffsets(); i++) 364 { 365 READ_CODE( 6, uiCode, "scaled_ref_layer_id" ); pcPPS->setScaledRefLayerId( i, uiCode ); 366 READ_FLAG( uiCode, "scaled_ref_layer_offset_present_flag" ); pcPPS->setScaledRefLayerOffsetPresentFlag( i, uiCode ); 367 if (uiCode) 368 { 369 Window& scaledWindow = pcPPS->getScaledRefLayerWindow(i); 370 READ_SVLC( iCode, "scaled_ref_layer_left_offset" ); scaledWindow.setWindowLeftOffset (iCode << 1); 371 READ_SVLC( iCode, "scaled_ref_layer_top_offset" ); scaledWindow.setWindowTopOffset (iCode << 1); 372 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); scaledWindow.setWindowRightOffset (iCode << 1); 373 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); scaledWindow.setWindowBottomOffset(iCode << 1); 374 #if P0312_VERT_PHASE_ADJ 375 READ_FLAG( uiCode, "vert_phase_position_enable_flag" ); scaledWindow.setVertPhasePositionEnableFlag(uiCode); pcPPS->setVertPhasePositionEnableFlag( pcPPS->getScaledRefLayerId(i), uiCode); 376 #endif 377 } 378 READ_FLAG( uiCode, "ref_region_offset_present_flag" ); pcPPS->setRefRegionOffsetPresentFlag( i, uiCode ); 379 if (uiCode) 380 { 381 Window& refWindow = pcPPS->getRefLayerWindow(i); 382 READ_SVLC( iCode, "ref_region_left_offset" ); refWindow.setWindowLeftOffset (iCode << 1); 383 READ_SVLC( iCode, "ref_region_top_offset" ); refWindow.setWindowTopOffset (iCode << 1); 384 READ_SVLC( iCode, "ref_region_right_offset" ); refWindow.setWindowRightOffset (iCode << 1); 385 READ_SVLC( iCode, "ref_region_bottom_offset" ); refWindow.setWindowBottomOffset(iCode << 1); 386 } 387 #if R0209_GENERIC_PHASE 388 READ_FLAG( uiCode, "resample_phase_set_present_flag" ); pcPPS->setResamplePhaseSetPresentFlag( i, uiCode ); 389 if (uiCode) 390 { 391 READ_UVLC( uiCode, "phase_hor_luma" ); pcPPS->setPhaseHorLuma ( i, uiCode ); 392 READ_UVLC( uiCode, "phase_ver_luma" ); pcPPS->setPhaseVerLuma ( i, uiCode ); 393 READ_UVLC( uiCode, "phase_hor_chroma_plus8" ); pcPPS->setPhaseHorChroma (i, uiCode - 8); 394 READ_UVLC( uiCode, "phase_ver_chroma_plus8" ); pcPPS->setPhaseVerChroma (i, uiCode - 8); 395 } 396 #endif 397 } 398 #else 399 #if MOVE_SCALED_OFFSET_TO_PPS 400 READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcPPS->setNumScaledRefLayerOffsets(uiCode); 401 for(Int i = 0; i < pcPPS->getNumScaledRefLayerOffsets(); i++) 402 { 403 Window& scaledWindow = pcPPS->getScaledRefLayerWindow(i); 404 #if O0098_SCALED_REF_LAYER_ID 405 READ_CODE( 6, uiCode, "scaled_ref_layer_id" ); pcPPS->setScaledRefLayerId( i, uiCode ); 406 #endif 407 READ_SVLC( iCode, "scaled_ref_layer_left_offset" ); scaledWindow.setWindowLeftOffset (iCode << 1); 408 READ_SVLC( iCode, "scaled_ref_layer_top_offset" ); scaledWindow.setWindowTopOffset (iCode << 1); 409 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); scaledWindow.setWindowRightOffset (iCode << 1); 410 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); scaledWindow.setWindowBottomOffset(iCode << 1); 411 #if P0312_VERT_PHASE_ADJ 412 READ_FLAG( uiCode, "vert_phase_position_enable_flag" ); scaledWindow.setVertPhasePositionEnableFlag(uiCode); pcPPS->setVertPhasePositionEnableFlag( pcPPS->getScaledRefLayerId(i), uiCode); 413 #endif 414 } 415 #endif 416 #endif 361 417 #if Q0048_CGS_3D_ASYMLUT 362 418 READ_FLAG( uiCode , "colour_mapping_enabled_flag" ); … … 897 953 assert( uiCode == 0 ); 898 954 955 #if !MOVE_SCALED_OFFSET_TO_PPS 899 956 if( pcSPS->getLayerId() > 0 ) 900 957 { … … 916 973 } 917 974 } 975 #endif 918 976 } 919 977 #endif … … 3027 3085 } 3028 3086 #if P0312_VERT_PHASE_ADJ 3029 for(Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ ) 3030 { 3031 UInt refLayerIdc = rpcSlice->getInterLayerPredLayerIdc(i); 3032 if( rpcSlice->getSPS()->getVertPhasePositionEnableFlag(refLayerIdc) ) 3033 { 3034 READ_FLAG( uiCode, "vert_phase_position_flag" ); rpcSlice->setVertPhasePositionFlag( uiCode? true : false, refLayerIdc ); 3035 } 3087 for(Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ ) 3088 { 3089 UInt refLayerIdc = rpcSlice->getInterLayerPredLayerIdc(i); 3090 #if !MOVE_SCALED_OFFSET_TO_PPS 3091 if( rpcSlice->getSPS()->getVertPhasePositionEnableFlag(refLayerIdc) ) 3092 #else 3093 if( rpcSlice->getPPS()->getVertPhasePositionEnableFlag(refLayerIdc) ) 3094 #endif 3095 { 3096 READ_FLAG( uiCode, "vert_phase_position_flag" ); rpcSlice->setVertPhasePositionFlag( uiCode? true : false, refLayerIdc ); 3097 } 3036 3098 } 3037 3099 #endif -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r834 r849 350 350 for(UInt i = 0; i < pcSlice->getVPS()->getNumDirectRefLayers( m_layerId ); i++ ) 351 351 { 352 #if MOVE_SCALED_OFFSET_TO_PPS 353 #if O0098_SCALED_REF_LAYER_ID 354 const Window scalEL = pcSlice->getPPS()->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, i)); 355 #else 356 const Window scalEL = pcSlice->getPPS()->getScaledRefLayerWindow(i); 357 #endif 358 #else 352 359 #if O0098_SCALED_REF_LAYER_ID 353 360 const Window scalEL = pcSlice->getSPS()->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, i)); … … 355 362 const Window scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(i); 356 363 #endif 364 #endif 365 #if REF_REGION_OFFSET 366 const Window refEL = pcSlice->getPPS()->getRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, i)); 367 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 368 && refEL.getWindowLeftOffset() == 0 && refEL.getWindowRightOffset() == 0 && refEL.getWindowTopOffset() == 0 && refEL.getWindowBottomOffset() == 0 ); 369 #else 357 370 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 ); 371 #endif 358 372 359 373 #if VPS_EXTN_DIRECT_REF_LAYERS … … 763 777 764 778 #if P0312_VERT_PHASE_ADJ 779 #if MOVE_SCALED_OFFSET_TO_PPS 780 if( activeVPS->getVpsVuiVertPhaseInUseFlag() == 0 ) 781 { 782 for(Int i = 0; i < activePPS->getNumScaledRefLayerOffsets(); i++) 783 { 784 UInt scaledRefLayerId = activePPS->getScaledRefLayerId(i); 785 if( activePPS->getVertPhasePositionEnableFlag( scaledRefLayerId ) ) 786 { 787 printf("\nWarning: LayerId = %d: vert_phase_position_enable_flag[%d] = 1, however indication vert_phase_position_in_use_flag = 0\n", m_layerId, scaledRefLayerId ); 788 break; 789 } 790 } 791 } 792 #else 765 793 if( activeVPS->getVpsVuiVertPhaseInUseFlag() == 0 ) 766 794 { … … 775 803 } 776 804 } 805 #endif 777 806 #endif 778 807 … … 1726 1755 #endif 1727 1756 1757 #if MOVE_SCALED_OFFSET_TO_PPS 1758 #if O0098_SCALED_REF_LAYER_ID 1759 const Window &scalEL = pcSlice->getPPS()->getScaledRefLayerWindowForLayer(refLayerId); 1760 #else 1761 const Window &scalEL = pcSlice->getPPS()->getScaledRefLayerWindow(refLayerIdc); 1762 #endif 1763 #else 1728 1764 #if O0098_SCALED_REF_LAYER_ID 1729 1765 const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindowForLayer(refLayerId); … … 1731 1767 const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc); 1732 1768 #endif 1733 1769 #endif 1770 1771 #if REF_REGION_OFFSET 1772 const Window &windowRL = pcSlice->getPPS()->getRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc)); 1773 Int widthBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth() - windowRL.getWindowLeftOffset() - windowRL.getWindowRightOffset(); 1774 Int heightBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getHeight() - windowRL.getWindowTopOffset() - windowRL.getWindowBottomOffset(); 1775 #else 1734 1776 Int widthBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth(); 1735 1777 Int heightBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getHeight(); … … 1740 1782 heightBL -= ( confBL.getWindowTopOffset() + confBL.getWindowBottomOffset() ) * TComSPS::getWinUnitY( chromaFormatIdc ); 1741 1783 #endif 1784 #endif 1742 1785 Int widthEL = pcPic->getPicYuvRec()->getWidth() - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset(); 1743 1786 Int heightEL = pcPic->getPicYuvRec()->getHeight() - scalEL.getWindowTopOffset() - scalEL.getWindowBottomOffset(); … … 1786 1829 #else 1787 1830 #if Q0048_CGS_3D_ASYMLUT 1788 m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc), pcSlice->getVPS()->getPhaseAlignFlag() ); 1789 #else 1790 m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), scalEL, pcSlice->getVPS()->getPhaseAlignFlag() ); 1831 #if MOVE_SCALED_OFFSET_TO_PPS 1832 m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, pcPic->getPicYuvRec(), pcSlice->getPPS()->getScaledRefLayerWindow(refLayerIdc), pcSlice->getVPS()->getPhaseAlignFlag() ); 1833 #else 1834 m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc), pcSlice->getVPS()->getPhaseAlignFlag() ); 1835 #endif 1836 #else 1837 m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), scalEL, pcSlice->getVPS()->getPhaseAlignFlag() ); 1791 1838 #endif 1792 1839 #endif … … 1794 1841 #if O0194_JOINT_US_BITSHIFT 1795 1842 #if Q0048_CGS_3D_ASYMLUT 1796 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, pcPic->getPicYuvRec(), scalEL ); 1797 #else 1798 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), scalEL ); 1843 #if REF_REGION_OFFSET 1844 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, pcPic->getPicYuvRec(), scalEL, altRL ); 1845 #else 1846 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, pcPic->getPicYuvRec(), scalEL ); 1847 #endif 1848 #else 1849 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), scalEL ); 1799 1850 #endif 1800 1851 #else -
branches/SHM-dev/source/Lib/TLibEncoder/TEnc3DAsymLUT.cpp
r825 r849 462 462 TComSlice * pSlice = pCurPic->getSlice(pCurPic->getCurrSliceIdx()); 463 463 UInt refLayerId = pSlice->getVPS()->getRefLayerId(pSlice->getLayerId(), refLayerIdc); 464 #if MOVE_SCALED_OFFSET_TO_PPS 465 const Window &scalEL = pSlice->getPPS()->getScaledRefLayerWindowForLayer(refLayerId); 466 #else 464 467 const Window &scalEL = pSlice->getSPS()->getScaledRefLayerWindowForLayer(refLayerId); 468 #endif 465 469 TComPicYuv *pcRecPicBL = pSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(); 466 470 // borders of down-sampled picture -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r839 r849 273 273 { 274 274 WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag() ? 1 : 0, "poc_reset_info_present_flag" ); 275 #if REF_REGION_OFFSET 276 WRITE_UVLC( pcPPS->getNumScaledRefLayerOffsets(), "num_scaled_ref_layer_offsets" ); 277 for(Int i = 0; i < pcPPS->getNumScaledRefLayerOffsets(); i++) 278 { 279 WRITE_CODE( pcPPS->getScaledRefLayerId(i), 6, "scaled_ref_layer_id" ); 280 WRITE_FLAG( pcPPS->getScaledRefLayerOffsetPresentFlag(i) ? 1 : 0, "scaled_ref_layer_offset_prsent_flag" ); 281 if (pcPPS->getScaledRefLayerOffsetPresentFlag(i)) 282 { 283 Window scaledWindow = pcPPS->getScaledRefLayerWindow(i); 284 WRITE_SVLC( scaledWindow.getWindowLeftOffset() >> 1, "scaled_ref_layer_left_offset" ); 285 WRITE_SVLC( scaledWindow.getWindowTopOffset() >> 1, "scaled_ref_layer_top_offset" ); 286 WRITE_SVLC( scaledWindow.getWindowRightOffset() >> 1, "scaled_ref_layer_right_offset" ); 287 WRITE_SVLC( scaledWindow.getWindowBottomOffset() >> 1, "scaled_ref_layer_bottom_offset" ); 288 } 289 WRITE_FLAG( pcPPS->getRefRegionOffsetPresentFlag(i) ? 1 : 0, "ref_region_offset_prsent_flag" ); 290 if (pcPPS->getRefRegionOffsetPresentFlag(i)) 291 { 292 Window refWindow = pcPPS->getRefLayerWindow(i); 293 WRITE_SVLC( refWindow.getWindowLeftOffset() >> 1, "ref_layer_left_offset" ); 294 WRITE_SVLC( refWindow.getWindowTopOffset() >> 1, "ref_layer_top_offset" ); 295 WRITE_SVLC( refWindow.getWindowRightOffset() >> 1, "ref_layer_right_offset" ); 296 WRITE_SVLC( refWindow.getWindowBottomOffset() >> 1, "ref_layer_bottom_offset" ); 297 } 298 #if R0209_GENERIC_PHASE 299 WRITE_FLAG( pcPPS->getResamplePhaseSetPresentFlag(i) ? 1 : 0, "resample_phase_set_present_flag" ); 300 if (pcPPS->getResamplePhaseSetPresentFlag(i)) 301 { 302 WRITE_UVLC( pcPPS->getPhaseHorLuma(i), "phase_hor_luma" ); 303 WRITE_UVLC( pcPPS->getPhaseVerLuma(i), "phase_ver_luma" ); 304 WRITE_UVLC( pcPPS->getPhaseHorChroma(i) + 8, "phase_hor_chroma_plus8" ); 305 WRITE_UVLC( pcPPS->getPhaseVerChroma(i) + 8, "phase_ver_chroma_plus8" ); 306 } 307 #endif 308 } 309 #else 310 #if MOVE_SCALED_OFFSET_TO_PPS 311 WRITE_UVLC( pcPPS->getNumScaledRefLayerOffsets(), "num_scaled_ref_layer_offsets" ); 312 for(Int i = 0; i < pcPPS->getNumScaledRefLayerOffsets(); i++) 313 { 314 Window scaledWindow = pcPPS->getScaledRefLayerWindow(i); 315 #if O0098_SCALED_REF_LAYER_ID 316 WRITE_CODE( pcPPS->getScaledRefLayerId(i), 6, "scaled_ref_layer_id" ); 317 #endif 318 WRITE_SVLC( scaledWindow.getWindowLeftOffset() >> 1, "scaled_ref_layer_left_offset" ); 319 WRITE_SVLC( scaledWindow.getWindowTopOffset() >> 1, "scaled_ref_layer_top_offset" ); 320 WRITE_SVLC( scaledWindow.getWindowRightOffset() >> 1, "scaled_ref_layer_right_offset" ); 321 WRITE_SVLC( scaledWindow.getWindowBottomOffset() >> 1, "scaled_ref_layer_bottom_offset" ); 322 } 323 #endif 324 #endif 275 325 #if Q0048_CGS_3D_ASYMLUT 276 326 UInt uiPos = getNumberOfWrittenBits(); … … 672 722 WRITE_FLAG( 0, "inter_view_mv_vert_constraint_flag" ); 673 723 724 #if !MOVE_SCALED_OFFSET_TO_PPS 674 725 if( pcSPS->getLayerId() > 0 ) 675 726 { … … 690 741 } 691 742 } 743 #endif 692 744 } 693 745 #endif //SVC_EXTENSION -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h
r825 r849 411 411 412 412 Window &getConformanceWindow() { return m_conformanceWindow; } 413 #if P0312_VERT_PHASE_ADJ 413 #if P0312_VERT_PHASE_ADJ && !R0209_GENERIC_PHASE 414 414 Void setConformanceWindow (Int confLeft, Int confRight, Int confTop, Int confBottom ) { m_conformanceWindow.setWindow (confLeft, confRight, confTop, confBottom, false); } 415 415 #else -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r842 r849 1132 1132 #endif 1133 1133 1134 #if REF_REGION_OFFSET 1135 const Window &windowRL = m_pcEncTop->getRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc)); 1136 Int widthBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth() - windowRL.getWindowLeftOffset() - windowRL.getWindowRightOffset(); 1137 Int heightBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getHeight() - windowRL.getWindowTopOffset() - windowRL.getWindowBottomOffset(); 1138 #else 1134 1139 Int widthBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth(); 1135 1140 Int heightBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getHeight(); … … 1140 1145 heightBL -= ( confBL.getWindowTopOffset() + confBL.getWindowBottomOffset() ) * TComSPS::getWinUnitY( chromaFormatIdc ); 1141 1146 #endif 1147 #endif 1142 1148 Int widthEL = pcPic->getPicYuvRec()->getWidth() - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset(); 1143 1149 Int heightEL = pcPic->getPicYuvRec()->getHeight() - scalEL.getWindowTopOffset() - scalEL.getWindowBottomOffset(); … … 1209 1215 #if O0194_JOINT_US_BITSHIFT 1210 1216 #if Q0048_CGS_3D_ASYMLUT 1211 m_pcPredSearch->upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, pcPic->getPicYuvRec(), scalEL ); 1212 #else 1213 m_pcPredSearch->upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), scalEL ); 1217 #if REF_REGION_OFFSET 1218 m_pcPredSearch->upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, pcPic->getPicYuvRec(), scalEL, altRL ); 1219 #else 1220 m_pcPredSearch->upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, pcPic->getPicYuvRec(), scalEL ); 1221 #endif 1222 #else 1223 m_pcPredSearch->upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), scalEL ); 1214 1224 #endif 1215 1225 #else -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r830 r849 779 779 for(UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ ) 780 780 { 781 #if MOVE_SCALED_OFFSET_TO_PPS 782 #if O0098_SCALED_REF_LAYER_ID 783 const Window scalEL = getPPS()->getScaledRefLayerWindowForLayer(m_cVPS.getRefLayerId(m_layerId, i)); 784 #else 785 const Window scalEL = getPPS()->getScaledRefLayerWindow(i); 786 #endif 787 #else 781 788 #if O0098_SCALED_REF_LAYER_ID 782 789 const Window scalEL = getSPS()->getScaledRefLayerWindowForLayer(m_cVPS.getRefLayerId(m_layerId, i)); … … 784 791 const Window scalEL = getSPS()->getScaledRefLayerWindow(i); 785 792 #endif 793 #endif 794 #if REF_REGION_OFFSET 795 const Window altRL = getPPS()->getRefLayerWindowForLayer(m_cVPS.getRefLayerId(m_layerId, i)); 796 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 797 && altRL.getWindowLeftOffset() == 0 && altRL.getWindowRightOffset() == 0 && altRL.getWindowTopOffset() == 0 && altRL.getWindowBottomOffset() == 0); 798 #else 786 799 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 ); 800 #endif 787 801 788 802 #if VPS_EXTN_DIRECT_REF_LAYERS … … 839 853 for(UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ ) 840 854 { 855 #if MOVE_SCALED_OFFSET_TO_PPS 856 #if O0098_SCALED_REF_LAYER_ID 857 const Window scalEL = getPPS()->getScaledRefLayerWindowForLayer(m_cVPS.getRefLayerId(m_layerId, i)); 858 #else 859 const Window scalEL = getPPS()->getScaledRefLayerWindow(i); 860 #endif 861 #else 841 862 #if O0098_SCALED_REF_LAYER_ID 842 863 const Window scalEL = getSPS()->getScaledRefLayerWindowForLayer(m_cVPS.getRefLayerId(m_layerId, i)); … … 844 865 const Window scalEL = getSPS()->getScaledRefLayerWindow(i); 845 866 #endif 867 #endif 868 #if REF_REGION_OFFSET 869 const Window altRL = getPPS()->getRefLayerWindowForLayer(m_cVPS.getRefLayerId(m_layerId, i)); 870 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 871 && altRL.getWindowLeftOffset() == 0 && altRL.getWindowRightOffset() == 0 && altRL.getWindowTopOffset() == 0 && altRL.getWindowBottomOffset() == 0); 872 #else 846 873 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 ); 874 #endif 847 875 848 876 #if VPS_EXTN_DIRECT_REF_LAYERS … … 918 946 m_cSPS.setLayerId(m_layerId); 919 947 #endif 948 #if !MOVE_SCALED_OFFSET_TO_PPS 920 949 m_cSPS.setNumScaledRefLayerOffsets(m_numScaledRefLayerOffsets); 921 950 for(Int i = 0; i < m_cSPS.getNumScaledRefLayerOffsets(); i++) … … 929 958 #endif 930 959 } 960 #endif 931 961 #endif //SVC_EXTENSION 932 962 ProfileTierLevel& profileTierLevel = *m_cSPS.getPTL()->getGeneralPTL(); … … 1205 1235 } 1206 1236 #endif 1237 #if MOVE_SCALED_OFFSET_TO_PPS 1238 m_cPPS.setNumScaledRefLayerOffsets(m_numScaledRefLayerOffsets); 1239 for(Int i = 0; i < m_cPPS.getNumScaledRefLayerOffsets(); i++) 1240 { 1241 #if O0098_SCALED_REF_LAYER_ID 1242 m_cPPS.setScaledRefLayerId(i, m_scaledRefLayerId[i]); 1243 #endif 1244 m_cPPS.getScaledRefLayerWindow(i) = m_scaledRefLayerWindow[i]; 1245 #if REF_REGION_OFFSET 1246 m_cPPS.getRefLayerWindow(i) = m_refLayerWindow[i]; 1247 m_cPPS.setScaledRefLayerOffsetPresentFlag( m_scaledRefLayerId[i], m_scaledRefLayerOffsetPresentFlag[i] ); 1248 m_cPPS.setRefRegionOffsetPresentFlag( m_scaledRefLayerId[i], m_refRegionOffsetPresentFlag[i] ); 1249 #endif 1250 #if R0209_GENERIC_PHASE 1251 m_cPPS.setResamplePhaseSetPresentFlag( m_scaledRefLayerId[i], m_resamplePhaseSetPresentFlag[i] ); 1252 m_cPPS.setPhaseHorLuma( m_scaledRefLayerId[i], m_phaseHorLuma[i] ); 1253 m_cPPS.setPhaseVerLuma( m_scaledRefLayerId[i], m_phaseVerLuma[i] ); 1254 m_cPPS.setPhaseHorChroma( m_scaledRefLayerId[i], m_phaseHorChroma[i] ); 1255 m_cPPS.setPhaseVerChroma( m_scaledRefLayerId[i], m_phaseVerChroma[i] ); 1256 #endif 1257 #if P0312_VERT_PHASE_ADJ 1258 m_cPPS.setVertPhasePositionEnableFlag( m_scaledRefLayerId[i], m_scaledRefLayerWindow[i].getVertPhasePositionEnableFlag() ); 1259 #endif 1260 } 1261 #endif 1207 1262 #if Q0048_CGS_3D_ASYMLUT 1208 1263 m_cPPS.setCGSFlag( m_nCGSFlag ); … … 1682 1737 return win; 1683 1738 } 1739 #if REF_REGION_OFFSET 1740 Window& TEncTop::getRefLayerWindowForLayer(Int layerId) 1741 { 1742 static Window win; 1743 1744 for (Int i = 0; i < m_numScaledRefLayerOffsets; i++) 1745 { 1746 if (layerId == m_refLayerId[i]) 1747 { 1748 return m_refLayerWindow[i]; 1749 } 1750 } 1751 1752 win.resetWindow(); // reference offsets are inferred to be zero when not present 1753 return win; 1754 } 1755 #endif 1684 1756 #endif 1685 1757 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.h
r820 r849 136 136 #endif 137 137 Window m_scaledRefLayerWindow[MAX_LAYERS]; 138 #if REF_REGION_OFFSET 139 UInt m_numRefLayerOffsets; 140 UInt m_refLayerId[MAX_LAYERS]; 141 Window m_refLayerWindow[MAX_LAYERS]; 142 Bool m_scaledRefLayerOffsetPresentFlag[MAX_LAYERS]; 143 Bool m_refRegionOffsetPresentFlag[MAX_LAYERS]; 144 #endif 145 #if R0209_GENERIC_PHASE 146 Int m_phaseHorLuma [MAX_LAYERS]; 147 Int m_phaseVerLuma [MAX_LAYERS]; 148 Int m_phaseHorChroma[MAX_LAYERS]; 149 Int m_phaseVerChroma[MAX_LAYERS]; 150 Int m_resamplePhaseSetPresentFlag[MAX_LAYERS]; 151 #endif 138 152 #if P0312_VERT_PHASE_ADJ 139 153 Bool m_vertPhasePositionEnableFlag[MAX_LAYERS]; … … 229 243 #endif 230 244 Window& getScaledRefLayerWindow(Int x) { return m_scaledRefLayerWindow[x]; } 245 #if REF_REGION_OFFSET 246 Void setNumRefLayerOffsets(Int x) { m_numRefLayerOffsets = x; } 247 UInt getNumRefLayerOffsets() { return m_numRefLayerOffsets; } 248 Void setRefLayerId(Int x, UInt id) { m_refLayerId[x] = id; } 249 UInt getRefLayerId(Int x) { return m_refLayerId[x]; } 250 Window& getRefLayerWindowForLayer(Int layerId); 251 Window& getRefLayerWindow(Int x) { return m_refLayerWindow[x]; } 252 Bool getScaledRefLayerOffsetPresentFlag(Int x) { return m_scaledRefLayerOffsetPresentFlag[x]; } 253 Void setScaledRefLayerOffsetPresentFlag(Int x, Bool b) { m_scaledRefLayerOffsetPresentFlag[x] = b; } 254 Bool getRefRegionOffsetPresentFlag(Int x) { return m_refRegionOffsetPresentFlag[x]; } 255 Void setRefRegionOffsetPresentFlag(Int x, Bool b) { m_refRegionOffsetPresentFlag[x] = b; } 256 #endif 231 257 #if P0312_VERT_PHASE_ADJ 232 258 Void setVertPhasePositionEnableFlag(Int x, Bool b) { m_vertPhasePositionEnableFlag[x] = b; } 233 259 UInt getVertPhasePositionEnableFlag(Int x) { return m_vertPhasePositionEnableFlag[x]; } 260 #endif 261 #if R0209_GENERIC_PHASE 262 Int getPhaseHorLuma(Int x) { return m_phaseHorLuma[x]; } 263 Int getPhaseVerLuma(Int x) { return m_phaseVerLuma[x]; } 264 Int getPhaseHorChroma(Int x) { return m_phaseHorChroma[x]; } 265 Int getPhaseVerChroma(Int x) { return m_phaseVerChroma[x]; } 266 Void setPhaseHorLuma(Int x, Int val) { m_phaseHorLuma[x] = val; } 267 Void setPhaseVerLuma(Int x, Int val) { m_phaseVerLuma[x] = val; } 268 Void setPhaseHorChroma(Int x, Int val) { m_phaseHorChroma[x] = val; } 269 Void setPhaseVerChroma(Int x, Int val) { m_phaseVerChroma[x] = val; } 270 Bool getResamplePhaseSetPresentFlag(Int x) { return m_resamplePhaseSetPresentFlag[x]; } 271 Void setResamplePhaseSetPresentFlag(Int x, Bool b) { m_resamplePhaseSetPresentFlag[x] = b; } 234 272 #endif 235 273
Note: See TracChangeset for help on using the changeset viewer.