Changeset 1279 in 3DVCSoftware for branches/HTM-14.1-update-dev1
- Timestamp:
- 15 Jul 2015, 14:57:32 (9 years ago)
- Location:
- branches/HTM-14.1-update-dev1
- Files:
-
- 59 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev1
-
branches/HTM-14.1-update-dev1/source/App/TAppEncoder/TAppEncTop.cpp
r1249 r1279 291 291 m_cTEncTop.setDWeight ( isDepth ? m_iDWeight : 0 ); 292 292 #endif // H_3D_VSO 293 #if H_3D_IC293 #if NH_3D_IC 294 294 m_cTEncTop.setUseIC ( vps.getViewIndex( layerId ) == 0 || isDepth ? false : m_abUseIC ); 295 295 m_cTEncTop.setUseICLowLatencyEnc ( m_bUseLowLatencyICEnc ); -
branches/HTM-14.1-update-dev1/source/Lib/TAppCommon/TAppComCamPara.cpp
r1239 r1279 1373 1373 Int iSourceViewNum = m_aiBaseViews[ iViewIdx ]; 1374 1374 Double dBaseLine = 0.0; 1375 Double dFL1 = 0.0, dCS1 = 0.0, dCP1 = 0.0, dZN1 = 0.0, dZF1 = 0.0;1375 Double dFL1 = 1.0, dCS1 = 1.0, dCP1 = 1.0, dZN1 = 1.0, dZF1 = 1.0; 1376 1376 Bool bInterpolated = false; 1377 1377 double dPos[3] = {0.0, 0.0, 0.0}; -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/CommonDef.h
r1200 r1279 363 363 #endif 364 364 365 #if H_3D_IV_MERGE365 #if NH_3D_MLC || NH_3D_ARP 366 366 #define MRG_MAX_NUM_CANDS_MEM (MRG_MAX_NUM_CANDS+1) // one extra for inter-view motion prediction 367 367 #endif -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/ContextTables.h
r1258 r1279 162 162 #define NUM_CU_TRANSQUANT_BYPASS_FLAG_CTX 1 163 163 164 #if H_3D_ARP164 #if NH_3D_ARP 165 165 #define NUM_ARPW_CTX 3 ///< number of context models for weighting factor index used by advanced residual prediction 166 166 #endif 167 167 168 #if H_3D_IC168 #if NH_3D_IC 169 169 #define NUM_IC_FLAG_CTX 1 ///< number of context models for illumination compensation flag 170 170 #endif … … 186 186 #define NUM_DDC_FLAG_CTX 2 ///< number of context models for deltaDC flag (SDC only) 187 187 #endif 188 #if H_3D_DBBP188 #if NH_3D_DBBP 189 189 #define DBBP_NUM_FLAG_CTX 1 190 190 #endif … … 540 540 //! \} 541 541 542 #if H_3D_ARP542 #if NH_3D_ARP 543 543 static const UChar 544 544 INIT_ARPW[3][NUM_ARPW_CTX] = … … 550 550 551 551 #endif 552 #if H_3D_IC552 #if NH_3D_IC 553 553 static const UChar 554 554 INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = … … 616 616 }; 617 617 #endif 618 #if H_3D_DBBP618 #if NH_3D_DBBP 619 619 static const UChar INIT_DBBP_FLAG[3][DBBP_NUM_FLAG_CTX] = 620 620 { -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComCodingStatistics.h
r1239 r1279 81 81 STATS__CABAC_BITS__ESCAPE_BITS, 82 82 83 #if NH_3D_DBBP 84 STATS__CABAC_BITS__DBBP_FLAG, 85 #endif 86 #if NH_3D_ARP 87 STATS__CABAC_BITS__ARP_FLAG, 88 #endif 83 89 STATS__CABAC_BITS__SAO, 84 90 STATS__CABAC_TRM_BITS, … … 93 99 STATS__CABAC_BITS__ALIGNED_ESCAPE_BITS, 94 100 101 #if NH_3D_IC 102 STATS__CABAC_BITS__3D_IC, 103 #endif 95 104 #if NH_3D_DMM || NH_3D_SDC_INTRA || H_3D_INTER_SDC 96 105 STATS__CABAC_BITS__DELTADC_SIGN_EP, … … 147 156 "CABAC_BITS__SIGN_BIT", 148 157 "CABAC_BITS__ESCAPE_BITS", 158 #if NH_3D_DBBP 159 "CABAC_BITS__DBBP_FLAG", 160 #endif 149 161 "CABAC_BITS__SAO", 150 162 "CABAC_TRM_BITS", … … 158 170 "CABAC_BITS__ALIGNED_SIGN_BIT", 159 171 "CABAC_BITS__ALIGNED_ESCAPE_BITS" 172 173 #if NH_3D_IC 174 "CABAC_BITS__3D_IC" 175 #endif 160 176 #if NH_3D_DMM || NH_3D_SDC_INTRA || H_3D_INTER_SDC 161 177 ,"STATS__CABAC_BITS__DELTADC_SIGN_EP" -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComDataCU.cpp
r1258 r1279 120 120 m_bDecSubCu = false; 121 121 122 #if H_3D_NBDV122 #if NH_3D_NBDV 123 123 m_pDvInfo = NULL; 124 124 #endif 125 #if H_3D_VSP125 #if NH_3D_VSP 126 126 m_piVSPFlag = NULL; 127 127 #endif 128 #if H_3D_SPIVMP128 #if NH_3D_SPIVMP 129 129 m_pbSPIVMPFlag = NULL; 130 130 #endif 131 #if H_3D_ARP131 #if NH_3D_ARP 132 132 m_puhARPW = NULL; 133 133 #endif 134 #if H_3D_IC134 #if NH_3D_IC 135 135 m_pbICFlag = NULL; 136 136 #endif 137 137 #if H_3D_INTER_SDC 138 138 #endif 139 #if H_3D_DBBP139 #if NH_3D_DBBP 140 140 m_pbDBBPFlag = NULL; 141 141 #endif … … 180 180 m_pbMergeFlag = (Bool* )xMalloc(Bool, uiNumPartition); 181 181 m_puhMergeIndex = (UChar* )xMalloc(UChar, uiNumPartition); 182 #if H_3D_VSP182 #if NH_3D_VSP 183 183 m_piVSPFlag = (Char* )xMalloc(Char, uiNumPartition); 184 184 #endif 185 #if H_3D_SPIVMP185 #if NH_3D_SPIVMP 186 186 m_pbSPIVMPFlag = (Bool* )xMalloc(Bool, uiNumPartition); 187 187 #endif … … 203 203 } 204 204 205 #if H_3D_NBDV205 #if NH_3D_NBDV 206 206 m_pDvInfo = (DisInfo* )xMalloc(DisInfo, uiNumPartition); 207 207 #endif … … 244 244 } 245 245 246 #if H_3D_ARP247 m_puhARPW = new UChar[ uiNumPartition];248 #endif 249 #if H_3D_IC246 #if NH_3D_ARP 247 m_puhARPW = (UChar* )xMalloc(UChar, uiNumPartition); 248 #endif 249 #if NH_3D_IC 250 250 m_pbICFlag = (Bool* )xMalloc(Bool, uiNumPartition); 251 251 #endif … … 263 263 m_apSegmentDCOffset[1] = (Pel*)xMalloc(Pel, uiNumPartition); 264 264 #endif 265 #if H_3D_DBBP265 #if NH_3D_DBBP 266 266 m_pbDBBPFlag = (Bool* )xMalloc(Bool, uiNumPartition); 267 267 #endif … … 362 362 } 363 363 364 #if H_3D_VSP 365 if ( m_piVSPFlag ) { xFree(m_piVSPFlag); m_piVSPFlag = NULL; } 366 #endif 367 #if H_3D_SPIVMP 364 #if NH_3D_VSP 365 if ( m_piVSPFlag ) 366 { 367 xFree(m_piVSPFlag); 368 m_piVSPFlag = NULL; 369 } 370 #endif 371 #if NH_3D_SPIVMP 368 372 if ( m_pbSPIVMPFlag ) { xFree(m_pbSPIVMPFlag); m_pbSPIVMPFlag = NULL; } 369 373 #endif … … 453 457 m_acCUMvField[rpl].destroy(); 454 458 } 455 #if H_3D_NBDV459 #if NH_3D_NBDV 456 460 if ( m_pDvInfo ) { xFree(m_pDvInfo); m_pDvInfo = NULL; } 457 461 #endif 458 462 459 463 460 #if H_3D_ARP461 if ( m_puhARPW ) { delete[] m_puhARPW;m_puhARPW = NULL; }462 #endif 463 #if H_3D_IC464 #if NH_3D_ARP 465 if ( m_puhARPW ) { xFree(m_puhARPW); m_puhARPW = NULL; } 466 #endif 467 #if NH_3D_IC 464 468 if ( m_pbICFlag ) { xFree(m_pbICFlag); m_pbICFlag = NULL; } 465 469 #endif … … 478 482 if ( m_apSegmentDCOffset[1] ) { xFree(m_apSegmentDCOffset[1]); m_apSegmentDCOffset[1] = NULL; } 479 483 #endif 480 #if H_3D_DBBP484 #if NH_3D_DBBP 481 485 if ( m_pbDBBPFlag ) { xFree(m_pbDBBPFlag); m_pbDBBPFlag = NULL; } 482 486 #endif … … 583 587 memset( m_puhHeight , maxCUHeight, m_uiNumPartition * sizeof( *m_puhHeight ) ); 584 588 585 #if H_3D_ARP 586 m_puhARPW [ui] = pcFrom->getARPW( ui ); 587 #endif 588 #if H_3D_IC 589 m_pbICFlag[ui] = pcFrom->m_pbICFlag[ui]; 590 #endif 591 589 #if NH_3D_IC 590 memset( m_pbICFlag , false, m_uiNumPartition * sizeof( *m_pbICFlag ) ); 591 #endif 592 592 for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++) 593 593 { … … 608 608 memset( m_puhMergeIndex , 0, m_uiNumPartition * sizeof( *m_puhMergeIndex ) ); 609 609 610 #if H_3D_VSP611 m_piVSPFlag[ui] = pcFrom->m_piVSPFlag[ui];612 #endif 613 #if H_3D_SPIVMP614 m_pbSPIVMPFlag[ui] = pcFrom->m_pbSPIVMPFlag[ui];610 #if NH_3D_VSP 611 memset( m_piVSPFlag , 0, m_uiNumPartition * sizeof( *m_piVSPFlag ) ); 612 #endif 613 #if NH_3D_SPIVMP 614 memset( m_pbSPIVMPFlag , 0, m_uiNumPartition * sizeof( *m_pbSPIVMPFlag ) ); 615 615 #endif 616 616 #if NH_3D_SDC_INTRA 617 617 memset( m_pbSDCFlag, false, m_uiNumPartition * sizeof( *m_pbSDCFlag ) ); 618 618 #endif 619 #if H_3D_DBBP 620 m_pbDBBPFlag[ui] = pcFrom->m_pbDBBPFlag[ui]; 621 #endif 622 #if H_3D_VSP 623 memset( m_piVSPFlag + firstElement, 0, numElements * sizeof( *m_piVSPFlag ) ); 624 #endif 625 #if H_3D_SPIVMP 626 memset( m_pbSPIVMPFlag + firstElement, 0, numElements * sizeof( *m_pbSPIVMPFlag ) ); 619 #if NH_3D_DBBP 620 memset( m_pbDBBPFlag , false, m_uiNumPartition * sizeof( *m_pbDBBPFlag )); 627 621 #endif 628 622 … … 632 626 } 633 627 634 #if H_3D_ARP 635 memset( m_puhARPW + firstElement, 0, numElements * sizeof( UChar ) ); 636 #endif 637 #if H_3D_IC 638 memset( m_pbICFlag + firstElement, false, numElements * sizeof( *m_pbICFlag ) ); 639 #endif 640 628 #if NH_3D_ARP 629 memset( m_puhARPW , 0, m_uiNumPartition * sizeof( *m_puhARPW ) ); 630 #endif 641 631 642 632 … … 653 643 memset( m_apSegmentDCOffset[0], 0, m_uiNumPartition * sizeof( *m_apSegmentDCOffset[0] ) ); 654 644 memset( m_apSegmentDCOffset[1], 0, m_uiNumPartition * sizeof( *m_apSegmentDCOffset[1] ) ); 655 #endif656 #if H_3D_DBBP657 memset( m_pbDBBPFlag + firstElement, false, numElements * sizeof( *m_pbDBBPFlag ) );658 645 #endif 659 646 … … 770 757 m_pbMergeFlag[ui] = 0; 771 758 m_puhMergeIndex[ui] = 0; 772 #if H_3D_VSP773 m_piVSPFlag[ui]= 0;774 #endif 775 #if H_3D_SPIVMP776 759 #if NH_3D_VSP 760 m_piVSPFlag[ui] = 0; 761 #endif 762 #if NH_3D_SPIVMP 763 m_pbSPIVMPFlag[ui] = 0; 777 764 #endif 778 765 … … 787 774 m_puhCbf[comp][ui] = 0; 788 775 } 789 #if H_3D_ARP776 #if NH_3D_ARP 790 777 m_puhARPW[ui] = 0; 791 778 #endif 792 #if H_3D_IC779 #if NH_3D_IC 793 780 m_pbICFlag[ui] = false; 794 781 #endif … … 808 795 m_apSegmentDCOffset[1][ui] = 0; 809 796 #endif 810 #if H_3D_DBBP797 #if NH_3D_DBBP 811 798 m_pbDBBPFlag[ui] = false; 812 799 #endif … … 864 851 memset( m_pbMergeFlag, 0, iSizeInBool ); 865 852 memset( m_puhMergeIndex, 0, iSizeInUchar ); 866 #if H_3D_VSP853 #if NH_3D_VSP 867 854 memset( m_piVSPFlag, 0, sizeof( Char ) * m_uiNumPartition ); 868 855 #endif 869 #if H_3D_SPIVMP856 #if NH_3D_SPIVMP 870 857 memset( m_pbSPIVMPFlag, 0, sizeof( Bool ) * m_uiNumPartition ); 871 858 #endif … … 886 873 memset( m_explicitRdpcmMode[comp], NUMBER_OF_RDPCM_MODES, iSizeInUchar ); 887 874 } 888 #if H_3D_ARP889 memset( m_puhARPW, 0, iSizeInUchar );890 #endif891 875 892 876 memset( m_puhDepth, uiDepth, iSizeInUchar ); … … 894 878 memset( m_puhHeight, uhHeight, iSizeInUchar ); 895 879 memset( m_pbIPCMFlag, 0, iSizeInBool ); 896 #if H_3D_IC 880 #if NH_3D_ARP 881 memset( m_puhARPW, 0, iSizeInUchar ); 882 #endif 883 #if NH_3D_IC 897 884 memset( m_pbICFlag, 0, iSizeInBool ); 898 885 #endif … … 910 897 memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition ); 911 898 #endif 912 #if H_3D_DBBP913 memset( m_pbDBBPFlag, 0, iSizeInBool);899 #if NH_3D_DBBP 900 memset( m_pbDBBPFlag, 0, sizeof(Bool) * m_uiNumPartition ); 914 901 #endif 915 902 … … 937 924 m_ucDISType[ui] = pcCU->getDISType(uiPartOffset+ui); 938 925 #endif 939 #if H_3D_VSP940 m_piVSPFlag[ui]=pcCU->m_piVSPFlag[uiPartOffset+ui];941 942 #endif 943 #if H_3D_SPIVMP944 945 #endif 946 #if H_3D_ARP926 #if NH_3D_VSP 927 m_piVSPFlag[ui] = pcCU->m_piVSPFlag[uiPartOffset+ui]; 928 m_pDvInfo[ ui ] = pcCU->m_pDvInfo[uiPartOffset+ui]; 929 #endif 930 #if NH_3D_SPIVMP 931 m_pbSPIVMPFlag[ui]=pcCU->m_pbSPIVMPFlag[uiPartOffset+ui]; 932 #endif 933 #if NH_3D_ARP 947 934 m_puhARPW [ui] = pcCU->getARPW( uiPartOffset+ui ); 948 935 #endif 949 #if H_3D_IC936 #if NH_3D_IC 950 937 m_pbICFlag [ui] = pcCU->m_pbICFlag[uiPartOffset+ui]; 951 938 #endif … … 963 950 m_apSegmentDCOffset[1][ui] = pcCU->m_apSegmentDCOffset[1] [ uiPartOffset + ui ]; 964 951 #endif 965 #if H_3D_DBBP952 #if NH_3D_DBBP 966 953 m_pbDBBPFlag[ui]=pcCU->m_pbDBBPFlag[uiPartOffset+ui]; 967 954 #endif … … 1034 1021 m_pePredMode=pcCU->getPredictionMode() + uiPart; 1035 1022 m_CUTransquantBypass = pcCU->getCUTransquantBypass()+uiPart; 1036 #if H_3D_NBDV1023 #if NH_3D_NBDV 1037 1024 m_pDvInfo = pcCU->getDvInfo() + uiPart; 1038 1025 #endif … … 1040 1027 m_pbMergeFlag = pcCU->getMergeFlag() + uiPart; 1041 1028 m_puhMergeIndex = pcCU->getMergeIndex() + uiPart; 1042 #if H_3D_VSP1029 #if NH_3D_VSP 1043 1030 m_piVSPFlag = pcCU->getVSPFlag() + uiPart; 1044 1031 #endif 1045 #if H_3D_SPIVMP1032 #if NH_3D_SPIVMP 1046 1033 m_pbSPIVMPFlag = pcCU->getSPIVMPFlag() + uiPart; 1047 1034 #endif 1048 #if H_3D_ARP1035 #if NH_3D_ARP 1049 1036 m_puhARPW = pcCU->getARPW() + uiPart; 1050 1037 #endif 1051 #if H_3D_IC1038 #if NH_3D_IC 1052 1039 m_pbICFlag = pcCU->getICFlag() + uiPart; 1053 1040 #endif … … 1081 1068 m_apSegmentDCOffset[1] = pcCU->getSDCSegmentDCOffset(1) + uiPart; 1082 1069 #endif 1083 #if H_3D_DBBP1070 #if NH_3D_DBBP 1084 1071 m_pbDBBPFlag = pcCU->getDBBPFlag() + uiPart; 1085 1072 #endif … … 1128 1115 } 1129 1116 1130 #if H_3D_NBDV1117 #if NH_3D_NBDV 1131 1118 Void TComDataCU::copyDVInfoFrom (TComDataCU* pcCU, UInt uiAbsPartIdx) 1132 1119 { … … 1137 1124 // Copy inter prediction info from the biggest CU 1138 1125 Void TComDataCU::copyInterPredInfoFrom ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList 1139 #if H_3D_NBDV1126 #if NH_3D_NBDV 1140 1127 , Bool bNBDV 1141 1128 #endif … … 1168 1155 1169 1156 m_pePartSize = pcCU->getPartitionSize () + uiAbsPartIdx; 1170 #if H_3D_NBDV1157 #if NH_3D_NBDV 1171 1158 if(bNBDV == true) 1172 1159 { … … 1189 1176 m_pbMergeFlag = pcCU->getMergeFlag() + uiAbsPartIdx; 1190 1177 m_puhMergeIndex = pcCU->getMergeIndex() + uiAbsPartIdx; 1191 #if H_3D_VSP1178 #if NH_3D_VSP 1192 1179 m_piVSPFlag = pcCU->getVSPFlag() + uiAbsPartIdx; 1193 1180 m_pDvInfo = pcCU->getDvInfo() + uiAbsPartIdx; 1194 1181 #endif 1195 #if H_3D_SPIVMP1182 #if NH_3D_SPIVMP 1196 1183 m_pbSPIVMPFlag = pcCU->getSPIVMPFlag() + uiAbsPartIdx; 1197 1184 #endif … … 1199 1186 m_apiMVPIdx[eRefPicList] = pcCU->getMVPIdx(eRefPicList) + uiAbsPartIdx; 1200 1187 m_apiMVPNum[eRefPicList] = pcCU->getMVPNum(eRefPicList) + uiAbsPartIdx; 1201 #if H_3D_ARP1188 #if NH_3D_ARP 1202 1189 m_puhARPW = pcCU->getARPW() + uiAbsPartIdx; 1203 1190 #endif 1204 #if H_3D_DBBP1191 #if NH_3D_DBBP 1205 1192 m_pbDBBPFlag = pcCU->getDBBPFlag() + uiAbsPartIdx; 1206 1193 #endif 1207 1194 1208 1195 m_acCUMvField[ eRefPicList ].linkToWithOffset( pcCU->getCUMvField(eRefPicList), uiAbsPartIdx ); 1209 #if H_3D_NBDV1210 } 1211 #endif 1212 #if H_3D_IC1196 #if NH_3D_NBDV 1197 } 1198 #endif 1199 #if NH_3D_IC 1213 1200 m_pbICFlag = pcCU->getICFlag() + uiAbsPartIdx; 1214 1201 #endif … … 1247 1234 memcpy( m_pbMergeFlag + uiOffset, pcCU->getMergeFlag(), iSizeInBool ); 1248 1235 memcpy( m_puhMergeIndex + uiOffset, pcCU->getMergeIndex(), iSizeInUchar ); 1249 #if H_3D_VSP1236 #if NH_3D_VSP 1250 1237 memcpy( m_piVSPFlag + uiOffset, pcCU->getVSPFlag(), sizeof( Char ) * uiNumPartition ); 1251 1238 memcpy( m_pDvInfo + uiOffset, pcCU->getDvInfo(), sizeof( *m_pDvInfo ) * uiNumPartition ); 1252 1239 #endif 1253 #if H_3D_SPIVMP1240 #if NH_3D_SPIVMP || NH_3D_DBBP 1254 1241 memcpy( m_pbSPIVMPFlag + uiOffset, pcCU->getSPIVMPFlag(), sizeof( Bool ) * uiNumPartition ); 1255 1242 #endif … … 1283 1270 memcpy( m_apSegmentDCOffset[1] + uiOffset, pcCU->getSDCSegmentDCOffset(1), sizeof( Pel ) * uiNumPartition); 1284 1271 #endif 1285 #if H_3D_DBBP1272 #if NH_3D_DBBP 1286 1273 memcpy( m_pbDBBPFlag + uiOffset, pcCU->getDBBPFlag(), iSizeInBool ); 1274 #endif 1275 #if NH_3D_ARP 1276 memcpy( m_puhARPW + uiOffset, pcCU->getARPW(), iSizeInUchar ); 1287 1277 #endif 1288 1278 … … 1326 1316 } 1327 1317 1328 #if H_3D_ARP 1329 memcpy( m_puhARPW + uiOffset, pcCU->getARPW(), iSizeInUchar ); 1330 #endif 1331 #if H_3D_IC 1318 #if NH_3D_IC 1332 1319 memcpy( m_pbICFlag + uiOffset, pcCU->getICFlag(), iSizeInBool ); 1333 1320 #endif … … 1359 1346 1360 1347 memcpy( pCtu->getQP() + m_absZIdxInCtu, m_phQP, sizeInChar ); 1361 #if H_3D_NBDV1362 memcpy( rpcCU->getDvInfo() + m_uiAbsIdxInLCU, m_pDvInfo, sizeof(* m_pDvInfo)* m_uiNumPartition );1348 #if NH_3D_NBDV 1349 memcpy( pCtu->getDvInfo() + m_absZIdxInCtu, m_pDvInfo, sizeof(* m_pDvInfo) * m_uiNumPartition ); 1363 1350 #endif 1364 1351 … … 1369 1356 memcpy( pCtu->getMergeFlag() + m_absZIdxInCtu, m_pbMergeFlag, iSizeInBool ); 1370 1357 memcpy( pCtu->getMergeIndex() + m_absZIdxInCtu, m_puhMergeIndex, iSizeInUchar ); 1371 #if H_3D_VSP 1372 memcpy( rpcCU->getVSPFlag() + m_uiAbsIdxInLCU, m_piVSPFlag, sizeof( Char ) * m_uiNumPartition ); 1373 memcpy( rpcCU->getDvInfo() + m_uiAbsIdxInLCU, m_pDvInfo, sizeof( *m_pDvInfo ) * m_uiNumPartition ); 1374 #endif 1375 #if H_3D_SPIVMP 1376 memcpy( rpcCU->getSPIVMPFlag() + m_uiAbsIdxInLCU, m_pbSPIVMPFlag, sizeof( Bool ) * m_uiNumPartition ); 1358 #if NH_3D_VSP 1359 memcpy( pCtu->getVSPFlag() + m_absZIdxInCtu, m_piVSPFlag, sizeof( Char ) * m_uiNumPartition ); 1360 #endif 1361 #if NH_3D_DBBP 1362 memcpy( pCtu->getDvInfo() + m_absZIdxInCtu, m_pDvInfo, sizeof( *m_pDvInfo ) * m_uiNumPartition ); 1363 #endif 1364 #if NH_3D_SPIVMP 1365 memcpy( pCtu->getSPIVMPFlag() + m_absZIdxInCtu, m_pbSPIVMPFlag, sizeof( Bool ) * m_uiNumPartition ); 1377 1366 #endif 1378 1367 … … 1406 1395 memcpy( pCtu->getSDCSegmentDCOffset(1) + m_absZIdxInCtu, m_apSegmentDCOffset[1], sizeof( Pel ) * m_uiNumPartition); 1407 1396 #endif 1408 #if H_3D_DBBP 1409 memcpy( rpcCU->getDBBPFlag() + m_uiAbsIdxInLCU, m_pbDBBPFlag, iSizeInBool ); 1397 #if NH_3D_DBBP 1398 memcpy( pCtu->getDBBPFlag() + m_absZIdxInCtu, m_pbDBBPFlag, iSizeInBool ); 1399 #endif 1400 #if NH_3D_ARP 1401 memcpy( pCtu->getARPW() + m_absZIdxInCtu, m_puhARPW, iSizeInUchar ); 1410 1402 #endif 1411 1403 … … 1442 1434 } 1443 1435 1444 #if H_3D_ARP 1445 memcpy( rpcCU->getARPW() + m_uiAbsIdxInLCU, m_puhARPW, iSizeInUchar ); 1446 #endif 1447 #if H_3D_IC 1448 memcpy( rpcCU->getICFlag() + m_uiAbsIdxInLCU, m_pbICFlag, iSizeInBool ); 1449 #endif 1450 1436 #if NH_3D_IC 1437 memcpy( pCtu->getICFlag() + m_absZIdxInCtu, m_pbICFlag, sizeof( *m_pbICFlag ) * m_uiNumPartition ); 1438 #endif 1451 1439 pCtu->getTotalBins() = m_uiTotalBins; 1452 1440 } 1453 #if H_3D_VSP1454 memcpy( rpcCU->getVSPFlag() + uiPartOffset, m_piVSPFlag, sizeof(Char) * uiQNumPart );1455 #endif1456 1441 #if H_3D_SPIVMP 1457 1442 memcpy( rpcCU->getSPIVMPFlag() + uiPartOffset, m_pbSPIVMPFlag, sizeof(Bool) * uiQNumPart ); 1458 #endif1459 #if H_3D_DBBP1460 memcpy( rpcCU->getDBBPFlag() + uiPartOffset, m_pbDBBPFlag, iSizeInBool );1461 #endif1462 #if H_3D_ARP1463 memcpy( rpcCU->getARPW() + uiPartOffset, m_puhARPW, iSizeInUchar );1464 #endif1465 #if H_3D_IC1466 memcpy( rpcCU->getICFlag() + uiPartOffset, m_pbICFlag, iSizeInBool );1467 1443 #endif 1468 1444 … … 2017 1993 return uiCtx; 2018 1994 } 2019 #if H_3D_ARP1995 #if NH_3D_ARP 2020 1996 UInt TComDataCU::getCTXARPWFlag( UInt uiAbsPartIdx ) 2021 1997 { … … 2024 2000 UInt uiCtx = 0; 2025 2001 2026 pcTempCU = getPULeft( uiTempPartIdx, m_ uiAbsIdxInLCU+ uiAbsPartIdx );2002 pcTempCU = getPULeft( uiTempPartIdx, m_absZIdxInCtu + uiAbsPartIdx ); 2027 2003 uiCtx = ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1) : 0; 2028 2004 return uiCtx; 2029 2005 } 2030 2006 #endif 2031 #if H_3D_DBBP2007 #if NH_3D_DBBP 2032 2008 Pel* TComDataCU::getVirtualDepthBlock(UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt& uiDepthStride) 2033 2009 { 2010 const TComSPS* sps = getSlice()->getSPS(); 2011 UInt uiMaxCUWidth = sps->getMaxCUWidth(); 2012 UInt uiMaxCUHeight = sps->getMaxCUHeight(); 2013 2034 2014 // get coded and reconstructed depth view 2035 2015 TComPicYuv* depthPicYuv = NULL; … … 2037 2017 2038 2018 // DBBP is a texture coding tool 2039 if( getSlice()->getIsDepth() ) 2040 { 2041 return NULL; 2042 } 2019 assert( !getSlice()->getIsDepth() ); 2020 2043 2021 #if H_3D_FCO 2044 2022 TComPic* depthPic = getSlice()->getIvPic(true, getSlice()->getViewIndex() ); … … 2067 2045 depthPicYuv = baseDepthPic->getPicYuvRec(); 2068 2046 depthPicYuv->extendPicBorder(); 2069 uiDepthStride = depthPicYuv->getStride( );2047 uiDepthStride = depthPicYuv->getStride(COMPONENT_Y); 2070 2048 2071 Int iBlkX = ( get Addr() % baseDepthPic->getFrameWidthInCU() ) * g_uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ getZorderIdxInCU()+uiAbsPartIdx ] ];2072 Int iBlkY = ( get Addr() / baseDepthPic->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ getZorderIdxInCU()+uiAbsPartIdx ] ];2049 Int iBlkX = ( getCtuRsAddr() % baseDepthPic->getFrameWidthInCtus() ) * uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ getZorderIdxInCtu()+uiAbsPartIdx ] ]; 2050 Int iBlkY = ( getCtuRsAddr() / baseDepthPic->getFrameWidthInCtus() ) * uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ getZorderIdxInCtu()+uiAbsPartIdx ] ]; 2073 2051 2074 Int iPictureWidth = depthPicYuv->getWidth( );2075 Int iPictureHeight = depthPicYuv->getHeight( );2052 Int iPictureWidth = depthPicYuv->getWidth(COMPONENT_Y); 2053 Int iPictureHeight = depthPicYuv->getHeight(COMPONENT_Y); 2076 2054 2077 2055 2078 2056 Bool depthRefineFlag = false; 2079 #if H_3D_NBDV_REF2080 depthRefineFlag = m_pcSlice->getDepthRefinementFlag( 2081 #endif // H_3D_NBDV_REF2057 #if NH_3D_NBDV_REF 2058 depthRefineFlag = m_pcSlice->getDepthRefinementFlag(); 2059 #endif // NH_3D_NBDV_REF 2082 2060 2083 2061 TComMv cDv = depthRefineFlag ? DvInfo.m_acDoNBDV : DvInfo.m_acNBDV; … … 2090 2068 Int depthPosY = Clip3(0, iPictureHeight - 1, iBlkY + ((cDv.getVer()+2)>>2)); 2091 2069 2092 pDepthPels = depthPicYuv->get LumaAddr() + depthPosX + depthPosY * uiDepthStride;2070 pDepthPels = depthPicYuv->getAddr(COMPONENT_Y) + depthPosX + depthPosY * uiDepthStride; 2093 2071 } 2094 2072 #endif … … 2102 2080 #endif 2103 2081 2104 #if H_3D_DBBP2082 #if NH_3D_DBBP 2105 2083 Void TComDataCU::setDBBPFlagSubParts ( Bool bDBBPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2106 2084 { … … 2392 2370 } 2393 2371 2394 #if H_3D_SPIVMP2372 #if NH_3D_SPIVMP 2395 2373 Void TComDataCU::setSPIVMPFlagSubParts( Bool bSPIVMPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2396 2374 { … … 2399 2377 #endif 2400 2378 2401 #if H_3D_VSP2379 #if NH_3D_VSP 2402 2380 Void TComDataCU::setVSPFlagSubParts( Char iVSPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2403 2381 { 2404 2382 setSubPart<Char>( iVSPFlag, m_piVSPFlag, uiAbsPartIdx, uiDepth, uiPartIdx ); 2405 2383 } 2406 #if H_3D_VSP2407 2384 template<typename T> 2408 2385 Void TComDataCU::setSubPartT( T uiParameter, T* puhBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx ) 2409 2386 { 2410 UInt uiCurrPartNumQ = (m_pcPic->getNumPart InCU() >> (2 * uiCUDepth)) >> 2;2387 UInt uiCurrPartNumQ = (m_pcPic->getNumPartitionsInCtu() >> (2 * uiCUDepth)) >> 2; 2411 2388 switch ( m_pePartSize[ uiCUAddr ] ) 2412 2389 { … … 2540 2517 } 2541 2518 #endif 2542 #endif2543 2519 2544 2520 Void TComDataCU::setInterDirSubParts( UInt uiDir, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) … … 2626 2602 2627 2603 // This is for use by a leaf/sub CU object only, with no additional AbsPartIdx 2628 #if H_3D_IC2604 #if NH_3D_IC || NH_3D_VSP 2629 2605 Void TComDataCU::getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx, Bool bLCU) 2630 2606 { … … 2960 2936 } 2961 2937 2962 #if H_3D_VSP 2963 2938 #if NH_3D_VSP 2964 2939 /** Add a VSP merging candidate 2965 2940 * \Inputs … … 3015 2990 predFlag[iRefListIdX] = 1; 3016 2991 mvVSP[0+iRefListIdX].setMvField( pDInfo->m_acNBDV, i ); 3017 #if H_3D_NBDV2992 #if NH_3D_NBDV 3018 2993 mvVSP[0+iRefListIdX].getMv().setIDVFlag (false); 3019 2994 #endif … … 3023 2998 3024 2999 dirVSP = (predFlag[0] | (predFlag[1] << 1)); 3025 m_mergCands[MRG_VSP].setCand( mvVSP, dirVSP, true, false); 3000 m_mergCands[MRG_VSP].setCand( mvVSP, dirVSP, true 3001 #if NH_3D_SPIVMP 3002 , false 3003 #endif 3004 ); 3026 3005 if ( mrgCandIdx == iCount ) 3027 3006 { … … 3033 3012 return false; 3034 3013 } 3035 3036 #endif 3037 3038 #if H_3D_IV_MERGE 3014 #endif 3015 3016 #if NH_3D_IV_MERGE 3039 3017 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx ) 3040 3018 { … … 3067 3045 if(!bRemove) 3068 3046 { 3069 #if H_3D_NBDV3047 #if NH_3D_NBDV 3070 3048 if(iLoop) // For IvMcShift candidate 3071 3049 { … … 3088 3066 3089 3067 #endif 3090 #if H_3D 3068 #if NH_3D_MLC 3069 /** Construct a extended list of merging candidates 3070 * \param pcMvFieldNeighbours 3071 * \param puhInterDirNeighbours 3072 * \param vspFlag 3073 * \param pbSPIVMPFlag 3074 * \param numValidMergeCand 3075 */ 3091 3076 Void TComDataCU::buildMCL(TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours 3092 #if H_3D_VSP3077 #if NH_3D_VSP 3093 3078 , Int* vspFlag 3094 3079 #endif 3095 #if H_3D_SPIVMP3080 #if NH_3D_SPIVMP 3096 3081 , Bool* pbSPIVMPFlag 3097 3082 #endif … … 3099 3084 ) 3100 3085 { 3101 if (!( getSlice()->getIsDepth() || getSlice()->getViewIndex()>0)) // for only dependent texture3086 if (!( getSlice()->getIsDepth() || getSlice()->getViewIndex()>0)) 3102 3087 { 3103 3088 return; … … 3115 3100 extMergeCandList[ui<<1].setMvField(cZeroMv, NOT_VALID); 3116 3101 extMergeCandList[(ui<<1)+1].setMvField(cZeroMv, NOT_VALID); 3102 #if NH_3D_VSP 3117 3103 vspFlag[ui] = 0; 3118 } 3119 3120 // add candidates to temporal list 3121 // insert MPI ... IvShift candidate 3104 #endif 3105 } 3106 3107 // insert MPI ... IvShift candidate to extMergeCandList 3122 3108 for (Int i=0; i<=MRG_IVSHIFT; i++) 3123 3109 { 3124 3110 if (m_mergCands[i].m_bAvailable) 3125 3111 { 3126 m_mergCands[i].getCand(iCount, extMergeCandList, uhInterDirNeighboursExt, vspFlag, pbSPIVMPFlag); 3112 m_mergCands[i].getCand(iCount, extMergeCandList, uhInterDirNeighboursExt 3113 #if NH_3D_VSP 3114 , vspFlag 3115 #endif 3116 #if NH_3D_SPIVMP 3117 , pbSPIVMPFlag 3118 #endif 3119 ); 3127 3120 iCount++; 3128 3121 if (iCount >= getSlice()->getMaxNumMergeCand()) … … 3131 3124 } 3132 3125 3133 // insert remaining base candidates 3134 while (iCount < getSlice()->getMaxNumMergeCand() && m_baseListidc < getSlice()->getMaxNumMergeCand()) 3135 { 3136 uhInterDirNeighboursExt[iCount] = puhInterDirNeighbours[m_baseListidc]; 3137 extMergeCandList[iCount<<1].setMvField(pcMvFieldNeighbours[m_baseListidc<<1].getMv(), pcMvFieldNeighbours[m_baseListidc<<1].getRefIdx()); 3126 Int iCountBase = m_numSpatialCands; 3127 // insert remaining base candidates to extMergeCandList 3128 while (iCount < getSlice()->getMaxNumMergeCand() && iCountBase < getSlice()->getMaxNumMergeCand()) 3129 { 3130 uhInterDirNeighboursExt[iCount] = puhInterDirNeighbours[iCountBase]; 3131 extMergeCandList[iCount<<1].setMvField(pcMvFieldNeighbours[iCountBase<<1].getMv(), pcMvFieldNeighbours[iCountBase<<1].getRefIdx()); 3138 3132 if ( getSlice()->isInterB() ) 3139 3133 { 3140 extMergeCandList[(iCount<<1)+1].setMvField(pcMvFieldNeighbours[( m_baseListidc<<1)+1].getMv(), pcMvFieldNeighbours[(m_baseListidc<<1)+1].getRefIdx());3141 } 3142 m_baseListidc++;3134 extMergeCandList[(iCount<<1)+1].setMvField(pcMvFieldNeighbours[(iCountBase<<1)+1].getMv(), pcMvFieldNeighbours[(iCountBase<<1)+1].getRefIdx()); 3135 } 3136 iCountBase++; 3143 3137 iCount++; 3144 3138 } … … 3162 3156 } 3163 3157 3164 /** Constructs a list of merging candidates 3158 3159 3160 /** Derive 3D merge candidates 3165 3161 * \param uiAbsPartIdx 3166 3162 * \param uiPUIdx 3167 * \param uiDepth3168 3163 * \param pcMvFieldNeighbours 3164 * \param puhInterDirNeighbours 3165 * \param pcMvFieldSP 3169 3166 * \param puhInterDirNeighbours 3170 3167 * \param numValidMergeCand 3171 3168 */ 3172 // HM 12.0 based merge candidate list construction 3173 3174 Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx ) 3175 { 3176 3177 UInt uiAbsPartAddr = m_uiAbsIdxInLCU + uiAbsPartIdx; 3178 Bool abCandIsInter[ MRG_MAX_NUM_CANDS_MEM ]; 3169 Void TComDataCU::xGetInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours 3170 #if NH_3D_SPIVMP 3171 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 3172 #endif 3173 , Int& numValidMergeCand, Int mrgCandIdx 3174 ) 3175 { 3176 #if NH_3D_IV_MERGE 3179 3177 TComMv cZeroMv; 3180 for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ++ui ) 3181 { 3182 abCandIsInter[ui] = false; 3183 pcMvFieldNeighbours[ ( ui << 1 ) ].setMvField(cZeroMv, NOT_VALID); 3184 pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setMvField(cZeroMv, NOT_VALID); 3178 TComMvField tmpMV[2]; 3179 #endif 3180 3181 ////////////////////////////////// 3182 //////// GET DISPARITIES //////// 3183 ////////////////////////////////// 3184 #if NH_3D_IV_MERGE 3185 DisInfo cDisInfo = getDvInfo(uiAbsPartIdx); 3186 m_cDefaultDisInfo = cDisInfo; 3187 #elif NH_3D_VSP 3188 // for xAddVspCand() 3189 DisInfo cDisInfo = getDvInfo(uiAbsPartIdx); 3190 #endif 3191 3192 if (!( getSlice()->getIsDepth() || getSlice()->getViewIndex()>0)) 3193 { 3194 return; 3185 3195 } 3186 3196 numValidMergeCand = getSlice()->getMaxNumMergeCand(); 3197 ////////////////////////////////// 3198 //////// DERIVE LOCATIONS //////// 3199 ////////////////////////////////// 3187 3200 // compute the location of the current PU 3188 3201 Int xP, yP, nPSW, nPSH; … … 3190 3203 3191 3204 Int iCount = 0; 3192 3193 3205 UInt uiPartIdxLT, uiPartIdxRT, uiPartIdxLB; 3194 PartSize cCurPS = getPartitionSize( uiAbsPartIdx );3195 3206 deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT ); 3196 3207 deriveLeftBottomIdxGeneral ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB ); 3197 3198 //left 3199 UInt uiLeftPartIdx = 0; 3200 TComDataCU* pcCULeft = 0; 3201 pcCULeft = getPULeft( uiLeftPartIdx, uiPartIdxLB ); 3202 Bool isAvailableA1 = pcCULeft && 3203 pcCULeft->isDiffMER(xP -1, yP+nPSH-1, xP, yP) && 3204 !( uiPUIdx == 1 && (cCurPS == SIZE_Nx2N || cCurPS == SIZE_nLx2N || cCurPS == SIZE_nRx2N) ) && 3205 !pcCULeft->isIntra( uiLeftPartIdx ) ; 3206 if ( isAvailableA1 ) 3207 { 3208 m_bAvailableFlagA1 = 1; 3209 abCandIsInter[iCount] = true; 3210 // get Inter Dir 3211 puhInterDirNeighbours[iCount] = pcCULeft->getInterDir( uiLeftPartIdx ); 3212 // get Mv from Left 3213 pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 3214 if ( getSlice()->isInterB() ) 3215 { 3216 pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3217 } 3218 3219 iCount ++; 3220 } 3221 3222 // early termination 3223 if (iCount == getSlice()->getMaxNumMergeCand()) 3224 { 3225 return; 3226 } 3227 // above 3228 UInt uiAbovePartIdx = 0; 3229 TComDataCU* pcCUAbove = 0; 3230 pcCUAbove = getPUAbove( uiAbovePartIdx, uiPartIdxRT ); 3231 Bool isAvailableB1 = pcCUAbove && 3232 pcCUAbove->isDiffMER(xP+nPSW-1, yP-1, xP, yP) && 3233 !( uiPUIdx == 1 && (cCurPS == SIZE_2NxN || cCurPS == SIZE_2NxnU || cCurPS == SIZE_2NxnD) ) && 3234 !pcCUAbove->isIntra( uiAbovePartIdx ); 3235 if ( isAvailableB1 && (!isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAbove, uiAbovePartIdx ) ) ) 3236 { 3237 m_bAvailableFlagB1 = 1; 3238 abCandIsInter[iCount] = true; 3239 // get Inter Dir 3240 puhInterDirNeighbours[iCount] = pcCUAbove->getInterDir( uiAbovePartIdx ); 3241 // get Mv from Left 3242 pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 3243 if ( getSlice()->isInterB() ) 3244 { 3245 pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3246 } 3247 if ( mrgCandIdx == iCount ) 3248 { 3249 return; 3250 } 3251 iCount ++; 3252 } 3253 // early termination 3254 if (iCount == getSlice()->getMaxNumMergeCand()) 3255 { 3256 return; 3257 } 3258 3259 // above right 3260 UInt uiAboveRightPartIdx = 0; 3261 TComDataCU* pcCUAboveRight = 0; 3262 pcCUAboveRight = getPUAboveRight( uiAboveRightPartIdx, uiPartIdxRT ); 3263 Bool isAvailableB0 = pcCUAboveRight && 3264 pcCUAboveRight->isDiffMER(xP+nPSW, yP-1, xP, yP) && 3265 !pcCUAboveRight->isIntra( uiAboveRightPartIdx ); 3266 if ( isAvailableB0 && ( !isAvailableB1 || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveRight, uiAboveRightPartIdx ) ) ) 3267 { 3268 m_bAvailableFlagB0 = 1; 3269 abCandIsInter[iCount] = true; 3270 // get Inter Dir 3271 puhInterDirNeighbours[iCount] = pcCUAboveRight->getInterDir( uiAboveRightPartIdx ); 3272 // get Mv from Left 3273 pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 3274 if ( getSlice()->isInterB() ) 3275 { 3276 pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3277 } 3278 if ( mrgCandIdx == iCount ) 3279 { 3280 return; 3281 } 3282 iCount ++; 3283 } 3284 // early termination 3285 if (iCount == getSlice()->getMaxNumMergeCand()) 3286 { 3287 return; 3288 } 3289 3290 //left bottom 3291 UInt uiLeftBottomPartIdx = 0; 3292 TComDataCU* pcCULeftBottom = 0; 3293 pcCULeftBottom = this->getPUBelowLeft( uiLeftBottomPartIdx, uiPartIdxLB ); 3294 Bool isAvailableA0 = pcCULeftBottom && 3295 pcCULeftBottom->isDiffMER(xP-1, yP+nPSH, xP, yP) && 3296 !pcCULeftBottom->isIntra( uiLeftBottomPartIdx ) ; 3297 if ( isAvailableA0 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCULeftBottom, uiLeftBottomPartIdx ) ) ) 3298 { 3299 m_bAvailableFlagA0 = 1; 3300 abCandIsInter[iCount] = true; 3301 // get Inter Dir 3302 puhInterDirNeighbours[iCount] = pcCULeftBottom->getInterDir( uiLeftBottomPartIdx ); 3303 // get Mv from Left 3304 pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 3305 if ( getSlice()->isInterB() ) 3306 { 3307 pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3308 } 3309 if ( mrgCandIdx == iCount ) 3310 { 3311 return; 3312 } 3313 iCount ++; 3314 } 3315 // early termination 3316 if (iCount == getSlice()->getMaxNumMergeCand()) 3317 { 3318 return; 3319 } 3320 // above left 3321 if( iCount < 4 ) 3322 { 3323 UInt uiAboveLeftPartIdx = 0; 3324 TComDataCU* pcCUAboveLeft = 0; 3325 pcCUAboveLeft = getPUAboveLeft( uiAboveLeftPartIdx, uiAbsPartAddr ); 3326 Bool isAvailableB2 = pcCUAboveLeft && 3327 pcCUAboveLeft->isDiffMER(xP-1, yP-1, xP, yP) && 3328 !pcCUAboveLeft->isIntra( uiAboveLeftPartIdx ); 3329 if ( isAvailableB2 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) ) 3330 && ( !isAvailableB1 || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) ) ) 3331 { 3332 m_bAvailableFlagB2 = 1; 3333 abCandIsInter[iCount] = true; 3334 // get Inter Dir 3335 puhInterDirNeighbours[iCount] = pcCUAboveLeft->getInterDir( uiAboveLeftPartIdx ); 3336 // get Mv from Left 3337 pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 3338 if ( getSlice()->isInterB() ) 3339 { 3340 pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3341 } 3342 if ( mrgCandIdx == iCount ) 3343 { 3344 return; 3345 } 3346 iCount ++; 3347 } 3348 } 3349 // early termination 3350 if (iCount == getSlice()->getMaxNumMergeCand()) 3351 { 3352 return; 3353 } 3354 if ( getSlice()->getEnableTMVPFlag()) 3355 { 3356 //>> MTK colocated-RightBottom 3357 UInt uiPartIdxRB; 3358 3359 deriveRightBottomIdx( uiPUIdx, uiPartIdxRB ); 3360 3361 UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB]; 3362 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 3363 3364 TComMv cColMv; 3365 Int iRefIdx; 3366 Int uiLCUIdx = -1; 3367 3368 if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) // image boundary check 3369 { 3370 } 3371 else if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) 3372 { 3373 } 3374 else 3375 { 3376 if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) && // is not at the last column of LCU 3377 ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row of LCU 3378 { 3379 uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ]; 3380 uiLCUIdx = getAddr(); 3381 } 3382 else if ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) // is not at the last column of LCU But is last row of LCU 3383 { 3384 uiAbsPartAddr = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ]; 3385 } 3386 else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU 3387 { 3388 uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ]; 3389 uiLCUIdx = getAddr() + 1; 3390 } 3391 else //is the right bottom corner of LCU 3392 { 3393 uiAbsPartAddr = 0; 3394 } 3395 } 3396 3397 iRefIdx = 0; 3398 Bool bExistMV = false; 3399 UInt uiPartIdxCenter; 3400 UInt uiCurLCUIdx = getAddr(); 3401 Int dir = 0; 3402 UInt uiArrayAddr = iCount; 3403 xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter ); 3404 bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_0, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx ); 3405 if( bExistMV == false ) 3406 { 3407 bExistMV = xGetColMVP( REF_PIC_LIST_0, uiCurLCUIdx, uiPartIdxCenter, cColMv, iRefIdx ); 3408 } 3409 if( bExistMV ) 3410 { 3411 dir |= 1; 3412 pcMvFieldNeighbours[ 2 * uiArrayAddr ].setMvField( cColMv, iRefIdx ); 3413 } 3414 3415 if ( getSlice()->isInterB() ) 3416 { 3417 #if H_3D_TMVP 3418 iRefIdx = 0; 3419 #endif 3420 bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_1, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx); 3421 if( bExistMV == false ) 3422 { 3423 bExistMV = xGetColMVP( REF_PIC_LIST_1, uiCurLCUIdx, uiPartIdxCenter, cColMv, iRefIdx ); 3424 } 3425 if( bExistMV ) 3426 { 3427 dir |= 2; 3428 pcMvFieldNeighbours[ 2 * uiArrayAddr + 1 ].setMvField( cColMv, iRefIdx ); 3429 } 3430 } 3431 3432 if (dir != 0) 3433 { 3434 puhInterDirNeighbours[uiArrayAddr] = dir; 3435 abCandIsInter[uiArrayAddr] = true; 3436 #if H_3D_NBDV 3437 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); 3438 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); 3439 #endif 3440 if ( mrgCandIdx == iCount ) 3441 { 3442 return; 3443 } 3444 iCount++; 3445 } 3446 } 3447 // early termination 3448 if (iCount == getSlice()->getMaxNumMergeCand()) 3449 { 3450 return; 3451 } 3452 UInt uiArrayAddr = iCount; 3453 UInt uiCutoff = uiArrayAddr; 3454 3455 if ( getSlice()->isInterB() && iCount<5) // JCT3V-F0129 by Qualcomm 3456 { 3457 UInt uiPriorityList0[12] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3}; 3458 UInt uiPriorityList1[12] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2}; 3459 3460 for (Int idx=0; idx<uiCutoff*(uiCutoff-1) && uiArrayAddr!= getSlice()->getMaxNumMergeCand(); idx++) 3461 { 3462 Int i = uiPriorityList0[idx]; Int j = uiPriorityList1[idx]; 3463 if (abCandIsInter[i] && abCandIsInter[j]&& (puhInterDirNeighbours[i]&0x1)&&(puhInterDirNeighbours[j]&0x2)) 3464 { 3465 abCandIsInter[uiArrayAddr] = true; 3466 puhInterDirNeighbours[uiArrayAddr] = 3; 3467 3468 // get Mv from cand[i] and cand[j] 3469 pcMvFieldNeighbours[uiArrayAddr << 1].setMvField(pcMvFieldNeighbours[i<<1].getMv(), pcMvFieldNeighbours[i<<1].getRefIdx()); 3470 pcMvFieldNeighbours[( uiArrayAddr << 1 ) + 1].setMvField(pcMvFieldNeighbours[(j<<1)+1].getMv(), pcMvFieldNeighbours[(j<<1)+1].getRefIdx()); 3471 3472 Int iRefPOCL0 = m_pcSlice->getRefPOC( REF_PIC_LIST_0, pcMvFieldNeighbours[(uiArrayAddr<<1)].getRefIdx() ); 3473 Int iRefPOCL1 = m_pcSlice->getRefPOC( REF_PIC_LIST_1, pcMvFieldNeighbours[(uiArrayAddr<<1)+1].getRefIdx() ); 3474 if (iRefPOCL0 == iRefPOCL1 && pcMvFieldNeighbours[(uiArrayAddr<<1)].getMv() == pcMvFieldNeighbours[(uiArrayAddr<<1)+1].getMv()) 3475 { 3476 abCandIsInter[uiArrayAddr] = false; 3477 } 3478 else 3479 { 3480 uiArrayAddr++; 3481 } 3482 } 3483 } 3484 } 3485 // early termination 3486 if (uiArrayAddr == getSlice()->getMaxNumMergeCand()) 3487 { 3488 return; 3489 } 3490 3491 Int iNumRefIdx = (getSlice()->isInterB()) ? min(m_pcSlice->getNumRefIdx(REF_PIC_LIST_0), m_pcSlice->getNumRefIdx(REF_PIC_LIST_1)) : m_pcSlice->getNumRefIdx(REF_PIC_LIST_0); 3492 Int r = 0; 3493 Int refcnt = 0; 3494 while (uiArrayAddr < getSlice()->getMaxNumMergeCand()) 3495 { 3496 abCandIsInter[uiArrayAddr] = true; 3497 puhInterDirNeighbours[uiArrayAddr] = 1; 3498 pcMvFieldNeighbours[uiArrayAddr << 1].setMvField( TComMv(0, 0), r); 3499 3500 if ( getSlice()->isInterB() ) 3501 { 3502 puhInterDirNeighbours[uiArrayAddr] = 3; 3503 pcMvFieldNeighbours[(uiArrayAddr << 1) + 1].setMvField(TComMv(0, 0), r); 3504 } 3505 uiArrayAddr++; 3506 if ( refcnt == iNumRefIdx - 1 ) 3507 { 3508 r = 0; 3509 } 3510 else 3511 { 3512 ++r; 3513 ++refcnt; 3514 } 3515 } 3516 3517 numValidMergeCand = uiArrayAddr; 3518 } 3519 3520 3521 3522 /** Constructs a list of merging candidates 3523 * \param uiAbsPartIdx 3524 * \param uiPUIdx 3525 * \param uiDepth 3526 * \param pcMvFieldNeighbours 3527 * \param puhInterDirNeighbours 3528 * \param numValidMergeCand 3529 */ 3530 #if H_3D 3531 Void TComDataCU::xGetInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours 3532 #else 3533 Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours 3534 #endif 3535 #if H_3D_SPIVMP 3536 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 3537 #endif 3538 , Int& numValidMergeCand, Int mrgCandIdx 3539 ) 3540 { 3541 #if H_3D_IV_MERGE 3542 //////////////////////////// 3543 //////// INIT LISTS //////// 3544 //////////////////////////// 3545 TComMv cZeroMv; 3546 #else 3547 Bool abCandIsInter[ MRG_MAX_NUM_CANDS ]; 3548 #endif 3549 #if H_3D 3550 TComMvField tmpMV[2]; 3551 UChar tmpDir; 3552 3553 3554 ////////////////////////////////// 3555 //////// GET DISPARITIES //////// 3556 ////////////////////////////////// 3557 DisInfo cDisInfo = getDvInfo(uiAbsPartIdx); 3558 m_cDefaultDisInfo = cDisInfo; 3559 3560 if (!( getSlice()->getIsDepth() || getSlice()->getViewIndex()>0)) // current slice is not both dependent view or depth 3561 { 3562 return; 3563 } 3564 #else 3565 for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ++ui ) 3566 { 3567 abCandIsInter[ui] = false; 3568 pcMvFieldNeighbours[ ( ui << 1 ) ].setRefIdx(NOT_VALID); 3569 pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setRefIdx(NOT_VALID); 3570 } 3571 #endif 3572 3573 numValidMergeCand = getSlice()->getMaxNumMergeCand(); 3574 #if H_3D 3575 ////////////////////////////////// 3576 //////// DERIVE LOCATIONS //////// 3577 ////////////////////////////////// 3578 #endif 3579 // compute the location of the current PU 3580 Int xP, yP, nPSW, nPSH; 3581 this->getPartPosition(uiPUIdx, xP, yP, nPSW, nPSH); 3582 3583 Int iCount = 0; 3584 3585 UInt uiPartIdxLT, uiPartIdxRT, uiPartIdxLB; 3586 #if !H_3D 3587 PartSize cCurPS = getPartitionSize( uiAbsPartIdx ); 3588 #endif 3589 deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT ); 3590 deriveLeftBottomIdxGeneral ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB ); 3591 #if H_3D 3208 #if NH_3D_TEXT_MERGE 3592 3209 Bool bMPIFlag = getSlice()->getMpiFlag(); 3210 Int tmpDir; 3211 #endif 3212 #if NH_3D_IV_MERGE || NH_3D_TEXT_MERGE 3593 3213 Bool bIsDepth = getSlice()->getIsDepth(); 3594 #endif 3595 3596 #if H_3D_IC3214 #endif 3215 3216 #if NH_3D_IC 3597 3217 Bool bICFlag = getICFlag(uiAbsPartIdx); 3598 3218 #endif 3599 #if H_3D_ARP3219 #if NH_3D_ARP 3600 3220 Bool bARPFlag = getARPW(uiAbsPartIdx) > 0; 3601 3221 #endif 3602 #if H_3D_DBBP3222 #if NH_3D_DBBP 3603 3223 Bool bDBBPFlag = getDBBPFlag(uiAbsPartIdx); 3604 3224 assert(bDBBPFlag == getDBBPFlag(0)); 3605 3225 #endif 3606 3226 3607 #if H_3D 3608 #if H_3D_NBDV 3227 #if NH_3D_NBDV 3609 3228 for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++) 3610 3229 { 3611 pcMvFieldNeighbours[i<<1 ].getMv().setIDVFlag (false); 3612 pcMvFieldNeighbours[(i<<1)+1].getMv().setIDVFlag (false); 3613 } 3614 #endif 3615 // Clean version for MCL construction align with WD 3616 // init mergCands list 3230 pcMFieldNeighbours[i<<1 ].getMv().setIDVFlag (false); 3231 pcMFieldNeighbours[(i<<1)+1].getMv().setIDVFlag (false); 3232 } 3233 #endif 3234 // init containers 3617 3235 for (Int i = 0; i<MRG_IVSHIFT+1; i++) 3618 {3619 3236 m_mergCands[i].init(); 3620 } 3621 3622 m_baseListidc = 0; 3623 3237 3238 m_numSpatialCands = 0; 3239 3240 ////////////////////////////////// 3241 ///////// GET VSP FLAGS ////////// 3242 ////////////////////////////////// 3624 3243 //left 3625 3244 UInt uiLeftPartIdx = 0; … … 3629 3248 if (getAvailableFlagA1()) 3630 3249 { 3631 m_mergCands[MRG_A1].setCand( &pcM vFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc]3632 #if H_3D_VSP3250 m_mergCands[MRG_A1].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands] 3251 #if NH_3D_VSP 3633 3252 , (pcCULeft->getVSPFlag(uiLeftPartIdx) != 0 3634 #if H_3D_IC3253 #if NH_3D_IC 3635 3254 && !bICFlag 3636 3255 #endif 3637 #if H_3D_ARP3256 #if NH_3D_ARP 3638 3257 && !bARPFlag 3639 3258 #endif 3640 #if H_3D_DBBP3259 #if NH_3D_DBBP 3641 3260 && !bDBBPFlag 3642 3261 #endif 3643 3262 ) 3644 3263 #endif 3264 #if NH_3D_SPIVMP 3645 3265 , false 3266 #endif 3646 3267 ); 3647 m_ baseListidc++;3268 m_numSpatialCands++; 3648 3269 } 3649 3270 3650 3271 // above 3651 3652 3272 if (getAvailableFlagB1()) 3653 3273 { 3654 m_mergCands[MRG_B1].setCand( &pcM vFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc]3655 #if H_3D_VSP3274 m_mergCands[MRG_B1].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands] 3275 #if NH_3D_VSP 3656 3276 , false 3657 3277 #endif 3278 #if NH_3D_SPIVMP 3658 3279 , false 3280 #endif 3659 3281 ); 3660 m_ baseListidc++;3282 m_numSpatialCands++; 3661 3283 } 3662 3284 3663 3285 // above right 3664 3665 3286 if (getAvailableFlagB0()) 3666 3287 { 3667 m_mergCands[MRG_B0].setCand( &pcM vFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc]3668 #if H_3D_VSP3669 , 3670 false 3671 # endif3288 m_mergCands[MRG_B0].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands] 3289 #if NH_3D_VSP 3290 , false 3291 #endif 3292 #if NH_3D_SPIVMP 3672 3293 , false 3294 #endif 3673 3295 ); 3674 m_ baseListidc++;3296 m_numSpatialCands++; 3675 3297 } 3676 3298 3677 3299 // left bottom 3678 3679 3300 if (getAvailableFlagA0()) 3680 3301 { 3681 m_mergCands[MRG_A0].setCand( &pcM vFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc]3682 #if H_3D_VSP3302 m_mergCands[MRG_A0].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands] 3303 #if NH_3D_VSP 3683 3304 , false 3684 3305 #endif 3306 #if NH_3D_SPIVMP 3685 3307 , false 3308 #endif 3686 3309 ); 3687 m_ baseListidc++;3310 m_numSpatialCands++; 3688 3311 } 3689 3312 3690 3313 // above left 3691 3692 3314 if (getAvailableFlagB2()) 3693 3315 { 3694 m_mergCands[MRG_B2].setCand( &pcM vFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc]3695 #if H_3D_VSP3316 m_mergCands[MRG_B2].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands] 3317 #if NH_3D_VSP 3696 3318 , false 3697 3319 #endif 3320 #if NH_3D_SPIVMP 3698 3321 , false 3322 #endif 3699 3323 ); 3700 m_baseListidc++; 3701 } 3702 3703 #endif 3704 3705 3706 #if H_3D_IV_MERGE 3324 m_numSpatialCands++; 3325 } 3326 3327 3328 #if NH_3D_TEXT_MERGE 3707 3329 3708 3330 ///////////////////////////////////////////// … … 3730 3352 3731 3353 this->getPartIndexAndSize( uiPUIdx, uiPartAddr, iWidth, iHeight ); 3732 pcTexRec->getTopLeftSamplePos( this->get Addr(), this->getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY );3354 pcTexRec->getTopLeftSamplePos( this->getCtuRsAddr(), this->getZorderIdxInCtu() + uiPartAddr, iCurrPosX, iCurrPosY ); 3733 3355 3734 3356 Int iPUWidth, iPUHeight, iNumPart, iNumPartLine; … … 3755 3377 3756 3378 Int iTexPosX, iTexPosY; 3379 #if NH_3D_INTEGER_MV_DEPTH 3757 3380 const TComMv cMvRounding( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 3758 3381 #endif 3759 3382 Int iCenterPosX = iCurrPosX + ( ( iWidth / iPUWidth ) >> 1 ) * iPUWidth + ( iPUWidth >> 1 ); 3760 3383 Int iCenterPosY = iCurrPosY + ( ( iHeight / iPUHeight ) >> 1 ) * iPUHeight + (iPUHeight >> 1); … … 3770 3393 3771 3394 pcTexRec->getCUAddrAndPartIdx( iCenterPosX , iCenterPosY , iTexCenterCUAddr, iTexCenterAbsPartIdx ); 3772 TComDataCU* pcDefaultCU = pcTexPic->getC U( iTexCenterCUAddr );3395 TComDataCU* pcDefaultCU = pcTexPic->getCtu( iTexCenterCUAddr ); 3773 3396 3774 3397 if( pcDefaultCU->getPredictionMode( iTexCenterAbsPartIdx ) != MODE_INTRA ) … … 3789 3412 { 3790 3413 bSPIVMPFlag = true; 3414 #if NH_3D_INTEGER_MV_DEPTH 3791 3415 TComMv cMv = cDefaultMvField.getMv() + cMvRounding; 3792 3416 cMv >>= 2; 3417 #else 3418 TComMv cMv = cDefaultMvField.getMv(); 3419 #endif 3793 3420 cMvFieldSaved[eCurrRefPicList].setMvField(cMv, iRefPicList) ; 3794 3421 break; … … 3815 3442 iTexPosY = i + iOffsetY; 3816 3443 pcTexRec->getCUAddrAndPartIdx( iTexPosX, iTexPosY, iTexCUAddr, iTexAbsPartIdx ); 3817 pcTexCU = pcTexPic->getC U( iTexCUAddr );3444 pcTexCU = pcTexPic->getCtu( iTexCUAddr ); 3818 3445 3819 3446 if( pcTexCU && !pcTexCU->isIntra(iTexAbsPartIdx) ) … … 3827 3454 if( (cTexMvField.getRefIdx()>=0) && ( iValidDepRef >= 0 ) ) 3828 3455 { 3456 #if NH_3D_INTEGER_MV_DEPTH 3829 3457 TComMv cMv = cTexMvField.getMv() + cMvRounding; 3830 3458 cMv >>=2; 3459 #else 3460 TComMv cMv = cTexMvField.getMv(); 3461 #endif 3831 3462 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iValidDepRef); 3832 3463 } … … 3847 3478 } 3848 3479 } 3849 #if H_3D 3850 } 3851 #endif 3480 } 3852 3481 #if H_3D_FCO 3853 3482 } … … 3877 3506 } 3878 3507 } 3508 #endif 3509 3510 #if NH_3D_IV_MERGE 3879 3511 ///////////////////////////////////////////////////////////////// 3880 3512 //////// DERIVE IvMC, IvMCShift,IvDCShift, IvDC Candidates ///// … … 3894 3526 if ( ivMvPredFlag && cDisInfo.m_aVIdxCan!=-1) 3895 3527 { 3528 #if NH_3D_IC 3896 3529 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP, bICFlag ); 3530 #else 3531 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP, false ); 3532 #endif 3897 3533 } 3898 3534 … … 3950 3586 spiMvpFlag = true; 3951 3587 } 3952 #if H_3D_DBBP3588 #if NH_3D_DBBP 3953 3589 spiMvpFlag &= !bDBBPFlag; 3954 3590 #endif … … 3971 3607 #endif 3972 3608 3609 iCount += m_mergCands[MRG_A1].m_bAvailable + m_mergCands[MRG_B1].m_bAvailable; 3610 3611 #if NH_3D_VSP 3612 ///////////////////////////////////////////////// 3613 //////// VIEW SYNTHESIS PREDICTION (VSP) //////// 3614 ///////////////////////////////////////////////// 3615 if (iCount<getSlice()->getMaxNumMergeCand()) 3616 { 3617 if ( 3618 (!getAvailableFlagA1() || !(pcCULeft->getVSPFlag(uiLeftPartIdx) != 0)) && 3619 #if NH_3D_IC 3620 !bICFlag && 3621 #endif 3622 #if NH_3D_ARP 3623 !bARPFlag && 3624 #endif 3973 3625 #if H_3D 3974 iCount += m_mergCands[MRG_A1].m_bAvailable + m_mergCands[MRG_B1].m_bAvailable; 3626 (nPSW + nPSH > 12) && 3627 #endif 3628 #if NH_3D_DBBP 3629 !bDBBPFlag && 3630 #endif 3631 xAddVspCand( mrgCandIdx, &cDisInfo, iCount ) ) 3632 { 3633 return; 3634 } 3635 3636 // early termination 3637 if (iCount == getSlice()->getMaxNumMergeCand()) 3638 { 3639 return; 3640 } 3641 } 3642 #endif 3643 3644 iCount += m_mergCands[MRG_B0].m_bAvailable; 3645 3646 #if NH_3D_IV_MERGE 3647 ///////////////////////////////////////////// 3648 //////// INTER VIEW DISP COMP (IvDC) //////// 3649 ///////////////////////////////////////////// 3650 if( ivCandDir[1] && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() ) 3651 { 3652 assert(iCount < getSlice()->getMaxNumMergeCand()); 3653 3654 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 3655 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); 3656 if( ( ivCandDir[1] & 1 ) == 1 ) 3657 { 3658 tmpMV[0].setMvField( ivCandMv[ 2 ], ivCandRefIdx[ 2 ] ); 3659 } 3660 if( ( ivCandDir[1] & 2 ) == 2 ) 3661 { 3662 tmpMV[1].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] ); 3663 } 3664 3665 Bool bRemoveSpa = false; //pruning to A1, B1 3666 for(Int i = 0; i < 2; i ++) 3667 { 3668 if ( !m_mergCands[MRG_A1+i].m_bAvailable ) 3669 { 3670 continue; 3671 } 3672 if (ivCandDir[1] == m_mergCands[MRG_A1+i].m_uDir && tmpMV[0]==m_mergCands[MRG_A1+i].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_A1+i].m_cMvField[1]) 3673 { 3674 bRemoveSpa = true; 3675 break; 3676 } 3677 } 3678 if(!bRemoveSpa) 3679 { 3680 #if NH_3D_NBDV 3681 tmpMV[0].getMv().setIDVFlag (false); 3682 tmpMV[1].getMv().setIDVFlag (false); 3683 #endif 3684 m_mergCands[MRG_IVDC].setCand( tmpMV, ivCandDir[1], false, false); 3685 3686 if ( mrgCandIdx == iCount ) 3687 return; 3688 iCount ++; 3689 3690 // early termination 3691 if (iCount == getSlice()->getMaxNumMergeCand()) 3692 { 3693 return; 3694 } 3695 } 3696 } 3697 #endif // H_3D_IV_MERGE 3698 3699 iCount += m_mergCands[MRG_A0].m_bAvailable + m_mergCands[MRG_B2].m_bAvailable; 3700 3701 #if NH_3D_IV_MERGE 3702 //////////////////////////////////////////////////// 3703 //////// SHIFTED IV (IvMCShift + IvDCShift) //////// 3704 //////////////////////////////////////////////////// 3705 if( ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() ) 3706 { 3707 if(xAddIvMRGCand( mrgCandIdx, iCount, ivCandDir, ivCandMv, ivCandRefIdx ) ) 3708 { 3709 return; 3710 } 3711 //early termination 3712 if (iCount == getSlice()->getMaxNumMergeCand()) 3713 { 3714 return; 3715 } 3716 } 3717 #endif 3718 } 3719 #endif 3720 3721 //! Construct a list of merging candidates 3722 Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx ) 3723 { 3724 UInt uiAbsPartAddr = m_absZIdxInCtu + uiAbsPartIdx; 3725 #if NH_3D_MLC 3726 Bool abCandIsInter[ MRG_MAX_NUM_CANDS_MEM ]; 3975 3727 #else 3728 Bool abCandIsInter[ MRG_MAX_NUM_CANDS ]; 3729 #endif 3730 for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ++ui ) 3731 { 3732 abCandIsInter[ui] = false; 3733 pcMvFieldNeighbours[ ( ui << 1 ) ].setRefIdx(NOT_VALID); 3734 pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setRefIdx(NOT_VALID); 3735 } 3736 numValidMergeCand = getSlice()->getMaxNumMergeCand(); 3737 // compute the location of the current PU 3738 Int xP, yP, nPSW, nPSH; 3739 this->getPartPosition(uiPUIdx, xP, yP, nPSW, nPSH); 3740 3741 Int iCount = 0; 3742 3743 UInt uiPartIdxLT, uiPartIdxRT, uiPartIdxLB; 3744 PartSize cCurPS = getPartitionSize( uiAbsPartIdx ); 3745 deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT ); 3746 deriveLeftBottomIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLB ); 3747 3976 3748 //left 3977 3749 UInt uiLeftPartIdx = 0; 3978 3750 TComDataCU* pcCULeft = 0; 3979 3751 pcCULeft = getPULeft( uiLeftPartIdx, uiPartIdxLB ); 3752 3980 3753 Bool isAvailableA1 = pcCULeft && 3981 pcCULeft->isDiffMER(xP -1, yP+nPSH-1, xP, yP) && 3982 !( uiPUIdx == 1 && (cCurPS == SIZE_Nx2N || cCurPS == SIZE_nLx2N || cCurPS == SIZE_nRx2N) ) && 3983 !pcCULeft->isIntra( uiLeftPartIdx ) ; 3754 pcCULeft->isDiffMER(xP -1, yP+nPSH-1, xP, yP) && 3755 !( uiPUIdx == 1 && (cCurPS == SIZE_Nx2N || cCurPS == SIZE_nLx2N || cCurPS == SIZE_nRx2N) ) && 3756 pcCULeft->isInter( uiLeftPartIdx ) ; 3757 3984 3758 if ( isAvailableA1 ) 3985 3759 { 3760 #if NH_3D_MLC 3761 m_bAvailableFlagA1 = 1; 3762 #endif 3986 3763 abCandIsInter[iCount] = true; 3987 3764 // get Inter Dir … … 3993 3770 pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3994 3771 } 3995 3996 3772 if ( mrgCandIdx == iCount ) 3997 3773 { … … 4002 3778 4003 3779 // early termination 4004 if (iCount == getSlice()->getMaxNumMergeCand()) 3780 if (iCount == getSlice()->getMaxNumMergeCand()) 4005 3781 { 4006 3782 return; 4007 3783 } 4008 4009 3784 // above 4010 3785 UInt uiAbovePartIdx = 0; 4011 3786 TComDataCU* pcCUAbove = 0; 4012 3787 pcCUAbove = getPUAbove( uiAbovePartIdx, uiPartIdxRT ); 3788 4013 3789 Bool isAvailableB1 = pcCUAbove && 4014 pcCUAbove->isDiffMER(xP+nPSW-1, yP-1, xP, yP) && 4015 !( uiPUIdx == 1 && (cCurPS == SIZE_2NxN || cCurPS == SIZE_2NxnU || cCurPS == SIZE_2NxnD) ) && 4016 !pcCUAbove->isIntra( uiAbovePartIdx ); 3790 pcCUAbove->isDiffMER(xP+nPSW-1, yP-1, xP, yP) && 3791 !( uiPUIdx == 1 && (cCurPS == SIZE_2NxN || cCurPS == SIZE_2NxnU || cCurPS == SIZE_2NxnD) ) && 3792 pcCUAbove->isInter( uiAbovePartIdx ); 3793 4017 3794 if ( isAvailableB1 && (!isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAbove, uiAbovePartIdx ) ) ) 4018 3795 { 3796 #if NH_3D_MLC 3797 m_bAvailableFlagB1 = 1; 3798 #endif 4019 3799 abCandIsInter[iCount] = true; 4020 3800 // get Inter Dir … … 4026 3806 pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4027 3807 } 4028 4029 3808 if ( mrgCandIdx == iCount ) 4030 3809 { … … 4034 3813 } 4035 3814 // early termination 4036 if (iCount == getSlice()->getMaxNumMergeCand()) 3815 if (iCount == getSlice()->getMaxNumMergeCand()) 4037 3816 { 4038 3817 return; … … 4043 3822 TComDataCU* pcCUAboveRight = 0; 4044 3823 pcCUAboveRight = getPUAboveRight( uiAboveRightPartIdx, uiPartIdxRT ); 3824 4045 3825 Bool isAvailableB0 = pcCUAboveRight && 4046 pcCUAboveRight->isDiffMER(xP+nPSW, yP-1, xP, yP) && 4047 !pcCUAboveRight->isIntra( uiAboveRightPartIdx ); 3826 pcCUAboveRight->isDiffMER(xP+nPSW, yP-1, xP, yP) && 3827 pcCUAboveRight->isInter( uiAboveRightPartIdx ); 3828 4048 3829 if ( isAvailableB0 && ( !isAvailableB1 || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveRight, uiAboveRightPartIdx ) ) ) 4049 3830 { 3831 #if NH_3D_MLC 3832 m_bAvailableFlagB0 = 1; 3833 #endif 4050 3834 abCandIsInter[iCount] = true; 4051 3835 // get Inter Dir … … 4057 3841 pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4058 3842 } 4059 4060 3843 if ( mrgCandIdx == iCount ) 4061 3844 { … … 4065 3848 } 4066 3849 // early termination 4067 if (iCount == getSlice()->getMaxNumMergeCand()) 3850 if (iCount == getSlice()->getMaxNumMergeCand()) 4068 3851 { 4069 3852 return; 4070 3853 } 4071 #endif 4072 4073 4074 #if H_3D_VSP 4075 ///////////////////////////////////////////////// 4076 //////// VIEW SYNTHESIS PREDICTION (VSP) //////// 4077 ///////////////////////////////////////////////// 4078 if (iCount<getSlice()->getMaxNumMergeCand()) 4079 { 4080 if ( 4081 (!getAvailableFlagA1() || !(pcCULeft->getVSPFlag(uiLeftPartIdx) != 0)) && 4082 #if H_3D_IC 4083 !bICFlag && 4084 #endif 4085 #if H_3D_ARP 4086 !bARPFlag && 4087 #endif 4088 #if H_3D 4089 (nPSW + nPSH > 12) && 4090 #endif 4091 #if H_3D_DBBP 4092 !bDBBPFlag && 4093 #endif 4094 xAddVspCand( mrgCandIdx, &cDisInfo, iCount ) ) 4095 { 4096 return; 4097 } 4098 4099 // early termination 4100 if (iCount == getSlice()->getMaxNumMergeCand()) 4101 { 4102 return; 4103 } 4104 #endif 4105 #if H_3D_VSP 4106 } 4107 #endif 4108 4109 #if H_3D 4110 iCount += m_mergCands[MRG_B0].m_bAvailable; 4111 #endif 4112 4113 4114 #if H_3D_IV_MERGE 4115 ///////////////////////////////////////////// 4116 //////// INTER VIEW DISP COMP (IvDC) //////// 4117 ///////////////////////////////////////////// 4118 if( ivCandDir[1] && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() ) 4119 { 4120 assert(iCount < getSlice()->getMaxNumMergeCand()); 4121 4122 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 4123 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); 4124 if( ( ivCandDir[1] & 1 ) == 1 ) 4125 { 4126 tmpMV[0].setMvField( ivCandMv[ 2 ], ivCandRefIdx[ 2 ] ); 4127 } 4128 if( ( ivCandDir[1] & 2 ) == 2 ) 4129 { 4130 tmpMV[1].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] ); 4131 } 4132 4133 Bool bRemoveSpa = false; //pruning to A1, B1 4134 for(Int i = 0; i < 2; i ++) 4135 { 4136 if ( !m_mergCands[MRG_A1+i].m_bAvailable ) 4137 { 4138 continue; 4139 } 4140 if (ivCandDir[1] == m_mergCands[MRG_A1+i].m_uDir && tmpMV[0]==m_mergCands[MRG_A1+i].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_A1+i].m_cMvField[1]) 4141 { 4142 bRemoveSpa = true; 4143 break; 4144 } 4145 } 4146 if(!bRemoveSpa) 4147 { 4148 #if H_3D_NBDV 4149 tmpMV[0].getMv().setIDVFlag (false); 4150 tmpMV[1].getMv().setIDVFlag (false); 4151 #endif 4152 m_mergCands[MRG_IVDC].setCand( tmpMV, ivCandDir[1], false, false); 4153 4154 if ( mrgCandIdx == iCount ) 4155 return; 4156 iCount ++; 4157 4158 // early termination 4159 if (iCount == getSlice()->getMaxNumMergeCand()) 4160 { 4161 return; 4162 } 4163 } 4164 } 4165 #endif // H_3D_IV_MERGE 4166 4167 4168 #if H_3D 4169 iCount += m_mergCands[MRG_A0].m_bAvailable + m_mergCands[MRG_B2].m_bAvailable; 4170 #else 3854 4171 3855 //left bottom 4172 3856 UInt uiLeftBottomPartIdx = 0; 4173 3857 TComDataCU* pcCULeftBottom = 0; 4174 3858 pcCULeftBottom = this->getPUBelowLeft( uiLeftBottomPartIdx, uiPartIdxLB ); 3859 4175 3860 Bool isAvailableA0 = pcCULeftBottom && 4176 pcCULeftBottom->isDiffMER(xP-1, yP+nPSH, xP, yP) && 4177 !pcCULeftBottom->isIntra( uiLeftBottomPartIdx ) ; 3861 pcCULeftBottom->isDiffMER(xP-1, yP+nPSH, xP, yP) && 3862 pcCULeftBottom->isInter( uiLeftBottomPartIdx ) ; 3863 4178 3864 if ( isAvailableA0 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCULeftBottom, uiLeftBottomPartIdx ) ) ) 4179 3865 { 3866 #if NH_3D_MLC 3867 m_bAvailableFlagA0 = 1; 3868 #endif 4180 3869 abCandIsInter[iCount] = true; 4181 3870 // get Inter Dir … … 4194 3883 } 4195 3884 // early termination 4196 if (iCount == getSlice()->getMaxNumMergeCand()) 3885 if (iCount == getSlice()->getMaxNumMergeCand()) 4197 3886 { 4198 3887 return; 4199 3888 } 4200 3889 4201 // above left 3890 // above left 4202 3891 if( iCount < 4 ) 4203 3892 { … … 4205 3894 TComDataCU* pcCUAboveLeft = 0; 4206 3895 pcCUAboveLeft = getPUAboveLeft( uiAboveLeftPartIdx, uiAbsPartAddr ); 3896 4207 3897 Bool isAvailableB2 = pcCUAboveLeft && 4208 pcCUAboveLeft->isDiffMER(xP-1, yP-1, xP, yP) && 4209 !pcCUAboveLeft->isIntra( uiAboveLeftPartIdx ); 3898 pcCUAboveLeft->isDiffMER(xP-1, yP-1, xP, yP) && 3899 pcCUAboveLeft->isInter( uiAboveLeftPartIdx ); 3900 4210 3901 if ( isAvailableB2 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) ) 4211 3902 && ( !isAvailableB1 || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) ) ) 4212 3903 { 3904 #if NH_3D_MLC 3905 m_bAvailableFlagB2 = 1; 3906 #endif 4213 3907 abCandIsInter[iCount] = true; 4214 3908 // get Inter Dir … … 4228 3922 } 4229 3923 // early termination 4230 if (iCount == getSlice()->getMaxNumMergeCand()) 3924 if (iCount == getSlice()->getMaxNumMergeCand()) 4231 3925 { 4232 3926 return; 4233 3927 } 4234 #endif 4235 4236 4237 #if H_3D_IV_MERGE 4238 //////////////////////////////////////////////////// 4239 //////// SHIFTED IV (IvMCShift + IvDCShift) //////// 4240 //////////////////////////////////////////////////// 4241 if( ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() ) 4242 { 4243 if(xAddIvMRGCand( mrgCandIdx, iCount, ivCandDir, ivCandMv, ivCandRefIdx ) ) 4244 { 4245 return; 4246 } 4247 //early termination 4248 if (iCount == getSlice()->getMaxNumMergeCand()) 4249 { 4250 return; 4251 } 4252 } 4253 #endif 4254 #if !H_3D 4255 if ( getSlice()->getEnableTMVPFlag()) 3928 3929 if ( getSlice()->getEnableTMVPFlag() ) 4256 3930 { 4257 3931 //>> MTK colocated-RightBottom 4258 3932 UInt uiPartIdxRB; 4259 3933 4260 deriveRightBottomIdx( uiPUIdx, uiPartIdxRB ); 3934 deriveRightBottomIdx( uiPUIdx, uiPartIdxRB ); 4261 3935 4262 3936 UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB]; 4263 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 3937 const UInt numPartInCtuWidth = m_pcPic->getNumPartInCtuWidth(); 3938 const UInt numPartInCtuHeight = m_pcPic->getNumPartInCtuHeight(); 4264 3939 4265 3940 TComMv cColMv; 4266 3941 Int iRefIdx; 4267 Int uiLCUIdx = -1; 4268 4269 if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) // image boundary check 4270 { 4271 } 4272 else if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) 4273 { 4274 } 4275 else 4276 { 4277 if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) && // is not at the last column of LCU 4278 ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row of LCU 4279 { 4280 uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ]; 4281 uiLCUIdx = getAddr(); 4282 } 4283 else if ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) // is not at the last column of LCU But is last row of LCU 4284 { 4285 uiAbsPartAddr = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ]; 4286 } 4287 else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU 3942 Int ctuRsAddr = -1; 3943 3944 if ( ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth () ) < m_pcSlice->getSPS()->getPicWidthInLumaSamples () ) // image boundary check 3945 && ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) ) 3946 { 3947 if ( ( uiAbsPartIdxTmp % numPartInCtuWidth < numPartInCtuWidth - 1 ) && // is not at the last column of CTU 3948 ( uiAbsPartIdxTmp / numPartInCtuWidth < numPartInCtuHeight - 1 ) ) // is not at the last row of CTU 3949 { 3950 uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + numPartInCtuWidth + 1 ]; 3951 ctuRsAddr = getCtuRsAddr(); 3952 } 3953 else if ( uiAbsPartIdxTmp % numPartInCtuWidth < numPartInCtuWidth - 1 ) // is not at the last column of CTU But is last row of CTU 3954 { 3955 uiAbsPartAddr = g_auiRasterToZscan[ (uiAbsPartIdxTmp + numPartInCtuWidth + 1) % m_pcPic->getNumPartitionsInCtu() ]; 3956 } 3957 else if ( uiAbsPartIdxTmp / numPartInCtuWidth < numPartInCtuHeight - 1 ) // is not at the last row of CTU But is last column of CTU 4288 3958 { 4289 3959 uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ]; 4290 uiLCUIdx = getAddr() + 1;4291 } 4292 else //is the right bottom corner of LCU3960 ctuRsAddr = getCtuRsAddr() + 1; 3961 } 3962 else //is the right bottom corner of CTU 4293 3963 { 4294 3964 uiAbsPartAddr = 0; 4295 3965 } 4296 3966 } 4297 4298 3967 4299 3968 iRefIdx = 0; 3969 4300 3970 Bool bExistMV = false; 4301 3971 UInt uiPartIdxCenter; 4302 UInt uiCurLCUIdx = getAddr();4303 3972 Int dir = 0; 4304 3973 UInt uiArrayAddr = iCount; 4305 3974 xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter ); 4306 bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_0, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx );3975 bExistMV = ctuRsAddr >= 0 && xGetColMVP( REF_PIC_LIST_0, ctuRsAddr, uiAbsPartAddr, cColMv, iRefIdx ); 4307 3976 if( bExistMV == false ) 4308 3977 { 4309 bExistMV = xGetColMVP( REF_PIC_LIST_0, uiCurLCUIdx, uiPartIdxCenter,cColMv, iRefIdx );3978 bExistMV = xGetColMVP( REF_PIC_LIST_0, getCtuRsAddr(), uiPartIdxCenter, cColMv, iRefIdx ); 4310 3979 } 4311 3980 if( bExistMV ) … … 4317 3986 if ( getSlice()->isInterB() ) 4318 3987 { 4319 bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_1, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx); 3988 #if NH_3D_TMVP 3989 iRefIdx = 0; 3990 #endif 3991 bExistMV = ctuRsAddr >= 0 && xGetColMVP( REF_PIC_LIST_1, ctuRsAddr, uiAbsPartAddr, cColMv, iRefIdx); 4320 3992 if( bExistMV == false ) 4321 3993 { 4322 bExistMV = xGetColMVP( REF_PIC_LIST_1, uiCurLCUIdx, uiPartIdxCenter, cColMv, iRefIdx );3994 bExistMV = xGetColMVP( REF_PIC_LIST_1, getCtuRsAddr(), uiPartIdxCenter, cColMv, iRefIdx ); 4323 3995 } 4324 3996 if( bExistMV ) … … 4328 4000 } 4329 4001 } 4330 4002 4331 4003 if (dir != 0) 4332 4004 { 4333 4005 puhInterDirNeighbours[uiArrayAddr] = dir; 4334 4006 abCandIsInter[uiArrayAddr] = true; 4007 #if NH_3D_NBDV 4008 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); 4009 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); 4010 #endif 4011 4335 4012 if ( mrgCandIdx == iCount ) 4336 4013 { … … 4340 4017 } 4341 4018 } 4342 // early termination 4343 if (iCount == getSlice()->getMaxNumMergeCand()) 4019 // early termination 4020 if (iCount == getSlice()->getMaxNumMergeCand()) 4344 4021 { 4345 4022 return; 4346 4023 } 4024 4347 4025 UInt uiArrayAddr = iCount; 4348 4026 UInt uiCutoff = uiArrayAddr; 4349 4350 if ( getSlice()->isInterB()) 4351 { 4352 UInt uiPriorityList0[12] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3}; 4353 UInt uiPriorityList1[12] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2}; 4027 4028 #if NH_3D_MLC 4029 if ( getSlice()->isInterB() && iCount<5) 4030 #else 4031 if ( getSlice()->isInterB() ) 4032 #endif 4033 { 4034 static const UInt NUM_PRIORITY_LIST=12; 4035 static const UInt uiPriorityList0[NUM_PRIORITY_LIST] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3}; 4036 static const UInt uiPriorityList1[NUM_PRIORITY_LIST] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2}; 4354 4037 4355 4038 for (Int idx=0; idx<uiCutoff*(uiCutoff-1) && uiArrayAddr!= getSlice()->getMaxNumMergeCand(); idx++) 4356 4039 { 4357 Int i = uiPriorityList0[idx]; Int j = uiPriorityList1[idx]; 4040 assert(idx<NUM_PRIORITY_LIST); 4041 Int i = uiPriorityList0[idx]; 4042 Int j = uiPriorityList1[idx]; 4358 4043 if (abCandIsInter[i] && abCandIsInter[j]&& (puhInterDirNeighbours[i]&0x1)&&(puhInterDirNeighbours[j]&0x2)) 4359 4044 { … … 4379 4064 } 4380 4065 // early termination 4381 if (uiArrayAddr == getSlice()->getMaxNumMergeCand()) 4066 if (uiArrayAddr == getSlice()->getMaxNumMergeCand()) 4382 4067 { 4383 4068 return; 4384 4069 } 4070 4385 4071 Int iNumRefIdx = (getSlice()->isInterB()) ? min(m_pcSlice->getNumRefIdx(REF_PIC_LIST_0), m_pcSlice->getNumRefIdx(REF_PIC_LIST_1)) : m_pcSlice->getNumRefIdx(REF_PIC_LIST_0); 4072 4386 4073 Int r = 0; 4387 4074 Int refcnt = 0; … … 4398 4085 } 4399 4086 uiArrayAddr++; 4087 4400 4088 if ( refcnt == iNumRefIdx - 1 ) 4401 4089 { … … 4408 4096 } 4409 4097 } 4410 4411 4098 numValidMergeCand = uiArrayAddr; 4412 #endif 4413 } 4414 #else 4415 4416 //! Construct a list of merging candidates 4417 Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx ) 4418 { 4419 UInt uiAbsPartAddr = m_absZIdxInCtu + uiAbsPartIdx; 4420 Bool abCandIsInter[ MRG_MAX_NUM_CANDS ]; 4421 for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ++ui ) 4422 { 4423 abCandIsInter[ui] = false; 4424 pcMvFieldNeighbours[ ( ui << 1 ) ].setRefIdx(NOT_VALID); 4425 pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setRefIdx(NOT_VALID); 4426 } 4427 numValidMergeCand = getSlice()->getMaxNumMergeCand(); 4428 // compute the location of the current PU 4429 Int xP, yP, nPSW, nPSH; 4430 this->getPartPosition(uiPUIdx, xP, yP, nPSW, nPSH); 4431 4432 Int iCount = 0; 4433 4434 UInt uiPartIdxLT, uiPartIdxRT, uiPartIdxLB; 4435 PartSize cCurPS = getPartitionSize( uiAbsPartIdx ); 4436 deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT ); 4437 deriveLeftBottomIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLB ); 4438 4439 //left 4440 UInt uiLeftPartIdx = 0; 4441 TComDataCU* pcCULeft = 0; 4442 pcCULeft = getPULeft( uiLeftPartIdx, uiPartIdxLB ); 4443 4444 Bool isAvailableA1 = pcCULeft && 4445 pcCULeft->isDiffMER(xP -1, yP+nPSH-1, xP, yP) && 4446 !( uiPUIdx == 1 && (cCurPS == SIZE_Nx2N || cCurPS == SIZE_nLx2N || cCurPS == SIZE_nRx2N) ) && 4447 pcCULeft->isInter( uiLeftPartIdx ) ; 4448 4449 if ( isAvailableA1 ) 4450 { 4451 abCandIsInter[iCount] = true; 4452 // get Inter Dir 4453 puhInterDirNeighbours[iCount] = pcCULeft->getInterDir( uiLeftPartIdx ); 4454 // get Mv from Left 4455 pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 4456 if ( getSlice()->isInterB() ) 4457 { 4458 pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4459 } 4460 if ( mrgCandIdx == iCount ) 4461 { 4462 return; 4463 } 4464 iCount ++; 4465 } 4466 4467 // early termination 4468 if (iCount == getSlice()->getMaxNumMergeCand()) 4469 { 4470 return; 4471 } 4472 // above 4473 UInt uiAbovePartIdx = 0; 4474 TComDataCU* pcCUAbove = 0; 4475 pcCUAbove = getPUAbove( uiAbovePartIdx, uiPartIdxRT ); 4476 4477 Bool isAvailableB1 = pcCUAbove && 4478 pcCUAbove->isDiffMER(xP+nPSW-1, yP-1, xP, yP) && 4479 !( uiPUIdx == 1 && (cCurPS == SIZE_2NxN || cCurPS == SIZE_2NxnU || cCurPS == SIZE_2NxnD) ) && 4480 pcCUAbove->isInter( uiAbovePartIdx ); 4481 4482 if ( isAvailableB1 && (!isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAbove, uiAbovePartIdx ) ) ) 4483 { 4484 abCandIsInter[iCount] = true; 4485 // get Inter Dir 4486 puhInterDirNeighbours[iCount] = pcCUAbove->getInterDir( uiAbovePartIdx ); 4487 // get Mv from Left 4488 pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 4489 if ( getSlice()->isInterB() ) 4490 { 4491 pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4492 } 4493 if ( mrgCandIdx == iCount ) 4494 { 4495 return; 4496 } 4497 iCount ++; 4498 } 4499 // early termination 4500 if (iCount == getSlice()->getMaxNumMergeCand()) 4501 { 4502 return; 4503 } 4504 4505 // above right 4506 UInt uiAboveRightPartIdx = 0; 4507 TComDataCU* pcCUAboveRight = 0; 4508 pcCUAboveRight = getPUAboveRight( uiAboveRightPartIdx, uiPartIdxRT ); 4509 4510 Bool isAvailableB0 = pcCUAboveRight && 4511 pcCUAboveRight->isDiffMER(xP+nPSW, yP-1, xP, yP) && 4512 pcCUAboveRight->isInter( uiAboveRightPartIdx ); 4513 4514 if ( isAvailableB0 && ( !isAvailableB1 || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveRight, uiAboveRightPartIdx ) ) ) 4515 { 4516 abCandIsInter[iCount] = true; 4517 // get Inter Dir 4518 puhInterDirNeighbours[iCount] = pcCUAboveRight->getInterDir( uiAboveRightPartIdx ); 4519 // get Mv from Left 4520 pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 4521 if ( getSlice()->isInterB() ) 4522 { 4523 pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4524 } 4525 if ( mrgCandIdx == iCount ) 4526 { 4527 return; 4528 } 4529 iCount ++; 4530 } 4531 // early termination 4532 if (iCount == getSlice()->getMaxNumMergeCand()) 4533 { 4534 return; 4535 } 4536 4537 //left bottom 4538 UInt uiLeftBottomPartIdx = 0; 4539 TComDataCU* pcCULeftBottom = 0; 4540 pcCULeftBottom = this->getPUBelowLeft( uiLeftBottomPartIdx, uiPartIdxLB ); 4541 4542 Bool isAvailableA0 = pcCULeftBottom && 4543 pcCULeftBottom->isDiffMER(xP-1, yP+nPSH, xP, yP) && 4544 pcCULeftBottom->isInter( uiLeftBottomPartIdx ) ; 4545 4546 if ( isAvailableA0 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCULeftBottom, uiLeftBottomPartIdx ) ) ) 4547 { 4548 abCandIsInter[iCount] = true; 4549 // get Inter Dir 4550 puhInterDirNeighbours[iCount] = pcCULeftBottom->getInterDir( uiLeftBottomPartIdx ); 4551 // get Mv from Left 4552 pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 4553 if ( getSlice()->isInterB() ) 4554 { 4555 pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4556 } 4557 if ( mrgCandIdx == iCount ) 4558 { 4559 return; 4560 } 4561 iCount ++; 4562 } 4563 // early termination 4564 if (iCount == getSlice()->getMaxNumMergeCand()) 4565 { 4566 return; 4567 } 4568 4569 // above left 4570 if( iCount < 4 ) 4571 { 4572 UInt uiAboveLeftPartIdx = 0; 4573 TComDataCU* pcCUAboveLeft = 0; 4574 pcCUAboveLeft = getPUAboveLeft( uiAboveLeftPartIdx, uiAbsPartAddr ); 4575 4576 Bool isAvailableB2 = pcCUAboveLeft && 4577 pcCUAboveLeft->isDiffMER(xP-1, yP-1, xP, yP) && 4578 pcCUAboveLeft->isInter( uiAboveLeftPartIdx ); 4579 4580 if ( isAvailableB2 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) ) 4581 && ( !isAvailableB1 || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) ) ) 4582 { 4583 abCandIsInter[iCount] = true; 4584 // get Inter Dir 4585 puhInterDirNeighbours[iCount] = pcCUAboveLeft->getInterDir( uiAboveLeftPartIdx ); 4586 // get Mv from Left 4587 pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 4588 if ( getSlice()->isInterB() ) 4589 { 4590 pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4591 } 4592 if ( mrgCandIdx == iCount ) 4593 { 4594 return; 4595 } 4596 iCount ++; 4597 } 4598 } 4599 // early termination 4600 if (iCount == getSlice()->getMaxNumMergeCand()) 4601 { 4602 return; 4603 } 4604 4605 if ( getSlice()->getEnableTMVPFlag() ) 4606 { 4607 //>> MTK colocated-RightBottom 4608 UInt uiPartIdxRB; 4609 4610 deriveRightBottomIdx( uiPUIdx, uiPartIdxRB ); 4611 4612 UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB]; 4613 const UInt numPartInCtuWidth = m_pcPic->getNumPartInCtuWidth(); 4614 const UInt numPartInCtuHeight = m_pcPic->getNumPartInCtuHeight(); 4615 4616 TComMv cColMv; 4617 Int iRefIdx; 4618 Int ctuRsAddr = -1; 4619 4620 if ( ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth () ) < m_pcSlice->getSPS()->getPicWidthInLumaSamples () ) // image boundary check 4621 && ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) ) 4622 { 4623 if ( ( uiAbsPartIdxTmp % numPartInCtuWidth < numPartInCtuWidth - 1 ) && // is not at the last column of CTU 4624 ( uiAbsPartIdxTmp / numPartInCtuWidth < numPartInCtuHeight - 1 ) ) // is not at the last row of CTU 4625 { 4626 uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + numPartInCtuWidth + 1 ]; 4627 ctuRsAddr = getCtuRsAddr(); 4628 } 4629 else if ( uiAbsPartIdxTmp % numPartInCtuWidth < numPartInCtuWidth - 1 ) // is not at the last column of CTU But is last row of CTU 4630 { 4631 uiAbsPartAddr = g_auiRasterToZscan[ (uiAbsPartIdxTmp + numPartInCtuWidth + 1) % m_pcPic->getNumPartitionsInCtu() ]; 4632 } 4633 else if ( uiAbsPartIdxTmp / numPartInCtuWidth < numPartInCtuHeight - 1 ) // is not at the last row of CTU But is last column of CTU 4634 { 4635 uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ]; 4636 ctuRsAddr = getCtuRsAddr() + 1; 4637 } 4638 else //is the right bottom corner of CTU 4639 { 4640 uiAbsPartAddr = 0; 4641 } 4642 } 4643 4644 iRefIdx = 0; 4645 4646 Bool bExistMV = false; 4647 UInt uiPartIdxCenter; 4648 Int dir = 0; 4649 UInt uiArrayAddr = iCount; 4650 xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter ); 4651 bExistMV = ctuRsAddr >= 0 && xGetColMVP( REF_PIC_LIST_0, ctuRsAddr, uiAbsPartAddr, cColMv, iRefIdx ); 4652 if( bExistMV == false ) 4653 { 4654 bExistMV = xGetColMVP( REF_PIC_LIST_0, getCtuRsAddr(), uiPartIdxCenter, cColMv, iRefIdx ); 4655 } 4656 if( bExistMV ) 4657 { 4658 dir |= 1; 4659 pcMvFieldNeighbours[ 2 * uiArrayAddr ].setMvField( cColMv, iRefIdx ); 4660 } 4661 4662 if ( getSlice()->isInterB() ) 4663 { 4664 bExistMV = ctuRsAddr >= 0 && xGetColMVP( REF_PIC_LIST_1, ctuRsAddr, uiAbsPartAddr, cColMv, iRefIdx); 4665 if( bExistMV == false ) 4666 { 4667 bExistMV = xGetColMVP( REF_PIC_LIST_1, getCtuRsAddr(), uiPartIdxCenter, cColMv, iRefIdx ); 4668 } 4669 if( bExistMV ) 4670 { 4671 dir |= 2; 4672 pcMvFieldNeighbours[ 2 * uiArrayAddr + 1 ].setMvField( cColMv, iRefIdx ); 4673 } 4674 } 4675 4676 if (dir != 0) 4677 { 4678 puhInterDirNeighbours[uiArrayAddr] = dir; 4679 abCandIsInter[uiArrayAddr] = true; 4680 4681 if ( mrgCandIdx == iCount ) 4682 { 4683 return; 4684 } 4685 iCount++; 4686 } 4687 } 4688 // early termination 4689 if (iCount == getSlice()->getMaxNumMergeCand()) 4690 { 4691 return; 4692 } 4693 4694 UInt uiArrayAddr = iCount; 4695 UInt uiCutoff = uiArrayAddr; 4696 4697 if ( getSlice()->isInterB() ) 4698 { 4699 static const UInt NUM_PRIORITY_LIST=12; 4700 static const UInt uiPriorityList0[NUM_PRIORITY_LIST] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3}; 4701 static const UInt uiPriorityList1[NUM_PRIORITY_LIST] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2}; 4702 4703 for (Int idx=0; idx<uiCutoff*(uiCutoff-1) && uiArrayAddr!= getSlice()->getMaxNumMergeCand(); idx++) 4704 { 4705 assert(idx<NUM_PRIORITY_LIST); 4706 Int i = uiPriorityList0[idx]; 4707 Int j = uiPriorityList1[idx]; 4708 if (abCandIsInter[i] && abCandIsInter[j]&& (puhInterDirNeighbours[i]&0x1)&&(puhInterDirNeighbours[j]&0x2)) 4709 { 4710 abCandIsInter[uiArrayAddr] = true; 4711 puhInterDirNeighbours[uiArrayAddr] = 3; 4712 4713 // get Mv from cand[i] and cand[j] 4714 pcMvFieldNeighbours[uiArrayAddr << 1].setMvField(pcMvFieldNeighbours[i<<1].getMv(), pcMvFieldNeighbours[i<<1].getRefIdx()); 4715 pcMvFieldNeighbours[( uiArrayAddr << 1 ) + 1].setMvField(pcMvFieldNeighbours[(j<<1)+1].getMv(), pcMvFieldNeighbours[(j<<1)+1].getRefIdx()); 4716 4717 Int iRefPOCL0 = m_pcSlice->getRefPOC( REF_PIC_LIST_0, pcMvFieldNeighbours[(uiArrayAddr<<1)].getRefIdx() ); 4718 Int iRefPOCL1 = m_pcSlice->getRefPOC( REF_PIC_LIST_1, pcMvFieldNeighbours[(uiArrayAddr<<1)+1].getRefIdx() ); 4719 if (iRefPOCL0 == iRefPOCL1 && pcMvFieldNeighbours[(uiArrayAddr<<1)].getMv() == pcMvFieldNeighbours[(uiArrayAddr<<1)+1].getMv()) 4720 { 4721 abCandIsInter[uiArrayAddr] = false; 4722 } 4723 else 4724 { 4725 uiArrayAddr++; 4726 } 4727 } 4728 } 4729 } 4730 // early termination 4731 if (uiArrayAddr == getSlice()->getMaxNumMergeCand()) 4732 { 4733 return; 4734 } 4735 4736 Int iNumRefIdx = (getSlice()->isInterB()) ? min(m_pcSlice->getNumRefIdx(REF_PIC_LIST_0), m_pcSlice->getNumRefIdx(REF_PIC_LIST_1)) : m_pcSlice->getNumRefIdx(REF_PIC_LIST_0); 4737 4738 Int r = 0; 4739 Int refcnt = 0; 4740 while (uiArrayAddr < getSlice()->getMaxNumMergeCand()) 4741 { 4742 abCandIsInter[uiArrayAddr] = true; 4743 puhInterDirNeighbours[uiArrayAddr] = 1; 4744 pcMvFieldNeighbours[uiArrayAddr << 1].setMvField( TComMv(0, 0), r); 4745 4746 if ( getSlice()->isInterB() ) 4747 { 4748 puhInterDirNeighbours[uiArrayAddr] = 3; 4749 pcMvFieldNeighbours[(uiArrayAddr << 1) + 1].setMvField(TComMv(0, 0), r); 4750 } 4751 uiArrayAddr++; 4752 4753 if ( refcnt == iNumRefIdx - 1 ) 4754 { 4755 r = 0; 4756 } 4757 else 4758 { 4759 ++r; 4760 ++refcnt; 4761 } 4762 } 4763 numValidMergeCand = uiArrayAddr; 4764 } 4765 #endif 4099 } 4766 4100 4767 4101 /** Check whether the current PU and a spatial neighboring PU are in a same ME region. … … 4978 4312 } 4979 4313 if ( ctuRsAddr >= 0 && xGetColMVP( eRefPicList, ctuRsAddr, uiAbsPartAddr, cColMv, iRefIdx_Col 4980 #if H_3D_TMVP4314 #if NH_3D_TMVP 4981 4315 , 0 4982 4316 #endif … … 4990 4324 xDeriveCenterIdx( uiPartIdx, uiPartIdxCenter ); 4991 4325 if (xGetColMVP( eRefPicList, getCtuRsAddr(), uiPartIdxCenter, cColMv, iRefIdx_Col 4992 #if H_3D_TMVP4326 #if NH_3D_TMVP 4993 4327 , 0 4994 4328 #endif … … 5021 4355 UInt partAddr; 5022 4356 5023 #if H_3D_DBBP4357 #if NH_3D_DBBP 5024 4358 if( getDBBPFlag(0) ) 5025 4359 { … … 5041 4375 const TComSPS &sps=*(m_pcSlice->getSPS()); 5042 4376 Int iMvShift = 2; 5043 #if H_3D_IC4377 #if NH_3D_INTEGER_MV_DEPTH 5044 4378 if( getSlice()->getIsDepth() ) 5045 4379 iMvShift = 0; … … 5114 4448 return ( getSkipFlag( uiPartIdx ) ); 5115 4449 } 5116 5117 #if H_3D_IC5118 Bool TComDataCU::isIC( UInt uiPartIdx )5119 {5120 if ( m_pcSlice->isIntra () )5121 {5122 return false;5123 }5124 return ( ( getSkipFlag(uiPartIdx) || getPredictionMode(uiPartIdx) == MODE_INTER) && getICFlag( uiPartIdx ) && isICFlagRequired( uiPartIdx ) );5125 }5126 #endif5127 4450 5128 4451 // ==================================================================================================================== … … 5342 4665 5343 4666 Bool TComDataCU::xGetColMVP( RefPicList eRefPicList, Int ctuRsAddr, Int uiPartUnitIdx, TComMv& rcMv, Int& riRefIdx 5344 #if H_3D_TMVP4667 #if NH_3D_TMVP 5345 4668 , Bool bMRG 5346 4669 #endif … … 5394 4717 if ( bIsCurrRefLongTerm != bIsColRefLongTerm ) 5395 4718 { 5396 #if H_3D_TMVP4719 #if NH_3D_TMVP 5397 4720 Int iAlterRefIdx = m_pcSlice->getAlterRefIdx(eRefPicList); 5398 4721 if(bMRG && iAlterRefIdx > 0) … … 5407 4730 #endif 5408 4731 return false; 5409 #if H_3D_TMVP4732 #if NH_3D_TMVP 5410 4733 } 5411 4734 #endif … … 5414 4737 if ( bIsCurrRefLongTerm || bIsColRefLongTerm ) 5415 4738 { 5416 #if H_3D_TMVP4739 #if NH_3D_TMVP 5417 4740 Int iCurrViewId = m_pcSlice->getViewId (); 5418 4741 Int iCurrRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId (); 5419 Int iColViewId = pColC U->getSlice()->getViewId();5420 Int iColRefViewId = pColC U->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewId();4742 Int iColViewId = pColCtu->getSlice()->getViewId(); 4743 Int iColRefViewId = pColCtu->getSlice()->getRefPic( eColRefPicList, pColCtu->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewId(); 5421 4744 iScale = 4096; 5422 4745 if ( iCurrRefViewId != iCurrViewId && iColViewId != iColRefViewId ) … … 5432 4755 #endif 5433 4756 rcMv = cColMv; 5434 #if H_3D_TMVP4757 #if NH_3D_TMVP 5435 4758 } 5436 4759 #endif … … 5575 4898 #endif 5576 4899 5577 #if H_3D_IV_MERGE4900 #if NH_3D_IV_MERGE 5578 4901 Void TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 5579 4902 { … … 5585 4908 Int iViewIdx = getSlice()->getDefaultRefViewIdx(); 5586 4909 pDisp->m_aVIdxCan = iViewIdx; 5587 Int iDisp = getSlice()->getDepthToDisparityB( iViewIdx )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepth Y() - 1 )) ];4910 Int iDisp = getSlice()->getDepthToDisparityB( iViewIdx )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 )) ]; 5588 4911 5589 4912 cMv.setHor(iDisp); … … 5654 4977 } 5655 4978 #endif 5656 #if H_3D_NBDV4979 #if NH_3D_NBDV 5657 4980 //Notes from QC: 5658 //TBD#1: DoNBDV related contributions are just partially integrated under the marco of H_3D_NBDV_REF, remove this comment once DoNBDV and BVSP are done4981 //TBD#1: DoNBDV related contributions are just partially integrated under the marco of NH_3D_NBDV_REF, remove this comment once DoNBDV and BVSP are done 5659 4982 //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 5660 4983 //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 5661 4984 Void TComDataCU::getDisMvpCandNBDV( DisInfo* pDInfo 5662 #if H_3D_NBDV_REF4985 #if NH_3D_NBDV_REF 5663 4986 , Bool bDepthRefine 5664 4987 #endif … … 5683 5006 } 5684 5007 } 5685 #if H_3D_NBDV_REF5008 #if NH_3D_NBDV_REF 5686 5009 if( !m_pcSlice->getDepthRefinementFlag( ) ) 5687 5010 { … … 5706 5029 ///*** Derive center position *** 5707 5030 UInt uiPartIdxCenter; 5708 Int uiLCUIdx = getAddr();5031 Int uiLCUIdx = getCtuRsAddr(); 5709 5032 xDeriveCenterIdx(uiPartIdx, uiPartIdxCenter ); 5710 5033 … … 5733 5056 pDInfo->m_aVIdxCan = iTargetViewIdx; 5734 5057 5735 #if H_3D_NBDV_REF5058 #if NH_3D_NBDV_REF 5736 5059 TComPic* picDepth = NULL; 5737 5060 #if H_3D_FCO_VSP_DONBDV_E0163 … … 5755 5078 } 5756 5079 pDInfo->m_acDoNBDV = cColMv; 5757 #endif // H_3D_NBDV_REF5080 #endif //NH_3D_NBDV_REF 5758 5081 return; 5759 5082 } … … 5769 5092 bCheckMcpDv = true; 5770 5093 if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, pDInfo, bCheckMcpDv, &cIDVInfo, DVFROM_LEFT 5771 #if H_3D_NBDV_REF5094 #if NH_3D_NBDV_REF 5772 5095 , bDepthRefine 5773 5096 #endif … … 5779 5102 if(pcTmpCU != NULL ) 5780 5103 { 5781 bCheckMcpDv = ( ( get Addr() - pcTmpCU->getAddr() ) == 0);5104 bCheckMcpDv = ( ( getCtuRsAddr() - pcTmpCU->getCtuRsAddr() ) == 0); 5782 5105 if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, pDInfo, bCheckMcpDv, &cIDVInfo, DVFROM_ABOVE 5783 #if H_3D_NBDV_REF5106 #if NH_3D_NBDV_REF 5784 5107 , bDepthRefine 5785 5108 #endif … … 5800 5123 pDInfo->m_acNBDV = cDispVec; 5801 5124 pDInfo->m_aVIdxCan = cIDVInfo.m_aVIdxCan[iList][ curPos ]; 5802 #if H_3D_NBDV_REF5125 #if NH_3D_NBDV_REF 5803 5126 #if H_3D_FCO_VSP_DONBDV_E0163 5804 5127 TComPic* picDepth = NULL; … … 5838 5161 pDInfo->m_aVIdxCan = getSlice()->getDefaultRefViewIdx(); 5839 5162 5840 #if H_3D_NBDV_REF5163 #if NH_3D_NBDV_REF 5841 5164 TComPic* picDepth = NULL; 5842 5165 #if H_3D_FCO_VSP_DONBDV_E0163 … … 5864 5187 } 5865 5188 5866 #if H_3D_NBDV_REF5189 #if NH_3D_NBDV_REF 5867 5190 Pel TComDataCU::getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iBlkWidth, Int iBlkHeight, Int* aiShiftLUT ) 5868 5191 { 5869 Int iPictureWidth = pcBaseViewDepthPicYuv->getWidth( );5870 Int iPictureHeight = pcBaseViewDepthPicYuv->getHeight( );5871 5192 Int iPictureWidth = pcBaseViewDepthPicYuv->getWidth(COMPONENT_Y); 5193 Int iPictureHeight = pcBaseViewDepthPicYuv->getHeight(COMPONENT_Y); 5194 5872 5195 Int depthStartPosX = Clip3(0, iPictureWidth - 1, iBlkX + ((mv->getHor()+2)>>2)); 5873 5196 Int depthStartPosY = Clip3(0, iPictureHeight - 1, iBlkY + ((mv->getVer()+2)>>2)); … … 5875 5198 Int depthEndPosY = Clip3(0, iPictureHeight - 1, iBlkY + iBlkHeight - 1 + ((mv->getVer()+2)>>2)); 5876 5199 5877 Pel* depthTL = pcBaseViewDepthPicYuv->get LumaAddr();5878 Int depStride = pcBaseViewDepthPicYuv->getStride( );5200 Pel* depthTL = pcBaseViewDepthPicYuv->getAddr(COMPONENT_Y); 5201 Int depStride = pcBaseViewDepthPicYuv->getStride(COMPONENT_Y); 5879 5202 5880 5203 Pel maxDepthVal = 0; … … 5891 5214 if (picDepth) 5892 5215 { 5893 UInt uiAbsPartAddrCurrCU = m_ uiAbsIdxInLCU+ uiPartAddr;5216 UInt uiAbsPartAddrCurrCU = m_absZIdxInCtu + uiPartAddr; 5894 5217 Int iWidth, iHeight; 5895 5218 getPartIndexAndSize( uiPartIdx, uiPartAddr, iWidth, iHeight ); // The modified value of uiPartAddr won't be used any more 5896 5219 5897 5220 TComPicYuv* pcBaseViewDepthPicYuv = picDepth->getPicYuvRec(); 5898 Int iBlkX = ( getAddr() % picDepth->getFrameWidthInCU() ) * g_uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ uiAbsPartAddrCurrCU ] ]; 5899 Int iBlkY = ( getAddr() / picDepth->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ uiAbsPartAddrCurrCU ] ]; 5221 const TComSPS &sps =*(getSlice()->getSPS()); 5222 Int iBlkX = ( getCtuRsAddr() % picDepth->getFrameWidthInCtus() ) * sps.getMaxCUWidth() + g_auiRasterToPelX[ g_auiZscanToRaster[ uiAbsPartAddrCurrCU ] ]; 5223 Int iBlkY = ( getCtuRsAddr() / picDepth->getFrameWidthInCtus() ) * sps.getMaxCUHeight() + g_auiRasterToPelY[ g_auiZscanToRaster[ uiAbsPartAddrCurrCU ] ]; 5900 5224 5901 5225 Int* aiShiftLUT = getSlice()->getDepthToDisparityB(refViewIdx ); … … 5905 5229 } 5906 5230 } 5907 #endif // H_3D_NBDV_REF5231 #endif //NH_3D_NBDV_REF 5908 5232 5909 5233 5910 5234 Bool TComDataCU::xCheckSpatialNBDV( TComDataCU* pcTmpCU, UInt uiIdx, DisInfo* pNbDvInfo, Bool bSearchForMvpDv, IDVInfo* paIDVInfo, UInt uiMvpDvPos 5911 #if H_3D_NBDV_REF5235 #if NH_3D_NBDV_REF 5912 5236 , Bool bDepthRefine 5913 5237 #endif … … 5930 5254 pNbDvInfo->m_acNBDV = cMvPred; 5931 5255 pNbDvInfo->m_aVIdxCan = refViewIdx; 5932 #if H_3D_NBDV_REF5256 #if NH_3D_NBDV_REF 5933 5257 TComPic* picDepth = NULL; 5934 5258 assert(getSlice()->getRefPic(eRefPicList, refId)->getPOC() == getSlice()->getPOC()); … … 5976 5300 { 5977 5301 UInt uiPartIdx = 0; 5978 UInt uiNumPartInCUWidth = m_pcPic->getNumPartIn Width();5979 Int uiLCUIdx = get Addr();5302 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInCtuWidth(); 5303 Int uiLCUIdx = getCtuRsAddr(); 5980 5304 5981 5305 UInt uiPartIdxRB; … … 5983 5307 UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB]; 5984 5308 5985 if (( m_pcPic->getC U(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() )>= m_pcSlice->getSPS()->getPicWidthInLumaSamples() )5309 if (( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() )>= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) 5986 5310 { 5987 5311 riLCUIdxRBNb = -1; 5988 5312 riPartIdxRBNb = -1; 5989 5313 } 5990 else if(( m_pcPic->getC U(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() )>= m_pcSlice->getSPS()->getPicHeightInLumaSamples() )5314 else if(( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() )>= m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) 5991 5315 { 5992 5316 riLCUIdxRBNb = -1; … … 5996 5320 { 5997 5321 if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) && // is not at the last column of LCU 5998 ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartIn Height() - 1 ) ) // is not at the last row of LCU5322 ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInCtuHeight() - 1 ) ) // is not at the last row of LCU 5999 5323 { 6000 5324 riPartIdxRBNb = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ]; … … 6006 5330 riLCUIdxRBNb = -1; 6007 5331 } 6008 else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartIn Height() - 1 ) // is not at the last row of LCU But is last column of LCU5332 else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInCtuHeight() - 1 ) // is not at the last row of LCU But is last column of LCU 6009 5333 { 6010 5334 riPartIdxRBNb = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ]; … … 6022 5346 Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiDepth ) 6023 5347 { 6024 UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1); 5348 #if NH_3D_VSP // bug fix 5349 UInt uiCurrPartNumb = m_pcPic->getNumPartitionsInCtu() >> (uiDepth << 1); 5350 assert(m_pcPic->getNumPartitionsInCtu() ==m_pcPic->getNumPartInCtuWidth()*m_pcPic->getNumPartInCtuHeight()); 5351 5352 #else 5353 UInt uiCurrPartNumb = m_pcPic->getNumPartInCtuWidth() >> (uiDepth << 1); 5354 #endif 6025 5355 for (UInt ui = 0; ui < uiCurrPartNumb; ui++ ) 6026 5356 { … … 6028 5358 } 6029 5359 } 6030 #if H_3D_VSP5360 #if NH_3D_VSP || NH_3D_DBBP 6031 5361 Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ) 6032 5362 { … … 6041 5371 Int iColViewIdx, iColRefViewIdx; 6042 5372 TComPic *pColPic = getSlice()->getRefPic( eRefPicList, refidx); 6043 TComDataCU *pColCU = pColPic->getC U( uiCUAddr );5373 TComDataCU *pColCU = pColPic->getCtu( uiCUAddr ); 6044 5374 iColViewIdx = pColCU->getSlice()->getViewIndex(); 6045 if (pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)== SIZE_NONE||pColCU->isIntra(uiPartUnitIdx))5375 if (pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==NUMBER_OF_PART_SIZES||pColCU->isIntra(uiPartUnitIdx)) 6046 5376 { 6047 5377 return false; … … 6105 5435 6106 5436 Bool depthRefineFlag = false; 6107 #if H_3D_NBDV_REF5437 #if NH_3D_NBDV_REF 6108 5438 depthRefineFlag = m_pcSlice->getDepthRefinementFlag( ); 6109 #endif // H_3D_NBDV_REF5439 #endif // NH_3D_NBDV_REF 6110 5440 6111 5441 TComMv cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; … … 6161 5491 #endif 6162 5492 6163 #if H_3D_SPIVMP5493 #if NH_3D_SPIVMP 6164 5494 Void TComDataCU::getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight) 6165 5495 { … … 6178 5508 Void TComDataCU::getSPAbsPartIdx(UInt uiBaseAbsPartIdx, Int iWidth, Int iHeight, Int iPartIdx, Int iNumPartLine, UInt& ruiPartAddr ) 6179 5509 { 6180 uiBaseAbsPartIdx += m_ uiAbsIdxInLCU;5510 uiBaseAbsPartIdx += m_absZIdxInCtu; 6181 5511 Int iBasePelX = g_auiRasterToPelX[g_auiZscanToRaster[uiBaseAbsPartIdx]]; 6182 5512 Int iBasePelY = g_auiRasterToPelY[g_auiZscanToRaster[uiBaseAbsPartIdx]]; 6183 5513 Int iCurrPelX = iBasePelX + iPartIdx%iNumPartLine * iWidth; 6184 5514 Int iCurrPelY = iBasePelY + iPartIdx/iNumPartLine * iHeight; 6185 Int iCurrRaster = iCurrPelY / getPic()->getMinCUHeight() * getPic()->getNumPartIn Width() + iCurrPelX/getPic()->getMinCUWidth();5515 Int iCurrRaster = iCurrPelY / getPic()->getMinCUHeight() * getPic()->getNumPartInCtuWidth() + iCurrPelX/getPic()->getMinCUWidth(); 6186 5516 ruiPartAddr = g_auiRasterToZscan[iCurrRaster]; 6187 ruiPartAddr -= m_ uiAbsIdxInLCU;5517 ruiPartAddr -= m_absZIdxInCtu; 6188 5518 } 6189 5519 6190 5520 Void TComDataCU::setInterDirSP( UInt uiDir, UInt uiAbsPartIdx, Int iWidth, Int iHeight ) 6191 5521 { 6192 uiAbsPartIdx += getZorderIdxInC U();5522 uiAbsPartIdx += getZorderIdxInCtu(); 6193 5523 Int iStartPelX = g_auiRasterToPelX[g_auiZscanToRaster[uiAbsPartIdx]]; 6194 5524 Int iStartPelY = g_auiRasterToPelY[g_auiZscanToRaster[uiAbsPartIdx]]; … … 6202 5532 for (Int j=iStartPelX; j < iEndPelX; j += getPic()->getMinCUWidth()) 6203 5533 { 6204 iCurrRaster = i / getPic()->getMinCUHeight() * getPic()->getNumPartIn Width() + j/getPic()->getMinCUWidth();5534 iCurrRaster = i / getPic()->getMinCUHeight() * getPic()->getNumPartInCtuWidth() + j/getPic()->getMinCUWidth(); 6205 5535 uiPartAddr = g_auiRasterToZscan[iCurrRaster]; 6206 uiPartAddr -= getZorderIdxInC U();5536 uiPartAddr -= getZorderIdxInCtu(); 6207 5537 6208 5538 m_puhInterDir[uiPartAddr] = uiDir; … … 6212 5542 #endif 6213 5543 6214 #if H_3D_IV_MERGE5544 #if NH_3D_IV_MERGE 6215 5545 Bool 6216 5546 TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc , Bool bIsDepth 6217 #if H_3D_SPIVMP5547 #if NH_3D_SPIVMP 6218 5548 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 6219 5549 #endif … … 6234 5564 6235 5565 Int iCurrPosX, iCurrPosY; 6236 pcBaseRec->getTopLeftSamplePos( get Addr(), getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY );6237 6238 #if ! H_3D_SPIVMP5566 pcBaseRec->getTopLeftSamplePos( getCtuRsAddr(), getZorderIdxInCtu() + uiPartAddr, iCurrPosX, iCurrPosY ); 5567 5568 #if !NH_3D_SPIVMP 6239 5569 iCurrPosX += ( iWidth >> 1 ); 6240 5570 iCurrPosY += ( iHeight >> 1 ); … … 6242 5572 6243 5573 Bool depthRefineFlag = false; 6244 #if H_3D_NBDV_REF5574 #if NH_3D_NBDV_REF 6245 5575 depthRefineFlag = m_pcSlice->getDepthRefinementFlag( ); 6246 #endif // H_3D_NBDV_REF5576 #endif // NH_3D_NBDV_REF 6247 5577 6248 5578 TComMv cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; … … 6253 5583 6254 5584 Bool abPdmAvailable[8] = {false, false, false, false, false, false, false, false}; 6255 #if H_3D_NBDV5585 #if NH_3D_NBDV 6256 5586 for( Int i = 0; i < 8; i++) 6257 5587 { … … 6263 5593 { 6264 5594 6265 #if H_3D_SPIVMP5595 #if NH_3D_SPIVMP 6266 5596 //////////////////////////////// 6267 5597 //////////sub-PU IvMC/////////// … … 6269 5599 if(!m_pcSlice->getIsDepth()) 6270 5600 { 5601 #if H_3D_DBBP 6271 5602 if (!getDBBPFlag(0)) 5603 #else 5604 if (1) 5605 #endif 6272 5606 { 6273 5607 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; … … 6301 5635 } 6302 5636 6303 Int iRefCenterPosX = Clip3( 0, pcBaseRec->getWidth ( ) - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) );6304 Int iRefCenterPosY = Clip3( 0, pcBaseRec->getHeight( ) - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) );5637 Int iRefCenterPosX = Clip3( 0, pcBaseRec->getWidth (COMPONENT_Y) - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); 5638 Int iRefCenterPosY = Clip3( 0, pcBaseRec->getHeight(COMPONENT_Y) - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) ); 6305 5639 6306 5640 pcBaseRec->getCUAddrAndPartIdx( iRefCenterPosX , iRefCenterPosY , iRefCenterCUAddr, iRefCenterAbsPartIdx ); 6307 TComDataCU* pcDefaultCU = pcBasePic->getC U( iRefCenterCUAddr );5641 TComDataCU* pcDefaultCU = pcBasePic->getCtu( iRefCenterCUAddr ); 6308 5642 if(!( pcDefaultCU->getPredictionMode( iRefCenterAbsPartIdx ) == MODE_INTRA )) 6309 5643 { … … 6329 5663 abPdmAvailable[ uiCurrRefListId ] = true; 6330 5664 TComMv cMv(cDefaultMvField.getHor(), cDefaultMvField.getVer()); 6331 #if H_3D_NBDV6332 #if H_3D_IV_MERGE5665 #if NH_3D_NBDV 5666 #if NH_3D_IV_MERGE 6333 5667 if( !bIsDepth ) 6334 5668 { … … 6338 5672 cMv.setIDVVer (cDv.getVer()); 6339 5673 cMv.setIDVVId (iViewIndex); 6340 #if H_3D_IV_MERGE5674 #if NH_3D_IV_MERGE 6341 5675 } 6342 5676 #endif … … 6363 5697 for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iSPWidth) 6364 5698 { 6365 iBasePosX = Clip3( 0, pcBaseRec->getWidth ( ) - 1, j + iDelX + ( (cDv.getHor() + 2 ) >> 2 ));6366 iBasePosY = Clip3( 0, pcBaseRec->getHeight( ) - 1, i + iDelY + ( (cDv.getVer() + 2 ) >> 2 ));5699 iBasePosX = Clip3( 0, pcBaseRec->getWidth (COMPONENT_Y) - 1, j + iDelX + ( (cDv.getHor() + 2 ) >> 2 )); 5700 iBasePosY = Clip3( 0, pcBaseRec->getHeight(COMPONENT_Y) - 1, i + iDelY + ( (cDv.getVer() + 2 ) >> 2 )); 6367 5701 6368 5702 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY, iBaseCUAddr, iBaseAbsPartIdx ); 6369 pcBaseCU = pcBasePic->getC U( iBaseCUAddr );5703 pcBaseCU = pcBasePic->getCtu( iBaseCUAddr ); 6370 5704 if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA )) 6371 5705 { … … 6435 5769 //////////////////////////////// 6436 5770 6437 #if H_3D_SPIVMP5771 #if NH_3D_SPIVMP 6438 5772 if(m_pcSlice->getIsDepth()) 6439 5773 { … … 6441 5775 iCurrPosY += ( iHeight >> 1 ); 6442 5776 } 5777 #if H_3D_DBBP 6443 5778 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 6444 5779 #else 5780 for(Int iLoopCan = ( m_pcSlice->getIsDepth() ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 5781 #endif 5782 #else 6445 5783 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 6446 5784 #endif … … 6452 5790 Int iBaseAbsPartIdx; 6453 5791 6454 Int offsetW = (iLoopCan == 0) ? 0 : ( iWidth * 2 6455 Int offsetH = (iLoopCan == 0) ? 0 : ( iHeight * 2 6456 6457 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth ( ) - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) );6458 Int iBasePosY = Clip3( 0, pcBaseRec->getHeight( ) - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) );5792 Int offsetW = (iLoopCan == 0) ? 0 : ( iWidth * 2); 5793 Int offsetH = (iLoopCan == 0) ? 0 : ( iHeight * 2); 5794 5795 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth (COMPONENT_Y) - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) ); 5796 Int iBasePosY = Clip3( 0, pcBaseRec->getHeight(COMPONENT_Y) - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) ); 6459 5797 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx ); 6460 5798 6461 TComDataCU* pcBaseCU = pcBasePic->getC U( iBaseCUAddr );5799 TComDataCU* pcBaseCU = pcBasePic->getCtu( iBaseCUAddr ); 6462 5800 if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA )) 6463 5801 { … … 6486 5824 abPdmAvailable[ (uiCurrRefListId + (iLoopCan<<2)) ] = true; 6487 5825 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 6488 #if H_3D_NBDV6489 #if H_3D_IV_MERGE5826 #if NH_3D_NBDV 5827 #if NH_3D_IV_MERGE 6490 5828 if( !bIsDepth ) 6491 5829 { … … 6495 5833 cMv.setIDVVer (cDv.getVer()); 6496 5834 cMv.setIDVVId (iViewIndex); 6497 #if H_3D_IV_MERGE5835 #if NH_3D_IV_MERGE 6498 5836 } 6499 5837 #endif … … 6511 5849 } 6512 5850 } 6513 #if H_3D_SPIVMP 5851 #if NH_3D_SPIVMP 5852 #if H_3D_DBBP 6514 5853 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 5854 #else 5855 for(Int iLoopCan = ( m_pcSlice->getIsDepth() ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 5856 #endif 6515 5857 #else 6516 5858 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) … … 6541 5883 abPdmAvailable[ iRefListId + 2 + (iLoopCan<<2) ] = true; 6542 5884 paiPdmRefIdx [ iRefListId + 2 + (iLoopCan<<2) ] = iPdmRefIdx; 6543 #if H_3D_NBDV_REF5885 #if NH_3D_NBDV_REF 6544 5886 TComMv cMv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 6545 5887 #endif 6546 5888 cMv.setHor( cMv.getHor() + ioffsetDV ); 6547 #if H_3D_IV_MERGE5889 #if NH_3D_IV_MERGE 6548 5890 if( bIsDepth ) 6549 5891 { … … 6566 5908 } 6567 5909 #endif 6568 #if H_3D_ARP5910 #if NH_3D_ARP 6569 5911 Void TComDataCU::setARPWSubParts ( UChar w, UInt uiAbsPartIdx, UInt uiDepth ) 6570 5912 { 6571 assert( sizeof( *m_puhARPW) == 1 ); 6572 memset( m_puhARPW + uiAbsPartIdx, w, m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ) ); 6573 } 6574 #endif 6575 6576 #if H_3D_IC 5913 setSubPart<UChar>( w, m_puhARPW, uiAbsPartIdx, uiDepth, 0 ); 5914 } 5915 #endif 5916 5917 #if NH_3D_IC 6577 5918 Void TComDataCU::setICFlagSubParts( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 6578 5919 { 6579 memset( m_pbICFlag + uiAbsPartIdx, bICFlag, (m_pcPic->getNumPart InCU() >> ( 2 * uiDepth ))*sizeof(Bool) );5920 memset( m_pbICFlag + uiAbsPartIdx, bICFlag, (m_pcPic->getNumPartitionsInCtu() >> ( 2 * uiDepth ))*sizeof(Bool) ); 6580 5921 } 6581 5922 … … 6636 5977 #endif 6637 5978 6638 #if H_3D_VSP5979 #if NH_3D_VSP 6639 5980 Void TComDataCU::setMvFieldPUForVSP( TComDataCU* pcCU, UInt partAddr, Int width, Int height, RefPicList eRefPicList, Int iRefIdx, Int &vspSize ) 6640 5981 { … … 6692 6033 TComCUMvField *cuMvField = cu->getCUMvField( refPicList ); 6693 6034 Int partAddrRasterSubPULine = g_auiZscanToRaster[ partAddr ]; 6694 Int numPartsLine = cu->getPic()->getNumPartIn Width();6035 Int numPartsLine = cu->getPic()->getNumPartInCtuWidth(); 6695 6036 6696 6037 Int nTxtPerMvInfoX = 4; // cu->getPic()->getMinCUWidth(); 6697 6038 Int nTxtPerMvInfoY = 4; // cu->getPic()->getMinCUHeight(); 6698 6039 6699 Int refDepStride = picRefDepth->getStride( );6040 Int refDepStride = picRefDepth->getStride( COMPONENT_Y ); 6700 6041 6701 6042 TComMv tmpMv(0, 0); … … 6703 6044 6704 6045 Int refDepOffset = ( (dv->getHor()+2) >> 2 ) + ( (dv->getVer()+2) >> 2 ) * refDepStride; 6705 Pel *refDepth = picRefDepth->get LumaAddr( cu->getAddr(), cu->getZorderIdxInCU() + partAddr ) + refDepOffset;6046 Pel *refDepth = picRefDepth->getAddr( COMPONENT_Y, cu->getCtuRsAddr(), cu->getZorderIdxInCtu() + partAddr ) + refDepOffset; 6706 6047 6707 6048 if ((height % 8)) -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComDataCU.h
r1258 r1279 50 50 #include "TComPattern.h" 51 51 52 #if H_3D_ARP53 #include "TComYuv.h"54 #endif55 52 #if H_3D 56 53 #include <algorithm> … … 65 62 static const UInt NUM_MOST_PROBABLE_MODES=3; 66 63 67 #if H_3D_DBBP64 #if NH_3D_DBBP 68 65 typedef struct _DBBPTmpData 69 66 { … … 167 164 Char* m_apiMVPNum[NUM_REF_PIC_LIST_01]; ///< array of number of possible motion vectors predictors 168 165 Bool* m_pbIPCMFlag; ///< array of intra_pcm flags 169 #if H_3D_NBDV166 #if NH_3D_NBDV 170 167 DisInfo* m_pDvInfo; 171 168 #endif 172 #if H_3D_VSP169 #if NH_3D_VSP 173 170 Char* m_piVSPFlag; ///< array of VSP flags to indicate whehter a block uses VSP or not ///< 0: non-VSP; 1: VSP 174 171 #endif 175 #if H_3D_SPIVMP172 #if NH_3D_SPIVMP 176 173 Bool* m_pbSPIVMPFlag; ///< array of sub-PU IVMP flags to indicate whehter a block uses sub-PU IVMP ///< 0: non-SPIVMP; 1: SPIVMP 177 174 #endif 178 #if H_3D_ARP175 #if NH_3D_ARP 179 176 UChar* m_puhARPW; 180 177 #endif 181 #if H_3D_IC178 #if NH_3D_IC 182 179 Bool* m_pbICFlag; ///< array of IC flags 183 180 #endif … … 190 187 Pel* m_apSegmentDCOffset[2]; 191 188 #endif 192 #if H_3D_DBBP189 #if NH_3D_DBBP 193 190 Bool* m_pbDBBPFlag; ///< array of DBBP flags 194 191 DbbpTmpData m_sDBBPTmpData; 195 192 #endif 196 #if H_3D193 #if NH_3D_MLC 197 194 Bool m_bAvailableFlagA1; ///< A1 available flag 198 195 Bool m_bAvailableFlagB1; ///< B1 available flag … … 217 214 UInt m_uiTotalBins; ///< sum of partition bins 218 215 Char m_codedQP; 219 #if H_3D 220 DisInfo m_cDefaultDisInfo; ///< Default disparity information for initializing 221 #endif 222 #if H_3D_IV_MERGE 223 TComMotionCand m_mergCands[MRG_IVSHIFT+1]; 224 Int m_baseListidc; 216 #if NH_3D_MLC 217 DisInfo m_cDefaultDisInfo; ///< Default disparity information for initializing 218 TComMotionCand m_mergCands[MRG_IVSHIFT+1]; ///< Motion candidates for merge mode 219 Int m_numSpatialCands; 225 220 #endif 226 221 … … 232 227 Bool xAddMVPCand ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); 233 228 Bool xAddMVPCandOrder ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); 234 #if H_3D_VSP229 #if NH_3D_VSP 235 230 Bool xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount); 236 231 #endif 237 #if H_3D_IV_MERGE232 #if NH_3D_IV_MERGE 238 233 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx ); 239 234 #endif … … 241 236 Void deriveRightBottomIdx ( UInt uiPartIdx, UInt& ruiPartIdxRB ); 242 237 Bool xGetColMVP( RefPicList eRefPicList, Int ctuRsAddr, Int uiPartUnitIdx, TComMv& rcMv, Int& riRefIdx 243 #if H_3D_TMVP238 #if NH_3D_TMVP 244 239 , Bool bMRG = true 245 240 #endif … … 248 243 249 244 /// compute scaling factor from POC difference 250 #if ! H_3D_ARP245 #if !NH_3D_ARP 251 246 Int xGetDistScaleFactor ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC ); 252 247 #endif … … 254 249 Void xDeriveCenterIdx( UInt uiPartIdx, UInt& ruiPartIdxCenter ); 255 250 256 #if H_3D_VSP251 #if NH_3D_VSP 257 252 Void xSetMvFieldForVSP ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, Int *shiftLUT, RefPicList refPicList, Int refIdx, Bool isDepth, Int &vspSize ); 258 253 #endif … … 265 260 // create / destroy / initialize / copy 266 261 // ------------------------------------------------------------------------------------------------------------------- 267 #if H_3D_ARP 262 #if NH_3D_ARP 263 /// compute scaling factor from POC difference 268 264 Int xGetDistScaleFactor ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC ); 269 265 #endif … … 279 275 Void initSubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth, Int qp ); 280 276 Void setOutsideCUPart ( UInt uiAbsPartIdx, UInt uiDepth ); 281 #if H_3D_NBDV282 Void copyDVInfoFrom (TComDataCU* pcCU, UInt uiAbsPartIdx);277 #if NH_3D_NBDV 278 Void copyDVInfoFrom (TComDataCU* pcCU, UInt uiAbsPartIdx); 283 279 #endif 284 280 285 281 Void copySubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx ); 286 282 Void copyInterPredInfoFrom ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList 287 #if H_3D_NBDV283 #if NH_3D_NBDV 288 284 , Bool bNBDV = false 289 285 #endif … … 316 312 #endif 317 313 314 #if NH_3D_ARP 315 Void setSlice ( TComSlice* pcSlice) { m_pcSlice = pcSlice; } 316 Void setPic ( TComDataCU* pcCU ) { m_pcPic = pcCU->getPic(); } 317 #endif 318 318 // ------------------------------------------------------------------------------------------------------------------- 319 319 // member functions for CU data … … 326 326 Void setCUTransquantBypassSubParts( Bool flag, UInt uiAbsPartIdx, UInt uiDepth ); 327 327 328 #if H_3D_DBBP328 #if NH_3D_DBBP 329 329 Pel* getVirtualDepthBlock(UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt& uiDepthStride); 330 330 #endif … … 350 350 Void setPredModeSubParts ( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth ); 351 351 352 #if H_3D_DBBP352 #if NH_3D_DBBP 353 353 Bool* getDBBPFlag () { return m_pbDBBPFlag; } 354 354 Bool getDBBPFlag ( UInt uiIdx ) { return m_pbDBBPFlag[uiIdx]; } … … 451 451 template <typename T> 452 452 Void setSubPart ( T bParameter, T* pbBaseCtu, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx ); 453 #if H_3D_VSP 453 #if H_3D_VSP || NH_3D_DBBP 454 454 template<typename T> 455 455 Void setSubPartT ( T uiParameter, T* puhBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx ); … … 477 477 Void setIPCMFlag (UInt uiIdx, Bool b ) { m_pbIPCMFlag[uiIdx] = b; } 478 478 Void setIPCMFlagSubParts (Bool bIpcmFlag, UInt uiAbsPartIdx, UInt uiDepth); 479 #if H_3D_NBDV479 #if NH_3D_NBDV 480 480 Void setDvInfoSubParts ( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiDepth ); 481 #if H_3D_VSP || NH_3D_DBBP 481 482 Void setDvInfoSubParts ( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth); 483 #endif 482 484 DisInfo* getDvInfo () { return m_pDvInfo; } 483 485 DisInfo getDvInfo (UInt uiIdx) { return m_pDvInfo[uiIdx]; } 484 486 #endif 485 #if H_3D_NBDV487 #if NH_3D_NBDV 486 488 Void xDeriveRightBottomNbIdx(Int &uiLCUIdxRBNb, Int &uiPartIdxRBNb ); 487 489 Bool xCheckSpatialNBDV (TComDataCU* pcTmpCU, UInt uiIdx, DisInfo* pNbDvInfo, Bool bSearchForMvpDv, IDVInfo* paMvpDvInfo, 488 490 UInt uiMvpDvPos 489 #if H_3D_NBDV_REF491 #if NH_3D_NBDV_REF 490 492 , Bool bDepthRefine = false 491 493 #endif … … 493 495 Bool xGetColDisMV ( Int currCandPic, RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx ); 494 496 Void getDisMvpCandNBDV ( DisInfo* pDInfo 495 #if H_3D_NBDV_REF497 #if NH_3D_NBDV_REF 496 498 , Bool bDepthRefine = false 497 499 #endif 498 500 ); 499 501 502 #if NH_3D_IV_MERGE 503 Void getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 504 #endif 505 500 506 #if H_3D 501 507 Void getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 502 508 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); 503 509 #endif 504 #if H_3D_NBDV_REF510 #if NH_3D_NBDV_REF 505 511 Pel getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT ); 506 512 Void estimateDVFromDM(Int refViewIdx, UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred ); 507 #endif // H_3D_NBDV_REF513 #endif //NH_3D_NBDV_REF 508 514 #endif 509 515 #if NH_3D_DIS … … 513 519 Void getIVNStatus ( UInt uiPartIdx, DisInfo* pDInfo, Bool& bIVFMerge, Int& iIVFMaxD); 514 520 #endif 515 #if H_3D_SPIVMP521 #if NH_3D_SPIVMP 516 522 Void getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight); 517 523 Void getSPAbsPartIdx(UInt uiBaseAbsPartIdx, Int iWidth, Int iHeight, Int iPartIdx, Int iNumPartLine, UInt& ruiPartAddr ); 518 524 Void setInterDirSP( UInt uiDir, UInt uiAbsPartIdx, Int iWidth, Int iHeight ); 519 525 #endif 520 #if H_3D_IV_MERGE526 #if NH_3D_IV_MERGE 521 527 Bool getInterViewMergeCands ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc, Bool bIsDepth 522 528 523 #if H_3D_SPIVMP529 #if NH_3D_SPIVMP 524 530 , TComMvField* pcMFieldSP, UChar* puhInterDirSP 525 531 #endif … … 527 533 ); 528 534 #endif 529 #if H_3D_ARP535 #if NH_3D_ARP 530 536 UChar* getARPW () { return m_puhARPW; } 531 537 UChar getARPW ( UInt uiIdx ) { return m_puhARPW[uiIdx]; } 532 538 Void setARPW ( UInt uiIdx, UChar w ) { m_puhARPW[uiIdx] = w; } 533 539 Void setARPWSubParts ( UChar w, UInt uiAbsPartIdx, UInt uiDepth ); 534 Double getARPWFactor ( UInt uiIdx ); 535 #endif 536 #if H_3D_IC 540 #endif 541 #if NH_3D_IC 537 542 Bool* getICFlag () { return m_pbICFlag; } 538 543 Bool getICFlag ( UInt uiIdx ) { return m_pbICFlag[uiIdx]; } … … 540 545 Void setICFlagSubParts ( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 541 546 Bool isICFlagRequired ( UInt uiAbsPartIdx ); 547 Void getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx = 0, Bool bLCU = false); 548 #elif NH_3D_VSP 542 549 Void getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx = 0, Bool bLCU = false); 543 550 #else … … 647 654 Bool hasEqualMotion ( UInt uiAbsPartIdx, TComDataCU* pcCandCU, UInt uiCandAbsPartIdx ); 648 655 649 #if H_3D650 Bool getAvailableFlagA1() { return m_bAvailableFlagA1; }651 Bool getAvailableFlagB1() { return m_bAvailableFlagB1; }652 Bool getAvailableFlagB0() { return m_bAvailableFlagB0; }653 Bool getAvailableFlagA0() { return m_bAvailableFlagA0; }654 Bool getAvailableFlagB2() { return m_bAvailableFlagB2; }656 #if NH_3D_MLC 657 Bool getAvailableFlagA1() { return m_bAvailableFlagA1; } 658 Bool getAvailableFlagB1() { return m_bAvailableFlagB1; } 659 Bool getAvailableFlagB0() { return m_bAvailableFlagB0; } 660 Bool getAvailableFlagA0() { return m_bAvailableFlagA0; } 661 Bool getAvailableFlagB2() { return m_bAvailableFlagB2; } 655 662 Void initAvailableFlags() { m_bAvailableFlagA1 = m_bAvailableFlagB1 = m_bAvailableFlagB0 = m_bAvailableFlagA0 = m_bAvailableFlagB2 = 0; } 656 663 Void buildMCL(TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours 657 #if H_3D_VSP664 #if NH_3D_VSP 658 665 , Int* vspFlag 659 666 #endif 660 #if H_3D_SPIVMP667 #if NH_3D_SPIVMP 661 668 , Bool* pbSPIVMPFlag 662 669 #endif 663 670 , Int& numValidMergeCand 664 671 ); 665 Void getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1); 666 Void xGetInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours 667 #else 672 Void xGetInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours 673 #if NH_3D_SPIVMP 674 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 675 #endif 676 , Int& numValidMergeCand, Int mrgCandIdx = -1 ); 677 #endif 668 678 Void getInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1 ); 669 #endif 670 #if H_3D_SPIVMP 671 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 672 #endif 673 674 #if H_3D_VSP 675 #if H_3D_SPIVMP 679 680 #if NH_3D_VSP 681 #if NH_3D_SPIVMP 676 682 Bool* getSPIVMPFlag () { return m_pbSPIVMPFlag; } 677 683 Bool getSPIVMPFlag ( UInt uiIdx ) { return m_pbSPIVMPFlag[uiIdx]; } … … 698 704 Bool isBipredRestriction( UInt puIdx ); 699 705 700 #if H_3D_IC701 Bool isIC ( UInt uiPartIdx );702 #endif703 704 706 // ------------------------------------------------------------------------------------------------------------------- 705 707 // member functions for symbol prediction (most probable / mode conversion) … … 720 722 UInt getCtxSkipFlag ( UInt uiAbsPartIdx ); 721 723 UInt getCtxInterDir ( UInt uiAbsPartIdx ); 722 #if H_3D_ARP724 #if NH_3D_ARP 723 725 UInt getCTXARPWFlag ( UInt uiAbsPartIdx ); 724 726 #endif -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComInterpolationFilter.cpp
r1200 r1279 75 75 }; 76 76 77 #if H_3D_ARP77 #if NH_3D_ARP 78 78 const Short TComInterpolationFilter::m_lumaFilterARP[4][NTAPS_LUMA_ARP] = 79 79 { … … 361 361 */ 362 362 Void TComInterpolationFilter::filterHor(const ComponentID compID, Pel *src, Int srcStride, Pel *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast, const ChromaFormat fmt, const Int bitDepth 363 #if H_3D_ARP363 #if NH_3D_ARP 364 364 , Bool filterType 365 365 #endif … … 372 372 else if (isLuma(compID)) 373 373 { 374 #if H_3D_ARP 374 assert(frac >= 0 && frac < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS); 375 #if NH_3D_ARP 375 376 if(filterType) 376 377 { 377 filterHor<NTAPS_LUMA_ARP>( g_bitDepthY, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilterARP[frac]);378 filterHor<NTAPS_LUMA_ARP>(bitDepth, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilterARP[frac]); 378 379 } 379 380 else 380 381 { 381 382 #endif 382 383 assert(frac >= 0 && frac < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS);384 383 filterHor<NTAPS_LUMA>(bitDepth, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilter[frac]); 385 #if H_3D_ARP384 #if NH_3D_ARP 386 385 } 387 386 #endif … … 392 391 const UInt csx = getComponentScaleX(compID, fmt); 393 392 assert(frac >=0 && csx<2 && (frac<<(1-csx)) < CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS); 393 #if NH_3D_ARP 394 if(filterType) 395 { 396 filterHor<NTAPS_CHROMA_ARP>(bitDepth, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilterARP[frac]); 397 } 398 else 399 { 400 #endif 394 401 filterHor<NTAPS_CHROMA>(bitDepth, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilter[frac<<(1-csx)]); 402 #if NH_3D_ARP 403 } 404 #endif 395 405 } 396 406 } … … 414 424 */ 415 425 Void TComInterpolationFilter::filterVer(const ComponentID compID, Pel *src, Int srcStride, Pel *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast, const ChromaFormat fmt, const Int bitDepth 416 #if H_3D_ARP426 #if NH_3D_ARP 417 427 , Bool filterType 418 428 #endif … … 425 435 else if (isLuma(compID)) 426 436 { 427 #if H_3D_ARP 437 assert(frac >= 0 && frac < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS); 438 #if NH_3D_ARP 428 439 if(filterType) 429 440 { 430 filterVer<NTAPS_LUMA_ARP>( g_bitDepthY, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilterARP[frac]);441 filterVer<NTAPS_LUMA_ARP>(bitDepth, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilterARP[frac]); 431 442 } 432 443 else 433 444 { 434 445 #endif 435 assert(frac >= 0 && frac < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS);436 446 filterVer<NTAPS_LUMA>(bitDepth, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilter[frac]); 437 #if H_3D_ARP447 #if NH_3D_ARP 438 448 } 439 449 #endif … … 444 454 const UInt csy = getComponentScaleY(compID, fmt); 445 455 assert(frac >=0 && csy<2 && (frac<<(1-csy)) < CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS); 456 #if NH_3D_ARP 457 if(filterType) 458 { 459 filterVer<NTAPS_CHROMA_ARP>(bitDepth, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilterARP[frac]); 460 } 461 else 462 { 463 #endif 446 464 filterVer<NTAPS_CHROMA>(bitDepth, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilter[frac<<(1-csy)]); 447 } 448 } 449 450 #if H_3D_ARP 451 , Bool filterType 452 #endif 453 454 #if H_3D_ARP 455 if(filterType) 456 { 457 filterHor<NTAPS_CHROMA_ARP>(g_bitDepthC, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilterARP[frac]); 458 } 459 else 460 { 461 #endif 462 #if H_3D_ARP 463 } 464 #endif 465 #if H_3D_ARP 466 , Bool filterType 467 #endif 468 #if H_3D_ARP 469 if(filterType) 470 { 471 filterVer<NTAPS_CHROMA_ARP>(g_bitDepthC, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilterARP[frac]); 472 } 473 else 474 { 475 #endif 476 #if H_3D_ARP 477 } 478 #endif 479 480 481 465 #if NH_3D_ARP 466 } 467 #endif 468 } 469 } 482 470 //! \} -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComInterpolationFilter.h
r1200 r1279 45 45 //! \{ 46 46 47 #if H_3D_ARP47 #if NH_3D_ARP 48 48 #define NTAPS_LUMA_ARP 2 ///< Number of taps for luma 49 49 #define NTAPS_CHROMA_ARP 2 ///< Number of taps for chroma … … 63 63 static const TFilterCoeff m_lumaFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_LUMA]; ///< Luma filter taps 64 64 static const TFilterCoeff m_chromaFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA]; ///< Chroma filter taps 65 #if H_3D_ARP65 #if NH_3D_ARP 66 66 static const Short m_lumaFilterARP [4][NTAPS_LUMA_ARP]; ///< Luma filter taps for ARP 67 67 static const Short m_chromaFilterARP[8][NTAPS_CHROMA_ARP]; ///< Chroma filter taps for ARP … … 83 83 84 84 Void filterHor(const ComponentID compID, Pel *src, Int srcStride, Pel *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast, const ChromaFormat fmt, const Int bitDepth 85 #if H_3D_ARP85 #if NH_3D_ARP 86 86 , Bool filterType = false 87 87 #endif 88 88 ); 89 89 Void filterVer(const ComponentID compID, Pel *src, Int srcStride, Pel *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast, const ChromaFormat fmt, const Int bitDepth 90 #if H_3D_ARP90 #if NH_3D_ARP 91 91 , Bool filterType = false 92 92 #endif … … 94 94 }; 95 95 96 #if H_3D_ARP97 , Bool filterType = false98 #endif99 #if H_3D_ARP100 , Bool filterType = false101 #endif102 103 96 //! \} 104 97 -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComMotionInfo.cpp
r1200 r1279 40 40 #include "assert.h" 41 41 #include <stdlib.h> 42 #if H_3D_SPIVMP42 #if NH_3D_SPIVMP 43 43 #include "TComDataCU.h" 44 44 #include "TComPic.h" … … 328 328 } 329 329 330 #if H_3D_SPIVMP330 #if NH_3D_SPIVMP 331 331 Void TComCUMvField::setMvFieldSP( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight ) 332 332 { 333 uiAbsPartIdx += pcCU->getZorderIdxInC U();333 uiAbsPartIdx += pcCU->getZorderIdxInCtu(); 334 334 Int iStartPelX = g_auiRasterToPelX[g_auiZscanToRaster[uiAbsPartIdx]]; 335 335 Int iStartPelY = g_auiRasterToPelY[g_auiZscanToRaster[uiAbsPartIdx]]; … … 341 341 for (Int j=iStartPelX; j < iEndPelX; j += pcCU->getPic()->getMinCUWidth()) 342 342 { 343 Int iCurrRaster = i / pcCU->getPic()->getMinCUHeight() * pcCU->getPic()->getNumPartIn Width() + j/pcCU->getPic()->getMinCUWidth();343 Int iCurrRaster = i / pcCU->getPic()->getMinCUHeight() * pcCU->getPic()->getNumPartInCtuWidth() + j/pcCU->getPic()->getMinCUWidth(); 344 344 Int uiPartAddr = g_auiRasterToZscan[iCurrRaster]; 345 uiPartAddr -= pcCU->getZorderIdxInC U();345 uiPartAddr -= pcCU->getZorderIdxInCtu(); 346 346 347 347 m_pcMv[uiPartAddr] = cMvField.getMv(); -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComMotionInfo.h
r1196 r1279 50 50 // ==================================================================================================================== 51 51 52 #if H_3D_SPIVMP52 #if NH_3D_SPIVMP 53 53 class TComDataCU; 54 54 #endif … … 60 60 } AMVPInfo; 61 61 62 #if H_3D_NBDV62 #if NH_3D_NBDV 63 63 typedef struct _DisCand 64 64 { 65 65 TComMv m_acNBDV; // DV from NBDV 66 #if H_3D_NBDV_REF66 #if NH_3D_NBDV_REF 67 67 TComMv m_acDoNBDV; // DV from DoNBDV 68 68 #endif … … 107 107 Int getHor () const { return m_acMv.getHor(); } 108 108 Int getVer () const { return m_acMv.getVer(); } 109 #if H_3D_IV_MERGE109 #if NH_3D_IV_MERGE 110 110 Bool operator== ( const TComMvField& rcMv ) const 111 111 { … … 167 167 Void setAllRefIdx ( Int iRefIdx, PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 ); 168 168 Void setAllMvField( TComMvField const & mvField, PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 ); 169 #if H_3D_SPIVMP169 #if NH_3D_SPIVMP 170 170 Void setMvFieldSP ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight ); 171 171 #endif 172 #if H_3D_VSP172 #if NH_3D_VSP 173 173 Void setMv ( Int iIdx, TComMv const & rcMv ) { m_pcMv[iIdx] = rcMv; } 174 174 Void setRefIdx ( Int iIdx, Int iRefIdx ) { m_piRefIdx[iIdx] = iRefIdx; } … … 192 192 //! \} 193 193 194 #if H_3D_IV_MERGE 194 #if NH_3D_MLC 195 /// class for container of merge candidate 195 196 class TComMotionCand 196 197 { … … 199 200 TComMvField m_cMvField[2]; 200 201 UChar m_uDir; 201 #if H_3D_VSP202 #if NH_3D_VSP 202 203 Int m_iVspFlag; 203 #endif 204 #endif 205 #if NH_3D_SPIVMP 204 206 Bool m_bSPIVMPFlag; 207 #endif 205 208 206 209 public: … … 209 212 m_bAvailable = false; 210 213 m_uDir = 0; 211 #if H_3D_VSP214 #if NH_3D_VSP 212 215 m_iVspFlag = 0; 213 216 #endif 217 #if NH_3D_SPIVMP 214 218 m_bSPIVMPFlag = false; 219 #endif 215 220 } 216 221 … … 226 231 m_bAvailable = false; 227 232 m_uDir = 0; 228 #if H_3D_VSP233 #if NH_3D_VSP 229 234 m_iVspFlag = 0; 230 235 #endif 236 #if NH_3D_SPIVMP 231 237 m_bSPIVMPFlag = false; 238 #endif 232 239 m_cMvField[0].setMvField(cZeroMv, NOT_VALID); 233 240 m_cMvField[1].setMvField(cZeroMv, NOT_VALID); … … 235 242 236 243 Void setCand(TComMvField* pcMvFieldNeighbours, UChar uhInterDirNeighbours 237 #if H_3D_VSP244 #if NH_3D_VSP 238 245 , Int vspFlag 239 246 #endif 247 #if NH_3D_SPIVMP 240 248 , Bool bSPIVMPFlag 249 #endif 241 250 ) 242 251 { … … 245 254 m_cMvField[1] = pcMvFieldNeighbours[1]; 246 255 m_uDir = uhInterDirNeighbours; 247 #if H_3D_VSP256 #if NH_3D_VSP 248 257 m_iVspFlag = vspFlag; 249 258 #endif 259 #if NH_3D_SPIVMP 250 260 m_bSPIVMPFlag = bSPIVMPFlag; 251 } 252 253 261 #endif 262 } 263 254 264 Void getCand(Int iCount, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours 255 #if H_3D_VSP265 #if NH_3D_VSP 256 266 , Int* vspFlag 257 267 #endif 268 #if NH_3D_SPIVMP 258 269 , Bool* pbSPIVMPFlag 270 #endif 259 271 ) 260 272 { … … 262 274 pcMvFieldNeighbours[(iCount<<1) + 1] = m_cMvField[1]; 263 275 puhInterDirNeighbours[iCount] = m_uDir; 264 #if H_3D_VSP276 #if NH_3D_VSP 265 277 vspFlag[iCount] = m_iVspFlag; 266 278 #endif 279 #if NH_3D_SPIVMP 267 280 pbSPIVMPFlag[iCount] = m_bSPIVMPFlag; 281 #endif 268 282 } 269 283 }; -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComMv.h
r1200 r1279 57 57 Short m_iHor; ///< horizontal component of motion vector 58 58 Short m_iVer; ///< vertical component of motion vector 59 #if H_3D_NBDV59 #if NH_3D_NBDV 60 60 Bool m_bIDV; 61 61 Short m_iIDVHor; … … 72 72 m_iHor(0), 73 73 m_iVer(0) 74 #if H_3D_NBDV74 #if NH_3D_NBDV 75 75 , m_bIDV(false) 76 76 , m_iIDVHor(0) … … 84 84 m_iHor(iHor), 85 85 m_iVer(iVer) 86 #if H_3D_NBDV86 #if NH_3D_NBDV 87 87 , m_bIDV(false) 88 88 , m_iIDVHor(0) … … 101 101 Void setVer ( Short i ) { m_iVer = i; } 102 102 Void setZero () { m_iHor = m_iVer = 0; 103 #if H_3D_NBDV103 #if NH_3D_NBDV 104 104 m_bIDV = false; m_iIDVHor = m_iIDVVer = 0; 105 105 m_iIDVVId = 0; 106 106 #endif 107 107 } 108 #if H_3D_NBDV108 #if NH_3D_NBDV 109 109 Void setIDVHor (Short i) {m_iIDVHor = i;} 110 110 Void setIDVVer (Short i) {m_iIDVVer = i;} … … 120 120 Int getAbsHor () const { return abs( m_iHor ); } 121 121 Int getAbsVer () const { return abs( m_iVer ); } 122 #if H_3D_NBDV122 #if NH_3D_NBDV 123 123 Short getIDVHor () const { return m_iIDVHor; } 124 124 Short getIDVVer () const { return m_iIDVVer; } -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComPattern.h
r1200 r1279 81 81 // TComPatternParam m_cPatternCb; 82 82 //TComPatternParam m_cPatternCr; 83 #if H_3D_IC83 #if NH_3D_IC 84 84 Bool m_bICFlag; 85 85 #endif … … 98 98 Int getBitDepthY() { return m_cPatternY.m_bitDepth; } 99 99 100 #if H_3D_IC100 #if NH_3D_IC 101 101 Bool getICFlag() { return m_bICFlag; } 102 102 Void setICFlag( Bool bICFlag ) { m_bICFlag = bICFlag; } -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComPic.cpp
r1200 r1279 75 75 m_apcPicYuv[i] = NULL; 76 76 } 77 #if H_3D_QTLPC77 #if NH_3D_QTLPC 78 78 m_bReduceBitsQTL = 0; 79 79 #endif 80 #if H_3D_NBDV80 #if NH_3D_NBDV 81 81 m_iNumDdvCandPics = 0; 82 82 m_eRapRefList = REF_PIC_LIST_0; … … 143 143 } 144 144 #if NH_3D 145 #if NH_3D_ARP 146 Void TComPic::getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx ) 147 { 148 Int iMaxCUWidth = (Int) ( getPicSym()->getSPS().getMaxCUWidth() ); 149 Int iMaxCuHeight = (Int) ( getPicSym()->getSPS().getMaxCUHeight() ); 150 151 UInt uiMaxTotalCUDepth = getPicSym()->getSPS().getMaxTotalCUDepth(); 152 Int iBaseUnitWidth = iMaxCUWidth >> uiMaxTotalCUDepth; 153 Int iBaseUnitHeight = iMaxCUWidth >> uiMaxTotalCUDepth; 154 155 Int iNumCuInWidth = getPicYuvRec()->getWidth(COMPONENT_Y) / iMaxCUWidth; 156 iNumCuInWidth += ( getPicYuvRec()->getWidth(COMPONENT_Y) % iMaxCUWidth ) ? 1 : 0; 157 158 159 Int iCuX = iX / iMaxCUWidth; 160 Int iCuY = iY / iMaxCuHeight; 161 Int iBaseX = ( iX - iCuX * iMaxCUWidth ) / iBaseUnitWidth; 162 Int iBaseY = ( iY - iCuY * iMaxCuHeight ) / iBaseUnitHeight; 163 Int iCuSizeInBases = iMaxCuHeight / iBaseUnitWidth; 164 165 riCuAddr = iCuY * iNumCuInWidth + iCuX; 166 Int iRastPartIdx = iBaseY * iCuSizeInBases + iBaseX; 167 riAbsZorderIdx = g_auiRasterToZscan[ iRastPartIdx ]; 168 } 169 #endif 145 170 Void TComPic::compressMotion(Int scale) 146 171 #else … … 283 308 return getPicYuv( layerIdInNuh, poc, recon ); 284 309 } 285 #if H_3D_ARP310 #if NH_3D_ARP 286 311 TComList<TComPic*>* TComPicLists::getPicList( Int layerIdInNuh ) 287 312 { … … 303 328 #endif // NH_MV 304 329 305 #if H_3D_NBDV306 Int TComPic::getDisCandRefPictures( Int iColPOC)330 #if NH_3D_NBDV 331 Int TComPic::getDisCandRefPictures(Int iColPOC) 307 332 { 308 333 UInt uiTempLayerCurr = 7; … … 310 335 UInt numDdvCandPics = 0; 311 336 312 if ( !currSlice->getEnableTMVPFlag() ) 337 if(!currSlice->getEnableTMVPFlag()) 338 { 313 339 return numDdvCandPics; 340 } 314 341 315 342 numDdvCandPics += 1; … … 318 345 UInt pocDiff = 255; 319 346 320 for(UInt lpNr = 0; lpNr < (currSlice->isInterB() ? 2: 1); lpNr 321 { 322 UIntx = lpNr ? currSlice->getColFromL0Flag() : 1 - currSlice->getColFromL0Flag();323 324 for 347 for(UInt lpNr = 0; lpNr < (currSlice->isInterB() ? 2: 1); lpNr++) 348 { 349 Bool x = lpNr ? currSlice->getColFromL0Flag() : 1 - currSlice->getColFromL0Flag(); 350 351 for(UInt i = 0; i < currSlice->getNumRefIdx(RefPicList(x)); i++) 325 352 { 326 353 if(currSlice->getViewIndex() == currSlice->getRefPic((RefPicList)x, i)->getViewIndex() 327 && (x == currSlice->getColFromL0Flag()||currSlice->getRefPOC((RefPicList)x, i)!= iColPOC) && numDdvCandPics!=2)354 && (x == currSlice->getColFromL0Flag() || currSlice->getRefPOC((RefPicList)x, i) != iColPOC) && numDdvCandPics != 2) 328 355 { 329 356 TComSlice* refSlice = currSlice->getRefPic((RefPicList)x, i)->getSlice(getCurrSliceIdx()); 330 Bool bRAP = (refSlice->getViewIndex() && refSlice->isIRAP()) ? 1: 0;357 Bool bRAP = (refSlice->getViewIndex() && refSlice->isIRAP()) ? 1 : 0; 331 358 UInt uiTempLayer = currSlice->getRefPic((RefPicList)x, i)->getSlice(getCurrSliceIdx())->getTLayer(); 332 359 333 if( bRAP)360 if(bRAP) 334 361 { 335 362 this->setRapRefIdx(i); … … 350 377 UInt idx = 0; 351 378 352 for(UInt lpNr = 0; lpNr < (currSlice->isInterB() ? 2 : 1); lpNr++)353 { 354 UInt x = lpNr? currSlice->getColFromL0Flag() : 1-currSlice->getColFromL0Flag();379 for(UInt lpNr = 0; lpNr < (currSlice->isInterB() ? 2 : 1); lpNr++) 380 { 381 Bool x = lpNr ? currSlice->getColFromL0Flag() : 1 - currSlice->getColFromL0Flag(); 355 382 356 for 383 for(UInt i = 0; i < currSlice->getNumRefIdx(RefPicList(x)); i++) 357 384 { 358 385 Int iTempPoc = currSlice->getRefPic((RefPicList)x, i)->getPOC(); 359 Int iTempDiff = (iTempPoc > pocCurr) ? (iTempPoc - pocCurr) : (pocCurr - iTempPoc);386 Int iTempDiff = (iTempPoc > pocCurr) ? (iTempPoc - pocCurr) : (pocCurr - iTempPoc); 360 387 361 if(currSlice->getViewIndex() == currSlice->getRefPic((RefPicList)x, i)->getViewIndex() && (x == currSlice->getColFromL0Flag()||currSlice->getRefPOC((RefPicList)x, i)!= iColPOC)362 && currSlice->getRefPic((RefPicList)x, i)->getSlice(getCurrSliceIdx())->getTLayer() == uiTempLayerCurr && pocDiff > iTempDiff)388 if(currSlice->getViewIndex() == currSlice->getRefPic((RefPicList)x, i)->getViewIndex() && (x == currSlice->getColFromL0Flag() || currSlice->getRefPOC((RefPicList)x, i) != iColPOC) 389 && currSlice->getRefPic((RefPicList)x, i)->getSlice(getCurrSliceIdx())->getTLayer() == uiTempLayerCurr && pocDiff > iTempDiff) 363 390 { 364 391 pocDiff = iTempDiff; … … 369 396 } 370 397 371 if( pocDiff < 255)398 if(pocDiff < 255) 372 399 { 373 400 this->setRapRefIdx(idx); 374 this->setRapRefList((RefPicList) z 401 this->setRapRefList((RefPicList) z); 375 402 numDdvCandPics = 2; 376 403 } … … 383 410 TComSlice* currSlice = getSlice(getCurrSliceIdx()); 384 411 const Int numCandPics = this->getNumDdvCandPics(); 412 385 413 for(Int curCandPic = 0; curCandPic < numCandPics; curCandPic++) 386 414 { 387 415 RefPicList eCurRefPicList = REF_PIC_LIST_0 ; 388 416 Int curCandPicRefIdx = 0; 389 if( curCandPic == 0)417 if(curCandPic == 0) 390 418 { 391 eCurRefPicList = RefPicList(currSlice->isInterB() ? 1 -currSlice->getColFromL0Flag() : 0);419 eCurRefPicList = RefPicList(currSlice->isInterB() ? 1 - currSlice->getColFromL0Flag() : 0); 392 420 curCandPicRefIdx = currSlice->getColRefIdx(); 393 421 } … … 397 425 curCandPicRefIdx = this->getRapRefIdx(); 398 426 } 399 TComPic* pcCandColPic = currSlice->getRefPic( eCurRefPicList, curCandPicRefIdx); 400 TComSlice* pcCandColSlice = pcCandColPic->getSlice(0);// currently only support single slice 427 428 TComPic* pcCandColPic = currSlice->getRefPic(eCurRefPicList, curCandPicRefIdx); 429 TComSlice* pcCandColSlice = pcCandColPic->getSlice(0); // currently only support single slice 401 430 402 431 if(!pcCandColSlice->isIntra()) 403 432 { 404 for( Int iColRefDir = 0; iColRefDir < (pcCandColSlice->isInterB() ? 2: 1); iColRefDir ++)405 { 406 for( Int iColRefIdx =0; iColRefIdx < pcCandColSlice->getNumRefIdx(( RefPicList )iColRefDir); iColRefIdx++)433 for(Int iColRefDir = 0; iColRefDir < (pcCandColSlice->isInterB() ? 2 : 1); iColRefDir++) 434 { 435 for(Int iColRefIdx = 0; iColRefIdx < pcCandColSlice->getNumRefIdx((RefPicList)iColRefDir); iColRefIdx++) 407 436 { 408 437 m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] = false; 409 438 Int iColViewIdx = pcCandColSlice->getViewIndex(); 410 Int iColRefViewIdx = pcCandColSlice->getRefPic( ( RefPicList)iColRefDir, iColRefIdx)->getViewIndex();439 Int iColRefViewIdx = pcCandColSlice->getRefPic((RefPicList)iColRefDir, iColRefIdx)->getViewIndex(); 411 440 if(iColViewIdx == iColRefViewIdx) 441 { 412 442 continue; 413 414 for(Int iCurrRefDir = 0;(iCurrRefDir < (currSlice->isInterB() ? 2: 1)) && (m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] == false ); iCurrRefDir++) 443 } 444 445 for(Int iCurrRefDir = 0; (iCurrRefDir < (currSlice->isInterB() ? 2 : 1)) && (m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] == false); iCurrRefDir++) 415 446 { 416 for( Int iCurrRefIdx =0; iCurrRefIdx < currSlice->getNumRefIdx(( RefPicList )iCurrRefDir); iCurrRefIdx++)447 for(Int iCurrRefIdx = 0; iCurrRefIdx < currSlice->getNumRefIdx((RefPicList)iCurrRefDir); iCurrRefIdx++) 417 448 { 418 if( currSlice->getRefPic( ( RefPicList )iCurrRefDir, iCurrRefIdx )->getViewIndex() == iColRefViewIdx)449 if(currSlice->getRefPic((RefPicList)iCurrRefDir, iCurrRefIdx)->getViewIndex() == iColRefViewIdx) 419 450 { 420 451 m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] = true; … … 428 459 } 429 460 } 461 430 462 Bool TComPic::isTempIVRefValid(Int currCandPic, Int iColRefDir, Int iColRefIdx) 431 463 { … … 433 465 } 434 466 435 Void TComPic::checkTextureRef( 467 Void TComPic::checkTextureRef() 436 468 { 437 469 TComSlice* pcCurrSlice = getSlice(getCurrSliceIdx()); 438 TComPic* pcTextPic = pcCurrSlice->get TexturePic();470 TComPic* pcTextPic = pcCurrSlice->getIvPic(0, getViewIndex()); 439 471 #if H_3D_FCO 440 472 if ( pcTextPic ) 441 473 { 442 474 #endif 443 444 475 TComSlice* pcTextSlice = pcTextPic->getSlice(0); // currently only support single slice 445 476 446 for( Int iTextRefDir = 0; (iTextRefDir < (pcTextSlice->isInterB()? 2:1) ) && !pcTextSlice->isIntra(); iTextRefDir ++)447 { 448 for( Int iTextRefIdx =0; iTextRefIdx<pcTextSlice->getNumRefIdx(( RefPicList )iTextRefDir); iTextRefIdx++)449 { 450 Int iTextRefPOC = pcTextSlice->getRefPOC( ( RefPicList)iTextRefDir, iTextRefIdx);451 Int iTextRefViewId = pcTextSlice->getRefPic( ( RefPicList)iTextRefDir, iTextRefIdx)->getViewIndex();477 for(Int iTextRefDir = 0; (iTextRefDir < (pcTextSlice->isInterB() ? 2 :1) ) && !pcTextSlice->isIntra(); iTextRefDir++) 478 { 479 for(Int iTextRefIdx =0; iTextRefIdx < pcTextSlice->getNumRefIdx((RefPicList)iTextRefDir); iTextRefIdx++) 480 { 481 Int iTextRefPOC = pcTextSlice->getRefPOC((RefPicList)iTextRefDir, iTextRefIdx); 482 Int iTextRefViewId = pcTextSlice->getRefPic((RefPicList)iTextRefDir, iTextRefIdx)->getViewIndex(); 452 483 m_aiTexToDepRef[iTextRefDir][iTextRefIdx] = -1; 453 484 Int iCurrRefDir = iTextRefDir; 454 for( Int iCurrRefIdx =0; ( iCurrRefIdx<pcCurrSlice->getNumRefIdx(( RefPicList )iCurrRefDir ) ) && ( m_aiTexToDepRef[iTextRefDir][iTextRefIdx] < 0 ) ; iCurrRefIdx++) 485 486 for(Int iCurrRefIdx = 0; (iCurrRefIdx<pcCurrSlice->getNumRefIdx((RefPicList)iCurrRefDir)) && (m_aiTexToDepRef[iTextRefDir][iTextRefIdx] < 0); iCurrRefIdx++) 455 487 { 456 if( pcCurrSlice->getRefPOC( ( RefPicList)iCurrRefDir, iCurrRefIdx ) == iTextRefPOC &&457 pcCurrSlice->getRefPic( ( RefPicList )iCurrRefDir, iCurrRefIdx)->getViewIndex() == iTextRefViewId)488 if(pcCurrSlice->getRefPOC((RefPicList)iCurrRefDir, iCurrRefIdx ) == iTextRefPOC && 489 pcCurrSlice->getRefPic((RefPicList)iCurrRefDir, iCurrRefIdx)->getViewIndex() == iTextRefViewId) 458 490 { 459 491 m_aiTexToDepRef[iTextRefDir][iTextRefIdx] = iCurrRefIdx; … … 461 493 } 462 494 } 463 464 495 } 465 496 #if H_3D_FCO -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComPic.h
r1200 r1279 94 94 #endif 95 95 #endif 96 #if H_3D_QTLPC96 #if NH_3D_QTLPC 97 97 Bool m_bReduceBitsQTL; 98 98 #endif 99 #if H_3D_NBDV99 #if NH_3D_NBDV 100 100 UInt m_uiRapRefIdx; 101 101 RefPicList m_eRapRefList; 102 102 Int m_iNumDdvCandPics; 103 Bool m_abTIVRINCurrRL 103 Bool m_abTIVRINCurrRL [2][2][MAX_NUM_REF]; //whether an inter-view reference picture with the same view index of the inter-view reference picture of temporal reference picture of current picture exists in current reference picture lists 104 104 Int m_aiTexToDepRef [2][MAX_NUM_REF]; 105 105 #endif … … 132 132 #endif 133 133 #endif 134 #if H_3D_QTLPC134 #if NH_3D_QTLPC 135 135 Bool getReduceBitsFlag () { return m_bReduceBitsQTL; } 136 136 Void setReduceBitsFlag ( Bool bFlag ) { m_bReduceBitsQTL = bFlag; } … … 182 182 #endif 183 183 #if NH_3D 184 #if NH_3D_ARP 185 Void getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx ); 186 #endif 184 187 Void compressMotion(Int scale); 185 188 #else … … 209 212 Void print( Bool legend ); 210 213 #endif 211 #if H_3D_NBDV214 #if NH_3D_NBDV 212 215 Int getNumDdvCandPics() {return m_iNumDdvCandPics; } 213 216 Int getDisCandRefPictures(Int iColPOC); … … 248 251 Void push_back( TComList<TComPic*>* list ) { m_lists.push_back( list ); } 249 252 Int size () { return (Int) m_lists.size(); } 250 #if H_3D_ARP253 #if NH_3D_ARP 251 254 TComList<TComPic*>* getPicList ( Int layerIdInNuh ); 252 255 #endif -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComPicYuv.cpp
r1200 r1279 91 91 m_iPicHeight = iPicHeight; 92 92 93 #if H_3D_IV_MERGE 93 #if NH_3D_IV_MERGE 94 m_iCuWidth = uiMaxCUWidth; 95 m_iCuHeight = uiMaxCUHeight; 96 94 97 m_iNumCuInWidth = m_iPicWidth / m_iCuWidth; 95 98 m_iNumCuInWidth += ( m_iPicWidth % m_iCuWidth ) ? 1 : 0; … … 292 295 fclose(pFile); 293 296 } 294 #if H_3D 295 #if H_3D_IV_MERGE 297 #if NH_3D_IV_MERGE 296 298 Void 297 299 TComPicYuv::getTopLeftSamplePos( Int iCuAddr, Int iAbsZorderIdx, Int& riX, Int& riY ) … … 319 321 riAbsZorderIdx = g_auiRasterToZscan[ iRastPartIdx ]; 320 322 } 321 #endif 323 324 #endif 325 326 #if H_3D 322 327 Void TComPicYuv::setLumaTo( Pel pVal ) 323 328 { -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComPicYuv.h
r1200 r1279 80 80 81 81 Bool m_bIsBorderExtended; 82 #if H_3D_IV_MERGE82 #if NH_3D_IV_MERGE 83 83 Int m_iBaseUnitWidth; ///< Width of Base Unit (with maximum depth or minimum size, m_iCuWidth >> Max. Depth) 84 84 Int m_iBaseUnitHeight; ///< Height of Base Unit (with maximum depth or minimum size, m_iCuHeight >> Max. Depth) 85 85 Int m_iNumCuInWidth; 86 Int m_iCuWidth; ///< Width of Coding Unit (CU) 87 Int m_iCuHeight; ///< Height of Coding Unit (CU) 86 88 #endif 87 89 … … 168 170 Void setLumaTo ( Pel pVal ); 169 171 Void setChromaTo ( Pel pVal ); 170 #if H_3D_IV_MERGE172 #if NH_3D_IV_MERGE 171 173 // sample to block and block to sample conversion 172 174 Void getTopLeftSamplePos( Int iCuAddr, Int iAbsZorderIdx, Int& riX, Int& riY ); -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComPrediction.cpp
r1243 r1279 82 82 } 83 83 } 84 #if H_3D_VSP85 m_pDepthBlock = (Int*) malloc(MAX_NUM_ SPU_W*MAX_NUM_SPU_W*sizeof(Int));84 #if NH_3D_VSP 85 m_pDepthBlock = (Int*) malloc(MAX_NUM_PART_IDXS_IN_CTU_WIDTH*MAX_NUM_PART_IDXS_IN_CTU_WIDTH*sizeof(Int)); 86 86 if (m_pDepthBlock == NULL) 87 87 { … … 94 94 TComPrediction::~TComPrediction() 95 95 { 96 #if H_3D_VSP96 #if NH_3D_VSP 97 97 if (m_pDepthBlock != NULL) 98 98 { … … 123 123 m_cYuvPredTemp.destroy(); 124 124 125 #if H_3D_ARP125 #if NH_3D_ARP 126 126 m_acYuvPredBase[0].destroy(); 127 127 m_acYuvPredBase[1].destroy(); … … 182 182 183 183 m_cYuvPredTemp.create( MAX_CU_SIZE, MAX_CU_SIZE, chromaFormatIDC ); 184 #if H_3D_ARP185 m_acYuvPredBase[0] .create( g_uiMaxCUWidth, g_uiMaxCUHeight);186 m_acYuvPredBase[1] .create( g_uiMaxCUWidth, g_uiMaxCUHeight);187 #endif 188 #if H_3D_VSP189 m_cYuvDepthOnVsp.create( g_uiMaxCUWidth, g_uiMaxCUHeight);184 #if NH_3D_ARP 185 m_acYuvPredBase[0] .create( MAX_CU_SIZE, MAX_CU_SIZE, chromaFormatIDC ); 186 m_acYuvPredBase[1] .create( MAX_CU_SIZE, MAX_CU_SIZE, chromaFormatIDC ); 187 #endif 188 #if NH_3D_VSP 189 m_cYuvDepthOnVsp.create( MAX_CU_SIZE, MAX_CU_SIZE, chromaFormatIDC ); 190 190 #endif 191 191 … … 201 201 } 202 202 } 203 #if H_3D_IC203 #if NH_3D_IC 204 204 m_uiaShift[0] = 0; 205 205 for( Int i = 1; i < 64; i++ ) … … 584 584 Int RefPOCL0 = pcCU->getSlice()->getRefPic(REF_PIC_LIST_0, pcCU->getCUMvField(REF_PIC_LIST_0)->getRefIdx(PartAddr))->getPOC(); 585 585 Int RefPOCL1 = pcCU->getSlice()->getRefPic(REF_PIC_LIST_1, pcCU->getCUMvField(REF_PIC_LIST_1)->getRefIdx(PartAddr))->getPOC(); 586 #if H_3D_ARP586 #if NH_3D_ARP 587 587 if(!pcCU->getARPW(PartAddr) && RefPOCL0 == RefPOCL1 && pcCU->getCUMvField(REF_PIC_LIST_0)->getMv(PartAddr) == pcCU->getCUMvField(REF_PIC_LIST_1)->getMv(PartAddr)) 588 588 #else … … 597 597 } 598 598 599 #if H_3D_SPIVMP599 #if NH_3D_SPIVMP 600 600 Void TComPrediction::xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr ) 601 601 { … … 606 606 pcCU->getSPAbsPartIdx(uiPartAddr, iSPWidth, iSPHeight, i, iNumSPInOneLine, uiSPAddr[i]); 607 607 } 608 #if H_3D_ARP // check this! 608 609 if( pcCU->getARPW( uiPartAddr ) != 0 ) 609 610 { 610 611 return; 611 612 } 613 #endif 612 614 613 615 // horizontal sub-PU merge … … 683 685 #endif 684 686 685 #if H_3D_DBBP687 #if NH_3D_DBBP 686 688 PartSize TComPrediction::getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize, TComDataCU*& pcCU) 687 689 { 690 const TComSPS* sps = pcCU->getSlice()->getSPS(); 691 UInt uiMaxCUWidth = sps->getMaxCUWidth(); 692 UInt uiMaxCUHeight = sps->getMaxCUHeight(); 693 688 694 // find virtual partitioning for this CU based on depth block 689 695 // segmentation of texture block --> mask IDs … … 693 699 Int iSumDepth = 0; 694 700 Int iSubSample = 4; 695 Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth( );696 Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight( );701 Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth(COMPONENT_Y); 702 Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight(COMPONENT_Y); 697 703 TComMv cDv = pcCU->getSlice()->getDepthRefinementFlag( ) ? pcCU->getDvInfo(0).m_acDoNBDV : pcCU->getDvInfo(0).m_acNBDV; 698 704 if( pcCU->getSlice()->getDepthRefinementFlag( ) ) … … 700 706 cDv.setVer(0); 701 707 } 702 Int iBlkX = ( pcCU->get Addr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getHor()+2)>>2);703 Int iBlkY = ( pcCU->get Addr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getVer()+2)>>2);708 Int iBlkX = ( pcCU->getCtuRsAddr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCtus() ) * uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCtu() ] ]+ ((cDv.getHor()+2)>>2); 709 Int iBlkY = ( pcCU->getCtuRsAddr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCtus() ) * uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCtu() ] ]+ ((cDv.getVer()+2)>>2); 704 710 705 711 UInt t=0; … … 788 794 } 789 795 790 PartSize matchedPartSize = SIZE_NONE;796 PartSize matchedPartSize = NUMBER_OF_PART_SIZES; 791 797 792 798 Int iMaxMatchSum = 0; … … 803 809 } 804 810 805 AOF( matchedPartSize != SIZE_NONE);811 AOF( matchedPartSize != NUMBER_OF_PART_SIZES ); 806 812 807 813 return matchedPartSize; … … 810 816 Bool TComPrediction::getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask, TComDataCU*& pcCU) 811 817 { 818 const TComSPS* sps = pcCU->getSlice()->getSPS(); 819 UInt uiMaxCUWidth = sps->getMaxCUWidth(); 820 UInt uiMaxCUHeight = sps->getMaxCUHeight(); 821 812 822 // segmentation of texture block --> mask IDs 813 823 Pel* pDepthBlockStart = pDepthPels; … … 821 831 iSumDepth = pDepthPels[ 0 ]; 822 832 823 Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth( );824 Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight( );833 Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth(COMPONENT_Y); 834 Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight(COMPONENT_Y); 825 835 TComMv cDv = pcCU->getSlice()->getDepthRefinementFlag( ) ? pcCU->getDvInfo(0).m_acDoNBDV : pcCU->getDvInfo(0).m_acNBDV; 826 836 if( pcCU->getSlice()->getDepthRefinementFlag( ) ) … … 828 838 cDv.setVer(0); 829 839 } 830 Int iBlkX = ( pcCU->get Addr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getHor()+2)>>2);831 Int iBlkY = ( pcCU->get Addr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getVer()+2)>>2);840 Int iBlkX = ( pcCU->getCtuRsAddr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCtus() ) * uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCtu() ] ]+ ((cDv.getHor()+2)>>2); 841 Int iBlkY = ( pcCU->getCtuRsAddr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCtus() ) * uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCtu() ] ]+ ((cDv.getVer()+2)>>2); 832 842 if (iBlkX>(Int)(iPictureWidth - uiWidth)) 833 843 { … … 944 954 } 945 955 946 Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize )947 { 948 Pel* piSrc[2] = {pInYuv[0]->get LumaAddr(uiPartAddr), pInYuv[1]->getLumaAddr(uiPartAddr)};949 UInt uiSrcStride = pInYuv[0]->getStride( );950 Pel* piDst = pOutYuv->get LumaAddr(uiPartAddr);951 UInt uiDstStride = pOutYuv->getStride( );956 Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize, Int bitDepthY ) 957 { 958 Pel* piSrc[2] = {pInYuv[0]->getAddr(COMPONENT_Y, uiPartAddr), pInYuv[1]->getAddr(COMPONENT_Y, uiPartAddr)}; 959 UInt uiSrcStride = pInYuv[0]->getStride(COMPONENT_Y); 960 Pel* piDst = pOutYuv->getAddr(COMPONENT_Y, uiPartAddr); 961 UInt uiDstStride = pOutYuv->getStride(COMPONENT_Y); 952 962 953 963 UInt uiMaskStride= MAX_CU_SIZE; … … 988 998 right = (x==uiWidth-1) ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x+1]; 989 999 990 piDst[x] = (l!=r) ? Clip Y( Pel(( left + (tmpTar[y*uiWidth+x] << 1) + right ) >> 2 )) : tmpTar[y*uiWidth+x];1000 piDst[x] = (l!=r) ? ClipBD( Pel(( left + (tmpTar[y*uiWidth+x] << 1) + right ) >> 2 ), bitDepthY) : tmpTar[y*uiWidth+x]; 991 1001 } 992 1002 piDst += uiDstStride; … … 1006 1016 bottom = (y==uiHeight-1) ? tmpTar[y*uiWidth+x] : tmpTar[(y+1)*uiWidth+x]; 1007 1017 1008 piDst[x] = (t!=b) ? Clip Y( Pel(( top + (tmpTar[y*uiWidth+x] << 1) + bottom ) >> 2 )) : tmpTar[y*uiWidth+x];1018 piDst[x] = (t!=b) ? ClipBD( Pel(( top + (tmpTar[y*uiWidth+x] << 1) + bottom ) >> 2 ), bitDepthY) : tmpTar[y*uiWidth+x]; 1009 1019 } 1010 1020 piDst += uiDstStride; … … 1019 1029 1020 1030 // now combine chroma 1021 Pel* piSrcU[2] = { pInYuv[0]->get CbAddr(uiPartAddr), pInYuv[1]->getCbAddr(uiPartAddr) };1022 Pel* piSrcV[2] = { pInYuv[0]->get CrAddr(uiPartAddr), pInYuv[1]->getCrAddr(uiPartAddr) };1023 UInt uiSrcStrideC = pInYuv[0]->get CStride();1024 Pel* piDstU = pOutYuv->get CbAddr(uiPartAddr);1025 Pel* piDstV = pOutYuv->get CrAddr(uiPartAddr);1026 UInt uiDstStrideC = pOutYuv->get CStride();1031 Pel* piSrcU[2] = { pInYuv[0]->getAddr(COMPONENT_Cb, uiPartAddr), pInYuv[1]->getAddr(COMPONENT_Cb, uiPartAddr) }; 1032 Pel* piSrcV[2] = { pInYuv[0]->getAddr(COMPONENT_Cr, uiPartAddr), pInYuv[1]->getAddr(COMPONENT_Cr, uiPartAddr) }; 1033 UInt uiSrcStrideC = pInYuv[0]->getStride(COMPONENT_Cb); 1034 Pel* piDstU = pOutYuv->getAddr(COMPONENT_Cb, uiPartAddr); 1035 Pel* piDstV = pOutYuv->getAddr(COMPONENT_Cr, uiPartAddr); 1036 UInt uiDstStrideC = pOutYuv->getStride(COMPONENT_Cb); 1027 1037 UInt uiWidthC = uiWidth >> 1; 1028 1038 UInt uiHeightC = uiHeight >> 1; … … 1070 1080 if (l!=r) 1071 1081 { 1072 filSrcU = Clip C( Pel(( leftU + (tmpTarU[y*uiWidthC+x] << 1) + rightU ) >> 2 ));1073 filSrcV = Clip C( Pel(( leftV + (tmpTarV[y*uiWidthC+x] << 1) + rightV ) >> 2 ));1082 filSrcU = ClipBD( Pel(( leftU + (tmpTarU[y*uiWidthC+x] << 1) + rightU ) >> 2 ), bitDepthY); 1083 filSrcV = ClipBD( Pel(( leftV + (tmpTarV[y*uiWidthC+x] << 1) + rightV ) >> 2 ), bitDepthY); 1074 1084 } 1075 1085 else … … 1103 1113 if (t!=b) 1104 1114 { 1105 filSrcU = Clip C( Pel(( topU + (tmpTarU[y*uiWidthC+x] << 1) + bottomU ) >> 2 ));1106 filSrcV = Clip C( Pel(( topV + (tmpTarV[y*uiWidthC+x] << 1) + bottomV ) >> 2 ));1115 filSrcU = ClipBD( Pel(( topU + (tmpTarU[y*uiWidthC+x] << 1) + bottomU ) >> 2 ), bitDepthY); 1116 filSrcV = ClipBD( Pel(( topV + (tmpTarV[y*uiWidthC+x] << 1) + bottomV ) >> 2 ), bitDepthY); 1107 1117 } 1108 1118 else … … 1141 1151 { 1142 1152 pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iWidth, iHeight ); 1143 #if H_3D_VSP1153 #if NH_3D_VSP 1144 1154 if ( pcCU->getVSPFlag(uiPartAddr) == 0) 1145 1155 { 1146 1156 #endif 1147 if ( eRefPicList != REF_PIC_LIST_X ) 1148 { 1149 if( pcCU->getSlice()->getPPS()->getUseWP()) 1150 { 1151 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, true ); 1157 if ( eRefPicList != REF_PIC_LIST_X ) 1158 { 1159 if( pcCU->getSlice()->getPPS()->getUseWP()) 1160 { 1161 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, true ); 1162 } 1163 else 1164 { 1165 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred ); 1166 } 1167 if ( pcCU->getSlice()->getPPS()->getUseWP() ) 1168 { 1169 xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred ); 1170 } 1152 1171 } 1153 1172 else 1154 1173 { 1155 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred ); 1156 } 1157 if ( pcCU->getSlice()->getPPS()->getUseWP() ) 1158 { 1159 xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred ); 1160 } 1161 } 1162 else 1163 { 1164 #if H_3D_SPIVMP 1174 #if NH_3D_SPIVMP 1165 1175 if ( pcCU->getSPIVMPFlag(uiPartAddr)!=0) 1166 1176 { … … 1194 1204 { 1195 1205 #endif 1206 if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) ) 1207 { 1208 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred ); 1209 } 1210 else 1211 { 1212 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 1213 } 1214 #if NH_3D_SPIVMP 1215 } 1216 #endif 1217 } 1218 #if NH_3D_VSP 1219 } 1220 else 1221 { 1196 1222 if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) ) 1197 1223 { 1198 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );1224 xPredInterUniVSP( pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred ); 1199 1225 } 1200 1226 else 1201 1227 { 1202 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 1203 } 1204 #if H_3D_SPIVMP 1205 } 1206 #endif 1207 } 1208 #if H_3D_VSP 1228 xPredInterBiVSP ( pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 1229 } 1230 } 1231 #endif 1232 return; 1233 } 1234 1235 for ( iPartIdx = 0; iPartIdx < pcCU->getNumPartitions(); iPartIdx++ ) 1236 { 1237 pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iWidth, iHeight ); 1238 1239 #if NH_3D_VSP 1240 if ( pcCU->getVSPFlag(uiPartAddr) == 0 ) 1241 { 1242 #endif 1243 if ( eRefPicList != REF_PIC_LIST_X ) 1244 { 1245 if( pcCU->getSlice()->getPPS()->getUseWP()) 1246 { 1247 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, true ); 1248 } 1249 else 1250 { 1251 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred ); 1252 } 1253 if ( pcCU->getSlice()->getPPS()->getUseWP() ) 1254 { 1255 xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred ); 1256 } 1209 1257 } 1210 1258 else 1211 1259 { 1212 if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) ) 1213 { 1214 xPredInterUniVSP( pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred ); 1215 } 1216 else 1217 { 1218 xPredInterBiVSP ( pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 1219 } 1220 } 1221 #endif 1222 return; 1223 } 1224 1225 for ( iPartIdx = 0; iPartIdx < pcCU->getNumPartitions(); iPartIdx++ ) 1226 { 1227 pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iWidth, iHeight ); 1228 1229 #if H_3D_VSP 1230 if ( pcCU->getVSPFlag(uiPartAddr) == 0 ) 1231 { 1232 #endif 1233 if ( eRefPicList != REF_PIC_LIST_X ) 1234 { 1235 if( pcCU->getSlice()->getPPS()->getUseWP()) 1236 { 1237 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, true ); 1238 } 1239 else 1240 { 1241 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred ); 1242 } 1243 if ( pcCU->getSlice()->getPPS()->getUseWP() ) 1244 { 1245 xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred ); 1246 } 1247 } 1248 else 1249 { 1250 #if H_3D_SPIVMP 1251 if (pcCU->getSPIVMPFlag(uiPartAddr)!=0) 1260 #if NH_3D_SPIVMP 1261 if (pcCU->getSPIVMPFlag(uiPartAddr)!=0) 1252 1262 { 1253 1263 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; … … 1279 1289 { 1280 1290 #endif 1281 if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )1282 {1283 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );1284 }1285 else1286 {1287 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );1288 }1289 #if H_3D_SPIVMP1290 1291 #endif 1292 } 1293 #if H_3D_VSP1291 if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) ) 1292 { 1293 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred ); 1294 } 1295 else 1296 { 1297 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 1298 } 1299 #if NH_3D_SPIVMP 1300 } 1301 #endif 1302 } 1303 #if NH_3D_VSP 1294 1304 } 1295 1305 else … … 1317 1327 pcCU->checkMvVertRest(cMv, eRefPicList, iRefIdx ); 1318 1328 #endif 1319 #if H_3D_ARP 1320 if(pcCU->getARPW( uiPartAddr ) > 0 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC()) 1321 { 1322 xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , rpcYuvPred , bi ); 1329 #if NH_3D_ARP 1330 if( pcCU->getARPW( uiPartAddr ) > 0 ) 1331 { 1332 if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC() ) 1333 { 1334 xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , pcYuvPred , bi ); 1323 1335 } 1324 1336 else 1325 1337 { 1326 if( pcCU->getARPW( uiPartAddr ) > 0 1327 && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N 1328 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() 1329 ) 1330 { 1331 xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi ); 1338 xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, bi ); 1339 } 1332 1340 } 1333 1341 else 1334 1342 { 1335 1343 #endif 1336 #if H_3D_IC 1337 Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() != pcCU->getSlice()->getViewIndex() ); 1338 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi 1339 #if H_3D_ARP 1340 , false 1341 #endif 1342 , bICFlag ); 1343 bICFlag = bICFlag && (iWidth > 8); 1344 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi 1345 #if H_3D_ARP 1344 for (UInt comp=COMPONENT_Y; comp<pcYuvPred->getNumberValidComponents(); comp++) 1345 { 1346 const ComponentID compID=ComponentID(comp); 1347 #if NH_3D_IC 1348 Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() != pcCU->getSlice()->getViewIndex() ) && ( isLuma(compID) || (iWidth > 8) ); 1349 xPredInterBlk(compID, pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, pcYuvPred, bi, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)) 1350 #if NH_3D_ARP 1346 1351 , false 1347 1352 #endif 1348 1353 , bICFlag ); 1349 1354 #else 1350 1351 for (UInt comp=COMPONENT_Y; comp<pcYuvPred->getNumberValidComponents(); comp++)1352 {1353 const ComponentID compID=ComponentID(comp);1354 1355 xPredInterBlk (compID, pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, pcYuvPred, bi, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)) ); 1355 } 1356 #endif 1357 #if H_3D_ARP 1358 } 1359 } 1360 #endif 1361 } 1362 1363 #if H_3D_VSP 1356 #endif 1357 } 1358 #if NH_3D_ARP 1359 } 1360 #endif 1361 } 1362 1363 #if NH_3D_VSP 1364 1364 Void TComPrediction::xPredInterUniVSP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi ) 1365 1365 { … … 1382 1382 Void TComPrediction::xPredInterUniSubPU( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, Int widthSubPU, Int heightSubPU ) 1383 1383 { 1384 UInt numPartsInLine = pcCU->getPic()->getNumPartIn Width();1384 UInt numPartsInLine = pcCU->getPic()->getNumPartInCtuWidth(); 1385 1385 UInt horiNumPartsInSubPU = widthSubPU >> 2; 1386 1386 UInt vertNumPartsInSubPU = (heightSubPU >> 2) * numPartsInLine; … … 1398 1398 pcCU->clipMv(cMv); 1399 1399 1400 xPredInter LumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi);1401 xPredInter ChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi);1402 1403 } 1404 } 1405 } 1406 1407 #endif 1408 1409 #if H_3D_ARP1410 Void TComPrediction::xPredInterUniARP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi , TComMvField * pNewMvFiled)1411 { 1412 Int iRefIdx = p NewMvFiled ? pNewMvFiled->getRefIdx() : pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr );1413 TComMv cMv = p NewMvFiled ? pNewMvFiled->getMv() : pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr );1400 xPredInterBlk( COMPONENT_Y, pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) ); 1401 xPredInterBlk( COMPONENT_Cb, pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA) ); 1402 xPredInterBlk( COMPONENT_Cr, pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA) ); 1403 } 1404 } 1405 } 1406 #endif 1407 1408 #if NH_3D_ARP 1409 //temporal ARP 1410 Void TComPrediction::xPredInterUniARP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi ) 1411 { 1412 Int iRefIdx = pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr ); 1413 TComMv cMv = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); 1414 1414 Bool bTobeScaled = false; 1415 1415 TComPic* pcPicYuvBaseCol = NULL; 1416 1416 TComPic* pcPicYuvBaseRef = NULL; 1417 1417 1418 #if H_3D_NBDV1418 #if NH_3D_NBDV 1419 1419 DisInfo cDistparity; 1420 1420 cDistparity.m_acNBDV = pcCU->getDvInfo(0).m_acNBDV; … … 1425 1425 UChar dW = pcCU->getARPW ( uiPartAddr ); 1426 1426 1427 {1428 1427 Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList); 1429 if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() ) 1430 { 1431 bTobeScaled = true; 1432 } 1433 1434 pcPicYuvBaseCol = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getPOC(), cDistparity.m_aVIdxCan ); 1435 1436 pcPicYuvBaseRef = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC(), cDistparity.m_aVIdxCan ); 1437 1438 if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, cDistparity.m_aVIdxCan)) 1428 if (arpRefIdx < 0 || !pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, cDistparity.m_aVIdxCan)) 1439 1429 { 1440 1430 dW = 0; … … 1443 1433 else 1444 1434 { 1445 assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC() ); 1435 if( arpRefIdx != iRefIdx ) 1436 { 1437 bTobeScaled = true; 1438 } 1439 pcPicYuvBaseCol = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getPOC(), cDistparity.m_aVIdxCan ); 1440 pcPicYuvBaseRef = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC(), cDistparity.m_aVIdxCan ); 1446 1441 } 1447 1442 … … 1450 1445 Int iCurrPOC = pcCU->getSlice()->getPOC(); 1451 1446 Int iColRefPOC = pcCU->getSlice()->getRefPOC( eRefPicList, iRefIdx ); 1452 Int iCurrRefPOC = pcCU->getSlice()->getRefPOC( eRefPicList, 0);1447 Int iCurrRefPOC = pcCU->getSlice()->getRefPOC( eRefPicList, arpRefIdx ); 1453 1448 Int iScale = pcCU-> xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iCurrPOC, iColRefPOC); 1454 1449 if ( iScale != 4096 ) … … 1456 1451 cMv = cMv.scaleMv( iScale ); 1457 1452 } 1458 iRefIdx = 0; 1459 } 1453 iRefIdx = arpRefIdx; 1460 1454 } 1461 1455 1462 1456 pcCU->clipMv(cMv); 1463 1457 TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(); 1464 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 ), true ); 1465 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 ), true ); 1458 1459 for (UInt comp=COMPONENT_Y; comp< rpcYuvPred->getNumberValidComponents(); comp++) 1460 { 1461 const ComponentID compID=ComponentID(comp); 1462 xPredInterBlk ( compID, pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 ), pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), true ); 1463 } 1466 1464 1467 1465 if( dW > 0 ) … … 1479 1477 pcCU->clipMv( cNBDV ); 1480 1478 1481 pcPicYuvRef = pcPicYuvBaseCol->getPicYuvRec(); 1482 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, true ); 1483 if (iWidth > 8) 1484 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, true ); 1479 TComPicYuv* pcPicYuvBaseColRec = pcPicYuvBaseCol->getPicYuvRec(); 1480 TComPicYuv* pcPicYuvBaseRefRec = pcPicYuvBaseRef->getPicYuvRec(); 1485 1481 1486 pcPicYuvRef = pcPicYuvBaseRef->getPicYuvRec(); 1487 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, true ); 1488 1489 if (iWidth > 8) 1490 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, true ); 1482 UInt uiCompNum = ( iWidth > 8 ) ? 3: 1; 1483 for (UInt comp=COMPONENT_Y; comp< uiCompNum; comp++) 1484 { 1485 const ComponentID compID=ComponentID(comp); 1486 xPredInterBlk ( compID, pcCU, pcPicYuvBaseColRec, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), true ); 1487 xPredInterBlk ( compID, pcCU, pcPicYuvBaseRefRec, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), true ); 1488 } 1491 1489 1492 1490 pYuvB0->subtractARP( pYuvB0 , pYuvB1 , uiPartAddr , iWidth , iHeight ); … … 1496 1494 pYuvB0->multiplyARP( uiPartAddr , iWidth , iHeight , dW ); 1497 1495 } 1498 rpcYuvPred->addARP( rpcYuvPred , pYuvB0 , uiPartAddr , iWidth , iHeight , !bi );1496 rpcYuvPred->addARP( rpcYuvPred , pYuvB0 , uiPartAddr , iWidth , iHeight , !bi, pcCU->getSlice()->getSPS()->getBitDepths() ); 1499 1497 } 1500 1498 } … … 1505 1503 TComMv cDMv = pcCU->getCUMvField( eBaseRefPicList )->getMv( uiPartAddr ); 1506 1504 TComPic* pcPicYuvBaseCol = pcCU->getSlice()->getRefPic( eBaseRefPicList, iRefIdx ); 1507 TComPicYuv* pcYuvBaseCol = pcPicYuvBaseCol->getPicYuvRec();1508 Int uiLCUAddr,uiAbsPartAddr;1509 1505 Int irefPUX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[uiPartAddr]] + iWidth/2 + ((cDMv.getHor() + 2)>>2); 1510 1506 Int irefPUY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[uiPartAddr]] + iHeight/2 + ((cDMv.getVer() + 2)>>2); … … 1512 1508 irefPUX = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()-> getPicWidthInLumaSamples()-1, irefPUX); 1513 1509 irefPUY = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples()-1, irefPUY); 1514 pcYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr); 1515 TComDataCU *pColCU = pcPicYuvBaseCol->getCU( uiLCUAddr ); 1510 1511 Int uiLCUAddr,uiAbsPartAddr; 1512 pcPicYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr); 1513 TComDataCU *pColCU = pcPicYuvBaseCol->getCtu( uiLCUAddr ); 1516 1514 1517 1515 TComPic* pcPicYuvBaseTRef = NULL; … … 1565 1563 } 1566 1564 1567 Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled ) 1565 //inter-view ARP 1566 Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi ) 1568 1567 { 1569 1568 Int iRefIdx = pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr ); … … 1578 1577 Bool bTMVAvai = false; 1579 1578 TComMv cBaseTMV; 1580 if( pNewMvFiled ) 1581 { 1582 iRefIdx = pNewMvFiled->getRefIdx(); 1583 cDMv = pNewMvFiled->getMv(); 1584 } 1579 1585 1580 pcCU->clipMv(cTempDMv); 1586 1581 1587 assert(dW > 0);1588 if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, pcPicYuvBaseCol->getViewIndex()))1589 {1590 dW = 0;1591 }1592 Int uiLCUAddr,uiAbsPartAddr;1593 1582 Int irefPUX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[uiPartAddr]] + iWidth/2 + ((cDMv.getHor() + 2)>>2); 1594 1583 Int irefPUY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[uiPartAddr]] + iHeight/2 + ((cDMv.getVer() + 2)>>2); … … 1596 1585 irefPUX = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()-> getPicWidthInLumaSamples()-1, irefPUX); 1597 1586 irefPUY = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples()-1, irefPUY); 1598 pcYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr); 1599 TComDataCU *pColCU = pcPicYuvBaseCol->getCU( uiLCUAddr ); 1587 1588 Int uiLCUAddr,uiAbsPartAddr; 1589 pcPicYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr); 1590 TComDataCU *pColCU = pcPicYuvBaseCol->getCtu( uiLCUAddr ); 1600 1591 if( pcCU->getSlice()->isInterB() && !pcCU->getSlice()->getIsDepth() ) 1601 1592 { … … 1668 1659 RefPicList eRefPicListCurr = RefPicList(iList); 1669 1660 Int iRef = pColCU->getCUMvField(eRefPicListCurr)->getRefIdx(uiAbsPartAddr); 1670 if( iRef != -1 )1661 if( iRef != -1 && pcCU->getSlice()->getArpRefPicAvailable( eRefPicListCurr, pcPicYuvBaseCol->getViewIndex())) 1671 1662 { 1672 1663 pcPicYuvBaseTRef = pColCU->getSlice()->getRefPic(eRefPicListCurr, iRef); … … 1702 1693 } 1703 1694 1704 xPredInterLumaBlk ( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 && bTMVAvai ), bTMVAvai); 1705 xPredInterChromaBlk( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 && bTMVAvai ), bTMVAvai); 1706 1707 if( dW > 0 && bTMVAvai ) 1708 { 1695 for (UInt comp=COMPONENT_Y; comp< rpcYuvPred->getNumberValidComponents(); comp++) 1696 { 1697 const ComponentID compID=ComponentID(comp); 1698 xPredInterBlk ( compID, pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 && bTMVAvai ), pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), bTMVAvai ); 1699 } 1700 1701 if( dW > 0 ) 1702 { 1703 assert ( bTMVAvai ); 1709 1704 TComYuv* pYuvCurrTRef = &m_acYuvPredBase[0]; 1710 1705 TComYuv* pYuvBaseTRef = &m_acYuvPredBase[1]; … … 1720 1715 pYuvCurrTRef->clear(); pYuvBaseTRef->clear(); 1721 1716 } 1722 xPredInterLumaBlk ( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true, true); 1723 1724 if (iWidth > 8) 1725 xPredInterChromaBlk( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true, true); 1726 1727 xPredInterLumaBlk ( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv, iWidth, iHeight, pYuvBaseTRef, true, true); 1728 1729 if (iWidth > 8) 1730 xPredInterChromaBlk( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv, iWidth, iHeight, pYuvBaseTRef, true, true); 1717 1718 UInt uiCompNum = ( iWidth > 8 ) ? 3: 1; 1719 for (UInt comp=COMPONENT_Y; comp< uiCompNum; comp++) 1720 { 1721 const ComponentID compID=ComponentID(comp); 1722 xPredInterBlk ( compID, pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), true ); 1723 xPredInterBlk ( compID, pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv, iWidth, iHeight, pYuvBaseTRef, true, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), true ); 1724 } 1731 1725 1732 1726 pYuvCurrTRef->subtractARP( pYuvCurrTRef , pYuvBaseTRef , uiPartAddr , iWidth , iHeight ); … … 1735 1729 pYuvCurrTRef->multiplyARP( uiPartAddr , iWidth , iHeight , dW ); 1736 1730 } 1737 rpcYuvPred->addARP( rpcYuvPred , pYuvCurrTRef , uiPartAddr , iWidth , iHeight , !bi );1731 rpcYuvPred->addARP( rpcYuvPred , pYuvCurrTRef , uiPartAddr , iWidth , iHeight , !bi, pcCU->getSlice()->getSPS()->getBitDepths() ); 1738 1732 } 1739 1733 } … … 1790 1784 } 1791 1785 1792 #if H_3D_VSP 1793 1786 #if NH_3D_VSP 1794 1787 Void TComPrediction::xPredInterBiVSP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvPred ) 1795 1788 { … … 1813 1806 } 1814 1807 1815 xWeightedAverage( &m_acYuvPred[0], &m_acYuvPred[1], iRefIdx[0], iRefIdx[1], uiPartAddr, iWidth, iHeight, rpcYuvPred ); 1816 } 1817 1808 xWeightedAverage( &m_acYuvPred[0], &m_acYuvPred[1], iRefIdx[0], iRefIdx[1], uiPartAddr, iWidth, iHeight, rpcYuvPred, pcCU->getSlice()->getSPS()->getBitDepths() ); 1809 } 1818 1810 #endif 1819 1811 … … 1835 1827 1836 1828 Void TComPrediction::xPredInterBlk(const ComponentID compID, TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *dstPic, Bool bi, const Int bitDepth 1837 #if H_3D_ARP1829 #if NH_3D_ARP 1838 1830 , Bool filterType 1839 1831 #endif 1840 #if H_3D_IC1832 #if NH_3D_IC 1841 1833 , Bool bICFlag 1842 1834 #endif … … 1857 1849 Int yFrac = mv->getVer() & ((1<<shiftVer)-1); 1858 1850 1859 #if H_3D_IC1851 #if NH_3D_INTEGER_MV_DEPTH 1860 1852 if( cu->getSlice()->getIsDepth() ) 1861 1853 { 1862 1854 refOffset = mv->getHor() + mv->getVer() * refStride; 1863 ref = refPic->get LumaAddr( cu->getAddr(), cu->getZorderIdxInCU() + partAddr ) + refOffset;1855 ref = refPic->getAddr(compID, cu->getCtuRsAddr(), cu->getZorderIdxInCtu() + partAddr ) + refOffset; 1864 1856 xFrac = 0; 1865 1857 yFrac = 0; … … 1874 1866 if ( yFrac == 0 ) 1875 1867 { 1876 #if H_3D_IC1877 m_if.filterHor Luma( ref, refStride, dst, dstStride, width, height, xFrac, !bi || bICFlag1868 #if NH_3D_IC 1869 m_if.filterHor(compID, ref, refStride, dst, dstStride, cxWidth, cxHeight, xFrac, !bi || bICFlag, chFmt, bitDepth 1878 1870 #else 1879 1871 m_if.filterHor(compID, ref, refStride, dst, dstStride, cxWidth, cxHeight, xFrac, !bi, chFmt, bitDepth 1880 1872 #endif 1881 #if H_3D_ARP1873 #if NH_3D_ARP 1882 1874 , filterType 1883 1875 #endif … … 1886 1878 else if ( xFrac == 0 ) 1887 1879 { 1888 #if H_3D_IC1889 m_if.filterVer Luma( ref, refStride, dst, dstStride, width, height, yFrac, true, !bi || bICFlag1880 #if NH_3D_IC 1881 m_if.filterVer(compID, ref, refStride, dst, dstStride, cxWidth, cxHeight, yFrac, true, !bi || bICFlag, chFmt, bitDepth 1890 1882 #else 1891 1883 m_if.filterVer(compID, ref, refStride, dst, dstStride, cxWidth, cxHeight, yFrac, true, !bi, chFmt, bitDepth 1892 1884 #endif 1893 #if H_3D_ARP1885 #if NH_3D_ARP 1894 1886 , filterType 1895 1887 #endif … … 1904 1896 1905 1897 m_if.filterHor(compID, ref - ((vFilterSize>>1) -1)*refStride, refStride, tmp, tmpStride, cxWidth, cxHeight+vFilterSize-1, xFrac, false, chFmt, bitDepth 1906 #if H_3D_ARP1898 #if NH_3D_ARP 1907 1899 , filterType 1908 1900 #endif 1909 1901 ); 1910 #if H_3D_IC1911 m_if.filterVer Luma(tmp + (halfFilterSize-1)*tmpStride, tmpStride, dst, dstStride, width, height, yFrac, false, !bi || bICFlag1902 #if NH_3D_IC 1903 m_if.filterVer(compID, tmp + ((vFilterSize>>1) -1)*tmpStride, tmpStride, dst, dstStride, cxWidth, cxHeight, yFrac, false, !bi || bICFlag, chFmt, bitDepth 1912 1904 #else 1913 1905 m_if.filterVer(compID, tmp + ((vFilterSize>>1) -1)*tmpStride, tmpStride, dst, dstStride, cxWidth, cxHeight, yFrac, false, !bi, chFmt, bitDepth 1914 1906 #endif 1915 #if H_3D_ARP1907 #if NH_3D_ARP 1916 1908 , filterType 1917 1909 #endif … … 1919 1911 } 1920 1912 1921 #if H_3D_IC1913 #if NH_3D_IC 1922 1914 if( bICFlag ) 1923 1915 { 1924 1916 Int a, b, i, j; 1925 1917 const Int iShift = IC_CONST_SHIFT; 1926 1927 xGetLLSICPrediction( cu, mv, refPic, a, b, TEXT_LUMA ); 1928 1929 1930 for ( i = 0; i < height; i++ )1931 { 1932 for ( j = 0; j < width; j++ )1933 { 1934 dst[j] = Clip3( 0, ( 1 << g_bitDepthY) - 1, ( ( a*dst[j] ) >> iShift ) + b );1918 Pel *dst2 = dst; 1919 1920 xGetLLSICPrediction( compID, cu, mv, refPic, a, b, bitDepth ); 1921 1922 for ( i = 0; i < cxHeight; i++ ) 1923 { 1924 for ( j = 0; j < cxWidth; j++ ) 1925 { 1926 dst[j] = Clip3( 0, ( 1 << bitDepth ) - 1, ( ( a*dst[j] ) >> iShift ) + b ); 1935 1927 } 1936 1928 dst += dstStride; … … 1939 1931 if(bi) 1940 1932 { 1941 Pel *dst2 = dstPic->getLumaAddr( partAddr ); 1942 Int shift = IF_INTERNAL_PREC - g_bitDepthY; 1943 for (i = 0; i < height; i++) 1944 { 1945 for (j = 0; j < width; j++) 1946 { 1947 Short val = dst2[j] << shift; 1948 dst2[j] = val - (Short)IF_INTERNAL_OFFS; 1933 Int shift = IF_INTERNAL_PREC - bitDepth; 1934 for (i = 0; i < cxHeight; i++) 1935 { 1936 for (j = 0; j < cxWidth; j++) 1937 { 1938 Pel val = dst2[j] << shift; 1939 dst2[j] = val - (Pel)IF_INTERNAL_OFFS; 1949 1940 } 1950 1941 dst2 += dstStride; … … 1956 1947 } 1957 1948 1958 1959 #if H_3D_ARP1960 , Bool filterType1961 #endif1962 #if H_3D_IC1963 , Bool bICFlag1964 #endif1965 #if H_3D_IC1966 m_if.filterHorChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, xFrac, !bi || bICFlag1967 #else1968 #endif1969 #if H_3D_ARP1970 , filterType1971 #endif1972 #if H_3D_IC1973 m_if.filterHorChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, xFrac, !bi || bICFlag1974 #else1975 #endif1976 #if H_3D_ARP1977 , filterType1978 #endif1979 #if H_3D_IC1980 m_if.filterVerChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, yFrac, true, !bi || bICFlag1981 #else1982 #endif1983 #if H_3D_ARP1984 , filterType1985 #endif1986 #if H_3D_IC1987 m_if.filterVerChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, yFrac, true, !bi || bICFlag1988 #else1989 #endif1990 #if H_3D_ARP1991 , filterType1992 #endif1993 #if H_3D_ARP1994 , filterType1995 #endif1996 #if H_3D_IC1997 m_if.filterVerChroma(extY + (halfFilterSize-1)*extStride, extStride, dstCb, dstStride, cxWidth, cxHeight , yFrac, false, !bi || bICFlag1998 #else1999 #endif2000 #if H_3D_ARP2001 , filterType2002 #endif2003 #if H_3D_ARP2004 , filterType2005 #endif2006 #if H_3D_IC2007 m_if.filterVerChroma(extY + (halfFilterSize-1)*extStride, extStride, dstCr, dstStride, cxWidth, cxHeight , yFrac, false, !bi || bICFlag2008 #else2009 #endif2010 #if H_3D_ARP2011 , filterType2012 #endif2013 #if H_3D_IC2014 if( bICFlag )2015 {2016 Int a, b, i, j;2017 const Int iShift = IC_CONST_SHIFT;2018 2019 xGetLLSICPrediction( cu, mv, refPic, a, b, TEXT_CHROMA_U ); // Cb2020 for ( i = 0; i < cxHeight; i++ )2021 {2022 for ( j = 0; j < cxWidth; j++ )2023 {2024 dstCb[j] = Clip3( 0, ( 1 << g_bitDepthC ) - 1, ( ( a*dstCb[j] ) >> iShift ) + b );2025 }2026 dstCb += dstStride;2027 }2028 xGetLLSICPrediction( cu, mv, refPic, a, b, TEXT_CHROMA_V ); // Cr2029 for ( i = 0; i < cxHeight; i++ )2030 {2031 for ( j = 0; j < cxWidth; j++ )2032 {2033 dstCr[j] = Clip3( 0, ( 1 << g_bitDepthC ) - 1, ( ( a*dstCr[j] ) >> iShift ) + b );2034 }2035 dstCr += dstStride;2036 }2037 2038 if(bi)2039 {2040 Pel* dstCb2 = dstPic->getCbAddr( partAddr );2041 Pel* dstCr2 = dstPic->getCrAddr( partAddr );2042 Int shift = IF_INTERNAL_PREC - g_bitDepthC;2043 for (i = 0; i < cxHeight; i++)2044 {2045 for (j = 0; j < cxWidth; j++)2046 {2047 Short val = dstCb2[j] << shift;2048 dstCb2[j] = val - (Short)IF_INTERNAL_OFFS;2049 2050 val = dstCr2[j] << shift;2051 dstCr2[j] = val - (Short)IF_INTERNAL_OFFS;2052 }2053 dstCb2 += dstStride;2054 dstCr2 += dstStride;2055 }2056 }2057 }2058 #endif2059 1949 Void TComPrediction::xWeightedAverage( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, Int iRefIdx0, Int iRefIdx1, UInt uiPartIdx, Int iWidth, Int iHeight, TComYuv* pcYuvDst, const BitDepths &clipBitDepths 2060 1950 ) … … 2201 2091 (uiDirMode==HOR_IDX || uiDirMode==VER_IDX); 2202 2092 } 2203 #if H_3D_IC2093 #if NH_3D_IC 2204 2094 /** Function for deriving the position of first non-zero binary bit of a value 2205 2095 * \param x input value … … 2231 2121 /** Function for deriving LM illumination compensation. 2232 2122 */ 2233 Void TComPrediction::xGetLLSICPrediction( TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, TextType eType)2123 Void TComPrediction::xGetLLSICPrediction( const ComponentID compID, TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, const Int bitDepth ) 2234 2124 { 2235 2125 TComPicYuv *pRecPic = pcCU->getPic()->getPicYuvRec(); 2236 2126 Pel *pRec = NULL, *pRef = NULL; 2237 2127 UInt uiWidth, uiHeight, uiTmpPartIdx; 2238 Int iRecStride = ( eType == TEXT_LUMA ) ? pRecPic->getStride() : pRecPic->getCStride();2239 Int iRefStride = ( eType == TEXT_LUMA ) ? pRefPic->getStride() : pRefPic->getCStride();2128 Int iRecStride = pRecPic->getStride(compID); 2129 Int iRefStride = pRefPic->getStride(compID); 2240 2130 Int iRefOffset, iHor, iVer; 2241 2131 iHor = pcCU->getSlice()->getIsDepth() ? pMv->getHor() : ( ( pMv->getHor() + 2 ) >> 2 ); 2242 2132 iVer = pcCU->getSlice()->getIsDepth() ? pMv->getVer() : ( ( pMv->getVer() + 2 ) >> 2 ); 2243 if( eType != TEXT_LUMA)2133 if( !isLuma(compID) ) 2244 2134 { 2245 2135 iHor = pcCU->getSlice()->getIsDepth() ? ( ( pMv->getHor() + 1 ) >> 1 ) : ( ( pMv->getHor() + 4 ) >> 3 ); 2246 2136 iVer = pcCU->getSlice()->getIsDepth() ? ( ( pMv->getVer() + 1 ) >> 1 ) : ( ( pMv->getVer() + 4 ) >> 3 ); 2247 2137 } 2248 uiWidth = ( eType == TEXT_LUMA ) ? pcCU->getWidth( 0 ) : ( pcCU->getWidth( 0 ) >> 1);2249 uiHeight = ( eType == TEXT_LUMA ) ? pcCU->getHeight( 0 ) : ( pcCU->getHeight( 0 ) >> 1);2138 uiWidth = pcCU->getWidth( 0 ) >> pRefPic->getComponentScaleX(compID); 2139 uiHeight = pcCU->getHeight( 0 ) >> pRefPic->getComponentScaleY(compID); 2250 2140 2251 2141 Int i, j, iCountShift = 0; 2252 2142 2253 // LLS parameters estimation -->2143 // LLS parameters estimation 2254 2144 2255 2145 Int x = 0, y = 0, xx = 0, xy = 0; 2256 Int precShift = std::max(0, (( eType == TEXT_LUMA ) ? g_bitDepthY : g_bitDepthC) - 12); 2257 2258 if( pcCU->getPUAbove( uiTmpPartIdx, pcCU->getZorderIdxInCU() ) ) 2146 Int precShift = std::max(0, bitDepth - 12); 2147 2148 UInt partAddr = 0; 2149 if( pcCU->getPUAbove( uiTmpPartIdx, pcCU->getZorderIdxInCtu() ) ) 2259 2150 { 2260 2151 iRefOffset = iHor + iVer * iRefStride - iRefStride; 2261 if( eType == TEXT_LUMA ) 2262 { 2263 pRef = pRefPic->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 2264 pRec = pRecPic->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - iRecStride; 2265 } 2266 else if( eType == TEXT_CHROMA_U ) 2267 { 2268 pRef = pRefPic->getCbAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 2269 pRec = pRecPic->getCbAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - iRecStride; 2270 } 2271 else 2272 { 2273 assert( eType == TEXT_CHROMA_V ); 2274 pRef = pRefPic->getCrAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 2275 pRec = pRecPic->getCrAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - iRecStride; 2276 } 2277 2152 pRef = pRefPic->getAddr(compID, pcCU->getCtuRsAddr(), pcCU->getZorderIdxInCtu() + partAddr ) + iRefOffset; 2153 pRec = pRecPic->getAddr(compID, pcCU->getCtuRsAddr(), pcCU->getZorderIdxInCtu() + partAddr ) - iRecStride; 2278 2154 for( j = 0; j < uiWidth; j+=2 ) 2279 2155 { 2280 2156 x += pRef[j]; 2281 2157 y += pRec[j]; 2282 if ( eType == TEXT_LUMA)2158 if( isLuma(compID) ) 2283 2159 { 2284 2160 xx += (pRef[j] * pRef[j])>>precShift; … … 2289 2165 } 2290 2166 2291 if( pcCU->getPULeft( uiTmpPartIdx, pcCU->getZorderIdxInC U() ) )2167 if( pcCU->getPULeft( uiTmpPartIdx, pcCU->getZorderIdxInCtu() ) ) 2292 2168 { 2293 2169 iRefOffset = iHor + iVer * iRefStride - 1; 2294 if( eType == TEXT_LUMA ) 2295 { 2296 pRef = pRefPic->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 2297 pRec = pRecPic->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - 1; 2298 } 2299 else if( eType == TEXT_CHROMA_U ) 2300 { 2301 pRef = pRefPic->getCbAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 2302 pRec = pRecPic->getCbAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - 1; 2303 } 2304 else 2305 { 2306 assert( eType == TEXT_CHROMA_V ); 2307 pRef = pRefPic->getCrAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 2308 pRec = pRecPic->getCrAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - 1; 2309 } 2310 2170 pRef = pRefPic->getAddr(compID, pcCU->getCtuRsAddr(), pcCU->getZorderIdxInCtu() + partAddr ) + iRefOffset; 2171 pRec = pRecPic->getAddr(compID, pcCU->getCtuRsAddr(), pcCU->getZorderIdxInCtu() + partAddr ) - 1; 2311 2172 for( i = 0; i < uiHeight; i+=2 ) 2312 2173 { 2313 2174 x += pRef[0]; 2314 2175 y += pRec[0]; 2315 if ( eType == TEXT_LUMA)2176 if( isLuma(compID) ) 2316 2177 { 2317 2178 xx += (pRef[0] * pRef[0])>>precShift; … … 2331 2192 } 2332 2193 2333 if ( eType != TEXT_LUMA)2334 { 2335 a = 32;2194 if( !isLuma(compID) ) 2195 { 2196 a = ( 1 << IC_CONST_SHIFT ); 2336 2197 b = ( y - x + ( 1 << ( iCountShift - 1 ) ) ) >> iCountShift; 2337 2198 } … … 2343 2204 Int a2 = ( xx << iCountShift ) - ((x * x) >> precShift); 2344 2205 const Int iShift = IC_CONST_SHIFT; 2345 {2346 {2347 2206 const Int iShiftA2 = 6; 2348 2207 const Int iAccuracyShift = 15; … … 2350 2209 Int iScaleShiftA2 = 0; 2351 2210 Int iScaleShiftA1 = 0; 2352 Int a1s = a1;2353 Int a2s = a2;2211 Int a1s; 2212 Int a2s; 2354 2213 2355 2214 a1 = Clip3(0, 2*a2, a1); … … 2379 2238 } 2380 2239 } 2381 }2382 }2383 2240 #endif 2384 2241 -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComPrediction.h
r1243 r1279 45 45 #include "TComWeightPrediction.h" 46 46 47 #if NH_3D_ARP 48 #include "TComPic.h" 49 #endif 47 50 // forward declaration 48 51 class TComMv; … … 77 80 TComYuv m_acYuvPred[NUM_REF_PIC_LIST_01]; 78 81 TComYuv m_cYuvPredTemp; 79 #if H_3D_ARP82 #if NH_3D_ARP 80 83 TComYuv m_acYuvPredBase[2]; 81 84 #endif … … 87 90 Pel* m_pLumaRecBuffer; ///< array for downsampled reconstructed luma sample 88 91 Int m_iLumaRecStride; ///< stride of #m_pLumaRecBuffer array 89 #if H_3D_IC92 #if NH_3D_IC 90 93 UInt m_uiaShift[ 64 ]; // Table for multiplication to substitue of division operation 91 94 #endif 92 95 93 #if H_3D_VSP96 #if NH_3D_VSP 94 97 Int* m_pDepthBlock; ///< Store a depth block, local variable, to prevent memory allocation every time 95 98 TComYuv m_cYuvDepthOnVsp; … … 100 103 101 104 // motion compensation functions 102 #if H_3D_ARP 103 Void xPredInterUniARP ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false, TComMvField * pNewMvFiled = NULL ); 105 #if NH_3D_ARP 106 Void xPredInterUniARP ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi ); 107 Void xPredInterUniARPviewRef ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi ); 104 108 Bool xCheckBiInterviewARP ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eBaseRefPicList, TComPic*& pcPicYuvCurrTRef, TComMv& cBaseTMV, Int& iCurrTRefPoc ); 105 Void xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled = NULL );106 109 #endif 107 110 108 111 Void xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv* pcYuvPred, Bool bi=false ); 109 112 Void xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv* pcYuvPred ); 110 #if H_3D_VSP113 #if NH_3D_VSP 111 114 Void xPredInterUniVSP ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false ); 112 115 Void xPredInterBiVSP ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvPred ); … … 114 117 115 118 Void xPredInterBlk(const ComponentID compID, TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *dstPic, Bool bi, const Int bitDepth 116 #if H_3D_ARP119 #if NH_3D_ARP 117 120 , Bool filterType = false 118 121 #endif 119 #if H_3D_IC122 #if NH_3D_IC 120 123 , Bool bICFlag = false 121 124 #endif 122 125 ); 123 126 124 #if H_3D_ARP 125 , Bool filterType = false 126 #endif 127 #if H_3D_IC 128 , Bool bICFlag = false 129 #endif 130 #if H_3D_VSP 127 #if NH_3D_VSP 131 128 Void xPredInterUniSubPU ( TComDataCU *cu, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, Int widthSubPU=4, Int heightSubPU=4 ); 132 129 #endif … … 135 132 136 133 Void xGetLLSPrediction ( const Pel* pSrc0, Int iSrcStride, Pel* pDst0, Int iDstStride, UInt uiWidth, UInt uiHeight, UInt uiExt0, const ChromaFormat chFmt DEBUG_STRING_FN_DECLARE(sDebug) ); 137 #if H_3D_IC138 Void xGetLLSICPrediction( TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, TextType eType);134 #if NH_3D_IC 135 Void xGetLLSICPrediction( const ComponentID compID, TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, const Int bitDepth); 139 136 #endif 140 137 Void xDCPredFiltering( const Pel* pSrc, Int iSrcStride, Pel* pDst, Int iDstStride, Int iWidth, Int iHeight, ChannelType channelType ); 141 138 Bool xCheckIdenticalMotion ( TComDataCU* pcCU, UInt PartAddr); 142 #if H_3D_SPIVMP139 #if NH_3D_SPIVMP 143 140 Bool xCheckTwoSPMotion ( TComDataCU* pcCU, UInt PartAddr0, UInt PartAddr1 ); 144 141 Void xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr ); … … 174 171 #endif 175 172 176 #if H_3D_DBBP173 #if NH_3D_DBBP 177 174 PartSize getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize, TComDataCU*& pcCU); 178 175 Bool getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask, TComDataCU*& pcCU); 179 Void combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize );176 Void combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize, Int bitDepthY ); 180 177 #endif 181 178 -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComRdCost.cpp
r1209 r1279 311 311 m_bUseEstimatedVSD = false; 312 312 #endif 313 #if H_3D_DBBP313 #if NH_3D_DBBP 314 314 m_bUseMask = false; 315 315 #endif … … 340 340 rcDistParam.DistFunc = m_afpDistortFunc[eDFunc + g_aucConvertToBit[ rcDistParam.iCols ] + 1 ]; 341 341 342 #if H_3D_DBBP342 #if NH_3D_DBBP 343 343 if( m_bUseMask ) 344 344 { … … 397 397 } 398 398 399 #if H_3D_DBBP399 #if NH_3D_DBBP 400 400 if( m_bUseMask ) 401 401 { … … 446 446 } 447 447 448 #if H_3D_DBBP448 #if NH_3D_DBBP 449 449 if( m_bUseMask ) 450 450 { … … 468 468 rcDP.bitDepth = bitDepth; 469 469 rcDP.DistFunc = m_afpDistortFunc[ ( bHadamard ? DF_HADS : DF_SADS ) + g_aucConvertToBit[ iWidth ] + 1 ]; 470 #if H_3D_DBBP470 #if NH_3D_DBBP 471 471 if( m_bUseMask ) 472 472 { … … 561 561 cDtParam.bitDepth = bitDepth; 562 562 563 #if H_3D_IC563 #if NH_3D_IC 564 564 cDtParam.bUseIC = false; 565 565 #endif … … 602 602 cDtParam.bitDepth = bitDepth; 603 603 604 #if NH_3D_IC_FIX 605 cDtParam.bUseIC = false; 606 #endif 607 #if H_3D_INTER_SDC_FIX 608 cDtParam.bUseSDCMRSAD = false; 609 #endif 610 604 611 Dist dist = cDtParam.DistFunc( &cDtParam ); 605 612 … … 648 655 // ==================================================================================================================== 649 656 650 #if H_3D_DBBP657 #if NH_3D_DBBP 651 658 // -------------------------------------------------------------------------------------------------------------------- 652 659 // Masked distortion functions … … 689 696 690 697 AOF(!pcDtParam->bApplyWeight); 691 #if H_3D_IC698 #if NH_3D_IC 692 699 AOF(!pcDtParam->bUseIC); 693 700 #endif … … 763 770 return TComRdCostWeightPrediction::xGetSADw( pcDtParam ); 764 771 } 765 #if H_3D_IC772 #if NH_3D_IC 766 773 if( pcDtParam->bUseIC ) 767 774 { … … 805 812 } 806 813 807 #if H_3D_IC814 #if NH_3D_IC 808 815 if( pcDtParam->bUseIC ) 809 816 { … … 850 857 } 851 858 852 #if H_3D_IC859 #if NH_3D_IC 853 860 if( pcDtParam->bUseIC ) 854 861 { … … 899 906 } 900 907 901 #if H_3D_IC908 #if NH_3D_IC 902 909 if( pcDtParam->bUseIC ) 903 910 { … … 955 962 return TComRdCostWeightPrediction::xGetSADw( pcDtParam ); 956 963 } 957 #if H_3D_IC964 #if NH_3D_IC 958 965 if( pcDtParam->bUseIC ) 959 966 { … … 1003 1010 Distortion TComRdCost::xGetSAD16N( DistParam* pcDtParam ) 1004 1011 { 1005 #if H_3D_IC1012 #if NH_3D_IC 1006 1013 if( pcDtParam->bUseIC ) 1007 1014 { … … 1063 1070 } 1064 1071 1065 #if H_3D_IC1072 #if NH_3D_IC 1066 1073 if( pcDtParam->bUseIC ) 1067 1074 { … … 1136 1143 } 1137 1144 1138 #if H_3D_IC1145 #if NH_3D_IC 1139 1146 if( pcDtParam->bUseIC ) 1140 1147 { … … 1201 1208 } 1202 1209 1203 #if H_3D_IC1210 #if NH_3D_IC 1204 1211 if( pcDtParam->bUseIC ) 1205 1212 { … … 1305 1312 return TComRdCostWeightPrediction::xGetSADw( pcDtParam ); 1306 1313 } 1307 #if H_3D_IC1314 #if NH_3D_IC 1308 1315 if( pcDtParam->bUseIC ) 1309 1316 { … … 1388 1395 1389 1396 1390 #if H_3D_IC || H_3D_INTER_SDC1397 #if NH_3D_IC || H_3D_INTER_SDC 1391 1398 UInt TComRdCost::xGetSADic( DistParam* pcDtParam ) 1392 1399 { 1393 1400 if ( pcDtParam->bApplyWeight ) 1394 1401 { 1395 return xGetSADw( pcDtParam );1402 return TComRdCostWeightPrediction::xGetSADw( pcDtParam ); 1396 1403 } 1397 1404 Pel* piOrg = pcDtParam->pOrg; … … 1441 1448 if ( pcDtParam->bApplyWeight ) 1442 1449 { 1443 return xGetSADw( pcDtParam );1450 return TComRdCostWeightPrediction::xGetSADw( pcDtParam ); 1444 1451 } 1445 1452 Pel* piOrg = pcDtParam->pOrg; … … 1498 1505 if ( pcDtParam->bApplyWeight ) 1499 1506 { 1500 return xGetSADw( pcDtParam );1507 return TComRdCostWeightPrediction::xGetSADw( pcDtParam ); 1501 1508 } 1502 1509 Pel* piOrg = pcDtParam->pOrg; … … 1567 1574 if ( pcDtParam->bApplyWeight ) 1568 1575 { 1569 return xGetSADw( pcDtParam );1576 return TComRdCostWeightPrediction::xGetSADw( pcDtParam ); 1570 1577 } 1571 1578 Pel* piOrg = pcDtParam->pOrg; … … 1660 1667 if ( pcDtParam->bApplyWeight ) 1661 1668 { 1662 return xGetSADw( pcDtParam );1669 return TComRdCostWeightPrediction::xGetSADw( pcDtParam ); 1663 1670 } 1664 1671 Pel* piOrg = pcDtParam->pOrg; … … 1835 1842 if ( pcDtParam->bApplyWeight ) 1836 1843 { 1837 return xGetSADw( pcDtParam );1844 return TComRdCostWeightPrediction::xGetSADw( pcDtParam ); 1838 1845 } 1839 1846 Pel* piOrg = pcDtParam->pOrg; … … 1977 1984 if ( pcDtParam->bApplyWeight ) 1978 1985 { 1979 return xGetSADw( pcDtParam );1986 return TComRdCostWeightPrediction::xGetSADw( pcDtParam ); 1980 1987 } 1981 1988 Pel* piOrg = pcDtParam->pOrg; … … 2094 2101 if ( pcDtParam->bApplyWeight ) 2095 2102 { 2096 return xGetSADw( pcDtParam );2103 return TComRdCostWeightPrediction::xGetSADw( pcDtParam ); 2097 2104 } 2098 2105 Pel* piOrg = pcDtParam->pOrg; … … 2332 2339 if ( pcDtParam->bApplyWeight ) 2333 2340 { 2334 return xGetSADw( pcDtParam );2341 return TComRdCostWeightPrediction::xGetSADw( pcDtParam ); 2335 2342 } 2336 2343 … … 3327 3334 return TComRdCostWeightPrediction::xGetHADsw( pcDtParam ); 3328 3335 } 3329 #if H_3D_IC3336 #if NH_3D_IC 3330 3337 if( pcDtParam->bUseIC ) 3331 3338 { … … 3403 3410 } 3404 3411 3405 #if H_3D_IC || H_3D_INTER_SDC3412 #if NH_3D_IC || H_3D_INTER_SDC 3406 3413 UInt TComRdCost::xGetHADsic( DistParam* pcDtParam ) 3407 3414 { 3408 3415 if ( pcDtParam->bApplyWeight ) 3409 3416 { 3410 return xGetHADsw( pcDtParam );3417 return TComRdCostWeightPrediction::xGetHADsw( pcDtParam ); 3411 3418 } 3412 3419 Pel* piOrg = pcDtParam->pOrg; -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComRdCost.h
r1209 r1279 91 91 Int iStrideVir; 92 92 #endif 93 #if H_3D_IC93 #if NH_3D_IC 94 94 Bool bUseIC; 95 95 #endif … … 167 167 #endif 168 168 Int m_iCostScale; 169 #if H_3D_DBBP169 #if NH_3D_DBBP 170 170 Bool m_bUseMask; 171 171 #endif … … 206 206 Void setDistParam( DistParam& rcDP, Int bitDepth, Pel* p1, Int iStride1, Pel* p2, Int iStride2, Int iWidth, Int iHeight, Bool bHadamard = false ); 207 207 208 #if H_3D_DBBP208 #if NH_3D_DBBP 209 209 Void setUseMask(Bool b) { m_bUseMask = b; } 210 210 #endif … … 256 256 static Distortion xGetSSE64 ( DistParam* pcDtParam ); 257 257 static Distortion xGetSSE16N ( DistParam* pcDtParam ); 258 #if H_3D_IC || H_3D_INTER_SDC258 #if NH_3D_IC || H_3D_INTER_SDC 259 259 static UInt xGetSADic ( DistParam* pcDtParam ); 260 260 static UInt xGetSAD4ic ( DistParam* pcDtParam ); … … 283 283 #endif 284 284 285 #if H_3D_IC || H_3D_INTER_SDC285 #if NH_3D_IC || H_3D_INTER_SDC 286 286 static UInt xGetSAD12ic ( DistParam* pcDtParam ); 287 287 static UInt xGetSAD24ic ( DistParam* pcDtParam ); … … 294 294 295 295 296 #if H_3D_IC || H_3D_INTER_SDC296 #if NH_3D_IC || H_3D_INTER_SDC 297 297 static UInt xGetHADsic ( DistParam* pcDtParam ); 298 298 #endif … … 302 302 static Distortion xCalcHADs4x4 ( Pel *piOrg, Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep ); 303 303 static Distortion xCalcHADs8x8 ( Pel *piOrg, Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep ); 304 #if H_3D_DBBP304 #if NH_3D_DBBP 305 305 static UInt xGetMaskedSSE ( DistParam* pcDtParam ); 306 306 static UInt xGetMaskedSAD ( DistParam* pcDtParam ); -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComRom.cpp
r1247 r1279 546 546 Bool g_disableNumbering = false; 547 547 Bool g_disableHLSTrace = false; 548 UInt64 g_stopAtCounter = 937234;548 UInt64 g_stopAtCounter = 4660; 549 549 Bool g_traceCopyBack = false; 550 550 Bool g_decTraceDispDer = false; … … 686 686 } 687 687 Bool stopFlag = false; 688 if ( g_stopAtPos && poc == 0 && layerId == 2)688 if ( g_stopAtPos && poc == 16 && layerId == 1 ) 689 689 { 690 690 Bool stopAtCU = true; 691 691 if ( stopAtCU ) // Stop at CU with specific size 692 692 { 693 stopFlag = ( cuPelX == 0 ) && ( cuPelY == 0 ) && ( cuWidth == 8 ) && ( cuHeight == 8);693 stopFlag = ( cuPelX == 0 ) && ( cuPelY == 0 ) && ( cuWidth == 32 ) && ( cuHeight == 32 ); 694 694 } 695 695 else … … 711 711 if ( ( ( g_nSymbolCounter >= COUNTER_START && g_nSymbolCounter <= COUNTER_END )|| g_bJustDoIt ) && doIt ) 712 712 { 713 if ( g_stopAtCounter == g_nSymbolCounter ) 714 { 715 std::cout << "Break point here." << std::endl; 716 } 713 incSymbolCounter(); 717 714 if ( !g_disableNumbering ) 718 715 { 719 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter ++);716 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter ); 720 717 } 721 718 fprintf( g_hTrace, "%-50s : %d\n", symbolName, val ); 722 fflush ( g_hTrace ); 723 g_nSymbolCounter++; 724 } 719 fflush ( g_hTrace ); 720 } 721 } 722 UInt64 incSymbolCounter( ) 723 { 724 g_nSymbolCounter++; 725 if ( g_stopAtCounter == g_nSymbolCounter ) 726 { 727 std::cout << "Break point here." << std::endl; 728 } 729 return g_nSymbolCounter; 725 730 } 726 731 Void writeToTraceFile( const Char* symbolName, Bool doIt ) … … 728 733 if ( ( ( g_nSymbolCounter >= COUNTER_START && g_nSymbolCounter <= COUNTER_END )|| g_bJustDoIt ) && doIt ) 729 734 { 735 incSymbolCounter(); 730 736 fprintf( g_hTrace, "%s", symbolName ); 731 fflush ( g_hTrace ); 732 g_nSymbolCounter++; 737 fflush ( g_hTrace ); 733 738 } 734 739 } -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComRom.h
r1247 r1279 196 196 Void writeToTraceFile( const Char* symbolName, Int val, Bool doIt ); 197 197 Void writeToTraceFile( const Char* symbolName, Bool doIt ); 198 incSymbolCounter incSymbolCounter(); 198 199 Void stopAtPos ( Int poc, Int layerId, Int cuPelX, Int cuPelY, Int cuWidth, Int cuHeight ); 199 200 #endif -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComSlice.cpp
r1258 r1279 140 140 , m_pocMsbValRequiredFlag (false) 141 141 #endif 142 #if H_3D_IC142 #if NH_3D_IC 143 143 , m_bApplyIC (false) 144 144 , m_icSkipParseFlag (false) … … 278 278 m_iSliceChromaQpDelta[component] = 0; 279 279 } 280 #if H_3D_IV_MERGE280 #if NH_3D_IV_MERGE 281 281 m_maxNumMergeCand = MRG_MAX_NUM_CANDS_MEM; 282 282 #else … … 289 289 m_cabacInitFlag = false; 290 290 m_enableTMVPFlag = true; 291 #if H_3D_TMVP291 #if NH_3D_TMVP 292 292 m_aiAlterRefIdx[0] = -1; 293 293 m_aiAlterRefIdx[1] = -1; … … 824 824 } 825 825 } 826 #if H_3D827 #if H_3D_TMVP826 #if NH_3D 827 #if NH_3D_TMVP 828 828 Void TComSlice::generateAlterRefforTMVP() 829 829 { … … 1171 1171 m_bApplyDIS = pSrc->m_bApplyDIS; 1172 1172 #endif 1173 #if H_3D_IC1173 #if NH_3D_IC 1174 1174 m_bApplyIC = pSrc->m_bApplyIC; 1175 1175 m_icSkipParseFlag = pSrc->m_icSkipParseFlag; … … 1996 1996 m_dimensionId[i][j] = 0; 1997 1997 } 1998 #if H_3D_ARP1998 #if NH_3D_ARP 1999 1999 #endif 2000 2000 } … … 3571 3571 #endif 3572 3572 } 3573 #if H_3D3574 Void TComSlice::setDefaultRefView( 3575 { 3576 setDefaultRefViewIdx( -1);3577 setDefaultRefViewIdxAvailableFlag( false);3573 #if NH_3D_NBDV 3574 Void TComSlice::setDefaultRefView() 3575 { 3576 setDefaultRefViewIdx(-1); 3577 setDefaultRefViewIdxAvailableFlag(false); 3578 3578 3579 3579 Int valid = 0; 3580 3580 Int DefaultRefViewIdx = -1; 3581 for( UInt curViewIdx = 0; curViewIdx < getViewIndex() && valid == 0; curViewIdx++ ) 3582 { 3583 for( Int iRefListId = 0; ( iRefListId < (isInterB() ? 2 : 1) ) && !isIntra() && valid == 0; iRefListId++ ) 3584 { 3585 RefPicList eRefPicList = RefPicList( iRefListId ); 3586 Int iNumRefPics = getNumRefIdx( eRefPicList ); 3587 for( Int i = 0; i < iNumRefPics; i++ ) 3581 3582 for(UInt curViewIdx = 0; curViewIdx < getViewIndex() && valid == 0; curViewIdx++) 3583 { 3584 for(Int iRefListId = 0; (iRefListId < (isInterB() ? 2 : 1)) && !isIntra() && valid == 0; iRefListId++) 3585 { 3586 RefPicList eRefPicList = RefPicList(iRefListId); 3587 Int iNumRefPics = getNumRefIdx(eRefPicList); 3588 3589 for(Int i = 0; i < iNumRefPics; i++) 3588 3590 { 3589 if(getPOC() == getRefPic( eRefPicList, i )->getPOC() && curViewIdx == getRefPic( eRefPicList, i)->getViewIndex())3591 if(getPOC() == getRefPic(eRefPicList, i)->getPOC() && curViewIdx == getRefPic(eRefPicList, i)->getViewIndex()) 3590 3592 { 3591 3593 valid = 1; … … 3596 3598 } 3597 3599 } 3598 if( valid ) 3599 { 3600 setDefaultRefViewIdx( DefaultRefViewIdx ); 3601 setDefaultRefViewIdxAvailableFlag( true ); 3602 } 3603 } 3604 #endif 3605 3606 #if H_3D_ARP 3600 3601 if(valid) 3602 { 3603 setDefaultRefViewIdx(DefaultRefViewIdx); 3604 setDefaultRefViewIdxAvailableFlag(true); 3605 } 3606 } 3607 #endif 3608 3609 #if NH_3D_ARP 3607 3610 Void TComSlice::setARPStepNum( TComPicLists*ivPicLists ) 3608 3611 { … … 3674 3677 } 3675 3678 } 3676 } 3677 #endif 3678 3679 #if H_3D_IC 3679 if( m_nARPStepNum > 1) 3680 { 3681 for(Int i = 0; i < getNumActiveRefLayerPics(); i ++ ) 3682 { 3683 Int iLayerId = getRefPicLayerId( i ); 3684 Int iViewIdx = getVPS()->getViewIndex(iLayerId); 3685 Bool bIsDepth = ( getVPS()->getDepthId ( iLayerId ) == 1 ); 3686 if( iViewIdx<getViewIndex() && !bIsDepth ) 3687 { 3688 setBaseViewRefPicList( ivPicLists->getPicList( iLayerId ), iViewIdx ); 3689 } 3690 } 3691 } 3692 } 3693 #endif 3694 3695 #if NH_3D_IC 3680 3696 // This is an encoder only function and should be moved to TEncSlice or TEncSearch!! 3681 3697 Void TComSlice::xSetApplyIC(Bool bUseLowLatencyICEnc) … … 3766 3782 { 3767 3783 // Histogram building - luminance 3768 Int iMaxPelValue = ( 1 << g _bitDepthY);3784 Int iMaxPelValue = ( 1 << getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) ); 3769 3785 Int *aiRefOrgHist = (Int *) xMalloc( Int,iMaxPelValue ); 3770 3786 Int *aiCurrHist = (Int *) xMalloc( Int,iMaxPelValue ); … … 3772 3788 memset( aiCurrHist, 0, iMaxPelValue*sizeof(Int) ); 3773 3789 3774 Int iWidth = pcCurrPicYuv->getWidth(); 3775 Int iHeight = pcCurrPicYuv->getHeight(); 3776 3777 Pel* pCurrY = pcCurrPicYuv ->getLumaAddr(); 3778 Pel* pRefOrgY = pcRefPicYuvOrg ->getLumaAddr(); 3779 Int iCurrStride = pcCurrPicYuv->getStride(); 3780 Int iRefStride = pcRefPicYuvOrg->getStride(); 3781 3790 Int iWidth = pcCurrPicYuv->getWidth(COMPONENT_Y); 3791 Int iHeight = pcCurrPicYuv->getHeight(COMPONENT_Y); 3792 Pel* pCurrY = pcCurrPicYuv->getAddr(COMPONENT_Y); 3793 Pel* pRefOrgY = pcRefPicYuvOrg->getAddr(COMPONENT_Y); 3794 Int iCurrStride = pcCurrPicYuv->getStride(COMPONENT_Y); 3795 Int iRefStride = pcRefPicYuvOrg->getStride(COMPONENT_Y); 3782 3796 for ( Int y = 0; y < iHeight; y++ ) 3783 3797 { … … 3833 3847 setupLUT = setupLUT || getViewSynthesisPredFlag( ); 3834 3848 3835 #if H_3D_NBDV_REF3849 #if NH_3D_NBDV_REF 3836 3850 setupLUT = setupLUT || getDepthRefinementFlag( ); 3837 3851 #endif 3838 3852 3839 #if H_3D_IV_MERGE3853 #if NH_3D_IV_MERGE 3840 3854 setupLUT = setupLUT || ( getIvMvPredFlag() && getIsDepth() ); 3841 3855 #endif -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComSlice.h
r1251 r1279 2602 2602 IntAry2d m_aaiCodedOffset; 2603 2603 #endif 2604 #if H_3D_TMVP2604 #if NH_3D_TMVP 2605 2605 Int m_aiAlterRefIdx [2]; 2606 2606 #endif 2607 #if H_3D_ARP2607 #if NH_3D_ARP 2608 2608 Bool m_arpRefPicAvailable[2][MAX_NUM_LAYERS]; 2609 2609 TComList<TComPic*> * m_pBaseViewRefPicList[MAX_NUM_LAYERS]; … … 2614 2614 std::vector<Int> m_pocsInCurrRPSs; 2615 2615 #endif 2616 #if H_3D_IC2616 #if NH_3D_IC 2617 2617 Bool m_bApplyIC; 2618 2618 Bool m_icSkipParseFlag; … … 2630 2630 #endif 2631 2631 #endif 2632 #if H_3D_IC2632 #if NH_3D_IC 2633 2633 Int* m_aICEnableCandidate; 2634 2634 Int* m_aICEnableNum; … … 2718 2718 TComPic* getIvPic( Bool depthFlag, Int viewIndex) const { return m_ivPicsCurrPoc[ depthFlag ? 1 : 0 ][ viewIndex ]; } 2719 2719 TComPic* getTexturePic () { return m_ivPicsCurrPoc[0][ m_viewIndex ]; } 2720 #endif 2721 #if H_3D_IC2720 #endif 2721 #if NH_3D_IC 2722 2722 Void setApplyIC( Bool b ) { m_bApplyIC = b; } 2723 2723 Bool getApplyIC() { return m_bApplyIC; } … … 2727 2727 Bool getIcSkipParseFlag() { return m_icSkipParseFlag; } 2728 2728 #endif 2729 #if H_3D_ARP2729 #if NH_3D_ARP 2730 2730 Void setBaseViewRefPicList( TComList<TComPic*> *pListPic, Int iViewIdx ) { m_pBaseViewRefPicList[iViewIdx] = pListPic; } 2731 2731 Void setARPStepNum( TComPicLists*ivPicLists ); … … 2929 2929 Int getViewIndex () const { return m_viewIndex; } 2930 2930 #if NH_3D 2931 #if H_3D_TMVP2931 #if NH_3D_TMVP 2932 2932 Void generateAlterRefforTMVP (); 2933 2933 Void setAlterRefIdx ( RefPicList e, Int i ) { m_aiAlterRefIdx[e] = i; } 2934 2934 Int getAlterRefIdx ( RefPicList e ) { return m_aiAlterRefIdx[e]; } 2935 2935 #endif 2936 #if H_3D_ARP2936 #if NH_3D_ARP 2937 2937 Int getFirstTRefIdx ( RefPicList e ) { return m_aiFirstTRefIdx[e]; } 2938 2938 Void setFirstTRefIdx ( RefPicList e, Int i ) { m_aiFirstTRefIdx[e] = i; } … … 2966 2966 Int* getDepthToDisparityB( Int refViewIdx ) { return m_depthToDisparityB[ getVPS()->getVoiInVps( refViewIdx) ];} 2967 2967 Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ getVPS()->getVoiInVps( refViewIdx) ];} 2968 #if H_3D_IC2968 #if NH_3D_IC 2969 2969 Void setICEnableCandidate( Int* icEnableCandidate) { m_aICEnableCandidate = icEnableCandidate; } 2970 2970 Void setICEnableNum( Int* icEnableNum) { m_aICEnableNum = icEnableNum; } … … 3082 3082 Int getMpiSubPbSize ( ) { return m_mpiSubPbSize ; }; 3083 3083 Int getSubPbSize ( ) { return m_subPbSize ; }; 3084 #if NH_3D_NBDV 3085 Int getDefaultRefViewIdx() { return m_iDefaultRefViewIdx; } 3086 Void setDefaultRefViewIdx(Int iViewIdx) { m_iDefaultRefViewIdx = iViewIdx; } 3087 3088 Bool getDefaultRefViewIdxAvailableFlag() { return m_bDefaultRefViewIdxAvailableFlag; } 3089 Void setDefaultRefViewIdxAvailableFlag(Bool bViewIdx) { m_bDefaultRefViewIdxAvailableFlag = bViewIdx; } 3090 Void setDefaultRefView( ); 3091 #endif 3084 3092 #endif 3085 3093 // Inference -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComYuv.cpp
r1200 r1279 487 487 } 488 488 489 #if H_3D_ARP490 Void TComYuv::addARP( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip )491 { 492 addARPLuma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth , uiHeight , bClip );493 addARPChroma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth>>1, uiHeight>>1 , bClip );494 } 495 496 Void TComYuv::addARPLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip )489 #if NH_3D_ARP 490 Void TComYuv::addARP( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip, const BitDepths &clipBitDepths ) 491 { 492 addARPLuma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth , uiHeight , bClip , clipBitDepths); 493 addARPChroma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth>>1, uiHeight>>1 , bClip , clipBitDepths); 494 } 495 496 Void TComYuv::addARPLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip, const BitDepths &clipBitDepths ) 497 497 { 498 498 Int x, y; 499 499 500 Pel* pSrc0 = pcYuvSrc0->getLumaAddr( uiAbsPartIdx ); 501 Pel* pSrc1 = pcYuvSrc1->getLumaAddr( uiAbsPartIdx ); 502 Pel* pDst = getLumaAddr( uiAbsPartIdx ); 503 504 UInt iSrc0Stride = pcYuvSrc0->getStride(); 505 UInt iSrc1Stride = pcYuvSrc1->getStride(); 506 UInt iDstStride = getStride(); 507 Int iIFshift = IF_INTERNAL_PREC - g_bitDepthY; 500 Pel* pSrc0 = pcYuvSrc0->getAddr( COMPONENT_Y, uiAbsPartIdx ); 501 Pel* pSrc1 = pcYuvSrc1->getAddr( COMPONENT_Y, uiAbsPartIdx ); 502 Pel* pDst = getAddr( COMPONENT_Y, uiAbsPartIdx ); 503 504 UInt iSrc0Stride = pcYuvSrc0->getStride(COMPONENT_Y); 505 UInt iSrc1Stride = pcYuvSrc1->getStride(COMPONENT_Y); 506 UInt iDstStride = getStride(COMPONENT_Y); 507 const Int clipbd = clipBitDepths.recon[CHANNEL_TYPE_LUMA]; 508 Int iIFshift = IF_INTERNAL_PREC - clipbd; 508 509 Int iOffSet = ( 1 << ( iIFshift - 1 ) ) + IF_INTERNAL_OFFS; 509 510 for ( y = uiHeight-1; y >= 0; y-- ) … … 514 515 if( bClip ) 515 516 { 516 pDst[x] = ClipY( ( pDst[x] + iOffSet ) >> iIFshift);517 pDst[x] = Pel(ClipBD<Int>(Int( ( pDst[x] + iOffSet ) >> iIFshift ), clipbd)); 517 518 } 518 519 } … … 523 524 } 524 525 525 Void TComYuv::addARPChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip )526 Void TComYuv::addARPChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip, const BitDepths &clipBitDepths ) 526 527 { 527 528 Int x, y; 528 529 529 Pel* pSrcU0 = pcYuvSrc0->getCbAddr( uiAbsPartIdx ); 530 Pel* pSrcU1 = pcYuvSrc1->getCbAddr( uiAbsPartIdx ); 531 Pel* pSrcV0 = pcYuvSrc0->getCrAddr( uiAbsPartIdx ); 532 Pel* pSrcV1 = pcYuvSrc1->getCrAddr( uiAbsPartIdx ); 533 Pel* pDstU = getCbAddr( uiAbsPartIdx ); 534 Pel* pDstV = getCrAddr( uiAbsPartIdx ); 535 536 UInt iSrc0Stride = pcYuvSrc0->getCStride(); 537 UInt iSrc1Stride = pcYuvSrc1->getCStride(); 538 UInt iDstStride = getCStride(); 539 540 Int iIFshift = IF_INTERNAL_PREC - g_bitDepthC; 530 Pel* pSrcU0 = pcYuvSrc0->getAddr( COMPONENT_Cb, uiAbsPartIdx ); 531 Pel* pSrcU1 = pcYuvSrc1->getAddr( COMPONENT_Cb, uiAbsPartIdx ); 532 Pel* pSrcV0 = pcYuvSrc0->getAddr( COMPONENT_Cr, uiAbsPartIdx ); 533 Pel* pSrcV1 = pcYuvSrc1->getAddr( COMPONENT_Cr, uiAbsPartIdx ); 534 Pel* pDstU = getAddr( COMPONENT_Cb, uiAbsPartIdx ); 535 Pel* pDstV = getAddr( COMPONENT_Cr, uiAbsPartIdx ); 536 537 UInt iSrc0StrideCb = pcYuvSrc0->getStride(COMPONENT_Cb); 538 UInt iSrc1StrideCb = pcYuvSrc1->getStride(COMPONENT_Cb); 539 UInt iDstStrideCb = getStride(COMPONENT_Cb); 540 541 UInt iSrc0StrideCr = pcYuvSrc0->getStride(COMPONENT_Cr); 542 UInt iSrc1StrideCr = pcYuvSrc1->getStride(COMPONENT_Cr); 543 UInt iDstStrideCr = getStride(COMPONENT_Cr); 544 545 const Int clipbd = clipBitDepths.recon[CHANNEL_TYPE_CHROMA]; 546 Int iIFshift = IF_INTERNAL_PREC - clipbd; 541 547 Int iOffSet = ( 1 << ( iIFshift - 1 ) ) + IF_INTERNAL_OFFS; 542 548 … … 549 555 if( bClip ) 550 556 { 551 pDstU[x] = ClipC( ( pDstU[x] + iOffSet ) >> iIFshift ); 552 pDstV[x] = ClipC( ( pDstV[x] + iOffSet ) >> iIFshift ); 553 } 554 } 555 557 pDstU[x] = Pel(ClipBD<Int>( Int( ( pDstU[x] + iOffSet ) >> iIFshift ), clipbd)); 558 pDstV[x] = Pel(ClipBD<Int>( Int( ( pDstV[x] + iOffSet ) >> iIFshift ), clipbd)); 559 } 560 } 561 562 pSrcU0 += iSrc0StrideCb; 563 pSrcU1 += iSrc1StrideCb; 564 pSrcV0 += iSrc0StrideCr; 565 pSrcV1 += iSrc1StrideCr; 566 pDstU += iDstStrideCb; 567 pDstV += iDstStrideCr; 568 } 569 } 570 571 Void TComYuv::subtractARP( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight ) 572 { 573 subtractARPLuma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth , uiHeight ); 574 575 if (uiWidth > 8 && pcYuvSrc1->getNumberValidComponents() > 1) 576 { 577 subtractARPChroma( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth>>1 , uiHeight>>1 ); 578 } 579 } 580 581 Void TComYuv::subtractARPLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight ) 582 { 583 Int x, y; 584 585 Pel* pSrc0 = pcYuvSrc0->getAddr(COMPONENT_Y, uiAbsPartIdx ); 586 Pel* pSrc1 = pcYuvSrc1->getAddr(COMPONENT_Y, uiAbsPartIdx ); 587 Pel* pDst = getAddr (COMPONENT_Y, uiAbsPartIdx ); 588 589 Int iSrc0Stride = pcYuvSrc0->getStride(COMPONENT_Y); 590 Int iSrc1Stride = pcYuvSrc1->getStride(COMPONENT_Y); 591 Int iDstStride = getStride(COMPONENT_Y); 592 for ( y = uiHeight-1; y >= 0; y-- ) 593 { 594 for ( x = uiWidth-1; x >= 0; x-- ) 595 { 596 pDst[x] = pSrc0[x] - pSrc1[x]; 597 } 598 pSrc0 += iSrc0Stride; 599 pSrc1 += iSrc1Stride; 600 pDst += iDstStride; 601 } 602 } 603 604 Void TComYuv::subtractARPChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight ) 605 { 606 Int x, y; 607 608 Pel* pSrcU0 = pcYuvSrc0->getAddr(COMPONENT_Cb, uiAbsPartIdx ); 609 Pel* pSrcU1 = pcYuvSrc1->getAddr(COMPONENT_Cb, uiAbsPartIdx ); 610 Pel* pSrcV0 = pcYuvSrc0->getAddr(COMPONENT_Cr, uiAbsPartIdx ); 611 Pel* pSrcV1 = pcYuvSrc1->getAddr(COMPONENT_Cr, uiAbsPartIdx ); 612 Pel* pDstU = getAddr(COMPONENT_Cb, uiAbsPartIdx ); 613 Pel* pDstV = getAddr(COMPONENT_Cr, uiAbsPartIdx ); 614 615 Int iSrc0Stride = pcYuvSrc0->getStride(COMPONENT_Cb); 616 Int iSrc1Stride = pcYuvSrc1->getStride(COMPONENT_Cb); 617 Int iDstStride = getStride( COMPONENT_Cb ); 618 for ( y = uiHeight-1; y >= 0; y-- ) 619 { 620 for ( x = uiWidth-1; x >= 0; x-- ) 621 { 622 pDstU[x] = pSrcU0[x] - pSrcU1[x]; 623 pDstV[x] = pSrcV0[x] - pSrcV1[x]; 624 } 556 625 pSrcU0 += iSrc0Stride; 557 626 pSrcU1 += iSrc1Stride; … … 563 632 } 564 633 565 Void TComYuv::subtractARP( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight )566 {567 subtractARPLuma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth , uiHeight );568 569 if (uiWidth > 8)570 subtractARPChroma( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth>>1 , uiHeight>>1 );571 }572 573 Void TComYuv::subtractARPLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight )574 {575 Int x, y;576 577 Pel* pSrc0 = pcYuvSrc0->getLumaAddr( uiAbsPartIdx );578 Pel* pSrc1 = pcYuvSrc1->getLumaAddr( uiAbsPartIdx );579 Pel* pDst = getLumaAddr( uiAbsPartIdx );580 581 Int iSrc0Stride = pcYuvSrc0->getStride();582 Int iSrc1Stride = pcYuvSrc1->getStride();583 Int iDstStride = getStride();584 for ( y = uiHeight-1; y >= 0; y-- )585 {586 for ( x = uiWidth-1; x >= 0; x-- )587 {588 pDst[x] = pSrc0[x] - pSrc1[x];589 }590 pSrc0 += iSrc0Stride;591 pSrc1 += iSrc1Stride;592 pDst += iDstStride;593 }594 }595 596 Void TComYuv::subtractARPChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight )597 {598 Int x, y;599 600 Pel* pSrcU0 = pcYuvSrc0->getCbAddr( uiAbsPartIdx );601 Pel* pSrcU1 = pcYuvSrc1->getCbAddr( uiAbsPartIdx );602 Pel* pSrcV0 = pcYuvSrc0->getCrAddr( uiAbsPartIdx );603 Pel* pSrcV1 = pcYuvSrc1->getCrAddr( uiAbsPartIdx );604 Pel* pDstU = getCbAddr( uiAbsPartIdx );605 Pel* pDstV = getCrAddr( uiAbsPartIdx );606 607 Int iSrc0Stride = pcYuvSrc0->getCStride();608 Int iSrc1Stride = pcYuvSrc1->getCStride();609 Int iDstStride = getCStride();610 for ( y = uiHeight-1; y >= 0; y-- )611 {612 for ( x = uiWidth-1; x >= 0; x-- )613 {614 pDstU[x] = pSrcU0[x] - pSrcU1[x];615 pDstV[x] = pSrcV0[x] - pSrcV1[x];616 }617 pSrcU0 += iSrc0Stride;618 pSrcU1 += iSrc1Stride;619 pSrcV0 += iSrc0Stride;620 pSrcV1 += iSrc1Stride;621 pDstU += iDstStride;622 pDstV += iDstStride;623 }624 }625 626 634 Void TComYuv::multiplyARP( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW ) 627 635 { 628 636 multiplyARPLuma( uiAbsPartIdx , uiWidth , uiHeight , dW ); 629 637 630 if (uiWidth > 8) 638 if ( uiWidth > 8 && getNumberValidComponents() > 1 ) 639 { 631 640 multiplyARPChroma( uiAbsPartIdx , uiWidth >> 1 , uiHeight >> 1 , dW ); 641 } 632 642 } 633 643 … … 641 651 Void TComYuv::multiplyARPLuma( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW ) 642 652 { 643 Pel* pDst = get LumaAddr(uiAbsPartIdx );644 Int iDstStride = getStride( );653 Pel* pDst = getAddr(COMPONENT_Y, uiAbsPartIdx ); 654 Int iDstStride = getStride(COMPONENT_Y); 645 655 for ( Int y = uiHeight-1; y >= 0; y-- ) 646 656 { … … 652 662 Void TComYuv::multiplyARPChroma( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW ) 653 663 { 654 Pel* pDstU = get CbAddr(uiAbsPartIdx );655 Pel* pDstV = get CrAddr(uiAbsPartIdx );656 657 Int iDstStride = get CStride();664 Pel* pDstU = getAddr( COMPONENT_Cb, uiAbsPartIdx ); 665 Pel* pDstV = getAddr( COMPONENT_Cr, uiAbsPartIdx ); 666 667 Int iDstStride = getStride( COMPONENT_Cb ); 658 668 for ( Int y = uiHeight-1; y >= 0; y-- ) 659 669 { -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComYuv.h
r1200 r1279 206 206 #if NH_3D 207 207 Void addClipPartLuma( Int bitDepth, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize ); 208 #if H_3D_ARP209 Void addARP ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip );210 Void addARPLuma ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip );211 Void addARPChroma ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip );208 #if NH_3D_ARP 209 Void addARP ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip, const BitDepths &clipBitDepths ); 210 Void addARPLuma ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip, const BitDepths &clipBitDepths ); 211 Void addARPChroma ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip, const BitDepths &clipBitDepths ); 212 212 Void subtractARP ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight ); 213 213 Void subtractARPLuma ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight ); -
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TypeDef.h
r1258 r1279 67 67 #if NH_MV 68 68 #define H_MV_ENC_DEC_TRAC 1 //< CU/PU level tracking 69 #define H_MV_ENC_DEC_TRAC_FIX 1 // by SHARP 69 70 70 71 #if NH_3D 71 72 #define NH_3D_VSO 1 73 #define NH_3D_NBDV 1 74 #define NH_3D_TMVP 1 // QC_TMVP_C0047 75 // Sony_M23639 76 // H_3D_TMVP_SCALING_FIX_K0053 1 // QC/CY for K0053 77 #define NH_3D_IC 1 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060 78 // Unifying rounding offset, for IC part, JCT3V-D0135 79 // SHARP_ILLUCOMP_REFINE_E0046 80 // MTK_CLIPPING_ALIGN_IC_E0168 // To support simplify bi-prediction PU with identical motion checking, JCT3V-E0168 81 // LGE_IC_CTX_F0160 //JCT3V-F0160 82 // SEC_ONLY_TEXTURE_IC_F0151 83 // MTK_IC_FLAG_CABAC_SIMP_G0061 84 // SEC_IC_ARP_SIG_G0072, Disabling IC when ARP is enabled, option 1 in JCT3V-G0072, part 2 in JCT3V-G0121 85 // MTK_LOW_LATENCY_IC_ENCODING_H0086 Low-latency IC encoding in JCT3V-H0086 86 // MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX 1 // Remove the global variables used in JCT3V-H0086 87 // SEC_IC_NEIGHBOR_CLIP_I0080 // Clipping of neighboring sample position, JCT3V-I0080 88 // LGE_CHROMA_IC_J0050_J0034 89 90 #define NH_3D_IC_FIX 1 // Fix uninitialized value in cDtParam.bUseIC (it happened on intra block) 91 #define NH_3D_FULL_PEL_DEPTH_MAP_MV_ACC 1 // Full Pel Interpolation for Depth, HHI_FULL_PEL_DEPTH_MAP_MV_ACC 92 93 #define NH_3D_QTLPC 1 // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068 94 // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units 95 // MTK_TEX_DEP_PAR_G0055 Texture-partition-dependent depth partition. JCT3V-G0055 96 97 #define NH_3D_NBDV_REF 1 98 #define NH_3D_MLC 1 99 #define NH_3D_VSP 1 100 #define NH_3D_IV_MERGE 1 101 #define NH_3D_SPIVMP 1 102 #define NH_3D_INTEGER_MV_DEPTH 1 103 #define NH_3D_TEXT_MERGE 1 104 #define NH_3D_DBBP 1 105 #define BUF_FIX 1 106 #define NH_3D_ARP 1 // Advanced residual prediction (ARP), JCT3V-D0177 107 // QC_MTK_INTERVIEW_ARP_F0123_F0108 JCT3V-F0123; JCT3V-F0108 108 // SHARP_ARP_REF_CHECK_F0105 ARP reference picture selection and DPB check 109 // LGE_ARP_CTX_F0161 JCT3V-F0161 110 // MTK_ARP_FLAG_CABAC_SIMP_G0061 Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061 111 // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053 112 // MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085 Align the SW and WD for the bi-prediction ARP PUs by disallowing non-normative fast bi-prediction for ARP PUs, JCT3V-H0085 113 // QC_I0051_ARP_SIMP 114 // SHARP_ARP_CHROMA_I0104 115 // MTK_I0072_IVARP_SCALING_FIX 116 // 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 117 // SEC_ARP_REM_ENC_RESTRICT_K0035 Removal of encoder restriction of ARP, JCT3V-K0035 118 72 119 #define NH_3D_DMM 1 // Depth modeling modes 73 120 #define NH_3D_DLT 1 // Depth Lookup Table … … 108 155 // MTK_TEXTURE_MRGCAND_BUGFIX_E0182 Bug fix for TEXTURE MERGING CANDIDATE , JCT3V-E0182 109 156 // LGE_SIMP_DISP_AVAIL_J0041 // Use 2 status for disparity availability - DISP_AVAILABLE and DISP_NONE 110 #define H_3D_ARP 1 // Advanced residual prediction (ARP), JCT3V-D0177111 // QC_MTK_INTERVIEW_ARP_F0123_F0108 JCT3V-F0123; JCT3V-F0108112 // SHARP_ARP_REF_CHECK_F0105 ARP reference picture selection and DPB check113 // LGE_ARP_CTX_F0161 JCT3V-F0161114 // MTK_ARP_FLAG_CABAC_SIMP_G0061 Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061115 // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053116 // MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085 Align the SW and WD for the bi-prediction ARP PUs by disallowing non-normative fast bi-prediction for ARP PUs, JCT3V-H0085117 // QC_I0051_ARP_SIMP118 // SHARP_ARP_CHROMA_I0104119 // MTK_I0072_IVARP_SCALING_FIX120 // 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 item1121 // SEC_ARP_REM_ENC_RESTRICT_K0035 Removal of encoder restriction of ARP, JCT3V-K0035122 157 #define H_3D_IC 1 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060 123 158 // Unifying rounding offset, for IC part, JCT3V-D0135 … … 133 168 // SEC_IC_NEIGHBOR_CLIP_I0080 // Clipping of neighboring sample position, JCT3V-I0080 134 169 // LGE_CHROMA_IC_J0050_J0034 135 #if H_3D_NBDV170 #if NH_3D_NBDV 136 171 #define H_3D_NBDV_REF 1 // Depth oriented neighboring block disparity derivation 137 172 // MTK_D0156 … … 237 272 // LGE_INTER_SDC_E0156 Enable inter SDC for depth coding 238 273 // SEC_INTER_SDC_G0101 Improved inter SDC with multiple DC candidates 274 #define H_3D_INTER_SDC_FIX 1 239 275 #define H_3D_SPIVMP 1 // H_3D_SPIVMP JCT3V-F0110: Sub-PU level inter-view motion prediction 240 276 // SEC_SPIVMP_MCP_SIZE_G0077, Apply SPIVMP only to 2Nx2N partition, JCT3V-G0077 … … 298 334 #endif 299 335 //// ****** NEIGHBOURING BLOCK-BASED DISPARITY VECTOR ********* 300 #if H_3D_NBDV336 #if NH_3D_NBDV 301 337 #define DVFROM_LEFT 0 302 338 #define DVFROM_ABOVE 1 … … 304 340 #endif 305 341 ///// ***** ADVANCED INTERVIEW RESIDUAL PREDICTION ********* 306 #if H_3D_ARP342 #if NH_3D_ARP 307 343 #define H_3D_ARP_WFNR 3 308 344 #endif … … 320 356 /// GT: Move values which are not flags to CommonDef.h and convert to static int !! 321 357 /////////////////////////////////////////////////////////////////////////////////// 322 ///// ***** VIEW SYNTHESIS PREDICTION *********323 #if H_3D_VSP324 #define H_3D_VSP_BLOCKSIZE 4 // Supported values: 1, 2, and 4325 #if H_3D_VSP_BLOCKSIZE == 1326 #define H_3D_VSP_CONSTRAINED 1 // Constrained VSP @ 1x1327 #else328 #define H_3D_VSP_CONSTRAINED 0329 #endif330 #endif331 358 ///// ***** ILLUMATION COMPENSATION ********* 332 #if H_3D_IC359 #if NH_3D_IC 333 360 #define IC_REG_COST_SHIFT 7 334 361 #define IC_CONST_SHIFT 5 … … 337 364 #endif 338 365 ///// ***** DEPTH BASED BLOCK PARTITIONING ********* 339 #if H_3D_DBBP366 #if NH_3D_DBBP 340 367 #define DBBP_INVALID_SHORT (-4) 341 368 #define DBBP_PACK_MODE SIZE_2NxN … … 721 748 MD_ABOVE_LEFT ///< MVP of above left block 722 749 }; 723 #if H_3D750 #if NH_3D_MLC 724 751 enum DefaultMergCandOrder 725 752 { … … 734 761 MRG_A0, ///< Left bottom 735 762 MRG_B2, ///< Above left 736 MRG_IVSHIFT, ///< Shifted IVMC o fShifted IVDC. (These are mutually exclusive)763 MRG_IVSHIFT, ///< Shifted IVMC or Shifted IVDC. (These are mutually exclusive) 737 764 MRG_COL ///< Temporal co-located 738 765 }; -
branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/SyntaxElementParser.cpp
r1200 r1279 63 63 if ( !g_disableNumbering ) 64 64 { 65 #endif 66 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 67 #if H_MV_ENC_DEC_TRAC 68 } 65 incSymbolCounter(); 66 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter ); 67 } 68 #else 69 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 69 70 #endif 70 71 if (length < 10) … … 93 94 if ( !g_disableNumbering ) 94 95 { 95 #endif 96 incSymbolCounter(); 97 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter ); 98 } 99 #else 96 100 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 97 #if H_MV_ENC_DEC_TRAC98 }99 101 #endif 100 102 fprintf( g_hTrace, "%-50s ue(v) : %u\n", pSymbolName, rValue ); … … 115 117 } 116 118 if ( !g_disableNumbering ) 117 { 118 #endif 119 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 120 #if H_MV_ENC_DEC_TRAC 121 } 119 { 120 incSymbolCounter(); 121 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter ); 122 } 123 #else 124 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 122 125 #endif 123 126 fprintf( g_hTrace, "%-50s se(v) : %d\n", pSymbolName, rValue ); … … 139 142 if ( !g_disableNumbering ) 140 143 { 141 #endif 144 incSymbolCounter(); 145 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter ); 146 } 147 #else 142 148 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 143 #if H_MV_ENC_DEC_TRAC144 }145 149 #endif 146 150 fprintf( g_hTrace, "%-50s u(1) : %d\n", pSymbolName, rValue ); -
branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1258 r1279 2773 2773 } 2774 2774 2775 #if H_3D_IC2775 #if NH_3D_IC 2776 2776 else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) 2777 2777 && !pcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 … … 2786 2786 if ( uiCodeTmp ) 2787 2787 { 2788 READ_FLAG ( uiCodeTmp, " ic_skip_mergeidx0" );2788 READ_FLAG ( uiCodeTmp, "slice_ic_disabled_merge_zero_idx_flag" ); 2789 2789 pcSlice->setIcSkipParseFlag( uiCodeTmp ); 2790 2790 } … … 2795 2795 { 2796 2796 READ_UVLC( uiCode, "five_minus_max_num_merge_cand"); 2797 #if H_3D_IV_MERGE2797 #if NH_3D_IV_MERGE 2798 2798 pcSlice->setMaxNumMergeCand(( ( pcSlice->getMpiFlag() || pcSlice->getIvMvPredFlag() || pcSlice->getViewSynthesisPredFlag() ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode); 2799 2799 #else … … 3366 3366 } 3367 3367 3368 #if H_3D_ARP3368 #if NH_3D_ARP 3369 3369 Void TDecCavlc::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 3370 3370 { … … 3372 3372 } 3373 3373 #endif 3374 #if H_3D_IC3374 #if NH_3D_IC 3375 3375 Void TDecCavlc::parseICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 3376 3376 { … … 3385 3385 3386 3386 #endif 3387 #if H_3D_DBBP3387 #if NH_3D_DBBP 3388 3388 Void TDecCavlc::parseDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 3389 3389 { -
branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecCAVLC.h
r1258 r1279 117 117 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 118 118 Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex ); 119 #if H_3D_ARP119 #if NH_3D_ARP 120 120 Void parseARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 121 121 #endif 122 #if H_3D_IC122 #if NH_3D_IC 123 123 Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 124 124 #endif … … 129 129 Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 130 130 #endif 131 #if H_3D_DBBP131 #if NH_3D_DBBP 132 132 Void parseDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 133 133 #endif -
branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecCu.cpp
r1258 r1279 52 52 m_ppcYuvReco = NULL; 53 53 m_ppcCU = NULL; 54 #if H_3D_DBBP54 #if NH_3D_DBBP 55 55 m_ppcYuvRecoDBBP = NULL; 56 56 #endif … … 81 81 m_ppcYuvReco = new TComYuv*[m_uiMaxDepth-1]; 82 82 m_ppcCU = new TComDataCU*[m_uiMaxDepth-1]; 83 #if H_3D_DBBP83 #if NH_3D_DBBP 84 84 m_ppcYuvRecoDBBP = new TComYuv*[m_uiMaxDepth-1]; 85 85 #endif … … 95 95 m_ppcYuvReco[ui] = new TComYuv; m_ppcYuvReco[ui]->create( uiWidth, uiHeight, chromaFormatIDC ); 96 96 m_ppcCU [ui] = new TComDataCU; m_ppcCU [ui]->create( chromaFormatIDC, uiNumPartitions, uiWidth, uiHeight, true, uiMaxWidth >> (m_uiMaxDepth - 1) ); 97 #if H_3D_DBBP98 m_ppcYuvRecoDBBP[ui] = new TComYuv; m_ppcYuvRecoDBBP[ui]->create( uiWidth, uiHeight );97 #if NH_3D_DBBP 98 m_ppcYuvRecoDBBP[ui] = new TComYuv; m_ppcYuvRecoDBBP[ui]->create( uiWidth, uiHeight, chromaFormatIDC ); 99 99 #endif 100 100 } … … 119 119 m_ppcYuvReco[ui]->destroy(); delete m_ppcYuvReco[ui]; m_ppcYuvReco[ui] = NULL; 120 120 m_ppcCU [ui]->destroy(); delete m_ppcCU [ui]; m_ppcCU [ui] = NULL; 121 #if H_3D_DBBP121 #if NH_3D_DBBP 122 122 m_ppcYuvRecoDBBP[ui]->destroy(); delete m_ppcYuvRecoDBBP[ui]; m_ppcYuvRecoDBBP[ui] = NULL; 123 123 #endif … … 127 127 delete [] m_ppcYuvReco; m_ppcYuvReco = NULL; 128 128 delete [] m_ppcCU ; m_ppcCU = NULL; 129 #if H_3D_DBBP129 #if NH_3D_DBBP 130 130 delete [] m_ppcYuvRecoDBBP; m_ppcYuvRecoDBBP = NULL; 131 131 #endif … … 152 152 setIsChromaQpAdjCoded(true); 153 153 } 154 154 155 155 // start from the top level CU 156 156 xDecodeCU( pCtu, 0, 0, isLastCtuOfSliceSegment); … … 163 163 Void TDecCu::decompressCtu( TComDataCU* pCtu ) 164 164 { 165 #if ! H_3D_IV_MERGE165 #if !NH_3D_IV_MERGE 166 166 xDecompressCU( pCtu, 0, 0 ); 167 167 #endif … … 283 283 pcCU->setQPSubParts( pcCU->getRefQP(uiAbsPartIdx), uiAbsPartIdx, uiDepth ); // set QP to default QP 284 284 } 285 #if H_3D_NBDV285 #if NH_3D_NBDV 286 286 DisInfo DvInfo; 287 287 DvInfo.m_acNBDV.setZero(); 288 288 DvInfo.m_aVIdxCan = 0; 289 #if H_3D_NBDV_REF289 #if NH_3D_NBDV_REF 290 290 DvInfo.m_acDoNBDV.setZero(); 291 291 #endif … … 293 293 if(!pcCU->getSlice()->isIntra()) 294 294 { 295 #if H_3D_ARP && H_3D_IV_MERGE296 if( pcCU->getSlice()->getIvResPredFlag() || pcCU->getSlice()->getIvMvPredFlag() )295 #if NH_3D_ARP && NH_3D_IV_MERGE && NH_3D_VSP 296 if( pcCU->getSlice()->getIvResPredFlag() || pcCU->getSlice()->getIvMvPredFlag() || pcCU->getSlice()->getViewSynthesisPredFlag() ) 297 297 #else 298 #if NH_3D_IV_MERGE && NH_3D_VSP 299 if( pcCU->getSlice()->getIvMvPredFlag() || pcCU->getSlice()->getViewSynthesisPredFlag() ) 300 #else 301 #if NH_3D_ARP && NH_3D_VSP 302 if( pcCU->getSlice()->getIvResPredFlag() || pcCU->getSlice()->getViewSynthesisPredFlag() ) 303 #else 304 #if NH_3D_VSP 305 if( pcCU->getSlice()->getViewSynthesisPredFlag() ) 306 #else 298 307 #if H_3D_ARP 299 if( pcCU->getSlice()->get VPS()->getUseAdvRP(pcCU->getSlice()->getLayerId()) )308 if( pcCU->getSlice()->getIvResPredFlag( ) ) 300 309 #else 301 310 #if H_3D_IV_MERGE 302 311 if( pcCU->getSlice()->getVPS()->getIvMvPredFlag(pcCU->getSlice()->getLayerId()) ) 303 312 #else 313 #if NH_3D_DBBP 314 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() ) 315 #else 304 316 if (0) 305 317 #endif 306 318 #endif 307 319 #endif 308 { 309 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0, true ); 310 m_ppcCU[uiDepth]->copyDVInfoFrom( pcCU, uiAbsPartIdx); 320 #endif 321 #endif 322 #endif 323 #endif 324 { 325 m_ppcCU[uiDepth]->copyInterPredInfoFrom(pcCU, uiAbsPartIdx, REF_PIC_LIST_0, true); 326 m_ppcCU[uiDepth]->copyDVInfoFrom(pcCU, uiAbsPartIdx); 311 327 PartSize ePartTemp = m_ppcCU[uiDepth]->getPartitionSize(0); 312 328 UChar cWidTemp = m_ppcCU[uiDepth]->getWidth(0); 313 329 UChar cHeightTemp = m_ppcCU[uiDepth]->getHeight(0); 314 m_ppcCU[uiDepth]->setWidth ( 0, pcCU->getSlice()->getSPS()->getMaxCUWidth ()/(1<<uiDepth));315 m_ppcCU[uiDepth]->setHeight ( 0, pcCU->getSlice()->getSPS()->getMaxCUHeight()/(1<<uiDepth));316 m_ppcCU[uiDepth]->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth);317 #if H_3D_IV_MERGE330 m_ppcCU[uiDepth]->setWidth (0, pcCU->getSlice()->getSPS()->getMaxCUWidth () / (1 << uiDepth)); 331 m_ppcCU[uiDepth]->setHeight(0, pcCU->getSlice()->getSPS()->getMaxCUHeight() / (1 << uiDepth)); 332 m_ppcCU[uiDepth]->setPartSizeSubParts(SIZE_2Nx2N, 0, uiDepth); 333 #if NH_3D_IV_MERGE 318 334 if( pcCU->getSlice()->getIsDepth()) 319 335 { … … 323 339 { 324 340 #endif 325 #if H_3D_NBDV_REF341 #if NH_3D_NBDV_REF 326 342 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() ) //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done. 327 343 { … … 333 349 m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo); 334 350 } 335 #if H_3D_IV_MERGE351 #if NH_3D_IV_MERGE 336 352 } 337 353 #endif … … 346 362 } 347 363 #endif 348 349 364 pcCU->setDvInfoSubParts(DvInfo, uiAbsPartIdx, uiDepth); 350 m_ppcCU[uiDepth]->setPartSizeSubParts( ePartTemp, 0, uiDepth);351 m_ppcCU[uiDepth]->setWidth ( 0, cWidTemp);352 m_ppcCU[uiDepth]->setHeight ( 0, cHeightTemp);365 m_ppcCU[uiDepth]->setPartSizeSubParts(ePartTemp, 0, uiDepth); 366 m_ppcCU[uiDepth]->setWidth(0, cWidTemp); 367 m_ppcCU[uiDepth]->setHeight(0, cHeightTemp); 353 368 } 354 369 } … … 381 396 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 ); 382 397 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 ); 383 #if H_3D_IV_MERGE398 #if NH_3D_IV_MERGE 384 399 m_ppcCU[uiDepth]->copyDVInfoFrom(pcCU, uiAbsPartIdx); 400 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists 401 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM]; 402 #else 403 #if NH_3D_MLC 385 404 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists 386 405 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM]; … … 389 408 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS]; 390 409 #endif 410 #endif 391 411 Int numValidMergeCand = 0; 392 412 for( UInt ui = 0; ui < m_ppcCU[uiDepth]->getSlice()->getMaxNumMergeCand(); ++ui ) … … 396 416 m_pcEntropyDecoder->decodeMergeIndex( pcCU, 0, uiAbsPartIdx, uiDepth ); 397 417 UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx); 398 #if H_3D_ARP418 #if NH_3D_ARP 399 419 m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth ); 400 420 #endif 401 #if H_3D_IC421 #if NH_3D_IC 402 422 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 403 423 #endif 404 424 405 #if H_3D_VSP 425 426 #if NH_3D_VSP 406 427 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 407 428 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 408 #if H_3D_SPIVMP 429 #endif 430 #if NH_3D_SPIVMP 409 431 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 410 432 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 411 433 TComMvField* pcMvFieldSP; 412 434 UChar* puhInterDirSP; 413 pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2]; 414 puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()]; 415 #endif 435 pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2]; 436 puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()]; 437 #endif 438 439 #if NH_3D_MLC 416 440 m_ppcCU[uiDepth]->initAvailableFlags(); 441 #endif 417 442 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 443 #if NH_3D_MLC 418 444 m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 419 #if H_3D_SPIVMP445 #if NH_3D_SPIVMP 420 446 , pcMvFieldSP, puhInterDirSP 421 447 #endif 422 448 , numValidMergeCand, uiMergeIndex ); 423 449 424 m_ppcCU[uiDepth]->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 425 #if H_3D_SPIVMP 450 m_ppcCU[uiDepth]->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours 451 #if NH_3D_VSP 452 , vspFlag 453 #endif 454 #if NH_3D_SPIVMP 426 455 , bSPIVMPFlag 427 456 #endif 428 457 , numValidMergeCand ); 458 #endif 459 #if NH_3D_VSP 429 460 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 430 #else 431 #if H_3D 432 m_ppcCU[uiDepth]->initAvailableFlags(); 433 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 434 m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 435 #else 436 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 437 #endif 438 #endif 461 #endif 462 439 463 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 440 464 … … 448 472 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 449 473 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 450 #if H_3D_VSP474 #if NH_3D_VSP 451 475 if( pcCU->getVSPFlag( uiAbsPartIdx ) != 0 ) 452 476 { … … 481 505 } 482 506 } 483 #if H_3D_SPIVMP507 #if NH_3D_SPIVMP 484 508 pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 485 509 if (bSPIVMPFlag[uiMergeIndex]) … … 506 530 507 531 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, isLastCtuOfSliceSegment ); 508 #if H_3D_IV_MERGE532 #if NH_3D_IV_MERGE 509 533 xDecompressCU(pcCU, uiAbsPartIdx, uiDepth ); 510 534 #endif … … 531 555 #endif 532 556 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, isLastCtuOfSliceSegment ); 533 #if H_3D_IV_MERGE557 #if NH_3D_IV_MERGE 534 558 xDecompressCU(pcCU, uiAbsPartIdx, uiDepth ); 535 559 #endif … … 551 575 #endif 552 576 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, isLastCtuOfSliceSegment ); 553 #if H_3D_IV_MERGE577 #if NH_3D_IV_MERGE 554 578 xDecompressCU(pcCU, uiAbsPartIdx, uiDepth ); 555 579 #endif … … 574 598 { 575 599 TComPic* pcPic = pCtu->getPic(); 576 #if ! H_3D_IV_MERGE600 #if !NH_3D_IV_MERGE 577 601 TComSlice * pcSlice = pCtu->getSlice(); 578 602 const TComSPS &sps=*(pcSlice->getSPS()); … … 617 641 { 618 642 case MODE_INTER: 619 #if H_3D_DBBP643 #if NH_3D_DBBP 620 644 if( m_ppcCU[uiDepth]->getDBBPFlag(0) ) 621 645 { … … 637 661 } 638 662 #endif 639 #if H_3D_DBBP663 #if NH_3D_DBBP 640 664 } 641 665 #endif … … 852 876 #endif 853 877 854 #if H_3D_DBBP878 #if NH_3D_DBBP 855 879 Void TDecCu::xReconInterDBBP( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 856 880 { … … 858 882 AOF(!pcCU->getSlice()->isIntra()); 859 883 PartSize ePartSize = pcCU->getPartitionSize( 0 ); 884 885 Int bitDepthY = pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA); 860 886 861 887 // get collocated depth block … … 878 904 879 905 // first, extract the two sets of motion parameters 880 UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMax CUDepth() - uiDepth ) << 1 ) ) >> 4;906 UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxTotalCUDepth() - uiDepth ) << 1 ) ) >> 4; 881 907 for( UInt uiSegment = 0; uiSegment < 2; uiSegment++ ) 882 908 { … … 884 910 885 911 pDBBPTmpData->auhInterDir[uiSegment] = pcCU->getInterDir(uiPartAddr); 912 assert( pDBBPTmpData->auhInterDir[uiSegment] == 1 || pDBBPTmpData->auhInterDir[uiSegment] == 2 ); // only uni-prediction allowed 886 913 887 914 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) … … 891 918 } 892 919 920 #if H_3D 893 921 AOF( pcCU->getARPW(uiPartAddr) == 0 ); 894 922 AOF( pcCU->getICFlag(uiPartAddr) == false ); 895 923 AOF( pcCU->getSPIVMPFlag(uiPartAddr) == false ); 896 924 AOF( pcCU->getVSPFlag(uiPartAddr) == 0 ); 925 #endif 897 926 } 898 927 … … 934 963 935 964 // reconstruct final prediction signal by combining both segments 936 m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0), 0, ePartSize );965 m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0), 0, ePartSize, bitDepthY); 937 966 938 967 // inter recon 939 xDecodeInterTexture( pcCU, 0,uiDepth );968 xDecodeInterTexture( pcCU, uiDepth ); 940 969 941 970 // clip for only non-zero cbp case 942 if ( ( pcCU->getCbf( 0, TEXT_LUMA ) ) || ( pcCU->getCbf( 0, TEXT_CHROMA_U ) ) || ( pcCU->getCbf(0, TEXT_CHROMA_V) ) )943 { 944 m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ) );971 if ( ( pcCU->getCbf( 0, COMPONENT_Y ) ) || ( pcCU->getCbf( 0, COMPONENT_Cb ) ) || ( pcCU->getCbf(0, COMPONENT_Cr ) ) ) 972 { 973 m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ), pcCU->getSlice()->getSPS()->getBitDepths() ); 945 974 } 946 975 else -
branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecCu.h
r1258 r1279 62 62 TComDataCU** m_ppcCU; ///< CU data array 63 63 64 #if H_3D_DBBP64 #if NH_3D_DBBP 65 65 TComYuv** m_ppcYuvRecoDBBP; 66 66 #endif … … 102 102 Void xReconInter ( TComDataCU* pcCU, UInt uiDepth ); 103 103 104 #if H_3D_DBBP104 #if NH_3D_DBBP 105 105 Void xReconInterDBBP ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 106 106 #endif -
branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecEntropy.cpp
r1258 r1279 104 104 } 105 105 106 #if H_3D_ARP106 #if NH_3D_ARP 107 107 Void TDecEntropy::decodeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 108 108 { … … 123 123 #endif 124 124 125 #if H_3D_IC125 #if NH_3D_IC 126 126 Void TDecEntropy::decodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 127 127 { 128 128 pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 129 129 130 #if NH_3D_ARP 130 131 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() || pcCU->getARPW( uiAbsPartIdx ) > 0 ) 132 #else 133 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() ) 134 #endif 131 135 { 132 136 return; … … 234 238 UInt uiNumPU = ( ePartSize == SIZE_2Nx2N ? 1 : ( ePartSize == SIZE_NxN ? 4 : 2 ) ); 235 239 UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxTotalCUDepth() - uiDepth ) << 1 ) ) >> 4; 236 #if H_3D_IV_MERGE 240 //#if H_3D_IV_MERGE 241 #if NH_3D_MLC 237 242 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists 238 243 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM]; … … 241 246 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS]; 242 247 #endif 243 #if H_3D_SPIVMP248 #if NH_3D_SPIVMP 244 249 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 245 TComMvField* pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition ()*2];246 UChar* puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition ()];247 #endif 248 #if H_3D_IV_MERGE250 TComMvField* pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2]; 251 UChar* puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()]; 252 #endif 253 #if NH_3D_IV_MERGE 249 254 pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx); 250 255 #endif … … 258 263 pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 ); 259 264 pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 ); 260 #if H_3D265 #if NH_3D 261 266 for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset ) 262 267 { … … 290 295 291 296 ////// Parse CUs extension syntax 297 #if NH_3D_DBBP 292 298 decodeDBBPFlag( pcCU, uiAbsPartIdx, uiDepth ); 293 decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth ); 294 295 #if H_3D_ARP 299 #endif 300 //decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth ); 301 302 #if NH_3D_ARP 296 303 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth ); 297 304 #endif 298 #if H_3D_IC305 #if NH_3D_IC 299 306 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 300 307 #endif … … 306 313 { 307 314 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 308 #if H_3D_DBBP 315 #if ENVIRONMENT_VARIABLE_DEBUG_AND_TEST 316 if (bDebugPredEnabled) 317 { 318 std::cout << "Coded merge flag, CU absPartIdx: " << uiAbsPartIdx << " PU(" << uiPartIdx << ") absPartIdx: " << uiSubPartIdx; 319 std::cout << " merge index: " << (UInt)pcCU->getMergeIndex(uiSubPartIdx) << std::endl; 320 } 321 #endif 322 323 #if NH_3D_DBBP 309 324 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false ) 310 325 #else … … 312 327 #endif 313 328 { 314 pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 315 if ( !isMerged ) 316 { 317 #if H_3D_VSP 329 if ( !hasMergedCandList ) 330 { 331 pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); // temporarily set. 332 333 #if NH_3D_MLC 334 #if NH_3D_VSP 318 335 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 319 336 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 320 #if H_3D_SPIVMP 337 #endif 338 #if NH_3D_SPIVMP 321 339 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 322 340 #endif 323 341 pcSubCU->initAvailableFlags(); 324 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 342 #endif 343 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 344 #if NH_3D_MLC 325 345 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 326 #if H_3D_SPIVMP346 #if NH_3D_SPIVMP 327 347 , pcMvFieldSP, puhInterDirSP 328 348 #endif 329 349 , numValidMergeCand ); 330 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 331 #if H_3D_SPIVMP 350 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours 351 #if NH_3D_VSP 352 , vspFlag 353 #endif 354 #if NH_3D_SPIVMP 332 355 , bSPIVMPFlag 333 356 #endif 334 357 , numValidMergeCand ); 358 #if NH_3D_VSP 335 359 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 336 337 #else 338 #if H_3D 339 pcSubCU->initAvailableFlags(); 340 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 341 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 342 343 #else 344 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 345 #endif 346 #endif 347 isMerged = true; 348 } 349 pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth ); 360 #endif 361 #endif 362 pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth ); // restore. 363 hasMergedCandList = true; 364 } 350 365 } 351 366 else 352 367 { 353 uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 354 #if H_3D_VSP368 #if NH_3D_MLC 369 #if NH_3D_VSP 355 370 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 356 371 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 357 #if H_3D_SPIVMP 372 #endif 373 #if NH_3D_SPIVMP 358 374 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 359 375 #endif 360 376 pcSubCU->initAvailableFlags(); 377 #endif 361 378 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 379 #if NH_3D_MLC 362 380 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours 363 #if H_3D_SPIVMP381 #if NH_3D_SPIVMP 364 382 , pcMvFieldSP, puhInterDirSP 365 383 #endif 366 384 ,numValidMergeCand, uiMergeIndex ); 367 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 368 #if H_3D_SPIVMP 385 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours 386 #if NH_3D_VSP 387 , vspFlag 388 #endif 389 #if NH_3D_SPIVMP 369 390 , bSPIVMPFlag 370 391 #endif 371 392 ,numValidMergeCand ); 393 #if NH_3D_VSP 372 394 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 373 #else374 #if H_3D375 pcSubCU->initAvailableFlags();376 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );377 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );378 #else379 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );380 395 #endif 381 396 #endif … … 385 400 TComMv cTmpMv( 0, 0 ); 386 401 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 387 { 402 { 388 403 if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 ) 389 404 { … … 392 407 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 393 408 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 394 #if H_3D_VSP395 #if H_3D_DBBP409 #if NH_3D_VSP 410 #if NH_3D_DBBP 396 411 if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) ) 397 412 #else … … 412 427 } 413 428 } 414 #if H_3D_SPIVMP429 #if NH_3D_SPIVMP 415 430 pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 416 431 if (bSPIVMPFlag[uiMergeIndex] != 0) … … 443 458 { 444 459 decodeMvsAMVP ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) ); 460 #if ENVIRONMENT_VARIABLE_DEBUG_AND_TEST 461 if (bDebugPredEnabled) 462 { 463 std::cout << "refListIdx: " << uiRefListIdx << std::endl; 464 std::cout << "MVD horizontal: " << pcCU->getCUMvField(RefPicList(uiRefListIdx))->getMvd( uiAbsPartIdx ).getHor() << std::endl; 465 std::cout << "MVD vertical: " << pcCU->getCUMvField(RefPicList(uiRefListIdx))->getMvd( uiAbsPartIdx ).getVer() << std::endl; 466 std::cout << "MVPIdxPU: " << pcCU->getMVPIdx(RefPicList( uiRefListIdx ), uiSubPartIdx) << std::endl; 467 std::cout << "InterDir: " << (UInt)pcCU->getInterDir(uiSubPartIdx) << std::endl; 468 } 469 #endif 445 470 } 446 471 } … … 474 499 } 475 500 #endif 501 #if NH_3D_IC 502 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 503 #endif 476 504 477 505 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); … … 481 509 { 482 510 pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); // temporarily set. 511 512 #if NH_3D_MLC 513 #if NH_3D_VSP 514 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 515 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 516 #endif 517 #if NH_3D_SPIVMP 518 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 519 #endif 520 pcSubCU->initAvailableFlags(); 521 #endif 483 522 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 523 #if NH_3D_MLC 524 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 525 #if NH_3D_SPIVMP 526 , pcMvFieldSP, puhInterDirSP 527 #endif 528 , numValidMergeCand ); 529 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours 530 #if NH_3D_VSP 531 , vspFlag 532 #endif 533 #if NH_3D_SPIVMP 534 , bSPIVMPFlag 535 #endif 536 , numValidMergeCand ); 537 #if NH_3D_VSP 538 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 539 #endif 540 #endif 484 541 pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth ); // restore. 485 542 hasMergedCandList = true; … … 489 546 { 490 547 uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 548 549 #if NH_3D_MLC 550 #if NH_3D_VSP 551 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 552 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 553 #endif 554 #if NH_3D_SPIVMP 555 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 556 #endif 557 pcSubCU->initAvailableFlags(); 558 #endif 491 559 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 560 #if NH_3D_MLC 561 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours 562 #if NH_3D_SPIVMP 563 , pcMvFieldSP, puhInterDirSP 564 #endif 565 ,numValidMergeCand, uiMergeIndex ); 566 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours 567 #if NH_3D_VSP 568 , vspFlag 569 #endif 570 #if NH_3D_SPIVMP 571 , bSPIVMPFlag 572 #endif 573 ,numValidMergeCand ); 574 #if NH_3D_VSP 575 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 576 #endif 577 #endif 492 578 } 493 579 … … 503 589 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 504 590 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 505 506 } 507 } 591 #if NH_3D_VSP 592 if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 ) 593 { 594 if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) ) 595 { 596 UInt dummy; 597 Int vspSize; 598 Int width, height; 599 pcCU->getPartIndexAndSize( uiPartIdx, dummy, width, height, uiSubPartIdx, pcCU->getTotalNumPart()==256 ); 600 pcCU->setMvFieldPUForVSP( pcCU, uiSubPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize ); 601 pcCU->setVSPFlag( uiSubPartIdx, vspSize ); 602 } 603 } 604 #endif 605 } 606 } 607 #if NH_3D_SPIVMP 608 pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 609 if (bSPIVMPFlag[uiMergeIndex] != 0) 610 { 611 Int iWidth, iHeight; 612 UInt uiIdx; 613 pcCU->getPartIndexAndSize( uiPartIdx, uiIdx, iWidth, iHeight, uiSubPartIdx, true ); 614 615 UInt uiSPAddr; 616 617 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; 618 619 pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight); 620 621 for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++) 622 { 623 pcCU->getSPAbsPartIdx(uiSubPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr); 624 pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight); 625 pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight); 626 pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight); 627 } 628 } 629 #endif 508 630 } 509 631 else … … 529 651 } 530 652 } 653 #if NH_3D_IC 654 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 655 #endif 531 656 } 532 657 … … 539 664 } 540 665 #endif 541 #if H_3D_SPIVMP666 #if NH_3D_SPIVMP 542 667 delete[] pcMvFieldSP; 543 668 delete[] puhInterDirSP; … … 607 732 } 608 733 609 #if H_3D734 #if NH_3D 610 735 Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ) 611 736 { … … 1061 1186 } 1062 1187 #endif 1063 #if H_3D_DBBP1188 #if NH_3D_DBBP 1064 1189 Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1065 1190 { -
branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecEntropy.h
r1258 r1279 83 83 virtual Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ) = 0; 84 84 virtual Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex ) = 0; 85 #if H_3D_ARP85 #if NH_3D_ARP 86 86 virtual Void parseARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 87 87 #endif 88 #if H_3D_IC88 #if NH_3D_IC 89 89 virtual Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 90 90 #endif … … 95 95 virtual Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 96 96 #endif 97 #if H_3D_DBBP97 #if NH_3D_DBBP 98 98 virtual Void parseDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 99 99 #endif … … 145 145 Void decodeMvdPU ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ); 146 146 Void decodeMVPIdxPU ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ); 147 #if H_3D147 #if NH_3D 148 148 Void decodeMvsAMVP ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, 149 149 RefPicList eRefList ); … … 174 174 Void decodePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 175 175 176 #if H_3D_ARP176 #if NH_3D_ARP 177 177 Void decodeARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 178 178 #endif 179 #if H_3D_IC179 #if NH_3D_IC 180 180 Void decodeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 181 181 #endif … … 184 184 Void decodeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 185 185 #endif 186 #if H_3D_DBBP186 #if NH_3D_DBBP 187 187 Void decodeDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 188 188 #endif -
branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecGop.cpp
r1200 r1279 122 122 } 123 123 124 #if H_3D_NBDV124 #if NH_3D_NBDV 125 125 if(pcSlice->getViewIndex() && !pcSlice->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done. 126 126 { 127 Int iColPoc = pcSlice->getRefPOC(RefPicList(1 -pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx());128 rpcPic->setNumDdvCandPics(rpcPic->getDisCandRefPictures(iColPoc));127 Int iColPoc = pcSlice->getRefPOC(RefPicList(1 - pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx()); 128 pcPic->setNumDdvCandPics(pcPic->getDisCandRefPictures(iColPoc)); 129 129 } 130 130 131 131 if(pcSlice->getViewIndex() && !pcSlice->getIsDepth() && !pcSlice->isIntra()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done. 132 132 { 133 rpcPic->checkTemporalIVRef();133 pcPic->checkTemporalIVRef(); 134 134 } 135 135 136 136 if(pcSlice->getIsDepth()) 137 137 { 138 rpcPic->checkTextureRef();138 pcPic->checkTextureRef(); 139 139 } 140 140 #endif -
branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecSbac.cpp
r1258 r1279 73 73 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 74 74 , m_cCUMergeIdxExtSCModel ( 1, 1, NUM_MERGE_IDX_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 75 #if H_3D_ARP75 #if NH_3D_ARP 76 76 , m_cCUPUARPWSCModel ( 1, 1, NUM_ARPW_CTX , m_contextModels + m_numContextModels, m_numContextModels) 77 77 #endif 78 #if H_3D_IC78 #if NH_3D_IC 79 79 , m_cCUICFlagSCModel ( 1, 1, NUM_IC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 80 80 #endif … … 120 120 , m_cDdcFlagSCModel ( 1, 1, NUM_DDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 121 121 #endif 122 #if H_3D_DBBP122 #if NH_3D_DBBP 123 123 , m_cDBBPFlagSCModel ( 1, 1, DBBP_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 124 124 #endif … … 165 165 m_cCUMergeFlagExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT ); 166 166 m_cCUMergeIdxExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT ); 167 #if H_3D_ARP167 #if NH_3D_ARP 168 168 m_cCUPUARPWSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ARPW ); 169 169 #endif 170 #if H_3D_IC170 #if NH_3D_IC 171 171 m_cCUICFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_IC_FLAG ); 172 172 #endif … … 211 211 m_cDdcFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DDC_FLAG ); 212 212 #endif 213 #if H_3D_DBBP213 #if NH_3D_DBBP 214 214 m_cDBBPFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DBBP_FLAG ); 215 215 #endif … … 238 238 } 239 239 240 #if H_3D_ARP241 m_cCUPUARPWSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ARPW );242 #endif243 #if H_3D_IC244 m_cCUICFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_IC_FLAG );245 #endif246 #if H_3D_DBBP247 m_cDBBPFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DBBP_FLAG );248 #endif249 240 250 241 … … 651 642 652 643 UInt uiSymbol; 653 #if H_3D_QTLPC644 #if NH_3D_QTLPC 654 645 Bool bParseSplitFlag = true; 655 646 Bool bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag(); … … 666 657 #endif 667 658 { 668 TComDataCU *pcTextureCU = pcTexture->getC U(pcCU->getAddr());659 TComDataCU *pcTextureCU = pcTexture->getCtu(pcCU->getCtuRsAddr()); 669 660 assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth); 670 661 bParseSplitFlag = (pcTextureCU->getDepth(uiAbsPartIdx) > uiDepth); … … 681 672 DTRACE_CABAC_T( "\tSplitFlag\n" ) 682 673 #endif 683 #if H_3D_QTLPC674 #if NH_3D_QTLPC 684 675 } 685 676 else … … 713 704 assert ( pcCU->getSlice()->getSPS()->getLog2DiffMaxMinCodingBlockSize() == log2DiffMaxMinCodingBlockSize); 714 705 715 #if H_3D_QTLPC706 #if NH_3D_QTLPC 716 707 Bool bParsePartSize = true; 717 708 … … 732 723 #endif 733 724 { 734 TComDataCU *pcTextureCU = pcTexture->getC U(pcCU->getAddr());725 TComDataCU *pcTextureCU = pcTexture->getCtu(pcCU->getCtuRsAddr()); 735 726 assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth); 736 727 if(pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth ) … … 749 740 if ( pcCU->isIntra( uiAbsPartIdx ) ) 750 741 { 751 #if H_3D_QTLPC742 #if NH_3D_QTLPC 752 743 if(bParsePartSize) 753 744 { … … 762 753 } 763 754 eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN; 764 #if H_3D_QTLPC755 #if NH_3D_QTLPC 765 756 } 766 757 #endif … … 780 771 else 781 772 { 782 #if H_3D_QTLPC773 #if NH_3D_QTLPC 783 774 if(bParsePartSize) 784 775 { … … 824 815 } 825 816 } 826 #if H_3D_QTLPC817 #if NH_3D_QTLPC 827 818 } 828 819 else if(uiTexturePart == SIZE_2NxN || uiTexturePart == SIZE_2NxnU || uiTexturePart == SIZE_2NxnD) 829 820 { 830 821 UInt uiMaxNumBits = 1; 831 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ))822 if ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) 832 823 { 833 824 uiMaxNumBits ++; … … 835 826 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 836 827 { 837 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );828 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype) ); 838 829 if ( uiSymbol ) 839 830 { … … 843 834 } 844 835 eMode = (PartSize) uiMode; 845 if(uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth) && uiSymbol==1 )836 if(uiMode && ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiSymbol==1 ) 846 837 { 847 838 eMode = SIZE_2NxN; 848 839 } 849 else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth )==0&& uiSymbol==0)840 else if (uiMode && (( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize )==0) && uiSymbol==0) 850 841 { 851 842 eMode = SIZE_2NxN; 852 843 } 853 else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth) && uiSymbol==0)854 { 855 m_pcTDecBinIf->decodeBinEP(uiSymbol );844 else if (uiMode && ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiSymbol==0) 845 { 846 m_pcTDecBinIf->decodeBinEP(uiSymbol RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype)); 856 847 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 857 848 } … … 860 851 { 861 852 UInt uiMaxNumBits = 1; 862 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )853 if ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) 863 854 { 864 855 uiMaxNumBits ++; … … 866 857 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 867 858 { 868 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );859 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype)); 869 860 if ( uiSymbol ) 870 861 { … … 874 865 } 875 866 eMode = (PartSize) uiMode; 876 if(uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth) && uiSymbol==1 )867 if(uiMode && ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiSymbol==1 ) 877 868 { 878 869 eMode = SIZE_Nx2N; 879 870 } 880 else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth )==0&& uiSymbol==0)871 else if (uiMode && (( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize )==0) && uiSymbol==0) 881 872 { 882 873 eMode = SIZE_Nx2N; 883 874 } 884 else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth) && uiSymbol==0)885 { 886 m_pcTDecBinIf->decodeBinEP(uiSymbol );875 else if (uiMode && ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiSymbol==0) 876 { 877 m_pcTDecBinIf->decodeBinEP(uiSymbol RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype)); 887 878 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 888 879 } … … 896 887 DTRACE_CU("part_mode", eMode ) 897 888 #endif 898 #if H_3D_QTLPC889 #if NH_3D_QTLPC 899 890 } 900 891 #endif … … 2278 2269 } 2279 2270 2280 #if H_3D_ARP2271 #if NH_3D_ARP 2281 2272 Void TDecSbac::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2282 2273 { 2283 UInt uiMaxW = pcCU->getSlice()->getARPStepNum() - 1;2284 2274 UInt uiW = 0; 2285 2275 UInt uiOffset = pcCU->getCTXARPWFlag(uiAbsPartIdx); 2286 2276 UInt uiCode = 0; 2287 2277 2288 assert ( uiMaxW > 0 ); 2289 2290 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 0 + uiOffset ) ); 2278 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 0 + uiOffset ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__ARP_FLAG)); 2291 2279 2292 2280 uiW = uiCode; 2293 2281 if( 1 == uiW ) 2294 2282 { 2295 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 2 ) );2283 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 2 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__ARP_FLAG)); 2296 2284 uiW += ( 1 == uiCode ? 1 : 0 ); 2297 2285 } … … 2303 2291 #endif 2304 2292 2305 #if H_3D_IC2293 #if NH_3D_IC 2306 2294 /** parse illumination compensation flag 2307 2295 * \param pcCU … … 2313 2301 { 2314 2302 UInt uiSymbol = 0; 2315 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, 0 ) ); 2303 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, 0 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__3D_IC) ); 2304 2316 2305 #if !H_MV_ENC_DEC_TRAC 2317 2306 DTRACE_CABAC_VL( g_nSymbolCounter++ ); … … 2523 2512 #endif 2524 2513 2525 #if H_3D_DBBP2514 #if NH_3D_DBBP 2526 2515 Void TDecSbac::parseDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2527 2516 { … … 2531 2520 UInt uiSymbol = 0; 2532 2521 2533 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) );2522 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__DBBP_FLAG) ); 2534 2523 DTRACE_CU("dbbp_flag", uiSymbol) 2535 2524 PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx ); 2536 2525 AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N ); 2537 UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMax CUDepth() - uiDepth ) << 1 ) ) >> 4;2526 UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxTotalCUDepth() - uiDepth ) << 1 ) ) >> 4; 2538 2527 pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx, 0, uiDepth); 2539 2528 pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx+uiPUOffset, 1, uiDepth); -
branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecSbac.h
r1258 r1279 122 122 Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 123 123 #endif 124 #if H_3D_DBBP124 #if NH_3D_DBBP 125 125 Void parseDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 126 126 #endif … … 143 143 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 144 144 Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex ); 145 #if H_3D_ARP145 #if NH_3D_ARP 146 146 Void parseARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 147 147 #endif 148 #if H_3D_IC148 #if NH_3D_IC 149 149 Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 150 150 #endif … … 188 188 ContextModel3DBuffer m_cCUMergeFlagExtSCModel; 189 189 ContextModel3DBuffer m_cCUMergeIdxExtSCModel; 190 #if H_3D_ARP190 #if NH_3D_ARP 191 191 ContextModel3DBuffer m_cCUPUARPWSCModel; 192 192 #endif 193 #if H_3D_IC193 #if NH_3D_IC 194 194 ContextModel3DBuffer m_cCUICFlagSCModel; 195 195 #endif … … 238 238 ContextModel3DBuffer m_cDdcFlagSCModel; 239 239 #endif 240 #if H_3D_DBBP240 #if NH_3D_DBBP 241 241 ContextModel3DBuffer m_cDBBPFlagSCModel; 242 242 #endif -
branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecSlice.cpp
r1200 r1279 90 90 g_bJustDoIt = g_bEncDecTraceEnable; 91 91 #endif 92 #if H_MV_ENC_DEC_TRAC 93 #if ENC_DEC_TRACE 94 incSymbolCounter(); 95 #endif 96 DTRACE_CABAC_VL( g_nSymbolCounter ); 97 #else 92 98 DTRACE_CABAC_VL( g_nSymbolCounter++ ); 99 #endif 93 100 DTRACE_CABAC_T( "\tPOC: " ); 94 101 DTRACE_CABAC_V( pcPic->getPOC() ); -
branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecTop.cpp
r1251 r1279 292 292 293 293 294 #if H_3D_IV_MERGE294 #if NH_3D_IV_MERGE 295 295 Void 296 296 CamParsCollector::copyCamParamForSlice( TComSlice* pcSlice ) … … 423 423 { 424 424 #if ENC_DEC_TRACE 425 #if H_MV_ENC_DEC_TRAC_FIX 426 if (g_hTrace != stdout && g_hTrace != NULL) 427 #else 425 428 if (g_hTrace != stdout) 429 #endif 426 430 { 427 431 fclose( g_hTrace ); 432 #if H_MV_ENC_DEC_TRAC_FIX 433 g_hTrace = NULL; 434 #endif 428 435 } 429 436 #endif … … 1142 1149 pcSlice->getTempRefPicLists( m_cListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr); 1143 1150 pcSlice->setRefPicList ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true ); 1144 #if H_3D1151 #if NH_3D_NBDV 1145 1152 pcSlice->setDefaultRefView(); 1146 1153 #endif 1147 #if H_3D_ARP1154 #if NH_3D_ARP 1148 1155 pcSlice->setARPStepNum(m_ivPicLists); 1149 if( pcSlice->getARPStepNum() > 1 )1150 {1151 // GT: This seems to be broken, not all nuh_layer_ids are necessarily present1152 for(Int iLayerId = 0; iLayerId < nalu.m_nuhLayerId; iLayerId ++ )1153 {1154 Int iViewIdx = pcSlice->getVPS()->getViewIndex(iLayerId);1155 Bool bIsDepth = ( pcSlice->getVPS()->getDepthId ( iLayerId ) == 1 );1156 if( iViewIdx<getViewIndex() && !bIsDepth )1157 {1158 pcSlice->setBaseViewRefPicList( m_ivPicLists->getPicList( iLayerId ), iViewIdx );1159 }1160 }1161 }1162 1156 #endif 1163 1157 #else … … 1167 1161 #if NH_3D 1168 1162 pcSlice->checkInCompPredRefLayers(); 1169 #if H_3D_IV_MERGE1163 #if NH_3D_IV_MERGE 1170 1164 #if H_3D_FCO 1171 1165 //assert( !getIsDepth() ); … … 1226 1220 //--------------- 1227 1221 pcSlice->setRefPOCList(); 1228 #if H_3D_TMVP1222 #if NH_3D_TMVP 1229 1223 if(pcSlice->getLayerId()) 1230 1224 { … … 1264 1258 } 1265 1259 1266 #if H_3D_IV_MERGE1260 #if NH_3D_IV_MERGE 1267 1261 #if H_3D_FCO 1268 1262 if( !pcSlice->getIsDepth() && m_pcCamParsCollector ) -
branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecTop.h
r1239 r1279 81 81 Int**** getBaseViewShiftLUTI() { return m_aiBaseViewShiftLUT; } 82 82 83 #if H_3D_IV_MERGE83 #if NH_3D_IV_MERGE 84 84 Void copyCamParamForSlice( TComSlice* pcSlice ); 85 85 #endif -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/SyntaxElementWriter.cpp
r1200 r1279 52 52 if ( !g_disableNumbering ) 53 53 { 54 #endif 54 incSymbolCounter(); 55 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter ); 56 } 57 #else 55 58 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 56 #if H_MV_ENC_DEC_TRAC57 }58 59 #endif 59 60 … … 77 78 if ( !g_disableNumbering ) 78 79 { 79 #endif 80 incSymbolCounter(); 81 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter ); 82 } 83 #else 80 84 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 81 #if H_MV_ENC_DEC_TRAC82 }83 85 #endif 84 86 … … 95 97 if ( !g_disableNumbering ) 96 98 { 97 #endif 99 incSymbolCounter(); 100 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter ); 101 } 102 #else 98 103 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 99 #if H_MV_ENC_DEC_TRAC100 }101 104 #endif 102 105 … … 113 116 if ( !g_disableNumbering ) 114 117 { 118 incSymbolCounter(); 119 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter ); 120 } 121 #else 122 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 115 123 #endif 116 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 117 #if H_MV_ENC_DEC_TRAC 118 } 119 #endif 124 120 125 fprintf( g_hTrace, "%-50s u(1) : %d\n", pSymbolName, value ); 121 126 } -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncCavlc.cpp
r1258 r1279 2126 2126 xCodePredWeightTable( pcSlice ); 2127 2127 } 2128 #if H_3D_IC2128 #if NH_3D_IC 2129 2129 else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) 2130 2130 && !pcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 … … 2135 2135 if( pcSlice->getApplyIC() ) 2136 2136 { 2137 WRITE_FLAG( pcSlice->getIcSkipParseFlag() ? 1 : 0, " ic_skip_mergeidx0" );2138 } 2139 } 2140 #endif 2141 #if H_3D_IV_MERGE2137 WRITE_FLAG( pcSlice->getIcSkipParseFlag() ? 1 : 0, "slice_ic_disabled_merge_zero_idx_flag" ); 2138 } 2139 } 2140 #endif 2141 #if NH_3D_IV_MERGE 2142 2142 assert(pcSlice->getMaxNumMergeCand()<=MRG_MAX_NUM_CANDS_MEM); 2143 2143 #else … … 2146 2146 if (!pcSlice->isIntra()) 2147 2147 { 2148 #if H_3D_IV_MERGE2148 #if NH_3D_IV_MERGE 2149 2149 WRITE_UVLC( ( ( pcSlice->getMpiFlag( ) || pcSlice->getIvMvPredFlag( ) || pcSlice->getViewSynthesisPredFlag( ) ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS ) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand"); 2150 2150 #else … … 2522 2522 } 2523 2523 2524 #if H_3D_ARP2524 #if NH_3D_ARP 2525 2525 Void TEncCavlc::codeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2526 2526 { … … 2529 2529 #endif 2530 2530 2531 #if H_3D_IC2531 #if NH_3D_IC 2532 2532 Void TEncCavlc::codeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2533 2533 { … … 2838 2838 #endif 2839 2839 2840 #if H_3D_DBBP2840 #if NH_3D_DBBP 2841 2841 Void TEncCavlc::codeDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2842 2842 { -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncCavlc.h
r1258 r1279 129 129 Void codeDeltaDC ( TComDataCU* /*pcCU*/, UInt /*absPartIdx*/ ) { assert(0); }; 130 130 #endif 131 #if H_3D_ARP131 #if NH_3D_ARP 132 132 Void codeARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 133 133 #endif 134 #if H_3D_IC134 #if NH_3D_IC 135 135 Void codeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 136 136 #endif … … 139 139 Void codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 140 140 #endif 141 #if H_3D_DBBP141 #if NH_3D_DBBP 142 142 Void codeDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 143 143 #endif -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncCfg.h
r1219 r1279 572 572 Void setMaxTotalCUDepth ( UInt u ) { m_maxTotalCUDepth = u; } 573 573 Void setLog2DiffMaxMinCodingBlockSize( UInt u ) { m_log2DiffMaxMinCodingBlockSize = u; } 574 #if H_3D_IC574 #if NH_3D_IC 575 575 Void setUseIC ( Bool bVal ) { m_bUseIC = bVal; } 576 576 Bool getUseIC () { return m_bUseIC; } -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncCu.cpp
r1258 r1279 68 68 m_ppcTempCU = new TComDataCU*[m_uhTotalDepth-1]; 69 69 70 #if H_3D_ARP70 #if NH_3D_ARP 71 71 m_ppcWeightedTempCU = new TComDataCU*[m_uhTotalDepth-1]; 72 72 #endif … … 79 79 m_ppcRecoYuvTemp = new TComYuv*[m_uhTotalDepth-1]; 80 80 m_ppcOrigYuv = new TComYuv*[m_uhTotalDepth-1]; 81 #if H_3D_DBBP81 #if NH_3D_DBBP 82 82 m_ppcOrigYuvDBBP = new TComYuv*[m_uhTotalDepth-1]; 83 83 #endif … … 92 92 m_ppcBestCU[i] = new TComDataCU; m_ppcBestCU[i]->create( chromaFormat, uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) ); 93 93 m_ppcTempCU[i] = new TComDataCU; m_ppcTempCU[i]->create( chromaFormat, uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) ); 94 #if H_3D_ARP95 m_ppcWeightedTempCU[i] = new TComDataCU; m_ppcWeightedTempCU[i]->create( uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) );94 #if NH_3D_ARP 95 m_ppcWeightedTempCU[i] = new TComDataCU; m_ppcWeightedTempCU[i]->create( chromaFormat, uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) ); 96 96 #endif 97 97 … … 105 105 106 106 m_ppcOrigYuv [i] = new TComYuv; m_ppcOrigYuv [i]->create(uiWidth, uiHeight, chromaFormat); 107 #if H_3D_DBBP108 m_ppcOrigYuvDBBP[i] = new TComYuv; m_ppcOrigYuvDBBP[i]->create(uiWidth, uiHeight );107 #if NH_3D_DBBP 108 m_ppcOrigYuvDBBP[i] = new TComYuv; m_ppcOrigYuvDBBP[i]->create(uiWidth, uiHeight, chromaFormat); 109 109 #endif 110 110 … … 146 146 m_ppcTempCU[i]->destroy(); delete m_ppcTempCU[i]; m_ppcTempCU[i] = NULL; 147 147 } 148 #if H_3D_ARP148 #if NH_3D_ARP 149 149 if(m_ppcWeightedTempCU[i]) 150 150 { … … 180 180 m_ppcOrigYuv[i]->destroy(); delete m_ppcOrigYuv[i]; m_ppcOrigYuv[i] = NULL; 181 181 } 182 #if H_3D_DBBP182 #if NH_3D_DBBP 183 183 if(m_ppcOrigYuvDBBP[i]) 184 184 { … … 198 198 } 199 199 200 #if H_3D_ARP200 #if NH_3D_ARP 201 201 if(m_ppcWeightedTempCU) 202 202 { … … 240 240 m_ppcOrigYuv = NULL; 241 241 } 242 #if H_3D_DBBP242 #if NH_3D_DBBP 243 243 if(m_ppcOrigYuvDBBP) 244 244 { … … 280 280 m_ppcTempCU[0]->initCtu( pCtu->getPic(), pCtu->getCtuRsAddr() ); 281 281 282 #if NH_3D_ARP 283 m_ppcWeightedTempCU[0]->initCtu( pCtu->getPic(), pCtu->getCtuRsAddr() ); 284 #endif 285 282 286 #if KWU_RC_MADPRED_E0227 283 287 m_LCUPredictionSAD = 0; … … 413 417 414 418 415 #if H_3D_QTLPC419 #if NH_3D_QTLPC 416 420 Bool bLimQtPredFalg = pcPic->getSlice(0)->getQtPredFlag(); 417 421 TComPic *pcTexture = rpcBestCU->getSlice()->getTexturePic(); … … 429 433 m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getCtuRsAddr(), rpcBestCU->getZorderIdxInCtu() ); 430 434 431 #if H_3D_QTLPC435 #if NH_3D_QTLPC 432 436 Bool bTrySplit = true; 433 437 Bool bTrySplitDQP = true; … … 441 445 Bool earlyDetectionSkipMode = false; 442 446 443 #if H_3D_VSP447 #if NH_3D_NBDV 444 448 DisInfo DvInfo; 445 449 DvInfo.m_acNBDV.setZero(); 446 450 DvInfo.m_aVIdxCan = 0; 447 #if H_3D_NBDV_REF451 #if NH_3D_NBDV_REF 448 452 DvInfo.m_acDoNBDV.setZero(); 449 453 #endif … … 505 509 } 506 510 507 #if H_3D_IC511 #if NH_3D_IC 508 512 Bool bICEnabled = rpcTempCU->getSlice()->getViewIndex() && ( rpcTempCU->getSlice()->getSliceType() == P_SLICE || rpcTempCU->getSlice()->getSliceType() == B_SLICE ) && !rpcTempCU->getSlice()->getIsDepth(); 509 513 bICEnabled = bICEnabled && rpcTempCU->getSlice()->getApplyIC(); … … 529 533 } 530 534 531 #if H_3D_QTLPC535 #if NH_3D_QTLPC 532 536 bTrySplit = true; 533 537 #endif … … 547 551 548 552 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 549 #if H_3D_QTLPC553 #if NH_3D_QTLPC 550 554 //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU 551 555 #if H_3D_FCO … … 555 559 #endif 556 560 { 557 TComDataCU* pcTextureCU = pcTexture->getC U( rpcBestCU->getAddr() ); //Corresponding texture LCU558 UInt uiCUIdx = rpcBestCU->getZorderIdxInC U();561 TComDataCU* pcTextureCU = pcTexture->getCtu( rpcBestCU->getCtuRsAddr() ); //Corresponding texture LCU 562 UInt uiCUIdx = rpcBestCU->getZorderIdxInCtu(); 559 563 assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); //Depth cannot be more partitioned than the texture. 560 564 if (pcTextureCU->getDepth(uiCUIdx) > uiDepth || pcTextureCU->getPartitionSize(uiCUIdx) == SIZE_NxN) //Texture was split. … … 584 588 #endif 585 589 586 #if H_3D_NBDV590 #if NH_3D_NBDV 587 591 if( rpcTempCU->getSlice()->getSliceType() != I_SLICE ) 588 592 { 589 #if H_3D_ARP && H_3D_IV_MERGE590 if( rpcTempCU->getSlice()->getIvResPredFlag() || rpcTempCU->getSlice()->getIvMvPredFlag() )593 #if NH_3D_ARP && NH_3D_IV_MERGE && NH_3D_VSP 594 if( rpcTempCU->getSlice()->getIvResPredFlag() || rpcTempCU->getSlice()->getIvMvPredFlag() || rpcTempCU->getSlice()->getViewSynthesisPredFlag() ) 591 595 #else 592 #if H_3D_ARP 593 if( rpcTempCU->getSlice()->getVPS()->getUseAdvRP(rpcTempCU->getSlice()->getLayerId()) ) 596 #if NH_3D_IV_MERGE && NH_3D_VSP 597 if( rpcTempCU->getSlice()->getIvMvPredFlag() || rpcTempCU->getSlice()->getViewSynthesisPredFlag() ) 598 #else 599 #if NH_3D_ARP && NH_3D_VSP 600 if( rpcTempCU->getSlice()->getIvResPredFlag() || rpcTempCU->getSlice()->getViewSynthesisPredFlag() ) 601 #else 602 #if NH_3D_VSP 603 if( rpcTempCU->getSlice()->getViewSynthesisPredFlag() ) 604 #else 605 #if NH_3D_ARP 606 if( rpcTempCU->getSlice()->getIvResPredFlag() ) 594 607 #else 595 608 #if H_3D_IV_MERGE 596 609 if( rpcTempCU->getSlice()->getVPS()->getIvMvPredFlag(rpcTempCU->getSlice()->getLayerId()) ) 597 610 #else 611 #if NH_3D_DBBP 612 if( rpcTempCU->getSlice()->getDepthBasedBlkPartFlag() ) 613 #else 598 614 if (0) 615 #endif 616 #endif 617 #endif 618 #endif 599 619 #endif 600 620 #endif … … 602 622 { 603 623 PartSize ePartTemp = rpcTempCU->getPartitionSize(0); 604 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );605 #if H_3D_IV_MERGE624 rpcTempCU->setPartSizeSubParts(SIZE_2Nx2N, 0, uiDepth); 625 #if NH_3D_IV_MERGE 606 626 if (rpcTempCU->getSlice()->getIsDepth() ) 607 627 { … … 611 631 { 612 632 #endif 613 #if H_3D_NBDV_REF633 #if NH_3D_NBDV_REF 614 634 if( rpcTempCU->getSlice()->getDepthRefinementFlag() ) 615 635 { … … 621 641 rpcTempCU->getDisMvpCandNBDV(&DvInfo); 622 642 } 623 #if H_3D_IV_MERGE643 #if NH_3D_IV_MERGE 624 644 } 625 645 #endif … … 642 662 if( rpcBestCU->getSlice()->getSliceType() != I_SLICE ) 643 663 { 644 #if H_3D_IC664 #if NH_3D_IC 645 665 for( UInt uiICId = 0; uiICId < ( bICEnabled ? 2 : 1 ); uiICId++ ) 646 666 { … … 650 670 if(m_pcEncCfg->getUseEarlySkipDetection()) 651 671 { 652 #if H_3D_IC672 #if NH_3D_IC 653 673 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 654 674 #endif … … 659 679 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );//by Competition for inter_2Nx2N 660 680 #endif 661 #if H_3D_VSP662 681 #if NH_3D_VSP || NH_3D_DBBP 682 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 663 683 #endif 664 684 } 665 685 // SKIP 666 #if H_3D_IC686 #if NH_3D_IC 667 687 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 668 688 #endif … … 673 693 674 694 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 675 #if H_3D_VSP676 695 #if NH_3D_VSP || NH_3D_DBBP 696 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 677 697 #endif 678 698 … … 680 700 { 681 701 // 2Nx2N, NxN 682 #if H_3D_IC702 #if NH_3D_IC 683 703 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 684 704 #endif … … 690 710 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 691 711 #endif 692 #if H_3D_VSP693 694 #endif 695 #if H_3D_DBBP712 #if NH_3D_VSP || NH_3D_DBBP 713 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 714 #endif 715 #if NH_3D_DBBP 696 716 if( rpcTempCU->getSlice()->getDepthBasedBlkPartFlag() && rpcTempCU->getSlice()->getDefaultRefViewIdxAvailableFlag() ) 697 717 { 698 718 xCheckRDCostInterDBBP( rpcBestCU, rpcTempCU, false ); 699 719 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 700 #if H_3D_VSP720 #if NH_3D_VSP || NH_3D_DBBP 701 721 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 702 722 #endif … … 709 729 } 710 730 } 711 #if H_3D_IC731 #if NH_3D_IC 712 732 } 713 733 #endif 714 734 } 715 #if H_3D_QTLPC735 #if NH_3D_QTLPC 716 736 if(depthMapDetect && !bIntraSliceDetect && !rapPic && ( m_pcEncCfg->getUseQTL() || bLimQtPredFalg )) 717 737 { … … 768 788 { 769 789 if( uiDepth == sps.getLog2DiffMaxMinCodingBlockSize() && doNotBlockPu 770 #if H_3D_QTLPC790 #if NH_3D_QTLPC 771 791 && bTrySplit 772 792 #endif … … 780 800 #endif 781 801 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 782 #if H_3D_VSP783 802 #if NH_3D_VSP || NH_3D_DBBP 803 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 784 804 #endif 785 805 … … 788 808 789 809 if(doNotBlockPu 790 #if H_3D_QTLPC810 #if NH_3D_QTLPC 791 811 && bTryNx2N 792 812 #endif … … 799 819 #endif 800 820 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 801 #if H_3D_VSP821 #if NH_3D_VSP || NH_3D_DBBP 802 822 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 803 823 #endif … … 809 829 } 810 830 if(doNotBlockPu 811 #if H_3D_QTLPC831 #if NH_3D_QTLPC 812 832 && bTry2NxN 813 833 #endif … … 822 842 823 843 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 824 #if H_3D_VSP844 #if NH_3D_VSP || NH_3D_DBBP 825 845 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 826 846 #endif … … 850 870 { 851 871 if(doNotBlockPu 852 #if H_3D_QTLPC872 #if NH_3D_QTLPC 853 873 && bTry2NxN 854 874 #endif … … 861 881 #endif 862 882 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 863 #if H_3D_VSP883 #if NH_3D_VSP || NH_3D_DBBP 864 884 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 865 885 #endif … … 870 890 } 871 891 if(doNotBlockPu 872 #if H_3D_QTLPC892 #if NH_3D_QTLPC 873 893 && bTry2NxN 874 894 #endif … … 882 902 883 903 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 884 #if H_3D_VSP904 #if NH_3D_VSP || NH_3D_DBBP 885 905 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 886 906 #endif … … 896 916 { 897 917 if(doNotBlockPu 898 #if H_3D_QTLPC918 #if NH_3D_QTLPC 899 919 && bTry2NxN 900 920 #endif … … 909 929 910 930 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 911 #if H_3D_VSP931 #if NH_3D_VSP || NH_3D_DBBP 912 932 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 913 933 #endif … … 918 938 } 919 939 if(doNotBlockPu 920 #if H_3D_QTLPC940 #if NH_3D_QTLPC 921 941 && bTry2NxN 922 942 #endif … … 929 949 #endif 930 950 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 931 #if H_3D_VSP951 #if NH_3D_VSP || NH_3D_DBBP 932 952 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 933 953 #endif … … 945 965 { 946 966 if(doNotBlockPu 947 #if H_3D_QTLPC967 #if NH_3D_QTLPC 948 968 && bTryNx2N 949 969 #endif … … 957 977 958 978 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 959 #if H_3D_VSP979 #if NH_3D_VSP || NH_3D_DBBP 960 980 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 961 981 #endif … … 966 986 } 967 987 if(doNotBlockPu 968 #if H_3D_QTLPC988 #if NH_3D_QTLPC 969 989 && bTryNx2N 970 990 #endif … … 977 997 #endif 978 998 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 979 #if H_3D_VSP999 #if NH_3D_VSP || NH_3D_DBBP 980 1000 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 981 1001 #endif … … 986 1006 { 987 1007 if(doNotBlockPu 988 #if H_3D_QTLPC1008 #if NH_3D_QTLPC 989 1009 && bTryNx2N 990 1010 #endif … … 997 1017 #endif 998 1018 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 999 #if H_3D_VSP1019 #if NH_3D_VSP || NH_3D_DBBP 1000 1020 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 1001 1021 #endif … … 1006 1026 } 1007 1027 if(doNotBlockPu 1008 #if H_3D_QTLPC1028 #if NH_3D_QTLPC 1009 1029 && bTryNx2N 1010 1030 #endif … … 1018 1038 #endif 1019 1039 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 1020 #if H_3D_VSP1040 #if NH_3D_VSP || NH_3D_DBBP 1021 1041 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 1022 1042 #endif … … 1027 1047 1028 1048 #else 1029 #if H_3D_QTLPC1049 #if NH_3D_QTLPC 1030 1050 if (bTry2NxN) 1031 1051 { … … 1034 1054 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 1035 1055 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 1036 #if H_3D_VSP1037 1056 #if NH_3D_VSP || NH_3D_DBBP 1057 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 1038 1058 #endif 1039 1059 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 1040 1060 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 1041 #if H_3D_VSP1042 1043 #endif 1044 #if H_3D_QTLPC1061 #if NH_3D_VSP || NH_3D_DBBP 1062 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 1063 #endif 1064 #if NH_3D_QTLPC 1045 1065 } 1046 1066 if (bTryNx2N) … … 1049 1069 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 1050 1070 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 1051 #if H_3D_VSP1052 1071 #if NH_3D_VSP || NH_3D_DBBP 1072 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 1053 1073 #endif 1054 1074 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1055 1075 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 1056 #if H_3D_VSP1057 1058 #endif 1059 #if H_3D_QTLPC1076 #if NH_3D_VSP || NH_3D_DBBP 1077 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 1078 #endif 1079 #if NH_3D_QTLPC 1060 1080 } 1061 1081 #endif … … 1113 1133 if( uiDepth == sps.getLog2DiffMaxMinCodingBlockSize() ) 1114 1134 { 1115 #if H_3D_QTLPC //Try IntraNxN1135 #if NH_3D_QTLPC //Try IntraNxN 1116 1136 if(bTrySplit) 1117 1137 { … … 1129 1149 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 1130 1150 } 1131 #if H_3D_QTLPC1151 #if NH_3D_QTLPC 1132 1152 } 1133 1153 #endif … … 1245 1265 1246 1266 // further split 1247 #if H_3D_QTLPC 1248 if( bSubBranch && bTrySplitDQP && uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth ) 1267 #if NH_3D_QTLPC 1268 1269 if( bSubBranch && bTrySplitDQP && uiDepth < sps.getLog2DiffMaxMinCodingBlockSize() ) 1249 1270 #else 1250 1271 if( bSubBranch && uiDepth < sps.getLog2DiffMaxMinCodingBlockSize() ) … … 1267 1288 DEBUG_STRING_NEW(sTempDebug) 1268 1289 1290 #if NH_3D_ARP 1291 m_ppcWeightedTempCU[uhNextDepth]->setSlice( m_ppcWeightedTempCU[ uiDepth]->getSlice()); 1292 m_ppcWeightedTempCU[uhNextDepth]->setPic ( m_ppcWeightedTempCU[ uiDepth] ); 1293 #endif 1269 1294 for ( UInt uiPartUnitIdx = 0; uiPartUnitIdx < 4; uiPartUnitIdx++ ) 1270 1295 { … … 1572 1597 1573 1598 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx ); 1574 #if H_3D_ARP1599 #if NH_3D_ARP 1575 1600 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx ); 1576 1601 #endif 1577 #if H_3D_IC1602 #if NH_3D_IC 1578 1603 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx ); 1579 1604 #endif … … 1609 1634 // prediction Info ( Intra : direction mode, Inter : Mv, reference idx ) 1610 1635 m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx ); 1611 #if H_3D1636 #if NH_3D_DBBP 1612 1637 m_pcEntropyCoder->encodeDBBPFlag( pcCU, uiAbsPartIdx ); 1613 1638 #endif … … 1615 1640 m_pcEntropyCoder->encodeSDCFlag( pcCU, uiAbsPartIdx ); 1616 1641 #endif 1617 #if H_3D_ARP1642 #if NH_3D_ARP 1618 1643 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx ); 1619 1644 #endif 1620 #if H_3D_IC1645 #if NH_3D_IC 1621 1646 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx ); 1622 1647 #endif … … 1760 1785 { 1761 1786 assert( rpcTempCU->getSlice()->getSliceType() != I_SLICE ); 1762 #if H_3D_IV_MERGE1787 #if NH_3D_MLC 1763 1788 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists 1764 1789 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM]; … … 1775 1800 } 1776 1801 UChar uhDepth = rpcTempCU->getDepth( 0 ); 1777 #if H_3D_IC1802 #if NH_3D_IC 1778 1803 Bool bICFlag = rpcTempCU->getICFlag( 0 ); 1779 1804 #endif … … 1789 1814 #endif 1790 1815 1791 #if H_3D_ARP1816 #if NH_3D_ARP 1792 1817 DisInfo cOrigDisInfo = rpcTempCU->getDvInfo(0); 1793 1818 #else … … 1795 1820 1796 1821 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to CTU level 1797 #if H_3D_VSP 1798 #if !H_3D_ARP 1822 1823 #if NH_3D_SPIVMP 1824 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 1825 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 1826 TComMvField* pcMvFieldSP; 1827 UChar* puhInterDirSP; 1828 pcMvFieldSP = new TComMvField[rpcTempCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2]; 1829 puhInterDirSP = new UChar[rpcTempCU->getPic()->getPicSym()->getNumPartitionsInCtu()]; 1830 #endif 1831 1832 #if NH_3D_VSP 1833 #if !NH_3D_ARP 1799 1834 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 1800 1835 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 1801 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM]; 1802 rpcTempCU->m_bAvailableFlagA1 = 0; 1803 rpcTempCU->m_bAvailableFlagB1 = 0; 1804 rpcTempCU->m_bAvailableFlagB0 = 0; 1805 rpcTempCU->m_bAvailableFlagA0 = 0; 1806 rpcTempCU->m_bAvailableFlagB2 = 0; 1836 #if NH_3D_MLC 1837 rpcTempCU->initAvailableFlags(); 1838 #endif 1807 1839 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 1808 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag,inheritedVSPDisInfo, numValidMergeCand ); 1809 #endif 1810 #else 1811 #if H_3D 1812 rpcTempCU->m_bAvailableFlagA1 = 0; 1813 rpcTempCU->m_bAvailableFlagB1 = 0; 1814 rpcTempCU->m_bAvailableFlagB0 = 0; 1815 rpcTempCU->m_bAvailableFlagA0 = 0; 1816 rpcTempCU->m_bAvailableFlagB2 = 0; 1817 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 1818 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); 1819 #else 1840 #if NH_3D_MLC 1841 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 1842 #if NH_3D_SPIVMP 1843 , pcMvFieldSP, puhInterDirSP 1844 #endif 1845 , numValidMergeCand 1846 ); 1847 1848 rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours, vspFlag 1849 #if NH_3D_SPIVMP 1850 , bSPIVMPFlag 1851 #endif 1852 , numValidMergeCand 1853 ); 1854 #endif 1855 #endif 1856 #else 1857 #if NH_3D_MLC 1858 rpcTempCU->initAvailableFlags(); 1859 #endif 1820 1860 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); 1821 #endif 1822 #endif 1823 #if H_3D_IV_MERGE 1861 #if NH_3D_MLC 1862 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 1863 #if H_3D_SPIVMP 1864 , pcMvFieldSP, puhInterDirSP 1865 #endif 1866 , numValidMergeCand 1867 ); 1868 #if NH_3D_MLC 1869 rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours 1870 #if H_3D_SPIVMP 1871 , bSPIVMPFlag 1872 #endif 1873 , numValidMergeCand 1874 ); 1875 #endif 1876 #endif 1877 #endif 1878 1879 #if NH_3D_MLC 1824 1880 Int mergeCandBuffer[MRG_MAX_NUM_CANDS_MEM]; 1825 1881 #else 1826 1882 Int mergeCandBuffer[MRG_MAX_NUM_CANDS]; 1827 1883 #endif 1828 #if H_3D_ARP1829 for( UInt ui = 0; ui < rpcTempCU->getSlice()->getMaxNumMergeCand(); ++ui )1884 #if NH_3D_MLC 1885 for( UInt ui = 0; ui < rpcTempCU->getSlice()->getMaxNumMergeCand(); ++ui ) 1830 1886 #else 1831 1887 for( UInt ui = 0; ui < numValidMergeCand; ++ui ) 1832 1888 #endif 1833 1834 1889 { 1835 1890 mergeCandBuffer[ui] = 0; … … 1849 1904 DEBUG_STRING_NEW(bestStr) 1850 1905 1851 #if H_3D_ARP1906 #if NH_3D_ARP 1852 1907 Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1; 1908 #if NH_3D_IC 1853 1909 if( nARPWMax < 0 || bICFlag ) 1910 #else 1911 if( nARPWMax < 0 ) 1912 #endif 1854 1913 { 1855 1914 nARPWMax = 0; … … 1857 1916 for( Int nARPW=nARPWMax; nARPW >= 0 ; nARPW-- ) 1858 1917 { 1918 #if NH_3D_IV_MERGE 1859 1919 memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS_MEM*sizeof(Int) ); 1920 #else 1921 memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS * sizeof(Int) ); 1922 #endif 1860 1923 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level 1861 1924 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 1862 #if H_3D_IC1925 #if NH_3D_IC 1863 1926 rpcTempCU->setICFlagSubParts( bICFlag, 0, 0, uhDepth ); 1864 1927 #endif 1865 1928 rpcTempCU->getDvInfo(0) = cOrigDisInfo; 1866 rpcTempCU->setDvInfoSubParts(cOrigDisInfo, 0, 0, uhDepth ); 1929 rpcTempCU->setDvInfoSubParts(cOrigDisInfo, 0, uhDepth ); 1930 #if NH_3D_VSP 1867 1931 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 1868 1932 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 1869 #if H_3D_SPIVMP 1870 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 1871 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 1872 TComMvField* pcMvFieldSP; 1873 UChar* puhInterDirSP; 1874 pcMvFieldSP = new TComMvField[rpcTempCU->getPic()->getPicSym()->getNumPartition()*2]; 1875 puhInterDirSP = new UChar[rpcTempCU->getPic()->getPicSym()->getNumPartition()]; 1876 #endif 1877 #if H_3D 1933 #endif 1934 #if NH_3D 1935 #if NH_3D_MLC 1878 1936 rpcTempCU->initAvailableFlags(); 1937 #endif 1879 1938 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 1880 1939 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 1881 #if H_3D_SPIVMP1940 #if NH_3D_SPIVMP 1882 1941 , pcMvFieldSP, puhInterDirSP 1883 1942 #endif … … 1885 1944 ); 1886 1945 1887 rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours, vspFlag 1888 #if H_3D_SPIVMP 1946 rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours 1947 #if NH_3D_VSP 1948 , vspFlag 1949 #endif 1950 #if NH_3D_SPIVMP 1889 1951 , bSPIVMPFlag 1890 1952 #endif … … 1893 1955 1894 1956 #else 1895 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag,numValidMergeCand );1957 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); 1896 1958 #endif 1897 1959 … … 1903 1965 for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand ) 1904 1966 { 1905 #if H_3D_IC1967 #if NH_3D_IC 1906 1968 if( rpcTempCU->getSlice()->getApplyIC() && rpcTempCU->getSlice()->getIcSkipParseFlag() ) 1907 1969 { … … 1920 1982 // set MC parameters 1921 1983 rpcTempCU->setPredModeSubParts( MODE_INTER, 0, uhDepth ); // interprets depth relative to CTU level 1922 #if H_3D_IC1984 #if NH_3D_IC 1923 1985 rpcTempCU->setICFlagSubParts( bICFlag, 0, 0, uhDepth ); 1924 #endif1925 #if H_3D_ARP1926 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );1927 1986 #endif 1928 1987 rpcTempCU->setCUTransquantBypassSubParts( bTransquantBypassFlag, 0, uhDepth ); … … 1931 1990 rpcTempCU->setMergeFlagSubParts( true, 0, 0, uhDepth ); // interprets depth relative to CTU level 1932 1991 rpcTempCU->setMergeIndexSubParts( uiMergeCand, 0, 0, uhDepth ); // interprets depth relative to CTU level 1933 #if H_3D_VSP 1992 #if NH_3D_ARP 1993 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 1994 #endif 1995 1996 #if NH_3D_VSP 1934 1997 rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth ); 1935 1998 #endif 1936 #if H_3D_SPIVMP1999 #if NH_3D_SPIVMP 1937 2000 rpcTempCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeCand], 0, 0, uhDepth); 1938 2001 if (bSPIVMPFlag[uiMergeCand]) … … 1953 2016 else 1954 2017 #endif 1955 #if H_3D_VSP1956 2018 { 2019 #if NH_3D_VSP 1957 2020 if ( vspFlag[uiMergeCand] ) 1958 2021 { … … 1984 2047 { 1985 2048 #endif 1986 rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to CTU level1987 rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level1988 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level1989 #if H_3D_VSP2049 rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to CTU level 2050 rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level 2051 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level 2052 #if NH_3D_VSP 1990 2053 } 2054 #endif 1991 2055 } 1992 #endif1993 2056 // do MC 1994 2057 m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] ); … … 2024 2087 rpcTempCU->setDISFlagSubParts( false, 0, uhDepth ); 2025 2088 #endif 2026 #if H_3D_VSP // possible bug fix2089 #if NH_3D_VSP 2027 2090 if( rpcTempCU->getSkipFlag(0) ) 2028 2091 { … … 2157 2220 } 2158 2221 DEBUG_STRING_APPEND(sDebug, bestStr) 2159 #if H_3D_SPIVMP 2222 #if NH_3D_ARP 2223 } 2224 #endif 2225 #if NH_3D_SPIVMP 2160 2226 delete[] pcMvFieldSP; 2161 2227 delete[] puhInterDirSP; 2162 2228 #endif 2163 #if H_3D_ARP2164 }2165 #endif2166 2167 2229 } 2168 2230 … … 2181 2243 2182 2244 // prior to this, rpcTempCU will have just been reset using rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 2183 #if H_3D 2245 #if H_3D || NH_3D_ARP 2184 2246 const Bool bTransquantBypassFlag = rpcTempCU->getCUTransquantBypass(0); 2185 2247 #endif … … 2189 2251 #endif 2190 2252 UChar uhDepth = rpcTempCU->getDepth( 0 ); 2191 #if H_3D_ARP2253 #if NH_3D_ARP 2192 2254 Bool bFirstTime = true; 2193 2255 Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1; 2256 #if NH_3D_IC 2194 2257 if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || rpcTempCU->getICFlag(0) ) 2258 #else 2259 if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N ) 2260 #endif 2195 2261 { 2196 2262 nARPWMax = 0; … … 2220 2286 rpcTempCU->setPredModeSubParts ( MODE_INTER, 0, uhDepth ); 2221 2287 rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uhDepth ); 2222 #if H_3D_ARP2288 #if NH_3D_ARP 2223 2289 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 2224 2290 #endif 2225 #if H_3D_ARP2291 #if NH_3D_ARP 2226 2292 if( bFirstTime == false && nARPWMax ) 2227 2293 { … … 2246 2312 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth] ); 2247 2313 #endif 2248 #if H_3D_ARP2314 #if NH_3D_ARP 2249 2315 if( nARPWMax ) 2250 2316 { … … 2257 2323 if ( !rpcTempCU->getMergeAMP() ) 2258 2324 { 2259 #if H_3D_ARP2325 #if NH_3D_ARP 2260 2326 if( nARPWMax ) 2261 2327 { … … 2278 2344 2279 2345 m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false DEBUG_STRING_PASS_INTO(sTest) ); 2280 #if H_3D_VSP // possible bug fix2281 2282 2283 2284 2346 #if NH_3D_VSP 2347 if( rpcTempCU->getQtRootCbf(0)==0 ) 2348 { 2349 rpcTempCU->setTrIdxSubParts(0, 0, uhDepth); 2350 } 2285 2351 #endif 2286 2352 #if NH_3D_VSO // M4 … … 2374 2440 } 2375 2441 #endif 2376 #if H_3D_ARP2442 #if NH_3D_ARP 2377 2443 } 2378 2444 #endif … … 2382 2448 } 2383 2449 2384 #if H_3D_DBBP2450 #if NH_3D_DBBP 2385 2451 Void TEncCu::xInvalidateOriginalSegments( TComYuv* pOrigYuv, TComYuv* pOrigYuvTemp, Bool* pMask, UInt uiValidSegment ) 2386 2452 { 2387 UInt uiWidth = pOrigYuv->getWidth ( 2388 UInt uiHeight = pOrigYuv->getHeight( 2389 Pel* piSrc = pOrigYuv->get LumaAddr();2390 UInt uiSrcStride = pOrigYuv->getStride( );2391 Pel* piDst = pOrigYuvTemp->get LumaAddr();2392 UInt uiDstStride = pOrigYuvTemp->getStride( );2453 UInt uiWidth = pOrigYuv->getWidth (COMPONENT_Y); 2454 UInt uiHeight = pOrigYuv->getHeight(COMPONENT_Y); 2455 Pel* piSrc = pOrigYuv->getAddr(COMPONENT_Y); 2456 UInt uiSrcStride = pOrigYuv->getStride(COMPONENT_Y); 2457 Pel* piDst = pOrigYuvTemp->getAddr(COMPONENT_Y); 2458 UInt uiDstStride = pOrigYuvTemp->getStride(COMPONENT_Y); 2393 2459 2394 2460 UInt uiMaskStride= MAX_CU_SIZE; … … 2415 2481 2416 2482 // now invalidate chroma 2417 Pel* piSrcU = pOrigYuv->get CbAddr();2418 Pel* piSrcV = pOrigYuv->get CrAddr();2419 UInt uiSrcStrideC = pOrigYuv->get CStride();2420 Pel* piDstU = pOrigYuvTemp->get CbAddr();2421 Pel* piDstV = pOrigYuvTemp->get CrAddr();2422 UInt uiDstStrideC = pOrigYuvTemp->get CStride();2483 Pel* piSrcU = pOrigYuv->getAddr(COMPONENT_Cb); 2484 Pel* piSrcV = pOrigYuv->getAddr(COMPONENT_Cr); 2485 UInt uiSrcStrideC = pOrigYuv->getStride(COMPONENT_Cb); 2486 Pel* piDstU = pOrigYuvTemp->getAddr(COMPONENT_Cb); 2487 Pel* piDstV = pOrigYuvTemp->getAddr(COMPONENT_Cr); 2488 UInt uiDstStrideC = pOrigYuvTemp->getStride(COMPONENT_Cb); 2423 2489 pMask = pMaskStart; 2424 2490 … … 2441 2507 } 2442 2508 } 2443 2509 #endif 2510 2511 #if NH_3D_DBBP 2444 2512 Void TEncCu::xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG ) 2445 2513 { … … 2463 2531 AOF( uiWidth == uiHeight ); 2464 2532 2465 #if H_3D_DBBP 2466 // Is this correct here, was under the macro SEC_DBBP_DISALLOW_8x8_I0078, however the function is related to Single Depth Mode 2533 #if NH_3D_DBBP 2467 2534 if(uiWidth <= 8) 2468 2535 { … … 2515 2582 rpcTempCU->getDBBPTmpData()->eVirtualPartSize = eVirtualPartSize; 2516 2583 rpcTempCU->getDBBPTmpData()->uiVirtualPartIndex = uiSegment; 2517 m_pcPredSearch->predInterSearch( rpcTempCU, m_ppcOrigYuvDBBP[uhDepth], apPredYuv[uiSegment], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], false, false,bUseMRG );2584 m_pcPredSearch->predInterSearch( rpcTempCU, m_ppcOrigYuvDBBP[uhDepth], apPredYuv[uiSegment], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], false, bUseMRG ); 2518 2585 m_pcRdCost->setUseMask(false); 2519 2586 … … 2524 2591 pDBBPTmpData->auhMergeIndex[uiSegment] = rpcTempCU->getMergeIndex(0); 2525 2592 2593 #if NH_3D_VSP 2526 2594 AOF( rpcTempCU->getSPIVMPFlag(0) == false ); 2527 2595 AOF( rpcTempCU->getVSPFlag(0) == 0 ); 2596 #endif 2528 2597 2529 2598 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) … … 2544 2613 rpcTempCU->setPredModeSubParts ( MODE_INTER, 0, uhDepth ); 2545 2614 2546 UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( rpcTempCU->getSlice()->getSPS()->getMax CUDepth() - uhDepth ) << 1 ) ) >> 4;2615 UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( rpcTempCU->getSlice()->getSPS()->getMaxTotalCUDepth() - uhDepth ) << 1 ) ) >> 4; 2547 2616 for( UInt uiSegment = 0; uiSegment < 2; uiSegment++ ) 2548 2617 { … … 2570 2639 2571 2640 // reconstruct final prediction signal by combining both segments 2572 m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight, 0, eVirtualPartSize); 2641 Int bitDepthY = rpcTempCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA); 2642 m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight, 0, eVirtualPartSize, bitDepthY); 2573 2643 m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false ); 2574 2644 -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncCu.h
r1258 r1279 69 69 TComDataCU** m_ppcBestCU; ///< Best CUs in each depth 70 70 TComDataCU** m_ppcTempCU; ///< Temporary CUs in each depth 71 #if H_3D_ARP71 #if NH_3D_ARP 72 72 TComDataCU** m_ppcWeightedTempCU; 73 73 #endif … … 82 82 TComYuv** m_ppcOrigYuv; ///< Original Yuv for each depth 83 83 84 #if H_3D_DBBP84 #if NH_3D_DBBP 85 85 TComYuv** m_ppcOrigYuvDBBP; 86 86 #endif … … 155 155 Void xCheckRDCostInter ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize ); 156 156 #endif 157 #if H_3D_DBBP157 #if NH_3D_DBBP 158 158 Void xInvalidateOriginalSegments( TComYuv* pOrigYuv, TComYuv* pOrigYuvTemp, Bool* pMask, UInt uiValidSegment ); 159 159 Void xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG = false ); -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncEntropy.cpp
r1258 r1279 148 148 } 149 149 150 #if H_3D_IC150 #if NH_3D_IC 151 151 Void TEncEntropy::encodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 152 152 { 153 #if NH_3D_ARP 153 154 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() || pcCU->getARPW( uiAbsPartIdx ) > 0 ) 155 #else 156 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() ) 157 #endif 154 158 { 155 159 return; … … 184 188 #endif 185 189 186 #if H_3D_ARP190 #if NH_3D_ARP 187 191 Void TEncEntropy::encodeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx ) 188 192 { … … 870 874 871 875 #endif 872 #if H_3D_DBBP876 #if NH_3D_DBBP 873 877 Void TEncEntropy::encodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 874 878 { 879 if( bRD ) 880 { 881 uiAbsPartIdx = 0; 882 } 883 875 884 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && 876 885 ( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || … … 879 888 pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() ) 880 889 { 881 if( bRD )882 {883 uiAbsPartIdx = 0;884 }885 890 m_pcEntropyCoderIf->codeDBBPFlag( pcCU, uiAbsPartIdx ); 886 891 } -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncEntropy.h
r1258 r1279 87 87 virtual Void codeDeltaDC ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 88 88 #endif 89 #if H_3D_ARP89 #if NH_3D_ARP 90 90 virtual Void codeARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 91 91 #endif 92 #if H_3D_IC92 #if NH_3D_IC 93 93 virtual Void codeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 94 94 #endif … … 96 96 virtual Void codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 97 97 #endif 98 #if H_3D_DBBP98 #if NH_3D_DBBP 99 99 virtual Void codeDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 100 100 #endif … … 175 175 Void encodeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 176 176 Void encodeMergeIndex ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 177 #if H_3D_ARP177 #if NH_3D_ARP 178 178 Void encodeARPW ( TComDataCU* pcCU, UInt uiAbspartIdx ); 179 179 #endif 180 #if H_3D_IC180 #if NH_3D_IC 181 181 Void encodeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 182 182 #endif … … 187 187 Void encodeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 188 188 #endif 189 #if H_3D_DBBP189 #if NH_3D_DBBP 190 190 Void encodeDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 191 191 #endif -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncGOP.cpp
r1200 r1279 155 155 #endif 156 156 #endif 157 #if H_3D_IC157 #if NH_3D_IC 158 158 m_aICEnableCandidate = pcTEncTop->getICEnableCandidate(); 159 159 m_aICEnableNum = pcTEncTop->getICEnableNum(); … … 1443 1443 } 1444 1444 1445 #if H_3D_IV_MERGE1445 #if NH_3D_IV_MERGE 1446 1446 // This needs to be done after initialization of 3D tool parameters. 1447 1447 pcSlice->setMaxNumMergeCand ( m_pcCfg->getMaxNumMergeCand() + ( ( pcSlice->getMpiFlag( ) || pcSlice->getIvMvPredFlag( ) || pcSlice->getViewSynthesisPredFlag( ) ) ? 1 : 0 )); … … 1471 1471 pcSlice->setRefPicList ( rcListPic ); 1472 1472 #endif 1473 #if H_3D1473 #if NH_3D_NBDV 1474 1474 pcSlice->setDefaultRefView(); 1475 1475 #endif 1476 #if H_3D_ARP1476 #if NH_3D_ARP 1477 1477 //GT: This seems to be broken when layerId in vps is not equal to layerId in nuh 1478 1478 pcSlice->setARPStepNum(m_ivPicLists); 1479 if(pcSlice->getARPStepNum() > 1) 1480 { 1481 for(Int iLayerId = 0; iLayerId < getLayerId(); iLayerId ++ ) 1482 { 1483 Int iViewIdx = pcSlice->getVPS()->getViewIndex(iLayerId); 1484 Bool bIsDepth = ( pcSlice->getVPS()->getDepthId ( iLayerId ) == 1 ); 1485 if( iViewIdx<getViewIndex() && !bIsDepth ) 1486 { 1487 pcSlice->setBaseViewRefPicList( m_ivPicLists->getPicList( iLayerId ), iViewIdx ); 1488 } 1489 } 1490 } 1491 #endif 1492 #if H_3D_IC 1479 #endif 1480 #if NH_3D_IC 1493 1481 pcSlice->setICEnableCandidate( m_aICEnableCandidate ); 1494 1482 pcSlice->setICEnableNum( m_aICEnableNum ); … … 1547 1535 1548 1536 pcSlice->setList1IdxToList0Idx(); 1549 #if H_3D_TMVP1537 #if NH_3D_TMVP 1550 1538 if(pcSlice->getLayerId()) 1551 1539 pcSlice->generateAlterRefforTMVP(); … … 1731 1719 UInt uiNumSliceSegments = 1; 1732 1720 1733 #if H_3D_NBDV1721 #if NH_3D_NBDV 1734 1722 if(pcSlice->getViewIndex() && !pcSlice->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done. 1735 1723 { 1736 Int iColPoc = pcSlice->getRefPOC(RefPicList(1 -pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx());1724 Int iColPoc = pcSlice->getRefPOC(RefPicList(1 - pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx()); 1737 1725 pcPic->setNumDdvCandPics(pcPic->getDisCandRefPictures(iColPoc)); 1738 1726 } … … 1743 1731 #endif 1744 1732 1745 #if H_3D_NBDV1733 #if NH_3D_NBDV 1746 1734 if(pcSlice->getViewIndex() && !pcSlice->getIsDepth() && !pcSlice->isIntra()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done. 1747 1735 { -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncGOP.h
r1200 r1279 132 132 #endif 133 133 #endif 134 #if H_3D_IC134 #if NH_3D_IC 135 135 Int* m_aICEnableCandidate; 136 136 Int* m_aICEnableNum; -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncSbac.cpp
r1258 r1279 68 68 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 69 69 , m_cCUMergeIdxExtSCModel ( 1, 1, NUM_MERGE_IDX_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 70 #if H_3D_ARP70 #if NH_3D_ARP 71 71 , m_cCUPUARPWSCModel ( 1, 1, NUM_ARPW_CTX , m_contextModels + m_numContextModels, m_numContextModels) 72 72 #endif 73 #if H_3D_IC73 #if NH_3D_IC 74 74 , m_cCUICFlagSCModel ( 1, 1, NUM_IC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 75 75 #endif … … 115 115 , m_cDdcFlagSCModel ( 1, 1, NUM_DDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 116 116 #endif 117 #if H_3D_DBBP117 #if NH_3D_DBBP 118 118 , m_cDBBPFlagSCModel ( 1, 1, DBBP_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 119 119 #endif … … 149 149 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT); 150 150 m_cCUMergeIdxExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT); 151 #if H_3D_ARP151 #if NH_3D_ARP 152 152 m_cCUPUARPWSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ARPW ); 153 153 #endif 154 #if H_3D_IC154 #if NH_3D_IC 155 155 m_cCUICFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_IC_FLAG ); 156 156 #endif … … 196 196 m_cDdcFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_FLAG ); 197 197 #endif 198 #if H_3D_DBBP198 #if NH_3D_DBBP 199 199 m_cDBBPFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DBBP_FLAG ); 200 200 #endif … … 237 237 curCost += m_cCUMergeFlagExtSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT); 238 238 curCost += m_cCUMergeIdxExtSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_MERGE_IDX_EXT); 239 #if H_3D_ARP239 #if NH_3D_ARP 240 240 curCost += m_cCUPUARPWSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_ARPW ); 241 241 #endif 242 #if H_3D_IC242 #if NH_3D_IC 243 243 curCost += m_cCUICFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_IC_FLAG ); 244 244 #endif … … 246 246 curCost += m_cSDCFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SDC_FLAG ); 247 247 #endif 248 #if H_3D_DBBP248 #if NH_3D_DBBP 249 249 curCost += m_cDBBPFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DBBP_FLAG ); 250 250 #endif … … 297 297 } 298 298 } 299 #if H_3D_ARP300 m_cCUPUARPWSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ARPW );301 #endif302 #if H_3D_IC303 m_cCUICFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_IC_FLAG );304 #endif305 #if H_3D_DBBP306 m_cDBBPFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DBBP_FLAG );307 #endif308 299 309 300 … … 576 567 { 577 568 PartSize eSize = pcCU->getPartitionSize( uiAbsPartIdx ); 578 #if H_3D_QTLPC569 #if NH_3D_QTLPC 579 570 Bool bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag(); 580 571 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); … … 593 584 #endif 594 585 { 595 TComDataCU *pcTextureCU = pcTexture->getC U(pcCU->getAddr());596 UInt uiCUIdx = (pcCU->getZorderIdxInC U() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU();586 TComDataCU *pcTextureCU = pcTexture->getCtu(pcCU->getCtuRsAddr()); 587 UInt uiCUIdx = (pcCU->getZorderIdxInCtu() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCtu(); 597 588 assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); 598 589 if(pcTextureCU->getDepth(uiCUIdx) == uiDepth ) … … 625 616 DTRACE_CU("part_mode", eSize ) 626 617 #endif 627 #if H_3D_QTLPC618 #if NH_3D_QTLPC 628 619 if (depthDependent==false || uiTexturePart == SIZE_NxN|| uiTexturePart == SIZE_2Nx2N) 629 620 { … … 699 690 } 700 691 } 701 #if H_3D_QTLPC692 #if NH_3D_QTLPC 702 693 } 703 694 else if(uiTexturePart == SIZE_2NxN || uiTexturePart == SIZE_2NxnU || uiTexturePart == SIZE_2NxnD) … … 716 707 { 717 708 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 718 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ))709 if ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) 719 710 { 720 711 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 1) ); … … 751 742 { 752 743 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 753 if ( pcCU->getSlice()->getSPS()->get AMPAcc( uiDepth ))744 if ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) 754 745 { 755 746 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 1) ); … … 894 885 } 895 886 896 #if H_3D_ARP887 #if NH_3D_ARP 897 888 Void TEncSbac::codeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx ) 898 889 { … … 914 905 #endif 915 906 916 #if H_3D_IC907 #if NH_3D_IC 917 908 /** code Illumination Compensation flag 918 909 * \param pcCU … … 949 940 950 941 assert( uiCtx < 3 ); 951 #if H_3D_QTLPC942 #if NH_3D_QTLPC 952 943 Bool bCodeSplitFlag = true; 953 944 … … 966 957 #endif 967 958 { 968 TComDataCU *pcTextureCU = pcTexture->getC U(pcCU->getAddr());969 UInt uiCUIdx = (pcCU->getZorderIdxInC U() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU();959 TComDataCU *pcTextureCU = pcTexture->getCtu(pcCU->getCtuRsAddr()); 960 UInt uiCUIdx = (pcCU->getZorderIdxInCtu() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCtu(); 970 961 assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); 971 962 bCodeSplitFlag = (pcTextureCU->getDepth(uiCUIdx) > uiDepth); … … 2635 2626 #endif 2636 2627 2637 #if H_3D_DBBP2628 #if NH_3D_DBBP 2638 2629 Void TEncSbac::codeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2639 2630 { -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncSbac.h
r1258 r1279 143 143 Void codeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 144 144 Void codeMergeIndex ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 145 #if H_3D_ARP145 #if NH_3D_ARP 146 146 Void codeARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 147 147 #endif 148 #if H_3D_IC148 #if NH_3D_IC 149 149 Void codeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 150 150 #endif … … 155 155 Void codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 156 156 #endif 157 #if H_3D_DBBP157 #if NH_3D_DBBP 158 158 Void codeDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 159 159 #endif … … 210 210 ContextModel3DBuffer m_cCUMergeFlagExtSCModel; 211 211 ContextModel3DBuffer m_cCUMergeIdxExtSCModel; 212 #if H_3D_ARP212 #if NH_3D_ARP 213 213 ContextModel3DBuffer m_cCUPUARPWSCModel; 214 214 #endif 215 #if H_3D_IC215 #if NH_3D_IC 216 216 ContextModel3DBuffer m_cCUICFlagSCModel; 217 217 #endif … … 261 261 ContextModel3DBuffer m_cDdcFlagSCModel; 262 262 #endif 263 #if H_3D_DBBP263 #if NH_3D_DBBP 264 264 ContextModel3DBuffer m_cDBBPFlagSCModel; 265 265 #endif -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncSearch.cpp
r1258 r1279 340 340 341 341 piRefSrch = rcStruct.piRefY + iSearchY * rcStruct.iYStride + iSearchX; 342 #if H_3D_IC342 #if NH_3D_IC 343 343 m_cDistParam.bUseIC = pcPatternKey->getICFlag(); 344 344 #endif … … 851 851 852 852 setDistParamComp(COMPONENT_Y); 853 #if H_3D_IC853 #if NH_3D_IC 854 854 m_cDistParam.bUseIC = pcPatternKey->getICFlag(); 855 855 #endif … … 2901 2901 const Bool bUseHadamard=pcCU->getCUTransquantBypass(0) == 0; 2902 2902 m_pcRdCost->setDistParam(distParam, sps.getBitDepth(CHANNEL_TYPE_LUMA), piOrg, uiStride, piPred, uiStride, puRect.width, puRect.height, bUseHadamard); 2903 2904 #if NH_3D_IC_FIX 2905 distParam.bUseIC = false; 2906 #endif 2907 #if H_3D_INTER_SDC_FIX 2908 distParam.bUseSDCMRSAD = false; 2909 #endif 2903 2910 distParam.bApplyWeight = false; 2904 2911 for( Int modeIdx = 0; modeIdx < numModesAvailable; modeIdx++ ) … … 3835 3842 iWidth, iHeight, m_pcEncCfg->getUseHADME() && (pcCU->getCUTransquantBypass(iPartIdx) == 0) ); 3836 3843 3837 #if H_3D_IC3844 #if NH_3D_IC 3838 3845 cDistParam.bUseIC = false; 3839 3846 #endif … … 3847 3854 //! estimation of best merge coding 3848 3855 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, Distortion& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand 3849 #if H_3D_VSP3856 #if NH_3D_VSP 3850 3857 , Int* vspFlag 3851 3858 #endif 3852 #if H_3D_SPIVMP3859 #if NH_3D_SPIVMP 3853 3860 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP 3854 3861 #endif … … 3862 3869 UInt uiDepth = pcCU->getDepth( uiAbsPartIdx ); 3863 3870 3864 #if H_3D_DBBP3871 #if NH_3D_DBBP 3865 3872 DbbpTmpData* pDBBPTmpData = pcCU->getDBBPTmpData(); 3866 3873 if( pcCU->getDBBPFlag(0) ) … … 3869 3876 AOF( iPUIdx == 0 ); 3870 3877 AOF( pcCU->getPartitionSize(0) == SIZE_2Nx2N ); 3871 AOF( pDBBPTmpData->eVirtualPartSize != SIZE_NONE);3878 AOF( pDBBPTmpData->eVirtualPartSize != NUMBER_OF_PART_SIZES ); 3872 3879 3873 3880 // temporary change of partition size for candidate derivation … … 3894 3901 3895 3902 PartSize partSize = pcCU->getPartitionSize( 0 ); 3896 #if H_3D_DBBP3903 #if NH_3D_DBBP 3897 3904 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && partSize != SIZE_2Nx2N && pcCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(0) == false ) 3898 3905 #else … … 3903 3910 { 3904 3911 pcCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); // temporarily set 3905 #if H_3D3912 #if NH_3D_MLC 3906 3913 pcCU->initAvailableFlags(); 3907 pcCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand );3914 pcCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); 3908 3915 pcCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 3909 #if H_3D_SPIVMP3916 #if NH_3D_SPIVMP 3910 3917 , pcMvFieldSP, puhInterDirSP 3911 3918 #endif … … 3914 3921 3915 3922 pcCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours 3916 #if H_3D_VSP3923 #if NH_3D_VSP 3917 3924 , vspFlag 3918 3925 #endif 3919 #if H_3D_SPIVMP3926 #if NH_3D_SPIVMP 3920 3927 , pbSPIVMPFlag 3921 3928 #endif 3922 3929 , numValidMergeCand 3923 3930 ); 3924 3931 #else … … 3930 3937 else 3931 3938 { 3932 #if H_3D3939 #if NH_3D_MLC 3933 3940 pcCU->initAvailableFlags(); 3934 pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);3941 pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 3935 3942 pcCU->xGetInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours 3936 #if H_3D_SPIVMP3943 #if NH_3D_SPIVMP 3937 3944 , pcMvFieldSP, puhInterDirSP 3938 3945 #endif … … 3941 3948 3942 3949 pcCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours 3943 #if H_3D_VSP3950 #if NH_3D_VSP 3944 3951 , vspFlag 3945 3952 #endif 3946 #if H_3D_SPIVMP3953 #if NH_3D_SPIVMP 3947 3954 , pbSPIVMPFlag 3948 3955 #endif 3949 3956 , numValidMergeCand 3950 3957 ); 3951 3958 #else … … 3956 3963 xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 3957 3964 3958 #if H_3D_DBBP3965 #if NH_3D_DBBP 3959 3966 if( pcCU->getDBBPFlag(0) ) 3960 3967 { … … 3979 3986 3980 3987 PartSize ePartSize = pcCU->getPartitionSize( 0 ); 3981 #if H_3D_VSP3988 #if NH_3D_VSP 3982 3989 pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3983 3990 #endif 3984 3991 3985 #if H_3D_SPIVMP3992 #if NH_3D_SPIVMP 3986 3993 pcCU->setSPIVMPFlagSubParts( pbSPIVMPFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx )); 3987 3994 if (pbSPIVMPFlag[uiMergeCand]) … … 4002 4009 else 4003 4010 #endif 4004 #if H_3D_VSP4005 #if H_3D_DBBP4011 #if NH_3D_VSP 4012 #if NH_3D_DBBP 4006 4013 if ( vspFlag[uiMergeCand] && !pcCU->getDBBPFlag(0) ) 4007 4014 #else … … 4039 4046 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx ); 4040 4047 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx ); 4041 #if H_3D_VSP4048 #if NH_3D_VSP 4042 4049 } 4043 4050 #endif … … 4150 4157 Distortion biPDistTemp = std::numeric_limits<Distortion>::max(); 4151 4158 4152 #if H_3D_IV_MERGE4159 #if NH_3D_IV_MERGE 4153 4160 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists 4154 4161 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM]; … … 4185 4192 4186 4193 pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iRoiWidth, iRoiHeight ); 4187 #if H_3D_VSP4194 #if NH_3D_VSP 4188 4195 pcCU->setVSPFlagSubParts( 0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr) ); 4189 4196 #endif … … 4528 4535 } // end if bTestNormalMC 4529 4536 #endif 4530 #if H_3D_DBBP4537 #if NH_3D_DBBP 4531 4538 // test merge mode for DBBP (2Nx2N) 4532 4539 if ( pcCU->getPartitionSize( uiPartAddr ) != SIZE_2Nx2N || pcCU->getDBBPFlag(0) ) … … 4568 4575 Distortion uiMRGCost = std::numeric_limits<Distortion>::max(); 4569 4576 4570 #if H_3D_VSP4577 #if NH_3D_VSP 4571 4578 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 4572 4579 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); … … 4577 4584 DisInfo OriginalDvInfo = pcCU->getDvInfo(uiAbsPartIdx); 4578 4585 #endif 4579 #if H_3D_SPIVMP4586 #if NH_3D_SPIVMP 4580 4587 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 4581 4588 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 4582 4589 TComMvField* pcMvFieldSP; 4583 4590 UChar* puhInterDirSP; 4584 pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2]; 4585 puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()]; 4586 #endif 4587 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours 4588 4589 #if H_3D_VSP 4591 pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2]; 4592 puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()]; 4593 #endif 4594 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand 4595 #if NH_3D_VSP 4590 4596 , vspFlag 4591 4597 #endif 4592 #if H_3D_SPIVMP4598 #if NH_3D_SPIVMP 4593 4599 , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP 4594 4600 #endif 4595 , numValidMergeCand);4601 ); 4596 4602 4597 4603 if ( uiMRGCost < uiMECost ) … … 4600 4606 pcCU->setMergeFlagSubParts ( true, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4601 4607 pcCU->setMergeIndexSubParts( uiMRGIndex, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4602 #if H_3D_VSP4608 #if NH_3D_VSP 4603 4609 pcCU->setVSPFlagSubParts( vspFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4604 4610 #endif 4605 #if H_3D_SPIVMP4611 #if NH_3D_SPIVMP 4606 4612 pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4607 4613 if (bSPIVMPFlag[uiMRGIndex]!=0) … … 4626 4632 else 4627 4633 #endif 4628 #if H_3D_VSP4629 #if H_3D_DBBP4634 #if NH_3D_VSP 4635 #if NH_3D_DBBP 4630 4636 if ( vspFlag[uiMRGIndex] && !pcCU->getDBBPFlag(uiPartAddr) ) 4631 4637 #else … … 4663 4669 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMRGMvField[0], ePartSize, uiPartAddr, 0, iPartIdx ); 4664 4670 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMRGMvField[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4671 #if NH_3D_VSP 4672 } 4673 #endif 4665 4674 #if H_3D 4666 4675 } … … 4676 4685 else 4677 4686 { 4678 #if H_3D_SPIVMP4687 #if NH_3D_SPIVMP 4679 4688 pcCU->setSPIVMPFlagSubParts(0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4680 4689 #endif … … 4682 4691 pcCU->setMergeFlagSubParts( false, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4683 4692 pcCU->setInterDirSubParts ( uiMEInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4684 #if H_3D_VSP4693 #if NH_3D_VSP 4685 4694 pcCU->setVSPFlagSubParts ( 0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4686 4695 pcCU->setDvInfoSubParts(OriginalDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); … … 4689 4698 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMEMvField[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4690 4699 } 4691 #if H_3D_SPIVMP4700 #if NH_3D_SPIVMP 4692 4701 delete[] pcMvFieldSP; 4693 4702 delete[] puhInterDirSP; … … 4725 4734 { 4726 4735 4727 #if H_3D_DBBP4736 #if NH_3D_DBBP 4728 4737 DbbpTmpData* pDBBPTmpData = pcCU->getDBBPTmpData(); 4729 4738 if( pcCU->getDBBPFlag(0) ) … … 4732 4741 AOF( uiPartIdx == 0 ); 4733 4742 AOF( pcCU->getPartitionSize(0) == SIZE_2Nx2N ); 4734 AOF( pDBBPTmpData->eVirtualPartSize != SIZE_NONE);4743 AOF( pDBBPTmpData->eVirtualPartSize != NUMBER_OF_PART_SIZES ); 4735 4744 AOF( iRoiWidth == iRoiHeight ); 4736 4745 … … 4757 4766 4758 4767 pcCU->fillMvpCand( uiPartIdx, uiPartAddr, eRefPicList, iRefIdx, pcAMVPInfo ); 4759 #if H_3D_DBBP4768 #if NH_3D_DBBP 4760 4769 if( pcCU->getDBBPFlag(0) ) 4761 4770 { … … 4978 4987 pcCU->clipMv( cMvCand ); 4979 4988 4980 #if H_3D_IC4989 #if NH_3D_IC 4981 4990 Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getViewIndex() != pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() ); 4982 4991 #endif … … 4985 4994 if ( pcCU->getSlice()->testWeightPred() && pcCU->getSlice()->getSliceType()==P_SLICE ) 4986 4995 { 4987 xPredInterBlk( COMPONENT_Y, pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, true, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) ); 4996 xPredInterBlk( COMPONENT_Y, pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, true, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) 4997 #if NH_3D_ARP 4998 , false //add this for IC, otherwise, it could be removed 4999 #endif 5000 ); 4988 5001 } 4989 5002 else 4990 5003 { 4991 5004 xPredInterBlk( COMPONENT_Y, pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, false, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) 4992 #if H_3D_ARP5005 #if NH_3D_ARP 4993 5006 , false 4994 5007 #endif 4995 #if H_3D_IC5008 #if NH_3D_IC 4996 5009 , bICFlag 4997 5010 #endif … … 5038 5051 pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iRoiWidth, iRoiHeight ); 5039 5052 5040 #if H_3D_IC5053 #if NH_3D_IC 5041 5054 Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getViewIndex() != pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getViewIndex() ); 5042 5055 pcPatternKey->setICFlag( bICFlag ); … … 5085 5098 5086 5099 m_pcRdCost->setPredictor ( *pcMvPred ); 5087 #if H_3D_IC5100 #if NH_3D_INTEGER_MV_DEPTH 5088 5101 if( pcCU->getSlice()->getIsDepth() ) 5089 5102 { … … 5094 5107 #endif 5095 5108 m_pcRdCost->setCostScale ( 2 ); 5096 #if H_3D_IC5109 #if NH_3D_INTEGER_MV_DEPTH 5097 5110 } 5098 5111 #endif … … 5121 5134 5122 5135 m_pcRdCost->getMotionCost( true, 0, pcCU->getCUTransquantBypass(uiPartAddr) ); 5123 #if H_3D_IC5136 #if NH_3D_INTEGER_MV_DEPTH 5124 5137 if( ! pcCU->getSlice()->getIsDepth() ) 5125 5138 { … … 5134 5147 rcMv += (cMvHalf <<= 1); 5135 5148 rcMv += cMvQter; 5136 #if H_3D_IC5149 #if NH_3D_INTEGER_MV_DEPTH 5137 5150 } 5138 5151 #endif 5139 5152 5140 5153 UInt uiMvBits = m_pcRdCost->getBits( rcMv.getHor(), rcMv.getVer() ); 5141 #if H_3D_IC5154 #if NH_3D_INTEGER_MV_DEPTH 5142 5155 if( pcCU->getSlice()->getIsDepth() ) 5143 5156 { … … 5153 5166 { 5154 5167 Int iMvShift = 2; 5155 #if H_3D_IC5168 #if NH_3D_INTEGER_MV_DEPTH 5156 5169 if( pcCU->getSlice()->getIsDepth() ) 5157 5170 { … … 5228 5241 m_cDistParam.bitDepth = pcPatternKey->getBitDepthY(); 5229 5242 5230 #if H_3D_IC5243 #if NH_3D_IC 5231 5244 m_cDistParam.bUseIC = pcPatternKey->getICFlag(); 5232 5245 #endif … … 5311 5324 UInt uiSearchRange = m_iSearchRange; 5312 5325 pcCU->clipMv( rcMv ); 5313 #if H_3D_IC5326 #if NH_3D_INTEGER_MV_DEPTH 5314 5327 if( ! pcCU->getSlice()->getIsDepth() ) 5315 5328 #endif … … 5331 5344 TComMv cMv = m_acMvPredictors[index]; 5332 5345 pcCU->clipMv( cMv ); 5333 #if H_3D_IC5346 #if NH_3D_INTEGER_MV_DEPTH 5334 5347 if( ! pcCU->getSlice()->getIsDepth() ) 5335 5348 { 5336 5349 #endif 5337 5350 cMv >>= 2; 5338 #if H_3D_IC5351 #if NH_3D_INTEGER_MV_DEPTH 5339 5352 } 5340 5353 #endif … … 5759 5772 m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true); 5760 5773 m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, true ); 5761 #if H_3D_ARP5774 #if NH_3D_ARP 5762 5775 m_pcEntropyCoder->encodeARPW( pcCU, 0 ); 5763 5776 #endif 5764 #if H_3D_IC5777 #if NH_3D_IC 5765 5778 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true ); 5766 5779 #endif … … 5855 5868 const Double zeroCost = (pcCU->isLosslessCoded( 0 )) ? (nonZeroCost+1) : (m_pcRdCost->calcRdCost( zeroResiBits, zeroDistortion )); 5856 5869 #endif 5857 #if H_3D_SPIVMP5858 if ( dZeroCost < dCost || pcCU->getQtRootCbf(0)==0)5870 #if NH_3D_SPIVMP 5871 if ( zeroCost < nonZeroCost || pcCU->getQtRootCbf(0)==0) 5859 5872 #else 5860 5873 if ( zeroCost < nonZeroCost || !pcCU->getQtRootCbf(0) ) … … 7078 7091 m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true); 7079 7092 m_pcEntropyCoder->encodeMergeIndex(pcCU, 0, true); 7080 #if H_3D_ARP7093 #if NH_3D_ARP 7081 7094 m_pcEntropyCoder->encodeARPW( pcCU, 0 ); 7082 7095 #endif 7083 #if H_3D_IC7096 #if NH_3D_IC 7084 7097 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true ); 7085 7098 #endif … … 7105 7118 m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true ); 7106 7119 #endif 7107 #if H_3D_ARP7120 #if NH_3D_ARP 7108 7121 m_pcEntropyCoder->encodeARPW( pcCU , 0 ); 7109 7122 #endif 7110 #if H_3D_IC7123 #if NH_3D_IC 7111 7124 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true ); 7112 7125 #endif 7113 #if H_3D7126 #if NH_3D_DBBP 7114 7127 m_pcEntropyCoder->encodeDBBPFlag( pcCU, 0, true ); 7115 7128 #endif -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncSearch.h
r1258 r1279 411 411 TComMvField* cMvFieldNeighbours, 412 412 UChar* uhInterDirNeighbours, 413 #if H_3D_VSP 413 Int& numValidMergeCand 414 #if NH_3D_VSP 414 415 , Int* vspFlag 415 416 #endif 416 #if H_3D_SPIVMP417 #if NH_3D_SPIVMP 417 418 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP 418 419 #endif 419 Int& numValidMergeCand420 420 ); 421 421 -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncSlice.cpp
r1200 r1279 226 226 rpcSlice->setPicOutputFlag( true ); 227 227 rpcSlice->setPOC( pocCurr ); 228 #if H_3D_IC228 #if NH_3D_IC 229 229 rpcSlice->setApplyIC( false ); 230 230 #endif … … 567 567 rpcSlice->setSliceSegmentMode ( m_pcCfg->getSliceSegmentMode() ); 568 568 rpcSlice->setSliceSegmentArgument ( m_pcCfg->getSliceSegmentArgument() ); 569 #if H_3D_IV_MERGE569 #if NH_3D_IV_MERGE 570 570 #else 571 571 rpcSlice->setMaxNumMergeCand ( m_pcCfg->getMaxNumMergeCand() ); … … 823 823 #endif 824 824 825 #if H_3D_IC826 if ( pcEncTop->getViewIndex() && pcEncTop->getUseIC() &&825 #if NH_3D_IC 826 if ( m_pcCfg->getViewIndex() && m_pcCfg->getUseIC() && 827 827 !( ( pcSlice->getSliceType() == P_SLICE && pcSlice->getPPS()->getUseWP() ) || ( pcSlice->getSliceType() == B_SLICE && pcSlice->getPPS()->getWPBiPred() ) ) 828 828 ) 829 829 { 830 pcSlice ->xSetApplyIC( pcEncTop->getUseICLowLatencyEnc());830 pcSlice ->xSetApplyIC(m_pcCfg->getUseICLowLatencyEnc()); 831 831 if ( pcSlice->getApplyIC() ) 832 832 { … … 1121 1121 g_bJustDoIt = g_bEncDecTraceEnable; 1122 1122 #endif 1123 #if H_MV_ENC_DEC_TRAC 1124 #if ENC_DEC_TRACE 1125 incSymbolCounter(); 1126 #endif 1127 DTRACE_CABAC_VL( g_nSymbolCounter ); 1128 #else 1123 1129 DTRACE_CABAC_VL( g_nSymbolCounter++ ); 1130 #endif 1124 1131 DTRACE_CABAC_T( "\tPOC: " ); 1125 1132 DTRACE_CABAC_V( pcPic->getPOC() ); … … 1194 1201 } 1195 1202 1196 #if H_3D_QTLPC1197 rpcPic->setReduceBitsFlag(true);1203 #if NH_3D_QTLPC 1204 pcPic->setReduceBitsFlag(true); 1198 1205 #endif 1199 1206 if ( pcSlice->getSPS()->getUseSAO() ) … … 1266 1273 } 1267 1274 } 1268 #if H_3D_QTLPC1269 rpcPic->setReduceBitsFlag(false);1275 #if NH_3D_QTLPC 1276 pcPic->setReduceBitsFlag(false); 1270 1277 #endif 1271 1278 } // CTU-loop -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncTop.cpp
r1251 r1279 79 79 m_ivPicLists = NULL; 80 80 #endif 81 #if H_3D_IC81 #if NH_3D_IC 82 82 m_aICEnableCandidate = NULL; 83 83 m_aICEnableNum = NULL; … … 227 227 228 228 xInitPPSforTiles(); 229 #if H_3D_IC229 #if NH_3D_IC 230 230 m_aICEnableCandidate = new Int[ 10 ]; 231 231 m_aICEnableNum = new Int[ 10 ]; -
branches/HTM-14.1-update-dev1/source/Lib/TLibEncoder/TEncTop.h
r1200 r1279 81 81 TComPicLists* m_ivPicLists; ///< access to picture lists of other layers 82 82 #endif 83 #if H_3D_IC83 #if NH_3D_IC 84 84 Int *m_aICEnableCandidate; 85 85 Int *m_aICEnableNum; … … 158 158 TComPicLists* getIvPicLists() { return m_ivPicLists; } 159 159 #endif 160 #if H_3D_IC160 #if NH_3D_IC 161 161 Int* getICEnableCandidate() { return m_aICEnableCandidate; } 162 162 Int* getICEnableNum() { return m_aICEnableNum; } … … 208 208 Void setSps3dExtension ( TComSps3dExtension sps3dExtension ) { m_cSPS.setSps3dExtension( sps3dExtension ); }; 209 209 #endif 210 #if H_3D_IC210 #if NH_3D_IC 211 211 Void setICEnableCandidate ( Int* ICEnableCandidate) { m_aICEnableCandidate = ICEnableCandidate; } 212 212 Void setICEnableNum ( Int* ICEnableNum) { m_aICEnableNum = ICEnableNum; }
Note: See TracChangeset for help on using the changeset viewer.