Changeset 1196 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComDataCU.cpp
- Timestamp:
- 4 May 2015, 17:47:40 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r1179 r1196 60 60 61 61 m_skipFlag = NULL; 62 #if SEC_DEPTH_INTRA_SKIP_MODE_K003362 #if H_3D 63 63 m_bDISFlag = NULL; 64 64 m_uiDISType = NULL; 65 #else66 #if H_3D_SINGLE_DEPTH67 m_singleDepthFlag = NULL;68 m_apSingleDepthValue = NULL;69 #endif70 65 #endif 71 66 m_pePartSize = NULL; … … 158 153 m_pbDBBPFlag = NULL; 159 154 #endif 160 161 155 } 162 156 … … 186 180 187 181 m_skipFlag = new Bool[ uiNumPartition ]; 188 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033182 #if H_3D 189 183 m_bDISFlag = new Bool[ uiNumPartition ]; 190 184 m_uiDISType = (UInt*)xMalloc(UInt, uiNumPartition); 191 #else192 #if H_3D_SINGLE_DEPTH193 m_singleDepthFlag = new Bool[ uiNumPartition ];194 m_apSingleDepthValue = (Pel*)xMalloc(Pel, uiNumPartition);195 #endif196 185 #endif 197 186 m_pePartSize = new Char[ uiNumPartition ]; … … 337 326 338 327 if ( m_skipFlag ) { delete[] m_skipFlag; m_skipFlag = NULL; } 339 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033328 #if H_3D 340 329 if ( m_bDISFlag ) { delete[] m_bDISFlag; m_bDISFlag = NULL; } 341 330 if ( m_uiDISType ) { xFree(m_uiDISType); m_uiDISType = NULL; } 342 #else343 #if H_3D_SINGLE_DEPTH344 if ( m_singleDepthFlag ) { delete[] m_singleDepthFlag; m_singleDepthFlag = NULL; }345 if ( m_apSingleDepthValue ) { xFree(m_apSingleDepthValue); m_apSingleDepthValue = NULL; }346 #endif347 331 #endif 348 332 if ( m_pePartSize ) { delete[] m_pePartSize; m_pePartSize = NULL; } … … 506 490 TComDataCU * pcFrom = pcPic->getCU(getAddr()); 507 491 m_skipFlag[ui] = pcFrom->getSkipFlag(ui); 508 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033492 #if H_3D 509 493 m_bDISFlag[ui] = pcFrom->getDISFlag(ui); 510 494 m_uiDISType[ui] = pcFrom->getDISType(ui); 511 #else512 #if H_3D_SINGLE_DEPTH513 m_singleDepthFlag[ui] = pcFrom->getSingleDepthFlag(ui);514 m_apSingleDepthValue[ui] = pcFrom->getSingleDepthValue(ui);515 #endif516 495 #endif 517 496 m_pePartSize[ui] = pcFrom->getPartitionSize(ui); … … 566 545 { 567 546 memset( m_skipFlag + firstElement, false, numElements * sizeof( *m_skipFlag ) ); 568 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033547 #if H_3D 569 548 memset( m_bDISFlag + firstElement, false, numElements * sizeof( *m_bDISFlag ) ); 570 549 memset( m_uiDISType + firstElement, 0, numElements * sizeof( *m_uiDISType) ); 571 #else572 #if H_3D_SINGLE_DEPTH573 memset( m_singleDepthFlag + firstElement, false, numElements * sizeof( *m_singleDepthFlag ) );574 memset( m_apSingleDepthValue + firstElement, 0, numElements * sizeof( *m_apSingleDepthValue ) );575 #endif576 550 #endif 577 551 memset( m_pePartSize + firstElement, SIZE_NONE, numElements * sizeof( *m_pePartSize ) ); … … 758 732 m_puhTransformSkip[2][ui] = 0; 759 733 m_skipFlag[ui] = false; 760 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033734 #if H_3D 761 735 m_bDISFlag[ui] = false; 762 736 m_uiDISType[ui] = 0; 763 #else764 #if H_3D_SINGLE_DEPTH765 m_singleDepthFlag[ui] = false;766 m_apSingleDepthValue[ui] = 0;767 #endif768 737 #endif 769 738 m_pePartSize[ui] = SIZE_NONE; … … 891 860 memset( m_puhCbf[2], 0, iSizeInUchar ); 892 861 memset( m_puhDepth, uiDepth, iSizeInUchar ); 893 #if H_3D_NBDV && !SEC_ARP_REM_ENC_RESTRICT_K0035894 m_pDvInfo->bDV = false;895 #endif896 862 #if H_3D_ARP 897 863 memset( m_puhARPW, 0, iSizeInUchar ); … … 934 900 { 935 901 m_skipFlag[ui] = false; 936 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033902 #if H_3D 937 903 m_bDISFlag[ui] = false; 938 904 m_uiDISType[ui] = 0; 939 #else940 #if H_3D_SINGLE_DEPTH941 m_singleDepthFlag[ui] = false;942 m_apSingleDepthValue[ui]= 0;943 #endif944 905 #endif 945 906 m_pePartSize[ui] = SIZE_NONE; … … 964 925 m_puhTransformSkip[2][ui] = pcCU->getTransformSkip(uiPartOffset+ui,TEXT_CHROMA_V); 965 926 m_skipFlag[ui] = pcCU->getSkipFlag(uiPartOffset+ui); 966 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033927 #if H_3D 967 928 m_bDISFlag[ui] = pcCU->getDISFlag(uiPartOffset+ui); 968 929 m_uiDISType[ui] = pcCU->getDISType(uiPartOffset+ui); 969 #else970 #if H_3D_SINGLE_DEPTH971 m_singleDepthFlag[ui] = pcCU->getSingleDepthFlag(uiPartOffset+ui);972 m_apSingleDepthValue[ui] = pcCU->getSingleDepthValue(uiPartOffset+ui);973 #endif974 930 #endif 975 931 m_pePartSize[ui] = pcCU->getPartitionSize(uiPartOffset+ui); … … 1000 956 m_pbICFlag [ui] = pcCU->m_pbICFlag[uiPartOffset+ui]; 1001 957 #endif 1002 1003 1004 958 #if H_3D_DIM 1005 959 for( Int i = 0; i < DIM_NUM_TYPE; i++ ) … … 1118 1072 1119 1073 m_skipFlag=pcCU->getSkipFlag() + uiPart; 1120 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331074 #if H_3D 1121 1075 m_bDISFlag = pcCU->getDISFlag() + uiPart; 1122 1076 m_uiDISType = pcCU->getDISType() + uiPart; 1123 #else1124 #if H_3D_SINGLE_DEPTH1125 m_singleDepthFlag = pcCU->getSingleDepthFlag() + uiPart;1126 m_apSingleDepthValue = pcCU->getSingleDepthValue() + uiPart;1127 #endif1128 1077 #endif 1129 1078 m_phQP=pcCU->getQP() + uiPart; … … 1143 1092 m_pbSPIVMPFlag = pcCU->getSPIVMPFlag() + uiPart; 1144 1093 #endif 1145 1146 1094 #if H_3D_ARP 1147 1095 m_puhARPW = pcCU->getARPW() + uiPart; … … 1150 1098 m_pbICFlag = pcCU->getICFlag() + uiPart; 1151 1099 #endif 1152 1153 1154 1100 m_puhLumaIntraDir = pcCU->getLumaIntraDir() + uiPart; 1155 1101 m_puhChromaIntraDir = pcCU->getChromaIntraDir() + uiPart; … … 1260 1206 1261 1207 m_skipFlag = pcCU->getSkipFlag () + uiAbsPartIdx; 1262 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331208 #if H_3D 1263 1209 m_bDISFlag = pcCU->getDISFlag () + uiAbsPartIdx; 1264 1210 m_uiDISType = pcCU->getDISType() + uiAbsPartIdx; 1265 #else1266 #if H_3D_SINGLE_DEPTH1267 m_singleDepthFlag = pcCU->getSingleDepthFlag () + uiAbsPartIdx;1268 m_apSingleDepthValue = pcCU->getSingleDepthValue () + uiAbsPartIdx;1269 #endif1270 1211 #endif 1271 1212 m_pePartSize = pcCU->getPartitionSize () + uiAbsPartIdx; … … 1295 1236 #endif 1296 1237 #if H_3D_SPIVMP 1297 m_pbSPIVMPFlag = pcCU->getSPIVMPFlag() + uiAbsPartIdx; 1298 #endif 1299 1238 m_pbSPIVMPFlag = pcCU->getSPIVMPFlag() + uiAbsPartIdx; 1239 #endif 1300 1240 m_apiMVPIdx[eRefPicList] = pcCU->getMVPIdx(eRefPicList) + uiAbsPartIdx; 1301 m_apiMVPNum[eRefPicList] = pcCU->getMVPNum(eRefPicList) + uiAbsPartIdx; 1302 1241 m_apiMVPNum[eRefPicList] = pcCU->getMVPNum(eRefPicList) + uiAbsPartIdx; 1303 1242 #if H_3D_ARP 1304 1243 m_puhARPW = pcCU->getARPW() + uiAbsPartIdx; 1305 #endif 1306 1307 1244 #endif 1308 1245 #if H_3D_DBBP 1309 1246 m_pbDBBPFlag = pcCU->getDBBPFlag() + uiAbsPartIdx; … … 1340 1277 Int sizeInChar = sizeof( Char ) * uiNumPartition; 1341 1278 memcpy( m_skipFlag + uiOffset, pcCU->getSkipFlag(), sizeof( *m_skipFlag ) * uiNumPartition ); 1342 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331279 #if H_3D 1343 1280 memcpy( m_bDISFlag + uiOffset, pcCU->getDISFlag(), sizeof( *m_bDISFlag ) * uiNumPartition ); 1344 1281 memcpy( m_uiDISType + uiOffset, pcCU->getDISType(), sizeof( *m_uiDISType ) * uiNumPartition); 1345 #else1346 #if H_3D_SINGLE_DEPTH1347 memcpy( m_singleDepthFlag + uiOffset, pcCU->getSingleDepthFlag(), sizeof( *m_singleDepthFlag ) * uiNumPartition );1348 memcpy( m_apSingleDepthValue + uiOffset, pcCU->getSingleDepthValue(), sizeof( *m_apSingleDepthValue ) * uiNumPartition);1349 #endif1350 1282 #endif 1351 1283 memcpy( m_phQP + uiOffset, pcCU->getQP(), sizeInChar ); … … 1358 1290 memcpy( m_piVSPFlag + uiOffset, pcCU->getVSPFlag(), sizeof( Char ) * uiNumPartition ); 1359 1291 memcpy( m_pDvInfo + uiOffset, pcCU->getDvInfo(), sizeof( *m_pDvInfo ) * uiNumPartition ); 1360 1361 1292 #endif 1362 1293 #if H_3D_SPIVMP … … 1374 1305 memcpy( m_puhCbf[1] + uiOffset, pcCU->getCbf(TEXT_CHROMA_U), iSizeInUchar ); 1375 1306 memcpy( m_puhCbf[2] + uiOffset, pcCU->getCbf(TEXT_CHROMA_V), iSizeInUchar ); 1376 1377 1378 1379 1307 #if H_3D_DIM 1380 1308 for( Int i = 0; i < DIM_NUM_TYPE; i++ ) … … 1465 1393 1466 1394 memcpy( rpcCU->getSkipFlag() + m_uiAbsIdxInLCU, m_skipFlag, sizeof( *m_skipFlag ) * m_uiNumPartition ); 1467 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331395 #if H_3D 1468 1396 memcpy( rpcCU->getDISFlag() + m_uiAbsIdxInLCU, m_bDISFlag, sizeof( *m_bDISFlag ) * m_uiNumPartition ); 1469 1397 memcpy( rpcCU->getDISType() + m_uiAbsIdxInLCU, m_uiDISType, sizeof( *m_uiDISType ) * m_uiNumPartition ); 1470 #else1471 #if H_3D_SINGLE_DEPTH1472 memcpy( rpcCU->getSingleDepthFlag() + m_uiAbsIdxInLCU, m_singleDepthFlag, sizeof( *m_singleDepthFlag ) * m_uiNumPartition );1473 memcpy( rpcCU->getSingleDepthValue() + m_uiAbsIdxInLCU, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * m_uiNumPartition);1474 #endif1475 1398 #endif 1476 1399 memcpy( rpcCU->getQP() + m_uiAbsIdxInLCU, m_phQP, sizeInChar ); … … 1478 1401 memcpy( rpcCU->getDvInfo() + m_uiAbsIdxInLCU, m_pDvInfo, sizeof(* m_pDvInfo) * m_uiNumPartition ); 1479 1402 #endif 1480 1481 1482 1403 memcpy( rpcCU->getPartitionSize() + m_uiAbsIdxInLCU, m_pePartSize, sizeof( *m_pePartSize ) * m_uiNumPartition ); 1483 1404 memcpy( rpcCU->getPredictionMode() + m_uiAbsIdxInLCU, m_pePredMode, sizeof( *m_pePredMode ) * m_uiNumPartition ); … … 1585 1506 Int sizeInChar = sizeof( Char ) * uiQNumPart; 1586 1507 memcpy( rpcCU->getSkipFlag() + uiPartOffset, m_skipFlag, sizeof( *m_skipFlag ) * uiQNumPart ); 1587 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331508 #if H_3D 1588 1509 memcpy( rpcCU->getDISFlag() + uiPartOffset, m_bDISFlag, sizeof( *m_bDISFlag ) * uiQNumPart ); 1589 1510 memcpy( rpcCU->getDISType() + uiPartOffset, m_uiDISType, sizeof( *m_uiDISType ) * uiQNumPart ); 1590 #else1591 #if H_3D_SINGLE_DEPTH1592 memcpy( rpcCU->getSingleDepthFlag() + uiPartOffset, m_singleDepthFlag, sizeof( *m_singleDepthFlag ) * uiQNumPart );1593 memcpy( rpcCU->getSingleDepthValue() + uiPartOffset, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * uiQNumPart);1594 #endif1595 1511 #endif 1596 1512 memcpy( rpcCU->getQP() + uiPartOffset, m_phQP, sizeInChar ); … … 1616 1532 memcpy( rpcCU->getCbf(TEXT_CHROMA_U) + uiPartOffset, m_puhCbf[1], iSizeInUchar ); 1617 1533 memcpy( rpcCU->getCbf(TEXT_CHROMA_V) + uiPartOffset, m_puhCbf[2], iSizeInUchar ); 1618 1619 1620 1534 #if H_3D_DIM 1621 1535 for( Int i = 0; i < DMM_NUM_TYPE; i++ ) … … 2352 2266 { 2353 2267 return NULL; 2354 } 2355 2268 } 2356 2269 #if H_3D_FCO 2357 2270 TComPic* depthPic = getSlice()->getIvPic(true, getSlice()->getViewIndex() ); … … 2388 2301 Int iPictureHeight = depthPicYuv->getHeight(); 2389 2302 2390 #if !HS_DBBP_CLEAN_K00482391 Int iWidth = uiWidth;2392 Int iHeight = uiHeight;2393 #endif2394 2303 2395 2304 Bool depthRefineFlag = false; … … 2404 2313 } 2405 2314 2406 #if HS_DBBP_CLEAN_K00482407 2315 Int depthPosX = Clip3(0, iPictureWidth - 1, iBlkX + ((cDv.getHor()+2)>>2)); 2408 2316 Int depthPosY = Clip3(0, iPictureHeight - 1, iBlkY + ((cDv.getVer()+2)>>2)); 2409 #else2410 Int depthPosX = Clip3(0, iPictureWidth - iWidth, iBlkX + ((cDv.getHor()+2)>>2));2411 Int depthPosY = Clip3(0, iPictureHeight- iHeight, iBlkY + ((cDv.getVer()+2)>>2));2412 #endif2413 2317 2414 2318 pDepthPels = depthPicYuv->getLumaAddr() + depthPosX + depthPosY * uiDepthStride; … … 2500 2404 memset( m_skipFlag + absPartIdx, skip, m_pcPic->getNumPartInCU() >> ( 2 * depth ) ); 2501 2405 } 2502 2503 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2406 #if H_3D 2504 2407 Void TComDataCU::setDISFlagSubParts( Bool bDIS, UInt absPartIdx, UInt depth ) 2505 2408 { … … 2512 2415 setSubPartT( uiDISType, m_uiDISType, uiAbsPartIdx, uiDepth, uiPUIdx ); 2513 2416 } 2514 #else2515 #if H_3D_SINGLE_DEPTH2516 Void TComDataCU::setSingleDepthFlagSubParts( Bool singleDepth, UInt absPartIdx, UInt depth )2517 {2518 assert( sizeof( *m_singleDepthFlag) == 1 );2519 memset( m_singleDepthFlag + absPartIdx, singleDepth, m_pcPic->getNumPartInCU() >> ( 2 * depth ) );2520 }2521 2522 Void TComDataCU::setSingleDepthValueSubParts(Pel singleDepthValue, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth )2523 {2524 setSubPartT<Pel>( singleDepthValue, m_apSingleDepthValue, uiAbsPartIdx, uiDepth, uiPUIdx );2525 }2526 #endif2527 2417 #endif 2528 2418 … … 3941 3831 #endif 3942 3832 #if H_3D_ARP 3943 Bool bARPFlag = getARPW(uiAbsPartIdx) >0 ? true : false;3833 Bool bARPFlag = getARPW(uiAbsPartIdx) > 0; 3944 3834 #endif 3945 3835 #if H_3D_DBBP … … 3974 3864 m_mergCands[MRG_A1].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 3975 3865 #if H_3D_VSP 3976 , 3977 (pcCULeft->getVSPFlag(uiLeftPartIdx) != 0 3866 , (pcCULeft->getVSPFlag(uiLeftPartIdx) != 0 3978 3867 #if H_3D_IC 3979 3868 && !bICFlag … … 3998 3887 m_mergCands[MRG_B1].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 3999 3888 #if H_3D_VSP 4000 , 4001 false 3889 , false 4002 3890 #endif 4003 3891 , false … … 4026 3914 m_mergCands[MRG_A0].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 4027 3915 #if H_3D_VSP 4028 , 4029 false 3916 , false 4030 3917 #endif 4031 3918 , false … … 4040 3927 m_mergCands[MRG_B2].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 4041 3928 #if H_3D_VSP 4042 , 4043 false 3929 , false 4044 3930 #endif 4045 3931 , false … … 4068 3954 TComPic * pcTexPic = m_pcSlice->getTexturePic(); 4069 3955 #if H_3D_FCO 4070 #if H_3D_FCO4071 3956 if (pcTexPic && pcTexPic->getReconMark()) 4072 #else4073 if (pcTexturePic->getReconMark())4074 #endif4075 3957 { 4076 3958 #endif … … 4107 3989 Int iTexPosX, iTexPosY; 4108 3990 const TComMv cMvRounding( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 4109 3991 4110 3992 Int iCenterPosX = iCurrPosX + ( ( iWidth / iPUWidth ) >> 1 ) * iPUWidth + ( iPUWidth >> 1 ); 4111 3993 Int iCenterPosY = iCurrPosY + ( ( iHeight / iPUHeight ) >> 1 ) * iPUHeight + (iPUHeight >> 1); … … 4114 3996 if(iWidth == iPUWidth && iHeight == iPUHeight) 4115 3997 { 4116 4117 3998 iCenterPosX = iCurrPosX + (iWidth >> 1); 3999 iCenterPosY = iCurrPosY + (iHeight >> 1); 4118 4000 } 4119 4001 … … 4151 4033 if ( bSPIVMPFlag == true ) 4152 4034 { 4153 4154 4155 4156 4035 iInterDirSaved = (cMvFieldSaved[0].getRefIdx()!=-1 ? 1: 0) + (cMvFieldSaved[1].getRefIdx()!=-1 ? 2: 0); 4036 tmpDir = iInterDirSaved; 4037 tmpMV[0] = cMvFieldSaved[0]; 4038 tmpMV[1] = cMvFieldSaved[1]; 4157 4039 } 4158 4040 … … 4180 4062 TComMv cMv = cTexMvField.getMv() + cMvRounding; 4181 4063 cMv >>=2; 4182 #if !(NTT_BUG_FIX_TK54)4183 this->clipMv( cMv );4184 #endif4185 4064 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iValidDepRef); 4186 4065 } … … 4197 4076 } 4198 4077 } 4199 #if !SHARP_SUBBLOCK_CLEAN_K00444200 if (iPUHeight + iPUWidth == 12)4201 {4202 if (puhInterDirSP[iPartition] == 3)4203 {4204 puhInterDirSP[iPartition] = 1;4205 pcMvFieldSP[2*iPartition + 1].setMvField(TComMv(0,0), -1);4206 }4207 }4208 #endif4209 4078 4210 4079 iPartition ++; … … 4309 4178 if (!bRemoveSpa) 4310 4179 { 4311 Bool SPIVMPFlag = false;4180 Bool spiMvpFlag = false; 4312 4181 if(!m_pcSlice->getIsDepth()) 4313 4182 { 4314 SPIVMPFlag = true;4183 spiMvpFlag = true; 4315 4184 } 4316 4185 #if H_3D_DBBP 4317 SPIVMPFlag &= !bDBBPFlag;4318 #endif 4319 4320 m_mergCands[MRG_IVMC].setCand( tmpMV, ivCandDir[0], false, SPIVMPFlag);4186 spiMvpFlag &= !bDBBPFlag; 4187 #endif 4188 4189 m_mergCands[MRG_IVMC].setCand( tmpMV, ivCandDir[0], false, spiMvpFlag); 4321 4190 4322 4191 if ( mrgCandIdx == iCount ) … … 5422 5291 } 5423 5292 5424 #if SONY_MV_V_CONST_C00785425 Void TComDataCU::checkM V_V(TComMv& rcMv, RefPicList eRefPicList, int iRefIdx )5293 #if H_MV 5294 Void TComDataCU::checkMvVertRest (TComMv& rcMv, RefPicList eRefPicList, int iRefIdx ) 5426 5295 { 5427 5296 if ( getSlice()->getSPS()->getInterViewMvVertConstraintFlag() ) … … 5780 5649 } 5781 5650 5782 if ( bIsCurrRefLongTerm || bIsColRefLongTerm ) // CY: this condition equals to both bIsCurrRefLongTerm and bIsColRefLongTerm being 15651 if ( bIsCurrRefLongTerm || bIsColRefLongTerm ) 5783 5652 { 5784 5653 #if H_3D_TMVP 5785 #if !H_3D_FIX_TMVP_SCALING_VIEW_ID5786 Int iCurrViewId = m_pcSlice->getViewIndex ();5787 Int iCurrRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewIndex ();5788 Int iColViewId = pColCU->getSlice()->getViewIndex();5789 Int iColRefViewId = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewIndex();5790 #else5791 5654 Int iCurrViewId = m_pcSlice->getViewId (); 5792 5655 Int iCurrRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId (); 5793 5656 Int iColViewId = pColCU->getSlice()->getViewId(); 5794 5657 Int iColRefViewId = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewId(); 5795 #endif5796 #if H_3D_TMVP_SCALING_FIX_K00535797 5658 iScale = 4096; 5798 5659 if ( iCurrRefViewId != iCurrViewId && iColViewId != iColRefViewId ) 5799 #endif 5660 { 5800 5661 iScale = xGetDistScaleFactor( iCurrViewId, iCurrRefViewId, iColViewId, iColRefViewId ); 5801 #if H_3D_TMVP_FIX_TICKET_97 5662 } 5802 5663 if ( bMRG && iScale != 4096 && m_pcSlice->getIvMvScalingFlag( ) ) 5803 #else5804 if ( iScale != 4096 && m_pcSlice->getIvMvScalingFlag( ) )5805 #endif5806 5664 { 5807 5665 rcMv = cColMv.scaleMv( iScale ); … … 5815 5673 #endif 5816 5674 } 5817 else // CY: both bIsCurrRefLongTerm and bIsColRefLongTerm are 05675 else 5818 5676 { 5819 5677 iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC); … … 5979 5837 } 5980 5838 #endif 5839 5981 5840 #if H_3D_IV_MERGE 5982 #if SEC_ARP_REM_ENC_RESTRICT_K00355983 5841 Void TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 5984 #else 5985 Bool TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 5986 #endif 5987 { 5988 5842 { 5989 5843 assert(getPartitionSize( uiPartAddr ) == SIZE_2Nx2N); 5990 5844 … … 5992 5846 if ( getSlice()->getDefaultRefViewIdxAvailableFlag() ) 5993 5847 { 5994 Int iViewIdx = getSlice()->getDefaultRefViewIdx(); 5995 pDisp->m_aVIdxCan = iViewIdx; 5996 Int iDisp = getSlice()->getDepthToDisparityB( iViewIdx )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepthY() - 1 )) ]; 5997 5998 cMv.setHor(iDisp); 5999 cMv.setVer(0); 6000 pDisp->m_acNBDV = cMv; 6001 pDisp->m_aVIdxCan = iViewIdx; 6002 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 6003 return true; 6004 #endif 6005 } 6006 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 6007 return false; 6008 #endif 6009 } 6010 #endif 6011 6012 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 5848 Int iViewIdx = getSlice()->getDefaultRefViewIdx(); 5849 pDisp->m_aVIdxCan = iViewIdx; 5850 Int iDisp = getSlice()->getDepthToDisparityB( iViewIdx )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepthY() - 1 )) ]; 5851 5852 cMv.setHor(iDisp); 5853 cMv.setVer(0); 5854 pDisp->m_acNBDV = cMv; 5855 pDisp->m_aVIdxCan = iViewIdx; 5856 } 5857 } 5858 #endif 5859 5860 #if H_3D 6013 5861 Bool TComDataCU::getNeighDepth ( UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index ) 6014 5862 { 6015 #if NEIGHBORING_PIX_AVAILABILITY_FIX6016 5863 UInt uiPartIdxLT, uiPartIdxRT; 6017 5864 this->deriveLeftRightTopIdxAdi( uiPartIdxLT, uiPartIdxRT, 0, 0 ); … … 6066 5913 6067 5914 return bDepAvail; 6068 #else 6069 Bool bDepAvail = false; 6070 Pel *pDepth = this->getPic()->getPicYuvRec()->getLumaAddr(); 6071 Int iDepStride = this->getPic()->getPicYuvRec()->getStride(); 6072 6073 Int xP, yP, nPSW, nPSH; 6074 this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH); 6075 UInt PicHeight=this->getPic()->getPicYuvRec()->getHeight(); 6076 UInt PicWidth=this->getPic()->getPicYuvRec()->getWidth(); 6077 switch(index) 6078 { 6079 case 0: // Mid Left 6080 if( ( xP != 0 ) && ( ( yP + ( nPSH >> 1 ) ) < PicHeight ) ) 6081 { 6082 *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ]; 6083 bDepAvail = true; 6084 } 6085 break; 6086 case 1: // Mid Above 6087 if( ( yP != 0 ) && ( ( xP + ( nPSW >> 1 ) ) < PicWidth ) ) 6088 { 6089 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ]; 6090 bDepAvail = true; 6091 } 6092 break; 6093 default: 6094 break; 6095 } 6096 return bDepAvail; 6097 #endif 6098 } 6099 #else 6100 #if H_3D_SINGLE_DEPTH 6101 Bool TComDataCU::getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index) 6102 { 6103 6104 Bool bDepAvail = false; 6105 Pel *pDepth = this->getPic()->getPicYuvRec()->getLumaAddr(); 6106 Int iDepStride = this->getPic()->getPicYuvRec()->getStride(); 6107 6108 Int xP, yP, nPSW, nPSH; 6109 this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH); 6110 UInt PicHeight=this->getPic()->getPicYuvRec()->getHeight(); 6111 UInt PicWidth=this->getPic()->getPicYuvRec()->getWidth(); 6112 switch(index) 6113 { 6114 case 0: // Mid Left 6115 if( ( xP != 0 ) && ( ( yP + ( nPSH >> 1 ) ) < PicHeight ) ) 6116 { 6117 *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ]; 6118 bDepAvail = true; 6119 } 6120 break; 6121 case 1: // Mid Above 6122 if( ( yP != 0 ) && ( ( xP + ( nPSW >> 1 ) ) < PicWidth ) ) 6123 { 6124 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ]; 6125 bDepAvail = true; 6126 } 6127 break; 6128 default: 6129 break; 6130 } 6131 return bDepAvail; 6132 } 6133 #endif 6134 #endif 6135 5915 } 5916 #endif 6136 5917 #if H_3D_NBDV 6137 5918 //Notes from QC: … … 6139 5920 //TBD#2: set of DvMCP values need to be done as part of inter-view motion prediction process. Remove this comment once merge related integration is done 6140 5921 //To be checked: Parallel Merge features for NBDV, related to DV_DERIVATION_PARALLEL_B0096 and LGE_IVMP_PARALLEL_MERGE_B0136 are not integrated. The need of these features due to the adoption of CU-based NBDV is not clear. We need confirmation on this, especially by proponents 6141 #if SEC_ARP_REM_ENC_RESTRICT_K00356142 5922 Void TComDataCU::getDisMvpCandNBDV( DisInfo* pDInfo 6143 #else6144 Bool TComDataCU::getDisMvpCandNBDV( DisInfo* pDInfo6145 #endif6146 5923 #if H_3D_NBDV_REF 6147 5924 , Bool bDepthRefine … … 6151 5928 //// ******* Init variables ******* ///// 6152 5929 // Init disparity struct for results 6153 #if !SEC_ARP_REM_ENC_RESTRICT_K00356154 pDInfo->bDV = false;6155 #endif6156 5930 pDInfo->m_aVIdxCan = -1; 6157 5931 … … 6217 5991 if( bCheck ) 6218 5992 { 6219 #if !(NTT_BUG_FIX_TK54)6220 clipMv(cColMv);6221 #endif6222 5993 pDInfo->m_acNBDV = cColMv; 6223 5994 pDInfo->m_aVIdxCan = iTargetViewIdx; … … 6239 6010 #else 6240 6011 picDepth = getSlice()->getIvPic( true, iTargetViewIdx ); 6241 #if !BUG_FIX_TK656242 assert(picDepth != NULL);6243 #endif6244 6012 #endif 6245 6013 if (picDepth && bDepthRefine) 6014 { 6246 6015 estimateDVFromDM(iTargetViewIdx, uiPartIdx, picDepth, uiPartAddr, &cColMv ); 6247 6016 } 6248 6017 pDInfo->m_acDoNBDV = cColMv; 6249 6018 #endif //H_3D_NBDV_REF 6250 #if SEC_ARP_REM_ENC_RESTRICT_K00356251 6019 return; 6252 #else6253 return true;6254 #endif6255 6020 } 6256 6021 } … … 6269 6034 #endif 6270 6035 ) ) 6271 #if SEC_ARP_REM_ENC_RESTRICT_K00356272 6036 return; 6273 #else6274 return true;6275 #endif6276 6037 6277 6038 //// ******* Get disparity from above block ******* ///// … … 6285 6046 #endif 6286 6047 ) ) 6287 #if SEC_ARP_REM_ENC_RESTRICT_K00356288 6048 return; 6289 #else6290 return true;6291 #endif6292 6049 } 6293 6050 … … 6302 6059 { 6303 6060 TComMv cDispVec = cIDVInfo.m_acMvCand[iList][ curPos ]; 6304 #if !(NTT_BUG_FIX_TK54)6305 clipMv( cDispVec );6306 #endif6307 6061 pDInfo->m_acNBDV = cDispVec; 6308 6062 pDInfo->m_aVIdxCan = cIDVInfo.m_aVIdxCan[iList][ curPos ]; … … 6324 6078 #else 6325 6079 TComPic* picDepth = getSlice()->getIvPic( true, pDInfo->m_aVIdxCan ); 6326 #if !BUG_FIX_TK656327 assert(picDepth!=NULL);6328 #endif6329 6080 #endif 6330 6081 … … 6335 6086 pDInfo->m_acDoNBDV = cDispVec; 6336 6087 #endif 6337 #if SEC_ARP_REM_ENC_RESTRICT_K00356338 6088 return; 6339 #else6340 return true;6341 #endif6342 6089 } 6343 6090 } … … 6350 6097 if (getSlice()->getDefaultRefViewIdxAvailableFlag()) 6351 6098 { 6352 6099 pDInfo->m_aVIdxCan = getSlice()->getDefaultRefViewIdx(); 6353 6100 6354 6101 #if H_3D_NBDV_REF 6355 6102 TComPic* picDepth = NULL; 6356 6103 #if H_3D_FCO_VSP_DONBDV_E0163 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6104 picDepth = getSlice()->getIvPic(true, getSlice()->getViewIndex() ); 6105 if ( picDepth->getPicYuvRec() != NULL ) 6106 { 6107 defaultDV.setZero(); 6108 } 6109 else // Go back with virtual depth 6110 { 6111 picDepth = getSlice()->getIvPic( true, getSlice()->getDefaultRefViewIdx()); 6112 } 6113 6114 assert(picDepth != NULL); 6368 6115 #else 6369 picDepth = getSlice()->getIvPic( true, getSlice()->getDefaultRefViewIdx()); 6370 #endif 6371 if (picDepth && bDepthRefine) 6372 { 6373 estimateDVFromDM(getSlice()->getDefaultRefViewIdx(), uiPartIdx, picDepth, uiPartAddr, &defaultDV ); // from base view 6374 } 6375 pDInfo->m_acDoNBDV = defaultDV; 6376 #endif 6377 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 6378 return true; 6379 #endif 6380 } 6381 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 6382 return false; 6383 #endif 6116 picDepth = getSlice()->getIvPic( true, getSlice()->getDefaultRefViewIdx()); 6117 #endif 6118 if (picDepth && bDepthRefine) 6119 { 6120 estimateDVFromDM(getSlice()->getDefaultRefViewIdx(), uiPartIdx, picDepth, uiPartAddr, &defaultDV ); // from base view 6121 } 6122 pDInfo->m_acDoNBDV = defaultDV; 6123 #endif 6124 } 6384 6125 } 6385 6126 … … 6423 6164 Pel iDisp = getMcpFromDM( pcBaseViewDepthPicYuv, cMvPred, iBlkX, iBlkY, iWidth, iHeight, aiShiftLUT ); 6424 6165 cMvPred->setHor( iDisp ); 6425 #if !(NTT_BUG_FIX_TK54)6426 clipMv(*cMvPred);6427 #endif6428 6166 } 6429 6167 } … … 6451 6189 if (refViewIdx != m_pcSlice->getViewIndex()) 6452 6190 { 6453 #if !(NTT_BUG_FIX_TK54)6454 clipMv(cMvPred);6455 #endif6456 6191 pNbDvInfo->m_acNBDV = cMvPred; 6457 6192 pNbDvInfo->m_aVIdxCan = refViewIdx; … … 6472 6207 #else 6473 6208 picDepth = getSlice()->getIvPic (true, refViewIdx ); 6474 #if !BUG_FIX_TK656475 assert(picDepth != NULL);6476 #endif6477 6209 #endif 6478 6210 UInt uiPartIdx = 0; //Notes from MTK: Please confirm that using 0 as partition index and partition address is correct for CU-level DoNBDV … … 6480 6212 6481 6213 if (picDepth && bDepthRefine) 6214 { 6482 6215 estimateDVFromDM(refViewIdx, uiPartIdx, picDepth, uiPartAddr, &cMvPred ); 6483 6216 } 6484 6217 pNbDvInfo->m_acDoNBDV = cMvPred; 6485 6218 #endif … … 6870 6603 #endif 6871 6604 #endif 6872 #if !(NTT_BUG_FIX_TK54)6873 clipMv( cMv );6874 #endif6875 6605 paiPdmRefIdx [ uiCurrRefListId ] = iPdmRefIdx; 6876 6606 pacPdmMv [ uiCurrRefListId ] = cMv; … … 6904 6634 { 6905 6635 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 6906 Bool bLoop _stop = false;6907 for(Int iLoop = 0; iLoop < 2 && !bLoop _stop; ++iLoop)6636 Bool bLoopStop = false; 6637 for(Int iLoop = 0; iLoop < 2 && !bLoopStop; ++iLoop) 6908 6638 { 6909 6639 RefPicList eBaseRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId ); … … 6931 6661 } 6932 6662 6933 #if !(NTT_BUG_FIX_TK54) 6934 clipMv( cMv ); 6935 #endif 6936 bLoop_stop = true; 6663 bLoopStop = true; 6937 6664 6938 6665 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iPdmRefIdx); … … 6954 6681 6955 6682 } 6956 #if !SHARP_SUBBLOCK_CLEAN_K00446957 if (iSPHeight + iSPWidth == 12)6958 {6959 if (puhInterDirSP[iPartition] == 3)6960 {6961 puhInterDirSP[iPartition] = 1;6962 pcMvFieldSP[2*iPartition + 1].setMvField(TComMv(0,0), -1);6963 }6964 }6965 #endif6966 6683 iPartition ++; 6967 6684 } … … 6996 6713 Int iBaseAbsPartIdx; 6997 6714 6998 #if SEC_SHIFTED_IVMC_POS_K00366999 6715 Int offsetW = (iLoopCan == 0) ? 0 : ( iWidth * 2 ); 7000 6716 Int offsetH = (iLoopCan == 0) ? 0 : ( iHeight * 2 ); 7001 #else7002 Int offsetW = (iLoopCan == 0) ? 0 : ( ((iWidth /2)*4) + 4 );7003 Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 );7004 #endif7005 6717 7006 6718 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) ); … … 7048 6760 #endif 7049 6761 #endif 7050 #if !(NTT_BUG_FIX_TK54)7051 clipMv( cMv );7052 #endif7053 6762 paiPdmRefIdx [ (uiCurrRefListId + (iLoopCan<<2)) ] = iPdmRefIdx; 7054 6763 pacPdmMv [ (uiCurrRefListId + (iLoopCan<<2)) ] = cMv; … … 7104 6813 #endif 7105 6814 cMv.setVer( 0 ); 7106 #if !(NTT_BUG_FIX_TK54)7107 clipMv( cMv );7108 #endif7109 6815 pacPdmMv [iRefListId + 2 + (iLoopCan<<2)] = cMv; 7110 6816 } … … 7187 6893 { 7188 6894 UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1); 7189 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmmWedgeTabIdx[dmmType][uiAbsPartIdx+ui] = tabIdx; } 6895 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) 6896 { 6897 m_dmmWedgeTabIdx[dmmType][uiAbsPartIdx+ui] = tabIdx; 6898 } 7190 6899 } 7191 6900 #endif
Note: See TracChangeset for help on using the changeset viewer.