Changeset 773 in 3DVCSoftware
- Timestamp:
- 16 Jan 2014, 09:56:13 (10 years ago)
- Location:
- trunk/source
- Files:
-
- 42 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppDecoder/TAppDecCfg.cpp
r738 r773 85 85 ("OutputBitDepthC,d", m_outputBitDepthC, 0, "bit depth of YUV output chroma component (default: use 0 for native depth)") 86 86 #if H_MV 87 #if H_MV_6_HRD_O0217_1388 87 ("TargetOptLayerSetIdx,x", m_targetOptLayerSetIdx, -1, "Target output layer set index. (default: -1, determine automatically to be equal to highest layer set index") // Should actually equal to 0 as default. However, this would cause only the base layer to be decoded. 89 #else90 ("MaxLayerId,-ls", m_maxLayerId, MAX_NUM_LAYER_IDS-1, "Maximum LayerId to be decoded.")91 #endif92 88 #endif 93 89 ("MaxTemporalLayer,t", m_iMaxTemporalLayer, -1, "Maximum Temporal Layer to be decoded. -1 to decode all layers") … … 128 124 if ( !cfg_TargetDecLayerIdSetFile.empty() ) 129 125 { 130 #if H_MV _6_HRD_O0217_13126 #if H_MV 131 127 m_targetDecLayerIdSetFileEmpty = false; 132 128 #endif … … 174 170 } 175 171 #if H_MV 176 #if H_MV_6_HRD_O0217_13177 172 m_targetDecLayerIdSet.push_back( 0 ); // Only base layer at startup 178 #else179 else180 {181 for ( Int curLayerId = 0; curLayerId <= m_maxLayerId; curLayerId++ )182 {183 m_targetDecLayerIdSet.push_back( curLayerId );184 }185 }186 #endif187 173 #endif 188 174 -
trunk/source/App/TAppDecoder/TAppDecCfg.h
r738 r773 59 59 Char* m_pchBitstreamFile; ///< input bitstream file name 60 60 #if H_MV 61 #if H_MV_6_HRD_O0217_1362 61 Int m_targetOptLayerSetIdx; ///< target output layer set index 63 #endif64 62 Int m_maxLayerId; ///< maximum nuh_layer_id decoded 65 63 std::vector<Char*> m_pchReconFiles; ///< array of output reconstruction file name create from output reconstruction file name … … 77 75 78 76 std::vector<Int> m_targetDecLayerIdSet; ///< set of LayerIds to be included in the sub-bitstream extraction process. 79 #if H_MV _6_HRD_O0217_1377 #if H_MV 80 78 Bool m_targetDecLayerIdSetFileEmpty; ///< indication if target layers are given by file 81 79 #endif … … 88 86 TAppDecCfg() 89 87 : m_pchBitstreamFile(NULL) 90 #if H_MV91 #if !H_MV_6_HRD_O0217_1392 , m_maxLayerId(0)93 #endif94 #endif95 88 , m_pchReconFile(NULL) 96 89 , m_iSkipFrame(0) … … 99 92 , m_iMaxTemporalLayer(-1) 100 93 , m_decodedPictureHashSEIEnabled(0) 101 #if H_MV _6_HRD_O0217_1394 #if H_MV 102 95 , m_targetDecLayerIdSetFileEmpty(true) 103 96 #endif -
trunk/source/App/TAppDecoder/TAppDecTop.cpp
r738 r773 61 61 { 62 62 #if H_MV 63 #if H_MV_LAYER_WISE_STARTUP64 63 for (Int i = 0; i < MAX_NUM_LAYER_IDS; i++) 65 64 { … … 67 66 m_layerInitilizedFlags[i] = false; 68 67 } 69 #else70 for (Int i = 0; i < MAX_NUM_LAYER_IDS; i++) m_layerIdToDecIdx[i] = -1;71 #endif72 68 #endif 73 69 #if H_3D … … 192 188 Bool newSliceDiffPoc = false; 193 189 Bool newSliceDiffLayer = false; 194 #if H_MV_FIX_SKIP_PICTURES195 190 Bool sliceSkippedFlag = false; 196 #endif197 191 #if H_3D 198 192 Bool allLayersDecoded = false; … … 212 206 read(nalu, nalUnit); 213 207 #if H_MV 214 #if !H_MV_6_HRD_O0217_13215 Int decIdx = xGetDecoderIdx( nalu.m_layerId , true );216 #endif217 #if H_MV_6_LAYER_ID_32218 208 if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) || nalu.m_layerId > MAX_NUM_LAYER_IDS-1 ) 219 #else220 if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) )221 #endif222 209 { 223 210 bNewPicture = false; 224 #if H_MV_6_LAYER_ID_32225 211 if ( !bitstreamFile ) 226 212 { 227 213 decIdxLastPic = decIdxCurrPic; 228 214 } 229 #endif230 215 } 231 216 else 232 217 { 233 #if H_MV_6_HRD_O0217_13234 218 Int decIdx = xGetDecoderIdx( nalu.m_layerId , true ); 235 #endif236 219 newSliceDiffLayer = nalu.isSlice() && ( nalu.m_layerId != layerIdCurrPic ) && !firstSlice; 237 #if H_MV_FIX_SKIP_PICTURES238 220 newSliceDiffPoc = m_tDecTop[decIdx]->decode(nalu, m_iSkipFrame, m_pocLastDisplay[decIdx], newSliceDiffLayer, sliceSkippedFlag ); 239 #else240 newSliceDiffPoc = m_tDecTop[decIdx]->decode(nalu, m_iSkipFrame, m_pocLastDisplay[decIdx], newSliceDiffLayer );241 #endif242 221 // decode function only returns true when all of the following conditions are true 243 222 // - poc in particular layer changes … … 245 224 // - nalu.isSlice() == true 246 225 247 #if H_MV_6_HRD_O0217_13248 226 // Update TargetDecLayerIdList only when not specified by layer id file, specification by file might actually out of conformance. 249 227 if (nalu.m_nalUnitType == NAL_UNIT_VPS && m_targetDecLayerIdSetFileEmpty ) … … 258 236 m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx ); 259 237 } 260 #endif261 #if H_MV_FIX_SKIP_PICTURES262 238 bNewPicture = ( newSliceDiffLayer || newSliceDiffPoc ) && !sliceSkippedFlag; 263 239 if ( nalu.isSlice() && firstSlice && !sliceSkippedFlag ) 264 #else265 bNewPicture = newSliceDiffLayer || newSliceDiffPoc;266 267 if ( nalu.isSlice() && firstSlice )268 #endif269 240 { 270 241 layerIdCurrPic = nalu.m_layerId; … … 881 852 Int decIdx = -1; 882 853 883 #if H_MV_6_LAYER_ID_32884 854 if ( layerId > MAX_NUM_LAYER_IDS-1 ) 885 855 { 886 856 return decIdx; 887 857 } 888 #endif889 858 890 859 if ( m_layerIdToDecIdx[ layerId ] != -1 ) … … 906 875 m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled); 907 876 m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists ); 908 #if H_MV_LAYER_WISE_STARTUP909 877 m_tDecTop[ decIdx ]->setLayerInitilizedFlags( m_layerInitilizedFlags ); 910 #endif911 878 912 879 #if H_3D -
trunk/source/App/TAppDecoder/TAppDecTop.h
r738 r773 67 67 Int m_numDecoders; ///< number of decoder instances 68 68 TComPicLists m_ivPicLists; ///< picture buffers of decoder instances 69 #if H_MV_LAYER_WISE_STARTUP70 69 Bool m_layerInitilizedFlags[ MAX_NUM_LAYER_IDS ]; ///< for layerwise startup 71 #endif72 70 73 71 #else -
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r738 r773 378 378 #if H_3D_DIM 379 379 ("DMM", m_useDMM, true, "Depth intra model modes") 380 #if !SEC_DMM3_RBC_F0147381 ("RBC", m_useRBC, true, "Region boundary chain mode")382 #endif383 380 ("SDC", m_useSDC, true, "Simplified depth coding") 384 381 ("DLT", m_useDLT, true, "Depth lookup table") … … 391 388 ("VpsNumLayerSets", m_vpsNumLayerSets , 1 , "Number of layer sets") 392 389 ("LayerIdsInSet_%d", m_layerIdsInSets , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 393 #if H_MV_6_PS_0109_25394 390 ("DefaultOneTargetOutputLayerFlag" , m_defaultOneTargetOutputLayerIdc , 0, "Output highest layer of layer sets by default") 395 #else396 ("DefaultOneTargetOutputLayerFlag", m_defaultOneTargetOutputLayerFlag, false , "Output highest layer of layer sets by default")397 #endif398 391 ("OutputLayerSetIdx", m_outputLayerSetIdx , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") 399 392 ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet , std::vector<Int>(1,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "LayerIds of additional output layers") … … 451 444 ("QuadtreeTUMaxDepthIntra", m_uiQuadtreeTUMaxDepthIntra, 1u, "Depth of TU tree for intra CUs") 452 445 ("QuadtreeTUMaxDepthInter", m_uiQuadtreeTUMaxDepthInter, 2u, "Depth of TU tree for inter CUs") 453 454 446 // Coding structure parameters 455 #if H_MV _LAYER_WISE_STARTUP447 #if H_MV 456 448 ("IntraPeriod,-ip", m_iIntraPeriod,std::vector<Int>(1,-1), "Intra period in frames, (-1: only first frame), per layer") 457 449 #else 458 450 ("IntraPeriod,-ip", m_iIntraPeriod, -1, "Intra period in frames, (-1: only first frame)") 459 451 #endif 460 452 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR)") … … 518 510 ("AdvMultiviewResPred", m_uiUseAdvResPred, (UInt)1, "Usage of Advanced Residual Prediction" ) 519 511 #endif 520 #if MTK_SPIVMP_F0110512 #if H_3D_SPIVMP 521 513 ("SubPULog2Size", m_iSubPULog2Size, (Int)3, "Sub-PU size index: 2^n") 522 514 #endif 523 515 524 516 #if H_3D_IC 525 #if SEC_ONLY_TEXTURE_IC_F0151526 517 ("IlluCompEnable", m_abUseIC, true, "Enable illumination compensation") 527 #else528 ("IlluCompEnable", m_abUseIC, std::vector<Bool>(2, true), "Enable illumination compensation")529 #endif530 518 #endif 531 519 #if H_3D_INTER_SDC 532 520 ("InterSDC", m_bDepthInterSDCFlag, true, "Enable depth inter SDC") 533 521 #endif 534 #if SEC_MPI_ENABLING_MERGE_F0150522 #if H_3D_IV_MERGE 535 523 ("MPI", m_bMPIFlag, true, "Enable MPI") 536 524 #endif … … 633 621 #if H_MV 634 622 635 #if H_MV_6_HRD_O0217_13636 623 // DBP Size 637 624 ("SubLayerFlagInfoPresentFlag", m_subLayerFlagInfoPresentFlag , false , "SubLayerFlagInfoPresentFlag") 638 #endif639 625 // VPS VUI 640 626 ("VpsVuiPresentFlag" , m_vpsVuiPresentFlag , false , "VpsVuiPresentFlag ") 641 #if H_MV_6_PS_O0223_29642 627 ("CrossLayerPicTypeAlignedFlag", m_crossLayerPicTypeAlignedFlag, false , "CrossLayerPicTypeAlignedFlag") // Could actually be derived by the encoder 643 628 ("CrossLayerIrapAlignedFlag" , m_crossLayerIrapAlignedFlag , false , "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder 644 #endif645 629 ("BitRatePresentVpsFlag" , m_bitRatePresentVpsFlag , false , "BitRatePresentVpsFlag ") 646 630 ("PicRatePresentVpsFlag" , m_picRatePresentVpsFlag , false , "PicRatePresentVpsFlag ") … … 651 635 ("ConstantPicRateIdc" , m_constantPicRateIdc , std::vector< Int >(1,0) ,MAX_VPS_OP_SETS_PLUS1, "ConstantPicRateIdc per sub layer for the N-th layer set") 652 636 ("AvgPicRate" , m_avgPicRate , std::vector< Int >(1,0) ,MAX_VPS_OP_SETS_PLUS1, "AvgPicRate per sub layer for the N-th layer set") 653 #if H_MV_6_O0226_37654 637 ("TilesNotInUseFlag" , m_tilesNotInUseFlag , true , "TilesNotInUseFlag ") 655 638 ("TilesInUseFlag" , m_tilesInUseFlag , std::vector< Bool >(1,false) , "TilesInUseFlag ") … … 657 640 ("WppNotInUseFlag" , m_wppNotInUseFlag , true , "WppNotInUseFlag ") 658 641 ("WppInUseFlag" , m_wppInUseFlag , std::vector< Bool >(1,0) , "WppInUseFlag ") 659 #endif660 642 ("TileBoundariesAlignedFlag" , m_tileBoundariesAlignedFlag , std::vector< Bool >(1,0) ,MAX_NUM_LAYERS , "TileBoundariesAlignedFlag per direct reference for the N-th layer") 661 643 ("IlpRestrictedRefLayersFlag" , m_ilpRestrictedRefLayersFlag , false , "IlpRestrictedRefLayersFlag") … … 787 769 #endif 788 770 #if H_3D_IV_MERGE 789 #if QC_DEPTH_IV_MRG_F0125790 771 ("IvMvPred", m_ivMvPredFlag , std::vector<Bool>(2, true) , "inter view motion prediction " ) 791 #else792 ("IvMvPred", m_ivMvPredFlag, true , "inter view motion prediction " )793 #endif794 772 #endif 795 773 #if H_3D_NBDV_REF … … 1074 1052 xResizeVector( m_bLoopFilterDisable ); 1075 1053 xResizeVector( m_bUseSAO ); 1076 #if H_MV_LAYER_WISE_STARTUP1077 1054 xResizeVector( m_iIntraPeriod ); 1078 #endif1079 #if H_MV_6_O0226_371080 1055 xResizeVector( m_tilesInUseFlag ); 1081 1056 xResizeVector( m_loopFilterNotAcrossTilesFlag ); 1082 1057 xResizeVector( m_wppInUseFlag ); 1083 #endif1084 1058 #else 1085 1059 m_aidQP = new Int[ m_framesToBeEncoded + m_iGOPSize + 1 ]; … … 1426 1400 for ( Int i = 0; i < m_layerIdsInSets[lsIdx].size(); i++ ) 1427 1401 { 1428 #if H_MV_6_LAYER_ID_321429 1402 xConfirmPara( m_layerIdsInSets[lsIdx][i] < 0 || m_layerIdsInSets[lsIdx].size() >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than and less than MAX_NUM_LAYER_IDS" ); 1430 #else1431 xConfirmPara( m_layerIdsInSets[lsIdx][i] < 0 || m_layerIdsInSets[lsIdx].size() >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than and less than 64" );1432 #endif1433 1403 } 1434 1404 } … … 1456 1426 } 1457 1427 1458 #if H_MV_6_PS_0109_251459 1428 xConfirmPara( m_defaultOneTargetOutputLayerIdc < 0 || m_defaultOneTargetOutputLayerIdc > 1, "Default one target output layer idc must be equal to 0 or equal to 1" ); 1460 #endif1461 1429 xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" ); 1462 1430 … … 1475 1443 xConfirmPara( m_iGOPSize < 1 , "GOP Size must be greater or equal to 1" ); 1476 1444 xConfirmPara( m_iGOPSize > 1 && m_iGOPSize % 2, "GOP Size must be a multiple of 2, if GOP Size is greater than 1" ); 1477 #if H_MV _LAYER_WISE_STARTUP1445 #if H_MV 1478 1446 for( Int layer = 0; layer < m_numberOfLayers; layer++ ) 1479 1447 { … … 1508 1476 if (m_iDecodingRefreshType == 2) 1509 1477 { 1510 #if H_MV _LAYER_WISE_STARTUP1478 #if H_MV 1511 1479 for (Int i = 0; i < m_numberOfLayers; i++ ) 1512 1480 { … … 1544 1512 xConfirmPara( ( 0 != m_uiUseAdvResPred ) && ( 1 != m_uiUseAdvResPred ), "UseAdvResPred must be 0 or 1." ); 1545 1513 #endif 1546 #if MTK_SPIVMP_F01101514 #if H_3D_SPIVMP 1547 1515 xConfirmPara( m_iSubPULog2Size < 2, "SubPULog2Size must be 2 or greater."); 1548 1516 xConfirmPara( m_iSubPULog2Size > 6, "SubPULog2Size must be 6 or smaller."); … … 1774 1742 /* if this is an intra-only sequence, ie IntraPeriod=1, don't verify the GOP structure 1775 1743 * This permits the ability to omit a GOP structure specification */ 1776 #if H_MV _LAYER_WISE_STARTUP1744 #if H_MV 1777 1745 if (m_iIntraPeriod[layer] == 1 && m_GOPList[0].m_POC == -1) { 1778 1746 #else … … 1803 1771 } 1804 1772 Int numOK=0; 1805 #if H_MV _LAYER_WISE_STARTUP1773 #if H_MV 1806 1774 xConfirmPara( m_iIntraPeriod[layer] >=0&&(m_iIntraPeriod[layer]%m_iGOPSize!=0), "Intra period must be a multiple of GOPSize, or -1" ); 1807 1775 #else 1808 1776 xConfirmPara( m_iIntraPeriod >=0&&(m_iIntraPeriod%m_iGOPSize!=0), "Intra period must be a multiple of GOPSize, or -1" ); 1809 1777 #endif 1810 1778 … … 1818 1786 1819 1787 #if H_MV 1820 #if H_MV_LAYER_WISE_STARTUP1821 1788 if ( (m_iIntraPeriod[layer] != 1) && !m_loopFilterOffsetInPPS && m_DeblockingFilterControlPresent && (!m_bLoopFilterDisable[layer]) ) 1822 #else1823 if ( (m_iIntraPeriod != 1) && !m_loopFilterOffsetInPPS && m_DeblockingFilterControlPresent && (!m_bLoopFilterDisable[layer]) )1824 #endif1825 1789 #else 1826 1790 if ( (m_iIntraPeriod != 1) && !m_loopFilterOffsetInPPS && m_DeblockingFilterControlPresent && (!m_bLoopFilterDisable) ) … … 2347 2311 printf("Min PCM size : %d\n", 1 << m_uiPCMLog2MinSize); 2348 2312 printf("Motion search range : %d\n", m_iSearchRange ); 2349 #if H_MV _LAYER_WISE_STARTUP2313 #if H_MV 2350 2314 xPrintParaVector( "Intra period", m_iIntraPeriod ); 2351 2315 #else … … 2505 2469 #endif 2506 2470 #if H_3D_IV_MERGE 2507 #if QC_DEPTH_IV_MRG_F01252508 2471 printf("IvMvPred:%d %d", m_ivMvPredFlag[0] ? 1 : 0, m_ivMvPredFlag[1] ? 1 : 0); 2509 #else 2510 printf("IvMvPred:%d ", m_ivMvPredFlag ); 2511 #endif 2512 #if MTK_SPIVMP_F0110 2472 #if H_3D_SPIVMP 2513 2473 printf(" SubPULog2Size:%d " , m_iSubPULog2Size ); 2514 2474 #endif … … 2518 2478 #endif 2519 2479 #if H_3D_IC 2520 #if SEC_ONLY_TEXTURE_IC_F01512521 2480 printf( "IlluCompEnable: %d ", m_abUseIC); 2522 #else2523 printf( "IlluCompEnable: %d %d ", m_abUseIC[0] ? 1 : 0, m_abUseIC[1] ? 1 : 0 );2524 #endif2525 2481 #endif 2526 2482 #if H_3D_NBDV_REF … … 2535 2491 #if H_3D_DIM 2536 2492 printf("DMM:%d ", m_useDMM ); 2537 #if !SEC_DMM3_RBC_F01472538 printf("RBC:%d ", m_useRBC );2539 #endif2540 2493 printf("SDC:%d ", m_useSDC ); 2541 2494 printf("DLT:%d ", m_useDLT ); … … 2544 2497 printf( "interSDC: %d ", m_bDepthInterSDCFlag ? 1 : 0 ); 2545 2498 #endif 2546 #if SEC_MPI_ENABLING_MERGE_F01502499 #if H_3D_IV_MERGE 2547 2500 printf( "MPI: %d ", m_bMPIFlag ? 1 : 0 ); 2548 2501 #endif -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r738 r773 89 89 Int m_vpsNumLayerSets; ///< Number of layer sets 90 90 std::vector< std::vector<Int> > m_layerIdsInSets; ///< LayerIds in vps of layer set 91 #if H_MV_6_PS_0109_2592 91 Int m_defaultOneTargetOutputLayerIdc; ///< Output highest layer of layer sets by default when equal to 1 93 #else94 Bool m_defaultOneTargetOutputLayerFlag; ///< Output highest layer of layer sets by default95 #endif96 92 std::vector<Int> m_outputLayerSetIdx; ///< Indices of layer sets used as additional output layer sets 97 93 std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers … … 102 98 std::vector< std::vector<Int> > m_dependencyTypes; ///< Dependency types of direct reference layers 103 99 104 #if H_MV_6_HRD_O0217_13105 100 // DBP Size 106 101 Bool m_subLayerFlagInfoPresentFlag; 107 #endif108 102 109 103 // VPS VUI 110 104 Bool m_vpsVuiPresentFlag; 111 #if H_MV_6_PS_O0223_29112 105 Bool m_crossLayerPicTypeAlignedFlag; 113 106 Bool m_crossLayerIrapAlignedFlag; 114 #endif115 107 Bool m_bitRatePresentVpsFlag; 116 108 Bool m_picRatePresentVpsFlag; … … 121 113 std::vector< std::vector<Int > > m_constantPicRateIdc; 122 114 std::vector< std::vector<Int > > m_avgPicRate; 123 #if H_MV_6_O0226_37124 115 Bool m_tilesNotInUseFlag; 125 116 std::vector< Bool > m_tilesInUseFlag; … … 128 119 std::vector< Bool > m_wppInUseFlag; 129 120 130 #endif131 121 std::vector< std::vector<Bool > > m_tileBoundariesAlignedFlag; 132 122 Bool m_ilpRestrictedRefLayersFlag; … … 136 126 137 127 #if H_3D_IV_MERGE 138 #if QC_DEPTH_IV_MRG_F0125139 128 vector<Bool> m_ivMvPredFlag; ///< Interview motion vector prediction 140 #else 141 Bool m_ivMvPredFlag; ///< Interview motion vector prediction 142 #endif 143 #if MTK_SPIVMP_F0110 129 #if H_3D_SPIVMP 144 130 Int m_iSubPULog2Size; 145 131 #endif … … 150 136 #endif 151 137 #if H_3D_IC 152 #if SEC_ONLY_TEXTURE_IC_F0151153 138 Bool m_abUseIC; 154 #else155 vector<Bool> m_abUseIC; ///< flag for using illumination compensation for inter-view prediction156 #endif157 139 #endif 158 140 #if H_3D_NBDV_REF … … 196 178 197 179 // coding structure 198 #if H_MV _LAYER_WISE_STARTUP180 #if H_MV 199 181 std::vector<Int> m_iIntraPeriod; ///< period of I-slice (random access period) 200 182 #else … … 497 479 #if H_3D_DIM 498 480 Bool m_useDMM; ///< flag for using DMM 499 #if !SEC_DMM3_RBC_F0147500 Bool m_useRBC; ///< flag for using RBC501 #endif502 481 Bool m_useSDC; ///< flag for using SDC 503 482 Bool m_useDLT; ///< flag for using DLT … … 510 489 Bool m_bDepthInterSDCFlag; ///< flag for inter SDC of depth map coding 511 490 #endif 512 #if SEC_MPI_ENABLING_MERGE_F0150491 #if H_3D_IV_MERGE 513 492 Bool m_bMPIFlag; ///< flag for MPI of depth map coding 514 493 #endif -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r758 r773 76 76 #endif 77 77 78 #if CAM_HLS_F0136_F0045_F008278 #if H_3D 79 79 vps.createCamPars(m_iNumberOfViews); 80 #endif81 82 #if DLT_DIFF_CODING_IN_PPS83 80 TComDLT& dlt = m_dlt; 84 81 #endif … … 134 131 xSetVPSExtension2 ( vps ); 135 132 m_ivPicLists.setVPS ( &vps ); 136 #if DLT_DIFF_CODING_IN_PPS137 133 xDeriveDltArray ( vps, dlt ); 138 #endif139 134 #endif 140 135 … … 160 155 //====== Camera Parameters ========= 161 156 m_cTEncTop.setCameraParameters ( &m_cCameraData ); 162 #if QC_DEPTH_IV_MRG_F0125163 157 m_cTEncTop.setCamParPrecision ( m_cCameraData.getCamParsCodedPrecision () ); 164 158 m_cTEncTop.setCamParInSliceHeader ( m_cCameraData.getVaryingCameraParameters() ); 165 159 m_cTEncTop.setCodedScale ( m_cCameraData.getCodedScale () ); 166 160 m_cTEncTop.setCodedOffset ( m_cCameraData.getCodedOffset () ); 167 #else168 m_cTEncTop.setCamParPrecision ( isDepth ? false : m_cCameraData.getCamParsCodedPrecision () );169 m_cTEncTop.setCamParInSliceHeader ( isDepth ? 0 : m_cCameraData.getVaryingCameraParameters() );170 m_cTEncTop.setCodedScale ( isDepth ? 0 : m_cCameraData.getCodedScale () );171 m_cTEncTop.setCodedOffset ( isDepth ? 0 : m_cCameraData.getCodedOffset () );172 #endif173 161 #if H_3D_VSO 174 162 //====== VSO ========= … … 194 182 m_cTEncTop.setARPStepNum ( ( isDepth || 0==layerIdInVps ) ? 1 : H_3D_ARP_WFNR ); 195 183 #endif 196 #if MTK_SPIVMP_F0110184 #if H_3D_SPIVMP 197 185 m_cTEncTop.setSubPULog2Size (( isDepth || 0==layerIdInVps ) ? 0 : m_iSubPULog2Size ); 198 186 #endif 199 187 #if H_3D_IC 200 #if SEC_ONLY_TEXTURE_IC_F0151201 188 m_cTEncTop.setUseIC ( vps.getViewIndex( layerId ) == 0 || isDepth ? false : m_abUseIC ); 202 #else203 m_cTEncTop.setUseIC ( vps.getViewIndex( layerId ) == 0 ? false : m_abUseIC[isDepth ? 1 : 0] );204 #endif205 189 #endif 206 190 //========== Depth intra modes ========== 207 191 #if H_3D_DIM 208 192 m_cTEncTop.setUseDMM ( isDepth ? m_useDMM : false ); 209 #if !SEC_DMM3_RBC_F0147210 m_cTEncTop.setUseRBC ( isDepth ? m_useRBC : false );211 #endif212 193 m_cTEncTop.setUseSDC ( isDepth ? m_useSDC : false ); 213 194 m_cTEncTop.setUseDLT ( isDepth ? m_useDLT : false ); … … 221 202 m_cTEncTop.setInterSDCEnable ( isDepth ? m_bDepthInterSDCFlag : false ); 222 203 #endif 223 #if SEC_MPI_ENABLING_MERGE_F0150204 #if H_3D_IV_MERGE 224 205 m_cTEncTop.setUseMPI ( isDepth ? m_bMPIFlag : false ); 225 206 #endif … … 227 208 228 209 m_cTEncTop.setIvPicLists ( &m_ivPicLists ); 229 // H_MV210 #endif // H_MV 230 211 m_cTEncTop.setVPS(&vps); 231 212 232 #if DLT_DIFF_CODING_IN_PPS213 #if H_3D 233 214 m_cTEncTop.setDLT(&dlt); 234 215 #endif … … 249 230 250 231 //====== Coding Structure ======== 251 #if H_MV _LAYER_WISE_STARTUP232 #if H_MV 252 233 m_cTEncTop.setIntraPeriod ( m_iIntraPeriod[ layerIdInVps ] ); 253 234 #else … … 796 777 Void TAppEncTop::xInitLib(Bool isFieldCoding) 797 778 { 798 #if CAM_HLS_F0136_F0045_F0082779 #if H_3D 799 780 for ( Int viewIndex = 0; viewIndex < m_vps.getNumViews(); viewIndex++ ) 800 781 { … … 1270 1251 1271 1252 #if H_3D_DIM_DLT 1272 #if DLT_DIFF_CODING_IN_PPS1273 1253 Void TAppEncTop::xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps, TComDLT* dlt) 1274 #else1275 Void TAppEncTop::xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps)1276 #endif1277 1254 { 1278 1255 TComPicYuv* pcDepthPicYuvOrg = new TComPicYuv; … … 1334 1311 if( uiNumFrames == 0 || numBitsForValue(iNumDepthValues) == g_bitDepthY ) 1335 1312 { 1336 #if DLT_DIFF_CODING_IN_PPS1337 1313 dlt->setUseDLTFlag(layer, false); 1338 #else1339 // don't use DLT1340 vps->setUseDLTFlag(layer, false);1341 #endif1342 1314 } 1343 1315 1344 1316 // assign LUT 1345 #if DLT_DIFF_CODING_IN_PPS1346 1317 if( dlt->getUseDLTFlag(layer) ) 1318 { 1347 1319 dlt->setDepthLUTs(layer, aiIdx2DepthValue, iNumDepthValues); 1348 #else 1349 if( vps->getUseDLTFlag(layer) ) 1350 vps->setDepthLUTs(layer, aiIdx2DepthValue, iNumDepthValues); 1351 #endif 1320 } 1352 1321 1353 1322 // free temporary memory … … 1372 1341 Int maxViewId = xGetMax( m_viewId ); 1373 1342 1374 #if H_MV_6_PS_O0109_221375 1343 Int viewIdLen = gCeilLog2( maxViewId + 1 ); 1376 1344 const Int maxViewIdLen = ( 1 << 4 ) - 1; 1377 1345 assert( viewIdLen <= maxViewIdLen ); 1378 1346 vps.setViewIdLen( viewIdLen ); 1379 #else1380 Int viewIdLenMinus1 = std::max( gCeilLog2( maxViewId + 1 ) - 1, 0 ) ;1381 const Int maxViewIdLenMinus1 = ( 1 << 4 ) - 1;1382 assert( viewIdLenMinus1 <= maxViewIdLenMinus1 );1383 vps.setViewIdLenMinus1( viewIdLenMinus1 );1384 #endif1385 1347 for (Int i = 0; i < m_iNumberOfViews; i++) 1386 1348 { … … 1403 1365 } 1404 1366 1405 #if H_MV_6_PS_O0096_211406 1367 Int defaultDirectDependencyType = -1; 1407 1368 Bool defaultDirectDependencyFlag = true; 1408 #endif1409 1369 for( Int depLayer = 1; depLayer < m_numberOfLayers; depLayer++ ) 1410 1370 { … … 1415 1375 Int refLayer = m_directRefLayers[depLayer][i]; 1416 1376 vps.setDirectDependencyFlag( depLayer, refLayer, true); 1417 #if H_MV_6_PS_O0096_211418 1377 Int curDirectDependencyType = m_dependencyTypes[depLayer][i]; 1419 1378 … … 1428 1387 1429 1388 vps.setDirectDependencyType( depLayer, refLayer, curDirectDependencyType); 1430 #else 1431 vps.setDirectDependencyType( depLayer, refLayer,m_dependencyTypes[depLayer][i]); 1432 #endif 1433 } 1434 } 1435 1436 #if H_MV_6_PS_O0096_21 1389 } 1390 } 1391 1437 1392 vps.setDefaultDirectDependencyFlag( defaultDirectDependencyFlag ); 1438 1393 vps.setDefaultDirectDependencyType( defaultDirectDependencyFlag ? defaultDirectDependencyType : -1 ); 1439 #endif 1440 1441 #if H_MV_6_ILDSD_O0120_26 1394 1442 1395 // Max sub layers, + presence flag 1443 1396 Bool subLayersMaxMinus1PresentFlag = false; … … 1464 1417 1465 1418 vps.setVpsSubLayersMaxMinus1PresentFlag( subLayersMaxMinus1PresentFlag ); 1466 #endif1467 1419 1468 1420 … … 1471 1423 for ( Int refLayerIdInVps = 0; refLayerIdInVps < m_numberOfLayers; refLayerIdInVps++) 1472 1424 { 1473 #if !H_MV_6_ILDDS_O0225_301474 Int maxTid = -1;1475 #endif1476 1425 for ( Int curLayerIdInVps = 1; curLayerIdInVps < m_numberOfLayers; curLayerIdInVps++) 1477 1426 { 1478 #if H_MV_6_ILDDS_O0225_301479 1427 Int maxTid = -1; 1480 #endif1481 1428 for( Int i = 0; i < getGOPSize(); i++ ) 1482 1429 { … … 1492 1439 } 1493 1440 } 1494 #if H_MV_6_ILDDS_O0225_301495 1441 vps.setMaxTidIlRefPicsPlus1( refLayerIdInVps, curLayerIdInVps, maxTid + 1 ); 1496 1442 maxTidRefPresentFlag = maxTidRefPresentFlag || ( maxTid != 6 ); 1497 1443 } 1498 #else1499 }1500 vps.setMaxTidIlRefPicPlus1( refLayerIdInVps, maxTid + 1 );1501 maxTidRefPresentFlag = maxTidRefPresentFlag || ( maxTid != 6 );1502 #endif1503 1444 } 1504 1445 … … 1518 1459 1519 1460 // Poc Lsb Not Present Flag 1520 #if H_MV_6_MISC_O0062_311521 1461 for ( Int layerIdInVps = 1; layerIdInVps < m_numberOfLayers; layerIdInVps++) 1522 1462 { … … 1526 1466 } 1527 1467 } 1528 #endif1529 1468 1530 1469 // All Ref layers active flag … … 1535 1474 { 1536 1475 GOPEntry ge = m_GOPListMvc[layerIdInVps][ ( i < getGOPSize() ? i : MAX_GOP ) ]; 1537 #if H_MV_6_ILDDS_ILREFPICS_27_341538 1476 Int tId = ge.m_temporalId; // Should be equal for all layers. 1539 1477 … … 1571 1509 } 1572 1510 assert ( maxTidIlRefAndSubLayerMaxVaildFlag ); // Something wrong with MaxTidIlRefPicsPlus1 or SubLayersVpsMaxMinus1 1573 #else1574 allRefLayersActiveFlag = allRefLayersActiveFlag && (ge.m_numActiveRefLayerPics == m_directRefLayers[ layerIdInVps ].size() );1575 #endif1576 1511 } 1577 1512 } … … 1579 1514 vps.setAllRefLayersActiveFlag( allRefLayersActiveFlag ); 1580 1515 1581 #if !H_MV_6_PS_O0223_291582 // Currently cross layer irap aligned is always true.1583 vps.setCrossLayerIrapAlignedFlag( true );1584 #endif1585 1516 vps.setRefLayers(); 1586 1517 }; … … 1652 1583 repFormat->setPicHeightVpsInLumaSamples ( m_iSourceHeight ); 1653 1584 repFormat->setPicWidthVpsInLumaSamples ( m_iSourceWidth ); 1654 #if H_MV_6_PS_REP_FORM_18_19_201655 1585 repFormat->setChromaAndBitDepthVpsPresentFlag( true ); 1656 #endif1657 1586 // ToDo not supported yet. 1658 1587 //repFormat->setSeparateColourPlaneVpsFlag( ); … … 1667 1596 } 1668 1597 1669 #if H_MV_6_HRD_O0217_131670 1598 Void TAppEncTop::xSetDpbSize ( TComVPS& vps ) 1671 1599 { … … 1723 1651 } 1724 1652 } 1725 #endif1726 1653 1727 1654 … … 1743 1670 } 1744 1671 } 1745 #if H_MV_6_HRD_O0217_131746 1672 vps.deriveLayerSetLayerIdList(); 1747 #endif1748 1673 1749 1674 Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size(); 1750 1675 // Additional output layer sets + profileLevelTierIdx 1751 #if H_MV_6_PS_0109_251752 1676 vps.setDefaultOneTargetOutputLayerIdc ( m_defaultOneTargetOutputLayerIdc ); 1753 #else1754 vps.setDefaultOneTargetOutputLayerFlag ( m_defaultOneTargetOutputLayerFlag );1755 #endif1756 1677 vps.setMoreOutputLayerSetsThanDefaultFlag( numAddOuputLayerSets != 0 ); 1757 1678 vps.setNumAddOutputLayerSetsMinus1 ( numAddOuputLayerSets - 1 ); … … 1759 1680 1760 1681 1761 #if H_MV_6_HRD_O0217_131762 1682 for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++) 1763 1683 { … … 1774 1694 } 1775 1695 } 1776 #else1777 for (Int lsIdx = 1; lsIdx < m_vpsNumLayerSets; lsIdx++)1778 {1779 vps.setProfileLevelTierIdx( lsIdx, m_profileLevelTierIdx[ lsIdx ] );1780 }1781 #endif1782 1696 1783 1697 for (Int addOutLs = 0; addOutLs < numAddOuputLayerSets; addOutLs++ ) … … 1802 1716 } 1803 1717 } 1804 #if H_MV_6_HRD_O0217_131805 1718 vps.deriveTargetLayerIdLists(); 1806 #endif1807 1719 } 1808 1720 … … 1821 1733 // however preliminary setting it from input parameters 1822 1734 1823 #if H_MV_6_PS_O0223_291824 1735 pcVPSVUI->setCrossLayerPicTypeAlignedFlag( m_crossLayerPicTypeAlignedFlag ); 1825 1736 pcVPSVUI->setCrossLayerIrapAlignedFlag ( m_crossLayerIrapAlignedFlag ); 1826 #endif1827 1737 1828 1738 pcVPSVUI->setBitRatePresentVpsFlag( m_bitRatePresentVpsFlag ); … … 1863 1773 } 1864 1774 1865 #if H_MV_6_O0226_371866 1775 pcVPSVUI->setTilesNotInUseFlag( m_tilesNotInUseFlag ); 1867 1776 … … 1899 1808 } 1900 1809 } 1901 #else1902 for( Int i = 1; i <= vps.getMaxLayersMinus1(); i++ )1903 {1904 for( Int j = 0; j < vps.getNumDirectRefLayers( vps.getLayerIdInNuh( i ) ); j++ )1905 {1906 if ( m_tileBoundariesAlignedFlag[i].size() > j )1907 {1908 pcVPSVUI->setTileBoundariesAlignedFlag( i, j, m_tileBoundariesAlignedFlag[i][j]);1909 }1910 }1911 }1912 #endif1913 1810 1914 1811 pcVPSVUI->setIlpRestrictedRefLayersFlag( m_ilpRestrictedRefLayersFlag ); … … 1941 1838 } 1942 1839 } 1943 #if H_MV_6_PS_O0118_331944 1840 pcVPSVUI->setVideoSignalInfoIdxPresentFlag( true ); 1945 1841 pcVPSVUI->setVpsNumVideoSignalInfoMinus1 ( 0 ); … … 1961 1857 pcVPSVUI->setVpsVideoSignalInfoIdx( i, 0 ); 1962 1858 } 1963 #endif1964 #if H_MV_6_HRD_O0164_151965 1859 pcVPSVUI->setVpsVuiBspHrdPresentFlag( false ); // TBD 1966 #endif1967 1860 } 1968 1861 } … … 1971 1864 Void TAppEncTop::xSetVPSExtension2( TComVPS& vps ) 1972 1865 { 1973 1974 1866 for ( Int layer = 0; layer <= vps.getMaxLayersMinus1(); layer++ ) 1975 1867 { … … 1981 1873 vps.setARPStepNum ( layer, ( isDepth || isLayerZero ) ? 1 : H_3D_ARP_WFNR ); 1982 1874 #endif 1983 #if MTK_SPIVMP_F01101875 #if H_3D_SPIVMP 1984 1876 if( isDepth ) 1985 1877 { 1986 #if MTK_F0110_FIX1987 1878 vps.setSubPULog2Size ( layer, (layer != 1) ? 6: 0 ); 1988 #else1989 vps.setSubPULog2Size ( layer, (layer != 1) ? m_iSubPULog2Size: 0 );1990 #endif1991 1879 } 1992 1880 else … … 1997 1885 1998 1886 #if H_3D_DIM 1999 #if SEC_DMM3_RBC_F01472000 1887 vps.setVpsDepthModesFlag( layer, isDepth && !isLayerZero && (m_useDMM || m_useSDC || m_useDLT ) ); 2001 #else2002 vps.setVpsDepthModesFlag( layer, isDepth && !isLayerZero && (m_useDMM || m_useRBC || m_useSDC || m_useDLT ) );2003 #endif2004 #if H_3D_DIM_DLT2005 #if !DLT_DIFF_CODING_IN_PPS2006 vps.setUseDLTFlag( layer , isDepth && m_useDLT );2007 if( vps.getUseDLTFlag( layer ) )2008 {2009 #if H_MV_LAYER_WISE_STARTUP2010 xAnalyzeInputBaseDepth(layer, max( m_iIntraPeriod[layer], 24), &vps);2011 #else2012 xAnalyzeInputBaseDepth(layer, max(m_iIntraPeriod, 24), &vps);2013 #endif2014 }2015 #endif2016 #endif2017 1888 #endif 2018 1889 2019 1890 #if H_3D_IV_MERGE 2020 #if QC_DEPTH_IV_MRG_F01252021 1891 if( isDepth ) 2022 1892 { … … 2027 1897 vps.setIvMvPredFlag ( layer, !isLayerZero && m_ivMvPredFlag[0] ); 2028 1898 } 2029 #else2030 vps.setIvMvPredFlag ( layer, !isLayerZero && !isDepth && m_ivMvPredFlag );2031 #endif2032 1899 #endif 2033 1900 #if H_3D_NBDV_REF … … 2040 1907 vps.setInterSDCFlag( layer, !isLayerZero && isDepth && m_bDepthInterSDCFlag ); 2041 1908 #endif 2042 #if SEC_MPI_ENABLING_MERGE_F01501909 #if H_3D_IV_MERGE 2043 1910 vps.setMPIFlag( layer, !isLayerZero && isDepth && m_bMPIFlag ); 2044 1911 #endif … … 2048 1915 #endif 2049 1916 } 2050 #endif 2051 2052 #if DLT_DIFF_CODING_IN_PPS 1917 2053 1918 Void TAppEncTop::xDeriveDltArray( TComVPS& vps, TComDLT& dlt ) 2054 1919 { … … 2080 1945 } 2081 1946 #endif 2082 #endif 1947 2083 1948 //! \} -
trunk/source/App/TAppEncoder/TAppEncTop.h
r758 r773 86 86 #endif 87 87 88 #if DLT_DIFF_CODING_IN_PPS88 #if H_3D 89 89 TComDLT m_dlt; ///< dlt 90 90 #endif … … 129 129 Void xSetProfileTierLevel ( TComVPS& vps ); 130 130 Void xSetRepFormat ( TComVPS& vps ); 131 #if H_MV_6_HRD_O0217_13132 131 Void xSetDpbSize ( TComVPS& vps ); 133 #endif134 132 Void xSetVPSVUI ( TComVPS& vps ); 135 133 GOPEntry* xGetGopEntry( Int layerIdInVps, Int poc ); … … 138 136 #if H_3D 139 137 Void xSetVPSExtension2( TComVPS& vps ); 140 #endif141 #if DLT_DIFF_CODING_IN_PPS142 138 Void xDeriveDltArray( TComVPS& vps, TComDLT& dlt ); 143 139 #endif 144 140 #if H_3D_DIM_DLT 145 #if DLT_DIFF_CODING_IN_PPS146 141 Void xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps, TComDLT* dlt); 147 #else148 Void xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps);149 #endif150 142 #endif 151 143 public: -
trunk/source/Lib/TLibCommon/ContextTables.h
r724 r773 109 109 #define NUM_DEPTH_INTRA_MODE_CTX 8 ///< number of context models for depth intra modes 110 110 #define NUM_DDC_FLAG_CTX 2 ///< number of context models for deltaDC flag (DMM or RBC) 111 #if QC_DIM_DELTADC_UNIFY_F0132112 111 #define NUM_DDC_DATA_CTX 1 ///< number of context models for deltaDC data (DMM or RBC) 113 #else114 #define NUM_DDC_DATA_CTX 2 ///< number of context models for deltaDC data (DMM or RBC)115 #endif116 112 #if H_3D_DIM_DMM 117 113 #define NUM_DMM1_DATA_CTX 1 ///< number of context models for DMM1 data 118 #if !SEC_DMM3_RBC_F0147119 #define NUM_DMM3_DATA_CTX 1 ///< number of context models for DMM3 data120 #endif121 #endif122 #if H_3D_DIM_RBC123 #define NUM_RBC_DATA_CTX 1 ///< number of context models for RBC data124 114 #endif 125 115 #endif … … 377 367 INIT_ARPW[3][NUM_ARPW_CTX] = 378 368 { 379 #if LGE_ARP_CTX_F0161380 369 { 162, 153, 154, 162 }, 381 370 { 162, 153, 154, 162 }, 382 371 { 162, 153, 154, 162 }, 383 #else384 { 154, 154, 154, 154 },385 { 154, 154, 154, 154 },386 { 154, 154, 154, 154 },387 #endif388 372 }; 389 373 #endif … … 393 377 INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = 394 378 { 395 #if LGE_IC_CTX_F0160396 379 { 154, 154, 154, }, 397 380 { 154, 154, 154, }, 398 381 { 154, 154, 154, }, 399 #else400 { CNU, CNU, CNU, },401 { 197, 185, 201, },402 { 197, 185, 201, },403 #endif404 382 }; 405 383 #endif … … 423 401 INIT_DDC_DATA[3][NUM_DDC_DATA_CTX] = 424 402 { 425 #if QC_DIM_DELTADC_UNIFY_F0132 426 { 154 }, 427 { 154 }, 428 { 154 }, 429 #else 430 { CNU, CNU }, 431 { CNU, CNU }, 432 { CNU, CNU }, 433 #endif 403 { 154 }, 404 { 154 }, 405 { 154 }, 434 406 }; 435 407 #if H_3D_DIM_DMM … … 441 413 { CNU }, 442 414 }; 443 #if !SEC_DMM3_RBC_F0147444 static const UChar445 INIT_DMM3_DATA[3][NUM_DMM3_DATA_CTX] =446 {447 { CNU },448 { CNU },449 { CNU },450 };451 #endif452 #endif453 #if H_3D_DIM_RBC454 static const UChar455 INIT_RBC_DATA[3][NUM_RBC_DATA_CTX] =456 {457 { CNU },458 { CNU },459 { CNU },460 };461 415 #endif 462 416 #if H_3D_DIM_SDC -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r724 r773 120 120 m_dmmWedgeTabIdx[i] = NULL; 121 121 } 122 #if !SEC_DMM3_RBC_F0147123 m_dmm3IntraTabIdx = NULL;124 #endif125 #endif126 #if H_3D_DIM_RBC127 m_pucEdgeCode = NULL;128 m_pucEdgeNumber = NULL;129 m_pucEdgeStartPos = NULL;130 m_pbEdgeLeftFirst = NULL;131 m_pbEdgePartition = NULL;132 122 #endif 133 123 #if H_3D_DIM_SDC … … 146 136 m_piVSPFlag = NULL; 147 137 #endif 148 #if MTK_SPIVMP_F0110138 #if H_3D_SPIVMP 149 139 m_pbSPIVMPFlag = NULL; 150 140 #endif … … 200 190 m_piVSPFlag = (Char* )xMalloc(Char, uiNumPartition); 201 191 #endif 202 #if MTK_SPIVMP_F0110192 #if H_3D_SPIVMP 203 193 m_pbSPIVMPFlag = (Bool* )xMalloc(Bool, uiNumPartition); 204 194 #endif … … 279 269 m_dmmWedgeTabIdx[i] = (UInt*)xMalloc(UInt, uiNumPartition); 280 270 } 281 #if !SEC_DMM3_RBC_F0147282 m_dmm3IntraTabIdx = (UInt*)xMalloc(UInt, uiNumPartition);283 #endif284 #endif285 #if H_3D_DIM_RBC286 m_pucEdgeCode = (UChar*)xMalloc(UChar, uiNumPartition * RBC_MAX_EDGE_NUM_PER_4x4);287 m_pucEdgeNumber = (UChar*)xMalloc(UChar, uiNumPartition);288 m_pucEdgeStartPos = (UChar*)xMalloc(UChar, uiNumPartition);289 m_pbEdgeLeftFirst = (Bool*)xMalloc(Bool, uiNumPartition);290 m_pbEdgePartition = (Bool*)xMalloc(Bool, uiNumPartition * 16);291 271 #endif 292 272 #if H_3D_DIM_SDC … … 362 342 if ( m_piVSPFlag ) { xFree(m_piVSPFlag); m_piVSPFlag = NULL; } 363 343 #endif 364 #if MTK_SPIVMP_F0110344 #if H_3D_SPIVMP 365 345 if ( m_pbSPIVMPFlag ) { xFree(m_pbSPIVMPFlag); m_pbSPIVMPFlag = NULL; } 366 346 #endif … … 417 397 if ( m_dmmWedgeTabIdx[i] ) { xFree( m_dmmWedgeTabIdx[i] ); m_dmmWedgeTabIdx[i] = NULL; } 418 398 } 419 #if !SEC_DMM3_RBC_F0147420 if ( m_dmm3IntraTabIdx ) { xFree( m_dmm3IntraTabIdx ); m_dmm3IntraTabIdx = NULL; }421 #endif422 #endif423 #if H_3D_DIM_RBC424 if ( m_pbEdgeLeftFirst ) { xFree( m_pbEdgeLeftFirst ); m_pbEdgeLeftFirst = NULL; }425 if ( m_pucEdgeStartPos ) { xFree( m_pucEdgeStartPos ); m_pucEdgeStartPos = NULL; }426 if ( m_pucEdgeNumber ) { xFree( m_pucEdgeNumber ); m_pucEdgeNumber = NULL; }427 if ( m_pucEdgeCode ) { xFree( m_pucEdgeCode ); m_pucEdgeCode = NULL; }428 if ( m_pbEdgePartition ) { xFree( m_pbEdgePartition ); m_pbEdgePartition = NULL; }429 399 #endif 430 400 #if H_3D_DIM_SDC … … 571 541 m_piVSPFlag[ui] = pcFrom->m_piVSPFlag[ui]; 572 542 #endif 573 #if MTK_SPIVMP_F0110543 #if H_3D_SPIVMP 574 544 m_pbSPIVMPFlag[ui] = pcFrom->m_pbSPIVMPFlag[ui]; 575 545 #endif … … 616 586 memset( m_piVSPFlag + firstElement, 0, numElements * sizeof( *m_piVSPFlag ) ); 617 587 #endif 618 #if MTK_SPIVMP_F0110588 #if H_3D_SPIVMP 619 589 memset( m_pbSPIVMPFlag + firstElement, 0, numElements * sizeof( *m_pbSPIVMPFlag ) ); 620 590 #endif … … 643 613 memset( m_dmmWedgeTabIdx[i] + firstElement, 0, numElements * sizeof( *m_dmmWedgeTabIdx[i] ) ); 644 614 } 645 #if !SEC_DMM3_RBC_F0147646 memset( m_dmm3IntraTabIdx + firstElement, 0, numElements * sizeof( *m_dmm3IntraTabIdx ) );647 #endif648 #endif649 #if H_3D_DIM_RBC650 memset( m_pucEdgeCode + firstElement, 0, numElements * sizeof( *m_pucEdgeCode ) * RBC_MAX_EDGE_NUM_PER_4x4 );651 memset( m_pucEdgeNumber + firstElement, 0, numElements * sizeof( *m_pucEdgeNumber ) );652 memset( m_pucEdgeStartPos + firstElement, 0, numElements * sizeof( *m_pucEdgeStartPos ) );653 memset( m_pbEdgeLeftFirst + firstElement, false, numElements * sizeof( *m_pbEdgeLeftFirst ) );654 memset( m_pbEdgePartition + firstElement, false, numElements * sizeof( *m_pbEdgePartition ) * 16 );655 615 #endif 656 616 #if H_3D_DIM_SDC … … 799 759 m_piVSPFlag[ui] = 0; 800 760 #endif 801 #if MTK_SPIVMP_F0110761 #if H_3D_SPIVMP 802 762 m_pbSPIVMPFlag[ui] = 0; 803 763 #endif … … 825 785 m_dmmWedgeTabIdx[i] [ui] = 0; 826 786 } 827 #if !SEC_DMM3_RBC_F0147828 m_dmm3IntraTabIdx [ui] = 0;829 #endif830 787 #endif 831 788 #if H_3D_DIM_SDC … … 902 859 memset( m_piVSPFlag, 0, sizeof( Char ) * m_uiNumPartition ); 903 860 #endif 904 #if MTK_SPIVMP_F0110861 #if H_3D_SPIVMP 905 862 memset( m_pbSPIVMPFlag, 0, sizeof( Bool ) * m_uiNumPartition ); 906 863 #endif … … 941 898 memset( m_dmmWedgeTabIdx[i], 0, sizeof(UInt) * m_uiNumPartition ); 942 899 } 943 #if !SEC_DMM3_RBC_F0147944 memset( m_dmm3IntraTabIdx, 0, sizeof(UInt) * m_uiNumPartition );945 #endif946 #endif947 #if H_3D_DIM_RBC948 memset( m_pucEdgeCode , 0, iSizeInUchar * RBC_MAX_EDGE_NUM_PER_4x4 );949 memset( m_pucEdgeNumber , 0, iSizeInUchar );950 memset( m_pucEdgeStartPos, 0, iSizeInUchar );951 memset( m_pbEdgeLeftFirst, 0, iSizeInBool );952 memset( m_pbEdgePartition, 0, iSizeInBool * 16 );953 900 #endif 954 901 #if H_3D_DIM_SDC … … 1001 948 m_pDvInfo[ ui ] = pcCU->m_pDvInfo[uiPartOffset+ui]; 1002 949 #endif 1003 #if MTK_SPIVMP_F0110950 #if H_3D_SPIVMP 1004 951 m_pbSPIVMPFlag[ui]=pcCU->m_pbSPIVMPFlag[uiPartOffset+ui]; 1005 952 #endif … … 1028 975 m_dmmWedgeTabIdx[i] [ui] = pcCU->m_dmmWedgeTabIdx[i] [uiPartOffset+ui]; 1029 976 } 1030 #if !SEC_DMM3_RBC_F01471031 m_dmm3IntraTabIdx [ui] = pcCU->m_dmm3IntraTabIdx[uiPartOffset+ui];1032 #endif1033 977 #endif 1034 978 #if H_3D_DIM_SDC … … 1154 1098 m_piVSPFlag = pcCU->getVSPFlag() + uiPart; 1155 1099 #endif 1156 #if MTK_SPIVMP_F01101100 #if H_3D_SPIVMP 1157 1101 m_pbSPIVMPFlag = pcCU->getSPIVMPFlag() + uiPart; 1158 1102 #endif … … 1187 1131 m_dmmWedgeTabIdx[i] = pcCU->getDmmWedgeTabIdx( i ) + uiPart; 1188 1132 } 1189 #if !SEC_DMM3_RBC_F01471190 m_dmm3IntraTabIdx = pcCU->getDmm3IntraTabIdx() + uiPart;1191 #endif1192 #endif1193 #if H_3D_DIM_RBC1194 m_pucEdgeCode = pcCU->getEdgeCode( uiPart );1195 m_pucEdgeNumber = pcCU->getEdgeNumber() + uiPart;1196 m_pucEdgeStartPos = pcCU->getEdgeStartPos() + uiPart;1197 m_pbEdgeLeftFirst = pcCU->getEdgeLeftFirst() + uiPart;1198 m_pbEdgePartition = pcCU->getEdgePartition( uiPart );1199 1133 #endif 1200 1134 #if H_3D_DIM_SDC … … 1313 1247 m_pDvInfo = pcCU->getDvInfo() + uiAbsPartIdx; 1314 1248 #endif 1315 #if MTK_SPIVMP_F01101249 #if H_3D_SPIVMP 1316 1250 m_pbSPIVMPFlag = pcCU->getSPIVMPFlag() + uiAbsPartIdx; 1317 1251 #endif … … 1365 1299 1366 1300 #endif 1367 #if MTK_SPIVMP_F01101301 #if H_3D_SPIVMP 1368 1302 memcpy( m_pbSPIVMPFlag + uiOffset, pcCU->getSPIVMPFlag(), sizeof( Bool ) * uiNumPartition ); 1369 1303 #endif … … 1391 1325 memcpy( m_dmmWedgeTabIdx[i] + uiOffset, pcCU->getDmmWedgeTabIdx( i ), sizeof(UInt) * uiNumPartition ); 1392 1326 } 1393 #if !SEC_DMM3_RBC_F01471394 memcpy( m_dmm3IntraTabIdx + uiOffset, pcCU->getDmm3IntraTabIdx(), sizeof(UInt) * uiNumPartition );1395 #endif1396 #endif1397 #if H_3D_DIM_RBC1398 memcpy( getEdgeCode( uiOffset ), pcCU->getEdgeCode(0), iSizeInUchar * RBC_MAX_EDGE_NUM_PER_4x4 );1399 memcpy( getEdgeNumber() + uiOffset, pcCU->getEdgeNumber(), iSizeInUchar );1400 memcpy( getEdgeStartPos() + uiOffset, pcCU->getEdgeStartPos(), iSizeInUchar );1401 memcpy( getEdgeLeftFirst() + uiOffset, pcCU->getEdgeLeftFirst(), iSizeInBool );1402 memcpy( getEdgePartition( uiOffset ), pcCU->getEdgePartition(0), iSizeInBool * 16 );1403 1327 #endif 1404 1328 #if H_3D_DIM_SDC … … 1497 1421 memcpy( rpcCU->getDvInfo() + m_uiAbsIdxInLCU, m_pDvInfo, sizeof( *m_pDvInfo ) * m_uiNumPartition ); 1498 1422 #endif 1499 #if MTK_SPIVMP_F01101423 #if H_3D_SPIVMP 1500 1424 memcpy( rpcCU->getSPIVMPFlag() + m_uiAbsIdxInLCU, m_pbSPIVMPFlag, sizeof( Bool ) * m_uiNumPartition ); 1501 1425 #endif … … 1523 1447 memcpy( rpcCU->getDmmWedgeTabIdx( i ) + m_uiAbsIdxInLCU, m_dmmWedgeTabIdx[i], sizeof(UInt) * m_uiNumPartition ); 1524 1448 } 1525 #if !SEC_DMM3_RBC_F01471526 memcpy( rpcCU->getDmm3IntraTabIdx() + m_uiAbsIdxInLCU, m_dmm3IntraTabIdx, sizeof(UInt) * m_uiNumPartition );1527 #endif1528 #endif1529 #if H_3D_DIM_RBC1530 memcpy( rpcCU->getEdgeCode( m_uiAbsIdxInLCU ), m_pucEdgeCode, iSizeInUchar * RBC_MAX_EDGE_NUM_PER_4x4 );1531 memcpy( rpcCU->getEdgeNumber() + m_uiAbsIdxInLCU, m_pucEdgeNumber, iSizeInUchar );1532 memcpy( rpcCU->getEdgeStartPos() + m_uiAbsIdxInLCU, m_pucEdgeStartPos, iSizeInUchar );1533 memcpy( rpcCU->getEdgeLeftFirst() + m_uiAbsIdxInLCU, m_pbEdgeLeftFirst, iSizeInBool );1534 memcpy( rpcCU->getEdgePartition( m_uiAbsIdxInLCU ), m_pbEdgePartition, iSizeInBool * 16 );1535 1449 #endif 1536 1450 #if H_3D_DIM_SDC … … 1616 1530 memcpy( rpcCU->getVSPFlag() + uiPartOffset, m_piVSPFlag, sizeof(Char) * uiQNumPart ); 1617 1531 #endif 1618 #if MTK_SPIVMP_F01101532 #if H_3D_SPIVMP 1619 1533 memcpy( rpcCU->getSPIVMPFlag() + uiPartOffset, m_pbSPIVMPFlag, sizeof(Bool) * uiQNumPart ); 1620 1534 #endif … … 1641 1555 memcpy( rpcCU->getDmmWedgeTabIdx( i ) + uiPartOffset, m_dmmWedgeTabIdx[i], sizeof(UInt) * uiQNumPart ); 1642 1556 } 1643 #if !SEC_DMM3_RBC_F01471644 memcpy( rpcCU->getDmm3IntraTabIdx() + uiPartOffset, m_dmm3IntraTabIdx, sizeof(UInt) * uiQNumPart );1645 #endif1646 #endif1647 #if H_3D_DIM_RBC1648 memcpy( rpcCU->getEdgeCode( uiPartOffset ), m_pucEdgeCode, iSizeInUchar * RBC_MAX_EDGE_NUM_PER_4x4 );1649 memcpy( rpcCU->getEdgeNumber() + uiPartOffset, m_pucEdgeNumber, iSizeInUchar );1650 memcpy( rpcCU->getEdgeStartPos() + uiPartOffset, m_pucEdgeStartPos, iSizeInUchar );1651 memcpy( rpcCU->getEdgeLeftFirst() + uiPartOffset, m_pbEdgeLeftFirst, iSizeInBool );1652 memcpy( rpcCU->getEdgePartition( uiPartOffset ), m_pbEdgePartition, iSizeInBool * 16 );1653 1557 #endif 1654 1558 #if H_3D_DIM_SDC … … 2375 2279 UInt uiCtx = 0; 2376 2280 2377 #if LGE_IC_CTX_F01602378 2281 TComDataCU* pcTempCU = NULL; 2379 2282 UInt uiTempPartIdx = 0; … … 2384 2287 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2385 2288 uiCtx += ( pcTempCU ) ? pcTempCU->isIC( uiTempPartIdx ) : 0; 2386 #endif2387 2289 2388 2290 return uiCtx; … … 2745 2647 } 2746 2648 2747 #if MTK_SPIVMP_F01102649 #if H_3D_SPIVMP 2748 2650 Void TComDataCU::setSPIVMPFlagSubParts( Bool bSPIVMPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2749 2651 { … … 3345 3247 * false: otherwise 3346 3248 */ 3347 #if ETRIKHU_MERGE_REUSE_F00933348 3249 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 3349 3250 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo ) 3350 #else 3351 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 3352 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag ) 3353 #endif 3354 { 3251 { 3355 3252 if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() ) 3356 3253 { … … 3367 3264 } 3368 3265 3369 #if ETRIKHU_MERGE_REUSE_F00933370 3266 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 3371 #endif3372 3267 3373 3268 Bool refViewAvailFlag = false; … … 3454 3349 3455 3350 #if H_3D_IV_MERGE 3456 #if ETRIKHU_MERGE_REUSE_F00933457 3351 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv, 3458 3352 Int* ivCandRefIdx, Int iPosIvDC, Int* vspFlag, Int &iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo ) 3459 #else3460 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv,3461 Int* ivCandRefIdx, Int iPosIvDC, Int* vspFlag )3462 #endif3463 3353 { 3464 3354 for(Int iLoop = 0; iLoop < 2; iLoop ++ ) … … 3479 3369 clipMv( cMv ); 3480 3370 3481 #if ETRIKHU_MERGE_REUSE_F00933482 3371 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 3483 #endif3484 3372 3485 3373 abCandIsInter [ iCount ] = true; … … 3502 3390 if(ivCandDir[iLoop + 2]) 3503 3391 { 3504 #if ETRIKHU_MERGE_REUSE_F00933505 3392 TComMvField tmpMV[2]; 3506 3393 UChar tmpDir = ivCandDir[iLoop + 2]; 3507 #else3508 abCandIsInter [ iCount ] = true;3509 puhInterDirNeighbours[ iCount ] = ivCandDir[iLoop + 2];3510 #endif3511 3394 if( ( ivCandDir[iLoop + 2] & 1 ) == 1 ) 3512 3395 { 3513 #if ETRIKHU_MERGE_REUSE_F00933514 3396 tmpMV[0].setMvField( ivCandMv[ (iLoop<<1) + 4 ], ivCandRefIdx[ (iLoop<<1) + 4 ] ); 3515 #else3516 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ (iLoop<<1) + 4 ], ivCandRefIdx[ (iLoop<<1) + 4 ] );3517 #endif3518 3397 } 3519 3398 if( ( ivCandDir[iLoop + 2] & 2 ) == 2 ) 3520 3399 { 3521 #if ETRIKHU_MERGE_REUSE_F00933522 3400 tmpMV[1].setMvField( ivCandMv[ (iLoop<<1) + 5 ], ivCandRefIdx[ (iLoop<<1) + 5 ] ); 3523 #else3524 pcMvFieldNeighbours[ (iCount<<1)+1 ].setMvField( ivCandMv[ (iLoop<<1) + 5 ], ivCandRefIdx[ (iLoop<<1) + 5 ] );3525 #endif3526 3401 } 3527 3402 … … 3530 3405 if( !iLoop && ivCandDir[0] > 0) 3531 3406 { 3532 #if ETRIKHU_MERGE_REUSE_F00933533 3407 if(tmpDir == puhInterDirNeighbours[0] && pcMvFieldNeighbours[0]==tmpMV[0] && pcMvFieldNeighbours[1]==tmpMV[1]) 3534 #else3535 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[0] && pcMvFieldNeighbours[0 ]== pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[1]==pcMvFieldNeighbours[(iCount<<1)+1])3536 #endif3537 3408 { 3538 3409 bRemove = true; 3539 #if !ETRIKHU_MERGE_REUSE_F00933540 abCandIsInter [ iCount ] = false;3541 puhInterDirNeighbours[ iCount ] = 0;3542 TComMv cZeroMv;3543 pcMvFieldNeighbours [ iCount<<1 ].setMvField( cZeroMv, NOT_VALID );3544 pcMvFieldNeighbours [(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );3545 #endif3546 3410 } 3547 3411 } 3548 3412 if(!bRemove) 3549 3413 { 3550 3551 #if ETRIKHU_MERGE_REUSE_F00933552 3414 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 3553 3415 … … 3562 3424 pcMvFieldNeighbours[ (iCount<<1)+1 ].setMvField( ivCandMv[ (iLoop<<1) + 5 ], ivCandRefIdx[ (iLoop<<1) + 5 ] ); 3563 3425 } 3564 #endif3565 3566 3426 #if H_3D_NBDV 3567 3427 if(iLoop) // For IvMcShift candidate … … 3603 3463 #endif 3604 3464 3605 3606 3607 3608 3609 3610 3611 3612 3613 #if ETRIKHU_MERGE_REUSE_F0093 3465 #if H_3D 3614 3466 Void TComDataCU::rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo* inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV) 3615 3467 { … … 3999 3851 * \param numValidMergeCand 4000 3852 */ 4001 #if ETRIKHU_MERGE_REUSE_F00933853 #if H_3D 4002 3854 Void TComDataCU::xGetInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours 4003 3855 #else … … 4008 3860 , InheritedVSPDisInfo* inheritedVSPDisInfo 4009 3861 #endif 4010 #if MTK_SPIVMP_F01103862 #if H_3D_SPIVMP 4011 3863 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP 4012 3864 #endif … … 4024 3876 Bool abCandIsInter[ MRG_MAX_NUM_CANDS ]; 4025 3877 #endif 4026 #if ETRIKHU_MERGE_REUSE_F00933878 #if H_3D 4027 3879 TComMvField tmpMV[2]; 4028 3880 UChar tmpDir; … … 4046 3898 { 4047 3899 abCandIsInter[ui] = false; 4048 #if H_3D_IV_MERGE4049 pcMvFieldNeighbours[ ( ui << 1 ) ].setMvField(cZeroMv, NOT_VALID);4050 pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setMvField(cZeroMv, NOT_VALID);4051 #else4052 3900 pcMvFieldNeighbours[ ( ui << 1 ) ].setRefIdx(NOT_VALID); 4053 3901 pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setRefIdx(NOT_VALID); 4054 #endif4055 3902 } 4056 3903 #endif … … 4069 3916 4070 3917 UInt uiPartIdxLT, uiPartIdxRT, uiPartIdxLB; 4071 #if ! ETRIKHU_MERGE_REUSE_F00933918 #if !H_3D 4072 3919 PartSize cCurPS = getPartitionSize( uiAbsPartIdx ); 4073 3920 #endif 4074 3921 deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT ); 4075 3922 deriveLeftBottomIdxGeneral ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB ); 4076 #if SEC_MPI_ENABLING_MERGE_F01503923 #if H_3D 4077 3924 Bool bMPIFlag = getSlice()->getVPS()->getMPIFlag( getSlice()->getLayerIdInVps() ); 4078 #endif4079 #if QC_DEPTH_IV_MRG_F01254080 3925 Bool bIsDepth = getSlice()->getIsDepth(); 4081 #if !BUGFIX_F00934082 Bool bDepthIPMCAvai = false;4083 #endif4084 3926 #endif 4085 3927 4086 #if LGE_SHARP_VSP_INHERIT_F01044087 3928 #if H_3D_IC 4088 3929 Bool bICFlag = getICFlag(uiAbsPartIdx); … … 4091 3932 Bool bARPFlag = getARPW(uiAbsPartIdx)>0 ? true : false; 4092 3933 #endif 4093 #endif 4094 4095 #if ETRIKHU_MERGE_REUSE_F0093 3934 3935 #if H_3D 4096 3936 Int iPosLeftAbove[2] = {-1, -1}; 4097 3937 … … 4118 3958 #if H_3D_VSP 4119 3959 if (pcCULeft->getVSPFlag(uiLeftPartIdx) == 1 4120 #if LGE_SHARP_VSP_INHERIT_F01044121 3960 #if H_3D_IC 4122 3961 && !bICFlag … … 4125 3964 && !bARPFlag 4126 3965 #endif 4127 #endif4128 3966 ) 4129 3967 { 4130 3968 vspFlag[numA1B1B0] = 1; 4131 #if !MTK_VSP_SIMPLIFICATION_F01114132 xInheritVSPDisInfo(pcCULeft,uiLeftPartIdx,iCount,inheritedVSPDisInfo);4133 #endif4134 3969 } 4135 3970 #endif … … 4145 3980 iPosLeftAbove[1] = numA1B1B0; 4146 3981 #if H_3D_VSP 4147 #if BUGFIX_2_F0093 && MTK_VSP_SIMPLIFICATION_F01114148 3982 if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1) 4149 #else4150 if (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 14151 #endif4152 #if LGE_SHARP_VSP_INHERIT_F01044153 3983 #if H_3D_IC 4154 3984 && !bICFlag … … 4157 3987 && !bARPFlag 4158 3988 #endif 4159 #endif4160 3989 ) 4161 3990 { 4162 3991 vspFlag[numA1B1B0] = 1; 4163 #if !MTK_VSP_SIMPLIFICATION_F01114164 xInheritVSPDisInfo(pcCUAbove,uiAbovePartIdx,iCount,inheritedVSPDisInfo);4165 #endif4166 3992 } 4167 3993 #endif … … 4177 4003 { 4178 4004 #if H_3D_VSP 4179 #if BUGFIX_2_F0093 && MTK_VSP_SIMPLIFICATION_F01114180 4005 if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1) 4181 #else4182 if (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 14183 #endif4184 #if LGE_SHARP_VSP_INHERIT_F01044185 4006 #if H_3D_IC 4186 4007 && !bICFlag … … 4189 4010 && !bARPFlag 4190 4011 #endif 4191 #endif4192 4012 ) 4193 4013 { 4194 4014 vspFlag[numA1B1B0] = 1; 4195 #if !MTK_VSP_SIMPLIFICATION_F01114196 xInheritVSPDisInfo(pcCUAboveRight,uiAboveRightPartIdx,iCount,inheritedVSPDisInfo);4197 #endif4198 4015 } 4199 4016 #endif … … 4208 4025 #if H_3D_VSP 4209 4026 if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) == 1 4210 #if LGE_SHARP_VSP_INHERIT_F01044211 4027 #if H_3D_IC 4212 4028 && !bICFlag … … 4215 4031 && !bARPFlag 4216 4032 #endif 4217 #endif4218 4033 ) 4219 4034 { 4220 4035 vspFlag[numA1B1B0] = 1; 4221 #if !MTK_VSP_SIMPLIFICATION_F01114222 xInheritVSPDisInfo(pcCULeftBottom,uiLeftBottomPartIdx,iCount,inheritedVSPDisInfo);4223 #endif4224 4036 } 4225 4037 #endif … … 4235 4047 { 4236 4048 #if H_3D_VSP 4237 #if BUGFIX_2_F0093 && MTK_VSP_SIMPLIFICATION_F01114238 4049 if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1) 4239 #else4240 if (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 14241 #endif4242 #if LGE_SHARP_VSP_INHERIT_F01044243 4050 #if H_3D_IC 4244 4051 && !bICFlag … … 4247 4054 && !bARPFlag 4248 4055 #endif 4249 #endif4250 4056 ) 4251 4057 { 4252 4058 vspFlag[numA1B1B0+iCountHEVC] = 1; 4253 #if !MTK_VSP_SIMPLIFICATION_F01114254 xInheritVSPDisInfo(pcCUAboveLeft,uiAboveLeftPartIdx,iCount,inheritedVSPDisInfo);4255 #endif4256 4059 } 4257 4060 #endif … … 4265 4068 4266 4069 #if H_3D_IV_MERGE 4267 4070 4268 4071 ///////////////////////////////////////////// 4269 4072 //////// TEXTURE MERGE CANDIDATE (T) //////// 4270 4073 ///////////////////////////////////////////// 4271 4272 #if SEC_MPI_ENABLING_MERGE_F0150 4074 4273 4075 if( bMPIFlag) 4274 #else4275 if( m_pcSlice->getIsDepth())4276 #endif4277 4076 { 4278 4077 UInt uiPartIdxCenter; 4279 4078 xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter ); 4280 4281 #if ETRIKHU_MERGE_REUSE_F00934282 4079 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 4283 4080 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); 4284 4081 Int tRef[2]={-1, -1}; 4285 #endif4286 4082 4287 4083 #if H_3D_FCO … … 4289 4085 TComDataCU *pcTextureCU = 0; 4290 4086 if ( pcTexturePic ) 4291 4087 pcTextureCU = pcTexturePic->getCU( getAddr() ); 4292 4088 #else 4293 4089 TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() ); 4294 4090 #endif 4295 4091 4296 4092 #if H_3D_FCO 4297 4093 if ( pcTextureCU && pcTexturePic->getReconMark() && !pcTextureCU->isIntra( uiPartIdxCenter ) ) … … 4300 4096 #endif 4301 4097 { 4302 #if ETRIKHU_MERGE_REUSE_F00934303 4098 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, tmpMV[0] ); 4304 4099 tRef[0] = getPic()->isTextRefValid( REF_PIC_LIST_0, tmpMV[0].getRefIdx() ); … … 4414 4209 } 4415 4210 iCount ++; 4416 4417 #else 4418 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 4419 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1].getRefIdx() ); 4420 if( (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0) && ( iValidDepRef >= 0 ) ) 4421 { 4422 TComMv cMvPred = pcMvFieldNeighbours[iCount<<1].getMv(); 4423 const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 4424 cMvPred+=cAdd; 4425 cMvPred>>=2; 4426 clipMv(cMvPred); 4427 pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,iValidDepRef); 4428 } 4429 if ( getSlice()->isInterB() ) 4430 { 4431 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4432 iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx() ); 4433 if( (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0) && ( iValidDepRef >= 0) ) 4434 { 4435 TComMv cMvPred = pcMvFieldNeighbours[(iCount<<1)+1].getMv(); 4436 const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 4437 cMvPred+=cAdd; 4438 cMvPred>>=2; 4439 clipMv(cMvPred); 4440 pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,iValidDepRef); 4441 } 4442 } 4443 puhInterDirNeighbours[iCount] = (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0)?1:0; 4444 puhInterDirNeighbours[iCount] += (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0)?2:0; 4445 if( puhInterDirNeighbours[iCount] != 0 ) 4446 { 4447 abCandIsInter[iCount] = true; 4448 if ( mrgCandIdx == iCount ) 4449 { 4450 return; 4451 } 4452 iCount ++; 4453 } 4454 #endif 4455 } 4456 } 4457 } 4458 4459 4460 #if !ETRIKHU_MERGE_REUSE_F0093 4461 ////////////////////////////////// 4462 //////// GET DISPARITIES //////// 4463 ////////////////////////////////// 4464 4465 DisInfo cDisInfo = getDvInfo(uiAbsPartIdx); 4466 for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++) 4467 { 4468 inheritedVSPDisInfo[i].m_acDvInfo = cDisInfo; 4469 } 4470 #endif 4211 } 4212 } 4213 } 4471 4214 4472 4215 ///////////////////////////////////////////////////////////////// … … 4475 4218 4476 4219 Int posIvDC = -1; 4477 #if !ETRIKHU_MERGE_REUSE_F00934478 Bool bLeftAvai = false;4479 Int iPosLeftAbove[2] = {-1, -1};4480 #endif4481 4220 4482 4221 // { IvMCL0, IvMCL1, IvDCL0, IvDCL1, IvMCL0Shift, IvMCL1Shift, IvDCL0Shift, IvDCL1Shift }; … … 4489 4228 4490 4229 Bool ivMvPredFlag = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() ); 4491 4230 4492 4231 if ( ivMvPredFlag ) 4493 4232 { 4494 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir 4495 #if QC_DEPTH_IV_MRG_F0125 4496 , bIsDepth 4497 #endif 4498 #if MTK_SPIVMP_F0110 4499 , pcMvFieldSP, puhInterDirSP 4500 #endif 4501 ); 4233 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP ); 4502 4234 } 4503 4235 4504 4236 /////////////////////////////////////////////// 4505 4237 //////// INTER VIEW MOTION COMP(IvMC) ///////// … … 4508 4240 if( ivCandDir[0] ) 4509 4241 { 4510 #if ETRIKHU_MERGE_REUSE_F00934511 4242 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 4512 4243 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); … … 4525 4256 Int iCnloop=0; 4526 4257 4527 #if BUGFIX_F00934528 4258 if (!bIsDepth) 4529 4259 { 4530 #endif4531 4260 for(Int i = 0; i < 2; i ++) 4532 4261 { … … 4542 4271 } 4543 4272 } 4544 #if BUGFIX_F0093 4545 } 4546 #endif 4547 #if QC_DEPTH_IV_MRG_F0125 4548 #if BUGFIX_F0093 4273 } 4549 4274 if (bIsDepth) 4550 #else4551 if ( bIsDepth && !bRemoveSpa)4552 #endif4553 4275 { 4554 4276 iCnloop = iCount-1; 4555 4277 for(; iCnloop >= 0; iCnloop --) 4556 4278 { 4557 #if BUGFIX_F00934558 4279 if(ivCandDir[0] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==tmpMV[0] && pcMvFieldNeighbours[(iCnloop<<1)+1]==tmpMV[1]) // F0125 compatible with F0093 4559 #else4560 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])4561 #endif4562 4280 { 4563 4281 bRemoveSpa = true; … … 4565 4283 } 4566 4284 } 4567 #if !BUGFIX_F0093 4568 if(!bRemoveSpa) 4569 { 4570 bDepthIPMCAvai = true; 4571 } 4572 #endif 4573 } 4574 #endif 4285 } 4575 4286 4576 4287 if (!bRemoveSpa) … … 4628 4339 if (bIvMC) 4629 4340 { 4630 #if MTK_SPIVMP_F01104631 4341 pbSPIVMPFlag[iCount] = true; 4632 #endif4633 4342 if( ( ivCandDir[0] & 1 ) == 1 ) 4634 4343 { … … 4642 4351 puhInterDirNeighbours[ iCount ] = ivCandDir[0]; 4643 4352 4644 #if !BUGFIX_F00934645 #if QC_DEPTH_IV_MRG_F01254646 if ( bDepthIPMCAvai || !bIsDepth )4647 {4648 #endif4649 #endif4650 if ( mrgCandIdx == iCount )4651 {4652 return;4653 }4654 iCount ++;4655 #if !BUGFIX_F00934656 #if QC_DEPTH_IV_MRG_F01254657 }4658 #endif4659 #endif4660 }4661 #else4662 abCandIsInter [ iCount ] = true;4663 puhInterDirNeighbours[ iCount ] = ivCandDir[0];4664 4665 if( ( ivCandDir[0] & 1 ) == 1 )4666 {4667 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ 0 ], ivCandRefIdx[ 0 ] );4668 }4669 if( ( ivCandDir[0] & 2 ) == 2 )4670 {4671 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 1 ], ivCandRefIdx[ 1 ] );4672 }4673 #if QC_DEPTH_IV_MRG_F01254674 if ( bIsDepth )4675 {4676 Bool bRemoveSpa = false;4677 Int iCnloop = iCount-1;4678 for(; iCnloop >= 0; iCnloop --)4679 {4680 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])4681 {4682 bRemoveSpa = true;4683 abCandIsInter [ iCount ] = false;4684 4685 puhInterDirNeighbours[iCount] = 0;4686 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );4687 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );4688 break;4689 }4690 }4691 if(!bRemoveSpa)4692 {4693 bDepthIPMCAvai = true;4694 }4695 }4696 if ( bDepthIPMCAvai || !bIsDepth )4697 {4698 #endif4699 4353 if ( mrgCandIdx == iCount ) 4700 4354 { … … 4702 4356 } 4703 4357 iCount ++; 4704 #if QC_DEPTH_IV_MRG_F0125 4705 } 4706 #endif 4707 4708 #endif 4709 4358 } 4710 4359 } 4711 4360 … … 4717 4366 #endif 4718 4367 4719 4720 4721 4722 4723 #if ETRIKHU_MERGE_REUSE_F0093 4368 #if H_3D 4724 4369 iCount += numA1B1B0; 4725 4370 #else 4726 #if H_3D4727 ////////////////////////////4728 //////// LEFT (A1) /////////4729 ////////////////////////////4730 #endif4731 4371 //left 4732 4372 UInt uiLeftPartIdx = 0; … … 4748 4388 pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4749 4389 } 4750 #if H_3D_IV_MERGE 4751 Bool bRemoveSpa = false; //pruning to inter-view candidates 4752 #if QC_DEPTH_IV_MRG_F0125 4753 Int iCnloop = bDepthIPMCAvai ? (iCount-2): (iCount-1); 4754 #else 4755 Int iCnloop = iCount - 1; 4756 #endif 4757 for(; iCnloop >= 0; iCnloop --) 4758 { 4759 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 4760 { 4761 bRemoveSpa = true; 4762 abCandIsInter [ iCount ] = false; 4763 4764 //reset to the default value for MC 4765 puhInterDirNeighbours[iCount] = 0; 4766 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID ); 4767 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 4768 break; 4769 } 4770 } 4771 if(!bRemoveSpa) 4772 { 4773 bLeftAvai = true; 4774 iPosLeftAbove[0] = iCount; 4775 #if H_3D_NBDV 4776 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); 4777 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); 4778 #endif 4779 #if H_3D_VSP 4780 if (pcCULeft->getVSPFlag(uiLeftPartIdx) == 1 4781 #if LGE_SHARP_VSP_INHERIT_F0104 4782 #if H_3D_IC 4783 && !bICFlag 4784 #endif 4785 #if H_3D_ARP 4786 && !bARPFlag 4787 #endif 4788 #endif 4789 ) 4790 { 4791 vspFlag[iCount] = 1; 4792 #if !MTK_VSP_SIMPLIFICATION_F0111 4793 xInheritVSPDisInfo(pcCULeft,uiLeftPartIdx,iCount,inheritedVSPDisInfo); 4794 #endif 4795 } 4796 #endif 4797 if ( mrgCandIdx == iCount ) 4798 { 4799 return; 4800 } 4801 iCount ++; 4802 } 4803 #else // H_3D_IV_MERGE 4390 4804 4391 if ( mrgCandIdx == iCount ) 4805 4392 { … … 4807 4394 } 4808 4395 iCount ++; 4809 #endif // H_3D_IV_MERGE4810 4396 } 4811 4397 … … 4815 4401 return; 4816 4402 } 4817 #if H_3D 4818 //////////////////////////// 4819 //////// ABOVE (B1) //////// 4820 //////////////////////////// 4821 #endif 4403 4822 4404 // above 4823 4405 UInt uiAbovePartIdx = 0; … … 4839 4421 pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4840 4422 } 4841 #if H_3D_IV_MERGE 4842 Bool bRemoveSpa = false; //pruning to inter-view candidates 4843 #if QC_DEPTH_IV_MRG_F0125 4844 Int iCnloop; 4845 if( bIsDepth ) 4846 iCnloop = (bLeftAvai && bDepthIPMCAvai) ? (iCount-3) : ((bLeftAvai || bDepthIPMCAvai) ? (iCount-2): (iCount-1)); 4847 else 4848 iCnloop = bLeftAvai? (iCount-2): (iCount-1); 4849 #else 4850 Int iCnloop = bLeftAvai? (iCount-2): (iCount-1); 4851 #endif 4852 for(; iCnloop >= 0; iCnloop --) 4853 { 4854 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 4855 { 4856 bRemoveSpa = true; 4857 abCandIsInter [ iCount ] = false; 4858 4859 //reset to the default value for MC 4860 puhInterDirNeighbours[iCount] = 0; 4861 4862 pcMvFieldNeighbours[iCount<<1] .setMvField( cZeroMv, NOT_VALID ); 4863 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 4864 break; 4865 } 4866 } 4867 4868 if(!bRemoveSpa) 4869 { 4870 iPosLeftAbove[1] = iCount; 4871 #if H_3D_NBDV 4872 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); 4873 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); 4874 #endif 4875 #if H_3D_VSP 4876 #if MTK_VSP_SIMPLIFICATION_F0111 4877 if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1) 4878 #if LGE_SHARP_VSP_INHERIT_F0104 4879 #if H_3D_IC 4880 && !bICFlag 4881 #endif 4882 #if H_3D_ARP 4883 && !bARPFlag 4884 #endif 4885 #endif 4886 ) 4887 #else 4888 if (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1 4889 #if LGE_SHARP_VSP_INHERIT_F0104 4890 #if H_3D_IC 4891 && !bICFlag 4892 #endif 4893 #if H_3D_ARP 4894 && !bARPFlag 4895 #endif 4896 #endif 4897 ) 4898 #endif 4899 { 4900 4901 vspFlag[iCount] = 1; 4902 #if !MTK_VSP_SIMPLIFICATION_F0111 4903 xInheritVSPDisInfo(pcCUAbove,uiAbovePartIdx,iCount,inheritedVSPDisInfo); 4904 #endif 4905 } 4906 #endif 4907 if ( mrgCandIdx == iCount ) 4908 { 4909 return; 4910 } 4911 iCount ++; 4912 } 4913 #else // H_3D_IV_MERGE 4423 4914 4424 if ( mrgCandIdx == iCount ) 4915 4425 { … … 4917 4427 } 4918 4428 iCount ++; 4919 #endif // H_3D_IV_MERGE4920 4429 } 4921 4430 // early termination … … 4924 4433 return; 4925 4434 } 4926 4927 #if H_3D4928 //////////////////////////////////4929 //////// ABOVE RIGHT (B0) ////////4930 //////////////////////////////////4931 #endif4932 4435 4933 4436 // above right … … 4949 4452 pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4950 4453 } 4951 #if H_3D_NBDV 4952 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); 4953 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); 4954 #endif 4955 #if H_3D_VSP 4956 #if MTK_VSP_SIMPLIFICATION_F0111 4957 if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1) 4958 #if LGE_SHARP_VSP_INHERIT_F0104 4959 #if H_3D_IC 4960 && !bICFlag 4961 #endif 4962 #if H_3D_ARP 4963 && !bARPFlag 4964 #endif 4965 #endif 4966 ) 4967 #else 4968 if (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1 4969 #if LGE_SHARP_VSP_INHERIT_F0104 4970 #if H_3D_IC 4971 && !bICFlag 4972 #endif 4973 #if H_3D_ARP 4974 && !bARPFlag 4975 #endif 4976 #endif 4977 ) 4978 #endif 4979 { 4980 vspFlag[iCount] = 1; 4981 #if !MTK_VSP_SIMPLIFICATION_F0111 4982 xInheritVSPDisInfo(pcCUAboveRight,uiAboveRightPartIdx,iCount,inheritedVSPDisInfo); 4983 #endif 4984 } 4985 #endif 4454 4986 4455 if ( mrgCandIdx == iCount ) 4987 4456 { … … 5003 4472 ///////////////////////////////////////////// 5004 4473 5005 #if ETRIKHU_MERGE_REUSE_F00935006 4474 if( ivCandDir[1] && iCount < getSlice()->getMaxNumMergeCand()) 5007 #else5008 if( ivCandDir[1] )5009 #endif5010 4475 { 5011 4476 assert(iCount < getSlice()->getMaxNumMergeCand()); 5012 4477 5013 #if ETRIKHU_MERGE_REUSE_F00935014 4478 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 5015 4479 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); … … 5022 4486 tmpMV[1].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] ); 5023 4487 } 5024 #else5025 abCandIsInter [ iCount ] = true;5026 puhInterDirNeighbours[ iCount ] = ivCandDir[1];5027 if( ( ivCandDir[1] & 1 ) == 1 )5028 {5029 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ 2 ], ivCandRefIdx[ 2 ] );5030 }5031 if( ( ivCandDir[1] & 2 ) == 2 )5032 {5033 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] );5034 }5035 #endif5036 4488 5037 4489 Bool bRemoveSpa = false; //pruning to A1, B1 … … 5046 4498 { 5047 4499 bRemoveSpa = true; 5048 #if !ETRIKHU_MERGE_REUSE_F00935049 abCandIsInter [ iCount ] = false;5050 //reset to the default value for MC5051 puhInterDirNeighbours[iCount] = 0;5052 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );5053 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );5054 #endif5055 4500 break; 5056 4501 } … … 5058 4503 if(!bRemoveSpa) 5059 4504 { 5060 #if ETRIKHU_MERGE_REUSE_F00935061 4505 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 5062 4506 puhInterDirNeighbours[ iCount ] = ivCandDir[1]; … … 5069 4513 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] ); 5070 4514 } 5071 #endif5072 4515 #if H_3D_NBDV 5073 4516 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); … … 5092 4535 //////// VIEW SYNTHESIS PREDICTION (VSP) //////// 5093 4536 ///////////////////////////////////////////////// 5094 #if ETRIKHU_MERGE_REUSE_F00935095 4537 if (iCount<getSlice()->getMaxNumMergeCand()) 5096 4538 { 5097 #endif5098 4539 5099 4540 if ( 5100 #if LGE_SHARP_VSP_INHERIT_F01045101 4541 #if H_3D_IC 5102 4542 !bICFlag && … … 5105 4545 !bARPFlag && 5106 4546 #endif 5107 #endif5108 #if ETRIKHU_MERGE_REUSE_F00935109 4547 xAddVspCand( mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, iCount3DV, inheritedVSPDisInfo ) ) 5110 #else5111 xAddVspCand( mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag ) )5112 #endif5113 4548 { 5114 4549 return; … … 5121 4556 } 5122 4557 #endif 5123 #if ETRIKHU_MERGE_REUSE_F00935124 } 5125 #endif 5126 5127 #if ETRIKHU_MERGE_REUSE_F00934558 #if H_3D 4559 } 4560 #endif 4561 4562 #if H_3D 5128 4563 iCount += numA0B2; 5129 4564 #else 5130 #if H_3D5131 ///////////////////////////////////5132 //////// LEFT BOTTOM (A0) ////////5133 ///////////////////////////////////5134 #endif5135 5136 4565 //left bottom 5137 4566 UInt uiLeftBottomPartIdx = 0; … … 5152 4581 pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 5153 4582 } 5154 #if H_3D_NBDV5155 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);5156 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);5157 #endif5158 #if H_3D_VSP5159 if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) == 15160 #if LGE_SHARP_VSP_INHERIT_F01045161 #if H_3D_IC5162 && !bICFlag5163 #endif5164 #if H_3D_ARP5165 && !bARPFlag5166 #endif5167 #endif5168 )5169 {5170 vspFlag[iCount] = 1;5171 #if !MTK_VSP_SIMPLIFICATION_F01115172 xInheritVSPDisInfo(pcCULeftBottom,uiLeftBottomPartIdx,iCount,inheritedVSPDisInfo);5173 #endif5174 }5175 #endif5176 4583 if ( mrgCandIdx == iCount ) 5177 4584 { … … 5185 4592 return; 5186 4593 } 5187 #if H_3D5188 ///////////////////////////////////5189 //////// LEFT ABOVE (B2) ////////5190 ///////////////////////////////////5191 #endif5192 4594 5193 4595 // above left … … 5212 4614 pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 5213 4615 } 5214 #if H_3D_NBDV5215 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);5216 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);5217 #endif5218 #if H_3D_VSP5219 #if MTK_VSP_SIMPLIFICATION_F01115220 if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1)5221 #if LGE_SHARP_VSP_INHERIT_F01045222 #if H_3D_IC5223 && !bICFlag5224 #endif5225 #if H_3D_ARP5226 && !bARPFlag5227 #endif5228 #endif5229 )5230 #else5231 if (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 15232 #if LGE_SHARP_VSP_INHERIT_F01045233 #if H_3D_IC5234 && !bICFlag5235 #endif5236 #if H_3D_ARP5237 && !bARPFlag5238 #endif5239 #endif5240 )5241 #endif5242 {5243 vspFlag[iCount] = 1;5244 #if !MTK_VSP_SIMPLIFICATION_F01115245 xInheritVSPDisInfo(pcCUAboveLeft,uiAboveLeftPartIdx,iCount,inheritedVSPDisInfo);5246 #endif5247 }5248 #endif5249 4616 if ( mrgCandIdx == iCount ) 5250 4617 { … … 5266 4633 //////// SHIFTED IV (IvMCShift + IvDCShift) //////// 5267 4634 //////////////////////////////////////////////////// 5268 #if ETRIKHU_MERGE_REUSE_F00935269 4635 if( ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() ) 5270 4636 { 5271 4637 if(xAddIvMRGCand( mrgCandIdx, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag, iCount3DV, inheritedVSPDisInfo ) ) 5272 #else5273 if( ivMvPredFlag )5274 {5275 if(xAddIvMRGCand( mrgCandIdx, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag))5276 #endif5277 4638 { 5278 4639 return; … … 5286 4647 #endif 5287 4648 5288 #if ETRIKHU_MERGE_REUSE_F00934649 #if H_3D 5289 4650 if (iCountHEVC + iCount3DV > getSlice()->getMaxNumMergeCand()) 5290 4651 { … … 5297 4658 numValidMergeCand = iCount; 5298 4659 #else 5299 #if H_3D5300 /////////////////////////////////5301 //////// Collocate (COL) ////////5302 /////////////////////////////////5303 #endif5304 4660 if ( getSlice()->getEnableTMVPFlag()) 5305 4661 { … … 5366 4722 if ( getSlice()->isInterB() ) 5367 4723 { 5368 #if H_3D_TMVP5369 iRefIdx = 0;5370 #endif5371 4724 bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_1, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx); 5372 4725 if( bExistMV == false ) … … 5385 4738 puhInterDirNeighbours[uiArrayAddr] = dir; 5386 4739 abCandIsInter[uiArrayAddr] = true; 5387 #if H_3D_NBDV5388 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);5389 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);5390 #endif5391 4740 if ( mrgCandIdx == iCount ) 5392 4741 { … … 5406 4755 if ( getSlice()->isInterB()) 5407 4756 { 5408 #if H_3D_IV_MERGE5409 UInt uiPriorityList0[20] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3, 0, 4, 1, 4, 2, 4, 3, 4 };5410 UInt uiPriorityList1[20] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2, 4, 0, 4, 1, 4, 2, 4, 3 };5411 #else5412 4757 UInt uiPriorityList0[12] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3}; 5413 4758 UInt uiPriorityList1[12] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2}; 5414 #endif5415 4759 5416 4760 for (Int idx=0; idx<uiCutoff*(uiCutoff-1) && uiArrayAddr!= getSlice()->getMaxNumMergeCand(); idx++) 5417 4761 { 5418 4762 Int i = uiPriorityList0[idx]; Int j = uiPriorityList1[idx]; 5419 #if H_3D_VSP5420 Bool bValid = true;5421 if ( vspFlag[i] == 1 || vspFlag[j] == 1 )5422 {5423 bValid = false;5424 }5425 if( !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) )5426 {5427 assert(bValid == true);5428 }5429 #endif5430 #if H_3D_VSP5431 if (abCandIsInter[i] && abCandIsInter[j] && (puhInterDirNeighbours[i]&0x1) && (puhInterDirNeighbours[j]&0x2) && bValid)5432 #else5433 4763 if (abCandIsInter[i] && abCandIsInter[j]&& (puhInterDirNeighbours[i]&0x1)&&(puhInterDirNeighbours[j]&0x2)) 5434 #endif5435 4764 { 5436 4765 abCandIsInter[uiArrayAddr] = true; … … 5488 4817 #endif 5489 4818 } 5490 5491 5492 5493 5494 4819 #else 5495 4820 … … 5503 4828 */ 5504 4829 Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours 5505 #if H_3D_VSP5506 , Int* vspFlag5507 , InheritedVSPDisInfo* inheritedVSPDisInfo5508 #endif5509 4830 , Int& numValidMergeCand, Int mrgCandIdx 5510 4831 ) 5511 4832 { 5512 4833 UInt uiAbsPartAddr = m_uiAbsIdxInLCU + uiAbsPartIdx; 5513 #if H_3D_IV_MERGE5514 ////////////////////////////5515 //////// INIT LISTS ////////5516 ////////////////////////////5517 TComMv cZeroMv;5518 Bool abCandIsInter[ MRG_MAX_NUM_CANDS_MEM ];5519 #else5520 4834 Bool abCandIsInter[ MRG_MAX_NUM_CANDS ]; 5521 #endif5522 4835 for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ++ui ) 5523 4836 { 5524 4837 abCandIsInter[ui] = false; 5525 #if H_3D_IV_MERGE5526 pcMvFieldNeighbours[ ( ui << 1 ) ].setMvField(cZeroMv, NOT_VALID);5527 pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setMvField(cZeroMv, NOT_VALID);5528 #else5529 4838 pcMvFieldNeighbours[ ( ui << 1 ) ].setRefIdx(NOT_VALID); 5530 4839 pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setRefIdx(NOT_VALID); 5531 #endif5532 4840 } 5533 4841 numValidMergeCand = getSlice()->getMaxNumMergeCand(); 5534 #if H_3D5535 //////////////////////////////////5536 //////// DERIVE LOCATIONS ////////5537 //////////////////////////////////5538 #endif5539 4842 // compute the location of the current PU 5540 4843 Int xP, yP, nPSW, nPSH; … … 5547 4850 deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT ); 5548 4851 deriveLeftBottomIdxGeneral ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB ); 5549 #if SEC_MPI_ENABLING_MERGE_F0150 5550 Bool bMPIFlag = getSlice()->getVPS()->getMPIFlag( getSlice()->getLayerIdInVps() ); 5551 #endif 5552 #if QC_DEPTH_IV_MRG_F0125 5553 Bool bIsDepth = getSlice()->getIsDepth(); 5554 Bool bDepthIPMCAvai = false; 5555 #endif 5556 5557 #if LGE_SHARP_VSP_INHERIT_F0104 5558 #if H_3D_IC 5559 Bool bICFlag = getICFlag(uiAbsPartIdx); 5560 #endif 5561 #if H_3D_ARP 5562 Bool bARPFlag = getARPW(uiAbsPartIdx)>0 ? true : false; 5563 #endif 5564 #endif 5565 5566 #if H_3D_IV_MERGE 5567 5568 ///////////////////////////////////////////// 5569 //////// TEXTURE MERGE CANDIDATE (T) //////// 5570 ///////////////////////////////////////////// 5571 5572 #if SEC_MPI_ENABLING_MERGE_F0150 5573 if( bMPIFlag) 5574 #else 5575 if( m_pcSlice->getIsDepth()) 5576 #endif 5577 { 5578 UInt uiPartIdxCenter; 5579 xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter ); 5580 #if H_3D_FCO 5581 TComPic * pcTexturePic = m_pcSlice->getTexturePic(); 5582 TComDataCU *pcTextureCU = 0; 5583 if ( pcTexturePic ) 5584 pcTextureCU = pcTexturePic->getCU( getAddr() ); 5585 #else 5586 TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() ); 5587 #endif 5588 5589 #if H_3D_FCO 5590 if ( pcTextureCU && pcTexturePic->getReconMark() && !pcTextureCU->isIntra( uiPartIdxCenter ) ) 5591 #else 5592 if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdxCenter ) ) 5593 #endif 5594 { 5595 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 5596 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1].getRefIdx() ); 5597 if( (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0) && ( iValidDepRef >= 0 ) ) 5598 { 5599 TComMv cMvPred = pcMvFieldNeighbours[iCount<<1].getMv(); 5600 const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 5601 cMvPred+=cAdd; 5602 cMvPred>>=2; 5603 clipMv(cMvPred); 5604 pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,iValidDepRef); 5605 } 5606 5607 if ( getSlice()->isInterB() ) 5608 { 5609 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 5610 iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx() ); 5611 if( (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0) && ( iValidDepRef >= 0) ) 5612 { 5613 TComMv cMvPred = pcMvFieldNeighbours[(iCount<<1)+1].getMv(); 5614 const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 5615 cMvPred+=cAdd; 5616 cMvPred>>=2; 5617 clipMv(cMvPred); 5618 pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,iValidDepRef); 5619 } 5620 } 5621 5622 puhInterDirNeighbours[iCount] = (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0)?1:0; 5623 puhInterDirNeighbours[iCount] += (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0)?2:0; 5624 5625 if( puhInterDirNeighbours[iCount] != 0 ) 5626 { 5627 abCandIsInter[iCount] = true; 5628 if ( mrgCandIdx == iCount ) 5629 { 5630 return; 5631 } 5632 iCount ++; 5633 } 5634 } 5635 } 5636 5637 ////////////////////////////////// 5638 //////// GET DISPARITIES //////// 5639 ////////////////////////////////// 5640 5641 DisInfo cDisInfo = getDvInfo(uiAbsPartIdx); 5642 5643 for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++) 5644 { 5645 inheritedVSPDisInfo[i].m_acDvInfo = cDisInfo; 5646 } 5647 5648 ///////////////////////////////////////////////////////////////// 5649 //////// DERIVE IvMC, IvMCShift,IvDCShift, IvDC Candidates ///// 5650 ///////////////////////////////////////////////////////////////// 5651 5652 Int posIvDC = -1; 5653 Bool bLeftAvai = false; 5654 Int iPosLeftAbove[2] = {-1, -1}; 5655 5656 5657 // { IvMCL0, IvMCL1, IvDCL0, IvDCL1, IvMCL0Shift, IvMCL1Shift, IvDCL0Shift, IvDCL1Shift }; 5658 // An enumerator would be appropriate here! 5659 TComMv ivCandMv [8]; 5660 Int ivCandRefIdx[8] = {-1, -1, -1, -1, -1, -1, -1, -1}; 5661 5662 // { IvMC, IvDC, IvMCShift, IvDCShift }; 5663 Int ivCandDir [4] = {0, 0, 0, 0}; 5664 5665 Bool ivMvPredFlag = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() ); 5666 5667 if ( ivMvPredFlag ) 5668 { 5669 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir 5670 #if QC_DEPTH_IV_MRG_F0125 5671 , bIsDepth 5672 #endif 5673 ); 5674 } 5675 5676 /////////////////////////////////////////////// 5677 //////// INTER VIEW MOTION COMP(IvMC) ///////// 5678 /////////////////////////////////////////////// 5679 5680 if( ivCandDir[0] ) 5681 { 5682 abCandIsInter [ iCount ] = true; 5683 puhInterDirNeighbours[ iCount ] = ivCandDir[0]; 5684 5685 if( ( ivCandDir[0] & 1 ) == 1 ) 5686 { 5687 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ 0 ], ivCandRefIdx[ 0 ] ); 5688 } 5689 if( ( ivCandDir[0] & 2 ) == 2 ) 5690 { 5691 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 1 ], ivCandRefIdx[ 1 ] ); 5692 } 5693 5694 #if QC_DEPTH_IV_MRG_F0125 5695 if ( bIsDepth ) 5696 { 5697 Bool bRemoveSpa = false; 5698 Int iCnloop = iCount-1; 5699 for(; iCnloop >= 0; iCnloop --) 5700 { 5701 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 5702 { 5703 bRemoveSpa = true; 5704 abCandIsInter [ iCount ] = false; 5705 5706 puhInterDirNeighbours[iCount] = 0; 5707 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID ); 5708 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 5709 break; 5710 } 5711 } 5712 if(!bRemoveSpa) 5713 { 5714 bDepthIPMCAvai = true; 5715 } 5716 } 5717 if ( bDepthIPMCAvai || !bIsDepth ) 5718 { 5719 #endif 5720 if ( mrgCandIdx == iCount ) 5721 { 5722 return; 5723 } 5724 iCount ++; 5725 #if QC_DEPTH_IV_MRG_F0125 5726 } 5727 #endif 5728 } 5729 5730 // early termination 5731 if (iCount == getSlice()->getMaxNumMergeCand()) 5732 { 5733 return; 5734 } 5735 #endif 5736 5737 #if H_3D 5738 //////////////////////////// 5739 //////// LEFT (A1) ///////// 5740 //////////////////////////// 5741 #endif 4852 5742 4853 //left 5743 4854 UInt uiLeftPartIdx = 0; … … 5759 4870 pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 5760 4871 } 5761 #if H_3D_IV_MERGE5762 Bool bRemoveSpa = false; //pruning to inter-view candidates5763 #if QC_DEPTH_IV_MRG_F01255764 Int iCnloop = bDepthIPMCAvai ? (iCount-2): (iCount-1);5765 #else5766 Int iCnloop = iCount - 1;5767 #endif5768 for(; iCnloop >= 0; iCnloop --)5769 {5770 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])5771 {5772 bRemoveSpa = true;5773 abCandIsInter [ iCount ] = false;5774 5775 //reset to the default value for MC5776 puhInterDirNeighbours[iCount] = 0;5777 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );5778 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );5779 break;5780 }5781 }5782 if(!bRemoveSpa)5783 {5784 bLeftAvai = true;5785 iPosLeftAbove[0] = iCount;5786 #if H_3D_NBDV5787 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);5788 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);5789 #endif5790 #if H_3D_VSP5791 if (pcCULeft->getVSPFlag(uiLeftPartIdx) == 15792 #if LGE_SHARP_VSP_INHERIT_F01045793 #if H_3D_IC5794 && !bICFlag5795 #endif5796 #if H_3D_ARP5797 && !bARPFlag5798 #endif5799 #endif5800 )5801 {5802 vspFlag[iCount] = 1;5803 #if !MTK_VSP_SIMPLIFICATION_F01115804 xInheritVSPDisInfo(pcCULeft,uiLeftPartIdx,iCount,inheritedVSPDisInfo);5805 #endif5806 }5807 #endif5808 if ( mrgCandIdx == iCount )5809 {5810 return;5811 }5812 iCount ++;5813 }5814 #else // H_3D_IV_MERGE5815 4872 if ( mrgCandIdx == iCount ) 5816 4873 { … … 5818 4875 } 5819 4876 iCount ++; 5820 #endif // H_3D_IV_MERGE5821 4877 } 5822 4878 … … 5826 4882 return; 5827 4883 } 5828 #if H_3D 5829 //////////////////////////// 5830 //////// ABOVE (B1) //////// 5831 //////////////////////////// 5832 #endif 4884 5833 4885 // above 5834 4886 UInt uiAbovePartIdx = 0; … … 5850 4902 pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 5851 4903 } 5852 #if H_3D_IV_MERGE 5853 Bool bRemoveSpa = false; //pruning to inter-view candidates 5854 #if QC_DEPTH_IV_MRG_F0125 5855 Int iCnloop; 5856 if( bIsDepth ) 5857 iCnloop = (bLeftAvai && bDepthIPMCAvai) ? (iCount-3) : ((bLeftAvai || bDepthIPMCAvai) ? (iCount-2): (iCount-1)); 5858 else 5859 iCnloop = bLeftAvai? (iCount-2): (iCount-1); 5860 #else 5861 Int iCnloop = bLeftAvai? (iCount-2): (iCount-1); 5862 #endif 5863 for(; iCnloop >= 0; iCnloop --) 5864 { 5865 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 5866 { 5867 bRemoveSpa = true; 5868 abCandIsInter [ iCount ] = false; 5869 5870 //reset to the default value for MC 5871 puhInterDirNeighbours[iCount] = 0; 5872 5873 pcMvFieldNeighbours[iCount<<1] .setMvField( cZeroMv, NOT_VALID ); 5874 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 5875 break; 5876 } 5877 } 5878 5879 if(!bRemoveSpa) 5880 { 5881 iPosLeftAbove[1] = iCount; 5882 #if H_3D_NBDV 5883 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); 5884 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); 5885 #endif 5886 #if H_3D_VSP 5887 #if MTK_VSP_SIMPLIFICATION_F0111 5888 if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1) 5889 #if LGE_SHARP_VSP_INHERIT_F0104 5890 #if H_3D_IC 5891 && !bICFlag 5892 #endif 5893 #if H_3D_ARP 5894 && !bARPFlag 5895 #endif 5896 #endif 5897 ) 5898 #else 5899 if (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1 5900 #if LGE_SHARP_VSP_INHERIT_F0104 5901 #if H_3D_IC 5902 && !bICFlag 5903 #endif 5904 #if H_3D_ARP 5905 && !bARPFlag 5906 #endif 5907 #endif 5908 ) 5909 #endif 5910 { 5911 5912 vspFlag[iCount] = 1; 5913 #if !MTK_VSP_SIMPLIFICATION_F0111 5914 xInheritVSPDisInfo(pcCUAbove,uiAbovePartIdx,iCount,inheritedVSPDisInfo); 5915 #endif 5916 } 5917 #endif 5918 if ( mrgCandIdx == iCount ) 5919 { 5920 return; 5921 } 5922 iCount ++; 5923 } 5924 #else // H_3D_IV_MERGE 4904 5925 4905 if ( mrgCandIdx == iCount ) 5926 4906 { … … 5928 4908 } 5929 4909 iCount ++; 5930 #endif // H_3D_IV_MERGE5931 4910 } 5932 4911 // early termination … … 5936 4915 } 5937 4916 5938 #if H_3D5939 //////////////////////////////////5940 //////// ABOVE RIGHT (B0) ////////5941 //////////////////////////////////5942 #endif5943 4917 5944 4918 // above right … … 5960 4934 pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 5961 4935 } 5962 #if H_3D_NBDV5963 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);5964 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);5965 #endif5966 #if H_3D_VSP5967 #if MTK_VSP_SIMPLIFICATION_F01115968 if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1)5969 #if LGE_SHARP_VSP_INHERIT_F01045970 #if H_3D_IC5971 && !bICFlag5972 #endif5973 #if H_3D_ARP5974 && !bARPFlag5975 #endif5976 #endif5977 )5978 #else5979 if (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 15980 #if LGE_SHARP_VSP_INHERIT_F01045981 #if H_3D_IC5982 && !bICFlag5983 #endif5984 #if H_3D_ARP5985 && !bARPFlag5986 #endif5987 #endif5988 )5989 #endif5990 {5991 vspFlag[iCount] = 1;5992 #if !MTK_VSP_SIMPLIFICATION_F01115993 xInheritVSPDisInfo(pcCUAboveRight,uiAboveRightPartIdx,iCount,inheritedVSPDisInfo);5994 #endif5995 }5996 #endif5997 4936 if ( mrgCandIdx == iCount ) 5998 4937 { … … 6006 4945 return; 6007 4946 } 6008 6009 #if H_3D_IV_MERGE6010 /////////////////////////////////////////////6011 //////// INTER VIEW DISP COMP (IvDC) ////////6012 /////////////////////////////////////////////6013 6014 if( ivCandDir[1] )6015 {6016 assert(iCount < getSlice()->getMaxNumMergeCand());6017 abCandIsInter [ iCount ] = true;6018 puhInterDirNeighbours[ iCount ] = ivCandDir[1];6019 if( ( ivCandDir[1] & 1 ) == 1 )6020 {6021 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ 2 ], ivCandRefIdx[ 2 ] );6022 }6023 if( ( ivCandDir[1] & 2 ) == 2 )6024 {6025 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] );6026 }6027 6028 Bool bRemoveSpa = false; //pruning to A1, B16029 for(Int i = 0; i < 2; i ++)6030 {6031 Int iCnloop = iPosLeftAbove[i];6032 if ( iCnloop == -1 )6033 {6034 continue;6035 }6036 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])6037 {6038 bRemoveSpa = true;6039 abCandIsInter [ iCount ] = false;6040 //reset to the default value for MC6041 puhInterDirNeighbours[iCount] = 0;6042 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );6043 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );6044 break;6045 }6046 }6047 if(!bRemoveSpa)6048 {6049 #if H_3D_NBDV6050 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);6051 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);6052 #endif6053 posIvDC = iCount;6054 if ( mrgCandIdx == iCount )6055 return;6056 iCount ++;6057 6058 // early termination6059 if (iCount == getSlice()->getMaxNumMergeCand())6060 {6061 return;6062 }6063 }6064 }6065 #endif // H_3D_IV_MERGE6066 6067 #if H_3D_VSP6068 /////////////////////////////////////////////////6069 //////// VIEW SYNTHESIS PREDICTION (VSP) ////////6070 /////////////////////////////////////////////////6071 6072 if (6073 #if LGE_SHARP_VSP_INHERIT_F01046074 #if H_3D_IC6075 !bICFlag &&6076 #endif6077 #if H_3D_ARP6078 !bARPFlag &&6079 #endif6080 #endif6081 xAddVspCand( mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag ) )6082 {6083 return;6084 }6085 6086 // early termination6087 if (iCount == getSlice()->getMaxNumMergeCand())6088 {6089 return;6090 }6091 #endif6092 #if H_3D6093 ///////////////////////////////////6094 //////// LEFT BOTTOM (A0) ////////6095 ///////////////////////////////////6096 #endif6097 4947 6098 4948 //left bottom … … 6114 4964 pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 6115 4965 } 6116 #if H_3D_NBDV 6117 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); 6118 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); 6119 #endif 6120 #if H_3D_VSP 6121 if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) == 1 6122 #if LGE_SHARP_VSP_INHERIT_F0104 6123 #if H_3D_IC 6124 && !bICFlag 6125 #endif 6126 #if H_3D_ARP 6127 && !bARPFlag 6128 #endif 6129 #endif 6130 ) 6131 { 6132 vspFlag[iCount] = 1; 6133 #if !MTK_VSP_SIMPLIFICATION_F0111 6134 xInheritVSPDisInfo(pcCULeftBottom,uiLeftBottomPartIdx,iCount,inheritedVSPDisInfo); 6135 #endif 6136 } 6137 #endif 4966 6138 4967 if ( mrgCandIdx == iCount ) 6139 4968 { … … 6147 4976 return; 6148 4977 } 6149 #if H_3D6150 ///////////////////////////////////6151 //////// LEFT ABOVE (B2) ////////6152 ///////////////////////////////////6153 #endif6154 4978 6155 4979 // above left … … 6174 4998 pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 6175 4999 } 6176 #if H_3D_NBDV6177 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);6178 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);6179 #endif6180 #if H_3D_VSP6181 #if MTK_VSP_SIMPLIFICATION_F01116182 if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1)6183 #if LGE_SHARP_VSP_INHERIT_F01046184 #if H_3D_IC6185 && !bICFlag6186 #endif6187 #if H_3D_ARP6188 && !bARPFlag6189 #endif6190 #endif6191 )6192 #else6193 if (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 16194 #if LGE_SHARP_VSP_INHERIT_F01046195 #if H_3D_IC6196 && !bICFlag6197 #endif6198 #if H_3D_ARP6199 && !bARPFlag6200 #endif6201 #endif6202 )6203 #endif6204 {6205 vspFlag[iCount] = 1;6206 #if !MTK_VSP_SIMPLIFICATION_F01116207 xInheritVSPDisInfo(pcCUAboveLeft,uiAboveLeftPartIdx,iCount,inheritedVSPDisInfo);6208 #endif6209 }6210 #endif6211 5000 if ( mrgCandIdx == iCount ) 6212 5001 { … … 6221 5010 return; 6222 5011 } 6223 #if H_3D_IV_MERGE 6224 //////////////////////////////////////////////////// 6225 //////// SHIFTED IV (IvMCShift + IvDCShift) //////// 6226 //////////////////////////////////////////////////// 6227 6228 if( ivMvPredFlag ) 6229 { 6230 if(xAddIvMRGCand( mrgCandIdx, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag)) 6231 { 6232 return; 6233 } 6234 //early termination 6235 if (iCount == getSlice()->getMaxNumMergeCand()) 6236 { 6237 return; 6238 } 6239 } 6240 #endif 6241 #if H_3D 6242 ///////////////////////////////// 6243 //////// Collocate (COL) //////// 6244 ///////////////////////////////// 6245 #endif 5012 6246 5013 if ( getSlice()->getEnableTMVPFlag()) 6247 5014 { … … 6308 5075 if ( getSlice()->isInterB() ) 6309 5076 { 6310 #if H_3D_TMVP6311 iRefIdx = 0;6312 #endif6313 5077 bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_1, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx); 6314 5078 if( bExistMV == false ) … … 6327 5091 puhInterDirNeighbours[uiArrayAddr] = dir; 6328 5092 abCandIsInter[uiArrayAddr] = true; 6329 #if H_3D_NBDV6330 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);6331 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);6332 #endif6333 5093 if ( mrgCandIdx == iCount ) 6334 5094 { … … 6348 5108 if ( getSlice()->isInterB()) 6349 5109 { 6350 #if H_3D_IV_MERGE6351 UInt uiPriorityList0[20] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3, 0, 4, 1, 4, 2, 4, 3, 4 };6352 UInt uiPriorityList1[20] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2, 4, 0, 4, 1, 4, 2, 4, 3 };6353 #else6354 5110 UInt uiPriorityList0[12] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3}; 6355 5111 UInt uiPriorityList1[12] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2}; 6356 #endif6357 5112 6358 5113 for (Int idx=0; idx<uiCutoff*(uiCutoff-1) && uiArrayAddr!= getSlice()->getMaxNumMergeCand(); idx++) 6359 5114 { 6360 5115 Int i = uiPriorityList0[idx]; Int j = uiPriorityList1[idx]; 6361 #if H_3D_VSP6362 Bool bValid = true;6363 if ( vspFlag[i] == 1 || vspFlag[j] == 1 )6364 {6365 bValid = false;6366 }6367 if( !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) )6368 {6369 assert(bValid == true);6370 }6371 #endif6372 #if H_3D_VSP6373 if (abCandIsInter[i] && abCandIsInter[j] && (puhInterDirNeighbours[i]&0x1) && (puhInterDirNeighbours[j]&0x2) && bValid)6374 #else6375 5116 if (abCandIsInter[i] && abCandIsInter[j]&& (puhInterDirNeighbours[i]&0x1)&&(puhInterDirNeighbours[j]&0x2)) 6376 #endif6377 5117 { 6378 5118 abCandIsInter[uiArrayAddr] = true; … … 6429 5169 numValidMergeCand = uiArrayAddr; 6430 5170 } 6431 6432 6433 5171 #endif 6434 5172 … … 6770 5508 } 6771 5509 6772 #if LGE_IC_CTX_F01605510 #if H_3D_IC 6773 5511 Bool TComDataCU::isIC( UInt uiPartIdx ) 6774 5512 { … … 7623 6361 } 7624 6362 #endif 7625 #if QC_DEPTH_IV_MRG_F01256363 #if H_3D_IV_MERGE 7626 6364 Bool TComDataCU::getDispNeighBlocks (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 7627 6365 { … … 8203 6941 #endif 8204 6942 8205 #if MTK_SPIVMP_F01106943 #if H_3D_SPIVMP 8206 6944 Void TComDataCU::getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight) 8207 6945 { … … 8255 6993 #if H_3D_IV_MERGE 8256 6994 Bool 8257 TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc 8258 #if QC_DEPTH_IV_MRG_F0125 8259 , Bool bIsDepth 8260 #endif 8261 #if MTK_SPIVMP_F0110 6995 TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc , Bool bIsDepth 6996 #if H_3D_SPIVMP 8262 6997 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 8263 6998 #endif … … 8268 7003 8269 7004 //--- get base CU/PU and check prediction mode --- 8270 #if QC_DEPTH_IV_MRG_F01258271 7005 TComPic* pcBasePic = pcSlice->getIvPic( bIsDepth, iViewIndex ); 8272 #else8273 TComPic* pcBasePic = pcSlice->getIvPic( false, iViewIndex );8274 #endif8275 7006 TComPicYuv* pcBaseRec = pcBasePic->getPicYuvRec (); 8276 7007 … … 8283 7014 pcBaseRec->getTopLeftSamplePos( getAddr(), getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY ); 8284 7015 8285 #if !MTK_SPIVMP_F0110 8286 #if QC_DEPTH_IV_MRG_F0125 7016 #if !H_3D_SPIVMP 8287 7017 iCurrPosX += ( iWidth >> 1 ); 8288 7018 iCurrPosY += ( iHeight >> 1 ); 8289 #else8290 iCurrPosX += ( ( iWidth - 1 ) >> 1 );8291 iCurrPosY += ( ( iHeight - 1 ) >> 1 );8292 #endif8293 7019 #endif 8294 7020 … … 8308 7034 #endif 8309 7035 8310 #if MTK_SPIVMP_F01107036 #if H_3D_SPIVMP 8311 7037 //////////////////////////////// 8312 7038 //////////sub-PU IvMC/////////// … … 8438 7164 //////////////////////////////// 8439 7165 8440 #if MTK_SPIVMP_F01107166 #if H_3D_SPIVMP 8441 7167 for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++) 8442 7168 #else … … 8447 7173 // iLoopCan == 1 --> IvMCShift 8448 7174 8449 #if ! MTK_SPIVMP_F01107175 #if !H_3D_SPIVMP 8450 7176 Int iBaseCUAddr; 8451 7177 Int iBaseAbsPartIdx; … … 8455 7181 Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 ); 8456 7182 8457 #if MTK_SPIVMP_F01107183 #if H_3D_SPIVMP 8458 7184 iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) ); 8459 7185 iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) ); … … 8464 7190 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx ); 8465 7191 8466 #if MTK_SPIVMP_F01107192 #if H_3D_SPIVMP 8467 7193 pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 8468 7194 #else … … 8496 7222 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 8497 7223 #if H_3D_NBDV 8498 #if QC_DEPTH_IV_MRG_F01257224 #if H_3D_IV_MERGE 8499 7225 if( !bIsDepth ) 8500 7226 { … … 8504 7230 cMv.setIDVVer (cDv.getVer()); 8505 7231 cMv.setIDVVId (iViewIndex); 8506 #if QC_DEPTH_IV_MRG_F01257232 #if H_3D_IV_MERGE 8507 7233 } 8508 7234 #endif … … 8521 7247 } 8522 7248 } 8523 #if MTK_SPIVMP_F01107249 #if H_3D_SPIVMP 8524 7250 for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++) 8525 7251 #else … … 8552 7278 #endif 8553 7279 cMv.setHor( cMv.getHor() + ioffsetDV ); 8554 #if QC_DEPTH_IV_MRG_F01257280 #if H_3D_IV_MERGE 8555 7281 if( bIsDepth ) 8556 7282 cMv.setHor((cMv.getHor()+2)>>2); … … 8639 7365 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmmWedgeTabIdx[dmmType][uiAbsPartIdx+ui] = tabIdx; } 8640 7366 } 8641 #if !SEC_DMM3_RBC_F01478642 Void TComDataCU::setDmm3IntraTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth )8643 {8644 UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);8645 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmm3IntraTabIdx[uiAbsPartIdx+ui] = uiTIdx; }8646 }8647 #endif8648 #endif8649 #if H_3D_DIM_RBC8650 Void TComDataCU::reconPartition( UInt uiAbsPartIdx, UInt uiDepth, Bool bLeft, UChar ucStartPos, UChar ucNumEdge, UChar* pucEdgeCode, Bool* pbRegion )8651 {8652 Int iWidth;8653 Int iHeight;8654 if( uiDepth == 0 )8655 {8656 iWidth = 64;8657 iHeight = 64;8658 }8659 else if( uiDepth == 1 )8660 {8661 iWidth = 32;8662 iHeight = 32;8663 }8664 else if( uiDepth == 2 )8665 {8666 iWidth = 16;8667 iHeight = 16;8668 }8669 else if( uiDepth == 3 )8670 {8671 iWidth = 8;8672 iHeight = 8;8673 }8674 else // uiDepth == 48675 {8676 iWidth = 4;8677 iHeight = 4;8678 }8679 8680 Int iPtr = 0;8681 Int iX, iY;8682 Int iDir = -1;8683 Int iDiffX = 0, iDiffY = 0;8684 8685 // 1. Edge Code -> Vert & Horz Edges8686 Bool* pbEdge = (Bool*) xMalloc( Bool, 4 * iWidth * iHeight );8687 8688 for( UInt ui = 0; ui < 4 * iWidth * iHeight; ui++ )8689 pbEdge [ ui ] = false;8690 8691 // Direction : left(0), right(1), top(2), bottom(3), left-top(4), right-top(5), left-bottom(6), right-bottom(7)8692 // Code : 0deg(0), 45deg(1), -45deg(2), 90deg(3), -90deg(4), 135deg(5), -135deg(6)8693 const UChar tableDir[8][7] = { { 0, 6, 4, 3, 2, 7, 5 },8694 { 1, 5, 7, 2, 3, 4, 6 },8695 { 2, 4, 5, 0, 1, 6, 7 },8696 { 3, 7, 6, 1, 0, 5, 4 },8697 { 4, 0, 2, 6, 5, 3, 1 },8698 { 5, 2, 1, 4, 7, 0, 3 },8699 { 6, 3, 0, 7, 4, 1, 2 },8700 { 7, 1, 3, 5, 6, 2, 0 }};8701 8702 UChar ucCode = pucEdgeCode[iPtr++];8703 8704 if( !bLeft )8705 {8706 iX = ucStartPos;8707 iY = 0;8708 8709 switch(ucCode)8710 {8711 case 0: // bottom8712 iDir = 3;8713 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8714 break;8715 case 2: // left-bottom8716 iDir = 6;8717 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8718 break;8719 case 1: // right-bottom8720 iDir = 7;8721 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8722 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8723 break;8724 case 4: // left8725 iDir = 0;8726 assert(false);8727 break;8728 case 3: // right8729 iDir = 1;8730 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8731 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8732 break;8733 }8734 }8735 else8736 {8737 iX = 0;8738 iY = ucStartPos;8739 8740 switch(ucCode)8741 {8742 case 0: // right8743 iDir = 1;8744 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8745 break;8746 case 1: // right-top8747 iDir = 5;8748 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8749 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8750 break;8751 case 2: // right-bottom8752 iDir = 7;8753 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8754 break;8755 case 3: // top8756 iDir = 2;8757 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8758 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8759 break;8760 case 4: // bottom8761 iDir = 3;8762 assert(false);8763 break;8764 }8765 }8766 8767 switch( iDir )8768 {8769 case 0: // left8770 iDiffX = -1;8771 iDiffY = 0;8772 break;8773 case 1: // right8774 iDiffX = +1;8775 iDiffY = 0;8776 break;8777 case 2: // top8778 iDiffX = 0;8779 iDiffY = -1;8780 break;8781 case 3: // bottom8782 iDiffX = 0;8783 iDiffY = +1;8784 break;8785 case 4: // left-top8786 iDiffX = -1;8787 iDiffY = -1;8788 break;8789 case 5: // right-top8790 iDiffX = +1;8791 iDiffY = -1;8792 break;8793 case 6: // left-bottom8794 iDiffX = -1;8795 iDiffY = +1;8796 break;8797 case 7: // right-bottom8798 iDiffX = +1;8799 iDiffY = +1;8800 break;8801 }8802 8803 iX += iDiffX;8804 iY += iDiffY;8805 8806 while( iPtr < ucNumEdge )8807 {8808 ucCode = pucEdgeCode[iPtr++];8809 8810 Int iNewDir = tableDir[iDir][ucCode];8811 8812 switch( iNewDir )8813 {8814 case 0: // left8815 iDiffX = -1;8816 iDiffY = 0;8817 break;8818 case 1: // right8819 iDiffX = +1;8820 iDiffY = 0;8821 break;8822 case 2: // top8823 iDiffX = 0;8824 iDiffY = -1;8825 break;8826 case 3: // bottom8827 iDiffX = 0;8828 iDiffY = +1;8829 break;8830 case 4: // left-top8831 iDiffX = -1;8832 iDiffY = -1;8833 break;8834 case 5: // right-top8835 iDiffX = +1;8836 iDiffY = -1;8837 break;8838 case 6: // left-bottom8839 iDiffX = -1;8840 iDiffY = +1;8841 break;8842 case 7: // right-bottom8843 iDiffX = +1;8844 iDiffY = +1;8845 break;8846 }8847 8848 switch( iDir )8849 {8850 case 0: // left8851 switch( ucCode )8852 {8853 case 0:8854 case 2:8855 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8856 break;8857 case 1:8858 case 3:8859 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8860 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8861 break;8862 case 4:8863 case 6:8864 // no8865 break;8866 case 5:8867 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8868 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8869 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8870 break;8871 }8872 break;8873 case 1: // right8874 switch( ucCode )8875 {8876 case 0:8877 case 2:8878 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8879 break;8880 case 1:8881 case 3:8882 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8883 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8884 break;8885 case 4:8886 case 6:8887 // no8888 break;8889 case 5:8890 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8891 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8892 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8893 break;8894 }8895 break;8896 case 2: // top8897 switch( ucCode )8898 {8899 case 0:8900 case 2:8901 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8902 break;8903 case 1:8904 case 3:8905 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8906 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8907 break;8908 case 4:8909 case 6:8910 // no8911 break;8912 case 5:8913 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8914 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8915 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8916 break;8917 }8918 break;8919 case 3: // bottom8920 switch( ucCode )8921 {8922 case 0:8923 case 2:8924 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8925 break;8926 case 1:8927 case 3:8928 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8929 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8930 break;8931 case 4:8932 case 6:8933 // no8934 break;8935 case 5:8936 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8937 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8938 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8939 break;8940 }8941 break;8942 case 4: // left-top8943 switch( ucCode )8944 {8945 case 0:8946 case 1:8947 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8948 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8949 break;8950 case 2:8951 case 4:8952 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8953 break;8954 case 3:8955 case 5:8956 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8957 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8958 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8959 break;8960 case 6:8961 // no8962 break;8963 }8964 break;8965 case 5: // right-top8966 switch( ucCode )8967 {8968 case 0:8969 case 1:8970 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8971 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8972 break;8973 case 2:8974 case 4:8975 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8976 break;8977 case 3:8978 case 5:8979 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8980 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8981 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8982 break;8983 case 6:8984 // no8985 break;8986 }8987 break;8988 case 6: // left-bottom8989 switch( ucCode )8990 {8991 case 0:8992 case 1:8993 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8994 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8995 break;8996 case 2:8997 case 4:8998 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8999 break;9000 case 3:9001 case 5:9002 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;9003 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;9004 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;9005 break;9006 case 6:9007 // no9008 break;9009 }9010 break;9011 case 7: // right-bottom9012 switch( ucCode )9013 {9014 case 0:9015 case 1:9016 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;9017 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;9018 break;9019 case 2:9020 case 4:9021 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;9022 break;9023 case 3:9024 case 5:9025 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;9026 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;9027 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;9028 break;9029 case 6:9030 // no9031 break;9032 }9033 break;9034 }9035 9036 assert( iX >= 0 && iX <= iWidth );9037 assert( iY >= 0 && iY <= iHeight );9038 9039 iX += iDiffX;9040 iY += iDiffY;9041 iDir = iNewDir;9042 }9043 9044 // finalize edge chain9045 if( iX == iWidth-1 )9046 {9047 if( iY == 0 )9048 {9049 if( iDir == 1 )9050 {9051 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;9052 }9053 else if( iDir == 5 )9054 {9055 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;9056 }9057 else9058 {9059 assert(false);9060 }9061 }9062 else if( iY == iHeight-1 )9063 {9064 if( iDir == 3 )9065 {9066 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;9067 }9068 else if( iDir == 7 )9069 {9070 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;9071 }9072 else9073 {9074 assert(false);9075 }9076 }9077 else9078 {9079 if( iDir == 1 )9080 {9081 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;9082 }9083 else if( iDir == 3 )9084 {9085 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;9086 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;9087 }9088 else if( iDir == 5 )9089 {9090 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;9091 }9092 else if( iDir == 7 )9093 {9094 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;9095 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;9096 }9097 else9098 {9099 assert(false);9100 }9101 }9102 }9103 else if( iX == 0 )9104 {9105 if( iY == 0 )9106 {9107 if( iDir == 2 )9108 {9109 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;9110 }9111 else if( iDir == 4 )9112 {9113 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;9114 }9115 else9116 {9117 assert(false);9118 }9119 }9120 else if( iY == iHeight-1 )9121 {9122 if( iDir == 0 )9123 {9124 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;9125 }9126 else if( iDir == 6 )9127 {9128 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;9129 }9130 else9131 {9132 assert(false);9133 }9134 }9135 else9136 {9137 if( iDir == 0 )9138 {9139 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;9140 }9141 else if( iDir == 2 )9142 {9143 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;9144 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;9145 }9146 else if( iDir == 4 )9147 {9148 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;9149 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;9150 }9151 else if( iDir == 6 )9152 {9153 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;9154 }9155 else9156 {9157 assert(false);9158 }9159 }9160 }9161 else if( iY == 0 )9162 {9163 if( iDir == 1 )9164 {9165 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;9166 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;9167 }9168 else if( iDir == 2 )9169 {9170 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;9171 }9172 else if( iDir == 4 )9173 {9174 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;9175 }9176 else if( iDir == 5 )9177 {9178 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;9179 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;9180 }9181 else9182 {9183 assert(false);9184 }9185 }9186 else if( iY == iHeight-1 )9187 {9188 if( iDir == 0 )9189 {9190 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;9191 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;9192 }9193 else if( iDir == 3 )9194 {9195 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;9196 }9197 else if( iDir == 6 )9198 {9199 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;9200 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;9201 }9202 else if( iDir == 7 )9203 {9204 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;9205 }9206 else9207 {9208 assert(false);9209 }9210 }9211 else9212 {9213 printf("reconPartiton: wrong termination\n");9214 assert(false);9215 }9216 9217 // Reconstruct Region from Chain Code9218 Bool* pbVisit = (Bool*) xMalloc( Bool, iWidth * iHeight );9219 Int* piStack = (Int* ) xMalloc( Int, iWidth * iHeight );9220 9221 for( UInt ui = 0; ui < iWidth * iHeight; ui++ )9222 {9223 pbRegion[ ui ] = true; // fill it as region 1 (we'll discover region 0 next)9224 pbVisit [ ui ] = false;9225 }9226 9227 iPtr = 0;9228 piStack[iPtr++] = (0 << 8) | (0);9229 pbRegion[ 0 ] = false;9230 9231 while(iPtr > 0)9232 {9233 Int iTmp = piStack[--iPtr];9234 Int iX1, iY1;9235 iX1 = iTmp & 0xff;9236 iY1 = (iTmp >> 8) & 0xff;9237 9238 pbVisit[ iX1 + iY1 * iWidth ] = true;9239 9240 assert( iX1 >= 0 && iX1 < iWidth );9241 assert( iY1 >= 0 && iY1 < iHeight );9242 9243 if( iX1 > 0 && !pbEdge[ 2 * iX1 - 1 + 4 * iY1 * iWidth ] && !pbVisit[ iX1 - 1 + iY1 * iWidth ] )9244 {9245 piStack[iPtr++] = (iY1 << 8) | (iX1 - 1);9246 pbRegion[ iX1 - 1 + iY1 * iWidth ] = false;9247 }9248 if( iX1 < iWidth - 1 && !pbEdge[ 2 * iX1 + 1 + 4 * iY1 * iWidth ] && !pbVisit[ iX1 + 1 + iY1 * iWidth ] )9249 {9250 piStack[iPtr++] = (iY1 << 8) | (iX1 + 1);9251 pbRegion[ iX1 + 1 + iY1 * iWidth ] = false;9252 }9253 if( iY1 > 0 && !pbEdge[ 2 * iX1 + 2 * (2 * iY1 - 1) * iWidth ] && !pbVisit[ iX1 + (iY1 - 1) * iWidth ] )9254 {9255 piStack[iPtr++] = ((iY1 - 1) << 8) | iX1;9256 pbRegion[ iX1 + (iY1 - 1) * iWidth ] = false;9257 }9258 if( iY1 < iHeight - 1 && !pbEdge[ 2 * iX1 + 2 * (2 * iY1 + 1) * iWidth ] && !pbVisit[ iX1 + (iY1 + 1) * iWidth ] )9259 {9260 piStack[iPtr++] = ((iY1 + 1) << 8) | iX1;9261 pbRegion[ iX1 + (iY1 + 1) * iWidth ] = false;9262 }9263 }9264 9265 xFree( pbEdge );9266 xFree( pbVisit );9267 xFree( piStack );9268 }9269 7367 #endif 9270 7368 -
trunk/source/Lib/TLibCommon/TComDataCU.h
r724 r773 198 198 ///< 0: non-VSP; 1: VSP 199 199 #endif 200 #if MTK_SPIVMP_F0110200 #if H_3D_SPIVMP 201 201 Bool* m_pbSPIVMPFlag; ///< array of sub-PU IVMP flags to indicate whehter a block uses sub-PU IVMP 202 202 ///< 0: non-SPIVMP; 1: SPIVMP … … 212 212 #if H_3D_DIM_DMM 213 213 UInt* m_dmmWedgeTabIdx[DMM_NUM_TYPE]; 214 #if !SEC_DMM3_RBC_F0147215 UInt* m_dmm3IntraTabIdx;216 #endif217 #endif218 #if H_3D_DIM_RBC219 UChar* m_pucEdgeCode; ///< array of edge code220 UChar* m_pucEdgeNumber; ///< total number of edge221 UChar* m_pucEdgeStartPos; ///< starting point position222 Bool* m_pbEdgeLeftFirst; ///< true if edge should be checked in left boundary first223 Bool* m_pbEdgePartition; ///< true if it belongs to region 1, otherwise, region 0224 214 #endif 225 215 #if H_3D_DIM_SDC … … 233 223 UChar* m_pucInterSDCMask; 234 224 #endif 235 #if ETRIKHU_MERGE_REUSE_F0093225 #if H_3D 236 226 Bool m_bAvailableFlagA1; ///< A1 available flag 237 227 Bool m_bAvailableFlagB1; ///< B1 available flag … … 256 246 UInt* m_sliceSegmentStartCU; ///< Start CU address of current slice 257 247 Char m_codedQP; 258 #if ETRIKHU_MERGE_REUSE_F0093248 #if H_3D 259 249 DisInfo m_cDefaultDisInfo; ///< Default disparity information for initializing 260 250 #endif … … 266 256 Bool xAddMVPCandOrder ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); 267 257 #if H_3D_VSP 268 #if ETRIKHU_MERGE_REUSE_F0093269 258 Bool xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 270 259 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo); 271 #else272 Bool xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount,273 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag );274 #endif275 260 #endif 276 261 #if H_3D_IV_MERGE 277 #if ETRIKHU_MERGE_REUSE_F0093278 262 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv, 279 263 Int* ivCandRefIdx, Int posIvDC, Int* vspFlag, Int &iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo ); 280 #else281 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv,282 Int* ivCandRefIdx, Int posIvDC, Int* vspFlag );283 #endif284 264 Bool xGetPosFirstAvailDmvCand( Int iCount, TComMvField* pcMvFieldNeighbours, Int* ivCandDir, Int posIvDC, Int* vspFlag, Int& iFirDispCand ); 285 265 #endif … … 519 499 ); 520 500 521 #if ETRIKHU_MERGE_REUSE_F0093501 #if H_3D 522 502 Void rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo* inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV); 523 #endif524 #if QC_DEPTH_IV_MRG_F0125525 503 Bool getDispNeighBlocks ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 526 504 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); … … 535 513 Void getIVNStatus ( UInt uiPartIdx, DisInfo* pDInfo, Bool& bIVFMerge, Int& iIVFMaxD); 536 514 #endif 537 #if MTK_SPIVMP_F0110515 #if H_3D_SPIVMP 538 516 Void getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight); 539 517 Void getSPAbsPartIdx(UInt uiBaseAbsPartIdx, Int iWidth, Int iHeight, Int iPartIdx, Int iNumPartLine, UInt& ruiPartAddr ); … … 541 519 #endif 542 520 #if H_3D_IV_MERGE 543 Bool getInterViewMergeCands ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc 544 #if QC_DEPTH_IV_MRG_F0125 545 , Bool bIsDepth 546 #endif 547 #if MTK_SPIVMP_F0110 521 Bool getInterViewMergeCands ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc, Bool bIsDepth 522 523 #if H_3D_SPIVMP 548 524 , TComMvField* pcMFieldSP, UChar* puhInterDirSP 549 525 #endif … … 584 560 Void setDmmWedgeTabIdxSubParts ( UInt tabIdx, UInt dmmType, UInt uiAbsPartIdx, UInt uiDepth ); 585 561 586 #if !SEC_DMM3_RBC_F0147587 UInt* getDmm3IntraTabIdx () { return m_dmm3IntraTabIdx; }588 UInt getDmm3IntraTabIdx ( UInt uiIdx ) { return m_dmm3IntraTabIdx[uiIdx]; }589 Void setDmm3IntraTabIdx ( UInt uiIdx, UInt uh ) { m_dmm3IntraTabIdx[uiIdx] = uh; }590 Void setDmm3IntraTabIdxSubParts ( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth );591 #endif592 #endif593 #if H_3D_DIM_RBC594 UChar* getEdgeCode( UInt uiIdx ) { return &m_pucEdgeCode[uiIdx * RBC_MAX_EDGE_NUM_PER_4x4]; }595 596 UChar* getEdgeNumber( ) { return m_pucEdgeNumber; }597 UChar getEdgeNumber( UInt uiIdx ) { return m_pucEdgeNumber[uiIdx]; }598 Void setEdgeNumber( UInt uiIdx, UChar val ) { m_pucEdgeNumber[uiIdx] = val; }599 600 UChar* getEdgeStartPos( ) { return m_pucEdgeStartPos; }601 UChar getEdgeStartPos( UInt uiIdx ) { return m_pucEdgeStartPos[uiIdx]; }602 Void setEdgeStartPos( UInt uiIdx, UChar val ) { m_pucEdgeStartPos[uiIdx] = val; }603 604 Bool* getEdgeLeftFirst( ) { return m_pbEdgeLeftFirst; }605 Bool getEdgeLeftFirst( UInt uiIdx ) { return m_pbEdgeLeftFirst[uiIdx]; }606 Void setEdgeLeftFirst( UInt uiIdx, Bool val ) { m_pbEdgeLeftFirst[uiIdx] = val; }607 608 Bool* getEdgePartition( UInt uiIdx ) { return &m_pbEdgePartition[uiIdx * 16]; }609 610 Void reconPartition( UInt uiAbsPartIdx, UInt uiDepth, Bool bLeft, UChar ucStartPos, UChar ucNumEdge, UChar* pucEdgeCode, Bool* pbRegion );611 562 #endif 612 563 #if H_3D_DIM_SDC … … 704 655 Bool hasEqualMotion ( UInt uiAbsPartIdx, TComDataCU* pcCandCU, UInt uiCandAbsPartIdx ); 705 656 706 #if ETRIKHU_MERGE_REUSE_F0093657 #if H_3D 707 658 Bool getAvailableFlagA1() { return m_bAvailableFlagA1;} 708 659 Bool getAvailableFlagB1() { return m_bAvailableFlagB1;} … … 720 671 , InheritedVSPDisInfo* inheritedVSPDisInfo 721 672 #endif 722 #if MTK_SPIVMP_F0110673 #if H_3D_SPIVMP 723 674 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP 724 675 #endif … … 729 680 inline Void xInheritVSPDisInfo(TComDataCU* pcCURef, UInt uiAbsPartIdx, Int iCount, InheritedVSPDisInfo* inheritedVSPDisInfo); 730 681 731 #if MTK_SPIVMP_F0110682 #if H_3D_SPIVMP 732 683 Bool* getSPIVMPFlag () { return m_pbSPIVMPFlag; } 733 684 Bool getSPIVMPFlag ( UInt uiIdx ) { return m_pbSPIVMPFlag[uiIdx]; } … … 753 704 Bool isBipredRestriction( UInt puIdx ); 754 705 755 #if LGE_IC_CTX_F0160706 #if H_3D_IC 756 707 Bool isIC ( UInt uiPartIdx ); 757 708 #endif -
trunk/source/Lib/TLibCommon/TComMotionInfo.cpp
r724 r773 40 40 #include "assert.h" 41 41 #include <stdlib.h> 42 #if MTK_SPIVMP_F011042 #if H_3D_SPIVMP 43 43 #include "TComDataCU.h" 44 44 #include "TComPic.h" … … 328 328 } 329 329 330 #if MTK_SPIVMP_F0110330 #if H_3D_SPIVMP 331 331 Void TComCUMvField::setMvFieldSP( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight ) 332 332 { -
trunk/source/Lib/TLibCommon/TComMotionInfo.h
r724 r773 50 50 // ==================================================================================================================== 51 51 52 #if MTK_SPIVMP_F011052 #if H_3D_SPIVMP 53 53 class TComDataCU; 54 54 #endif … … 173 173 Void setAllRefIdx ( Int iRefIdx, PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 ); 174 174 Void setAllMvField( TComMvField const & mvField, PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 ); 175 #if MTK_SPIVMP_F0110175 #if H_3D_SPIVMP 176 176 Void setMvFieldSP ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight ); 177 177 #endif -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r758 r773 425 425 Bool dimDeltaDC = isDimDeltaDC( uiIntraMode ); 426 426 Bool isDmmMode = (dimType < DMM_NUM_TYPE); 427 #if !SEC_DMM3_RBC_F0147428 Bool isRbcMode = (dimType == RBC_IDX);429 #endif430 427 431 428 Bool* biSegPattern = NULL; … … 443 440 dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]); 444 441 } break; 445 #if !SEC_DMM3_RBC_F0147446 case( DMM3_IDX ):447 {448 UInt uiTabIdx = 0;449 if( bFastEnc ) { uiTabIdx = pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ); }450 else451 {452 uiTabIdx = xPredWedgeFromTex( pcCU, uiAbsPartIdx, iWidth, iHeight, pcCU->getDmm3IntraTabIdx( uiAbsPartIdx ) );453 pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, uiAbsPartIdx, (pcCU->getDepth(0) + (pcCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1)) );454 }455 dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ uiTabIdx ]);456 } break;457 #endif458 442 case( DMM4_IDX ): 459 443 { … … 468 452 } 469 453 #endif 470 #if H_3D_DIM_RBC471 if( isRbcMode )472 {473 biSegPattern = pcCU->getEdgePartition( uiAbsPartIdx );474 patternStride = iWidth;475 }476 #endif477 454 478 455 // get predicted partition values 479 456 assert( biSegPattern ); 480 457 Int* piMask = NULL; 481 #if QC_DIM_DELTADC_UNIFY_F0132 || HHI_DIM_PREDSAMP_FIX_F0171482 458 piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt ); // no filtering 483 #else484 if( isDmmMode ) piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt ); // no filtering for DMM485 else piMask = pcCU->getPattern()->getPredictorPtr( 0, g_aucConvertToBit[ iWidth ] + 2, m_piYuvExt );486 #endif487 459 assert( piMask ); 488 460 Int maskStride = 2*iWidth + 1; … … 499 471 Pel deltaDC2 = pcCU->getDimDeltaDC( dimType, 1, uiAbsPartIdx ); 500 472 #if H_3D_DIM_DMM 501 #if QC_DIM_DELTADC_UNIFY_F0132 && !SEC_DMM3_RBC_F0147502 if( isDmmMode || isRbcMode)503 #else504 473 if( isDmmMode ) 505 #endif506 474 { 507 475 #if H_3D_DIM_DLT 508 #if DLT_DIFF_CODING_IN_PPS509 476 segDC1 = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC1 ) + deltaDC1 ); 510 477 segDC2 = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC2 ) + deltaDC2 ); 511 478 #else 512 segDC1 = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC1 ) + deltaDC1 );513 segDC2 = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC2 ) + deltaDC2 );514 #endif515 #else516 479 segDC1 = ClipY( predDC1 + deltaDC1 ); 517 480 segDC2 = ClipY( predDC2 + deltaDC2 ); 518 481 #endif 519 }520 #endif521 #if H_3D_DIM_RBC && !QC_DIM_DELTADC_UNIFY_F0132522 if( isRbcMode )523 {524 xDeltaDCQuantScaleUp( pcCU, deltaDC1 );525 xDeltaDCQuantScaleUp( pcCU, deltaDC2 );526 segDC1 = ClipY( predDC1 + deltaDC1 );527 segDC2 = ClipY( predDC2 + deltaDC2 );528 482 } 529 483 #endif … … 566 520 } 567 521 568 #if MTK_SPIVMP_F0110522 #if H_3D_SPIVMP 569 523 Void TComPrediction::xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr ) 570 524 { … … 677 631 else 678 632 { 679 #if MTK_SPIVMP_F0110633 #if H_3D_SPIVMP 680 634 if ( pcCU->getSPIVMPFlag(uiPartAddr)!=0) 681 635 { … … 717 671 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 718 672 } 719 #if MTK_SPIVMP_F0110673 #if H_3D_SPIVMP 720 674 } 721 675 #endif … … 763 717 else 764 718 { 765 #if MTK_SPIVMP_F0110719 #if H_3D_SPIVMP 766 720 if (pcCU->getSPIVMPFlag(uiPartAddr)!=0) 767 721 { … … 802 756 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 803 757 } 804 #if MTK_SPIVMP_F0110758 #if H_3D_SPIVMP 805 759 } 806 760 #endif … … 830 784 pcCU->clipMv(cMv); 831 785 #if H_3D_ARP 832 #if QC_MTK_INTERVIEW_ARP_F0123_F0108833 786 if(pcCU->getARPW( uiPartAddr ) > 0 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC()) 834 787 { 835 788 xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , rpcYuvPred , bi ); 836 789 } 837 790 else 838 #endif 839 if( pcCU->getARPW( uiPartAddr ) > 0840 && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N841 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()!= pcCU->getSlice()->getPOC()842 )843 {844 xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi );845 }846 else847 {791 { 792 if( pcCU->getARPW( uiPartAddr ) > 0 793 && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N 794 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() 795 ) 796 { 797 xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi ); 798 } 799 else 800 { 848 801 #endif 849 802 #if H_3D_IC 850 Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() != pcCU->getSlice()->getViewIndex() );851 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi803 Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() != pcCU->getSlice()->getViewIndex() ); 804 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi 852 805 #if H_3D_ARP 853 , false854 #endif 855 , bICFlag );856 bICFlag = bICFlag && (iWidth > 8);857 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi806 , false 807 #endif 808 , bICFlag ); 809 bICFlag = bICFlag && (iWidth > 8); 810 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi 858 811 #if H_3D_ARP 859 , false860 #endif 861 , bICFlag );812 , false 813 #endif 814 , bICFlag ); 862 815 #else 863 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi );864 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi );816 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi ); 817 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi ); 865 818 #endif 866 819 #if H_3D_ARP 820 } 867 821 } 868 822 #endif … … 918 872 pcBaseViewDepthPicYuv->extendPicBorder(); 919 873 920 #if MTK_F0109_LG_F0120_VSP_BLOCK921 874 Int vspSize=0; 922 875 xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp,vspSize ); … … 924 877 xPredInterLumaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize); 925 878 xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize); 926 #else927 xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp );928 // sub-PU based compensation929 xPredInterLumaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );930 xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );931 #endif932 879 } 933 880 #endif … … 959 906 if( cDistparity.bDV ) 960 907 { 961 #if SHARP_ARP_REF_CHECK_F0105962 908 Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList); 963 909 if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() ) 964 #else965 if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC()!= pcCU->getSlice()->getPOC() )966 #endif967 910 { 968 911 bTobeScaled = true; … … 971 914 pcPicYuvBaseCol = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getPOC(), cDistparity.m_aVIdxCan ); 972 915 973 #if SHARP_ARP_REF_CHECK_F0105974 916 pcPicYuvBaseRef = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC(), cDistparity.m_aVIdxCan ); 975 917 976 918 if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, cDistparity.m_aVIdxCan)) 977 #else978 pcPicYuvBaseRef = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC(), cDistparity.m_aVIdxCan );979 980 if( ( !pcPicYuvBaseCol || pcPicYuvBaseCol->getPOC() != pcCU->getSlice()->getPOC() ) || ( !pcPicYuvBaseRef || pcPicYuvBaseRef->getPOC() != pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() ) )981 #endif982 919 { 983 920 dW = 0; … … 986 923 else 987 924 { 988 #if SHARP_ARP_REF_CHECK_F0105989 925 assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC() ); 990 #else991 assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() );992 #endif993 926 } 994 927 … … 1039 972 } 1040 973 } 1041 #if QC_MTK_INTERVIEW_ARP_F0123_F01081042 974 Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled ) 1043 975 { … … 1061 993 1062 994 assert(dW > 0); 1063 #if SHARP_ARP_REF_CHECK_F01051064 995 if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, pcPicYuvBaseCol->getViewIndex())) 1065 996 { 1066 997 dW = 0; 1067 998 } 1068 #endif1069 999 Int uiLCUAddr,uiAbsPartAddr; 1070 1000 Int irefPUX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[uiPartAddr]] + iWidth/2 + ((cDMv.getHor() + 2)>>2); … … 1144 1074 } 1145 1075 } 1146 #endif1147 1076 1148 1077 #endif … … 1804 1733 #if H_3D_VSP 1805 1734 // not fully support iRatioTxtPerDepth* != 1 1806 #if MTK_F0109_LG_F0120_VSP_BLOCK1807 1735 Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY ) 1808 #else1809 Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY )1810 #endif1811 1736 { 1812 1737 Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE; … … 1836 1761 Pel *depth = yuvDepth->getLumaAddr(); 1837 1762 1838 #if !SHARP_VSP_BLOCK_IN_AMP_F01021839 if( width<8 || height<8 )1840 { // no split1841 Int rightOffset = width - 1;1842 Int depStrideBlock = depStride * nTxtPerDepthY;1843 Pel *refDepthTop = refDepth;1844 Pel *refDepthBot = refDepthTop + (height-1)*refDepStride;1845 1846 Pel maxDepth = refDepthTop[0] > refDepthBot[0] ? refDepthTop[0] : refDepthBot[0];1847 if( maxDepth < refDepthTop[rightOffset] ) { maxDepth = refDepthTop[rightOffset]; }1848 if( maxDepth < refDepthBot[rightOffset] ) { maxDepth = refDepthBot[rightOffset]; }1849 1850 for( Int sY=0; sY<height; sY+=nTxtPerDepthY )1851 {1852 for( Int sX=0; sX<width; sX+=nTxtPerDepthX )1853 {1854 depth[sX] = maxDepth;1855 }1856 depth += depStrideBlock;1857 }1858 #if MTK_F0109_LG_F0120_VSP_BLOCK1859 if(width==4)1860 vspSize=0;1861 else1862 vspSize=1;1863 #endif1864 }1865 else1866 { // split to 4x8, or 8x41867 Int blocksize = 8;1868 Int subblocksize = 4;1869 Int depStrideBlock = depStride * blocksize;1870 Pel *depthTmp = NULL;1871 Int depStrideTmp = depStride * nTxtPerDepthY;1872 Int offset[4] = { 0, subblocksize-1, subblocksize, blocksize-1 };1873 Pel *refDepthTmp[4] = { NULL, NULL, NULL, NULL };1874 Pel repDepth4x8[2] = {0, 0};1875 Pel repDepth8x4[2] = {0, 0};1876 #endif1877 1878 #if !MTK_F0109_LG_F0120_VSP_BLOCK1879 #if SHARP_VSP_BLOCK_IN_AMP_F01021880 Int blocksize = 8;1881 Int subblocksize = 4;1882 Int depStrideBlock = depStride * blocksize;1883 Pel *depthTmp = NULL;1884 Int depStrideTmp = depStride * nTxtPerDepthY;1885 Int offset[4] = { 0, subblocksize-1, subblocksize, blocksize-1 };1886 Pel *refDepthTmp[4] = { NULL, NULL, NULL, NULL };1887 #endif1888 Int refDepStrideBlock = refDepStride * blocksize;1889 Int refDepStrideSubBlock = refDepStride * subblocksize;1890 1891 refDepthTmp[0] = refDepth;1892 refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock;1893 refDepthTmp[1] = refDepthTmp[2] - refDepStride;1894 refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock;1895 1896 #if SHARP_VSP_BLOCK_IN_AMP_F01021897 Int subBlockW, subBlockH;1898 Int blockW, blockH;1899 subBlockW = subBlockH = 8;1900 if (height % 8)1901 {1902 subBlockW = 8;1903 subBlockH = 4;1904 blockW = width; // no further split1905 blockH = height; // no further split1906 }1907 else if (width % 8)1908 {1909 subBlockW = 4;1910 subBlockH = 8;1911 blockW = width; // no further split1912 blockH = height; // no further split1913 }1914 else1915 {1916 blockW = blockH = 8;1917 }1918 for( Int y=0; y<height; y+=blockH )1919 {1920 for( Int x=0; x<width; x+=blockW )1921 {1922 if (blockW == 8 && blockH == 8)1923 {1924 Bool ULvsBR = false, URvsBL = false;1925 ULvsBR = refDepthTmp[0][x+offset[0]] < refDepthTmp[3][x+offset[3]];1926 URvsBL = refDepthTmp[0][x+offset[3]] < refDepthTmp[3][x+offset[0]];1927 if( ULvsBR ^ URvsBL )1928 { // 4x81929 subBlockW = 4;1930 subBlockH = 8;1931 }1932 else1933 {1934 subBlockW = 8;1935 subBlockH = 4;1936 }1937 }1938 for( Int yy=0; yy<blockH; yy+=subBlockH )1939 {1940 for( Int xx=0; xx<blockW; xx+=subBlockW )1941 {1942 Pel maxDepthVal = 0;1943 Int xP0, xP1, yP0, yP1;1944 xP0 = x+xx;1945 xP1 = x+xx+subBlockW-1;1946 yP0 = yy;1947 yP1 = yy+subBlockH-1;1948 maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP0+yP0*refDepStride]);1949 maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP1+yP0*refDepStride]);1950 maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP0+yP1*refDepStride]);1951 maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP1+yP1*refDepStride]);1952 depthTmp = &depth[x+xx+yy*depStride];1953 for( Int sY=0; sY<subBlockH; sY+=nTxtPerDepthY )1954 {1955 for( Int sX=0; sX<subBlockW; sX+=nTxtPerDepthX )1956 {1957 depthTmp[sX] = maxDepthVal;1958 }1959 depthTmp += depStrideTmp;1960 }1961 }1962 }1963 }1964 refDepthTmp[0] += refDepStrideBlock;1965 depth += depStrideBlock;1966 }1967 #else // SHARP_VSP_BLOCK_IN_AMP_F01021968 for( Int y=0; y<height; y+=blocksize )1969 {1970 for( Int x=0; x<width; x+=blocksize )1971 {1972 Bool ULvsBR = false, URvsBL = false;1973 1974 ULvsBR = refDepthTmp[0][x+offset[0]] < refDepthTmp[3][x+offset[3]];1975 URvsBL = refDepthTmp[0][x+offset[3]] < refDepthTmp[3][x+offset[0]];1976 1977 if( ULvsBR ^ URvsBL )1978 { // 4x81979 repDepth4x8[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[1]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[1]];1980 if( repDepth4x8[0] < refDepthTmp[3][x+offset[0]] )1981 {1982 repDepth4x8[0] = refDepthTmp[3][x+offset[0]];1983 }1984 if( repDepth4x8[0] < refDepthTmp[3][x+offset[1]] )1985 {1986 repDepth4x8[0] = refDepthTmp[3][x+offset[1]];1987 }1988 repDepth4x8[1] = refDepthTmp[0][x+offset[2]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[2]] : refDepthTmp[0][x+offset[3]];1989 if( repDepth4x8[1] < refDepthTmp[3][x+offset[2]] )1990 {1991 repDepth4x8[1] = refDepthTmp[3][x+offset[2]];1992 }1993 if( repDepth4x8[1] < refDepthTmp[3][x+offset[3]] )1994 {1995 repDepth4x8[1] = refDepthTmp[3][x+offset[3]];1996 }1997 1998 depthTmp = &depth[x];1999 for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY )2000 {2001 for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX )2002 {2003 depthTmp[sX] = repDepth4x8[0];2004 }2005 depthTmp += depStrideTmp;2006 }2007 depthTmp = &depth[x+subblocksize];2008 for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY )2009 {2010 for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX )2011 {2012 depthTmp[sX] = repDepth4x8[1];2013 }2014 depthTmp += depStrideTmp;2015 }2016 }2017 else2018 { // 8x42019 repDepth8x4[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[3]];2020 if( repDepth8x4[0] < refDepthTmp[1][x+offset[0]] )2021 {2022 repDepth8x4[0] = refDepthTmp[1][x+offset[0]];2023 }2024 if( repDepth8x4[0] < refDepthTmp[1][x+offset[3]] )2025 {2026 repDepth8x4[0] = refDepthTmp[1][x+offset[3]];2027 }2028 repDepth8x4[1] = refDepthTmp[2][x+offset[0]] > refDepthTmp[2][x+offset[3]] ? refDepthTmp[2][x+offset[0]] : refDepthTmp[2][x+offset[3]];2029 if( repDepth8x4[1] < refDepthTmp[3][x+offset[0]] )2030 {2031 repDepth8x4[1] = refDepthTmp[3][x+offset[0]];2032 }2033 if( repDepth8x4[1] < refDepthTmp[3][x+offset[3]] )2034 {2035 repDepth8x4[1] = refDepthTmp[3][x+offset[3]];2036 }2037 2038 depthTmp = &depth[x];2039 for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY )2040 {2041 for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX )2042 {2043 depthTmp[sX] = repDepth8x4[0];2044 }2045 depthTmp += depStrideTmp;2046 }2047 for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY )2048 {2049 for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX )2050 {2051 depthTmp[sX] = repDepth8x4[1];2052 }2053 depthTmp += depStrideTmp;2054 }2055 }2056 }2057 refDepthTmp[0] += refDepStrideBlock;2058 refDepthTmp[1] += refDepStrideBlock;2059 refDepthTmp[2] += refDepStrideBlock;2060 refDepthTmp[3] += refDepStrideBlock;2061 depth += depStrideBlock;2062 }2063 #endif // SHARP_VSP_BLOCK_IN_AMP_F01022064 #else2065 #if SHARP_VSP_BLOCK_IN_AMP_F01022066 1763 if ((height % 8)) 2067 1764 { … … 2115 1812 } 2116 1813 } 2117 } 2118 #else // SHARP_VSP_BLOCK_IN_AMP_F0102 2119 Int refDepStrideBlock = refDepStride * height; 2120 Int refDepStrideSubBlock = refDepStride * height/2; 2121 refDepthTmp[0] = refDepth; 2122 refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock; 2123 refDepthTmp[1] = refDepthTmp[2] - refDepStride; 2124 refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock; 2125 offset[3] = width-1; 2126 Bool ULvsBR = false, URvsBL = false; 2127 ULvsBR = refDepthTmp[0][0+offset[0]] < refDepthTmp[3][0+offset[3]]; 2128 URvsBL = refDepthTmp[0][0+offset[3]] < refDepthTmp[3][0+offset[0]]; 2129 refDepStrideBlock = refDepStride * blocksize; 2130 refDepStrideSubBlock = refDepStride * subblocksize; 2131 refDepthTmp[0] = refDepth; 2132 refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock; 2133 refDepthTmp[1] = refDepthTmp[2] - refDepStride; 2134 refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock; 2135 offset[3] = blocksize-1; 2136 if( ULvsBR ^ URvsBL ) 2137 { 2138 vspSize = 0;//4x8 2139 for( Int y=0; y<height; y+=blocksize ) 2140 { 2141 for( Int x=0; x<width; x+=blocksize ) 2142 { 2143 { // 4x8 2144 repDepth4x8[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[1]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[1]]; 2145 if( repDepth4x8[0] < refDepthTmp[3][x+offset[0]] ) 2146 { 2147 repDepth4x8[0] = refDepthTmp[3][x+offset[0]]; 2148 } 2149 if( repDepth4x8[0] < refDepthTmp[3][x+offset[1]] ) 2150 { 2151 repDepth4x8[0] = refDepthTmp[3][x+offset[1]]; 2152 } 2153 repDepth4x8[1] = refDepthTmp[0][x+offset[2]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[2]] : refDepthTmp[0][x+offset[3]]; 2154 if( repDepth4x8[1] < refDepthTmp[3][x+offset[2]] ) 2155 { 2156 repDepth4x8[1] = refDepthTmp[3][x+offset[2]]; 2157 } 2158 if( repDepth4x8[1] < refDepthTmp[3][x+offset[3]] ) 2159 { 2160 repDepth4x8[1] = refDepthTmp[3][x+offset[3]]; 2161 } 2162 2163 depthTmp = &depth[x]; 2164 for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY ) 2165 { 2166 for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX ) 2167 { 2168 depthTmp[sX] = repDepth4x8[0]; 2169 } 2170 depthTmp += depStrideTmp; 2171 } 2172 depthTmp = &depth[x+subblocksize]; 2173 for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY ) 2174 { 2175 for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX ) 2176 { 2177 depthTmp[sX] = repDepth4x8[1]; 2178 } 2179 depthTmp += depStrideTmp; 2180 } 2181 } 2182 } 2183 refDepthTmp[0] += refDepStrideBlock; 2184 refDepthTmp[1] += refDepStrideBlock; 2185 refDepthTmp[2] += refDepStrideBlock; 2186 refDepthTmp[3] += refDepStrideBlock; 2187 depth += depStrideBlock; 2188 } 2189 } 2190 else 2191 { // 8x4 2192 vspSize = 1; 2193 for( Int y=0; y<height; y+=blocksize ) 2194 { 2195 for( Int x=0; x<width; x+=blocksize ) 2196 { 2197 repDepth8x4[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[3]]; 2198 if( repDepth8x4[0] < refDepthTmp[1][x+offset[0]] ) 2199 { 2200 repDepth8x4[0] = refDepthTmp[1][x+offset[0]]; 2201 } 2202 if( repDepth8x4[0] < refDepthTmp[1][x+offset[3]] ) 2203 { 2204 repDepth8x4[0] = refDepthTmp[1][x+offset[3]]; 2205 } 2206 repDepth8x4[1] = refDepthTmp[2][x+offset[0]] > refDepthTmp[2][x+offset[3]] ? refDepthTmp[2][x+offset[0]] : refDepthTmp[2][x+offset[3]]; 2207 if( repDepth8x4[1] < refDepthTmp[3][x+offset[0]] ) 2208 { 2209 repDepth8x4[1] = refDepthTmp[3][x+offset[0]]; 2210 } 2211 if( repDepth8x4[1] < refDepthTmp[3][x+offset[3]] ) 2212 { 2213 repDepth8x4[1] = refDepthTmp[3][x+offset[3]]; 2214 } 2215 2216 depthTmp = &depth[x]; 2217 for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY ) 2218 { 2219 for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX ) 2220 { 2221 depthTmp[sX] = repDepth8x4[0]; 2222 } 2223 depthTmp += depStrideTmp; 2224 } 2225 for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY ) 2226 { 2227 for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX ) 2228 { 2229 depthTmp[sX] = repDepth8x4[1]; 2230 } 2231 depthTmp += depStrideTmp; 2232 } 2233 } 2234 refDepthTmp[0] += refDepStrideBlock; 2235 refDepthTmp[1] += refDepStrideBlock; 2236 refDepthTmp[2] += refDepStrideBlock; 2237 refDepthTmp[3] += refDepStrideBlock; 2238 depth += depStrideBlock; 2239 } 2240 } 2241 #endif 2242 #endif 2243 #if !SHARP_VSP_BLOCK_IN_AMP_F0102 2244 } 2245 #endif 2246 2247 2248 } 2249 #if MTK_F0109_LG_F0120_VSP_BLOCK 1814 } 1815 } 1816 2250 1817 Void TComPrediction::xPredInterLumaBlkFromDM( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi, Int vspSize) 2251 #else2252 Void TComPrediction::xPredInterLumaBlkFromDM( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi )2253 #endif2254 1818 { 2255 1819 Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE; 2256 1820 Int nTxtPerDepthY = H_3D_VSP_BLOCKSIZE; 2257 1821 2258 #if MTK_F0109_LG_F0120_VSP_BLOCK2259 1822 nTxtPerDepthX = nTxtPerDepthX << vspSize; 2260 1823 nTxtPerDepthY = nTxtPerDepthY << (1-vspSize); 2261 #endif 1824 2262 1825 Int refStride = picRef->getStride(); 2263 1826 Int dstStride = yuvDst->getStride(); … … 2365 1928 } 2366 1929 2367 #if MTK_F0109_LG_F0120_VSP_BLOCK2368 1930 Void TComPrediction::xPredInterChromaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi, Int vspSize) 2369 #else2370 Void TComPrediction::xPredInterChromaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi )2371 #endif2372 1931 { 2373 1932 #if (H_3D_VSP_BLOCKSIZE==1) … … 2379 1938 #endif 2380 1939 2381 #if MTK_F0109_LG_F0120_VSP_BLOCK2382 1940 nTxtPerDepthX = nTxtPerDepthX << vspSize; 2383 1941 nTxtPerDepthY = nTxtPerDepthY << (1-vspSize); 2384 #endif 1942 2385 1943 Int refStride = picRef->getCStride(); 2386 1944 Int dstStride = yuvDst->getCStride(); … … 2564 2122 2565 2123 #if H_3D_DIM_DMM 2566 #if !SEC_DMM3_RBC_F01472567 UInt TComPrediction::xPredWedgeFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt intraTabIdx )2568 {2569 TComPic* pcPicTex = pcCU->getSlice()->getTexturePic();2570 assert( pcPicTex != NULL );2571 TComDataCU* pcColTexCU = pcPicTex->getCU(pcCU->getAddr());2572 UInt uiTexPartIdx = pcCU->getZorderIdxInCU() + uiAbsPartIdx;2573 Int uiColTexIntraDir = pcColTexCU->isIntra( uiTexPartIdx ) ? pcColTexCU->getLumaIntraDir( uiTexPartIdx ) : 255;2574 2575 assert( uiColTexIntraDir > DC_IDX && uiColTexIntraDir < 35 );2576 return g_aauiWdgLstM3[g_aucConvertToBit[uiWidth]][uiColTexIntraDir-2].at(intraTabIdx);2577 }2578 #endif2579 2124 2580 2125 Void TComPrediction::xPredContourFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, TComWedgelet* pcContourWedge ) … … 2628 2173 #endif 2629 2174 2630 #if H_3D_DIM_RBC 2631 Void TComPrediction::xDeltaDCQuantScaleUp( TComDataCU* pcCU, Pel& rDeltaDC ) 2632 { 2633 Int iSign = rDeltaDC < 0 ? -1 : 1; 2634 UInt uiAbs = abs( rDeltaDC ); 2635 2636 Int iQp = pcCU->getQP(0); 2637 Double dMax = (Double)( 1<<( g_bitDepthY - 1 ) ); 2638 Double dStepSize = Clip3( 1.0, dMax, pow( 2.0, iQp/10.0 - 2.0 ) ); 2639 2640 rDeltaDC = iSign * roftoi( uiAbs * dStepSize ); 2641 return; 2642 } 2643 2644 Void TComPrediction::xDeltaDCQuantScaleDown( TComDataCU* pcCU, Pel& rDeltaDC ) 2645 { 2646 Int iSign = rDeltaDC < 0 ? -1 : 1; 2647 UInt uiAbs = abs( rDeltaDC ); 2648 2649 Int iQp = pcCU->getQP(0); 2650 Double dMax = (Double)( 1<<( g_bitDepthY - 1 ) ); 2651 Double dStepSize = Clip3( 1.0, dMax, pow( 2.0, iQp/10.0 - 2.0 ) ); 2652 2653 rDeltaDC = iSign * roftoi( uiAbs / dStepSize ); 2654 return; 2655 } 2656 #endif 2175 2657 2176 #if H_3D_DIM_SDC 2658 2177 Void TComPrediction::analyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride -
trunk/source/Lib/TLibCommon/TComPrediction.h
r724 r773 93 93 #if H_3D_ARP 94 94 Void xPredInterUniARP ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false, TComMvField * pNewMvFiled = NULL ); 95 #if QC_MTK_INTERVIEW_ARP_F0123_F010896 95 Void xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled = NULL ); 97 #endif98 96 #endif 99 97 Void xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false ); … … 123 121 124 122 #if H_3D_VSP 125 #if MTK_F0109_LG_F0120_VSP_BLOCK126 123 Void xGetVirtualDepth ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int txtPerDepthX=1, Int txtPerDepthY=1 ); 127 124 Void xPredInterLumaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi, Int vspSize); 128 125 Void xPredInterChromaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi, Int vspSize); 129 #else130 Void xGetVirtualDepth ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int txtPerDepthX=1, Int txtPerDepthY=1 );131 Void xPredInterLumaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi );132 Void xPredInterChromaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi );133 #endif134 126 #endif 135 127 … … 142 134 Void xDCPredFiltering( Int* pSrc, Int iSrcStride, Pel*& rpDst, Int iDstStride, Int iWidth, Int iHeight ); 143 135 Bool xCheckIdenticalMotion ( TComDataCU* pcCU, UInt PartAddr); 144 #if MTK_SPIVMP_F0110136 #if H_3D_SPIVMP 145 137 Bool xCheckTwoSPMotion ( TComDataCU* pcCU, UInt PartAddr0, UInt PartAddr1 ); 146 138 Void xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr ); … … 154 146 Void xPredContourFromTex ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, TComWedgelet* pcContourWedge ); 155 147 Void xCopyTextureLumaBlock ( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piDestBlockY, UInt uiWidth, UInt uiHeight ); 156 #endif157 #if H_3D_DIM_RBC158 Void xDeltaDCQuantScaleUp ( TComDataCU* pcCU, Pel& rDeltaDC );159 Void xDeltaDCQuantScaleDown ( TComDataCU* pcCU, Pel& rDeltaDC );160 148 #endif 161 149 #endif -
trunk/source/Lib/TLibCommon/TComRom.cpp
r738 r773 573 573 #if H_MV_ENC_DEC_TRAC 574 574 #if ENC_DEC_TRACE 575 #if H_MV_FIX_TRACE_FILE576 575 Void writeToTraceFile( const Char* symbolName, Int val, Bool doIt ) 577 #else578 Void writeToTraceFile( Char* symbolName, Int val, Bool doIt )579 #endif580 576 { 581 577 if ( ( ( g_nSymbolCounter >= COUNTER_START && g_nSymbolCounter <= COUNTER_END )|| g_bJustDoIt ) && doIt ) … … 592 588 } 593 589 594 #if H_MV_FIX_TRACE_FILE595 590 Void writeToTraceFile( const Char* symbolName, Bool doIt ) 596 #else597 Void writeToTraceFile( Char* symbolName, Bool doIt )598 #endif599 591 { 600 592 if ( ( ( g_nSymbolCounter >= COUNTER_START && g_nSymbolCounter <= COUNTER_END )|| g_bJustDoIt ) && doIt ) … … 612 604 std::vector< std::vector<TComWedgeRef> > g_dmmWedgeRefLists; 613 605 std::vector< std::vector<TComWedgeNode> > g_dmmWedgeNodeLists; 614 #if !SEC_DMM3_RBC_F0147615 std::vector< std::vector< std::vector<UInt> > > g_aauiWdgLstM3;616 #endif617 606 618 607 Void initWedgeLists( Bool initNodeList ) … … 733 722 } 734 723 735 #if !SEC_DMM3_RBC_F0147 736 UInt uiThrSz = DMM3_SIMPLIFY_TR; 737 std::vector< std::vector<UInt> > auiWdgListSz; 738 for( Int idxM=2; idxM<=34 ; idxM++) 739 { 740 std::vector<UInt> auiWdgList; 741 for( Int idxW=0; idxW<racWedgeList.size(); idxW++) 742 { 743 UInt uiAbsDiff = abs(idxM-(Int)racWedgeList[idxW].getAng()); 744 if( uiAbsDiff <= uiThrSz ) 745 { 746 auiWdgList.push_back(idxW); 747 } 748 } 749 auiWdgListSz.push_back(auiWdgList); 750 } 751 g_aauiWdgLstM3.push_back(auiWdgListSz); 752 #endif 724 753 725 } 754 726 -
trunk/source/Lib/TLibCommon/TComRom.h
r738 r773 172 172 extern std::vector< std::vector<TComWedgeRef> > g_dmmWedgeRefLists; 173 173 extern std::vector< std::vector<TComWedgeNode> > g_dmmWedgeNodeLists; 174 #if !SEC_DMM3_RBC_F0147175 extern std::vector< std::vector< std::vector<UInt> > > g_aauiWdgLstM3;176 #endif177 174 178 175 Void initWedgeLists( Bool initNodeList = false ); … … 236 233 237 234 238 #if H_MV_FIX_TRACE_FILE239 235 Void writeToTraceFile( const Char* symbolName, Int val, Bool doIt ); 240 236 Void writeToTraceFile( const Char* symbolName, Bool doIt ); 241 #else242 Void writeToTraceFile( Char* symbolName, Int val, Bool doIt );243 Void writeToTraceFile( Char* symbolName, Bool doIt );244 #endif245 237 #endif 246 238 #else -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r758 r773 110 110 #endif 111 111 , m_pocResetFlag (false) 112 #if H_MV _6_RALS_O0149_11112 #if H_MV 113 113 , m_crossLayerBlaFlag (false) 114 114 #endif … … 753 753 { 754 754 if ( this->getNumRefIdx( RefPicList( uiRefListIdx ) ) == 0) 755 { 755 756 continue; 756 #if !SHARP_ARP_REF_CHECK_F0105 757 // move the following to setARPStepNum() to define ARP related thing in ARP function. 758 #if QC_MTK_INTERVIEW_ARP_F0123_F0108 759 for(Int i = 0; i < this->getNumRefIdx(RefPicList(uiRefListIdx)); i++ ) 760 { 761 if ( this->getRefPic(RefPicList(uiRefListIdx), i)->getPOC() != getPOC() ) 762 { 763 this->setFirstTRefIdx (RefPicList(uiRefListIdx), i); 764 break; 765 } 766 } 767 #endif 768 #endif 757 } 769 758 Bool bZeroIdxLtFlag = this->getRefPic(RefPicList(uiRefListIdx), 0)->getIsLongTerm(); 770 759 for(Int i = 1; i < this->getNumRefIdx(RefPicList(uiRefListIdx)); i++ ) … … 782 771 Void TComSlice::setCamparaSlice( Int** aaiScale, Int** aaiOffset ) 783 772 { 784 #if CAM_HLS_F0136_F0045_F0082785 773 if( m_pcVPS->hasCamParInSliceHeader( m_viewIndex ) ) 786 #else787 if( m_pcSPS->hasCamParInSliceHeader() )788 #endif789 774 { 790 775 for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < m_viewIndex; uiBaseViewIndex++ ) … … 1716 1701 , m_hrdOpSetIdx (NULL) 1717 1702 , m_cprmsPresentFlag (NULL) 1718 #if H_MV _6_HRD_O0217_131703 #if H_MV 1719 1704 , m_dpbSize (NULL) 1720 #endif1721 #if H_MV1722 1705 , m_vpsVUI ( NULL ) 1723 1706 #endif … … 1734 1717 for( Int layerId = 0; layerId < MAX_VPS_NUH_LAYER_ID_PLUS1; layerId++ ) 1735 1718 { 1736 #if H_MV_6_HRD_O0217_131737 1719 m_layerIdIncludedFlag[lsIdx][layerId] = (( lsIdx == 0 ) && ( layerId == 0 )) ; 1738 #else1739 m_layerIdIncludedFlag[lsIdx][layerId] = false;1740 #endif1741 1720 } 1742 1721 } … … 1752 1731 m_moreOutputLayerSetsThanDefaultFlag = false; 1753 1732 m_numAddOutputLayerSetsMinus1 = -1; 1754 #if H_MV_6_PS_0109_251755 1733 m_defaultOneTargetOutputLayerIdc = 0; 1756 #else1757 m_defaultOneTargetOutputLayerFlag = false;1758 #endif1759 1734 1760 1735 for ( Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++) … … 1767 1742 } 1768 1743 } 1769 #if H_MV_6_GEN_0153_281770 1744 m_altOutputLayerFlag = false; 1771 #endif1772 1745 m_maxOneActiveRefLayerFlag = false; 1773 1746 m_directDepTypeLenMinus2 = 0; … … 1806 1779 m_layerIdInNuh [i] = ( i == 0 ) ? 0 : -1; 1807 1780 m_numDirectRefLayers[i] = 0; 1808 #if !H_MV_6_ILDDS_O0225_301809 m_maxTidIlRefPicPlus1[i] = 7;1810 #endif1811 1781 m_vpsRepFormatIdx [i] = 0; 1812 #if H_MV_6_MISC_O0062_311813 1782 m_pocLsbNotPresentFlag[i] = 0; 1814 #endif1815 1783 m_repFormat [i] = NULL; 1816 1784 m_viewIdVal [i] = 0; … … 1819 1787 m_viewIndex [i] = -1; 1820 1788 m_vpsDepthModesFlag [i] = false; 1821 #if H_3D_DIM_DLT1822 #if !DLT_DIFF_CODING_IN_PPS1823 m_bUseDLTFlag [i] = false;1824 1825 // allocate some memory and initialize with default mapping1826 m_iNumDepthmapValues[i] = ((1 << g_bitDepthY)-1)+1;1827 m_iBitsPerDepthValue[i] = numBitsForValue(m_iNumDepthmapValues[i]);1828 1829 m_iDepthValue2Idx[i] = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]);1830 m_iIdx2DepthValue[i] = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]);1831 1832 //default mapping1833 for (Int d=0; d<m_iNumDepthmapValues[i]; d++)1834 {1835 m_iDepthValue2Idx[i][d] = d;1836 m_iIdx2DepthValue[i][d] = d;1837 }1838 #endif1839 #endif1840 #if H_3D1841 1789 m_ivMvScalingFlag = true; 1842 #endif1843 1790 #endif 1844 1791 … … 1848 1795 m_directDependencyType[i][j] = -1; 1849 1796 m_refLayerId[i][j] = -1; 1850 #if H_MV_6_ILDDS_O0225_301851 1797 m_maxTidIlRefPicsPlus1[i][j] = 7; 1852 #endif1853 1798 } 1854 1799 … … 1863 1808 } 1864 1809 m_vpsVUI = new TComVPSVUI; 1865 #if H_MV_6_HRD_O0217_131866 1810 m_dpbSize = new TComDpbSize; 1867 #endif 1868 # 1811 1869 1812 #if H_3D 1870 1813 for( Int i = 0; i < MAX_NUM_LAYERS; i++ ) … … 1872 1815 #if H_3D_IV_MERGE 1873 1816 m_ivMvPredFlag [ i ] = false; 1874 #if MTK_SPIVMP_F01101817 #if H_3D_SPIVMP 1875 1818 m_iSubPULog2Size [ i ] = 0; 1876 1819 #endif … … 1885 1828 m_bInterSDCFlag [ i ] = false; 1886 1829 #endif 1887 #if SEC_MPI_ENABLING_MERGE_F01501830 #if H_3D_IV_MERGE 1888 1831 m_bMPIFlag [ i ] = false; 1889 1832 #endif … … 1895 1838 TComVPS::~TComVPS() 1896 1839 { 1897 if( m_hrdParameters != NULL ) delete[] m_hrdParameters;1840 if( m_hrdParameters != NULL ) delete[] m_hrdParameters; 1898 1841 if( m_hrdOpSetIdx != NULL ) delete[] m_hrdOpSetIdx; 1899 1842 if( m_cprmsPresentFlag != NULL ) delete[] m_cprmsPresentFlag; 1900 1843 #if H_MV 1901 1844 if ( m_vpsVUI != NULL ) delete m_vpsVUI; 1902 #if H_MV_6_HRD_O0217_131903 1845 if ( m_dpbSize != NULL ) delete m_dpbSize; 1904 #endif1905 1846 1906 1847 for( Int i = 0; i < MAX_NUM_LAYERS; i++ ) 1907 1848 { 1908 1849 if (m_repFormat[ i ] != NULL ) delete m_repFormat[ i ]; 1909 #if H_3D_DIM_DLT 1910 #if !DLT_DIFF_CODING_IN_PPS 1911 if ( m_iDepthValue2Idx[i] != 0 ) 1912 { 1913 xFree( m_iDepthValue2Idx[i] ); 1914 m_iDepthValue2Idx[i] = 0; 1915 } 1916 1917 if ( m_iIdx2DepthValue[i] != 0 ) 1918 { 1919 xFree( m_iIdx2DepthValue[i] ); 1920 m_iIdx2DepthValue[i] = 0; 1921 } 1922 #endif 1923 #endif 1924 } 1925 #endif 1926 #if CAM_HLS_F0136_F0045_F0082 1850 } 1851 #endif 1852 #if H_3D 1927 1853 deleteCamPars(); 1928 1854 #endif 1929 1855 } 1930 1931 #if H_3D_DIM_DLT1932 #if !DLT_DIFF_CODING_IN_PPS1933 Void TComVPS::setDepthLUTs(Int layerIdInVps, Int* idxToDepthValueTable, Int iNumDepthValues)1934 {1935 if( idxToDepthValueTable == NULL || iNumDepthValues == 0 ) // default mapping only1936 return;1937 1938 // copy idx2DepthValue to internal array1939 memcpy(m_iIdx2DepthValue[layerIdInVps], idxToDepthValueTable, iNumDepthValues*sizeof(UInt));1940 1941 UInt uiMaxDepthValue = ((1 << g_bitDepthY)-1);1942 for(Int p=0; p<=uiMaxDepthValue; p++)1943 {1944 Int iIdxDown = 0;1945 Int iIdxUp = iNumDepthValues-1;1946 Bool bFound = false;1947 1948 // iterate over indices to find lower closest depth1949 Int i = 1;1950 while(!bFound && i<iNumDepthValues)1951 {1952 if( m_iIdx2DepthValue[layerIdInVps][i] > p )1953 {1954 iIdxDown = i-1;1955 bFound = true;1956 }1957 1958 i++;1959 }1960 // iterate over indices to find upper closest depth1961 i = iNumDepthValues-2;1962 bFound = false;1963 while(!bFound && i>=0)1964 {1965 if( m_iIdx2DepthValue[layerIdInVps][i] < p )1966 {1967 iIdxUp = i+1;1968 bFound = true;1969 }1970 1971 i--;1972 }1973 1974 // assert monotony1975 assert(iIdxDown<=iIdxUp);1976 1977 // assign closer depth value/idx1978 if( abs(p-m_iIdx2DepthValue[layerIdInVps][iIdxDown]) < abs(p-m_iIdx2DepthValue[layerIdInVps][iIdxUp]) )1979 {1980 m_iDepthValue2Idx[layerIdInVps][p] = iIdxDown;1981 }1982 else1983 {1984 m_iDepthValue2Idx[layerIdInVps][p] = iIdxUp;1985 }1986 1987 }1988 1989 // update DLT variables1990 m_iNumDepthmapValues[layerIdInVps] = iNumDepthValues;1991 m_iBitsPerDepthValue[layerIdInVps] = numBitsForValue(m_iNumDepthmapValues[layerIdInVps]);1992 }1993 #endif1994 #endif1995 1856 1996 1857 #if H_MV … … 2079 1940 return foundLayerIdinNuh; 2080 1941 } 2081 #if CAM_HLS_F0136_F0045_F0082 1942 2082 1943 Void TComVPS::createCamPars(Int iNumViews) 2083 1944 { … … 2168 2029 } 2169 2030 } 2170 #endif // CAM_HLS_F0136_F0045_F00822171 2031 2172 2032 #endif // H_3D … … 2204 2064 assert( lsIdx >= 0 ); 2205 2065 assert( lsIdx <= getVpsNumLayerSetsMinus1() ); 2206 #if H_MV_6_HRD_O0217_132207 2066 return (Int) m_layerSetLayerIdList[ lsIdx ].size(); 2208 #else 2209 Int numLayersInIdList = 0; 2210 for (Int layerId = 0; layerId < getVpsMaxLayerId(); layerId++ ) 2211 { 2212 numLayersInIdList += ( getLayerIdIncludedFlag( lsIdx, layerId ) ); 2213 } 2214 return numLayersInIdList; 2215 #endif 2216 } 2217 2218 #if H_MV_6_HRD_O0217_13 2067 } 2068 2219 2069 Int TComVPS::getNumOutputLayerSets() 2220 2070 { … … 2226 2076 return numOutputLayerSets; 2227 2077 } 2228 #endif2229 2078 2230 2079 Int TComVPS::getNumViews() … … 2258 2107 } 2259 2108 2260 #if H_MV_6_HRD_O0217_132261 2109 Void TComVPS::deriveLayerSetLayerIdList() 2262 2110 { … … 2294 2142 } 2295 2143 } 2296 #endif2297 2144 #endif // H_MV 2298 2145 … … 2349 2196 , m_spsScalingListRefLayerId ( 0 ) 2350 2197 2351 #if !H_MV_6_PS_REP_FORM_18_19_202352 , m_updateRepFormatFlag ( true )2353 #else2354 2198 , m_updateRepFormatFlag ( false ) 2355 2199 , m_spsRepFormatIdx ( 0 ) 2356 #endif2357 2200 , m_interViewMvVertConstraintFlag (false) 2358 2201 #endif … … 2370 2213 ::memset(m_ltRefPicPocLsbSps, 0, sizeof(m_ltRefPicPocLsbSps)); 2371 2214 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); 2372 #if H_MV _6_PSEM_O0142_32215 #if H_MV 2373 2216 m_spsExtensionFlag = false; 2374 2217 for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ ) … … 2376 2219 m_spsExtensionTypeFlag[ i ] = false; 2377 2220 } 2378 #endif2379 #if H_MV_6_SHVC_O0098_362380 2221 m_numScaledRefLayerOffsets = 0; 2381 2222 … … 2548 2389 , m_ppsInferScalingListFlag(false) 2549 2390 , m_ppsScalingListRefLayerId(0) 2550 #if DLT_DIFF_CODING_IN_PPS2391 #if H_3D 2551 2392 , m_pcDLT(NULL) 2552 2393 #endif … … 2571 2412 } 2572 2413 2573 #if DLT_DIFF_CODING_IN_PPS2414 #if H_3D 2574 2415 TComDLT::TComDLT() 2575 2416 : m_bDltPresentFlag(false) … … 2753 2594 if ( layerIdCurr > 0 ) 2754 2595 { 2755 #if H_MV_6_PS_REP_FORM_18_19_202756 2596 Int repFormatIdx = getUpdateRepFormatFlag() ? getSpsRepFormatIdx() : vps->getVpsRepFormatIdx( vps->getLayerIdInVps( layerIdCurr ) ) ; 2757 2597 TComRepFormat* repFormat = vps->getRepFormat( repFormatIdx ); 2758 #else2759 TComRepFormat* repFormat = vps->getRepFormat( vps->getVpsRepFormatIdx( vps->getLayerIdInVps( layerIdCurr ) ) );2760 if ( !getUpdateRepFormatFlag() )2761 {2762 #endif2763 2598 setChromaFormatIdc( repFormat->getChromaFormatVpsIdc() ); 2764 2599 //// ToDo: add when supported: … … 2773 2608 setBitDepthC ( repFormat->getBitDepthVpsChromaMinus8() + 8 ); 2774 2609 setQpBDOffsetC ( (Int) (6* ( getBitDepthC() -8 ) ) ); 2775 #if !H_MV_6_PS_REP_FORM_18_19_202776 }2777 else2778 #else2779 2610 if ( getLayerId() > 0 && getUpdateRepFormatFlag() ) 2780 #endif2781 2611 { 2782 2612 assert( getChromaFormatIdc() <= repFormat->getChromaFormatVpsIdc() ); … … 2808 2638 } 2809 2639 #endif 2810 #if H_3D 2811 #if !CAM_HLS_F0136_F0045_F0082 2812 Void 2813 TComSPS::initCamParaSPS( UInt uiViewIndex, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset ) 2814 { 2815 AOT( uiViewIndex != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) ); 2816 2817 m_uiCamParPrecision = ( uiViewIndex ? uiCamParPrecision : 0 ); 2818 m_bCamParInSliceHeader = ( uiViewIndex ? bCamParSlice : false ); 2819 ::memset( m_aaiCodedScale, 0x00, sizeof( m_aaiCodedScale ) ); 2820 ::memset( m_aaiCodedOffset, 0x00, sizeof( m_aaiCodedOffset ) ); 2821 2822 if( !m_bCamParInSliceHeader ) 2823 { 2824 for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ ) 2825 { 2826 m_aaiCodedScale [ 0 ][ uiBaseViewIndex ] = aaiScale [ uiBaseViewIndex ][ uiViewIndex ]; 2827 m_aaiCodedScale [ 1 ][ uiBaseViewIndex ] = aaiScale [ uiViewIndex ][ uiBaseViewIndex ]; 2828 m_aaiCodedOffset[ 0 ][ uiBaseViewIndex ] = aaiOffset[ uiBaseViewIndex ][ uiViewIndex ]; 2829 m_aaiCodedOffset[ 1 ][ uiBaseViewIndex ] = aaiOffset[ uiViewIndex ][ uiBaseViewIndex ]; 2830 } 2831 } 2832 } 2833 #endif 2834 #endif 2640 2835 2641 TComReferencePictureSet::TComReferencePictureSet() 2836 2642 : m_numberOfPictures (0) … … 3150 2956 { 3151 2957 TComPic* pcPic = ivPicLists->getPic( targetDecLayerIdSet[ i ], curPoc ); 3152 #if H_MV_LAYER_WISE_STARTUP3153 2958 if ( pcPic ) 3154 2959 { 3155 #endif3156 2960 if( pcPic->getSlice(0)->isReferenced() && pcPic->getSlice(0)->getTemporalLayerNonReferenceFlag() ) 3157 2961 { … … 3176 2980 } 3177 2981 } 3178 #if H_MV_LAYER_WISE_STARTUP 3179 } 3180 #endif 2982 } 3181 2983 } 3182 2984 } … … 3236 3038 3237 3039 3238 #if H_MV_6_ILDDS_ILREFPICS_27_343239 3040 Int TComSlice::getRefLayerPicFlag( Int i ) 3240 3041 { … … 3279 3080 return numRefLayerPics; 3280 3081 } 3281 #endif3282 3082 3283 3083 … … 3293 3093 else if (getVPS()->getAllRefLayersActiveFlag() ) 3294 3094 { 3295 #if H_MV_6_ILDDS_ILREFPICS_27_343296 3095 numActiveRefLayerPics = getNumRefLayerPics(); 3297 #else3298 numActiveRefLayerPics = getVPS()->getNumDirectRefLayers( getLayerId() );3299 #endif3300 3096 } 3301 3097 else if ( !getInterLayerPredEnabledFlag() ) … … 3305 3101 else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 ) 3306 3102 { 3307 #if H_MV_6_ILDDS_ILREFPICS_27_343308 3103 numActiveRefLayerPics = getRefLayerPicFlag( 0 ) ? 1 : 0; 3309 #else3310 numActiveRefLayerPics = 1;3311 #endif3312 3104 } 3313 3105 else … … 3324 3116 3325 3117 #if H_3D_ARP 3326 #if SHARP_ARP_REF_CHECK_F01053327 3118 Void TComSlice::setARPStepNum( TComPicLists*ivPicLists ) 3328 #else 3329 Void TComSlice::setARPStepNum() 3330 #endif 3331 { 3332 #if SHARP_ARP_REF_CHECK_F0105 3119 { 3333 3120 Bool tempRefPicInListsFlag = false; 3334 #else3335 Bool bAllIvRef = true;3336 #endif3337 #if QC_MTK_INTERVIEW_ARP_F0123_F01083338 3121 if(!getVPS()->getUseAdvRP(getLayerId()) || this->isIRAP()) 3339 #else3340 if(!getVPS()->getUseAdvRP(getLayerId()))3341 #endif3342 3122 { 3343 3123 m_nARPStepNum = 0; … … 3345 3125 else 3346 3126 { 3347 #if SHARP_ARP_REF_CHECK_F01053348 3127 setFirstTRefIdx (REF_PIC_LIST_0, -1); 3349 3128 setFirstTRefIdx (REF_PIC_LIST_1, -1); … … 3361 3140 tempRefPicInListsFlag = getFirstTRefIdx(REF_PIC_LIST_0) >= 0 || getFirstTRefIdx(REF_PIC_LIST_1) >= 0; 3362 3141 m_nARPStepNum = tempRefPicInListsFlag ? getVPS()->getARPStepNum(getLayerId()) : 0; 3363 #else 3364 for( Int iRefListId = 0; iRefListId < 2; iRefListId++ ) 3365 { 3366 RefPicList eRefPicList = RefPicList( iRefListId ); 3367 Int iNumRefIdx = getNumRefIdx(eRefPicList); 3368 3369 if( iNumRefIdx <= 0 ) 3370 { 3371 continue; 3372 } 3373 3374 for ( Int i = 0; i < iNumRefIdx; i++ ) 3375 { 3376 if( getRefPic( eRefPicList, i)->getPOC() != getPOC() ) 3377 { 3378 bAllIvRef = false; 3379 break; 3380 } 3381 } 3382 3383 if( bAllIvRef == false ) { break; } 3384 } 3385 m_nARPStepNum = !bAllIvRef ? getVPS()->getARPStepNum(getLayerId()) : 0; 3386 #endif 3387 } 3388 #if SHARP_ARP_REF_CHECK_F0105 3142 } 3143 3389 3144 if (tempRefPicInListsFlag) 3390 3145 { … … 3407 3162 } 3408 3163 } 3409 } 3410 } 3411 #endif 3164 } 3165 } 3412 3166 } 3413 3167 #endif … … 3514 3268 #endif 3515 3269 3516 #if QC_DEPTH_IV_MRG_F01253270 #if H_3D_IV_MERGE 3517 3271 setupLUT = setupLUT || ( getVPS()->getIvMvPredFlag(layerIdInVPS ) && getIsDepth() ); 3518 3272 #endif … … 3543 3297 assert( m_depthToDisparityF != NULL ); 3544 3298 3545 #if CAM_HLS_F0136_F0045_F00823546 3299 TComVPS* vps = getVPS(); 3547 #else 3548 TComSPS* sps = getSPS(); 3549 #endif 3550 3551 #if CAM_HLS_F0136_F0045_F0082 3300 3552 3301 Int log2Div = g_bitDepthY - 1 + vps->getCamParPrecision(); 3553 3302 Int viewIndex = getViewIndex(); … … 3559 3308 Int* invCodScale = camParaSH ? m_aaiCodedScale [ 1 ] : vps->getInvCodedScale ( viewIndex ); 3560 3309 Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : vps->getInvCodedOffset( viewIndex ); 3561 #else3562 Int log2Div = g_bitDepthY - 1 + sps->getCamParPrecision();3563 3564 Bool camParaSH = m_pcSPS->hasCamParInSliceHeader();3565 3566 Int* codScale = camParaSH ? m_aaiCodedScale [ 0 ] : sps->getCodedScale ();3567 Int* codOffset = camParaSH ? m_aaiCodedOffset[ 0 ] : sps->getCodedOffset ();3568 Int* invCodScale = camParaSH ? m_aaiCodedScale [ 1 ] : sps->getInvCodedScale ();3569 Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : sps->getInvCodedOffset();3570 #endif3571 3310 3572 3311 for (Int i = 0; i <= ( getViewIndex() - 1); i++) … … 3925 3664 TComVPSVUI::TComVPSVUI() 3926 3665 { 3927 #if H_MV_6_PS_O0223_293928 3666 m_crossLayerIrapAlignedFlag = true; 3929 #endif3930 3667 m_bitRatePresentVpsFlag = false; 3931 3668 m_picRatePresentVpsFlag = false; … … 3955 3692 } 3956 3693 } 3957 #if H_MV_6_PS_O0118_333958 3694 for ( Int i = 0; i < MAX_NUM_VIDEO_SIGNAL_INFO; i++ ) 3959 3695 { 3960 3696 m_videoSignalInfo [i] = NULL; 3961 3697 } 3962 #endif 3963 3964 #if H_MV_6_HRD_O0164_15 3698 3965 3699 m_vpsVuiBspHrdPresentFlag = false; 3966 3700 m_vpsVuiBspHrdParameters = new TComVpsVuiBspHrdParameters(); 3967 #endif 3968 } 3969 3970 #if H_MV_6_PS_O0118_33 3701 }