Changeset 93 in 3DVCSoftware
- Timestamp:
- 25 Jul 2012, 01:59:28 (12 years ago)
- Location:
- branches/HTM-3.1-Qualcomm
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/CommonDef.h
r91 r93 130 130 #if ( HHI_INTER_VIEW_MOTION_PRED || HHI_INTER_VIEW_RESIDUAL_PRED ) 131 131 #define DEPTH_MAP_GENERATION 1 132 #define PDM_REMOVE_DEPENDENCE 1 //bug-fix for DMDV JCT2-A0095 132 133 #else 133 134 #define DEPTH_MAP_GENERATION 0 -
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 ) -
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComDepthMapGenerator.h
r91 r93 176 176 Bool xPredictDepthMap ( TComPic* pcPic ); 177 177 Bool xFillDepthMapHoles ( TComPic* pcPic ); 178 Void xClearDepthMap ( TComPic* pcPic, Int iVal = PDM_UNDEFINED_DEPTH ); 178 Void xClearDepthMap ( TComPic* pcPic, Int iVal = PDM_UNDEFINED_DEPTH 179 #if PDM_REMOVE_DEPENDENCE 180 , 181 Int forFirstNonBaseView = 0 182 #endif 183 ); 179 184 Void xSetChroma ( TComPicYuv* pcPic, Int iVal ); 180 185 -
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComPic.cpp
r56 r93 55 55 #if DEPTH_MAP_GENERATION 56 56 m_pcPredDepthMap = NULL; 57 #if PDM_REMOVE_DEPENDENCE 58 m_pcPredDepthMap_temp = NULL; 59 #endif 57 60 #endif 58 61 #if HHI_INTER_VIEW_MOTION_PRED … … 136 139 m_pcPredDepthMap = NULL; 137 140 } 141 #if PDM_REMOVE_DEPENDENCE 142 if( m_pcPredDepthMap_temp ) // estimated depth map 143 { 144 m_pcPredDepthMap_temp->destroy(); 145 delete m_pcPredDepthMap_temp; 146 m_pcPredDepthMap_temp = NULL; 147 } 148 #endif 138 149 #endif 139 150 #if HHI_INTER_VIEW_MOTION_PRED … … 179 190 m_pcPredDepthMap = new TComPicYuv; 180 191 m_pcPredDepthMap ->create( iWidth >> uiSubSampExpX, iHeight >> uiSubSampExpY, uiMaxCuWidth >> uiSubSampExpX, uiMaxCuHeight >> uiSubSampExpY, uiMaxCuDepth ); 192 #if PDM_REMOVE_DEPENDENCE 193 m_pcPredDepthMap_temp = new TComPicYuv; 194 m_pcPredDepthMap_temp ->create( iWidth >> uiSubSampExpX, iHeight >> uiSubSampExpY, uiMaxCuWidth >> uiSubSampExpX, uiMaxCuHeight >> uiSubSampExpY, uiMaxCuDepth ); 195 #endif 181 196 } 182 197 #endif … … 224 239 m_pcPredDepthMap = NULL; 225 240 } 241 #if PDM_REMOVE_DEPENDENCE 242 if(m_pcPredDepthMap_temp) 243 { 244 m_pcPredDepthMap_temp->destroy(); 245 delete m_pcPredDepthMap_temp; 246 m_pcPredDepthMap_temp = NULL; 247 } 248 #endif 226 249 } 227 250 #endif -
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComPic.h
r91 r93 67 67 #if DEPTH_MAP_GENERATION 68 68 TComPicYuv* m_pcPredDepthMap; // estimated depth map 69 #if PDM_REMOVE_DEPENDENCE 70 TComPicYuv* m_pcPredDepthMap_temp; // estimated depth map 71 Bool m_bPDMV2; 72 #endif 69 73 #endif 70 74 … … 139 143 #if DEPTH_MAP_GENERATION 140 144 TComPicYuv* getPredDepthMap() { return m_pcPredDepthMap; } 141 #endif 142 145 #if PDM_REMOVE_DEPENDENCE 146 TComPicYuv* getPredDepthMapTemp() { return m_pcPredDepthMap_temp; } 147 Void setStoredPDMforV2(Bool flag) { m_bPDMV2 = flag;} 148 Bool getStoredPDMforV2() { return m_bPDMV2;} 149 #endif 150 151 #endif 143 152 #if HHI_INTER_VIEW_MOTION_PRED 144 153 TComPicYuv* getOrgDepthMap() { return m_pcOrgDepthMap; } -
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComPrediction.cpp
r56 r93 569 569 { 570 570 UInt uiRShift = 0; 571 #if PDM_REMOVE_DEPENDENCE 572 if(pcCU->getPic()->getStoredPDMforV2()==1) 573 xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPredDepthMapTemp(), uiPartAddr, &cMv, iWidth, iHeight, uiSubSampExpX, uiSubSampExpY, rpcYuvPred, uiRShift, 0 ); 574 else 575 #endif 571 576 xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPredDepthMap(), uiPartAddr, &cMv, iWidth, iHeight, uiSubSampExpX, uiSubSampExpY, rpcYuvPred, uiRShift, 0 ); 572 577 return; -
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TypeDef.h
r91 r93 47 47 #define HHI_INTER_VIEW_RESIDUAL_PRED 1 // inter-view residual prediction 48 48 #define HHI_FIX 1 // inter-view prediction and other fixes 49 #define QC_MULTI_DIS_CAN 1 49 #define QC_MULTI_DIS_CAN 1 // JCT2-A0097 50 50 #if QC_MULTI_DIS_CAN 51 51 #define DIS_CANS 1
Note: See TracChangeset for help on using the changeset viewer.