Changeset 1196 in 3DVCSoftware for trunk/source/Lib/TLibCommon
- Timestamp:
- 4 May 2015, 17:47:40 (10 years ago)
- Location:
- trunk/source/Lib/TLibCommon
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/ContextTables.h
r1179 r1196 51 51 #define NUM_SPLIT_FLAG_CTX 3 ///< number of context models for split flag 52 52 #define NUM_SKIP_FLAG_CTX 3 ///< number of context models for skip flag 53 #if SEC_DEPTH_INTRA_SKIP_MODE_K003353 #if H_3D 54 54 #define NUM_DIS_FLAG_CTX 1 55 55 #define NUM_DIS_TYPE_CTX 1 56 #else57 #if H_3D_SINGLE_DEPTH58 #define NUM_SINGLEDEPTH_FLAG_CTX 159 #define NUM_SINGLE_DEPTH_VALUE_DATA_CTX 160 #endif61 56 #endif 62 57 #define NUM_MERGE_FLAG_EXT_CTX 1 ///< number of context models for merge flag of merge extended … … 158 153 { CNU, CNU, CNU, }, 159 154 }; 160 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033155 #if H_3D 161 156 static const UChar 162 157 INIT_DIS_FLAG[3][NUM_DIS_FLAG_CTX] = … … 173 168 { 137 }, 174 169 }; 175 #else176 #if H_3D_SINGLE_DEPTH177 static const UChar178 INIT_SINGLEDEPTH_FLAG[3][NUM_SINGLEDEPTH_FLAG_CTX] =179 {180 { 185 },181 { 185 },182 { 185 },183 };184 static const UChar185 INIT_SINGLE_DEPTH_VALUE_DATA[3][NUM_SINGLE_DEPTH_VALUE_DATA_CTX] =186 {187 { 137 },188 { 137 },189 { 137 },190 };191 #endif192 170 #endif 193 171 static const UChar -
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 -
trunk/source/Lib/TLibCommon/TComDataCU.h
r1179 r1196 72 72 PartSize eVirtualPartSize; 73 73 UInt uiVirtualPartIndex; 74 } D BBPTmpData;74 } DbbpTmpData; 75 75 #endif 76 76 … … 110 110 // ------------------------------------------------------------------------------------------------------------------- 111 111 Bool* m_skipFlag; ///< array of skip flags 112 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033112 #if H_3D 113 113 Bool* m_bDISFlag; 114 114 UInt* m_uiDISType; 115 #else116 #if H_3D_SINGLE_DEPTH117 Bool* m_singleDepthFlag; ///< array of single depth flags118 Pel* m_apSingleDepthValue;119 #endif120 115 #endif 121 116 Char* m_pePartSize; ///< array of partition sizes … … 178 173 #endif 179 174 #if H_3D_VSP 180 Char* m_piVSPFlag; ///< array of VSP flags to indicate whehter a block uses VSP or not 181 ///< 0: non-VSP; 1: VSP 175 Char* m_piVSPFlag; ///< array of VSP flags to indicate whehter a block uses VSP or not ///< 0: non-VSP; 1: VSP 182 176 #endif 183 177 #if H_3D_SPIVMP 184 Bool* m_pbSPIVMPFlag; ///< array of sub-PU IVMP flags to indicate whehter a block uses sub-PU IVMP 185 ///< 0: non-SPIVMP; 1: SPIVMP 178 Bool* m_pbSPIVMPFlag; ///< array of sub-PU IVMP flags to indicate whehter a block uses sub-PU IVMP ///< 0: non-SPIVMP; 1: SPIVMP 186 179 #endif 187 180 #if H_3D_ARP … … 199 192 Bool* m_pbSDCFlag; 200 193 Pel* m_apSegmentDCOffset[2]; 201 Pel m_apDmmPredictor[2];194 Pel m_apDmmPredictor[2]; 202 195 #endif 203 196 #endif 204 197 #if H_3D_DBBP 205 198 Bool* m_pbDBBPFlag; ///< array of DBBP flags 206 D BBPTmpData m_sDBBPTmpData;199 DbbpTmpData m_sDBBPTmpData; 207 200 #endif 208 201 #if H_3D … … 252 245 Bool xGetColMVP( RefPicList eRefPicList, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int& riRefIdx 253 246 #if H_3D_TMVP 254 , 255 Bool bMRG = true 247 , Bool bMRG = true 256 248 #endif 257 249 ); … … 350 342 Void setSkipFlag ( UInt idx, Bool skip) { m_skipFlag[idx] = skip; } 351 343 Void setSkipFlagSubParts ( Bool skip, UInt absPartIdx, UInt depth ); 352 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033344 #if H_3D 353 345 Bool* getDISFlag () { return m_bDISFlag; } 354 346 Bool getDISFlag ( UInt idx) { return m_bDISFlag[idx]; } … … 360 352 Void getDISType ( UInt idx, UInt uiDISType) { m_uiDISType[idx] = uiDISType; } 361 353 Void setDISTypeSubParts ( UInt uiDISType, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ); 362 #else363 #if H_3D_SINGLE_DEPTH364 Bool* getSingleDepthFlag () { return m_singleDepthFlag; }365 Bool getSingleDepthFlag (UInt idx) { return m_singleDepthFlag[idx]; }366 Void setSingleDepthFlag ( UInt idx, Bool singleDepth) { m_singleDepthFlag[idx] = singleDepth; }367 Void setSingleDepthFlagSubParts ( Bool singleDepth, UInt absPartIdx, UInt depth );368 369 Pel* getSingleDepthValue( ) { return m_apSingleDepthValue; }370 Pel getSingleDepthValue (UInt idx) { return m_apSingleDepthValue[idx]; }371 Void setSingleDepthValue ( UInt idx, Pel pDepthValue) { m_apSingleDepthValue[idx] = pDepthValue; }372 Void setSingleDepthValueSubParts (Pel singleDepthValue, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth );373 #endif374 354 #endif 375 355 Char* getPredictionMode () { return m_pePredMode; } … … 385 365 Void setDBBPFlag ( UInt uiIdx, Bool b ) { m_pbDBBPFlag[uiIdx] = b; } 386 366 Void setDBBPFlagSubParts ( Bool bDBBPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 387 D BBPTmpData* getDBBPTmpData () { return &m_sDBBPTmpData; }367 DbbpTmpData* getDBBPTmpData () { return &m_sDBBPTmpData; } 388 368 #endif 389 369 … … 506 486 ); 507 487 Bool xGetColDisMV ( Int currCandPic, RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx ); 508 #if SEC_ARP_REM_ENC_RESTRICT_K0035509 488 Void getDisMvpCandNBDV ( DisInfo* pDInfo 510 #else511 Bool getDisMvpCandNBDV ( DisInfo* pDInfo512 #endif513 489 #if H_3D_NBDV_REF 514 490 , Bool bDepthRefine = false … … 517 493 518 494 #if H_3D 519 #if SEC_ARP_REM_ENC_RESTRICT_K0035520 495 Void getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 521 #else522 Bool getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);523 #endif524 496 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); 525 #endif 526 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 497 527 498 Bool getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index); 528 #else529 #if H_3D_SINGLE_DEPTH530 Bool getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index);531 #endif532 499 #endif 533 500 #if H_3D_NBDV_REF … … 625 592 626 593 Void clipMv ( TComMv& rcMv ); 627 #if SONY_MV_V_CONST_C0078628 Void checkM V_V(TComMv& rcMv, RefPicList eRefPicList, int iRefIdx );594 #if H_MV 595 Void checkMvVertRest (TComMv& rcMv, RefPicList eRefPicList, int iRefIdx ); 629 596 #endif 630 597 Void getMvPredLeft ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldA.getMv(); } -
trunk/source/Lib/TLibCommon/TComMotionInfo.cpp
r1179 r1196 335 335 Int iStartPelY = g_auiRasterToPelY[g_auiZscanToRaster[uiAbsPartIdx]]; 336 336 Int iEndPelX = iStartPelX + iWidth; 337 Int iEndPelY = iStartPelY + iHeight; 338 339 Int iCurrRaster, uiPartAddr; 337 Int iEndPelY = iStartPelY + iHeight; 340 338 341 339 for (Int i=iStartPelY; i<iEndPelY; i+=pcCU->getPic()->getMinCUHeight()) … … 343 341 for (Int j=iStartPelX; j < iEndPelX; j += pcCU->getPic()->getMinCUWidth()) 344 342 { 345 iCurrRaster = i / pcCU->getPic()->getMinCUHeight() * pcCU->getPic()->getNumPartInWidth() + j/pcCU->getPic()->getMinCUWidth();346 uiPartAddr = g_auiRasterToZscan[iCurrRaster];343 Int iCurrRaster = i / pcCU->getPic()->getMinCUHeight() * pcCU->getPic()->getNumPartInWidth() + j/pcCU->getPic()->getMinCUWidth(); 344 Int uiPartAddr = g_auiRasterToZscan[iCurrRaster]; 347 345 uiPartAddr -= pcCU->getZorderIdxInCU(); 348 346 -
trunk/source/Lib/TLibCommon/TComMotionInfo.h
r1179 r1196 63 63 typedef struct _DisCand 64 64 { 65 #if !SEC_ARP_REM_ENC_RESTRICT_K003566 Bool bDV;67 #endif68 65 TComMv m_acNBDV; // DV from NBDV 69 66 #if H_3D_NBDV_REF -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r1179 r1196 54 54 m_pDepthBlock = (Int*) malloc(MAX_NUM_SPU_W*MAX_NUM_SPU_W*sizeof(Int)); 55 55 if (m_pDepthBlock == NULL) 56 { 56 57 printf("ERROR: UKTGHU, No memory allocated.\n"); 58 } 57 59 #endif 58 60 } … … 62 64 #if H_3D_VSP 63 65 if (m_pDepthBlock != NULL) 64 free(m_pDepthBlock); 66 { 67 free(m_pDepthBlock); 68 } 65 69 m_cYuvDepthOnVsp.destroy(); 66 70 #endif … … 513 517 514 518 #if H_3D_DIM_DMM 515 if( dimType == DMM4_IDX && dmm4Segmentation == NULL ) { dmmSegmentation->destroy(); delete dmmSegmentation; } 519 if( dimType == DMM4_IDX && dmm4Segmentation == NULL ) 520 { 521 dmmSegmentation->destroy(); 522 delete dmmSegmentation; 523 } 516 524 #endif 517 525 } … … 630 638 631 639 #if H_3D_DBBP 632 #if HS_DBBP_CLEAN_K0048633 640 PartSize TComPrediction::getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize, TComDataCU*& pcCU) 634 #else635 PartSize TComPrediction::getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize)636 #endif637 641 { 638 642 // find virtual partitioning for this CU based on depth block 639 643 // segmentation of texture block --> mask IDs 640 644 Pel* pDepthBlockStart = pDepthPels; 641 645 642 646 // first compute average of depth block for thresholding 643 647 Int iSumDepth = 0; 644 648 Int iSubSample = 4; 645 #if HS_DBBP_CLEAN_K0048646 649 Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth(); 647 650 Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight(); … … 653 656 Int iBlkX = ( pcCU->getAddr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getHor()+2)>>2); 654 657 Int iBlkY = ( pcCU->getAddr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getVer()+2)>>2); 658 655 659 UInt t=0; 656 660 657 661 for (Int y=0; y<uiSize; y+=iSubSample) 658 662 { 659 663 for (Int x=0; x<uiSize; x+=iSubSample) 660 {661 if (iBlkX+x>iPictureWidth)662 {663 Int depthPel = pDepthPels[t];664 iSumDepth += depthPel;665 }666 else667 {668 Int depthPel = pDepthPels[x];669 t=x;670 iSumDepth += depthPel;671 }672 }673 664 { 665 if (iBlkX+x>iPictureWidth) 666 { 667 Int depthPel = pDepthPels[t]; 668 iSumDepth += depthPel; 669 } 670 else 671 { 672 Int depthPel = pDepthPels[x]; 673 t=x; 674 iSumDepth += depthPel; 675 } 676 } 677 674 678 // next row 675 679 if (!(iBlkY+y+4>iPictureHeight)) 676 pDepthPels += uiDepthStride*iSubSample; 677 #else 678 for (Int y=0; y<uiSize; y+=iSubSample) 679 { 680 for (Int x=0; x<uiSize; x+=iSubSample) 681 { 682 Int depthPel = pDepthPels[x]; 683 684 iSumDepth += depthPel; 685 } 686 687 // next row 688 pDepthPels += uiDepthStride*iSubSample; 689 #endif 690 } 691 680 { 681 pDepthPels += uiDepthStride*iSubSample; 682 } 683 } 684 692 685 Int iSizeInBits = g_aucConvertToBit[uiSize] - g_aucConvertToBit[iSubSample]; // respect sub-sampling factor 693 686 Int iMean = iSumDepth >> iSizeInBits*2; // iMean /= (uiSize*uiSize); 694 687 695 688 // start again for segmentation 696 689 pDepthPels = pDepthBlockStart; 697 690 698 691 // start mapping process 699 692 Int matchedPartSum[2][2] = {{0,0},{0,0}}; // counter for each part size and boolean option 700 693 PartSize virtualPartSizes[2] = { SIZE_Nx2N, SIZE_2NxN}; 701 694 702 695 UInt uiHalfSize = uiSize>>1; 703 696 for (Int y=0; y<uiSize; y+=iSubSample) … … 705 698 for (Int x=0; x<uiSize; x+=iSubSample) 706 699 { 707 #if HS_DBBP_CLEAN_K0048708 700 Int depthPel = 0; 709 if (iBlkX+x>iPictureWidth) 710 { 711 depthPel = pDepthPels[t]; 712 } 713 else 714 { 715 depthPel = pDepthPels[x]; 716 t=x; 717 } 718 #else 719 Int depthPel = pDepthPels[x]; 720 #endif 721 701 if (iBlkX+x>iPictureWidth) 702 { 703 depthPel = pDepthPels[t]; 704 } 705 else 706 { 707 depthPel = pDepthPels[x]; 708 t=x; 709 } 710 722 711 // decide which segment this pixel belongs to 723 712 Int ucSegment = (Int)(depthPel>iMean); 724 713 725 714 // Matched Filter to find optimal (conventional) partitioning 726 715 727 716 // SIZE_Nx2N 728 717 if(x<uiHalfSize) // left … … 734 723 matchedPartSum[0][1-ucSegment]++; 735 724 } 736 725 737 726 // SIZE_2NxN 738 727 if(y<uiHalfSize) // top … … 745 734 } 746 735 } 747 736 748 737 // next row 749 #if HS_DBBP_CLEAN_K0048750 738 if (!(iBlkY+y+4>iPictureHeight)) 751 #endif 752 pDepthPels += uiDepthStride*iSubSample; 753 } 754 739 { 740 pDepthPels += uiDepthStride*iSubSample; 741 } 742 } 743 755 744 PartSize matchedPartSize = SIZE_NONE; 756 745 757 746 Int iMaxMatchSum = 0; 758 747 for(Int p=0; p<2; p++) // loop over partition … … 767 756 } 768 757 } 769 758 770 759 AOF( matchedPartSize != SIZE_NONE ); 771 760 772 761 return matchedPartSize; 773 762 } 774 763 775 #if HS_DBBP_CLEAN_K0048776 764 Bool TComPrediction::getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask, TComDataCU*& pcCU) 777 #else778 Bool TComPrediction::getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask )779 #endif780 765 { 781 766 // segmentation of texture block --> mask IDs … … 786 771 Int uiMinDepth = MAX_INT; 787 772 Int uiMaxDepth = 0; 788 #if HS_DBBP_CLEAN_K0048789 773 uiMinDepth = pDepthPels[ 0 ]; 790 774 uiMaxDepth = pDepthPels[ 0 ]; 791 775 iSumDepth = pDepthPels[ 0 ]; 792 UInt t=0;776 793 777 Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth(); 794 778 Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight(); … … 848 832 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]); 849 833 } 850 #else851 iSumDepth = pDepthPels[ 0 ];852 iSumDepth += pDepthPels[ uiWidth - 1 ];853 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) ];854 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ];855 856 uiMinDepth = pDepthPels[ 0 ];857 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiWidth - 1 ]);858 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]);859 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]);860 861 uiMaxDepth = pDepthPels[ 0 ];862 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiWidth - 1 ]);863 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]);864 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]);865 #endif866 834 867 835 // don't generate mask for blocks with small depth range (encoder decision) … … 880 848 881 849 // generate mask 850 UInt t=0; 882 851 UInt uiSumPix[2] = {0,0}; 883 852 for (Int y=0; y<uiHeight; y++) … … 885 854 for (Int x=0; x<uiHeight; x++) 886 855 { 887 #if HS_DBBP_CLEAN_K0048888 856 Int depthPel = 0; 889 857 if (iBlkX+x>iPictureWidth) … … 896 864 t=x; 897 865 } 898 #else899 Int depthPel = pDepthPels[x];900 #endif901 866 902 867 // decide which segment this pixel belongs to … … 916 881 917 882 // next row 918 #if HS_DBBP_CLEAN_K0048919 883 if (!(iBlkY+y+1>iPictureHeight)) 920 #endif921 884 pDepthPels += uiDepthStride; 922 885 pMask += MAX_CU_SIZE; … … 1003 966 } 1004 967 1005 if ( tmpTar ) { xFree(tmpTar); tmpTar = NULL; } 968 if ( tmpTar ) 969 { 970 xFree(tmpTar); 971 tmpTar = NULL; 972 } 1006 973 1007 974 // now combine chroma … … 1106 1073 } 1107 1074 1108 if ( tmpTarU ) { xFree(tmpTarU); tmpTarU = NULL; } 1109 if ( tmpTarV ) { xFree(tmpTarV); tmpTarV = NULL; } 1075 if( tmpTarU ) 1076 { 1077 xFree(tmpTarU); 1078 tmpTarU = NULL; 1079 } 1080 if ( tmpTarV ) 1081 { 1082 xFree(tmpTarV); 1083 tmpTarV = NULL; 1084 } 1110 1085 } 1111 1086 #endif … … 1293 1268 TComMv cMv = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); 1294 1269 pcCU->clipMv(cMv); 1295 #if SONY_MV_V_CONST_C00781296 pcCU->checkM V_V(cMv, eRefPicList, iRefIdx );1270 #if H_MV 1271 pcCU->checkMvVertRest(cMv, eRefPicList, iRefIdx ); 1297 1272 #endif 1298 1273 #if H_3D_ARP … … 1393 1368 #if H_3D_NBDV 1394 1369 DisInfo cDistparity; 1395 #if SEC_ARP_REM_ENC_RESTRICT_K00351396 1370 cDistparity.m_acNBDV = pcCU->getDvInfo(0).m_acNBDV; 1397 1371 cDistparity.m_aVIdxCan = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan; 1398 1372 #else 1399 cDistparity.bDV = pcCU->getDvInfo(uiPartAddr).bDV;1400 if( cDistparity.bDV )1401 {1402 cDistparity.m_acNBDV = pcCU->getDvInfo(0).m_acNBDV;1403 assert(pcCU->getDvInfo(uiPartAddr).bDV == pcCU->getDvInfo(0).bDV);1404 cDistparity.m_aVIdxCan = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan;1405 }1406 #endif1407 #else1408 1373 assert(0); // ARP can be applied only when a DV is available 1409 1374 #endif 1410 #if SEC_ARP_REM_ENC_RESTRICT_K00351411 1375 UChar dW = pcCU->getARPW ( uiPartAddr ); 1412 #else 1413 UChar dW = cDistparity.bDV ? pcCU->getARPW ( uiPartAddr ) : 0; 1414 #endif 1415 1416 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 1417 if( cDistparity.bDV ) 1418 #endif 1376 1419 1377 { 1420 1378 Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList); … … 1468 1426 pYuvB0->clear(); pYuvB1->clear(); 1469 1427 } 1470 #if !SEC_ARP_REM_ENC_RESTRICT_K00351471 assert ( cDistparity.bDV );1472 #endif1473 1428 TComMv cNBDV = cDistparity.m_acNBDV; 1474 1429 pcCU->clipMv( cNBDV ); … … 2438 2393 for( UInt k = 0; k < (patternStride * patternStride); k++ ) 2439 2394 { 2440 if( true == biSegPattern[k] ) { ptrDst[k] = valDC2; } 2441 else { ptrDst[k] = valDC1; } 2395 if( true == biSegPattern[k] ) 2396 { 2397 ptrDst[k] = valDC2; 2398 } 2399 else 2400 { 2401 ptrDst[k] = valDC1; 2402 } 2442 2403 } 2443 2404 } … … 2449 2410 for( UInt uiX = 0; uiX < patternStride; uiX++ ) 2450 2411 { 2451 if( true == biSegPattern[uiX] ) { piTemp[uiX] = valDC2; } 2452 else { piTemp[uiX] = valDC1; } 2412 if( true == biSegPattern[uiX] ) 2413 { 2414 piTemp[uiX] = valDC2; 2415 } 2416 else 2417 { 2418 piTemp[uiX] = valDC1; 2419 } 2453 2420 } 2454 2421 piTemp += dstStride; … … 2520 2487 Int iSumPix[2]; 2521 2488 memset(iSumPix, 0, sizeof(Int)*2); 2489 2522 2490 for( Int i = 0; i < uiNumSegments; i++ ) 2523 2491 { 2524 rpSegMeans[i] = 0; 2525 } 2526 if (orgDC == false) 2492 rpSegMeans[i] = 0; 2493 } 2494 2495 if ( !orgDC ) 2527 2496 { 2528 2497 Pel* pLeftTop = pOrig; … … 2544 2513 subSamplePix = 1; 2545 2514 } 2515 2546 2516 for (Int y=0; y<uiSize; y+=subSamplePix) 2547 2517 { … … 2563 2533 { 2564 2534 if( iSumPix[ucSeg] > 0 ) 2535 { 2565 2536 rpSegMeans[ucSeg] = iSumDepth[ucSeg] / iSumPix[ucSeg]; 2537 } 2566 2538 else 2539 { 2567 2540 rpSegMeans[ucSeg] = 0; // this happens for zero-segments 2541 } 2568 2542 } 2569 2543 } -
trunk/source/Lib/TLibCommon/TComPrediction.h
r1179 r1196 121 121 Void xPredInterUniSubPU ( TComDataCU *cu, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, Int widthSubPU=4, Int heightSubPU=4 ); 122 122 #endif 123 124 Void xWeightedAverage ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, Int iRefIdx0, Int iRefIdx1, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvDst ); 125 123 Void xWeightedAverage ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, Int iRefIdx0, Int iRefIdx1, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvDst ); 126 124 Void xGetLLSPrediction ( TComPattern* pcPattern, Int* pSrc0, Int iSrcStride, Pel* pDst0, Int iDstStride, UInt uiWidth, UInt uiHeight, UInt uiExt0 ); 127 125 #if H_3D_IC … … 175 173 176 174 #if H_3D_DBBP 177 #if HS_DBBP_CLEAN_K0048178 175 PartSize getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize, TComDataCU*& pcCU); 179 176 Bool getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask, TComDataCU*& pcCU); 180 #else181 PartSize getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize);182 Bool getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask );183 #endif184 177 Void combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize ); 185 178 #endif -
trunk/source/Lib/TLibCommon/TComRdCost.cpp
r1179 r1196 341 341 else if( eDFunc >= DF_HADS && eDFunc <= DF_HADS16N ) 342 342 { 343 #if !RWTH_DBBP_NO_SATD_K0028344 rcDistParam.DistFunc = TComRdCost::xGetMaskedHADs;345 #else346 343 rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD; 347 #endif348 344 } 349 345 else if( eDFunc >= DF_VSD && eDFunc <= DF_VSD16N ) … … 445 441 if( m_bUseMask ) 446 442 { 447 #if !RWTH_DBBP_NO_SATD_K0028448 rcDistParam.DistFunc = (bHADME)?TComRdCost::xGetMaskedHADs:TComRdCost::xGetMaskedSAD;449 #else450 443 rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD; 451 #endif452 444 } 453 445 #endif … … 472 464 if( m_bUseMask ) 473 465 { 474 #if !RWTH_DBBP_NO_SATD_K0028475 rcDP.DistFunc = (bHadamard)?TComRdCost::xGetMaskedHADs:TComRdCost::xGetMaskedSAD;476 #else477 466 rcDP.DistFunc = TComRdCost::xGetMaskedSAD; 478 #endif479 467 } 480 468 #endif … … 729 717 } 730 718 731 #if !RWTH_DBBP_NO_SATD_K0028732 UInt TComRdCost::xGetMaskedHADs( DistParam* pcDtParam )733 {734 AOF(!pcDtParam->bApplyWeight);735 #if H_3D_IC736 AOF(!pcDtParam->bUseIC);737 #endif738 Pel* piOrg = pcDtParam->pOrg;739 Pel* piCur = pcDtParam->pCur;740 Int iRows = pcDtParam->iRows;741 Int iCols = pcDtParam->iCols;742 Int iStrideCur = pcDtParam->iStrideCur;743 Int iStrideOrg = pcDtParam->iStrideOrg;744 Int iStep = pcDtParam->iStep;745 746 Int x, y;747 748 UInt uiSum = 0;749 750 #if NS_HAD751 if( ( ( iRows % 8 == 0) && (iCols % 8 == 0) && ( iRows == iCols ) ) || ( ( iRows % 8 == 0 ) && (iCols % 8 == 0) && !pcDtParam->bUseNSHAD ) )752 #else753 if( ( iRows % 8 == 0) && (iCols % 8 == 0) )754 #endif755 {756 Int iOffsetOrg = iStrideOrg<<3;757 Int iOffsetCur = iStrideCur<<3;758 for ( y=0; y<iRows; y+= 8 )759 {760 for ( x=0; x<iCols; x+= 8 )761 {762 if( piOrg[x] != DBBP_INVALID_SHORT )763 {764 uiSum += xCalcHADs8x8( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep );765 }766 }767 piOrg += iOffsetOrg;768 piCur += iOffsetCur;769 }770 }771 #if NS_HAD772 else if ( ( iCols > 8 ) && ( iCols > iRows ) && pcDtParam->bUseNSHAD )773 {774 Int iOffsetOrg = iStrideOrg<<2;775 Int iOffsetCur = iStrideCur<<2;776 for ( y=0; y<iRows; y+= 4 )777 {778 for ( x=0; x<iCols; x+= 16 )779 {780 if( piOrg[x] != DBBP_INVALID_SHORT )781 {782 uiSum += xCalcHADs16x4( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep );783 }784 }785 piOrg += iOffsetOrg;786 piCur += iOffsetCur;787 }788 }789 else if ( ( iRows > 8 ) && ( iCols < iRows ) && pcDtParam->bUseNSHAD )790 {791 Int iOffsetOrg = iStrideOrg<<4;792 Int iOffsetCur = iStrideCur<<4;793 for ( y=0; y<iRows; y+= 16 )794 {795 for ( x=0; x<iCols; x+= 4 )796 {797 if( piOrg[x] != DBBP_INVALID_SHORT )798 {799 uiSum += xCalcHADs4x16( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep );800 }801 }802 piOrg += iOffsetOrg;803 piCur += iOffsetCur;804 }805 }806 #endif807 else if( ( iRows % 4 == 0) && (iCols % 4 == 0) )808 {809 Int iOffsetOrg = iStrideOrg<<2;810 Int iOffsetCur = iStrideCur<<2;811 812 for ( y=0; y<iRows; y+= 4 )813 {814 for ( x=0; x<iCols; x+= 4 )815 {816 if( piOrg[x] != DBBP_INVALID_SHORT )817 {818 uiSum += xCalcHADs4x4( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep );819 }820 }821 piOrg += iOffsetOrg;822 piCur += iOffsetCur;823 }824 }825 else if( ( iRows % 2 == 0) && (iCols % 2 == 0) )826 {827 Int iOffsetOrg = iStrideOrg<<1;828 Int iOffsetCur = iStrideCur<<1;829 for ( y=0; y<iRows; y+=2 )830 {831 for ( x=0; x<iCols; x+=2 )832 {833 if( piOrg[x] != DBBP_INVALID_SHORT )834 {835 uiSum += xCalcHADs2x2( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep );836 }837 }838 piOrg += iOffsetOrg;839 piCur += iOffsetCur;840 }841 }842 else843 {844 assert(false);845 }846 847 return uiSum >> DISTORTION_PRECISION_ADJUSTMENT(pcDtParam->bitDepth-8);848 }849 #endif850 719 851 720 UInt TComRdCost::xGetMaskedVSD( DistParam* pcDtParam ) … … 2993 2862 UInt TComRdCost::getVSDEstimate( Int dDM, Pel* pOrg, Int iOrgStride, Pel* pVirRec, Pel* pVirOrg, Int iVirStride, Int x, Int y ) 2994 2863 { 2995 Double dD; 2996 Int iTemp; 2997 2998 dD = ( (Double) ( dDM >> DISTORTION_PRECISION_ADJUSTMENT( g_bitDepthY - 8 ) ) ) * m_dDisparityCoeff; 2864 Double dD = ( (Double) ( dDM >> DISTORTION_PRECISION_ADJUSTMENT( g_bitDepthY - 8 ) ) ) * m_dDisparityCoeff; 2999 2865 3000 2866 Double dDepthWeight = ( pOrg[x] >= ( (1<<(g_bitDepthY - 3)) + (1<<(g_bitDepthY - 2)) ) ? 4 : pOrg[x] > ((1<<g_bitDepthY) >> 4) ? (Float)(pOrg[x] - ((1<<g_bitDepthY) >> 4))/(Float)((1<<g_bitDepthY) >> 3) + 1 : 1.0 ); 3001 2867 Double dTemp = ( 0.5 * fabs(dD) * dDepthWeight * ( abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x-1+y*iVirStride ] ) + abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x+1+y*iVirStride ] ) ) ); 3002 iTemp = (Int) (((dTemp) < 0)? (Int)((dTemp) - 0.5) : (Int)((dTemp) + 0.5));2868 Int iTemp = (Int) (((dTemp) < 0)? (Int)((dTemp) - 0.5) : (Int)((dTemp) + 0.5)); 3003 2869 3004 2870 return (UInt) ( (iTemp*iTemp)>>1 ); -
trunk/source/Lib/TLibCommon/TComRdCost.h
r1179 r1196 320 320 static UInt xGetMaskedSSE ( DistParam* pcDtParam ); 321 321 static UInt xGetMaskedSAD ( DistParam* pcDtParam ); 322 #if !RWTH_DBBP_NO_SATD_K0028323 static UInt xGetMaskedHADs ( DistParam* pcDtParam );324 #endif325 322 static UInt xGetMaskedVSD ( DistParam* pcDtParam ); 326 323 #endif -
trunk/source/Lib/TLibCommon/TComRom.cpp
r1179 r1196 104 104 if( !g_dmmWedgeLists.empty() ) 105 105 { 106 for( UInt ui = 0; ui < g_dmmWedgeLists.size(); ui++ ) { g_dmmWedgeLists[ui].clear(); } 106 for( UInt ui = 0; ui < g_dmmWedgeLists.size(); ui++ ) 107 { 108 g_dmmWedgeLists[ui].clear(); 109 } 107 110 g_dmmWedgeLists.clear(); 108 111 } 109 112 if( !g_dmmWedgeRefLists.empty() ) 110 113 { 111 for( UInt ui = 0; ui < g_dmmWedgeRefLists.size(); ui++ ) { g_dmmWedgeRefLists[ui].clear(); } 114 for( UInt ui = 0; ui < g_dmmWedgeRefLists.size(); ui++ ) 115 { 116 g_dmmWedgeRefLists[ui].clear(); 117 } 112 118 g_dmmWedgeRefLists.clear(); 113 119 } … … 115 121 if( !g_dmmWedgeNodeLists.empty() ) 116 122 { 117 for( UInt ui = 0; ui < g_dmmWedgeNodeLists.size(); ui++ ) { g_dmmWedgeNodeLists[ui].clear(); } 123 for( UInt ui = 0; ui < g_dmmWedgeNodeLists.size(); ui++ ) 124 { 125 g_dmmWedgeNodeLists[ui].clear(); 126 } 118 127 g_dmmWedgeNodeLists.clear(); 119 128 } … … 745 754 assert( uiWidth == uiHeight ); 746 755 747 #if SHARP_DMM_CLEAN_K0042748 756 Int posStart = 0, posEnd = 0; 749 #else750 UChar uhStartX = 0, uhStartY = 0, uhEndX = 0, uhEndY = 0;751 Int iStepStartX = 0, iStepStartY = 0, iStepEndX = 0, iStepEndY = 0;752 #endif753 757 754 758 UInt uiBlockSize = 0; … … 762 766 for( UInt uiOri = 0; uiOri < 6; uiOri++ ) 763 767 { 764 #if !SHARP_DMM_CLEAN_K0042 765 // init the edge line parameters for each of the 6 wedgelet types 766 switch( uiOri ) 767 { 768 case( 0 ): { uhStartX = 0; uhStartY = 0; uhEndX = 0; uhEndY = 0; iStepStartX = +1; iStepStartY = 0; iStepEndX = 0; iStepEndY = +1; break; } 769 case( 1 ): { uhStartX = (uiBlockSize-1); uhStartY = 0; uhEndX = (uiBlockSize-1); uhEndY = 0; iStepStartX = 0; iStepStartY = +1; iStepEndX = -1; iStepEndY = 0; break; } 770 case( 2 ): { uhStartX = (uiBlockSize-1); uhStartY = (uiBlockSize-1); uhEndX = (uiBlockSize-1); uhEndY = (uiBlockSize-1); iStepStartX = -1; iStepStartY = 0; iStepEndX = 0; iStepEndY = -1; break; } 771 case( 3 ): { uhStartX = 0; uhStartY = (uiBlockSize-1); uhEndX = 0; uhEndY = (uiBlockSize-1); iStepStartX = 0; iStepStartY = -1; iStepEndX = +1; iStepEndY = 0; break; } 772 case( 4 ): { uhStartX = 0; uhStartY = 0; uhEndX = 0; uhEndY = (uiBlockSize-1); iStepStartX = +1; iStepStartY = 0; iStepEndX = +1; iStepEndY = 0; break; } 773 case( 5 ): { uhStartX = (uiBlockSize-1); uhStartY = 0; uhEndX = 0; uhEndY = 0; iStepStartX = 0; iStepStartY = +1; iStepEndX = 0; iStepEndY = +1; break; } 774 } 775 #endif 776 777 #if SHARP_DMM_CLEAN_K0042 768 778 769 posEnd = (Int) racWedgeList.size(); 779 770 if (uiOri == 0 || uiOri == 4) 780 771 { 781 #endif782 772 for( Int iK = 0; iK < uiBlockSize; iK += (uiWidth>=16 ?2:1)) 783 773 { 784 774 for( Int iL = 0; iL < uiBlockSize; iL += ((uiWidth>=16 && uiOri<4)?2:1) ) 785 775 { 786 #if SHARP_DMM_CLEAN_K0042787 776 Int xS = iK; 788 777 Int yS = 0; … … 790 779 Int yE = (uiOri == 0) ? iL : uiBlockSize - 1; 791 780 cTempWedgelet.setWedgelet( xS, yS, xE, yE, uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) ); 792 #else793 cTempWedgelet.setWedgelet( uhStartX + (iK*iStepStartX) , uhStartY + (iK*iStepStartY), uhEndX + (iL*iStepEndX), uhEndY + (iL*iStepEndY), (UChar)uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) );794 #endif795 781 addWedgeletToList( cTempWedgelet, racWedgeList, racWedgeRefList ); 796 782 } 797 783 } 798 #if SHARP_DMM_CLEAN_K0042799 784 } 800 785 else … … 807 792 } 808 793 posStart = posEnd; 809 #endif810 794 } 811 795 -
trunk/source/Lib/TLibCommon/TComRom.h
r1179 r1196 290 290 291 291 #if H_MV_ENC_DEC_TRAC 292 #define DTRACE_CU(x,y) 293 #define DTRACE_PU(x,y) 294 #define DTRACE_TU(x,y) 295 296 #define DTRACE_CU_S(x) 297 #define DTRACE_PU_S(x) 298 #define DTRACE_TU_S(x) 292 #define DTRACE_CU(x,y) ; 293 #define DTRACE_PU(x,y) ; 294 #define DTRACE_TU(x,y) ; 295 296 #define DTRACE_CU_S(x) ; 297 #define DTRACE_PU_S(x) ; 298 #define DTRACE_TU_S(x) ; 299 299 300 300 #endif -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r1179 r1196 137 137 #endif 138 138 #if H_3D 139 #if HHI_INTER_COMP_PRED_K0052140 139 , m_inCmpPredFlag ( false ) 141 #endif142 #if HHI_CAM_PARA_K0052143 140 , m_numViews ( 0 ) 144 #endif145 141 , m_depthToDisparityB ( NULL ) 146 142 , m_depthToDisparityF ( NULL ) 147 #endif 148 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 143 149 144 , m_bApplyDIS (false) 150 #else151 #if H_3D_SINGLE_DEPTH152 , m_bApplySingleDepthMode (false)153 #endif154 145 #endif 155 146 #endif … … 191 182 m_iDefaultRefViewIdx = -1; 192 183 m_bDefaultRefViewIdxAvailableFlag = false; 193 #if H HI_INTER_COMP_PRED_K0052184 #if H_3D 194 185 m_ivMvPredFlag = false; 195 186 m_ivMvScalingFlag = false; … … 214 205 m_puiSubstreamSizes = NULL; 215 206 #if H_3D 216 #if HHI_CAM_PARA_K0052217 207 for( UInt i = 0; i < m_numViews; i++ ) 218 #else219 for( UInt i = 0; i < getViewIndex(); i++ )220 #endif221 208 { 222 209 if ( m_depthToDisparityB && m_depthToDisparityB[ i ] ) … … 604 591 UInt NumPocLtCurr = 0; 605 592 Int i; 606 607 #if HHI_RES_PRED_K0052 593 #if H_3D 608 594 m_pocsInCurrRPSs.clear(); 609 595 #endif 610 611 596 for(i=0; i < m_pcRPS->getNumberOfNegativePictures(); i++) 612 597 { … … 619 604 NumPocStCurr0++; 620 605 pcRefPic->setCheckLTMSBPresent(false); 621 #if H HI_RES_PRED_K0052606 #if H_3D 622 607 m_pocsInCurrRPSs.push_back( pcRefPic->getPOC() ); 623 608 #endif … … 635 620 NumPocStCurr1++; 636 621 pcRefPic->setCheckLTMSBPresent(false); 637 #if H HI_RES_PRED_K0052622 #if H_3D 638 623 m_pocsInCurrRPSs.push_back( pcRefPic->getPOC() ); 639 624 #endif … … 650 635 RefPicSetLtCurr[NumPocLtCurr] = pcRefPic; 651 636 NumPocLtCurr++; 652 #if H HI_RES_PRED_K0052637 #if H_3D 653 638 m_pocsInCurrRPSs.push_back( pcRefPic->getPOC() ); 654 639 #endif … … 662 647 663 648 Int numPocInterCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr; 664 #if H HI_RES_PRED_K0052649 #if H_3D 665 650 assert( numPocInterCurr == (Int) m_pocsInCurrRPSs.size() ); 666 651 #endif … … 837 822 Void TComSlice::setCamparaSlice( Int** aaiScale, Int** aaiOffset ) 838 823 { 839 #if HHI_CAM_PARA_K0052840 824 Int voiInVps = m_pcVPS->getVoiInVps(getViewIndex() ); 841 825 if( m_pcVPS->getNumCp( voiInVps ) > 0 ) … … 855 839 } 856 840 } 857 #else858 if( m_pcVPS->hasCamParInSliceHeader( m_viewIndex ) )859 {860 for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < m_viewIndex; uiBaseViewIndex++ )861 {862 m_aaiCodedScale [ 0 ][ uiBaseViewIndex ] = aaiScale [ uiBaseViewIndex ][ m_viewIndex ];863 m_aaiCodedScale [ 1 ][ uiBaseViewIndex ] = aaiScale [ m_viewIndex ][ uiBaseViewIndex ];864 m_aaiCodedOffset[ 0 ][ uiBaseViewIndex ] = aaiOffset[ uiBaseViewIndex ][ m_viewIndex ];865 m_aaiCodedOffset[ 1 ][ uiBaseViewIndex ] = aaiOffset[ m_viewIndex ][ uiBaseViewIndex ];866 }867 }868 #endif869 841 } 870 842 #endif … … 1165 1137 } 1166 1138 #endif 1167 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331139 #if H_3D 1168 1140 m_bApplyDIS = pSrc->m_bApplyDIS; 1169 #else1170 #if H_3D_SINGLE_DEPTH1171 m_bApplySingleDepthMode = pSrc->m_bApplySingleDepthMode;1172 #endif1173 1141 #endif 1174 1142 #if H_3D_IC … … 2217 2185 { 2218 2186 m_numViews = 1; 2219 #if HHI_VIEW_ID_LIST_I5_J0107 || HHI_INTER_COMP_PRED_K00522220 2187 #if H_3D 2221 2188 AOF( m_viewOIdxList.size() == 0 ); … … 2223 2190 m_viewOIdxList.push_back( 0 ); 2224 2191 #endif 2225 #endif2226 2192 2227 2193 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) … … 2241 2207 { 2242 2208 m_numViews++; 2243 #if HHI_VIEW_ID_LIST_I5_J0107 || HHI_INTER_COMP_PRED_K00522244 2209 #if H_3D 2245 2210 m_viewOIdxList.push_back( getViewOrderIdx( lId ) ); 2246 2211 #endif 2247 #endif2248 2212 } 2249 2213 } … … 2271 2235 } 2272 2236 } 2273 #if !BUG_FIX_TK652274 assert( foundLayerIdinNuh != -1 );2275 #endif2276 2237 return foundLayerIdinNuh; 2277 2238 } … … 2281 2242 Int i = 0, j = 0; 2282 2243 2283 #if HHI_CAM_PARA_K00522284 2244 m_numCp = new Int [ iNumViews ]; 2285 2245 m_cpRefVoi = new Int*[ iNumViews ]; … … 2287 2247 2288 2248 m_cpPresentFlag = new Bool*[ iNumViews ]; 2289 #else2290 m_bCamParPresent = new Bool[ iNumViews ];2291 m_bCamParInSliceHeader = new Bool[ iNumViews ];2292 #endif2293 2249 2294 2250 … … 2297 2253 for ( i = 0; i < iNumViews ; i++ ) 2298 2254 { 2299 #if HHI_CAM_PARA_K00522300 2255 m_cpInSliceSegmentHeaderFlag[i] = false; 2301 #else2302 m_bCamParPresent[i] = false;2303 m_bCamParInSliceHeader[i] = false;2304 #endif2305 2256 2306 2257 m_aaaiCodedScale[i] = new Int*[ 2 ]; 2307 2258 m_aaaiCodedOffset[i] = new Int*[ 2 ]; 2308 2259 2309 #if HHI_CAM_PARA_K00522310 2260 m_numCp [i] = 0; 2311 2261 m_cpRefVoi[i] = new Int[ iNumViews ]; … … 2316 2266 m_cpPresentFlag[i][j] = false; 2317 2267 } 2318 #endif2319 2268 for ( j = 0; j < 2; j++ ) 2320 2269 { … … 2335 2284 Int i = 0, j = 0; 2336 2285 2337 #if !HHI_CAM_PARA_K00522338 if ( m_bCamParPresent != NULL )2339 {2340 delete [] m_bCamParPresent;2341 }2342 if ( m_bCamParInSliceHeader != NULL )2343 {2344 delete [] m_bCamParInSliceHeader;2345 }2346 #else2347 2286 if ( m_numCp != NULL ) 2348 2287 { … … 2373 2312 delete [] m_cpInSliceSegmentHeaderFlag; 2374 2313 } 2375 #endif2376 2314 2377 2315 … … 2404 2342 2405 2343 2406 #if !HHI_CAM_PARA_K00522407 Void TComVPS::initCamParaVPS( UInt uiViewIndex, Bool bCamParPresent, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset )2408 {2409 AOT( uiViewIndex != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) );2410 2411 m_uiCamParPrecision = ( ( uiViewIndex != 0 )? uiCamParPrecision : 0 );2412 m_bCamParPresent[ uiViewIndex ] = (( uiViewIndex != 0 )? bCamParPresent : false );2413 m_bCamParInSliceHeader[ uiViewIndex ] = ( (uiViewIndex != 0)? bCamParSlice : false );2414 2415 if( !m_bCamParInSliceHeader[ uiViewIndex ] )2416 {2417 for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ )2418 {2419 m_aaaiCodedScale [ uiViewIndex ][ 0 ][ uiBaseViewIndex ] = aaiScale [ uiBaseViewIndex ][ uiViewIndex ];2420 m_aaaiCodedScale [ uiViewIndex ][ 1 ][ uiBaseViewIndex ] = aaiScale [ uiViewIndex ][ uiBaseViewIndex ];2421 m_aaaiCodedOffset[ uiViewIndex ][ 0 ][ uiBaseViewIndex ] = aaiOffset[ uiBaseViewIndex ][ uiViewIndex ];2422 m_aaaiCodedOffset[ uiViewIndex ][ 1 ][ uiBaseViewIndex ] = aaiOffset[ uiViewIndex ][ uiBaseViewIndex ];2423 }2424 }2425 }2426 #endif2427 2344 2428 2345 #endif // H_3D … … 2804 2721 } 2805 2722 2723 #if H_3D 2724 Void TComVPS::initViewCompLayer() 2725 { 2726 assert( m_viewCompLayerId.size() == 0 && m_viewCompLayerPresentFlag.size() == 0 ); 2727 for( Int i = 0; i < getNumViews(); i++ ) 2728 { 2729 m_viewCompLayerId .push_back( std::vector<Int>(0) ); 2730 m_viewCompLayerPresentFlag.push_back( std::vector<Bool>(0) ); 2731 2732 for( Int depFlag = 0; depFlag <= 1; depFlag++ ) 2733 { 2734 Int iViewOIdx = getViewOIdxList( i ); 2735 Int layerId = -1; 2736 for( Int j = 0; j <= getMaxLayersMinus1(); j++ ) 2737 { 2738 Int jNuhLId = getLayerIdInNuh( j ); 2739 if( getVpsDepthFlag( jNuhLId ) == ( (Bool) depFlag ) && getViewOrderIdx( jNuhLId ) == iViewOIdx 2740 && getDependencyId( jNuhLId ) == 0 && getAuxId( jNuhLId ) == 0 ) 2741 { 2742 layerId = jNuhLId; 2743 } 2744 } 2745 m_viewCompLayerPresentFlag[ i ].push_back( layerId != -1 ); 2746 m_viewCompLayerId [ i ].push_back( layerId ); 2747 } 2748 } 2749 } 2750 2751 Int TComVPS::getVoiInVps(Int viewOIdx) 2752 { 2753 for ( Int i = 0; i < m_viewOIdxList.size(); i++ ) 2754 { 2755 if ( m_viewOIdxList[ i ] == viewOIdx ) 2756 { 2757 return i; 2758 } 2759 } 2760 assert( 0 ); 2761 return -1; 2762 } 2763 2764 Void TComVPS::deriveCpPresentFlag() 2765 { 2766 for( Int nInVps = 0; nInVps < getNumViews(); nInVps++ ) 2767 { 2768 for( Int mInVps = 0; mInVps < getNumViews(); mInVps++ ) 2769 { 2770 m_cpPresentFlag[nInVps][mInVps] = 0; 2771 } 2772 } 2773 2774 for( Int n = 1; n < getNumViews(); n++ ) 2775 { 2776 Int iInVps = getVoiInVps( getViewOIdxList( n ) ); 2777 for( Int m = 0; m < getNumCp( iInVps ); m++ ) 2778 { 2779 m_cpPresentFlag[ iInVps ][ getVoiInVps( getCpRefVoi( iInVps, m ) ) ] = 1; 2780 } 2781 } 2782 } 2783 #endif 2806 2784 2807 2785 #endif // H_MV … … 2858 2836 , m_interViewMvVertConstraintFlag (false) 2859 2837 #endif 2860 #if H_3D2861 #if !HHI_CAM_PARA_K00522862 , m_bCamParInSliceHeader (false)2863 #endif2864 #endif2865 2838 { 2866 2839 for ( Int i = 0; i < MAX_TLAYER; i++ ) … … 3885 3858 { 3886 3859 Int layerIdInNuh = getRefPicLayerId( i ); 3887 #if HHI_RES_PRED_K0052 3860 3888 3861 TComPic* picV = getIvPic( getIsDepth(), getVPS()->getViewIndex( layerIdInNuh ) ); 3889 3862 assert( picV != NULL ); … … 3900 3873 3901 3874 if (getFirstTRefIdx(eRefPicList) >= 0 && refRpRefAvailFlag ) 3902 #else3903 Int viewIdx = getVPS()->getViewId( layerIdInNuh );3904 TComPic*pcPicPrev = ivPicLists->getPic(viewIdx, 0, prevPOC);3905 if (getFirstTRefIdx(eRefPicList) >= 0 && pcPicPrev && pcPicPrev->getSlice( 0 )->isReferenced())3906 #endif3907 3875 { 3908 3876 m_arpRefPicAvailable[eRefPicList][layerIdInNuh] = true; … … 3917 3885 } 3918 3886 #endif 3887 3919 3888 #if H_3D_IC 3889 // This is an encoder only function and should be moved to TEncSlice or TEncSearch!! 3920 3890 Void TComSlice::xSetApplyIC(Bool bUseLowLatencyICEnc) 3921 3891 { … … 3981 3951 } 3982 3952 else 3983 { 3984 Int iMaxPelValue = ( 1 << g_bitDepthY ); 3985 Int *aiRefOrgHist; 3986 Int *aiCurrHist; 3987 aiRefOrgHist = (Int *) xMalloc( Int,iMaxPelValue ); 3988 aiCurrHist = (Int *) xMalloc( Int,iMaxPelValue ); 3989 memset( aiRefOrgHist, 0, iMaxPelValue*sizeof(Int) ); 3990 memset( aiCurrHist, 0, iMaxPelValue*sizeof(Int) ); 3991 // Reference Idx Number 3992 Int iNumRefIdx = getNumRefIdx( REF_PIC_LIST_0 ); 3993 TComPic* pcCurrPic = NULL; 3994 TComPic* pcRefPic = NULL; 3995 TComPicYuv* pcCurrPicYuv = NULL; 3996 TComPicYuv* pcRefPicYuvOrg = NULL; 3997 pcCurrPic = getPic(); 3998 pcCurrPicYuv = pcCurrPic->getPicYuvOrg(); 3999 Int iWidth = pcCurrPicYuv->getWidth(); 4000 Int iHeight = pcCurrPicYuv->getHeight(); 4001 4002 4003 // Get InterView Reference picture 4004 // !!!!! Assume only one Interview Reference Picture in L0 4005 for ( Int i = 0; i < iNumRefIdx; i++ ) 4006 { 4007 pcRefPic = getRefPic( REF_PIC_LIST_0, i ); 4008 if ( pcRefPic != NULL ) 4009 { 4010 if ( pcCurrPic->getViewIndex() != pcRefPic->getViewIndex() ) 4011 { 4012 pcRefPicYuvOrg = pcRefPic->getPicYuvOrg(); 4013 } 4014 } 4015 } 4016 4017 if ( pcRefPicYuvOrg != NULL ) 4018 { 4019 Pel* pCurrY = pcCurrPicYuv ->getLumaAddr(); 4020 Pel* pRefOrgY = pcRefPicYuvOrg ->getLumaAddr(); 4021 Int iCurrStride = pcCurrPicYuv->getStride(); 4022 Int iRefStride = pcRefPicYuvOrg->getStride(); 4023 Int iSumOrgSAD = 0; 4024 Double dThresholdOrgSAD = getIsDepth() ? 0.1 : 0.05; 4025 4026 // Histogram building - luminance 4027 for ( Int y = 0; y < iHeight; y++ ) 4028 { 4029 for ( Int x = 0; x < iWidth; x++ ) 4030 { 4031 aiCurrHist[pCurrY[x]]++; 4032 aiRefOrgHist[pRefOrgY[x]]++; 4033 } 4034 pCurrY += iCurrStride; 4035 pRefOrgY += iRefStride; 4036 } 4037 // Histogram SAD 4038 for ( Int i = 0; i < iMaxPelValue; i++ ) 4039 { 4040 iSumOrgSAD += abs( aiCurrHist[i] - aiRefOrgHist[i] ); 4041 } 4042 // Setting 4043 if ( iSumOrgSAD > Int( dThresholdOrgSAD * iWidth * iHeight ) ) 4044 { 4045 m_bApplyIC = true; 4046 } 4047 else 4048 { 4049 m_bApplyIC = false; 4050 } 4051 } 4052 4053 xFree( aiCurrHist ); 4054 xFree( aiRefOrgHist ); 4055 aiCurrHist = NULL; 4056 aiRefOrgHist = NULL; 3953 { 3954 TComPic* pcCurrPic = getPic(); 3955 TComPicYuv* pcCurrPicYuv = pcCurrPic->getPicYuvOrg(); 3956 3957 // Get InterView Reference picture 3958 // !!!!! Assume only one Interview Reference Picture in L0 3959 // GT: Is this assumption correct? 3960 3961 TComPicYuv* pcRefPicYuvOrg = NULL; 3962 for ( Int i = 0; i < getNumRefIdx( REF_PIC_LIST_0 ); i++ ) 3963 { 3964 TComPic* pcRefPic = getRefPic( REF_PIC_LIST_0, i ); 3965 if ( pcRefPic != NULL ) 3966 { 3967 if ( pcCurrPic->getViewIndex() != pcRefPic->getViewIndex() ) 3968 { 3969 pcRefPicYuvOrg = pcRefPic->getPicYuvOrg(); 3970 } 3971 } 3972 } 3973 3974 if ( pcRefPicYuvOrg != NULL ) 3975 { 3976 // Histogram building - luminance 3977 Int iMaxPelValue = ( 1 << g_bitDepthY ); 3978 Int *aiRefOrgHist = (Int *) xMalloc( Int,iMaxPelValue ); 3979 Int *aiCurrHist = (Int *) xMalloc( Int,iMaxPelValue ); 3980 memset( aiRefOrgHist, 0, iMaxPelValue*sizeof(Int) ); 3981 memset( aiCurrHist, 0, iMaxPelValue*sizeof(Int) ); 3982 3983 Int iWidth = pcCurrPicYuv->getWidth(); 3984 Int iHeight = pcCurrPicYuv->getHeight(); 3985 3986 Pel* pCurrY = pcCurrPicYuv ->getLumaAddr(); 3987 Pel* pRefOrgY = pcRefPicYuvOrg ->getLumaAddr(); 3988 Int iCurrStride = pcCurrPicYuv->getStride(); 3989 Int iRefStride = pcRefPicYuvOrg->getStride(); 3990 3991 for ( Int y = 0; y < iHeight; y++ ) 3992 { 3993 for ( Int x = 0; x < iWidth; x++ ) 3994 { 3995 aiCurrHist[pCurrY[x]]++; 3996 aiRefOrgHist[pRefOrgY[x]]++; 3997 } 3998 pCurrY += iCurrStride; 3999 pRefOrgY += iRefStride; 4000 } 4001 4002 // Histogram SAD 4003 Int iSumOrgSAD = 0; 4004 for ( Int i = 0; i < iMaxPelValue; i++ ) 4005 { 4006 iSumOrgSAD += abs( aiCurrHist[i] - aiRefOrgHist[i] ); 4007 } 4008 4009 // Setting 4010 Double dThresholdOrgSAD = getIsDepth() ? 0.1 : 0.05; 4011 4012 if ( iSumOrgSAD > Int( dThresholdOrgSAD * iWidth * iHeight ) ) 4013 { 4014 m_bApplyIC = true; 4015 } 4016 else 4017 { 4018 m_bApplyIC = false; 4019 } 4020 4021 xFree( aiCurrHist ); 4022 xFree( aiRefOrgHist ); 4023 } 4057 4024 }//if(bUseLowLatencyICEnc) 4058 4025 } … … 4087 4054 return; 4088 4055 4089 #if HHI_CAM_PARA_K00524090 4056 m_numViews = getVPS()->getNumViews(); 4091 #endif4092 4057 /// GT: Allocation should be moved to a better place later; 4093 4058 if ( m_depthToDisparityB == NULL ) 4094 4059 { 4095 #if HHI_CAM_PARA_K00524096 4060 m_depthToDisparityB = new Int*[ m_numViews ]; 4097 4061 for ( Int i = 0; i < getVPS()->getNumViews(); i++ ) 4098 #else4099 m_depthToDisparityB = new Int*[ getViewIndex() ];4100 for ( Int i = 0; i < getViewIndex(); i++ )4101 #endif4102 4062 { 4103 4063 m_depthToDisparityB[ i ] = new Int[ Int(1 << g_bitDepthY) ]; … … 4108 4068 if ( m_depthToDisparityF == NULL ) 4109 4069 { 4110 #if HHI_CAM_PARA_K00524111 4070 m_depthToDisparityF = new Int*[ m_numViews ]; 4112 4071 for ( Int i = 0; i < m_numViews; i++ ) 4113 #else4114 m_depthToDisparityF= new Int*[ getViewIndex() ];4115 for ( Int i = 0; i < getViewIndex(); i++ )4116 #endif4117 4072 { 4118 4073 m_depthToDisparityF[ i ] = new Int[ Int(1 << g_bitDepthY) ]; … … 4125 4080 TComVPS* vps = getVPS(); 4126 4081 4127 #if HHI_CAM_PARA_K00524128 4082 Int log2Div = g_bitDepthY - 1 + vps->getCpPrecision(); 4129 4083 Int voiInVps = vps->getVoiInVps( getViewIndex() ); … … 4155 4109 } 4156 4110 } 4157 #else4158 Int log2Div = g_bitDepthY - 1 + vps->getCamParPrecision();4159 4160 Int viewIndex = getViewIndex();4161 4162 Bool camParaSH = vps->hasCamParInSliceHeader( viewIndex );4163 4164 Int* codScale = camParaSH ? m_aaiCodedScale [ 0 ] : vps->getCodedScale ( viewIndex );4165 Int* codOffset = camParaSH ? m_aaiCodedOffset[ 0 ] : vps->getCodedOffset ( viewIndex );4166 Int* invCodScale = camParaSH ? m_aaiCodedScale [ 1 ] : vps->getInvCodedScale ( viewIndex );4167 Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : vps->getInvCodedOffset( viewIndex );4168 4169 for (Int i = 0; i <= ( getViewIndex() - 1); i++)4170 {4171 for ( Int d = 0; d <= ( ( 1 << g_bitDepthY ) - 1 ); d++ )4172 {4173 Int offset = ( codOffset [ i ] << g_bitDepthY ) + ( ( 1 << log2Div ) >> 1 );4174 m_depthToDisparityB[ i ][ d ] = ( codScale [ i ] * d + offset ) >> log2Div;4175 4176 Int invOffset = ( invCodOffset[ i ] << g_bitDepthY ) + ( ( 1 << log2Div ) >> 1 );4177 m_depthToDisparityF[ i ][ d ] = ( invCodScale[ i ] * d + invOffset ) >> log2Div;4178 }4179 }4180 #endif4181 4111 } 4182 4112 #endif … … 4222 4152 Bool depthFlag = getIsDepth(); 4223 4153 4224 #if !HHI_INTER_COMP_PRED_K00524225 Bool depthOfRefViewsAvailFlag = false;4226 Bool textOfCurViewAvailFlag = false;4227 4228 TComVPS* vps = getVPS();4229 4230 if( !depthFlag )4231 {4232 depthOfRefViewsAvailFlag = true;4233 for( Int i = 0; i <= vps->getNumRefListLayers( getLayerId() ) - 1; i++)4234 {4235 Bool curDepthAvailableFlag = false;4236 for (Int j = 0; j <= vps->getMaxLayersMinus1(); j++ )4237 {4238 if ( vps->getDirectDependencyFlag( vps->getLayerIdInVps( getLayerId() ), j )4239 && vps->getVpsDepthFlag ( vps->getLayerIdInNuh( j ) ) == 14240 && vps->getViewOrderIdx( vps->getLayerIdInNuh( j ) ) == vps->getViewOrderIdx( vps->getIdRefListLayer( getLayerId(), i ) )4241 && vps->getDependencyId( vps->getLayerIdInNuh( j ) ) == 04242 && vps->getAuxId ( vps->getLayerIdInNuh( j ) ) == 04243 )4244 {4245 curDepthAvailableFlag = true;4246 }4247 }4248 if ( !curDepthAvailableFlag )4249 {4250 depthOfRefViewsAvailFlag = false;4251 }4252 }4253 }4254 else4255 {4256 for (Int j = 0; j <= vps->getMaxLayersMinus1(); j++ )4257 {4258 if ( vps->getDirectDependencyFlag( vps->getLayerIdInVps( getLayerId() ), j )4259 && vps->getVpsDepthFlag( vps->getLayerIdInNuh( j ) ) == 04260 && vps->getViewOrderIdx( vps->getLayerIdInNuh( j ) ) == getViewIndex()4261 && vps->getDependencyId( vps->getLayerIdInNuh( j ) ) == 04262 && vps->getAuxId ( vps->getLayerIdInNuh( j ) ) == 04263 )4264 {4265 textOfCurViewAvailFlag = true;4266 }4267 }4268 }4269 4270 4271 Bool lidG0 = ( getLayerId() > 0 );4272 Bool nRLLG0 = ( getVPS()->getNumRefListLayers( getLayerId() ) > 0 );4273 4274 TComSps3dExtension* sps3dExt = getSPS()->getSps3dExtension();4275 4276 m_ivMvPredFlag = sps3dExt->getIvMvPredFlag ( depthFlag ) && lidG0 && nRLLG0 ;4277 m_ivMvScalingFlag = sps3dExt->getIvMvScalingFlag ( depthFlag ) && lidG0 ;4278 m_ivResPredFlag = sps3dExt->getIvResPredFlag ( depthFlag ) && lidG0 && nRLLG0 ;4279 m_depthRefinementFlag = sps3dExt->getDepthRefinementFlag ( depthFlag ) && lidG0 && depthOfRefViewsAvailFlag;4280 m_viewSynthesisPredFlag = sps3dExt->getViewSynthesisPredFlag( depthFlag ) && lidG0 && nRLLG0 && depthOfRefViewsAvailFlag;4281 m_depthBasedBlkPartFlag = sps3dExt->getDepthBasedBlkPartFlag( depthFlag ) && lidG0 && depthOfRefViewsAvailFlag;4282 m_mpiFlag = sps3dExt->getMpiFlag ( depthFlag ) && lidG0 && textOfCurViewAvailFlag;4283 m_intraContourFlag = sps3dExt->getIntraContourFlag ( depthFlag ) && lidG0 && textOfCurViewAvailFlag;4284 m_intraSdcWedgeFlag = sps3dExt->getIntraSdcWedgeFlag ( depthFlag ) && lidG0 ;4285 m_qtPredFlag = sps3dExt->getQtPredFlag ( depthFlag ) && lidG0 && textOfCurViewAvailFlag;4286 m_interSdcFlag = sps3dExt->getInterSdcFlag ( depthFlag ) && lidG0 ;4287 #if SEC_DEPTH_INTRA_SKIP_MODE_K00334288 m_depthIntraSkipFlag = sps3dExt->getDepthIntraSkipFlag ( depthFlag ) && lidG0 ;4289 #else4290 m_intraSingleFlag = sps3dExt->getIntraSingleFlag ( depthFlag ) && lidG0 ;4291 #endif4292 4293 m_subPbSize = lidG0 ? ( 1 << ( sps3dExt->getLog2SubPbSizeMinus3 ( depthFlag ) + 3 ) ) : getSPS()->getMaxCUWidth();4294 m_mpiSubPbSize = 1 << ( sps3dExt->getLog2MpiSubPbSizeMinus3( depthFlag ) + 3 );4295 #else4296 4154 Bool nRLLG0 = ( getVPS()->getNumRefListLayers( getLayerId() ) > 0 ); 4297 4155 … … 4301 4159 m_ivMvScalingFlag = sps3dExt->getIvMvScalingFlag ( depthFlag ) ; 4302 4160 m_ivResPredFlag = sps3dExt->getIvResPredFlag ( depthFlag ) && nRLLG0 ; 4303 #if HHI_CAM_PARA_K00524304 4161 m_depthRefinementFlag = sps3dExt->getDepthRefinementFlag ( depthFlag ) && getInCompPredFlag() && m_cpAvailableFlag; 4305 4162 m_viewSynthesisPredFlag = sps3dExt->getViewSynthesisPredFlag( depthFlag ) && nRLLG0 && getInCompPredFlag() && m_cpAvailableFlag; 4306 #else4307 m_depthRefinementFlag = sps3dExt->getDepthRefinementFlag ( depthFlag ) && getInCompPredFlag();4308 m_viewSynthesisPredFlag = sps3dExt->getViewSynthesisPredFlag( depthFlag ) && nRLLG0 && getInCompPredFlag();4309 #endif4310 4163 m_depthBasedBlkPartFlag = sps3dExt->getDepthBasedBlkPartFlag( depthFlag ) && getInCompPredFlag(); 4311 4164 m_mpiFlag = sps3dExt->getMpiFlag ( depthFlag ) && getInCompPredFlag(); … … 4319 4172 m_mpiSubPbSize = 1 << ( sps3dExt->getLog2MpiSubPbSizeMinus3( depthFlag ) + 3 ); 4320 4173 4321 #endif4322 4174 4323 4175 #if H_3D_OUTPUT_ACTIVE_TOOLS … … 4325 4177 std::cout << "DepthFlag: :" << getIsDepth() << std::endl; 4326 4178 std::cout << "ViewOrderIdx: :" << getViewIndex() << std::endl; 4327 #if HHI_INTER_COMP_PRED_K00524328 4179 std::cout << "InterCmpPredAvailableFlag:" << getInCmpPredAvailFlag() << std::endl; 4329 4180 std::cout << "InterCompPredFlag :" << getInCompPredFlag() << std::endl; 4330 //std::cout << "TextOfCurViewAvailFlag :" << textOfCurViewAvailFlag << std::endl;4331 #else4332 std::cout << "DepthOfRefViewsAvailFlag:" << depthOfRefViewsAvailFlag << std::endl;4333 std::cout << "TextOfCurViewAvailFlag :" << textOfCurViewAvailFlag << std::endl;4334 #endif4335 4181 4336 4182 std::cout << "ivMvPredFlag :" << m_ivMvPredFlag << std::endl; … … 4345 4191 std::cout << "qtPredFlag :" << m_qtPredFlag << std::endl; 4346 4192 std::cout << "interSdcFlag :" << m_interSdcFlag << std::endl; 4347 #if SEC_DEPTH_INTRA_SKIP_MODE_K00334348 4193 std::cout << "depthIntraSkipFlag :" << m_depthIntraSkipFlag << std::endl; 4349 #else4350 std::cout << "intraSingleFlag :" << m_intraSingleFlag << std::endl;4351 #endif4352 4194 std::cout << "subPbSize :" << m_subPbSize << std::endl; 4353 4195 std::cout << "mpiSubPbSize :" << m_mpiSubPbSize << std::endl; 4354 4196 #endif 4355 4197 } 4198 4199 Void TComSlice::deriveInCmpPredAndCpAvailFlag() 4200 { 4201 Int numCurCmpLIds = getIsDepth() ? 1 : getNumActiveRefLayerPics(); 4202 std::vector<Int> curCmpLIds; 4203 if ( getIsDepth() ) 4204 { 4205 curCmpLIds.push_back( getLayerId() ); 4206 } 4207 else 4208 { 4209 for (Int i = 0; i < numCurCmpLIds; i++) 4210 { 4211 curCmpLIds.push_back( getRefPicLayerId( i ) ); 4212 } 4213 } 4214 4215 m_cpAvailableFlag = true; 4216 m_inCmpRefViewIdcs.clear(); 4217 Bool allRefCmpLayersAvailFlag = true; 4218 4219 for( Int i = 0; i <= numCurCmpLIds - 1; i++ ) 4220 { 4221 m_inCmpRefViewIdcs.push_back( getVPS()->getViewOrderIdx( curCmpLIds[ i ] )); 4222 if( !getVPS()->getCpPresentFlag( getVPS()->getVoiInVps( getViewIndex() ), getVPS()->getVoiInVps( m_inCmpRefViewIdcs[ i ] ) ) ) 4223 { 4224 m_cpAvailableFlag = false; 4225 } 4226 Bool refCmpCurLIdAvailFlag = false; 4227 if( getVPS()->getViewCompLayerPresentFlag( m_inCmpRefViewIdcs[ i ], !getIsDepth() ) ) 4228 { 4229 Int j = getVPS()->getLayerIdInVps( getVPS()->getViewCompLayerId( m_inCmpRefViewIdcs[ i ], !getIsDepth() ) ); 4230 if ( getVPS()->getDirectDependencyFlag( getVPS()->getLayerIdInVps( getLayerId() ) , j ) && 4231 getVPS()->getSubLayersVpsMaxMinus1( j ) >= getTemporalId() && 4232 ( getTemporalId() == 0 || getVPS()->getMaxTidIlRefPicsPlus1( j , getVPS()->getLayerIdInVps( getLayerId() ) ) > getTemporalId() ) 4233 ) 4234 { 4235 refCmpCurLIdAvailFlag = true; 4236 } 4237 } 4238 if( !refCmpCurLIdAvailFlag ) 4239 { 4240 allRefCmpLayersAvailFlag = false; 4241 } 4242 } 4243 4244 if( !allRefCmpLayersAvailFlag ) 4245 { 4246 m_inCmpPredAvailFlag = false; 4247 } 4248 else 4249 { 4250 TComSps3dExtension* sps3dExt = getSPS()->getSps3dExtension(); 4251 if( !getIsDepth() ) 4252 { 4253 m_inCmpPredAvailFlag = sps3dExt->getViewSynthesisPredFlag( getIsDepth() ) || 4254 sps3dExt->getDepthBasedBlkPartFlag( getIsDepth() ) || 4255 sps3dExt->getDepthRefinementFlag ( getIsDepth() ); 4256 } 4257 else 4258 { 4259 m_inCmpPredAvailFlag = sps3dExt->getIntraContourFlag( getIsDepth() ) || 4260 sps3dExt->getQtPredFlag( getIsDepth() ) || 4261 sps3dExt->getMpiFlag( getIsDepth() ); 4262 } 4263 } 4264 } 4265 4266 Void TComSlice::checkInCompPredRefLayers() 4267 { 4268 if ( getInCompPredFlag() ) 4269 { 4270 for (Int i = 0; i < getNumCurCmpLIds(); i++ ) 4271 { 4272 assert( getIvPic(!getIsDepth(), getInCmpRefViewIdcs( i ) ) != NULL ); 4273 // It is a requirement of bitstream conformance that there 4274 // is a picture in the DPB with PicOrderCntVal equal to the PicOrderCntVal of the current picture, 4275 // and a nuh_layer_id value equal to ViewCompLayerId[ inCmpRefViewIdcs[ i ] ][ !DepthFlag ]. 4276 } 4277 } 4278 } 4279 4356 4280 #endif 4357 4281 -
trunk/source/Lib/TLibCommon/TComSlice.h
r1179 r1196 912 912 Int xGetDimBitOffset( Int j ); 913 913 Void xSetRefLayerFlags( Int currLayerId ); 914 914 915 // VPS EXTENSION 2 SYNTAX ELEMENTS 915 916 #if H_3D 916 #if HHI_CAM_PARA_K0052917 917 Int* m_numCp; 918 918 Int** m_cpRefVoi; … … 920 920 Int m_cpPrecision; 921 921 Bool* m_cpInSliceSegmentHeaderFlag; 922 #else923 UInt m_uiCamParPrecision;924 Bool* m_bCamParInSliceHeader;925 Bool* m_bCamParPresent;926 #endif927 922 Int ***m_aaaiCodedScale ; 928 923 Int ***m_aaaiCodedOffset; 929 924 930 #if HHI_VIEW_ID_LIST_I5_J0107 || HHI_INTER_COMP_PRED_K0052931 925 std::vector<Int> m_viewOIdxList; 932 #endif933 #if HHI_INTER_COMP_PRED_K0052934 926 std::vector< std::vector<Bool> > m_viewCompLayerPresentFlag; 935 927 std::vector< std::vector<Int> > m_viewCompLayerId; 936 #endif937 928 #endif 938 929 … … 1021 1012 Void setVpsNonVuiExtensionLength( Int val ) { m_vpsNonVuiExtensionLength = val; } 1022 1013 Int getVpsNonVuiExtensionLength( ) { return m_vpsNonVuiExtensionLength; } 1023 1014 1015 // VPS Extension 1024 1016 Void setSplittingFlag( Bool val ) { m_splittingFlag = val; } 1025 1017 Bool getSplittingFlag() { return m_splittingFlag; } … … 1163 1155 Int getNumViews() { return m_numViews; } 1164 1156 Void initNumViews(); 1165 #if HHI_INTER_COMP_PRED_K00521166 1157 #if H_3D 1167 Void initViewCompLayer( ) 1168 { 1169 assert( m_viewCompLayerId.size() == 0 && m_viewCompLayerPresentFlag.size() == 0 ); 1170 for( Int i = 0; i < getNumViews(); i++ ) 1171 { 1172 m_viewCompLayerId .push_back( std::vector<Int>(0) ); 1173 m_viewCompLayerPresentFlag.push_back( std::vector<Bool>(0) ); 1174 1175 for( Int depFlag = 0; depFlag <= 1; depFlag++ ) 1176 { 1177 Int iViewOIdx = getViewOIdxList( i ); 1178 Int layerId = -1; 1179 for( Int j = 0; j <= getMaxLayersMinus1(); j++ ) 1180 { 1181 Int jNuhLId = getLayerIdInNuh( j ); 1182 if( getVpsDepthFlag( jNuhLId ) == ( (Bool) depFlag ) && getViewOrderIdx( jNuhLId ) == iViewOIdx 1183 && getDependencyId( jNuhLId ) == 0 && getAuxId( jNuhLId ) == 0 ) 1184 { 1185 layerId = jNuhLId; 1186 } 1187 } 1188 m_viewCompLayerPresentFlag[ i ].push_back( layerId != -1 ); 1189 m_viewCompLayerId [ i ].push_back( layerId ); 1190 } 1191 } 1192 }; 1193 #endif 1194 #endif 1195 1196 #if HHI_VIEW_ID_LIST_I5_J0107 || HHI_INTER_COMP_PRED_K0052 1158 Void initViewCompLayer( ); 1197 1159 Int getViewOIdxList( Int i ) { return m_viewOIdxList[i]; } 1198 #if HHI_CAM_PARA_K00521199 1160 std::vector<Int> getViewOIdxList( ) { return m_viewOIdxList; } 1200 #endif 1201 #endif 1202 1203 #if HHI_INTER_COMP_PRED_K0052 1204 #if HHI_CAM_PARA_K0052 1205 Int getVoiInVps( Int viewOIdx ) 1206 #else 1207 Int getInvViewOIdxList( Int viewOIdx ) 1208 #endif 1209 { 1210 for ( Int i = 0; i < m_viewOIdxList.size(); i++ ) 1211 { 1212 if ( m_viewOIdxList[ i ] == viewOIdx ) 1213 { 1214 return i; 1215 } 1216 } 1217 assert( 0 ); 1218 return -1; 1219 }; 1220 1221 #if HHI_CAM_PARA_K0052 1161 1162 Int getVoiInVps( Int viewOIdx );; 1163 1222 1164 Bool getViewCompLayerPresentFlag (Int i, Bool d ) { return m_viewCompLayerPresentFlag[ getVoiInVps(i) ][d]; } 1223 1165 Bool getViewCompLayerId (Int i, Bool d ) { return m_viewCompLayerId [ getVoiInVps(i) ][d]; } 1224 #else1225 Bool getViewCompLayerPresentFlag (Int i, Bool d ) { return m_viewCompLayerPresentFlag[ getInvViewOIdxList(i) ][d]; }1226 Bool getViewCompLayerId (Int i, Bool d ) { return m_viewCompLayerId [ getInvViewOIdxList(i) ][d]; }1227 #endif1228 1166 #endif 1229 1167 Bool getDependencyFlag( Int i, Int j ) { return m_dependencyFlag[i][j]; } … … 1347 1285 Void createCamPars(Int iNumViews); 1348 1286 Void deleteCamPars(); 1349 #if HHI_CAM_PARA_K00521350 1287 Void initCamParaVPS( Int vOIdxInVps, Int numCp, Bool cpInSliceSegmentHeaderFlag, Int* cpRefVoi, Int** aaiScale, Int** aaiOffset ); 1351 #else 1352 Void initCamParaVPS ( UInt uiViewIndex, Bool bCamParPresent = false, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); 1353 #endif 1354 1355 #if HHI_CAM_PARA_K0052 1288 1356 1289 1357 1290 Void setCpPrecision( Int val ) { m_cpPrecision = val; } … … 1380 1313 1381 1314 // Derived 1382 Void deriveCpPresentFlag( ) 1383 { 1384 for( Int nInVps = 0; nInVps < getNumViews(); nInVps++ ) 1385 { 1386 for( Int mInVps = 0; mInVps < getNumViews(); mInVps++ ) 1387 { 1388 m_cpPresentFlag[nInVps][mInVps] = 0; 1389 } 1390 } 1391 1392 for( Int n = 1; n < getNumViews(); n++ ) 1393 { 1394 Int iInVps = getVoiInVps( getViewOIdxList( n ) ); 1395 for( Int m = 0; m < getNumCp( iInVps ); m++ ) 1396 { 1397 m_cpPresentFlag[ iInVps ][ getVoiInVps( getCpRefVoi( iInVps, m ) ) ] = 1; 1398 } 1399 } 1400 } 1315 Void deriveCpPresentFlag( ); 1401 1316 1402 1317 Void setCpPresentFlag( Int i, Int m, Bool flag ) { m_cpPresentFlag[i][m] = flag; } 1403 1318 Bool getCpPresentFlag( Int i, Int m ) { return m_cpPresentFlag[i][m]; } 1404 1319 1405 #else1406 UInt getCamParPrecision () { return m_uiCamParPrecision; }1407 1408 Bool getCamParPresent ( Int viewIndex ) { return m_bCamParPresent[viewIndex]; }1409 Void setCamParPresent ( Int viewIndex, Bool val ) { m_bCamParPresent[viewIndex] = val; }1410 Bool hasCamParInSliceHeader( Int viewIndex ) { return m_bCamParInSliceHeader[viewIndex]; }1411 Void setHasCamParInSliceHeader( Int viewIndex, Bool b ) { m_bCamParInSliceHeader[viewIndex] = b; }1412 #endif1413 1320 1414 1321 … … 1705 1612 m_qtPredFlag [d] = false; 1706 1613 m_interSdcFlag [d] = false; 1707 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331708 1614 m_depthIntraSkipFlag [d] = false; 1709 #else1710 m_intraSingleFlag [d] = false;1711 #endif1712 1615 } 1713 1616 } … … 1752 1655 Bool getInterSdcFlag( Int d ) { return m_interSdcFlag[d]; } 1753 1656 1754 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331755 1657 Void setDepthIntraSkipFlag( Int d, Bool flag ) { m_depthIntraSkipFlag[d] = flag; } 1756 1658 Bool getDepthIntraSkipFlag( Int d ) { return m_depthIntraSkipFlag[d]; } 1757 #else1758 Void setIntraSingleFlag( Int d, Bool flag ) { m_intraSingleFlag[d] = flag; }1759 Bool getIntraSingleFlag( Int d ) { return m_intraSingleFlag[d]; }1760 #endif1761 1659 1762 1660 private: … … 1775 1673 Bool m_qtPredFlag [2]; 1776 1674 Bool m_interSdcFlag [2]; 1777 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331778 1675 Bool m_depthIntraSkipFlag [2]; 1779 #else1780 Bool m_intraSingleFlag [2];1781 #endif1782 1676 }; 1783 1677 … … 1884 1778 #if H_3D 1885 1779 TComSps3dExtension m_sps3dExtension; 1886 #if !HHI_CAM_PARA_K00521887 UInt m_uiCamParPrecision;1888 Bool m_bCamParInSliceHeader;1889 #endif1890 1780 Int m_aaiCodedScale [2][MAX_NUM_LAYERS]; 1891 1781 Int m_aaiCodedOffset[2][MAX_NUM_LAYERS]; … … 2517 2407 UInt m_nARPStepNum; 2518 2408 Int m_aiFirstTRefIdx [2]; 2519 #if HHI_RES_PRED_K00522520 2409 std::vector<Int> m_pocsInCurrRPSs; 2521 #endif2522 2410 #endif 2523 2411 #if H_3D_IC … … 2526 2414 #endif 2527 2415 #if H_3D 2528 #if HHI_INTER_COMP_PRED_K00522529 2416 std::vector<Int> m_inCmpRefViewIdcs; 2530 2417 Bool m_inCmpPredAvailFlag; 2531 2418 Bool m_inCmpPredFlag; 2532 #endif2533 #if HHI_CAM_PARA_K00522534 2419 Bool m_cpAvailableFlag; 2535 2420 Int m_numViews; 2536 #endif2537 2421 TComPic* m_ivPicsCurrPoc [2][MAX_NUM_LAYERS]; 2538 2422 Int** m_depthToDisparityB; … … 2540 2424 #endif 2541 2425 #endif 2542 #if SEC_DEPTH_INTRA_SKIP_MODE_K00332543 2426 Bool m_bApplyDIS; 2544 #else2545 #if H_3D_SINGLE_DEPTH2546 Bool m_bApplySingleDepthMode;2547 #endif2548 #endif2549 2427 #if H_3D_IC 2550 Int *m_aICEnableCandidate;2551 Int *m_aICEnableNum;2428 Int* m_aICEnableCandidate; 2429 Int* m_aICEnableNum; 2552 2430 #endif 2553 2431 Int m_iDefaultRefViewIdx; … … 2565 2443 Bool m_qtPredFlag ; 2566 2444 Bool m_interSdcFlag ; 2567 #if SEC_DEPTH_INTRA_SKIP_MODE_K00332568 2445 Bool m_depthIntraSkipFlag ; 2569 #else2570 Bool m_intraSingleFlag ;2571 #endif2572 2446 Int m_mpiSubPbSize ; 2573 2447 Int m_subPbSize ; … … 2637 2511 Int getRefPOC ( RefPicList e, Int iRefIdx) { return m_aiRefPOCList[e][iRefIdx]; } 2638 2512 #if H_3D 2639 #if HHI_INTER_COMP_PRED_K00522640 2513 Bool getInCmpPredAvailFlag( ) { return m_inCmpPredAvailFlag; } 2641 #if HHI_CAM_PARA_K00522642 2514 Bool getCpAvailableFlag( ) { return m_cpAvailableFlag; } 2643 #endif2644 2515 Bool getInCompPredFlag( ) { return m_inCmpPredFlag; } 2645 2516 Void setInCompPredFlag( Bool b ) { m_inCmpPredFlag = b; } 2646 2517 Int getInCmpRefViewIdcs( Int i ) { return m_inCmpRefViewIdcs [i]; } 2647 2518 Int getNumCurCmpLIds( ) { return (Int) m_inCmpRefViewIdcs.size(); } 2648 #endif2649 2519 TComPic* getIvPic ( Bool depthFlag, Int viewIndex){ return m_ivPicsCurrPoc[ depthFlag ? 1 : 0 ][ viewIndex ]; } 2650 2520 #endif … … 2875 2745 Void setFirstTRefIdx ( RefPicList e, Int i ) { m_aiFirstTRefIdx[e] = i; } 2876 2746 Bool getArpRefPicAvailable( RefPicList e, Int viewIdx) {return m_arpRefPicAvailable[e][getVPS()->getLayerIdInNuh(viewIdx, 0)]; } 2877 #if HHI_RES_PRED_K00522878 2747 std::vector<Int> getPocsInCurrRPSs() { return m_pocsInCurrRPSs; }; 2879 #endif2880 2748 #endif 2881 2749 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } … … 2886 2754 Int* getInvCodedScale () { return m_aaiCodedScale [1]; } 2887 2755 Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; } 2888 #if HHI_CAM_PARA_K00522889 2756 Void setCpScale( Int j, Int val ) { m_aaiCodedScale[0][j] = val; } 2890 2757 Int getCpScale( Int j ) { return m_aaiCodedScale[0][j]; } … … 2898 2765 Void setCpInvOff( Int j, Int val ) { m_aaiCodedOffset[1][j] = val; } 2899 2766 Int getCpInvOff( Int j ) { return m_aaiCodedOffset[1][j]; } 2900 #endif2901 2767 2902 2768 #endif … … 2906 2772 Void setDepthToDisparityLUTs(); 2907 2773 2908 #if HHI_CAM_PARA_K00522909 2774 Int* getDepthToDisparityB( Int refViewIdx ) { return m_depthToDisparityB[ getVPS()->getVoiInVps( refViewIdx) ]; }; 2910 2775 Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ getVPS()->getVoiInVps( refViewIdx) ]; }; 2911 #else2912 Int* getDepthToDisparityB( Int refViewIdx ) { return m_depthToDisparityB[ refViewIdx ]; };2913 Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ refViewIdx ]; };2914 #endif2915 2776 #endif 2916 2777 #if H_3D_IC … … 3015 2876 #if H_3D 3016 2877 // 3D-HEVC tool parameters 3017 #if HHI_INTER_COMP_PRED_K0052 3018 Void deriveInCmpPredAndCpAvailFlag() 3019 { 3020 Int numCurCmpLIds = getIsDepth() ? 1 : getNumActiveRefLayerPics(); 3021 std::vector<Int> curCmpLIds; 3022 if ( getIsDepth() ) 3023 { 3024 curCmpLIds.push_back( getLayerId() ); 3025 } 3026 else 3027 { 3028 for (Int i = 0; i < numCurCmpLIds; i++) 3029 { 3030 curCmpLIds.push_back( getRefPicLayerId( i ) ); 3031 } 3032 } 3033 3034 #if HHI_CAM_PARA_K0052 3035 m_cpAvailableFlag = true; 3036 m_inCmpRefViewIdcs.clear(); 3037 #endif 3038 Bool allRefCmpLayersAvailFlag = true; 3039 3040 for( Int i = 0; i <= numCurCmpLIds - 1; i++ ) 3041 { 3042 m_inCmpRefViewIdcs.push_back( getVPS()->getViewOrderIdx( curCmpLIds[ i ] )); 3043 #if HHI_CAM_PARA_K0052 3044 if( !getVPS()->getCpPresentFlag( getVPS()->getVoiInVps( getViewIndex() ), getVPS()->getVoiInVps( m_inCmpRefViewIdcs[ i ] ) ) ) 3045 { 3046 m_cpAvailableFlag = false; 3047 } 3048 #endif 3049 Bool refCmpCurLIdAvailFlag = false; 3050 if( getVPS()->getViewCompLayerPresentFlag( m_inCmpRefViewIdcs[ i ], !getIsDepth() ) ) 3051 { 3052 Int j = getVPS()->getLayerIdInVps( getVPS()->getViewCompLayerId( m_inCmpRefViewIdcs[ i ], !getIsDepth() ) ); 3053 if ( getVPS()->getDirectDependencyFlag( getVPS()->getLayerIdInVps( getLayerId() ) , j ) && 3054 getVPS()->getSubLayersVpsMaxMinus1( j ) >= getTemporalId() && 3055 ( getTemporalId() == 0 || getVPS()->getMaxTidIlRefPicsPlus1( j , getVPS()->getLayerIdInVps( getLayerId() ) ) > getTemporalId() ) 3056 ) 3057 { 3058 refCmpCurLIdAvailFlag = true; 3059 } 3060 } 3061 if( !refCmpCurLIdAvailFlag ) 3062 { 3063 allRefCmpLayersAvailFlag = false; 3064 } 3065 } 3066 3067 if( !allRefCmpLayersAvailFlag ) 3068 { 3069 m_inCmpPredAvailFlag = false; 3070 } 3071 else 3072 { 3073 TComSps3dExtension* sps3dExt = getSPS()->getSps3dExtension(); 3074 if( !getIsDepth() ) 3075 { 3076 m_inCmpPredAvailFlag = sps3dExt->getViewSynthesisPredFlag( getIsDepth() ) || 3077 sps3dExt->getDepthBasedBlkPartFlag( getIsDepth() ) || 3078 sps3dExt->getDepthRefinementFlag ( getIsDepth() ); 3079 } 3080 else 3081 { 3082 m_inCmpPredAvailFlag = sps3dExt->getIntraContourFlag( getIsDepth() ) || 3083 sps3dExt->getQtPredFlag( getIsDepth() ) || 3084 sps3dExt->getMpiFlag( getIsDepth() ); 3085 } 3086 } 3087 }; 3088 3089 #endif 3090 2878 Void deriveInCmpPredAndCpAvailFlag(); 3091 2879 Void init3dToolParameters(); 3092 #if HHI_INTER_COMP_PRED_K0052 3093 Void checkInCompPredRefLayers() 3094 { 3095 if ( getInCompPredFlag() ) 3096 { 3097 for (Int i = 0; i < getNumCurCmpLIds(); i++ ) 3098 { 3099 assert( getIvPic(!getIsDepth(), getInCmpRefViewIdcs( i ) ) != NULL ); 3100 // It is a requirement of bitstream conformance that there 3101 // is a picture in the DPB with PicOrderCntVal equal to the PicOrderCntVal of the current picture, 3102 // and a nuh_layer_id value equal to ViewCompLayerId[ inCmpRefViewIdcs[ i ] ][ !DepthFlag ]. 3103 } 3104 } 3105 }; 3106 3107 #endif 2880 Void checkInCompPredRefLayers();; 2881 3108 2882 Bool getIvMvPredFlag ( ) { return m_ivMvPredFlag ; }; 3109 2883 Bool getIvMvScalingFlag ( ) { return m_ivMvScalingFlag ; }; … … 3117 2891 Bool getQtPredFlag ( ) { return m_qtPredFlag ; }; 3118 2892 Bool getInterSdcFlag ( ) { return m_interSdcFlag ; }; 3119 #if SEC_DEPTH_INTRA_SKIP_MODE_K00333120 2893 Bool getDepthIntraSkipFlag ( ) { return m_depthIntraSkipFlag ; }; 3121 #else3122 Bool getIntraSingleFlag ( ) { return m_intraSingleFlag ; };3123 #endif3124 2894 3125 2895 Int getMpiSubPbSize ( ) { return m_mpiSubPbSize ; }; -
trunk/source/Lib/TLibCommon/TComWedgelet.cpp
r1179 r1196 177 177 } 178 178 179 #if SHARP_DMM_CLEAN_K0042180 179 Void TComWedgelet::generateWedgePatternByRotate(const TComWedgelet &rcWedge, Int rotate) 181 180 { … … 210 209 m_uiHeight = rcWedge.m_uiHeight; 211 210 } 212 #endif213 211 214 212 Void TComWedgelet::xGenerateWedgePattern() … … 228 226 xDrawEdgeLine( uhXs, uhYs, uhXe, uhYe, pbTempPattern, iTempStride ); 229 227 230 #if SHARP_DMM_CLEAN_K0042231 228 Int shift = (m_eWedgeRes == HALF_PEL) ? 1 : 0; 232 229 Int endPos = uhYe>>shift; … … 242 239 m_pbPattern[k] = pbTempPattern[k]; 243 240 }; 244 #else245 switch( m_uhOri )246 {247 case( 0 ): { for( UInt iX = 0; iX < uhXs; iX++ ) { UInt iY = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iY++; } } } break;248 case( 1 ): { for( UInt iY = 0; iY < uhYs; iY++ ) { UInt iX = uiTempBlockSize-1; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iX--; } } } break;249 case( 2 ): { for( UInt iX = uiTempBlockSize-1; iX > uhXs; iX-- ) { UInt iY = uiTempBlockSize-1; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iY--; } } } break;250 case( 3 ): { for( UInt iY = uiTempBlockSize-1; iY > uhYs; iY-- ) { UInt iX = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iX++; } } } break;251 case( 4 ):252 {253 if( (uhXs+uhXe) < uiTempBlockSize ) { for( UInt iY = 0; iY < uiTempBlockSize; iY++ ) { UInt iX = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iX++; } } }254 else { for( UInt iY = 0; iY < uiTempBlockSize; iY++ ) { UInt iX = uiTempBlockSize-1; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iX--; } } }255 }256 break;257 case( 5 ):258 {259 if( (uhYs+uhYe) < uiTempBlockSize ) { for( UInt iX = 0; iX < uiTempBlockSize; iX++ ) { UInt iY = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iY++; } } }260 else { for( UInt iX = 0; iX < uiTempBlockSize; iX++ ) { UInt iY = uiTempBlockSize-1; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iY--; } } }261 }262 }263 264 clear();265 switch( m_eWedgeRes )266 {267 case( FULL_PEL ): { for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) { m_pbPattern[k] = pbTempPattern[k]; }; } break;268 case( HALF_PEL ): // sub-sampling by factor 2269 {270 Int iStride = getStride();271 272 UInt uiOffX, uiOffY;273 switch( m_uhOri )274 {275 case( 0 ): { uiOffX = 0; uiOffY = 0; } break;276 case( 1 ): { uiOffX = 1; uiOffY = 0; } break;277 case( 2 ): { uiOffX = 1; uiOffY = 1; } break;278 case( 3 ): { uiOffX = 0; uiOffY = 1; } break;279 case( 4 ):280 {281 if( (uhXs+uhXe) < uiTempBlockSize ) { uiOffX = 0; uiOffY = 0; }282 else { uiOffX = 1; uiOffY = 0; }283 }284 break;285 case( 5 ):286 {287 if( (uhYs+uhYe) < uiTempBlockSize ) { uiOffX = 0; uiOffY = 0; }288 else { uiOffX = 0; uiOffY = 1; }289 }290 break;291 default: { uiOffX = 0; uiOffY = 0; } break;292 }293 294 for(Int iY = 0; iY < m_uiHeight; iY++)295 {296 for(Int iX = 0; iX < m_uiWidth; iX++)297 {298 m_pbPattern[(iY * iStride) + iX] = pbTempPattern[(((iY<<1)+uiOffY) * iTempStride) + ((iX<<1)+uiOffX)];299 }300 }301 }302 break;303 }304 #endif305 241 306 242 if( pbTempPattern ) … … 345 281 for( Int x = x0; x <= x1; x++ ) 346 282 { 347 #if SHARP_DMM_CLEAN_K0042348 283 Int shift = (m_eWedgeRes == HALF_PEL) ? 1 : 0; 349 284 Int stride = iPatternStride >> shift; 350 285 if( steep ) { pbPattern[((x>>shift) * stride) + (y>>shift)] = true; } 351 286 else { pbPattern[((y>>shift) * stride) + (x>>shift)] = true; } 352 #else353 if( steep ) { pbPattern[(x * iPatternStride) + y] = true; }354 else { pbPattern[(y * iPatternStride) + x] = true; }355 #endif356 287 357 288 error += deltaerr; -
trunk/source/Lib/TLibCommon/TComWedgelet.h
r1179 r1196 124 124 Bool* getScaledPattern(UInt uiWidth); 125 125 126 #if SHARP_DMM_CLEAN_K0042127 126 Void generateWedgePatternByRotate(const TComWedgelet &rcWedge, Int rotate); 128 #endif129 127 Void setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes, Bool bIsCoarse = false ); 130 128 Void findClosestAngle(); -
trunk/source/Lib/TLibCommon/TypeDef.h
r1179 r1196 65 65 #define H_3D ( HEVC_EXT == 2) 66 66 67 #if H_MV 68 #define SONY_MV_V_CONST_C0078 1 // Control disparity vector search range via configuration file 69 #define H_MV_FIX_CONF_WINDOW 1 70 #endif 71 72 #define NTT_BUG_FIX_TK54 1 73 #define BUG_FIX_TK65 1 74 75 #define MTK_I0093 1 76 77 #define RWTH_DBBP_NO_SATD_K0028 1 67 78 68 ///////////////////////////////////////////////////////////////////////////////////////// 79 69 /////////////////////////////////// MAJOR DEFINES /////////////////////////////////// … … 85 75 86 76 #if H_3D 87 #define SEC_DEPTH_INTRA_SKIP_MODE_K0033 1 // Depth intra skip mode88 89 #if SEC_DEPTH_INTRA_SKIP_MODE_K003390 #define NEIGHBORING_PIX_AVAILABILITY_FIX 191 #endif92 93 94 77 #define H_3D_QTLPC 1 // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068 95 78 // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units … … 129 112 // SHARP_ARP_CHROMA_I0104 130 113 // MTK_I0072_IVARP_SCALING_FIX 131 #define SEC_ARP_VIEW_REF_CHECK_J0037 1 // Signaling iv_res_pred_weight_idx when the current slice has both view and temporal reference picture(s), JCT3V-J0037 item1 132 133 #define SEC_ARP_REM_ENC_RESTRICT_K0035 1 // Removal of encoder restriction of ARP, JCT3V-K0035 114 // SEC_ARP_VIEW_REF_CHECK_J0037 Signaling iv_res_pred_weight_idx when the current slice has both view and temporal reference picture(s), JCT3V-J0037 item1 115 // SEC_ARP_REM_ENC_RESTRICT_K0035 Removal of encoder restriction of ARP, JCT3V-K0035 134 116 135 117 #define H_3D_IC 1 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060 … … 200 182 // SEC_ADAPT_DISABLE_IVMP Disabling IVMP merge candidates when IC is enabled, JCT3V-H0070 201 183 // SEC_SIMP_SHIFTED_DV_I0086 Simplification of Shifted DV candidate, JCT3V-I0086 202 203 #define SEC_SHIFTED_IVMC_POS_K0036 1 // Position Derivation for Shifted-IVMC, JCT3V-K0036 184 // SEC_SHIFTED_IVMC_POS_K0036 Position Derivation for Shifted-IVMC, JCT3V-K0036 204 185 205 186 206 187 #define H_3D_TMVP 1 // QC_TMVP_C0047 207 188 // Sony_M23639 208 #if H_3D_TMVP 209 #define H_3D_TMVP_SCALING_FIX_K0053 1 // QC/CY for K0053 210 #endif 189 // H_3D_TMVP_SCALING_FIX_K0053 1 // QC/CY for K0053 190 211 191 212 192 #define H_3D_DIM 1 // DIM, Depth intra modes, includes: … … 249 229 // MTK_DLT_CODING_FIX_H0091 250 230 // HS_DMM_SIGNALLING_I0120 251 // SHARP_DMM1_I0110 //LUT size reduction for DMM1 proposed in JCT3V-I0110231 // SHARP_DMM1_I0110 LUT size reduction for DMM1 proposed in JCT3V-I0110 252 232 // FAST_SDC_OFFSET_DECISION_I0084 253 233 // SEPARATE_FLAG_I0085 … … 256 236 // MTK_DMM_SIM_J0035 257 237 // MTK_J0033 258 // SHARP_DLT_SIMP_J0029 1 // DLT(DepthValue2Idx[]) table derivation cleanup 259 260 #if !SEC_DEPTH_INTRA_SKIP_MODE_K0033 261 #define H_3D_SINGLE_DEPTH 1 // Single depth mode proposed in JCT3V-I0095 262 // HS_SP_SIMP_J0066 263 // SINGLE_DEPTH_SIMP_J0115 1 264 // MTK_SINGLE_DEPTH_VPS_FLAG_J0060 1 // Add VPS control flags and remove slice header control flag for single depth, JCT3V-J0060 265 #endif 238 // SHARP_DLT_SIMP_J0029 DLT(DepthValue2Idx[]) table derivation cleanup 239 // SHARP_DMM_CLEAN_K0042 1 // Generate DMM pattern with rotation 240 266 241 267 242 #define H_3D_INTER_SDC 1 // INTER SDC, Inter simplified depth coding … … 269 244 // SEC_INTER_SDC_G0101 Improved inter SDC with multiple DC candidates 270 245 271 #define H_3D_SPIVMP 1 // H_3D_SPIVMP //JCT3V-F0110: Sub-PU level inter-view motion prediction246 #define H_3D_SPIVMP 1 // H_3D_SPIVMP JCT3V-F0110: Sub-PU level inter-view motion prediction 272 247 // SEC_SPIVMP_MCP_SIZE_G0077, Apply SPIVMP only to 2Nx2N partition, JCT3V-G0077 273 248 // QC_SPIVMP_MPI_G0119 Sub-PU level MPI merge candidate … … 280 255 // SEC_DBBP_FILTERING_H0104 281 256 // MTK_DBBP_SIGNALING_H0094 282 // H_3D_FIX_DBBP_IVMP 283 // SEC_DBBP_EXPLICIT_SIG_I0077 1 //Remove the partition derivation and signal dbbp_flag only when the partition mode is 2NxN/Nx2N, JCT3V-I0077257 // H_3D_FIX_DBBP_IVMP Fix . Enable IVMP is always disabled, when DBBP is enabled. The original intention is to disable Sub-PU IVMP when DBBP is enabled, not to disable IVMP itself. 258 // SEC_DBBP_EXPLICIT_SIG_I0077 Remove the partition derivation and signal dbbp_flag only when the partition mode is 2NxN/Nx2N, JCT3V-I0077 284 259 // Disallow DBBP in 8x8 CU, JCT3V-I0078 285 // SHARP_DBBP_SIMPLE_FLTER_I0109 1 // Simple condition and one dimensional filter for DBBP 286 // SEC_DBBP_DMM4_THRESHOLD_I0076 Simplification of threshold derivation for DBBP and DMM4, JCT3V-I0076 287 // SEC_DBBP_VIEW_REF_CHECK_J0037 1 // Signaling dbbp_flag when the current slice has view reference picture(s), JCT3V-J0037 item4 288 #define HS_DBBP_CLEAN_K0048 1 260 // SHARP_DBBP_SIMPLE_FLTER_I0109 Simple condition and one dimensional filter for DBBP 261 // SEC_DBBP_DMM4_THRESHOLD_I0076 Simplification of threshold derivation for DBBP and DMM4, JCT3V-I0076 262 // SEC_DBBP_VIEW_REF_CHECK_J0037 Signaling dbbp_flag when the current slice has view reference picture(s), JCT3V-J0037 item4 263 // RWTH_DBBP_NO_SATD_K0028 264 // HS_DBBP_CLEAN_K0048 289 265 290 266 #define H_3D_DDD 1 // Disparity derived depth coding 291 267 // LGE_DDD_REMOVAL_J0042_J0030 DDD removal 292 268 269 #define H_3D_DIS 1 // Depth intra skip 270 // SEC_DEPTH_INTRA_SKIP_MODE_K0033 Depth intra skip mode 271 293 272 #define H_3D_FCO 0 // Flexible coding order for 3D 294 #if H_3D_FCO295 #define H_3D_FCO 1296 #endif297 273 298 274 #define H_3D_FAST_INTRA_SDC 1 // I0123 … … 300 276 // OTHERS 301 277 // MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 // Progressive MV Compression, JCT3V-E0170 302 #define H_3D_REN_MAX_DEV_OUT 0 // Output maximal possible shift deviation 278 303 279 #define H_3D_FAST_TEXTURE_ENCODING 1 // Fast merge mode decision and early CU determination for texture component of dependent view, JCT3V-E0173 304 280 // MTK_FAST_TEXTURE_ENCODING_E0173 305 281 #if H_3D_DIM 306 #define H_3D_FAST_DEPTH_INTRA 1 // Fast DMM and RBC ModeSelection282 #define H_3D_FAST_DEPTH_INTRA 1 // Fast DMM Selection 307 283 // SCU_HS_FAST_DEPTH_INTRA_E0238_HHIFIX 308 284 #endif 309 285 310 286 //HLS 311 //HHI_DEPENDENCY_SIGNALLING_I1_J0107 312 //HHI_TOOL_PARAMETERS_I2_J0107 313 //HHI_VPS_3D_EXTENSION_I3_J0107 287 // HHI_DEPENDENCY_SIGNALLING_I1_J0107 288 // HHI_TOOL_PARAMETERS_I2_J0107 289 // HHI_VPS_3D_EXTENSION_I3_J0107 290 // HHI_INTER_COMP_PRED_K0052 291 // HHI_RES_PRED_K0052 292 // HHI_CAM_PARA_K0052 293 // H_3D_DIRECT_DEP_TYPE 314 294 315 295 // Rate Control … … 319 299 #endif // H_3D 320 300 321 322 323 301 ///////////////////////////////////////////////////////////////////////////////////////// 324 302 /////////////////////////////////// DERIVED DEFINES /////////////////////////////////// 325 303 ///////////////////////////////////////////////////////////////////////////////////////// 326 304 327 // Fixes328 329 #define FIX_TICKET_95 1 // pps_scaling_list_ref_layer_id parsing330 331 305 #if H_3D 332 306 #define H_3D_DISABLE_CHROMA 1 333 #define HHI_VIEW_ID_LIST_I5_J0107 0334 #define HHI_INTER_COMP_PRED_K0052 1335 #define HHI_RES_PRED_K0052 1336 #define HHI_CAM_PARA_K0052 1337 #define HHI_MOVE_SYN_K0052 1338 #define H_3D_ANNEX_SELECTION_FIX 1339 #define H_3D_TMVP_FIX_TICKET_97 1340 #define H_3D_DIRECT_DEP_TYPE 1341 #define H_3D_FIX_TMVP_SCALING_VIEW_ID 1342 #endif343 #define H_MV_FIX_REF_LAYER_PIC_FLAG 1344 #define H_MV_FIX_NUM_VIEWS 1345 307 #define H_3D_OUTPUT_ACTIVE_TOOLS 0 346 347 #if !SEC_DEPTH_INTRA_SKIP_MODE_K0033 348 ///// ***** SINGLE DEPTH MODE ********* 349 #if H_3D_SINGLE_DEPTH 350 #define SINGLE_DEPTH_MODE_CAND_LIST_SIZE 2 // size of the sample candidate list 351 352 #endif 308 #define H_3D_REN_MAX_DEV_OUT 0 353 309 #endif 354 310 … … 384 340 // HHI_DEPTH_INTRA_SEARCH_RAU_C0160 385 341 // LG_ZEROINTRADEPTHRESI_A0087 386 #define SHARP_DMM_CLEAN_K0042 1 // Generate DMM pattern with rotation387 388 #define TICKET083_IVPFLAG_FIX 1389 #define SHARP_SUBBLOCK_CLEAN_K0044 1 // Remove unused bipred restriction390 342 391 343 #endif … … 434 386 // TBD: Check if integration is necessary. 435 387 436 #define H_MV_HLS_FIX 1 388 437 389 #define H_MV_HLS_PTL_LIMITS 0 438 390 #define H_MV_HLS7_GEN 0 // General changes (not tested) 439 #define H_MV_ALIGN_HM_15 1440 391 441 392 // POC
Note: See TracChangeset for help on using the changeset viewer.