Changeset 950 in 3DVCSoftware
- Timestamp:
- 25 Apr 2014, 12:38:00 (11 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cfg/3D-HEVC/baseCfg_2view+depth.cfg
r872 r950 198 198 AdvMultiviewResPred : 1 # Advanced inter-view residual prediction (0:off, 1:on) 199 199 IlluCompEnable : 1 # Enable Illumination compensation ( 0: off, 1: on ) (v/d) 200 IlluCompLowLatencyEnc : 0 # Enable low-latency Illumination compensation encoding( 0: off, 1: on ) 200 201 ViewSynthesisPred : 1 # View synthesis prediction 201 202 DepthRefinement : 1 # Dispary refined by depth DoNBDV -
trunk/cfg/3D-HEVC/baseCfg_2view.cfg
r872 r950 173 173 AdvMultiviewResPred : 1 # Advanced inter-view residual prediction (0:off, 1:on) 174 174 IlluCompEnable : 1 # Enable Illumination compensation ( 0: off, 1: on ) (v/d) 175 IlluCompLowLatencyEnc : 0 # Enable low-latency Illumination compensation encoding( 0: off, 1: on ) 175 176 ViewSynthesisPred : 1 # View synthesis prediction 176 177 DepthRefinement : 1 # Dispary refined by depth DoNBDV -
trunk/cfg/3D-HEVC/baseCfg_3view+depth.cfg
r872 r950 229 229 AdvMultiviewResPred : 1 # Advanced inter-view residual prediction (0:off, 1:on) 230 230 IlluCompEnable : 1 # Enable Illumination compensation ( 0: off, 1: on ) (v/d) 231 IlluCompLowLatencyEnc : 0 # Enable low-latency Illumination compensation encoding( 0: off, 1: on ) 231 232 ViewSynthesisPred : 1 # View synthesis prediction 232 233 DepthRefinement : 1 # Dispary refined by depth DoNBDV -
trunk/cfg/3D-HEVC/baseCfg_3view.cfg
r872 r950 188 188 AdvMultiviewResPred : 1 # Advanced inter-view residual prediction (0:off, 1:on) 189 189 IlluCompEnable : 1 # Enable Illumination compensation ( 0: off, 1: on ) (v/d) 190 IlluCompLowLatencyEnc : 0 # Enable low-latency Illumination compensation encoding( 0: off, 1: on ) 190 191 ViewSynthesisPred : 0 # View synthesis prediction 191 192 DepthRefinement : 0 # Dispary refined by depth DoNBDV -
trunk/cfg/3D-HEVC/fullCfg.cfg
r872 r950 253 253 AdvMultiviewResPred : 1 # Advanced inter-view residual prediction (0:off, 1:on) 254 254 IlluCompEnable : 1 # Enable Illumination compensation ( 0: off, 1: on ) (v/d) 255 IlluCompLowLatencyEnc : 0 # Enable low-latency Illumination compensation encoding( 0: off, 1: on ) 255 256 ViewSynthesisPred : 1 # View synthesis prediction 256 257 DepthRefinement : 1 # Dispary refined by depth DoNBDV -
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r884 r950 517 517 #if H_3D_IC 518 518 ("IlluCompEnable", m_abUseIC, true, "Enable illumination compensation") 519 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 520 ("IlluCompLowLatencyEnc", m_bUseLowLatencyICEnc, false, "Enable low-latency illumination compensation encoding") 521 #endif 519 522 #endif 520 523 #if H_3D_INTER_SDC … … 2479 2482 #if H_3D_IC 2480 2483 printf( "IlluCompEnable:%d ", m_abUseIC); 2484 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 2485 printf ("IlluCompLowLatencyEnc:%d ", m_bUseLowLatencyICEnc); 2486 #endif 2481 2487 #endif 2482 2488 #if H_3D_NBDV_REF -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r884 r950 137 137 #if H_3D_IC 138 138 Bool m_abUseIC; 139 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 140 Bool m_bUseLowLatencyICEnc; 141 #endif 139 142 #endif 140 143 #if H_3D_NBDV_REF -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r884 r950 178 178 m_cTEncTop.setDWeight ( isDepth ? m_iDWeight : 0 ); 179 179 #endif // H_3D_VSO 180 #if H_3D_ARP 180 #if H_3D_ARP && !QC_IV_PRED_CONSTRAINT_H0137 181 181 //====== Advanced Inter-view Residual Prediction ========= 182 182 m_cTEncTop.setUseAdvRP ( ( isDepth || 0==layerIdInVps ) ? 0 : m_uiUseAdvResPred ); … … 189 189 #if H_3D_IC 190 190 m_cTEncTop.setUseIC ( vps.getViewIndex( layerId ) == 0 || isDepth ? false : m_abUseIC ); 191 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 192 m_cTEncTop.setUseICLowLatencyEnc ( m_bUseLowLatencyICEnc ); 193 #endif 191 194 #endif 192 195 //========== Depth intra modes ========== … … 1793 1796 1794 1797 #if H_3D_ARP 1798 #if QC_IV_PRED_CONSTRAINT_H0137 1799 vps.setUseAdvRP ( layer, ( isDepth || isLayerZero || !vps.getNumDirectRefLayers(layer) ) ? 0 : m_uiUseAdvResPred ); 1800 vps.setARPStepNum ( layer, ( isDepth || isLayerZero || !vps.getNumDirectRefLayers(layer) ) ? 1 : H_3D_ARP_WFNR ); 1801 #else 1795 1802 vps.setUseAdvRP ( layer, ( isDepth || isLayerZero ) ? 0 : m_uiUseAdvResPred ); 1796 1803 vps.setARPStepNum ( layer, ( isDepth || isLayerZero ) ? 1 : H_3D_ARP_WFNR ); 1797 1804 #endif 1805 #endif 1798 1806 #if H_3D_SPIVMP 1799 1807 if( isDepth ) … … 1812 1820 1813 1821 #if H_3D_IV_MERGE 1822 #if QC_IV_PRED_CONSTRAINT_H0137 1823 if( !vps.getNumDirectRefLayers(layer) ) 1824 { 1825 vps.setIvMvPredFlag (layer, false); 1826 } 1827 else 1828 { 1829 #endif 1814 1830 if( isDepth ) 1815 1831 { … … 1820 1836 vps.setIvMvPredFlag ( layer, !isLayerZero && m_ivMvPredFlag[0] ); 1821 1837 } 1838 #if QC_IV_PRED_CONSTRAINT_H0137 1839 } 1840 #endif 1822 1841 #endif 1823 1842 #if H_3D_NBDV_REF … … 1825 1844 #endif 1826 1845 #if H_3D_VSP 1846 #if QC_IV_PRED_CONSTRAINT_H0137 1847 vps.setViewSynthesisPredFlag( layer, !isLayerZero && !isDepth && vps.getNumDirectRefLayers(layer) && m_viewSynthesisPredFlag ); 1848 #else 1827 1849 vps.setViewSynthesisPredFlag( layer, !isLayerZero && !isDepth && m_viewSynthesisPredFlag ); 1850 #endif 1828 1851 #endif 1829 1852 #if H_3D_DBBP -
trunk/source/Lib/TLibCommon/ContextTables.h
r884 r950 110 110 #define NUM_DMM1_DATA_CTX 1 ///< number of context models for DMM1 data 111 111 #endif 112 #if LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135 113 #define NUM_ANGLE_FLAG_CTX 1 114 #else 112 115 #define NUM_ANGLE_FLAG_CTX 3 116 #endif 113 117 #endif 114 118 … … 368 372 }; 369 373 374 #if LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135 375 static const UChar 376 INIT_ANGLE_FLAG[3][NUM_ANGLE_FLAG_CTX] = 377 { 378 { 154 }, 379 { 141 }, 380 { 155 }, 381 }; 382 #else 370 383 static const UChar 371 384 INIT_ANGLE_FLAG[3][NUM_ANGLE_FLAG_CTX] = … … 375 388 { 155, 170, 157 }, 376 389 }; 390 #endif 377 391 378 392 static const UChar … … 430 444 431 445 #if H_3D_DBBP 446 #if MTK_DBBP_SIGNALING_H0094 432 447 static const UChar INIT_DBBP_FLAG[3][DBBP_NUM_FLAG_CTX] = 433 448 { 434 { CNU }, 435 { CNU }, 436 { CNU }, 437 }; 438 #endif 439 440 #endif 449 { 161 }, 450 { 161 }, 451 { 161 }, 452 }; 453 #else 454 static const UChar INIT_DBBP_FLAG[3][DBBP_NUM_FLAG_CTX] = 455 { 456 { CNU }, 457 { CNU }, 458 { CNU }, 459 }; 460 #endif 461 #endif 462 463 #endif -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r884 r950 610 610 memset( m_apSegmentDCOffset[1] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[1] ) ); 611 611 #endif 612 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108 613 m_apDmmPredictor[0] = 0; 614 m_apDmmPredictor[1] = 0; 615 #endif 612 616 #endif 613 617 #if H_3D_DBBP … … 784 788 m_apSegmentDCOffset[1][ui] = 0; 785 789 #endif 790 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108 791 m_apDmmPredictor[0] = 0; 792 m_apDmmPredictor[1] = 0; 793 #endif 786 794 #endif 787 795 #if H_3D_DBBP … … 898 906 memset( m_apSegmentDCOffset[0], 0, sizeof(Pel) * m_uiNumPartition ); 899 907 memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition ); 908 #endif 909 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108 910 m_apDmmPredictor[0] = 0; 911 m_apDmmPredictor[1] = 0; 900 912 #endif 901 913 #endif … … 2352 2364 2353 2365 TComMv cDv = depthRefineFlag ? DvInfo.m_acDoNBDV : DvInfo.m_acNBDV; 2366 #if SEC_VER_DONBDV_H0103 2367 if( depthRefineFlag ) 2368 { 2369 cDv.setVer(0); 2370 } 2371 #endif 2354 2372 2355 2373 Int depthPosX = Clip3(0, iPictureWidth - iWidth, iBlkX + ((cDv.getHor()+2)>>2)); … … 2383 2401 UInt TComDataCU::getCtxAngleFlag( UInt uiAbsPartIdx ) 2384 2402 { 2403 #if LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135 2404 return 0; 2405 #else 2385 2406 TComDataCU* pcTempCU; 2386 2407 UInt uiTempPartIdx; … … 2396 2417 2397 2418 return uiCtx; 2419 #endif 2398 2420 } 2399 2421 #endif … … 3258 3280 * false: otherwise 3259 3281 */ 3282 #if ETRIKHU_CLEANUP_H0083 3283 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount) 3284 #else 3260 3285 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 3261 3286 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo ) 3287 #endif 3262 3288 { 3263 3289 if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() || pDInfo->m_aVIdxCan == -1) … … 3275 3301 } 3276 3302 3303 #if ETRIKHU_CLEANUP_H0083 3304 TComMvField mvVSP[2]; 3305 UChar dirVSP; 3306 #else 3277 3307 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 3308 #endif 3278 3309 3279 3310 Bool refViewAvailFlag = false; … … 3290 3321 refViewAvailFlag = true; 3291 3322 predFlag[iRefListIdX] = 1; 3323 #if ETRIKHU_CLEANUP_H0083 3324 mvVSP[0+iRefListIdX].setMvField( pDInfo->m_acNBDV, i ); 3325 #if H_3D_NBDV 3326 mvVSP[0+iRefListIdX].getMv().setIDVFlag (false); 3327 #endif 3328 #else 3292 3329 pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].setMvField( pDInfo->m_acNBDV, i ); 3293 3330 #if H_3D_NBDV 3294 3331 pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].getMv().setIDVFlag (false); 3295 3332 #endif 3296 } 3297 } 3298 } 3299 3333 #endif 3334 } 3335 } 3336 } 3337 3338 #if ETRIKHU_CLEANUP_H0083 3339 dirVSP = (predFlag[0] | (predFlag[1] << 1)); 3340 m_mergCands[MRG_VSP].setCand( mvVSP, dirVSP, true, false); 3341 #else 3300 3342 // Set values to be returned 3301 3343 abCandIsInter [iCount] = true; 3302 3344 puhInterDirNeighbours[iCount] = (predFlag[0] | (predFlag[1] << 1)); 3303 3345 vspFlag [iCount] = 1; 3346 #endif 3304 3347 3305 3348 if ( mrgCandIdx == iCount ) … … 3316 3359 3317 3360 #if H_3D_IV_MERGE 3361 #if ETRIKHU_CLEANUP_H0083 3362 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx ) 3363 #else 3318 3364 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv, 3319 3365 Int* ivCandRefIdx, Int iPosIvDC, Int* vspFlag, Int &iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo ) 3366 #endif 3320 3367 { 3321 3368 for(Int iLoop = 0; iLoop < 2; iLoop ++ ) … … 3325 3372 { 3326 3373 Int iFirDispCand = -1; 3374 #if ETRIKHU_CLEANUP_H0083 3375 TComMvField mvIvDcShift[2]; 3376 UChar dirIvDcShift; 3377 3378 if (xGetPosFirstAvailDmvCand(MRG_IVSHIFT, iFirDispCand)) 3379 #else 3327 3380 if (xGetPosFirstAvailDmvCand(iCount, pcMvFieldNeighbours, ivCandDir, iPosIvDC, vspFlag, iFirDispCand)) 3381 #endif 3328 3382 { 3329 3383 TComMv cMv; 3384 #if ETRIKHU_CLEANUP_H0083 3385 cMv = m_mergCands[iFirDispCand].m_cMvField[0].getMv(); 3386 #else 3330 3387 cMv = pcMvFieldNeighbours[(iFirDispCand<<1)].getMv(); 3388 #endif 3331 3389 cMv.setHor(cMv.getHor()+4); 3332 3390 if(m_pcSlice->getVPS()->getViewSynthesisPredFlag(m_pcSlice->getLayerIdInVps())) … … 3334 3392 cMv.setVer(0); 3335 3393 } 3394 #if !(NTT_BUG_FIX_TK54) 3336 3395 clipMv( cMv ); 3337 3396 #endif 3397 3398 #if ETRIKHU_CLEANUP_H0083 3399 dirIvDcShift = m_mergCands[iFirDispCand].m_uDir; 3400 mvIvDcShift[0].setMvField(cMv, m_mergCands[iFirDispCand].m_cMvField[0].getRefIdx() ); 3401 mvIvDcShift[1].setMvField(m_mergCands[iFirDispCand].m_cMvField[1].getMv(), m_mergCands[iFirDispCand].m_cMvField[1].getRefIdx() ); 3402 m_mergCands[MRG_IVSHIFT].setCand(mvIvDcShift, dirIvDcShift, false, false); 3403 #else 3338 3404 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 3339 3405 … … 3342 3408 pcMvFieldNeighbours [ iCount << 1 ].setMvField(cMv, pcMvFieldNeighbours[( iFirDispCand << 1)].getRefIdx() ); 3343 3409 pcMvFieldNeighbours [(iCount << 1) + 1 ].setMvField(pcMvFieldNeighbours[(iFirDispCand << 1) + 1].getMv(), pcMvFieldNeighbours[( iFirDispCand << 1) + 1].getRefIdx() ); 3410 #endif 3344 3411 3345 3412 if( mrgCandIdx == iCount ) … … 3372 3439 if( !iLoop && ivCandDir[0] > 0) 3373 3440 { 3441 #if ETRIKHU_CLEANUP_H0083 3442 if(tmpDir == m_mergCands[MRG_IVMC].m_uDir && m_mergCands[MRG_IVMC].m_cMvField[0]==tmpMV[0] && m_mergCands[MRG_IVMC].m_cMvField[1]==tmpMV[1]) 3443 #else 3374 3444 if(tmpDir == puhInterDirNeighbours[0] && pcMvFieldNeighbours[0]==tmpMV[0] && pcMvFieldNeighbours[1]==tmpMV[1]) 3445 #endif 3375 3446 { 3376 3447 bRemove = true; … … 3379 3450 if(!bRemove) 3380 3451 { 3452 #if ETRIKHU_CLEANUP_H0083 3453 #if H_3D_NBDV 3454 if(iLoop) // For IvMcShift candidate 3455 { 3456 tmpMV[0].getMv().setIDVFlag (false); 3457 tmpMV[1].getMv().setIDVFlag (false); 3458 } 3459 #endif 3460 m_mergCands[MRG_IVSHIFT].setCand(tmpMV, tmpDir, false, false); 3461 #else 3381 3462 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 3382 3463 … … 3398 3479 } 3399 3480 #endif 3481 #endif 3400 3482 if( mrgCandIdx == iCount ) 3401 3483 { … … 3410 3492 } 3411 3493 3494 #if ETRIKHU_CLEANUP_H0083 3495 inline Bool TComDataCU::xGetPosFirstAvailDmvCand(Int iCount, Int& posFirstAvailDmvCand ) 3496 { 3497 for ( Int currListPos = 0; currListPos < iCount; currListPos++ ) 3498 { 3499 if ( !m_mergCands[currListPos].m_bAvailable || ( currListPos == MRG_IVMC ) || ( currListPos == MRG_IVDC ) || ( m_mergCands[currListPos].m_iVspFlag != 0 )) 3500 { 3501 continue; 3502 } 3503 else if((m_mergCands[currListPos].m_bAvailable) && (m_mergCands[currListPos].m_cMvField[0].getRefIdx() != -1 ) && (getSlice()->getViewIndex() != getSlice()->getRefPic(RefPicList(0), m_mergCands[currListPos].m_cMvField[0].getRefIdx())->getViewIndex())) 3504 { 3505 posFirstAvailDmvCand = currListPos; 3506 return true; 3507 } 3508 } 3509 return false; 3510 } 3511 #else 3412 3512 inline Bool TComDataCU::xGetPosFirstAvailDmvCand( Int iCount, TComMvField* pcMvFieldNeighbours, Int* ivCandDir, Int posIvDC, Int* vspFlag, Int& posFirstAvailDmvCand ) 3413 3513 { … … 3427 3527 return false; 3428 3528 } 3529 #endif 3429 3530 3430 3531 #endif 3431 3532 3432 3533 #if H_3D 3534 #if ETRIKHU_CLEANUP_H0083 3535 3536 Void TComDataCU::buildMCL(TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours 3537 #if H_3D_VSP 3538 , Int* vspFlag 3539 #endif 3540 #if H_3D_SPIVMP 3541 , Bool* pbSPIVMPFlag 3542 #endif 3543 , Int& numValidMergeCand 3544 ) 3545 { 3546 if (!( getSlice()->getIsDepth() || getSlice()->getViewIndex()>0)) // for only dependent texture 3547 { 3548 return; 3549 } 3550 3551 Int iCount = 0; 3552 TComMv cZeroMv; 3553 3554 // init temporal list 3555 TComMvField extMergeCandList[MRG_MAX_NUM_CANDS_MEM << 1]; 3556 UChar uhInterDirNeighboursExt[MRG_MAX_NUM_CANDS_MEM]; 3557 for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ++ui ) 3558 { 3559 uhInterDirNeighboursExt[ui] = puhInterDirNeighbours[ui]; 3560 extMergeCandList[ui<<1].setMvField(cZeroMv, NOT_VALID); 3561 extMergeCandList[(ui<<1)+1].setMvField(cZeroMv, NOT_VALID); 3562 vspFlag[ui] = 0; 3563 } 3564 3565 // add candidates to temporal list 3566 // insert MPI ... IvShift candidate 3567 for (Int i=0; i<=MRG_IVSHIFT; i++) 3568 { 3569 if (m_mergCands[i].m_bAvailable) 3570 { 3571 m_mergCands[i].getCand(iCount, extMergeCandList, uhInterDirNeighboursExt, vspFlag, pbSPIVMPFlag); 3572 iCount++; 3573 if (iCount >= getSlice()->getMaxNumMergeCand()) 3574 break; 3575 } 3576 } 3577 3578 // insert remaining base candidates 3579 while (iCount < getSlice()->getMaxNumMergeCand() && m_baseListidc < getSlice()->getMaxNumMergeCand()) 3580 { 3581 uhInterDirNeighboursExt[iCount] = puhInterDirNeighbours[m_baseListidc]; 3582 extMergeCandList[iCount<<1].setMvField(pcMvFieldNeighbours[m_baseListidc<<1].getMv(), pcMvFieldNeighbours[m_baseListidc<<1].getRefIdx()); 3583 if ( getSlice()->isInterB() ) 3584 { 3585 extMergeCandList[(iCount<<1)+1].setMvField(pcMvFieldNeighbours[(m_baseListidc<<1)+1].getMv(), pcMvFieldNeighbours[(m_baseListidc<<1)+1].getRefIdx()); 3586 } 3587 m_baseListidc++; 3588 iCount++; 3589 } 3590 3591 for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ui++ ) 3592 { 3593 puhInterDirNeighbours[ui] = 0; 3594 pcMvFieldNeighbours[ui<<1].setMvField(cZeroMv, NOT_VALID); 3595 pcMvFieldNeighbours[(ui<<1)+1].setMvField(cZeroMv, NOT_VALID); 3596 } 3597 // copy extMergeCandList to output 3598 for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ui++ ) 3599 { 3600 puhInterDirNeighbours[ui] = uhInterDirNeighboursExt[ui]; 3601 pcMvFieldNeighbours[ui<<1].setMvField(extMergeCandList[ui<<1].getMv(), extMergeCandList[ui<<1].getRefIdx()); 3602 if ( getSlice()->isInterB() ) 3603 pcMvFieldNeighbours[(ui<<1)+1].setMvField(extMergeCandList[(ui<<1)+1].getMv(), extMergeCandList[(ui<<1)+1].getRefIdx()); 3604 } 3605 numValidMergeCand = iCount; 3606 assert(iCount == getSlice()->getMaxNumMergeCand()); 3607 } 3608 #else 3433 3609 Void TComDataCU::rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo* inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV) 3434 3610 { … … 3451 3627 return; 3452 3628 } 3629 #endif 3453 3630 3454 3631 /** Constructs a list of merging candidates … … 3824 4001 #endif 3825 4002 #if H_3D_VSP 4003 #if !ETRIKHU_CLEANUP_H0083 3826 4004 , Int* vspFlag 4005 #endif 3827 4006 , InheritedVSPDisInfo* inheritedVSPDisInfo 3828 4007 #endif 3829 4008 #if H_3D_SPIVMP 4009 #if ETRIKHU_CLEANUP_H0083 4010 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 4011 #else 3830 4012 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP 4013 #endif 3831 4014 #endif 3832 4015 , Int& numValidMergeCand, Int mrgCandIdx … … 3839 4022 //////////////////////////// 3840 4023 TComMv cZeroMv; 4024 #if !ETRIKHU_CLEANUP_H0083 3841 4025 Bool abCandIsInter[ MRG_MAX_NUM_CANDS_MEM ]; 4026 #endif 3842 4027 #else 3843 4028 Bool abCandIsInter[ MRG_MAX_NUM_CANDS ]; … … 3905 4090 #if H_3D_DBBP 3906 4091 Bool bDBBPFlag = getDBBPFlag(uiAbsPartIdx); 4092 #if MTK_DIS_SPBIP8X4_H0205 4093 assert(bDBBPFlag == getDBBPFlag(0)); 4094 #endif 3907 4095 #endif 3908 4096 3909 4097 #if H_3D 4098 #if !ETRIKHU_CLEANUP_H0083 3910 4099 Int iPosLeftAbove[2] = {-1, -1}; 3911 4100 … … 3914 4103 Int numA1B1B0 = 0; 3915 4104 Int numA0B2 = 0; 3916 4105 #endif 3917 4106 #if H_3D_NBDV 3918 4107 for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++) … … 3923 4112 #endif 3924 4113 4114 4115 #if ETRIKHU_CLEANUP_H0083 4116 4117 4118 // Clean version for MCL construction align with WD 4119 // init mergCands list 4120 for (Int i = 0; i<MRG_IVSHIFT+1; i++) 4121 { 4122 m_mergCands[i].init(); 4123 } 4124 4125 m_baseListidc = 0; 4126 4127 //left 4128 UInt uiLeftPartIdx = 0; 4129 TComDataCU* pcCULeft = 0; 4130 pcCULeft = getPULeft( uiLeftPartIdx, uiPartIdxLB ); 4131 4132 if (getAvailableFlagA1()) 4133 { 4134 m_mergCands[MRG_A1].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 4135 #if H_3D_VSP 4136 , 4137 (pcCULeft->getVSPFlag(uiLeftPartIdx) != 0 4138 #if H_3D_IC 4139 && !bICFlag 4140 #endif 4141 #if H_3D_ARP 4142 && !bARPFlag 4143 #endif 4144 #if RWTH_DBBP_NO_SPU_H0057 4145 && !bDBBPFlag 4146 #endif 4147 ) 4148 #endif 4149 , false 4150 ); 4151 m_baseListidc++; 4152 } 4153 4154 // above 4155 UInt uiAbovePartIdx = 0; 4156 TComDataCU* pcCUAbove = 0; 4157 pcCUAbove = getPUAbove( uiAbovePartIdx, uiPartIdxRT ); 4158 4159 if (getAvailableFlagB1()) 4160 { 4161 m_mergCands[MRG_B1].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 4162 #if H_3D_VSP 4163 , 4164 ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) != 0) 4165 #if H_3D_IC 4166 && !bICFlag 4167 #endif 4168 #if H_3D_ARP 4169 && !bARPFlag 4170 #endif 4171 #if RWTH_DBBP_NO_SPU_H0057 4172 && !bDBBPFlag 4173 #endif 4174 ) 4175 #endif 4176 , false 4177 ); 4178 m_baseListidc++; 4179 } 4180 4181 // above right 4182 UInt uiAboveRightPartIdx = 0; 4183 TComDataCU* pcCUAboveRight = 0; 4184 pcCUAboveRight = getPUAboveRight( uiAboveRightPartIdx, uiPartIdxRT ); 4185 4186 if (getAvailableFlagB0()) 4187 { 4188 m_mergCands[MRG_B0].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 4189 #if H_3D_VSP 4190 , 4191 ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) != 0) 4192 #if H_3D_IC 4193 && !bICFlag 4194 #endif 4195 #if H_3D_ARP 4196 && !bARPFlag 4197 #endif 4198 #if RWTH_DBBP_NO_SPU_H0057 4199 && !bDBBPFlag 4200 #endif 4201 ) 4202 #endif 4203 , false 4204 ); 4205 m_baseListidc++; 4206 } 4207 4208 // left bottom 4209 UInt uiLeftBottomPartIdx = 0; 4210 TComDataCU* pcCULeftBottom = getPUBelowLeft( uiLeftBottomPartIdx, uiPartIdxLB ); 4211 4212 if (getAvailableFlagA0()) 4213 { 4214 m_mergCands[MRG_A0].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 4215 #if H_3D_VSP 4216 , 4217 (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) != 0 4218 #if H_3D_IC 4219 && !bICFlag 4220 #endif 4221 #if H_3D_ARP 4222 && !bARPFlag 4223 #endif 4224 #if RWTH_DBBP_NO_SPU_H0057 4225 && !bDBBPFlag 4226 #endif 4227 ) 4228 #endif 4229 , false 4230 ); 4231 m_baseListidc++; 4232 } 4233 4234 // above left 4235 UInt uiAboveLeftPartIdx = 0; 4236 TComDataCU* pcCUAboveLeft = 0; 4237 pcCUAboveLeft = getPUAboveLeft( uiAboveLeftPartIdx, uiAbsPartAddr ); 4238 4239 if (getAvailableFlagB2()) 4240 { 4241 m_mergCands[MRG_B2].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 4242 #if H_3D_VSP 4243 , 4244 ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) != 0) 4245 #if H_3D_IC 4246 && !bICFlag 4247 #endif 4248 #if H_3D_ARP 4249 && !bARPFlag 4250 #endif 4251 #if RWTH_DBBP_NO_SPU_H0057 4252 && !bDBBPFlag 4253 #endif 4254 ) 4255 #endif 4256 , false 4257 ); 4258 m_baseListidc++; 4259 } 4260 4261 4262 #if !ETRIKHU_BUGFIX_H0083 4263 Bool A1_was_available = m_mergCands[MRG_A1].m_bAvailable; 4264 Bool B1_was_available = m_mergCands[MRG_B1].m_bAvailable; 4265 #endif 4266 4267 4268 #else 3925 4269 //left 3926 4270 UInt uiLeftPartIdx = 0; … … 3938 4282 && !bARPFlag 3939 4283 #endif 4284 #if RWTH_DBBP_NO_SPU_H0057 4285 && !bDBBPFlag 4286 #endif 3940 4287 ) 3941 4288 { … … 3961 4308 && !bARPFlag 3962 4309 #endif 4310 #if RWTH_DBBP_NO_SPU_H0057 4311 && !bDBBPFlag 4312 #endif 3963 4313 ) 3964 4314 { … … 3984 4334 && !bARPFlag 3985 4335 #endif 4336 #if RWTH_DBBP_NO_SPU_H0057 4337 && !bDBBPFlag 4338 #endif 3986 4339 ) 3987 4340 { … … 4004 4357 #if H_3D_ARP 4005 4358 && !bARPFlag 4359 #endif 4360 #if RWTH_DBBP_NO_SPU_H0057 4361 && !bDBBPFlag 4006 4362 #endif 4007 4363 ) … … 4028 4384 && !bARPFlag 4029 4385 #endif 4386 #if RWTH_DBBP_NO_SPU_H0057 4387 && !bDBBPFlag 4388 #endif 4030 4389 ) 4031 4390 { … … 4038 4397 4039 4398 iCountHEVC = numValidMergeCand; 4399 #endif 4040 4400 #endif 4041 4401 … … 4047 4407 ///////////////////////////////////////////// 4048 4408 4409 #if SHARP_SIMPLE_MERGE_H0062 4410 bMPIFlag &= (nPSW + nPSH > 12); 4411 #endif 4049 4412 if( bMPIFlag) 4050 4413 { … … 4052 4415 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); 4053 4416 tmpDir = 0; 4417 4418 #if ETRIKHU_CLEANUP_H0083 4419 Bool bSPIVMPFlag = false; 4420 #endif 4054 4421 4055 4422 TComPic * pcTexPic = m_pcSlice->getTexturePic(); … … 4090 4457 Int iTexPosX, iTexPosY; 4091 4458 const TComMv cMvRounding( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 4459 #if MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 4460 4461 Int iCenterPosX = iCurrPosX + ( ( iWidth / iPUWidth ) >> 1 ) * iPUWidth + ( iPUWidth >> 1 ); 4462 Int iCenterPosY = iCurrPosY + ( ( iHeight / iPUHeight ) >> 1 ) * iPUHeight + (iPUHeight >> 1); 4463 Int iTexCenterCUAddr, iTexCenterAbsPartIdx; 4464 4465 if(iWidth == iPUWidth && iHeight == iPUHeight) 4466 { 4467 iCenterPosX = iCurrPosX + (iWidth >> 1); 4468 iCenterPosY = iCurrPosY + (iHeight >> 1); 4469 } 4470 4471 // derivation of center motion parameters from the collocated texture CU 4472 4473 pcTexRec->getCUAddrAndPartIdx( iCenterPosX , iCenterPosY , iTexCenterCUAddr, iTexCenterAbsPartIdx ); 4474 TComDataCU* pcDefaultCU = pcTexPic->getCU( iTexCenterCUAddr ); 4475 4476 if( pcDefaultCU->getPredictionMode( iTexCenterAbsPartIdx ) != MODE_INTRA ) 4477 { 4478 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 4479 { 4480 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 4481 4482 TComMvField cDefaultMvField; 4483 pcDefaultCU->getMvField( pcDefaultCU, iTexCenterAbsPartIdx, eCurrRefPicList, cDefaultMvField ); 4484 Int iDefaultRefIdx = cDefaultMvField.getRefIdx(); 4485 if (iDefaultRefIdx >= 0) 4486 { 4487 Int iDefaultRefPOC = pcDefaultCU->getSlice()->getRefPOC(eCurrRefPicList, iDefaultRefIdx); 4488 for (Int iRefPicList = 0; iRefPicList < m_pcSlice->getNumRefIdx( eCurrRefPicList ); iRefPicList++) 4489 { 4490 if (iDefaultRefPOC == m_pcSlice->getRefPOC(eCurrRefPicList, iRefPicList)) 4491 { 4492 #if ETRIKHU_CLEANUP_H0083 4493 bSPIVMPFlag = true; 4494 #else 4495 pbSPIVMPFlag[iCount] = true; 4496 #endif 4497 TComMv cMv = cDefaultMvField.getMv() + cMvRounding; 4498 cMv >>= 2; 4499 clipMv( cMv ); 4500 cMvFieldSaved[eCurrRefPicList].setMvField(cMv, iRefPicList) ; 4501 break; 4502 } 4503 } 4504 } 4505 } 4506 } 4507 #if ETRIKHU_CLEANUP_H0083 4508 if ( bSPIVMPFlag == true ) 4509 #else 4510 if ( pbSPIVMPFlag[iCount] == true ) 4511 #endif 4512 { 4513 iInterDirSaved = (cMvFieldSaved[0].getRefIdx()!=-1 ? 1: 0) + (cMvFieldSaved[1].getRefIdx()!=-1 ? 2: 0); 4514 tmpDir = iInterDirSaved; 4515 tmpMV[0] = cMvFieldSaved[0]; 4516 tmpMV[1] = cMvFieldSaved[1]; 4517 } 4518 4519 if ( iInterDirSaved != 0 ) 4520 { 4521 #endif 4092 4522 for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iPUHeight) 4093 4523 { … … 4110 4540 { 4111 4541 TComMv cMv = cTexMvField.getMv() + cMvRounding; 4112 cMv >>=2; 4542 cMv >>=2; 4543 #if !(NTT_BUG_FIX_TK54) 4113 4544 this->clipMv( cMv ); 4545 #endif 4114 4546 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iValidDepRef); 4115 4547 } … … 4126 4558 } 4127 4559 } 4560 #if MTK_DIS_SPBIP8X4_H0205 4561 if (iPUHeight + iPUWidth == 12) 4562 { 4563 if (puhInterDirSP[iPartition] == 3) 4564 { 4565 puhInterDirSP[iPartition] = 1; 4566 pcMvFieldSP[2*iPartition + 1].setMvField(TComMv(0,0), -1); 4567 } 4568 } 4569 #endif 4570 #if !MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 4128 4571 else 4129 4572 { 4130 4573 if (iInterDirSaved ==0) 4131 4574 { 4575 #if ETRIKHU_CLEANUP_H0083 4576 bSPIVMPFlag = true; 4577 #else 4132 4578 pbSPIVMPFlag[iCount] = true; 4579 #endif 4133 4580 tmpDir = puhInterDirSP[iPartition]; 4134 4581 tmpMV[0] = pcMvFieldSP[2*iPartition]; … … 4149 4596 cMvFieldSaved[1] = pcMvFieldSP[2*iPartition + 1]; 4150 4597 } 4598 #endif 4151 4599 iPartition ++; 4152 4600 } 4153 4601 } 4602 #if MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 4603 } 4604 #endif 4154 4605 #if H_3D_FCO 4155 4606 } … … 4158 4609 { 4159 4610 Int iCnloop = 0; 4611 #if ETRIKHU_CLEANUP_H0083 4612 for(iCnloop = 0; iCnloop < 2; iCnloop ++) 4613 { 4614 if ( !m_mergCands[MRG_A1+iCnloop].m_bAvailable ) // prunning to A1, B1 4615 { 4616 continue; 4617 } 4618 if (tmpDir == m_mergCands[MRG_A1+iCnloop].m_uDir && tmpMV[0]==m_mergCands[MRG_A1+iCnloop].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_A1+iCnloop].m_cMvField[1]) 4619 { 4620 m_mergCands[MRG_A1+iCnloop].m_bAvailable = false; 4621 break; 4622 } 4623 } 4624 m_mergCands[MRG_T].setCand( tmpMV, tmpDir, false, bSPIVMPFlag); 4625 4626 #else 4160 4627 Bool bRemoveSpa = false; //pruning 4161 4628 … … 4217 4684 4218 4685 puhInterDirNeighbours[iCount] = tmpDir; 4219 4686 #endif 4220 4687 if ( mrgCandIdx == iCount ) 4221 4688 { … … 4261 4728 cMVField.getMv() += cAdd; 4262 4729 cMVField.getMv() >>= 2; 4730 #if !(NTT_BUG_FIX_TK54) 4263 4731 clipMv( cMVField.getMv() ); 4732 #endif 4264 4733 tmpMV[ 0 ].setMvField( cMVField.getMv(), iValidDepRef ); 4265 4734 tmpDir = 1; … … 4284 4753 cMVField.getMv() += cAdd; 4285 4754 cMVField.getMv() >>= 2; 4755 #if !(NTT_BUG_FIX_TK54) 4286 4756 clipMv( cMVField.getMv() ); 4757 #endif 4287 4758 tmpMV[ 1 ].setMvField( cMVField.getMv(), iValidDepRef ); 4288 4759 tmpDir = 2; … … 4292 4763 if( tmpDir != 0 ) 4293 4764 { 4765 #if !ETRIKHU_CLEANUP_H0083 4294 4766 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV); 4767 #endif 4295 4768 m_ucDDTmpDepth = m_pcSlice->getDepthFromDV( iDV, iViewIdx ); 4296 4769 m_iUseDDDCandIdx = iCount; 4297 4770 4771 #if ETRIKHU_CLEANUP_H0083 4772 m_mergCands[MRG_D].setCand( tmpMV, tmpDir, false, false); 4773 if ( mrgCandIdx == iCount ) 4774 { 4775 return; 4776 } 4777 iCount ++; 4778 #else 4298 4779 if( tmpDir == 1 ) 4299 4780 { … … 4324 4805 iPosLeftAbove[ 1 ] = iCount + iLeftAboveAvail; 4325 4806 } 4807 #endif 4326 4808 } 4327 4809 } … … 4332 4814 ///////////////////////////////////////////////////////////////// 4333 4815 4816 #if !ETRIKHU_CLEANUP_H0083 4334 4817 Int posIvDC = -1; 4818 #endif 4335 4819 4336 4820 // { IvMCL0, IvMCL1, IvDCL0, IvDCL1, IvMCL0Shift, IvMCL1Shift, IvDCL0Shift, IvDCL1Shift }; … … 4344 4828 Bool ivMvPredFlag = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() ); 4345 4829 4830 #if SHARP_SIMPLE_MERGE_H0062 4831 ivMvPredFlag &= (nPSW + nPSH > 12); 4832 #endif 4346 4833 if ( ivMvPredFlag && cDisInfo.m_aVIdxCan!=-1) 4347 4834 { 4835 #if SEC_ADAPT_DISABLE_IVMP 4836 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP, bICFlag ); 4837 #else 4348 4838 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP ); 4839 #endif 4349 4840 } 4350 4841 … … 4372 4863 4373 4864 Bool bRemoveSpa = false; //pruning 4865 #if !ETRIKHU_CLEANUP_H0083 4374 4866 Bool bIvMC = false; 4375 4867 Int iCnloop=0; 4868 #endif 4376 4869 4377 4870 if (!bIsDepth) … … 4379 4872 for(Int i = 0; i < 2; i ++) 4380 4873 { 4874 #if ETRIKHU_CLEANUP_H0083 4875 if ( !m_mergCands[MRG_A1 + i].m_bAvailable ) // prunning to A1, B1 4876 { 4877 continue; 4878 } 4879 if (ivCandDir[0] == m_mergCands[MRG_A1+i].m_uDir && tmpMV[0]==m_mergCands[MRG_A1+i].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_A1+i].m_cMvField[1]) 4880 { 4881 m_mergCands[MRG_A1+i].m_bAvailable = false; 4882 break; 4883 } 4884 #else 4381 4885 iCnloop = iPosLeftAbove[i]; 4382 4886 if ( iCnloop == -1 ) … … 4389 4893 break; 4390 4894 } 4895 #endif 4391 4896 } 4392 4897 } 4393 4898 if (bIsDepth) 4394 4899 { 4900 #if ETRIKHU_CLEANUP_H0083 4901 if (m_mergCands[MRG_T].m_bAvailable && ivCandDir[0] == m_mergCands[MRG_T].m_uDir && tmpMV[0]==m_mergCands[MRG_T].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_T].m_cMvField[1]) 4902 { 4903 bRemoveSpa = true; 4904 } 4905 #else 4395 4906 iCnloop = iCount-1; 4396 4907 for(; iCnloop >= 0; iCnloop --) … … 4408 4919 } 4409 4920 } 4921 #endif 4410 4922 } 4411 4923 4412 4924 if (!bRemoveSpa) 4413 4925 { 4926 #if !ETRIKHU_CLEANUP_H0083 4414 4927 bIvMC = true; 4415 4928 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); … … 4464 4977 if (bIvMC) 4465 4978 { 4979 #endif 4980 #if ETRIKHU_CLEANUP_H0083 4981 Bool SPIVMPFlag = false; 4982 #if MTK_DIS_SPBIP8X4_H0205 4983 if(!m_pcSlice->getIsDepth()) 4984 #else 4985 if(!m_pcSlice->getIsDepth() && getPartitionSize(0) == SIZE_2Nx2N ) 4986 #endif 4987 { 4988 SPIVMPFlag = true; 4989 } 4990 #if H_3D_DBBP 4991 SPIVMPFlag &= !bDBBPFlag; 4992 #endif 4993 #else 4466 4994 if(!m_pcSlice->getIsDepth() && getPartitionSize(0) == SIZE_2Nx2N ) 4467 4995 { … … 4471 4999 pbSPIVMPFlag[iCount] &= !bDBBPFlag; 4472 5000 #endif 5001 #endif 5002 #if ETRIKHU_CLEANUP_H0083 5003 m_mergCands[MRG_IVMC].setCand( tmpMV, ivCandDir[0], false, SPIVMPFlag); 5004 #else 4473 5005 if( ( ivCandDir[0] & 1 ) == 1 ) 4474 5006 { … … 4481 5013 4482 5014 puhInterDirNeighbours[ iCount ] = ivCandDir[0]; 5015 #endif 4483 5016 4484 5017 if ( mrgCandIdx == iCount ) … … 4498 5031 4499 5032 #if H_3D 5033 #if ETRIKHU_CLEANUP_H0083 5034 iCount += m_mergCands[MRG_A1].m_bAvailable + m_mergCands[MRG_B1].m_bAvailable + m_mergCands[MRG_B0].m_bAvailable; 5035 #else 4500 5036 iCount += numA1B1B0; 5037 #endif 4501 5038 #else 4502 5039 //left … … 4627 5164 for(Int i = 0; i < 2; i ++) 4628 5165 { 5166 #if ETRIKHU_CLEANUP_H0083 5167 if ( !m_mergCands[MRG_A1+i].m_bAvailable ) 5168 #else 4629 5169 Int iCnloop = iPosLeftAbove[i]; 4630 5170 if ( iCnloop == -1 ) 5171 #endif 4631 5172 { 4632 5173 continue; 4633 5174 } 5175 #if ETRIKHU_CLEANUP_H0083 5176 #if ETRIKHU_BUGFIX_H0083 5177 if (ivCandDir[1] == m_mergCands[MRG_A1+i].m_uDir && tmpMV[0]==m_mergCands[MRG_A1+i].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_A1+i].m_cMvField[1]) 5178 #else 5179 Int offset = 0; 5180 offset += A1_was_available; 5181 offset += B1_was_available; 5182 offset += m_mergCands[MRG_B0].m_bAvailable; 5183 if (puhInterDirNeighbours[offset] == m_mergCands[MRG_A1+i].m_uDir && pcMvFieldNeighbours[(offset<<1)]==m_mergCands[MRG_A1+i].m_cMvField[0] && pcMvFieldNeighbours[(offset<<1)+1]==m_mergCands[MRG_A1+i].m_cMvField[1]) 5184 #endif 5185 #else 4634 5186 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 5187 #endif 4635 5188 { 4636 5189 bRemoveSpa = true; … … 4640 5193 if(!bRemoveSpa) 4641 5194 { 5195 #if ETRIKHU_CLEANUP_H0083 5196 #if H_3D_NBDV 5197 tmpMV[0].getMv().setIDVFlag (false); 5198 tmpMV[1].getMv().setIDVFlag (false); 5199 #endif 5200 m_mergCands[MRG_IVDC].setCand( tmpMV, ivCandDir[1], false, false); 5201 #else 4642 5202 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 4643 5203 puhInterDirNeighbours[ iCount ] = ivCandDir[1]; … … 4655 5215 #endif 4656 5216 posIvDC = iCount; 5217 #endif 4657 5218 if ( mrgCandIdx == iCount ) 4658 5219 return; … … 4682 5243 !bARPFlag && 4683 5244 #endif 5245 #if SHARP_SIMPLE_MERGE_H0062 5246 (nPSW + nPSH > 12) && 5247 #endif 5248 #if RWTH_DBBP_NO_SPU_H0057 5249 !bDBBPFlag && 5250 #endif 5251 #if ETRIKHU_CLEANUP_H0083 5252 xAddVspCand( mrgCandIdx, &cDisInfo, iCount ) ) 5253 #else 4684 5254 xAddVspCand( mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, iCount3DV, inheritedVSPDisInfo ) ) 5255 #endif 4685 5256 { 4686 5257 return; … … 4698 5269 4699 5270 #if H_3D 5271 #if ETRIKHU_CLEANUP_H0083 5272 iCount += m_mergCands[MRG_A0].m_bAvailable + m_mergCands[MRG_B2].m_bAvailable; 5273 #else 4700 5274 iCount += numA0B2; 5275 #endif 4701 5276 #else 4702 5277 //left bottom … … 4772 5347 if( ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() ) 4773 5348 { 5349 #if ETRIKHU_CLEANUP_H0083 5350 if(xAddIvMRGCand( mrgCandIdx, iCount, ivCandDir, ivCandMv, ivCandRefIdx ) ) 5351 #else 4774 5352 if(xAddIvMRGCand( mrgCandIdx, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag, iCount3DV, inheritedVSPDisInfo ) ) 5353 #endif 4775 5354 { 4776 5355 return; … … 4785 5364 4786 5365 #if H_3D 5366 #if !ETRIKHU_CLEANUP_H0083 4787 5367 if (iCountHEVC + iCount3DV > getSlice()->getMaxNumMergeCand()) 4788 5368 { … … 4794 5374 } 4795 5375 numValidMergeCand = iCount; 5376 #endif 4796 5377 #else 4797 5378 if ( getSlice()->getEnableTMVPFlag()) … … 6227 6808 if( bCheck ) 6228 6809 { 6810 #if !(NTT_BUG_FIX_TK54) 6229 6811 clipMv(cColMv); 6812 #endif 6230 6813 pDInfo->m_acNBDV = cColMv; 6231 6814 pDInfo->m_aVIdxCan = iTargetViewIdx; … … 6296 6879 { 6297 6880 TComMv cDispVec = cIDVInfo.m_acMvCand[iList][ curPos ]; 6881 #if !(NTT_BUG_FIX_TK54) 6298 6882 clipMv( cDispVec ); 6883 #endif 6299 6884 pDInfo->m_acNBDV = cDispVec; 6300 6885 pDInfo->m_aVIdxCan = cIDVInfo.m_aVIdxCan[iList][ curPos ]; … … 6426 7011 Pel iDisp = getMcpFromDM( pcBaseViewDepthPicYuv, cMvPred, iBlkX, iBlkY, iWidth, iHeight, aiShiftLUT ); 6427 7012 cMvPred->setHor( iDisp ); 7013 #if !(NTT_BUG_FIX_TK54) 6428 7014 clipMv(*cMvPred); 7015 #endif 6429 7016 } 6430 7017 } … … 6452 7039 if (refViewIdx != m_pcSlice->getViewIndex()) 6453 7040 { 7041 #if !(NTT_BUG_FIX_TK54) 6454 7042 clipMv(cMvPred); 7043 #endif 6455 7044 pNbDvInfo->m_acNBDV = cMvPred; 6456 7045 pNbDvInfo->m_aVIdxCan = refViewIdx; … … 6635 7224 6636 7225 TComMv cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 7226 #if SEC_VER_DONBDV_H0103 7227 if( depthRefineFlag ) 7228 { 7229 cDv.setVer(0); 7230 } 7231 #endif 6637 7232 6638 7233 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); … … 6743 7338 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 6744 7339 #endif 7340 #if SEC_ADAPT_DISABLE_IVMP 7341 , Bool bICFlag 7342 #endif 6745 7343 ) 6746 7344 { … … 6771 7369 6772 7370 TComMv cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 7371 #if SEC_VER_DONBDV_H0103 7372 if( depthRefineFlag ) 7373 { 7374 cDv.setVer(0); 7375 } 7376 #endif 6773 7377 6774 7378 Bool abPdmAvailable[8] = {false, false, false, false, false, false, false, false}; … … 6778 7382 pacPdmMv[i].setIDVFlag (false); 6779 7383 } 7384 #endif 7385 7386 #if SEC_ADAPT_DISABLE_IVMP 7387 if(!bICFlag) 7388 { 6780 7389 #endif 6781 7390 … … 6786 7395 if(!m_pcSlice->getIsDepth()) 6787 7396 { 7397 #if MTK_DIS_SPBIP8X4_H0205 7398 if (!getDBBPFlag(0)) 7399 #else 6788 7400 if( getPartitionSize(0) == SIZE_2Nx2N ) 7401 #endif 6789 7402 { 6790 7403 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; … … 6859 7472 #endif 6860 7473 #endif 7474 #if !(NTT_BUG_FIX_TK54) 6861 7475 clipMv( cMv ); 7476 #endif 6862 7477 paiPdmRefIdx [ uiCurrRefListId ] = iPdmRefIdx; 6863 7478 pacPdmMv [ uiCurrRefListId ] = cMv; … … 6917 7532 cMv.setIDVVId (iViewIndex); 6918 7533 } 6919 7534 7535 #if !(NTT_BUG_FIX_TK54) 6920 7536 clipMv( cMv ); 7537 #endif 6921 7538 bLoop_stop = true; 6922 7539 … … 6939 7556 6940 7557 } 7558 #if MTK_DIS_SPBIP8X4_H0205 7559 if (iSPHeight + iSPWidth == 12) 7560 { 7561 if (puhInterDirSP[iPartition] == 3) 7562 { 7563 puhInterDirSP[iPartition] = 1; 7564 pcMvFieldSP[2*iPartition + 1].setMvField(TComMv(0,0), -1); 7565 } 7566 } 7567 #endif 6941 7568 iPartition ++; 6942 7569 } … … 6960 7587 iCurrPosY += ( iHeight >> 1 ); 6961 7588 } 7589 #if MTK_DIS_SPBIP8X4_H0205 7590 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7591 #else 6962 7592 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getPartitionSize(uiPartAddr) != SIZE_2Nx2N) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7593 #endif 6963 7594 #else 6964 7595 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) … … 7018 7649 #endif 7019 7650 #endif 7651 #if !(NTT_BUG_FIX_TK54) 7020 7652 clipMv( cMv ); 7653 #endif 7021 7654 paiPdmRefIdx [ (uiCurrRefListId + (iLoopCan<<2)) ] = iPdmRefIdx; 7022 7655 pacPdmMv [ (uiCurrRefListId + (iLoopCan<<2)) ] = cMv; … … 7032 7665 } 7033 7666 #if H_3D_SPIVMP 7667 #if H_3D_FIX_DBBP_IVMP 7668 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7669 #else 7034 7670 for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7671 #endif 7035 7672 #else 7036 7673 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) … … 7040 7677 } 7041 7678 7679 #if SEC_ADAPT_DISABLE_IVMP 7680 } 7681 #endif 7042 7682 7043 7683 //////////////////////////////// … … 7071 7711 #endif 7072 7712 cMv.setVer( 0 ); 7713 #if !(NTT_BUG_FIX_TK54) 7073 7714 clipMv( cMv ); 7715 #endif 7074 7716 pacPdmMv [iRefListId + 2 + (iLoopCan<<2)] = cMv; 7075 7717 } -
trunk/source/Lib/TLibCommon/TComDataCU.h
r884 r950 70 70 Bool abMergeFlag[2]; // for two segments 71 71 UChar auhMergeIndex[2]; // for two segments 72 #if !RWTH_DBBP_NO_SPU_H0057 72 73 Char ahVSPFlag[2]; // for two segments 73 74 DisInfo acDvInfo[2]; // for two segments 75 #endif 74 76 75 77 PartSize eVirtualPartSize; … … 193 195 Bool* m_pbSDCFlag; 194 196 Pel* m_apSegmentDCOffset[2]; 197 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108 198 Pel m_apDmmPredictor[2]; 199 #endif 195 200 #endif 196 201 #endif … … 233 238 #endif 234 239 240 #if ETRIKHU_CLEANUP_H0083 241 TComMotionCand m_mergCands[MRG_IVSHIFT+1]; 242 Int m_baseListidc; 243 #endif 244 235 245 protected: 236 246 … … 239 249 Bool xAddMVPCandOrder ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); 240 250 #if H_3D_VSP 251 #if ETRIKHU_CLEANUP_H0083 252 Bool xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount); 253 #else 241 254 Bool xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 242 255 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo); 243 256 #endif 257 #endif 244 258 #if H_3D_IV_MERGE 259 #if ETRIKHU_CLEANUP_H0083 260 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx ); 261 #else 245 262 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv, 246 263 Int* ivCandRefIdx, Int posIvDC, Int* vspFlag, Int &iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo ); 264 #endif 265 #if ETRIKHU_CLEANUP_H0083 266 Bool xGetPosFirstAvailDmvCand( Int iCount, Int& iFirDispCand ); 267 #else 247 268 Bool xGetPosFirstAvailDmvCand( Int iCount, TComMvField* pcMvFieldNeighbours, Int* ivCandDir, Int posIvDC, Int* vspFlag, Int& iFirDispCand ); 269 #endif 248 270 #endif 249 271 … … 485 507 486 508 #if H_3D 509 #if !ETRIKHU_CLEANUP_H0083 487 510 Void rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo* inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV); 511 #endif 488 512 Bool getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 489 513 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); … … 508 532 #if H_3D_SPIVMP 509 533 , TComMvField* pcMFieldSP, UChar* puhInterDirSP 534 #endif 535 #if SEC_ADAPT_DISABLE_IVMP 536 , Bool bICFlag 510 537 #endif 511 538 ); … … 556 583 Pel getSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentDCOffset[uiSeg][uiPartIdx]; } 557 584 Void setSDCSegmentDCOffset( Pel pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentDCOffset[uiSeg][uiPartIdx] = pOffset; } 585 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108 586 Void setDmmPredictor ( Pel pOffset, UInt uiSeg) { m_apDmmPredictor[uiSeg] = pOffset; } 587 Pel getDmmPredictor ( UInt uiSeg) { return m_apDmmPredictor[uiSeg]; } 588 #endif 558 589 UInt getCtxSDCFlag ( UInt uiAbsPartIdx ); 559 590 UInt getCtxAngleFlag ( UInt uiAbsPartIdx ); … … 635 666 Bool getAvailableFlagA0() { return m_bAvailableFlagA0;} 636 667 Bool getAvailableFlagB2() { return m_bAvailableFlagB2;} 668 #if ETRIKHU_CLEANUP_H0083 637 669 Void initAvailableFlags() { m_bAvailableFlagA1 = m_bAvailableFlagB1 = m_bAvailableFlagB0 = m_bAvailableFlagA0 = m_bAvailableFlagB2 = 0; } 670 Void buildMCL(TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours 671 #if H_3D_VSP 672 , Int* vspFlag 673 #endif 674 #if H_3D_SPIVMP 675 , Bool* pbSPIVMPFlag 676 #endif 677 , Int& numValidMergeCand 678 ); 679 #else 680 Void initAvailableFlags() { m_bAvailableFlagA1 = m_bAvailableFlagB1 = m_bAvailableFlagB0 = m_bAvailableFlagA0 = m_bAvailableFlagB2 = 0; } 681 #endif 638 682 Void getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1); 639 683 Void xGetInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours … … 642 686 #endif 643 687 #if H_3D_VSP 688 #if !ETRIKHU_CLEANUP_H0083 644 689 , Int* vspFlag 690 #endif 645 691 , InheritedVSPDisInfo* inheritedVSPDisInfo 646 692 #endif 647 693 #if H_3D_SPIVMP 694 #if ETRIKHU_CLEANUP_H0083 695 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 696 #else 648 697 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP 698 #endif 649 699 #endif 650 700 , Int& numValidMergeCand, Int mrgCandIdx = -1 -
trunk/source/Lib/TLibCommon/TComMotionInfo.h
r884 r950 198 198 //! \} 199 199 200 #if ETRIKHU_CLEANUP_H0083 201 class TComMotionCand 202 { 203 public: 204 Bool m_bAvailable; 205 TComMvField m_cMvField[2]; 206 UChar m_uDir; 207 #if H_3D_VSP 208 Int m_iVspFlag; 209 #endif 210 Bool m_bSPIVMPFlag; 211 212 public: 213 TComMotionCand() 214 { 215 m_bAvailable = false; 216 m_uDir = 0; 217 #if H_3D_VSP 218 m_iVspFlag = 0; 219 #endif 220 m_bSPIVMPFlag = false; 221 } 222 223 ~TComMotionCand() 224 { 225 226 } 227 228 Void init() 229 { 230 TComMv cZeroMv; 231 232 m_bAvailable = false; 233 m_uDir = 0; 234 #if H_3D_VSP 235 m_iVspFlag = 0; 236 #endif 237 m_bSPIVMPFlag = false; 238 m_cMvField[0].setMvField(cZeroMv, NOT_VALID); 239 m_cMvField[1].setMvField(cZeroMv, NOT_VALID); 240 } 241 242 Void setCand(TComMvField* pcMvFieldNeighbours, UChar uhInterDirNeighbours 243 #if H_3D_VSP 244 , Int vspFlag 245 #endif 246 , Bool bSPIVMPFlag 247 ) 248 { 249 m_bAvailable = true; 250 m_cMvField[0] = pcMvFieldNeighbours[0]; 251 m_cMvField[1] = pcMvFieldNeighbours[1]; 252 m_uDir = uhInterDirNeighbours; 253 #if H_3D_VSP 254 m_iVspFlag = vspFlag; 255 #endif 256 m_bSPIVMPFlag = bSPIVMPFlag; 257 } 258 259 260 Void getCand(Int iCount, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours 261 #if H_3D_VSP 262 , Int* vspFlag 263 #endif 264 , Bool* pbSPIVMPFlag 265 ) 266 { 267 pcMvFieldNeighbours[iCount<<1] = m_cMvField[0]; 268 pcMvFieldNeighbours[(iCount<<1) + 1] = m_cMvField[1]; 269 puhInterDirNeighbours[iCount] = m_uDir; 270 #if H_3D_VSP 271 vspFlag[iCount] = m_iVspFlag; 272 #endif 273 pbSPIVMPFlag[iCount] = m_bSPIVMPFlag; 274 } 275 }; 276 #endif 277 278 200 279 #endif // __TCOMMOTIONINFO__ -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r884 r950 500 500 Pel* pDst = piPred; 501 501 xAssignBiSegDCs( pDst, uiStride, biSegPattern, patternStride, segDC1, segDC2 ); 502 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108 503 pcCU->setDmmPredictor(segDC1, 0); 504 pcCU->setDmmPredictor(segDC2, 1); 505 #endif 502 506 503 507 #if H_3D_DIM_DMM … … 519 523 Int RefPOCL0 = pcCU->getSlice()->getRefPic(REF_PIC_LIST_0, pcCU->getCUMvField(REF_PIC_LIST_0)->getRefIdx(PartAddr))->getPOC(); 520 524 Int RefPOCL1 = pcCU->getSlice()->getRefPic(REF_PIC_LIST_1, pcCU->getCUMvField(REF_PIC_LIST_1)->getRefIdx(PartAddr))->getPOC(); 525 #if MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085 526 if(!pcCU->getARPW(PartAddr) && RefPOCL0 == RefPOCL1 && pcCU->getCUMvField(REF_PIC_LIST_0)->getMv(PartAddr) == pcCU->getCUMvField(REF_PIC_LIST_1)->getMv(PartAddr)) 527 #else 521 528 if(RefPOCL0 == RefPOCL1 && pcCU->getCUMvField(REF_PIC_LIST_0)->getMv(PartAddr) == pcCU->getCUMvField(REF_PIC_LIST_1)->getMv(PartAddr)) 529 #endif 522 530 { 523 531 return true; … … 639 647 640 648 // start mapping process 649 #if !MTK_DBBP_AMP_REM_H0072 641 650 Bool bAMPAvail = uiSize > 8; 642 651 Int matchedPartSum[6][2] = {{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}}; // counter for each part size and boolean option 643 652 PartSize virtualPartSizes[6] = { SIZE_Nx2N, SIZE_2NxN, SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N }; 653 #else 654 Int matchedPartSum[2][2] = {{0,0},{0,0}}; // counter for each part size and boolean option 655 PartSize virtualPartSizes[2] = { SIZE_Nx2N, SIZE_2NxN}; 656 #endif 644 657 645 658 UInt uiHalfSize = uiSize>>1; 659 #if !MTK_DBBP_AMP_REM_H0072 646 660 UInt uiQuarterSize = uiSize>>2; 661 #endif 647 662 648 663 for (Int y=0; y<uiSize; y+=iSubSample) … … 677 692 } 678 693 694 #if !MTK_DBBP_AMP_REM_H0072 679 695 if( bAMPAvail ) 680 696 { … … 719 735 } 720 736 } 737 #endif 721 738 } 722 739 … … 728 745 729 746 Int iMaxMatchSum = 0; 730 for(Int p=0; p<6; p++) // loop over partition sizes 747 #if !MTK_DBBP_AMP_REM_H0072 748 for(Int p=0; p<6; p++) // loop over partition 749 #else 750 for(Int p=0; p<2; p++) // loop over partition 751 #endif 731 752 { 732 753 for( Int b=0; b<=1; b++ ) // loop over boolean options … … 838 859 839 860 UInt uiMaskStride= MAX_CU_SIZE; 861 #if SEC_DBBP_FILTERING_H0104 862 Pel filSrc = 0; 863 Pel* tmpTar = 0; 864 tmpTar = (Pel *)xMalloc(Pel, uiWidth*uiHeight); 865 #endif 840 866 841 867 // backup pointer … … 851 877 852 878 // filtering 879 #if SEC_DBBP_FILTERING_H0104 880 tmpTar[y*uiWidth+x] = piSrc[ucSegment][x]; 881 #else 853 882 Bool t = (y==0)?pMaskStart[(y+1)*uiMaskStride+x]:pMaskStart[(y-1)*uiMaskStride+x]; 854 883 Bool l = (x==0)?pMaskStart[y*uiMaskStride+x+1]:pMaskStart[y*uiMaskStride+x-1]; … … 858 887 Bool bBlend = !((t&&l&&b&&r) || (!t&&!l&&!b&&!r)); 859 888 piDst[x] = bBlend?((piSrc[0][x]+piSrc[1][x]+1)>>1):piSrc[ucSegment][x]; 889 #endif 860 890 } 861 891 862 892 piSrc[0] += uiSrcStride; 863 893 piSrc[1] += uiSrcStride; 894 #if !SEC_DBBP_FILTERING_H0104 864 895 piDst += uiDstStride; 896 #endif 865 897 pMask += uiMaskStride; 866 898 } 899 900 #if SEC_DBBP_FILTERING_H0104 901 for (Int y=0; y<uiHeight; y++) 902 { 903 for (Int x=0; x<uiWidth; x++) 904 { 905 Bool t = (y==0)?pMaskStart[y*uiMaskStride+x]:pMaskStart[(y-1)*uiMaskStride+x]; 906 Bool l = (x==0)?pMaskStart[y*uiMaskStride+x]:pMaskStart[y*uiMaskStride+x-1]; 907 Bool b = (y==uiHeight-1)?pMaskStart[y*uiMaskStride+x]:pMaskStart[(y+1)*uiMaskStride+x]; 908 Bool r = (x==uiWidth-1)?pMaskStart[y*uiMaskStride+x]:pMaskStart[y*uiMaskStride+x+1]; 909 Bool c =pMaskStart[y*uiMaskStride+x]; 910 911 Pel left, right, top, bottom; 912 left = (x==0) ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x-1]; 913 right = (x==uiWidth-1) ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x+1]; 914 top = (y==0) ? tmpTar[y*uiWidth+x] : tmpTar[(y-1)*uiWidth+x]; 915 bottom = (y==uiHeight-1) ? tmpTar[y*uiWidth+x] : tmpTar[(y+1)*uiWidth+x]; 916 917 if(!((l&&r&&c) || (!l&&!r&&!c))) 918 { 919 filSrc = Clip3( Pel( 0 ), Pel( 255 ), Pel(( left + (tmpTar[y*uiWidth+x] << 1) + right ) >> 2 )); 920 } 921 else 922 { 923 filSrc = tmpTar[y*uiWidth+x]; 924 } 925 926 if(!((t&&b&&c) || (!t&&!b&&!c))) 927 { 928 filSrc = Clip3( Pel( 0 ), Pel( 255 ), Pel(( top + (filSrc << 1) + bottom ) >> 2 )); 929 } 930 piDst[x] = filSrc; 931 } 932 piDst += uiDstStride; 933 } 934 if ( tmpTar ) { xFree(tmpTar); tmpTar = NULL; } 935 #endif 867 936 868 937 // now combine chroma … … 875 944 UInt uiWidthC = uiWidth >> 1; 876 945 UInt uiHeightC = uiHeight >> 1; 946 #if SEC_DBBP_FILTERING_H0104 947 Pel filSrcU = 0, filSrcV = 0; 948 Pel* tmpTarU = 0, *tmpTarV = 0; 949 tmpTarU = (Pel *)xMalloc(Pel, uiWidthC*uiHeightC); 950 tmpTarV = (Pel *)xMalloc(Pel, uiWidthC*uiHeightC); 951 #endif 877 952 pMask = pMaskStart; 878 953 … … 885 960 886 961 // filtering 962 #if SEC_DBBP_FILTERING_H0104 963 tmpTarU[y*uiWidthC+x] = piSrcU[ucSegment][x]; 964 tmpTarV[y*uiWidthC+x] = piSrcV[ucSegment][x]; 965 #else 887 966 Bool t = (y==0)?pMaskStart[(y+1)*2*uiMaskStride+x*2]:pMaskStart[(y-1)*2*uiMaskStride+x*2]; 888 967 Bool l = (x==0)?pMaskStart[y*2*uiMaskStride+(x+1)*2]:pMaskStart[y*2*uiMaskStride+(x-1)*2]; … … 894 973 piDstU[x] = bBlend?((piSrcU[0][x]+piSrcU[1][x]+1)>>1):piSrcU[ucSegment][x]; 895 974 piDstV[x] = bBlend?((piSrcV[0][x]+piSrcV[1][x]+1)>>1):piSrcV[ucSegment][x]; 975 #endif 896 976 } 897 977 … … 900 980 piSrcV[0] += uiSrcStrideC; 901 981 piSrcV[1] += uiSrcStrideC; 982 #if !SEC_DBBP_FILTERING_H0104 902 983 piDstU += uiDstStrideC; 903 984 piDstV += uiDstStrideC; 985 #endif 904 986 pMask += 2*uiMaskStride; 905 987 } 988 989 #if SEC_DBBP_FILTERING_H0104 990 for (Int y=0; y<uiHeightC; y++) 991 { 992 for (Int x=0; x<uiWidthC; x++) 993 { 994 Bool t = (y==0)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[(y-1)*2*uiMaskStride+x*2]; 995 Bool l = (x==0)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[y*2*uiMaskStride+(x-1)*2]; 996 Bool b = (y==uiHeightC-1)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[(y+1)*2*uiMaskStride+x*2]; 997 Bool r = (x==uiWidthC-1)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[y*2*uiMaskStride+(x+1)*2]; 998 Bool c =pMaskStart[y*2*uiMaskStride+x*2]; 999 1000 Pel leftU, rightU, topU, bottomU; 1001 leftU = (x==0) ? tmpTarU[y*uiWidthC+x] : tmpTarU[y*uiWidthC+x-1]; 1002 rightU = (x==uiWidthC-1) ? tmpTarU[y*uiWidthC+x] : tmpTarU[y*uiWidthC+x+1]; 1003 topU = (y==0) ? tmpTarU[y*uiWidthC+x] : tmpTarU[(y-1)*uiWidthC+x]; 1004 bottomU = (y==uiHeightC-1) ? tmpTarU[y*uiWidthC+x] : tmpTarU[(y+1)*uiWidthC+x]; 1005 1006 Pel leftV, rightV, topV, bottomV; 1007 leftV = (x==0) ? tmpTarV[y*uiWidthC+x] : tmpTarV[y*uiWidthC+x-1]; 1008 rightV = (x==uiWidthC-1) ? tmpTarV[y*uiWidthC+x] : tmpTarV[y*uiWidthC+x+1]; 1009 topV = (y==0) ? tmpTarV[y*uiWidthC+x] : tmpTarV[(y-1)*uiWidthC+x]; 1010 bottomV = (y==uiHeightC-1) ? tmpTarV[y*uiWidthC+x] : tmpTarV[(y+1)*uiWidthC+x]; 1011 1012 if(!((l&&r&&c) || (!l&&!r&&!c))) 1013 { 1014 filSrcU = Clip3( Pel( 0 ), Pel( 255 ), Pel(( leftU + (tmpTarU[y*uiWidthC+x] << 1) + rightU ) >> 2 )); 1015 filSrcV = Clip3( Pel( 0 ), Pel( 255 ), Pel(( leftV + (tmpTarV[y*uiWidthC+x] << 1) + rightV ) >> 2 )); 1016 } 1017 else 1018 { 1019 filSrcU = tmpTarU[y*uiWidthC+x]; 1020 filSrcV = tmpTarV[y*uiWidthC+x]; 1021 } 1022 1023 if(!((t&&b&&c) || (!t&&!b&&!c))) 1024 { 1025 filSrcU = Clip3( Pel( 0 ), Pel( 255 ), Pel(( topU + (filSrcU << 1) + bottomU ) >> 2 )); 1026 filSrcV = Clip3( Pel( 0 ), Pel( 255 ), Pel(( topV + (filSrcV << 1) + bottomV ) >> 2 )); 1027 } 1028 1029 piDstU[x] = filSrcU; 1030 piDstV[x] = filSrcV; 1031 } 1032 piDstU += uiDstStrideC; 1033 piDstV += uiDstStrideC; 1034 } 1035 if ( tmpTarU ) { xFree(tmpTarU); tmpTarU = NULL; } 1036 if ( tmpTarV ) { xFree(tmpTarV); tmpTarV = NULL; } 1037 #endif 906 1038 } 907 1039 #endif … … 1286 1418 1287 1419 assert ( cDistparity.bDV ); 1288 1420 1421 #if NTT_BUG_FIX_TK54 1422 TComMv cNBDV = cDistparity.m_acNBDV; 1423 pcCU->clipMv( cNBDV ); 1424 1425 pcPicYuvRef = pcPicYuvBaseCol->getPicYuvRec(); 1426 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, bi, true ); 1427 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, bi, true ); 1428 #else 1289 1429 pcPicYuvRef = pcPicYuvBaseCol->getPicYuvRec(); 1290 1430 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cDistparity.m_acNBDV, iWidth, iHeight, pYuvB0, bi, true ); 1291 1431 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cDistparity.m_acNBDV, iWidth, iHeight, pYuvB0, bi, true ); 1432 #endif 1292 1433 1293 1434 pcPicYuvRef = pcPicYuvBaseRef->getPicYuvRec(); … … 2187 2328 if (orgDC == false) 2188 2329 { 2330 #if !HS_DMM_SDC_PREDICTOR_UNIFY_H0108 2189 2331 if ( getDimType(uiIntraMode) == DMM1_IDX ) 2190 2332 { … … 2232 2374 } 2233 2375 else 2376 #endif 2234 2377 { 2235 2378 Pel* pLeftTop = pOrig; -
trunk/source/Lib/TLibCommon/TComRom.cpp
r872 r950 360 360 Char g_aucConvertToBit [ MAX_CU_SIZE+1 ]; 361 361 362 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 363 UInt g_aICEnableCANDIDATE[10] = { 0, }; 364 UInt g_aICEnableNUM[ 10 ] = { 0, }; 365 Int g_lastlayer=0; 366 #endif 362 367 #if ENC_DEC_TRACE 363 368 FILE* g_hTrace = NULL; -
trunk/source/Lib/TLibCommon/TComRom.h
r872 r950 189 189 extern Char g_aucConvertToBit [ MAX_CU_SIZE+1 ]; // from width to log2(width)-2 190 190 191 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 192 extern UInt g_aICEnableCANDIDATE[10]; 193 extern UInt g_aICEnableNUM[ 10 ]; //10 layers 194 extern Int g_lastlayer; 195 #endif 196 191 197 #ifndef ENC_DEC_TRACE 192 198 #define ENC_DEC_TRACE 0 -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r884 r950 3220 3220 #endif 3221 3221 #if H_3D_IC 3222 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 3223 Void TComSlice::xSetApplyIC(Bool bUseLowLatencyICEnc) 3224 #else 3222 3225 Void TComSlice::xSetApplyIC() 3223 { 3226 #endif 3227 { 3228 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 3229 if(bUseLowLatencyICEnc) 3230 { 3231 Bool existInterViewRef=false; 3232 TComPic* pcCurrPic = getPic(); 3233 TComPic* pcRefPic = NULL; 3234 for ( Int i = 0; (i < getNumRefIdx( REF_PIC_LIST_0 )) && !existInterViewRef; i++ ) 3235 { 3236 pcRefPic = getRefPic( REF_PIC_LIST_0, i ); 3237 if ( pcRefPic != NULL ) 3238 { 3239 if ( pcCurrPic->getViewIndex() != pcRefPic->getViewIndex() ) 3240 { 3241 existInterViewRef = true; 3242 } 3243 } 3244 } 3245 3246 for ( Int i = 0; (i < getNumRefIdx( REF_PIC_LIST_1 )) && !existInterViewRef; i++ ) 3247 { 3248 pcRefPic = getRefPic( REF_PIC_LIST_1, i ); 3249 if ( pcRefPic != NULL ) 3250 { 3251 if ( pcCurrPic->getViewIndex() != pcRefPic->getViewIndex() ) 3252 { 3253 existInterViewRef = true; 3254 } 3255 } 3256 } 3257 3258 if(!existInterViewRef) 3259 { 3260 m_bApplyIC = false; 3261 } 3262 else 3263 { 3264 Int curLayer=getDepth(); 3265 if( curLayer>9) curLayer=9; // Max layer is 10 3266 3267 m_bApplyIC = true; 3268 Int refLayer = curLayer-1; 3269 if( (refLayer>=0) && (g_aICEnableCANDIDATE[refLayer]>0) ) 3270 { 3271 Double ratio=Double(g_aICEnableNUM[refLayer])/Double(g_aICEnableCANDIDATE[refLayer]); 3272 3273 if( ratio > MTK_LOW_LATENCY_IC_ENCODING_THRESHOLD_H0086) 3274 { 3275 m_bApplyIC=true; 3276 } 3277 else 3278 { 3279 m_bApplyIC=false; 3280 } 3281 } 3282 g_aICEnableNUM[curLayer]=0; 3283 g_aICEnableCANDIDATE[curLayer]=0; 3284 g_lastlayer=getDepth(); 3285 } 3286 } 3287 else 3288 { 3289 #endif 3224 3290 Int iMaxPelValue = ( 1 << g_bitDepthY ); 3225 3291 Int *aiRefOrgHist; … … 3295 3361 aiCurrHist = NULL; 3296 3362 aiRefOrgHist = NULL; 3363 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 3364 }//if(bUseLowLatencyICEnc) 3365 #endif 3297 3366 } 3298 3367 #endif -
trunk/source/Lib/TLibCommon/TComSlice.h
r884 r950 2179 2179 Bool getApplyIC() { return m_bApplyIC; } 2180 2180 Void xSetApplyIC(); 2181 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 2182 Void xSetApplyIC(Bool bUseLowLatencyICEnc); 2183 #endif 2181 2184 Void setIcSkipParseFlag( Bool b ) { m_icSkipParseFlag = b; } 2182 2185 Bool getIcSkipParseFlag() { return m_icSkipParseFlag; } -
trunk/source/Lib/TLibCommon/TypeDef.h
r884 r950 65 65 #define H_3D ( HEVC_EXT == 2) 66 66 67 #define NTT_BUG_FIX_TK54 1 68 67 69 68 70 ///////////////////////////////////////////////////////////////////////////////////////// … … 107 109 // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053 108 110 111 109 112 #define H_3D_IC 1 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060 110 113 // Unifying rounding offset, for IC part, JCT3V-D0135 … … 116 119 // MTK_IC_FLAG_CABAC_SIMP_G0061 117 120 // SEC_IC_ARP_SIG_G0072, Disabling IC when ARP is enabled, option 1 in JCT3V-G0072, part 2 in JCT3V-G0121 121 118 122 119 123 #if H_3D_NBDV … … 157 161 // SEC_DEPTH_DV_DERIVAITON_G0074, Simplification of DV derivation for depth, JCT3V-G0074 158 162 // QC_DEPTH_MERGE_SIMP_G0127 Remove DV candidate and shifting candidate for depth coding 163 159 164 160 165 #define H_3D_TMVP 1 // QC_TMVP_C0047 … … 192 197 // QC_PKU_SDC_SPLIT_G0123 Intra SDC Split 193 198 194 195 196 199 #define H_3D_INTER_SDC 1 // INTER SDC, Inter simplified depth coding 197 200 // LGE_INTER_SDC_E0156 Enable inter SDC for depth coding … … 307 310 #endif 308 311 312 313 ///////////////////////////////////////////////////////////////////////////////////////// 314 /////////////////////////////////// HTM-11.0 Integrations ////////////////////////////// 315 ///////////////////////////////////////////////////////////////////////////////////////// 316 #if H_3D 317 #define H_3D_FIX_DBBP_IVMP 1 // Fix . Enable IVMP is always disabled, when DBBP is enabled. The original intention is to disable Sub-PU IVMP when DBBP is enabled, not to disable IVMP itself. 318 319 #define MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085 1 // Align the SW and WD for the bi-prediction ARP PUs by disallowing non-normative fast bi-prediction for ARP PUs, JCT3V-H0085 320 #define MTK_LOW_LATENCY_IC_ENCODING_H0086 1 // Low-latency IC encoding in JCT3V-H0086 321 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 322 #define MTK_LOW_LATENCY_IC_ENCODING_THRESHOLD_H0086 0.1 // Threshold for low-latency IC encoding in JCT3V-H0086 323 #endif 324 #define SEC_ADAPT_DISABLE_IVMP 1 // Disalbing IVMP merge candidates when IC is enabled, JCT3V-H0070 325 326 #define MTK_DELTA_DC_FLAG_ONE_CONTEXT_H0084_H0100_H0113 1 // Use only one context for CABAC of delta_dc_flag as in JCTVC-H0084, JCTVC-H0100 and JCTVC-H0113 327 #define MTK_SDC_FLAG_FIX_H0095 1 // Remove conditional check of PCM flag based on SDC flag, JCTVC-H0095 328 #define MTK_DMM_SIMP_CODE_H0092 1 // Remove CABAC context for DMM1 mode coding 329 330 331 #define QC_IV_PRED_CONSTRAINT_H0137 1 // Constraint on inter-view (motion) prediction tools 332 #define ETRIKHU_BUGFIX_H0083 1 // bug-fix for DV candidate pruning 333 #define ETRIKHU_CLEANUP_H0083 1 // cleaned-up source code for constructing merging candidate list 334 #define ETRIKHU_CLEANUP_H0083_MISSING 1 // missing guard macros added by GT 335 #define SHARP_SIMPLE_MERGE_H0062 1 // Restrict 3D-HEVC merge cand in small PUs 336 #define MTK_DIS_SPBIP8X4_H0205 1 // Disable bi-prediction for 8x4 and 4x8 sub PU and remove the SPIVMP 2Nx2N restriction 337 338 #if H_3D_NBDV 339 #define SEC_VER_DONBDV_H0103 1 // Vertical DV Restriction for DoNBDV 340 #endif 341 342 #if H_3D_DIM 343 #define HS_DMM_SDC_PREDICTOR_UNIFY_H0108 1 // Unification of DMM and SDC predictor derivation 344 #define LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135 1 // Use only one context for CABAC of dim_not_present_flag 345 #define QC_SIMP_DELTADC_CODING_H0131 1 // Simplify detaDC entropy coding 346 347 #if H_3D_DIM_DLT 348 #define SEC_NO_RESI_DLT_H0105 1 349 #define MTK_DLT_CODING_FIX_H0091 1 350 #endif 351 #endif 352 #if H_3D_DBBP 353 #define MTK_DBBP_AMP_REM_H0072 1 354 #define RWTH_DBBP_NO_SPU_H0057 1 355 #define SEC_DBBP_FILTERING_H0104 1 356 #define MTK_DBBP_SIGNALING_H0094 1 357 #endif 358 359 #define MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 1 360 #endif 309 361 ///////////////////////////////////////////////////////////////////////////////////////// 310 362 /////////////////////////////////// TBD ////////////////////////////// … … 313 365 // #define H_MV_HLS_7_POC_P0041_3 0 // (POC/P0041/POC reset) #3 It was remarked that we should require each non-IRAP picture that has discardable_flag equal to 1 to have NUT value indicating that it is a sub-layer non-reference picture. This was agreed. Decision: Adopt (with constraint for discardable_flag as described above) 314 366 // #define H_MV_HLS_7_POC_P0041_FIXES 0 // (POC/P0041/Fixes) For each non-IRAP picture that has discardable_flag equal to 1 to have NUT value indicating that it is a sub-layer non-reference picture. 315 // #define H_MV_HLS_7_POC_P0056_4 0 // (POC/P0056/layer tree poc) #4 Proposal 1: If the POC reset approach is adopted as the basis for multi-layer POC derivation, it is proposed to derive the POC anchor picture from the previous TID0 picture (that is not a RASL picture, a RADL picture or a sub-layer non-reference picture and not with discardable_flag equal to 1) of the current layer or any of its reference layer. This is asserted to improve loss resilience and reduce bit rate overhead. Decision: Adopt Proposal 1 (with the suggested modifications with text provided as P0297).367 // #define H_MV_HLS_7_POC_P0056_4 0 // (POC/P0056/layer tree poc) #4 Proposal 1: If the POC reset approach is adopted as the basis for multi-layer POC derivation, it is proposed to derive the POC anchor picture from the previous TID0 picture (that is not a RASL picture, a RADL picture or a sub-layer non-reference picture and not with discardable_flag equal to 1) of the current layer or any of its reference layer. This is asserted to improve loss resilience and reduce bit rate overhead. Decision: Adopt Proposal 1 (with the suggested modifications Ewith text provided as P0297). 316 368 317 369 // #define H_MV_HLS_7_SEI_P0133_28 0 // (SEI/P0133/Recovery point SEI) #28 Decision: Adopt change to recover point semantics only (-v3) … … 323 375 324 376 #define H_MV_HLS7_GEN 0 // General changes (not tested) 325 326 377 327 378 … … 797 848 }; 798 849 850 /// merging candidates 851 #if ETRIKHU_CLEANUP_H0083 852 enum DefaultMergCandOrder 853 { 854 MRG_T = 0, ///< MPI 855 MRG_D, ///< DDD 856 MRG_IVMC, ///< Temporal inter-view 857 MRG_A1, ///< Left 858 MRG_B1, ///< Above 859 MRG_B0, ///< Above right 860 MRG_IVDC, ///< Disparity inter-view 861 MRG_VSP, ///< VSP 862 MRG_A0, ///< Left bottom 863 MRG_B2, ///< Above left 864 MRG_IVSHIFT, ///< Shifted IVMC of Shifted IVDC. (These are mutually exclusive) 865 MRG_COL ///< Temporal co-located 866 }; 867 #endif 868 799 869 /// coefficient scanning type used in ACS 800 870 enum COEFF_SCAN_TYPE -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r884 r950 440 440 441 441 READ_FLAG(uiCode, "inter_view_dlt_pred_enable_flag[ i ]"); 442 443 #if MTK_DLT_CODING_FIX_H0091 444 if( uiCode ) 445 { 446 assert( pcDLT->getUseDLTFlag( 1 )); 447 } 448 #endif 449 442 450 pcDLT->setInterViewDltPredEnableFlag( i, (uiCode == 1) ? true : false ); 443 451 … … 1751 1759 #if H_3D_IV_MERGE 1752 1760 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false ); 1761 #if QC_IV_PRED_CONSTRAINT_H0137 1762 if( !pcVPS->getNumDirectRefLayers(i) ) 1763 { 1764 assert( !uiCode ); 1765 } 1766 #endif 1753 1767 #if H_3D_SPIVMP 1754 1768 READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]"); pcVPS->setSubPULog2Size(i, uiCode+3); … … 1757 1771 #if H_3D_ARP 1758 1772 READ_FLAG( uiCode, "iv_res_pred_flag[i]" ); pcVPS->setUseAdvRP ( i, uiCode ); pcVPS->setARPStepNum( i, uiCode ? H_3D_ARP_WFNR : 1 ); 1759 1773 #if QC_IV_PRED_CONSTRAINT_H0137 1774 if( !pcVPS->getNumDirectRefLayers(i) ) 1775 { 1776 assert( !uiCode ); 1777 } 1778 #endif 1760 1779 #endif 1761 1780 #if H_3D_NBDV_REF … … 1764 1783 #if H_3D_VSP 1765 1784 READ_FLAG( uiCode, "view_synthesis_pred_flag[i]"); pcVPS->setViewSynthesisPredFlag( i, uiCode == 1 ? true : false ); 1785 #if QC_IV_PRED_CONSTRAINT_H0137 1786 if( !pcVPS->getNumDirectRefLayers(i) ) 1787 { 1788 assert( !uiCode ); 1789 } 1790 #endif 1766 1791 #endif 1767 1792 #if H_3D_DBBP … … 1775 1800 { 1776 1801 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false ); 1802 #if QC_IV_PRED_CONSTRAINT_H0137 1803 if( !pcVPS->getNumDirectRefLayers(i) ) 1804 { 1805 assert( !uiCode ); 1806 } 1807 #endif 1777 1808 } 1778 1809 #endif -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r884 r950 431 431 m_ppcCU[uiDepth]->initAvailableFlags(); 432 432 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 433 m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo 433 m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 434 #if !ETRIKHU_CLEANUP_H0083 435 ,vspFlag 436 #endif 437 , inheritedVSPDisInfo 434 438 #if H_3D_SPIVMP 435 , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP 439 #if !ETRIKHU_CLEANUP_H0083_MISSING 440 , bSPIVMPFlag 441 #endif 442 , pcMvFieldSP, puhInterDirSP 436 443 #endif 437 444 , numValidMergeCand, uiMergeIndex ); 445 446 #if ETRIKHU_CLEANUP_H0083 447 m_ppcCU[uiDepth]->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 448 #if H_3D_SPIVMP 449 , bSPIVMPFlag 450 #endif 451 , numValidMergeCand ); 452 #endif 438 453 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 439 454 #else … … 782 797 } 783 798 799 #if RWTH_DBBP_NO_SPU_H0057 800 AOF( pcCU->getARPW(uiPartAddr) == 0 ); 801 AOF( pcCU->getICFlag(uiPartAddr) == false ); 802 AOF( pcCU->getSPIVMPFlag(uiPartAddr) == false ); 803 AOF( pcCU->getVSPFlag(uiPartAddr) == 0 ); 804 #else 784 805 pDBBPTmpData->ahVSPFlag[uiSegment] = pcCU->getVSPFlag( uiPartAddr ); 785 806 pDBBPTmpData->acDvInfo[uiSegment] = pcCU->getDvInfo( uiPartAddr ); 807 #endif 786 808 } 787 809 … … 793 815 pcCU->setInterDirSubParts( pDBBPTmpData->auhInterDir[uiSegment], 0, 0, uiDepth ); 794 816 817 #if !RWTH_DBBP_NO_SPU_H0057 795 818 pcCU->setVSPFlagSubParts( pDBBPTmpData->ahVSPFlag[uiSegment], 0, 0, uiDepth ); 796 819 pcCU->setDvInfoSubParts( pDBBPTmpData->acDvInfo[uiSegment], 0, 0, uiDepth ); 820 #endif 797 821 798 822 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) … … 816 840 pcCU->setDBBPFlagSubParts(true, uiPartAddr, uiSegment, uiDepth); 817 841 842 #if !RWTH_DBBP_NO_SPU_H0057 818 843 pcCU->setVSPFlagSubParts( pDBBPTmpData->ahVSPFlag[uiSegment], uiPartAddr, uiSegment, uiDepth ); 819 844 pcCU->setDvInfoSubParts( pDBBPTmpData->acDvInfo[uiSegment], uiPartAddr, uiSegment, uiDepth ); 845 #endif 820 846 821 847 pcCU->setInterDirSubParts(pDBBPTmpData->auhInterDir[uiSegment], uiPartAddr, uiSegment, uiDepth); // interprets depth relative to LCU level … … 920 946 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 921 947 { 922 #if H_3D 948 #if H_3D && !SEC_NO_RESI_DLT_H0105 923 949 if ( useDltFlag ) 924 950 { … … 1231 1257 // get DC prediction for each segment 1232 1258 Pel apDCPredValues[2]; 1259 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108 1260 if ( getDimType( uiLumaPredMode ) == DMM1_IDX || getDimType( uiLumaPredMode ) == DMM4_IDX ) 1261 { 1262 apDCPredValues[0] = pcCU->getDmmPredictor( 0 ); 1263 apDCPredValues[1] = pcCU->getDmmPredictor( 1 ); 1264 } 1265 else 1266 #endif 1233 1267 m_pcPrediction->analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode); 1234 1268 -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r884 r950 139 139 140 140 #if H_3D_DBBP 141 142 #if MTK_DBBP_SIGNALING_H0094 143 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) ) 144 #else 141 145 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getPartitionSize(uiAbsPartIdx) == RWTH_DBBP_PACK_MODE ) 146 #endif 142 147 { 143 148 decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth); … … 145 150 if( pcCU->getDBBPFlag(uiAbsPartIdx) ) 146 151 { 152 #if !MTK_DBBP_SIGNALING_H0094 147 153 AOF( pcCU->getPartitionSize(uiAbsPartIdx) == RWTH_DBBP_PACK_MODE ); 154 #endif 148 155 149 156 // get collocated depth block … … 161 168 162 169 pcCU->setPartSizeSubParts(eVirtualPartSize, uiAbsPartIdx, uiDepth); 170 171 #if RWTH_DBBP_NO_SPU_H0057 172 // make sure that DBBP flag is set for both segments 173 UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4; 174 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx, 0, uiDepth); 175 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx+uiPUOffset, 1, uiDepth); 176 #endif 163 177 } 164 178 } … … 196 210 return; 197 211 } 212 #if !MTK_SDC_FLAG_FIX_H0095 198 213 #if H_3D_DIM_SDC 199 214 if( pcCU->getSDCFlag(uiAbsPartIdx) ) … … 201 216 return; 202 217 } 218 #endif 203 219 #endif 204 220 … … 292 308 pcSubCU->initAvailableFlags(); 293 309 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 294 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo 310 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 311 #if !ETRIKHU_CLEANUP_H0083 312 ,vspFlag 313 #endif 314 , inheritedVSPDisInfo 295 315 #if H_3D_SPIVMP 296 , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP 316 #if !ETRIKHU_CLEANUP_H0083_MISSING 317 , bSPIVMPFlag 318 #endif 319 , pcMvFieldSP, puhInterDirSP 297 320 #endif 298 321 , numValidMergeCand ); 322 323 #if ETRIKHU_CLEANUP_H0083 324 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 325 #if H_3D_SPIVMP 326 , bSPIVMPFlag 327 #endif 328 , numValidMergeCand ); 329 #endif 299 330 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 300 331 … … 329 360 pcSubCU->initAvailableFlags(); 330 361 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 331 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo 362 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours 363 #if !ETRIKHU_CLEANUP_H0083 364 , vspFlag 365 #endif 366 , inheritedVSPDisInfo 332 367 #if H_3D_SPIVMP 333 , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP 368 #if !ETRIKHU_CLEANUP_H0083_MISSING 369 , bSPIVMPFlag 370 #endif 371 , pcMvFieldSP, puhInterDirSP 334 372 #endif 335 373 ,numValidMergeCand, uiMergeIndex ); 374 375 #if ETRIKHU_CLEANUP_H0083 376 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 377 #if H_3D_SPIVMP 378 , bSPIVMPFlag 379 #endif 380 ,numValidMergeCand ); 381 #endif 336 382 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 337 383 if(vspFlag[uiMergeIndex]) -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r884 r950 87 87 , m_cDdcDataSCModel ( 1, 1, NUM_DDC_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 88 88 , m_cAngleFlagSCModel ( 1, 1, NUM_ANGLE_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 89 #if H_3D_DIM_DMM 89 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H0092 90 90 , m_cDmm1DataSCModel ( 1, 1, NUM_DMM1_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 91 91 #endif … … 171 171 m_cDdcDataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DDC_DATA ); 172 172 m_cAngleFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ANGLE_FLAG ); 173 #if H_3D_DIM_DMM 173 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H0092 174 174 m_cDmm1DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM1_DATA ); 175 175 #endif … … 241 241 m_cDdcDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_DATA ); 242 242 m_cAngleFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG ); 243 #if H_3D_DIM_DMM 243 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H0092 244 244 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); 245 245 #endif … … 386 386 uiCount++; 387 387 } 388 #if QC_SIMP_DELTADC_CODING_H0131 389 while( uiSymbol && ( uiCount != 3 ) ); 390 #else 388 391 while( uiSymbol && ( uiCount != 13 ) ); 389 392 #endif 390 393 ruiSymbol = uiCount - 1; 391 394 … … 423 426 for( Int i = 0; i < iNumBit; i++ ) 424 427 { 428 #if MTK_DMM_SIMP_CODE_H0092 429 m_pcTDecBinIf->decodeBinEP( uiSymbol ); 430 #else 425 431 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDmm1DataSCModel.get(0, 0, 0) ); 432 #endif 426 433 uiIdx += uiSymbol << i; 427 434 } … … 1128 1135 if( ( pcCU->getSlice()->getSPS()->getMaxCUWidth() >> pcCU->getDepth( absPartIdx ) ) < 64 ) //DMM and HEVC intra modes are both allowed 1129 1136 { 1137 #if LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135 1138 m_pcTDecBinIf->decodeBin( uiSymbol, m_cAngleFlagSCModel.get( 0, 0, 0 ) ); 1139 #else 1130 1140 m_pcTDecBinIf->decodeBin( uiSymbol, m_cAngleFlagSCModel.get( 0, 0, pcCU->getCtxAngleFlag( absPartIdx ) ) ); 1141 #endif 1131 1142 } 1132 1143 else … … 2068 2079 UInt dir = pcCU->getLumaIntraDir( absPartIdx ); 2069 2080 uiNumSegments = isDimMode( dir ) ? 2 : 1; 2070 2081 #if MTK_DELTA_DC_FLAG_ONE_CONTEXT_H0084_H0100_H0113 2082 m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get( 0, 0, 0 ) ); 2083 #else 2071 2084 m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get( 0, 0, uiNumSegments-1 ) ); 2072 2085 #endif 2073 2086 if( pcCU->getSDCFlag( absPartIdx ) ) 2074 2087 { … … 2141 2154 Void TDecSbac::parseDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2142 2155 { 2156 #if !MTK_DBBP_SIGNALING_H0094 2143 2157 PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx ); 2158 #endif 2144 2159 AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) ); 2145 2160 AOF( !pcCU->getSlice()->getIsDepth() ); 2161 #if !MTK_DBBP_SIGNALING_H0094 2146 2162 AOF( ePartSize == RWTH_DBBP_PACK_MODE ); 2163 #endif 2147 2164 2148 2165 UInt uiSymbol = 0; … … 2153 2170 { 2154 2171 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx, 0, uiDepth); 2172 #if MTK_DIS_SPBIP8X4_H0205 2173 UInt uiCurrPartNumQ = (pcCU->getPic()->getNumPartInCU() >> (2 * uiDepth)) >> 2; 2174 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx + 2*uiCurrPartNumQ, 1, uiDepth); 2175 #endif 2155 2176 } 2156 2177 } -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r884 r950 214 214 ContextModel3DBuffer m_cDdcDataSCModel; 215 215 ContextModel3DBuffer m_cAngleFlagSCModel; 216 #if H_3D_DIM_DMM 216 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H0092 217 217 ContextModel3DBuffer m_cDmm1DataSCModel; 218 218 #endif -
trunk/source/Lib/TLibDecoder/TDecSlice.cpp
r872 r950 221 221 } 222 222 } 223 #if MTK_DLT_CODING_FIX_H0091 224 if( pcSlice->getPPS()->getDLT() != NULL ) 225 { 226 assert( pcSlice->getSPS()->getBitDepthY() == pcSlice->getPPS()->getDLT()->getDepthViewBitDepth() ); 227 } 228 #endif 223 229 for( Int iCUAddr = iStartCUAddr; !uiIsLast && iCUAddr < rpcPic->getNumCUsInFrame(); iCUAddr = rpcPic->getPicSym()->xCalculateNxtCUAddr(iCUAddr) ) 224 230 { -
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r884 r950 272 272 WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_segment_header_extension_present_flag"); 273 273 274 #if MTK_DLT_CODING_FIX_H0091 275 if(( !pcPPS->getSPS()->getVPS()->getDepthId( pcPPS->getSPS()->getLayerId() ) )|| 276 pcPPS->getLayerId() != 1 ) 277 { 278 pcPPS->setPpsExtensionTypeFlag( PPS_EX_T_3D, false ); 279 } 280 #endif 281 274 282 #if !H_MV 275 283 WRITE_FLAG( 0, "pps_extension_flag" ); -
trunk/source/Lib/TLibEncoder/TEncCfg.h
r884 r950 401 401 #if H_3D_IC 402 402 Bool m_bUseIC; 403 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 404 Bool m_bUseICLowLatencyEnc; 405 #endif 403 406 #endif 404 407 #if H_3D_INTER_SDC … … 511 514 Void setUseIC ( Bool bVal ) { m_bUseIC = bVal; } 512 515 Bool getUseIC () { return m_bUseIC; } 516 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 517 Void setUseICLowLatencyEnc ( Bool bVal ) { m_bUseICLowLatencyEnc = bVal; } 518 Bool getUseICLowLatencyEnc () { return m_bUseICLowLatencyEnc; } 519 #endif 513 520 #endif 514 521 #if H_3D_INTER_SDC -
trunk/source/Lib/TLibEncoder/TEncCu.cpp
r884 r950 1814 1814 rpcTempCU->initAvailableFlags(); 1815 1815 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 1816 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag,inheritedVSPDisInfo 1816 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 1817 #if !ETRIKHU_CLEANUP_H0083 1818 , vspFlag 1819 #endif 1820 , inheritedVSPDisInfo 1817 1821 #if H_3D_SPIVMP 1818 , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP 1822 #if !ETRIKHU_CLEANUP_H0083_MISSING 1823 , bSPIVMPFlag 1824 #endif 1825 , pcMvFieldSP, puhInterDirSP 1819 1826 #endif 1820 1827 , numValidMergeCand 1821 1828 ); 1829 1830 #if ETRIKHU_CLEANUP_H0083 1831 rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours, vspFlag 1832 #if H_3D_SPIVMP 1833 , bSPIVMPFlag 1834 #endif 1835 , numValidMergeCand 1836 ); 1837 #endif 1838 1822 1839 #else 1823 1840 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand ); … … 2383 2400 pDBBPTmpData->auhMergeIndex[uiSegment] = rpcTempCU->getMergeIndex(0); 2384 2401 2402 #if RWTH_DBBP_NO_SPU_H0057 2403 AOF( rpcTempCU->getSPIVMPFlag(0) == false ); 2404 AOF( rpcTempCU->getVSPFlag(0) == 0 ); 2405 #else 2385 2406 pDBBPTmpData->ahVSPFlag[uiSegment] = rpcTempCU->getVSPFlag(0); 2386 2407 pDBBPTmpData->acDvInfo[uiSegment] = rpcTempCU->getDvInfo(0); 2408 #endif 2387 2409 2388 2410 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) … … 2416 2438 rpcTempCU->setMergeIndexSubParts(pDBBPTmpData->auhMergeIndex[uiSegment], uiPartAddr, uiSegment, uhDepth); 2417 2439 2440 #if !RWTH_DBBP_NO_SPU_H0057 2418 2441 rpcTempCU->setVSPFlagSubParts(pDBBPTmpData->ahVSPFlag[uiSegment], uiPartAddr, uiSegment, uhDepth); 2419 2442 rpcTempCU->setDvInfoSubParts(pDBBPTmpData->acDvInfo[uiSegment], uiPartAddr, uiSegment, uhDepth); 2443 #endif 2420 2444 2421 2445 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) -
trunk/source/Lib/TLibEncoder/TEncEntropy.cpp
r884 r950 163 163 uiAbsPartIdx = 0; 164 164 } 165 165 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 166 else 167 { 168 g_aICEnableCANDIDATE[pcCU->getSlice()->getDepth()]++; 169 if(pcCU->getICFlag(uiAbsPartIdx)) 170 { 171 g_aICEnableNUM[pcCU->getSlice()->getDepth()]++; 172 } 173 } 174 #endif 166 175 if( pcCU->isICFlagRequired( uiAbsPartIdx ) ) 167 176 m_pcEntropyCoderIf->codeICFlag( pcCU, uiAbsPartIdx ); … … 246 255 247 256 #if H_3D_DBBP 257 258 #if MTK_DBBP_SIGNALING_H0094 259 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) ) 260 #else 248 261 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getPartitionSize(uiAbsPartIdx) == RWTH_DBBP_PACK_MODE ) 262 #endif 249 263 { 250 264 encodeDBBPFlag(pcCU, uiAbsPartIdx, bRD); … … 252 266 if( pcCU->getDBBPFlag(uiAbsPartIdx) ) 253 267 { 268 #if !MTK_DBBP_SIGNALING_H0094 254 269 AOF( pcCU->getPartitionSize(uiAbsPartIdx) == RWTH_DBBP_PACK_MODE ); 270 #endif 255 271 // restore virtual partition size for DBBP blocks 256 272 pcCU->setPartSizeSubParts(eVirtualPartSize, uiAbsPartIdx, uiDepth); … … 274 290 return; 275 291 } 292 #if !MTK_SDC_FLAG_FIX_H0095 276 293 #if H_3D_DIM_SDC 277 294 if( pcCU->getSDCFlag(uiAbsPartIdx) ) … … 279 296 return; 280 297 } 298 #endif 281 299 #endif 282 300 -
trunk/source/Lib/TLibEncoder/TEncSbac.cpp
r884 r950 93 93 , m_cDdcDataSCModel ( 1, 1, NUM_DDC_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 94 94 , m_cAngleFlagSCModel ( 1, 1, NUM_ANGLE_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 95 #if H_3D_DIM_DMM 95 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H0092 96 96 , m_cDmm1DataSCModel ( 1, 1, NUM_DMM1_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 97 97 #endif … … 169 169 m_cDdcDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_DATA ); 170 170 m_cAngleFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG ); 171 #if H_3D_DIM_DMM 171 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H0092 172 172 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); 173 173 #endif … … 255 255 curCost += m_cDdcDataSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DDC_DATA ); 256 256 curCost += m_cAngleFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_ANGLE_FLAG ); 257 #if H_3D_DIM_DMM 257 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H0092 258 258 curCost += m_cDmm1DataSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DMM1_DATA ); 259 259 #endif … … 319 319 m_cDdcDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_DATA ); 320 320 m_cAngleFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG ); 321 #if H_3D_DIM_DMM 321 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H0092 322 322 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); 323 323 #endif … … 482 482 m_pcBinIf->encodeBin( 1, rcSCModel ); 483 483 UInt uiCount = 0; 484 #if QC_SIMP_DELTADC_CODING_H0131 485 Bool bNoExGo = ( uiSymbol < 3 ); 486 487 while( --uiSymbol && ++uiCount < 3 ) 488 #else 484 489 Bool bNoExGo = (uiSymbol < 13); 485 490 486 491 while( --uiSymbol && ++uiCount < 13 ) 492 #endif 487 493 { 488 494 m_pcBinIf->encodeBin( 1, rcSCModel ); … … 520 526 for ( Int i = 0; i < iNumBit; i++ ) 521 527 { 528 #if MTK_DMM_SIMP_CODE_H0092 529 m_pcBinIf->encodeBinEP( ( uiTabIdx >> i ) & 1 ); 530 #else 522 531 m_pcBinIf->encodeBin( ( uiTabIdx >> i ) & 1, m_cDmm1DataSCModel.get(0, 0, 0) ); 532 #endif 523 533 } 524 534 } … … 1233 1243 if( ( pcCU->getSlice()->getSPS()->getMaxCUWidth() >> pcCU->getDepth( absPartIdx ) ) < 64 ) //DMM and HEVC intra modes are both allowed 1234 1244 { 1245 #if LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135 1246 m_pcBinIf->encodeBin( isDimMode( dir ) ? 0 : 1, m_cAngleFlagSCModel.get( 0, 0, 0 ) ); 1247 #else 1235 1248 m_pcBinIf->encodeBin( isDimMode( dir ) ? 0 : 1, m_cAngleFlagSCModel.get( 0, 0, pcCU->getCtxAngleFlag( absPartIdx ) ) ); 1249 #endif 1236 1250 } 1237 1251 if( isDimMode( dir ) ) … … 2313 2327 dimDeltaDC = isDimDeltaDC( dir ); 2314 2328 } 2315 2329 #if MTK_DELTA_DC_FLAG_ONE_CONTEXT_H0084_H0100_H0113 2330 m_pcBinIf->encodeBin( dimDeltaDC, m_cDdcFlagSCModel.get( 0, 0, 0 ) ); 2331 #else 2316 2332 m_pcBinIf->encodeBin( dimDeltaDC, m_cDdcFlagSCModel.get( 0, 0, uiNumSegments-1 ) ); 2333 #endif 2317 2334 } 2318 2335 else //all-zero inter SDC is not allowed … … 2356 2373 Void TEncSbac::codeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2357 2374 { 2375 #if !MTK_DBBP_SIGNALING_H0094 2358 2376 PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx ); 2359 2377 AOF( ePartSize == RWTH_DBBP_PACK_MODE ); 2378 #endif 2360 2379 AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) ); 2361 2380 AOF( !pcCU->getSlice()->getIsDepth() ); -
trunk/source/Lib/TLibEncoder/TEncSbac.h
r884 r950 258 258 ContextModel3DBuffer m_cDdcDataSCModel; 259 259 ContextModel3DBuffer m_cAngleFlagSCModel; 260 #if H_3D_DIM_DMM 260 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H0092 261 261 ContextModel3DBuffer m_cDmm1DataSCModel; 262 262 #endif -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r884 r950 1146 1146 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 1147 1147 { 1148 #if H_3D_DIM 1148 #if H_3D_DIM && !SEC_NO_RESI_DLT_H0105 1149 1149 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) ) 1150 1150 { … … 1221 1221 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 1222 1222 { 1223 #if H_3D_DIM 1223 #if H_3D_DIM && !SEC_NO_RESI_DLT_H0105 1224 1224 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) ) 1225 1225 { … … 1989 1989 // get DC prediction for each segment 1990 1990 Pel apDCPredValues[2]; 1991 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108 1992 if ( getDimType( uiLumaPredMode ) == DMM1_IDX || getDimType( uiLumaPredMode ) == DMM4_IDX ) 1993 { 1994 apDCPredValues[0] = pcCU->getDmmPredictor( 0 ); 1995 apDCPredValues[1] = pcCU->getDmmPredictor( 1 ); 1996 } 1997 else 1998 #endif 1991 1999 analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode ); 1992 2000 … … 3666 3674 pcCU->setInterDirSubParts(pDBBPTmpData->auhInterDir[0], 0, 0, pcCU->getDepth(0)); // interprets depth relative to LCU level 3667 3675 3676 #if !RWTH_DBBP_NO_SPU_H0057 3668 3677 pcCU->setVSPFlagSubParts(pDBBPTmpData->ahVSPFlag[0], 0, 0, pcCU->getDepth(0)); 3669 3678 pcCU->setDvInfoSubParts(pDBBPTmpData->acDvInfo[0], 0, 0, pcCU->getDepth(0)); 3679 #endif 3670 3680 3671 3681 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) … … 3697 3707 pcCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 3698 3708 #if H_3D_VSP 3709 #if !ETRIKHU_CLEANUP_H0083 3699 3710 , vspFlag 3711 #endif 3700 3712 , inheritedVSPDisInfo 3701 3713 #endif 3702 3714 #if H_3D_SPIVMP 3703 , pbSPIVMPFlag, pcMvFieldSP, puhInterDirSP 3715 #if !ETRIKHU_CLEANUP_H0083_MISSING 3716 , pbSPIVMPFlag 3717 #endif 3718 , pcMvFieldSP, puhInterDirSP 3719 #endif 3720 , numValidMergeCand 3721 ); 3722 3723 #if ETRIKHU_CLEANUP_H0083 3724 pcCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours 3725 #if H_3D_VSP 3726 , vspFlag 3727 #endif 3728 #if H_3D_SPIVMP 3729 , pbSPIVMPFlag 3704 3730 #endif 3705 3731 , numValidMergeCand 3706 3732 ); 3733 #endif 3707 3734 #else 3708 3735 pcCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); … … 3718 3745 pcCU->xGetInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours 3719 3746 #if H_3D_VSP 3747 #if !ETRIKHU_CLEANUP_H0083 3720 3748 , vspFlag 3749 #endif 3721 3750 , inheritedVSPDisInfo 3722 3751 #endif 3723 3752 #if H_3D_SPIVMP 3724 , pbSPIVMPFlag, pcMvFieldSP, puhInterDirSP 3753 #if !ETRIKHU_CLEANUP_H0083_MISSING 3754 , pbSPIVMPFlag 3755 #endif 3756 , pcMvFieldSP, puhInterDirSP 3757 #endif 3758 , numValidMergeCand 3759 ); 3760 3761 #if ETRIKHU_CLEANUP_H0083 3762 pcCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours 3763 #if H_3D_VSP 3764 , vspFlag 3765 #endif 3766 #if H_3D_SPIVMP 3767 , pbSPIVMPFlag 3725 3768 #endif 3726 3769 , numValidMergeCand 3727 3770 ); 3771 #endif 3728 3772 #else 3729 3773 pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand -
trunk/source/Lib/TLibEncoder/TEncSlice.cpp
r872 r950 866 866 ) 867 867 { 868 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 869 pcSlice ->xSetApplyIC(pcEncTop->getUseICLowLatencyEnc()); 870 #else 868 871 pcSlice ->xSetApplyIC(); 872 #endif 869 873 if ( pcSlice->getApplyIC() ) 870 874 {
Note: See TracChangeset for help on using the changeset viewer.