Changeset 93 in 3DVCSoftware for branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComDepthMapGenerator.cpp
- Timestamp:
- 25 Jul 2012, 01:59:28 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComDepthMapGenerator.cpp
r91 r93 167 167 m_bPDMAvailable = false; 168 168 m_uiCurrViewId = pcPic->getSPS()->getViewId(); 169 169 #if PDM_REMOVE_DEPENDENCE 170 pcPic->setStoredPDMforV2(0); 171 #endif 170 172 // update SPS list and AU pic list and set depth map generator in SPS 171 173 #if VIDYO_VPS_INTEGRATION … … 225 227 if( m_uiCurrViewId ) 226 228 { 229 #if PDM_REMOVE_DEPENDENCE 230 UInt uiBaseVId = m_auiBaseIdList[0]; 231 #else 227 232 Bool bCheckVId1 = ( m_uiCurrViewId > 1 && m_auiBaseIdList[0] == 0 ); 228 233 UInt uiBaseVId = ( bCheckVId1 ? 1 : m_auiBaseIdList[0] ); 234 #endif 229 235 TComPic* pcBasePic = m_pcAUPicAccess->getPic( uiBaseVId ); 230 236 SliceType eSliceType = pcBasePic->getCurrSlice()->getSliceType(); … … 417 423 pcBasePic->addPrdDepthMapBuffer( PDM_SUB_SAMP_EXP_X(m_pcSPSAccess->getPdm()), PDM_SUB_SAMP_EXP_Y(m_pcSPSAccess->getPdm()) ); 418 424 xClearDepthMap( pcBasePic ); 425 #if PDM_REMOVE_DEPENDENCE 426 xClearDepthMap( pcBasePic, PDM_UNDEFINED_DEPTH, 1 ); 427 #endif 419 428 } 420 429 #if PDM_OUTPUT_PRED_DEPTH_MAP … … 461 470 { 462 471 xClearDepthMap( pcPic ); 472 #if PDM_REMOVE_DEPENDENCE 473 xClearDepthMap( pcPic, PDM_UNDEFINED_DEPTH, 1 ); 474 #endif 463 475 } 464 476 return bUndefined; … … 482 494 483 495 // predict depth map using current coding symbols 496 #if PDM_REMOVE_DEPENDENCE 497 pcPic->setStoredPDMforV2(0); 498 xPredictDepthMap( pcPic ); 499 if(m_uiCurrViewId==0) 500 { 501 pcPic->setStoredPDMforV2(1); 502 xPredictDepthMap( pcPic ); 503 pcPic->setStoredPDMforV2(0); 504 } 505 #else 484 506 xPredictDepthMap( pcPic ); 485 507 #if PDM_OUTPUT_PRED_DEPTH_MAP … … 488 510 dumpDepthMap( pcPic, acFilenameBase ); 489 511 } 512 #endif 490 513 #endif 491 514 … … 500 523 #endif 501 524 } 525 #if PDM_REMOVE_DEPENDENCE 526 if( m_uiCurrViewId == 2 ) 527 { 528 TComPic* pcBasePic = m_pcAUPicAccess->getPic( 0 ); 529 AOF( pcBasePic ); 530 xConvertDepthMapCurr2Ref( pcBasePic, pcPic ); 531 #if PDM_OUTPUT_PRED_DEPTH_MAP 532 dumpDepthMap( pcBasePic, acFilenameBase ); 533 #endif 534 } 535 #endif 502 536 } 503 537 … … 520 554 Int iSrcStride = pcPicYuv->getStride (); 521 555 Int iDstStride = m_cTmpPic.getStride (); 556 #if PDM_REMOVE_DEPENDENCE 557 if(pcPic->getStoredPDMforV2()) 558 pcPicYuv = pcPic->getPredDepthMapTemp(); 559 #endif 522 560 Pel* pSrcSamples = pcPicYuv->getLumaAddr ( 0 ); 523 561 Pel* pDstSamples = m_cTmpPic.getLumaAddr ( 0 ); … … 767 805 //--- get base CU/PU and check prediction mode --- 768 806 UInt uiBaseId = m_auiBaseIdList[ uiBId ]; 807 #if PDM_REMOVE_DEPENDENCE 808 if( uiBaseId != 0) 809 continue; 810 #endif 769 811 TComPic* pcBasePic = m_pcAUPicAccess->getPic( uiBaseId ); 770 812 TComPicYuv* pcBasePdm = pcBasePic->getPredDepthMap(); … … 864 906 AOF( pcRef->getPredDepthMap()->getWidth () == pcCur->getPredDepthMap()->getWidth () ); 865 907 AOF( pcRef->getPredDepthMap()->getHeight() == pcCur->getPredDepthMap()->getHeight() ); 866 908 #if PDM_REMOVE_DEPENDENCE 909 if( pcCur->getViewId() == 1) 910 xClearDepthMap( pcRef ); 911 else if (pcCur->getViewId() == 2) 912 xClearDepthMap( pcRef, PDM_UNDEFINED_DEPTH, 1 ); 913 #else 867 914 xClearDepthMap( pcRef ); 915 #endif 868 916 TComPicYuv* pcCurDepthMap = pcCur->getPredDepthMap (); 869 917 TComPicYuv* pcRefDepthMap = pcRef->getPredDepthMap (); … … 875 923 Pel* pRefSamples = pcRefDepthMap->getLumaAddr( 0 ); 876 924 Int iRefViewIdx = pcRef->getViewId(); 925 #if PDM_REMOVE_DEPENDENCE 926 if( pcCur->getViewId() == 2) 927 { 928 pcRefDepthMap = pcRef->getPredDepthMapTemp(); 929 pRefSamples = pcRefDepthMap->getLumaAddr( 0 ); 930 } 931 #endif 877 932 Int iShiftX = m_uiSubSampExpX + 2; 878 933 Int iAddX = ( 1 << iShiftX ) >> 1; … … 903 958 AOF( pcCur->getSPS()->getViewId() > pcRef->getSPS()->getViewId() ); 904 959 AOF( pcCur->getPredDepthMap() ); 960 #if PDM_REMOVE_DEPENDENCE 961 if(pcCur->getViewId() == 1) 962 { 963 AOF( pcRef->getPredDepthMap() ); 964 }else 965 { 966 AOF( pcRef->getPredDepthMapTemp() ); 967 } 968 #else 905 969 AOF( pcRef->getPredDepthMap() ); 970 #endif 906 971 AOF( pcRef->getPredDepthMap()->getWidth () == pcCur->getPredDepthMap()->getWidth () ); 907 972 AOF( pcRef->getPredDepthMap()->getHeight() == pcCur->getPredDepthMap()->getHeight() ); … … 909 974 xClearDepthMap( pcCur ); 910 975 TComPicYuv* pcRefDepthMap = pcRef->getPredDepthMap (); 976 #if PDM_REMOVE_DEPENDENCE 977 if(pcCur->getViewId() == 2) 978 pcRefDepthMap = pcRef->getPredDepthMapTemp (); 979 #endif 911 980 TComPicYuv* pcCurDepthMap = pcCur->getPredDepthMap (); 912 981 Int iWidth = pcRefDepthMap->getWidth (); … … 948 1017 } 949 1018 Bool bUndefined = xFillDepthMapHoles( pcPic ); 1019 #if PDM_REMOVE_DEPENDENCE 1020 if(pcPic->getStoredPDMforV2() == 1){ 1021 pcPic->getPredDepthMapTemp()->setBorderExtension( false ); 1022 pcPic->getPredDepthMapTemp()->extendPicBorder (); 1023 }else{ 1024 #endif 950 1025 pcPic->getPredDepthMap()->setBorderExtension( false ); 951 1026 pcPic->getPredDepthMap()->extendPicBorder (); 1027 #if PDM_REMOVE_DEPENDENCE 1028 } 1029 #endif 952 1030 return bUndefined; 953 1031 } … … 959 1037 Bool bUndefined = false; 960 1038 TComPicYuv* pcDepthMap = pcPic->getPredDepthMap (); 1039 #if PDM_REMOVE_DEPENDENCE 1040 if(pcPic->getViewId()==0 && pcPic->getStoredPDMforV2()==1) 1041 pcDepthMap = pcPic->getPredDepthMapTemp (); 1042 #endif 961 1043 Int iWidth = pcDepthMap->getWidth (); 962 1044 Int iHeight = pcDepthMap->getHeight (); … … 1017 1099 1018 1100 Void 1019 TComDepthMapGenerator::xClearDepthMap( TComPic* pcPic, Int iVal ) 1101 TComDepthMapGenerator::xClearDepthMap( TComPic* pcPic, Int iVal 1102 #if PDM_REMOVE_DEPENDENCE 1103 , 1104 Int forFirstNonBaseView 1105 #endif 1106 ) 1020 1107 { 1021 1108 TComPicYuv* pcDepthMap = pcPic->getPredDepthMap (); … … 1024 1111 Int iStride = pcDepthMap->getStride (); 1025 1112 Pel* pDMSamples = pcDepthMap->getLumaAddr ( 0 ); 1113 #if PDM_REMOVE_DEPENDENCE 1114 if( forFirstNonBaseView == 1) 1115 { 1116 pcDepthMap = pcPic->getPredDepthMapTemp (); 1117 pDMSamples = pcDepthMap->getLumaAddr ( 0 ); 1118 } 1119 #endif 1026 1120 for( Int iY = 0; iY < iHeight; iY++, pDMSamples += iStride ) 1027 1121 { … … 1093 1187 TComYuv* pcSubDM = m_ppcYuv[ uiDepth ]; 1094 1188 TComPicYuv* pcPicDM = pcCU->getPic()->getPredDepthMap(); 1189 #if PDM_REMOVE_DEPENDENCE 1190 if( pcCU->getPic()->getStoredPDMforV2() == 1) 1191 pcPicDM = pcCU->getPic()->getPredDepthMapTemp(); 1192 #endif 1095 1193 UInt uiCUAddr = pcCU->getAddr(); 1096 1194 pcSubCU->copySubCU( pcCU, uiAbsPartIdx, uiDepth ); … … 1179 1277 UInt uiZOrderIdx = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 1180 1278 Pel* pPicDepthMap = pcCU->getPic()->getPredDepthMap()->getLumaAddr( pcCU->getAddr(), uiZOrderIdx ); 1279 #if PDM_REMOVE_DEPENDENCE 1280 if(pcCU->getPic()->getStoredPDMforV2()==1) 1281 pPicDepthMap = pcCU->getPic()->getPredDepthMapTemp()->getLumaAddr( pcCU->getAddr(), uiZOrderIdx ); 1282 #endif 1181 1283 Int iPicStride = pcCU->getPic()->getPredDepthMap()->getStride (); 1182 1284 for( UInt uiY = 0; uiY < uiHeight; uiY++, pDepthMap += uiStride, pPicDepthMap += iPicStride )
Note: See TracChangeset for help on using the changeset viewer.