Changeset 598 in 3DVCSoftware for branches/HTM-DEV-2.0-dev0/source
- Timestamp:
- 29 Aug 2013, 13:55:40 (11 years ago)
- Location:
- branches/HTM-DEV-2.0-dev0/source
- Files:
-
- 39 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-2.0-dev0/source/App/TAppDecoder/TAppDecTop.cpp
r542 r598 311 311 TComPic* picLastCoded = m_ivPicLists.getPic( m_tDecTop[dI]->getLayerId(), pocLastPic ); 312 312 assert( picLastCoded != NULL ); 313 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 314 picLastCoded->compressMotion(1); 315 #else 313 316 picLastCoded->compressMotion(); 317 #endif 314 318 } 315 319 } -
branches/HTM-DEV-2.0-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
r542 r598 505 505 #if H_3D_IC 506 506 ("IlluCompEnable", m_abUseIC, std::vector<Bool>(2, true), "Enable illumination compensation") 507 #endif 508 #if LGE_INTER_SDC_E0156 509 ("InterSDC", m_bDepthInterSDCFlag, true, "Enable depth inter SDC") 507 510 #endif 508 511 // Coding tools … … 2289 2292 printf("DLT:%d ", m_useDLT ); 2290 2293 #endif 2294 #if LGE_INTER_SDC_E0156 2295 printf( "interSDC: %d ", m_bDepthInterSDCFlag ? 1 : 0 ); 2296 #endif 2291 2297 printf("\n\n"); 2292 2298 -
branches/HTM-DEV-2.0-dev0/source/App/TAppEncoder/TAppEncCfg.h
r539 r598 432 432 Bool m_bUsePC; ///< flag for using Predictive Coding with QTL 433 433 #endif 434 #if LGE_INTER_SDC_E0156 435 Bool m_bDepthInterSDCFlag; ///< flag for inter SDC of depth map coding 436 #endif 434 437 #endif 435 438 // internal member functions -
branches/HTM-DEV-2.0-dev0/source/App/TAppEncoder/TAppEncTop.cpp
r542 r598 187 187 m_cTEncTop.setUseQTL ( isDepth ? m_bUseQTL : false ); 188 188 m_cTEncTop.setUsePC ( isDepth ? m_bUsePC : false ); 189 #endif 190 //====== Depth Inter SDC ========= 191 #if LGE_INTER_SDC_E0156 192 m_cTEncTop.setInterSDCEnable ( isDepth ? m_bDepthInterSDCFlag : false ); 189 193 #endif 190 194 #endif // H_3D … … 1225 1229 vps.setViewSynthesisPredFlag( layer, !isLayerZero && !isDepth && m_viewSynthesisPredFlag ); 1226 1230 #endif 1231 #if LGE_INTER_SDC_E0156 1232 vps.setInterSDCFlag( layer, !isLayerZero && isDepth && m_bDepthInterSDCFlag ); 1233 #endif 1227 1234 } 1228 1235 #if H_3D_TMVP -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/ContextTables.h
r531 r598 124 124 #define SDC_NUM_RESIDUAL_CTX 1 125 125 #endif 126 127 #if LGE_INTER_SDC_E0156 128 #define NUM_INTER_SDC_FLAG_CTX 1 ///< number of context models for inter SDC flag 129 #define NUM_INTER_SDC_SIGN_FLAG_CTX 1 ///< number of context models for sign of inter SDC residual 130 #define NUM_INTER_SDC_RESIDUAL_CTX 1 ///< number of context models for abs of inter SDC residual 131 #endif 126 132 // ==================================================================================================================== 127 133 // Tables … … 453 459 #endif 454 460 461 #if LGE_INTER_SDC_E0156 462 static const UChar 463 INIT_INTER_SDC_FLAG[3][NUM_INTER_SDC_FLAG_CTX] = 464 { 465 { CNU }, 466 { 154 }, 467 { 154 }, 468 }; 469 470 static const UChar 471 INIT_INTER_SDC_SIGN_FLAG[3][NUM_INTER_SDC_SIGN_FLAG_CTX] = 472 { 473 { CNU }, 474 { 154 }, 475 { 154 }, 476 }; 477 478 static const UChar 479 INIT_INTER_SDC_RESIDUAL[3][NUM_INTER_SDC_RESIDUAL_CTX] = 480 { 481 { CNU }, 482 { 154 }, 483 { 154 }, 484 }; 485 #endif 455 486 //! \} 456 487 -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r597 r598 154 154 m_pbICFlag = NULL; 155 155 #endif 156 #if LGE_INTER_SDC_E0156 157 m_pbInterSDCFlag = NULL; 158 for( Int i = 0; i < 4; i++ ) 159 { 160 m_apSegmentInterDCOffset[i] = NULL; 161 } 162 m_pucInterSDCMask = NULL; 163 #endif 156 164 } 157 165 … … 286 294 #endif 287 295 #endif 296 #if LGE_INTER_SDC_E0156 297 m_pbInterSDCFlag = (Bool* )xMalloc(Bool, uiNumPartition); 298 for( Int i = 0; i < 4; i++ ) 299 { 300 m_apSegmentInterDCOffset[i] = (Int*)xMalloc(Int, uiNumPartition); 301 } 302 #endif 288 303 } 289 304 else … … 292 307 m_acCUMvField[1].setNumPartition(uiNumPartition ); 293 308 } 294 309 #if LGE_INTER_SDC_E0156 310 m_pucInterSDCMask = (UChar* )xMalloc(UChar, g_uiMaxCUHeight*g_uiMaxCUWidth); 311 #endif 295 312 m_sliceStartCU = (UInt* )xMalloc(UInt, uiNumPartition); 296 313 m_sliceSegmentStartCU = (UInt* )xMalloc(UInt, uiNumPartition); … … 414 431 #endif 415 432 #endif 416 } 417 433 #if LGE_INTER_SDC_E0156 434 if ( m_pbInterSDCFlag ) { xFree(m_pbInterSDCFlag); m_pbInterSDCFlag = NULL; } 435 for(Int i = 0; i < 4; i++ ) 436 { 437 if ( m_apSegmentInterDCOffset[i] ) { xFree( m_apSegmentInterDCOffset[i] ); m_apSegmentInterDCOffset[i] = NULL; } 438 } 439 #endif 440 } 441 #if LGE_INTER_SDC_E0156 442 if ( m_pucInterSDCMask ) { xFree(m_pucInterSDCMask); m_pucInterSDCMask = NULL; } 443 #endif 418 444 m_pcCUAboveLeft = NULL; 419 445 m_pcCUAboveRight = NULL; … … 554 580 #if H_3D_DIM_SDC 555 581 m_pbSDCFlag[ui] = pcFrom->m_pbSDCFlag[ui]; 582 #endif 583 #if LGE_INTER_SDC_E0156 584 m_pbInterSDCFlag[ui] = pcFrom->m_pbInterSDCFlag[ui]; 556 585 #endif 557 586 } … … 626 655 memset( m_apSegmentDCOffset[1] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[1] ) ); 627 656 #endif 657 #endif 658 #if LGE_INTER_SDC_E0156 659 memset( m_pbInterSDCFlag + firstElement, 0, numElements * sizeof( *m_pbInterSDCFlag ) ); 660 for( Int i = 0; i < 4; i++ ) 661 { 662 memset( m_apSegmentInterDCOffset[i] + firstElement, 0, numElements * sizeof( *m_apSegmentInterDCOffset[i] ) ); 663 } 628 664 #endif 629 665 } … … 794 830 #endif 795 831 #endif 832 #if LGE_INTER_SDC_E0156 833 m_pbInterSDCFlag[ui] = false; 834 for( Int i = 0; i < 4; i++ ) 835 { 836 m_apSegmentInterDCOffset[i][ui] = 0; 837 } 838 #endif 796 839 } 797 840 } … … 908 951 memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition ); 909 952 #endif 953 #endif 954 #if LGE_INTER_SDC_E0156 955 memset( m_pbInterSDCFlag, 0, sizeof( Bool ) * m_uiNumPartition ); 956 for( Int i = 0; i < 4; i++ ) 957 { 958 memset( m_apSegmentInterDCOffset[i], 0, sizeof( Int ) * m_uiNumPartition ); 959 } 910 960 #endif 911 961 … … 983 1033 #endif 984 1034 #endif 1035 #if LGE_INTER_SDC_E0156 1036 m_pbInterSDCFlag [ui] = pcCU->m_pbInterSDCFlag [ uiPartOffset + ui ]; 1037 for( Int i = 0; i < 4; i++ ) 1038 { 1039 m_apSegmentInterDCOffset[i][ui] = pcCU->m_apSegmentInterDCOffset[i][ uiPartOffset + ui ]; 1040 } 1041 #endif 985 1042 } 986 1043 } … … 1141 1198 #endif 1142 1199 #endif 1200 #if LGE_INTER_SDC_E0156 1201 m_pbInterSDCFlag = pcCU->getInterSDCFlag() + uiPart; 1202 for( Int i = 0; i < 4; i++ ) 1203 { 1204 m_apSegmentInterDCOffset[i] = pcCU->getInterSDCSegmentDCOffset( i ) + uiPart; 1205 } 1206 #endif 1143 1207 m_puhDepth=pcCU->getDepth() + uiPart; 1144 1208 m_puhWidth=pcCU->getWidth() + uiPart; … … 1340 1404 #endif 1341 1405 #endif 1406 #if LGE_INTER_SDC_E0156 1407 memcpy( m_pbInterSDCFlag + uiOffset, pcCU->getInterSDCFlag(), iSizeInBool ); 1408 for( Int i = 0; i < 4; i++ ) 1409 { 1410 memcpy( m_apSegmentInterDCOffset[i] + uiOffset, pcCU->getInterSDCSegmentDCOffset( i ), sizeof( Int ) * uiNumPartition); 1411 } 1412 #endif 1342 1413 1343 1414 memcpy( m_puhDepth + uiOffset, pcCU->getDepth(), iSizeInUchar ); … … 1465 1536 memcpy( rpcCU->getSDCSegmentDCOffset(1) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[1], sizeof( Pel ) * m_uiNumPartition); 1466 1537 #endif 1538 #endif 1539 #if LGE_INTER_SDC_E0156 1540 memcpy( rpcCU->getInterSDCFlag() + m_uiAbsIdxInLCU, m_pbInterSDCFlag, iSizeInBool ); 1541 for( Int i = 0;i < 4; i++ ) 1542 { 1543 memcpy( rpcCU->getInterSDCSegmentDCOffset( i ) + m_uiAbsIdxInLCU, m_apSegmentInterDCOffset[i], sizeof( Int ) * m_uiNumPartition); 1544 } 1467 1545 #endif 1468 1546 memcpy( rpcCU->getDepth() + m_uiAbsIdxInLCU, m_puhDepth, iSizeInUchar ); … … 1576 1654 #endif 1577 1655 #endif 1656 #if LGE_INTER_SDC_E0156 1657 memcpy( rpcCU->getInterSDCFlag() + uiPartOffset, m_pbInterSDCFlag, iSizeInBool ); 1658 for( Int i = 0; i < 4; i++ ) 1659 { 1660 memcpy( rpcCU->getInterSDCSegmentDCOffset( i ) + uiPartOffset, m_apSegmentInterDCOffset[i], sizeof( Int ) * uiQNumPart); 1661 } 1662 #endif 1578 1663 memcpy( rpcCU->getDepth() + uiPartOffset, m_puhDepth, iSizeInUchar ); 1579 1664 memcpy( rpcCU->getWidth() + uiPartOffset, m_puhWidth, iSizeInUchar ); … … 2289 2374 } 2290 2375 #endif 2376 2377 #if LGE_INTER_SDC_E0156 2378 Void TComDataCU::setInterSDCFlagSubParts ( Bool bInterSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2379 { 2380 setSubPart( bInterSDCFlag, m_pbInterSDCFlag, uiAbsPartIdx, uiDepth, uiPartIdx ); 2381 } 2382 2383 UInt TComDataCU::getCtxInterSDCFlag( UInt uiAbsPartIdx ) 2384 { 2385 return 0; 2386 } 2387 2388 Void TComDataCU::xSetInterSDCCUMask( TComDataCU *pcCU, UChar *pMask ) 2389 { 2390 UInt uiWidth = pcCU->getWidth ( 0 ); 2391 UInt uiHeight = pcCU->getHeight( 0 ); 2392 UInt uiPartitionSize = pcCU->getPartitionSize( 0 ); 2393 UInt uiXOffset = 0, uiYOffset = 0; 2394 2395 switch( uiPartitionSize ) 2396 { 2397 case SIZE_2NxN: 2398 uiXOffset = uiWidth; uiYOffset = uiHeight >> 1; break; 2399 case SIZE_2NxnU: 2400 uiXOffset = uiWidth; uiYOffset = uiHeight >> 2; break; 2401 case SIZE_2NxnD: 2402 uiXOffset = uiWidth; uiYOffset = ( uiHeight >> 1 ) + ( uiHeight >> 2 ); break; 2403 case SIZE_Nx2N: 2404 uiXOffset = uiWidth >> 1; uiYOffset = uiHeight; break; 2405 case SIZE_nLx2N: 2406 uiXOffset = uiWidth >> 2; uiYOffset = uiHeight; break; 2407 case SIZE_nRx2N: 2408 uiXOffset = ( uiWidth >> 1 ) + ( uiWidth >> 2 ); uiYOffset = uiHeight; break; 2409 case SIZE_NxN: 2410 uiXOffset = uiWidth >> 1; uiYOffset = uiHeight >> 1; break; 2411 default: 2412 assert( uiPartitionSize == SIZE_2Nx2N ); 2413 uiXOffset = uiWidth; uiYOffset = uiHeight; break; 2414 } 2415 2416 UInt uiPelX, uiPelY; 2417 2418 memset( pMask, 0, uiWidth*uiHeight ); 2419 2420 //mask 2421 if( uiPartitionSize == SIZE_2NxN || uiPartitionSize == SIZE_2NxnD || uiPartitionSize == SIZE_2NxnU ) 2422 { 2423 for( uiPelY = 0; uiPelY < uiYOffset; uiPelY++ ) 2424 { 2425 for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ ) 2426 { 2427 pMask[uiPelX + uiPelY*uiWidth] = 0; 2428 } 2429 } 2430 2431 for( ; uiPelY < uiHeight; uiPelY++ ) 2432 { 2433 for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ ) 2434 { 2435 pMask[uiPelX + uiPelY*uiWidth] = 1; 2436 } 2437 } 2438 } 2439 else if( uiPartitionSize == SIZE_Nx2N || uiPartitionSize == SIZE_nLx2N || uiPartitionSize == SIZE_nRx2N ) 2440 { 2441 for( uiPelY = 0; uiPelY < uiHeight; uiPelY++ ) 2442 { 2443 for( uiPelX = 0; uiPelX < uiXOffset; uiPelX++ ) 2444 { 2445 pMask[uiPelX + uiPelY*uiWidth] = 0; 2446 } 2447 2448 for( ; uiPelX < uiWidth; uiPelX++ ) 2449 { 2450 pMask[uiPelX + uiPelY*uiWidth] = 1; 2451 } 2452 } 2453 } 2454 else if( uiPartitionSize == SIZE_NxN ) 2455 { 2456 for( uiPelY = 0; uiPelY < uiYOffset; uiPelY++ ) 2457 { 2458 for( uiPelX = 0; uiPelX < uiXOffset; uiPelX++ ) 2459 { 2460 pMask[uiPelX + uiPelY*uiWidth] = 0; 2461 } 2462 2463 for( ; uiPelX < uiWidth; uiPelX++ ) 2464 { 2465 pMask[uiPelX + uiPelY*uiWidth] = 1; 2466 } 2467 } 2468 2469 for( ; uiPelY < uiHeight; uiPelY++ ) 2470 { 2471 for( uiPelX = 0; uiPelX < uiXOffset; uiPelX++ ) 2472 { 2473 pMask[uiPelX + uiPelY*uiWidth] = 2; 2474 } 2475 2476 for( ; uiPelX < uiWidth; uiPelX++ ) 2477 { 2478 pMask[uiPelX + uiPelY*uiWidth] = 3; 2479 } 2480 } 2481 } 2482 2483 } 2484 #endif 2485 2291 2486 UInt TComDataCU::getCtxInterDir( UInt uiAbsPartIdx ) 2292 2487 { … … 3481 3676 abCandIsInter[iCount] = true; 3482 3677 puhInterDirNeighbours[iCount] = pcTextureCU->getInterDir( uiPartIdxCenter ); 3678 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 3679 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 3680 if (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0) 3681 #else 3483 3682 if( ( puhInterDirNeighbours[iCount] & 1 ) == 1 ) 3484 { 3683 #endif 3684 { 3685 #if !MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 3485 3686 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 3687 #endif 3486 3688 TComMv cMvPred = pcMvFieldNeighbours[iCount<<1].getMv(); 3487 3689 … … 3500 3702 if ( getSlice()->isInterB() ) 3501 3703 { 3704 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 3705 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3706 if (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0) 3707 #else 3502 3708 if( ( puhInterDirNeighbours[iCount] & 2 ) == 2 ) 3709 #endif 3503 3710 { 3711 #if !MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 3504 3712 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3713 #endif 3505 3714 TComMv cMvPred = pcMvFieldNeighbours[(iCount<<1)+1].getMv(); 3506 3715 #if H_3D_IC … … 3513 3722 } 3514 3723 } 3724 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 3725 puhInterDirNeighbours[iCount] = (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0)?1:0; 3726 puhInterDirNeighbours[iCount] += (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0)?2:0; 3727 #endif 3515 3728 #if H_3D_NBDV 3516 3729 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); … … 4866 5079 + ( iPartWidth/m_pcPic->getMinCUWidth() )/2]; 4867 5080 } 4868 5081 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 5082 Void TComDataCU::compressMV(int scale) 5083 #else 4869 5084 Void TComDataCU::compressMV() 4870 { 5085 #endif 5086 { 5087 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 5088 Int scaleFactor = (4 / scale ) * AMVP_DECIMATION_FACTOR / m_unitSize; 5089 #else 4871 5090 Int scaleFactor = 4 * AMVP_DECIMATION_FACTOR / m_unitSize; 5091 #endif 4872 5092 if (scaleFactor > 0) 4873 5093 { … … 5827 6047 } 5828 6048 #endif 6049 #if MTK_FAST_TEXTURE_ENCODING_E0173 6050 Void 6051 TComDataCU::getIVNStatus ( UInt uiPartIdx, DisInfo* pDInfo, Bool& bIVFMerge, Int& iIVFMaxD) 6052 { 6053 TComSlice* pcSlice = getSlice (); 6054 Int iViewIndex = pDInfo->m_aVIdxCan; 6055 //--- get base CU/PU and check prediction mode --- 6056 TComPic* pcBasePic = pcSlice->getIvPic( false, iViewIndex ); 6057 TComPicYuv* pcBaseRec = pcBasePic->getPicYuvRec (); 6058 6059 UInt uiPartAddr; 6060 Int iWidth; 6061 Int iHeight; 6062 getPartIndexAndSize( uiPartIdx, uiPartAddr, iWidth, iHeight ); 6063 6064 Int iCurrPosX, iCurrPosY; 6065 pcBaseRec->getTopLeftSamplePos( getAddr(), getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY ); 6066 6067 iCurrPosX += ( ( iWidth - 1 ) >> 1 ); 6068 iCurrPosY += ( ( iHeight - 1 ) >> 1 ); 6069 6070 Bool depthRefineFlag = false; 6071 #if H_3D_NBDV_REF 6072 depthRefineFlag = m_pcSlice->getVPS()->getDepthRefinementFlag( m_pcSlice->getLayerIdInVps() ); 6073 #endif // H_3D_NBDV_REF 6074 6075 TComMv cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 6076 6077 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); 6078 Int iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + 2 ) >> 2 )); 6079 Int iBaseLPosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX - (iWidth >> 1) + ( (cDv.getHor() + 2 ) >> 2 ) ); 6080 Int iBaseLPosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + 2 ) >> 2 )); 6081 Int iBaseRPosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + (iWidth >> 1) + 1 + ( (cDv.getHor() + 2 ) >> 2 ) ); 6082 Int iBaseRPosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + 2 ) >> 2 )); 6083 Int iBaseUPosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); 6084 Int iBaseUPosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY - (iHeight >> 1) + ( (cDv.getVer() + 2 ) >> 2 )); 6085 Int iBaseDPosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); 6086 Int iBaseDPosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + (iHeight >> 1) + 1 + ( (cDv.getVer() + 2 ) >> 2 )); 6087 6088 Int iBaseCUAddr; 6089 Int iBaseAbsPartIdx; 6090 Int iBaseLCUAddr; 6091 Int iBaseLAbsPartIdx; 6092 Int iBaseRCUAddr; 6093 Int iBaseRAbsPartIdx; 6094 Int iBaseUCUAddr; 6095 Int iBaseUAbsPartIdx; 6096 Int iBaseDCUAddr; 6097 Int iBaseDAbsPartIdx; 6098 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx ); 6099 pcBaseRec->getCUAddrAndPartIdx( iBaseLPosX , iBaseLPosY , iBaseLCUAddr, iBaseLAbsPartIdx ); 6100 pcBaseRec->getCUAddrAndPartIdx( iBaseRPosX , iBaseRPosY , iBaseRCUAddr, iBaseRAbsPartIdx ); 6101 pcBaseRec->getCUAddrAndPartIdx( iBaseUPosX , iBaseUPosY , iBaseUCUAddr, iBaseUAbsPartIdx ); 6102 pcBaseRec->getCUAddrAndPartIdx( iBaseDPosX , iBaseDPosY , iBaseDCUAddr, iBaseDAbsPartIdx ); 6103 TComDataCU* pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 6104 TComDataCU* pcBaseLCU = pcBasePic->getCU( iBaseLCUAddr ); 6105 TComDataCU* pcBaseRCU = pcBasePic->getCU( iBaseRCUAddr ); 6106 TComDataCU* pcBaseUCU = pcBasePic->getCU( iBaseUCUAddr ); 6107 TComDataCU* pcBaseDCU = pcBasePic->getCU( iBaseDCUAddr ); 6108 bIVFMerge = pcBaseLCU->getMergeFlag( iBaseLAbsPartIdx ) && pcBaseCU->getMergeFlag( iBaseAbsPartIdx ) && pcBaseRCU->getMergeFlag( iBaseRAbsPartIdx ) && pcBaseUCU->getMergeFlag( iBaseUAbsPartIdx ) && pcBaseDCU->getMergeFlag( iBaseDAbsPartIdx ); 6109 Int aiDepthL[5]; //depth level 6110 aiDepthL[0] = pcBaseCU->getDepth(iBaseAbsPartIdx); 6111 aiDepthL[1] = pcBaseLCU->getDepth(iBaseLAbsPartIdx); 6112 aiDepthL[2] = pcBaseRCU->getDepth(iBaseRAbsPartIdx); 6113 aiDepthL[3] = pcBaseUCU->getDepth(iBaseUAbsPartIdx); 6114 aiDepthL[4] = pcBaseDCU->getDepth(iBaseDAbsPartIdx); 6115 for (Int i = 0; i < 5; i++) 6116 { 6117 if (iIVFMaxD < aiDepthL[i]) 6118 iIVFMaxD = aiDepthL[i]; 6119 } 6120 } 6121 #endif 5829 6122 #if H_3D_IV_MERGE 5830 6123 Bool … … 6027 6320 #endif 6028 6321 6322 #if H_3D_FIX 6029 6323 #if H_3D_IC 6030 6324 Void TComDataCU::setICFlagSubParts( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) … … 6080 6374 return false; 6081 6375 } 6376 #endif 6082 6377 #if H_3D_DIM_DMM 6083 6378 Void TComDataCU::setDmmWedgeTabIdxSubParts( UInt tabIdx, UInt dmmType, UInt uiAbsPartIdx, UInt uiDepth ) … … 6718 7013 } 6719 7014 #endif 7015 #else 7016 #if H_3D_IC 7017 Void TComDataCU::setICFlagSubParts( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 7018 { 7019 memset( m_pbICFlag + uiAbsPartIdx, bICFlag, (m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ))*sizeof(Bool) ); 7020 } 7021 7022 Bool TComDataCU::isICFlagRequired( UInt uiAbsPartIdx ) 7023 { 7024 UInt uiPartAddr; 7025 UInt iNumbPart; 7026 7027 if( !( getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ) 7028 { 7029 return false; 7030 } 7031 7032 if( getSlice()->getIcSkipParseFlag() ) 7033 { 7034 if( getMergeFlag( uiAbsPartIdx ) && getMergeIndex( uiAbsPartIdx ) == 0 ) 7035 { 7036 return false; 7037 } 7038 } 7039 7040 if( getMergeFlag( uiAbsPartIdx ) ) 7041 { 7042 return true; 7043 } 7044 7045 7046 Int iWidth, iHeight; 7047 7048 iNumbPart = ( getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ? 1 : ( getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ? 4 : 2 ) ); 7049 7050 for(UInt i = 0; i < iNumbPart; i++) 7051 { 7052 getPartIndexAndSize( i, uiPartAddr, iWidth, iHeight, uiAbsPartIdx, true ); 7053 uiPartAddr += uiAbsPartIdx; 7054 7055 for(UInt uiRefIdx = 0; uiRefIdx < 2; uiRefIdx++) 7056 { 7057 RefPicList eRefList = uiRefIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0; 7058 Int iBestRefIdx = getCUMvField(eRefList)->getRefIdx(uiPartAddr); 7059 7060 if( ( getInterDir( uiPartAddr ) & ( uiRefIdx+1 ) ) && iBestRefIdx >= 0 && getSlice()->getViewIndex() != getSlice()->getRefPic( eRefList, iBestRefIdx )->getViewIndex() ) 7061 { 7062 return true; 7063 } 7064 } 7065 } 7066 7067 return false; 7068 } 7069 #if H_3D_DIM_DMM 7070 Void TComDataCU::setDmmWedgeTabIdxSubParts( UInt tabIdx, UInt dmmType, UInt uiAbsPartIdx, UInt uiDepth ) 7071 { 7072 UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1); 7073 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmmWedgeTabIdx[dmmType][uiAbsPartIdx+ui] = tabIdx; } 7074 } 7075 Void TComDataCU::setDmm2DeltaEndSubParts( Int iDelta, UInt uiAbsPartIdx, UInt uiDepth ) 7076 { 7077 UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1); 7078 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmm2DeltaEnd[uiAbsPartIdx+ui] = iDelta; } 7079 } 7080 Void TComDataCU::setDmm3IntraTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth ) 7081 { 7082 UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1); 7083 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmm3IntraTabIdx[uiAbsPartIdx+ui] = uiTIdx; } 7084 } 7085 #endif 7086 #if H_3D_DIM_RBC 7087 Void TComDataCU::reconPartition( UInt uiAbsPartIdx, UInt uiDepth, Bool bLeft, UChar ucStartPos, UChar ucNumEdge, UChar* pucEdgeCode, Bool* pbRegion ) 7088 { 7089 Int iWidth; 7090 Int iHeight; 7091 if( uiDepth == 0 ) 7092 { 7093 iWidth = 64; 7094 iHeight = 64; 7095 } 7096 else if( uiDepth == 1 ) 7097 { 7098 iWidth = 32; 7099 iHeight = 32; 7100 } 7101 else if( uiDepth == 2 ) 7102 { 7103 iWidth = 16; 7104 iHeight = 16; 7105 } 7106 else if( uiDepth == 3 ) 7107 { 7108 iWidth = 8; 7109 iHeight = 8; 7110 } 7111 else // uiDepth == 4 7112 { 7113 iWidth = 4; 7114 iHeight = 4; 7115 } 7116 7117 Int iPtr = 0; 7118 Int iX, iY; 7119 Int iDir = -1; 7120 Int iDiffX = 0, iDiffY = 0; 7121 7122 // 1. Edge Code -> Vert & Horz Edges 7123 Bool* pbEdge = (Bool*) xMalloc( Bool, 4 * iWidth * iHeight ); 7124 7125 for( UInt ui = 0; ui < 4 * iWidth * iHeight; ui++ ) 7126 pbEdge [ ui ] = false; 7127 7128 // Direction : left(0), right(1), top(2), bottom(3), left-top(4), right-top(5), left-bottom(6), right-bottom(7) 7129 // Code : 0deg(0), 45deg(1), -45deg(2), 90deg(3), -90deg(4), 135deg(5), -135deg(6) 7130 const UChar tableDir[8][7] = { { 0, 6, 4, 3, 2, 7, 5 }, 7131 { 1, 5, 7, 2, 3, 4, 6 }, 7132 { 2, 4, 5, 0, 1, 6, 7 }, 7133 { 3, 7, 6, 1, 0, 5, 4 }, 7134 { 4, 0, 2, 6, 5, 3, 1 }, 7135 { 5, 2, 1, 4, 7, 0, 3 }, 7136 { 6, 3, 0, 7, 4, 1, 2 }, 7137 { 7, 1, 3, 5, 6, 2, 0 }}; 7138 7139 UChar ucCode = pucEdgeCode[iPtr++]; 7140 7141 if( !bLeft ) 7142 { 7143 iX = ucStartPos; 7144 iY = 0; 7145 7146 switch(ucCode) 7147 { 7148 case 0: // bottom 7149 iDir = 3; 7150 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 7151 break; 7152 case 2: // left-bottom 7153 iDir = 6; 7154 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 7155 break; 7156 case 1: // right-bottom 7157 iDir = 7; 7158 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 7159 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7160 break; 7161 case 4: // left 7162 iDir = 0; 7163 assert(false); 7164 break; 7165 case 3: // right 7166 iDir = 1; 7167 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 7168 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7169 break; 7170 } 7171 } 7172 else 7173 { 7174 iX = 0; 7175 iY = ucStartPos; 7176 7177 switch(ucCode) 7178 { 7179 case 0: // right 7180 iDir = 1; 7181 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7182 break; 7183 case 1: // right-top 7184 iDir = 5; 7185 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7186 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 7187 break; 7188 case 2: // right-bottom 7189 iDir = 7; 7190 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7191 break; 7192 case 3: // top 7193 iDir = 2; 7194 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7195 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 7196 break; 7197 case 4: // bottom 7198 iDir = 3; 7199 assert(false); 7200 break; 7201 } 7202 } 7203 7204 switch( iDir ) 7205 { 7206 case 0: // left 7207 iDiffX = -1; 7208 iDiffY = 0; 7209 break; 7210 case 1: // right 7211 iDiffX = +1; 7212 iDiffY = 0; 7213 break; 7214 case 2: // top 7215 iDiffX = 0; 7216 iDiffY = -1; 7217 break; 7218 case 3: // bottom 7219 iDiffX = 0; 7220 iDiffY = +1; 7221 break; 7222 case 4: // left-top 7223 iDiffX = -1; 7224 iDiffY = -1; 7225 break; 7226 case 5: // right-top 7227 iDiffX = +1; 7228 iDiffY = -1; 7229 break; 7230 case 6: // left-bottom 7231 iDiffX = -1; 7232 iDiffY = +1; 7233 break; 7234 case 7: // right-bottom 7235 iDiffX = +1; 7236 iDiffY = +1; 7237 break; 7238 } 7239 7240 iX += iDiffX; 7241 iY += iDiffY; 7242 7243 while( iPtr < ucNumEdge ) 7244 { 7245 ucCode = pucEdgeCode[iPtr++]; 7246 7247 Int iNewDir = tableDir[iDir][ucCode]; 7248 7249 switch( iNewDir ) 7250 { 7251 case 0: // left 7252 iDiffX = -1; 7253 iDiffY = 0; 7254 break; 7255 case 1: // right 7256 iDiffX = +1; 7257 iDiffY = 0; 7258 break; 7259 case 2: // top 7260 iDiffX = 0; 7261 iDiffY = -1; 7262 break; 7263 case 3: // bottom 7264 iDiffX = 0; 7265 iDiffY = +1; 7266 break; 7267 case 4: // left-top 7268 iDiffX = -1; 7269 iDiffY = -1; 7270 break; 7271 case 5: // right-top 7272 iDiffX = +1; 7273 iDiffY = -1; 7274 break; 7275 case 6: // left-bottom 7276 iDiffX = -1; 7277 iDiffY = +1; 7278 break; 7279 case 7: // right-bottom 7280 iDiffX = +1; 7281 iDiffY = +1; 7282 break; 7283 } 7284 7285 switch( iDir ) 7286 { 7287 case 0: // left 7288 switch( ucCode ) 7289 { 7290 case 0: 7291 case 2: 7292 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 7293 break; 7294 case 1: 7295 case 3: 7296 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 7297 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 7298 break; 7299 case 4: 7300 case 6: 7301 // no 7302 break; 7303 case 5: 7304 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 7305 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7306 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 7307 break; 7308 } 7309 break; 7310 case 1: // right 7311 switch( ucCode ) 7312 { 7313 case 0: 7314 case 2: 7315 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7316 break; 7317 case 1: 7318 case 3: 7319 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7320 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 7321 break; 7322 case 4: 7323 case 6: 7324 // no 7325 break; 7326 case 5: 7327 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 7328 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7329 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 7330 break; 7331 } 7332 break; 7333 case 2: // top 7334 switch( ucCode ) 7335 { 7336 case 0: 7337 case 2: 7338 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 7339 break; 7340 case 1: 7341 case 3: 7342 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 7343 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 7344 break; 7345 case 4: 7346 case 6: 7347 // no 7348 break; 7349 case 5: 7350 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 7351 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 7352 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 7353 break; 7354 } 7355 break; 7356 case 3: // bottom 7357 switch( ucCode ) 7358 { 7359 case 0: 7360 case 2: 7361 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 7362 break; 7363 case 1: 7364 case 3: 7365 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 7366 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7367 break; 7368 case 4: 7369 case 6: 7370 // no 7371 break; 7372 case 5: 7373 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 7374 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 7375 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7376 break; 7377 } 7378 break; 7379 case 4: // left-top 7380 switch( ucCode ) 7381 { 7382 case 0: 7383 case 1: 7384 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 7385 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 7386 break; 7387 case 2: 7388 case 4: 7389 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 7390 break; 7391 case 3: 7392 case 5: 7393 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 7394 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 7395 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 7396 break; 7397 case 6: 7398 // no 7399 break; 7400 } 7401 break; 7402 case 5: // right-top 7403 switch( ucCode ) 7404 { 7405 case 0: 7406 case 1: 7407 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7408 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 7409 break; 7410 case 2: 7411 case 4: 7412 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7413 break; 7414 case 3: 7415 case 5: 7416 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 7417 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7418 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 7419 break; 7420 case 6: 7421 // no 7422 break; 7423 } 7424 break; 7425 case 6: // left-bottom 7426 switch( ucCode ) 7427 { 7428 case 0: 7429 case 1: 7430 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 7431 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 7432 break; 7433 case 2: 7434 case 4: 7435 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 7436 break; 7437 case 3: 7438 case 5: 7439 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true; 7440 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 7441 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7442 break; 7443 case 6: 7444 // no 7445 break; 7446 } 7447 break; 7448 case 7: // right-bottom 7449 switch( ucCode ) 7450 { 7451 case 0: 7452 case 1: 7453 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7454 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 7455 break; 7456 case 2: 7457 case 4: 7458 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 7459 break; 7460 case 3: 7461 case 5: 7462 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true; 7463 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true; 7464 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true; 7465 break; 7466 case 6: 7467 // no 7468 break; 7469 } 7470 break; 7471 } 7472 7473 assert( iX >= 0 && iX <= iWidth ); 7474 assert( iY >= 0 && iY <= iHeight ); 7475 7476 iX += iDiffX; 7477 iY += iDiffY; 7478 iDir = iNewDir; 7479 } 7480 7481 // finalize edge chain 7482 if( iX == iWidth-1 ) 7483 { 7484 if( iY == 0 ) 7485 { 7486 if( iDir == 1 ) 7487 { 7488 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true; 7489 } 7490 else if( iDir == 5 ) 7491 { 7492 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true; 7493 } 7494 else 7495 { 7496 assert(false); 7497 } 7498 } 7499 else if( iY == iHeight-1 ) 7500 { 7501 if( iDir == 3 ) 7502 { 7503 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true; 7504 } 7505 else if( iDir == 7 ) 7506 { 7507 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true; 7508 } 7509 else 7510 { 7511 assert(false); 7512 } 7513 } 7514 else 7515 { 7516 if( iDir == 1 ) 7517 { 7518 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true; 7519 } 7520 else if( iDir == 3 ) 7521 { 7522 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true; 7523 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true; 7524 } 7525 else if( iDir == 5 ) 7526 { 7527 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true; 7528 } 7529 else if( iDir == 7 ) 7530 { 7531 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true; 7532 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true; 7533 } 7534 else 7535 { 7536 assert(false); 7537 } 7538 } 7539 } 7540 else if( iX == 0 ) 7541 { 7542 if( iY == 0 ) 7543 { 7544 if( iDir == 2 ) 7545 { 7546 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true; 7547 } 7548 else if( iDir == 4 ) 7549 { 7550 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true; 7551 } 7552 else 7553 { 7554 assert(false); 7555 } 7556 } 7557 else if( iY == iHeight-1 ) 7558 { 7559 if( iDir == 0 ) 7560 { 7561 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true; 7562 } 7563 else if( iDir == 6 ) 7564 { 7565 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true; 7566 } 7567 else 7568 { 7569 assert(false); 7570 } 7571 } 7572 else 7573 { 7574 if( iDir == 0 ) 7575 { 7576 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true; 7577 } 7578 else if( iDir == 2 ) 7579 { 7580 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true; 7581 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true; 7582 } 7583 else if( iDir == 4 ) 7584 { 7585 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true; 7586 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true; 7587 } 7588 else if( iDir == 6 ) 7589 { 7590 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true; 7591 } 7592 else 7593 { 7594 assert(false); 7595 } 7596 } 7597 } 7598 else if( iY == 0 ) 7599 { 7600 if( iDir == 1 ) 7601 { 7602 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true; 7603 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true; 7604 } 7605 else if( iDir == 2 ) 7606 { 7607 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true; 7608 } 7609 else if( iDir == 4 ) 7610 { 7611 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true; 7612 } 7613 else if( iDir == 5 ) 7614 { 7615 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true; 7616 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true; 7617 } 7618 else 7619 { 7620 assert(false); 7621 } 7622 } 7623 else if( iY == iHeight-1 ) 7624 { 7625 if( iDir == 0 ) 7626 { 7627 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true; 7628 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true; 7629 } 7630 else if( iDir == 3 ) 7631 { 7632 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true; 7633 } 7634 else if( iDir == 6 ) 7635 { 7636 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true; 7637 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true; 7638 } 7639 else if( iDir == 7 ) 7640 { 7641 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true; 7642 } 7643 else 7644 { 7645 assert(false); 7646 } 7647 } 7648 else 7649 { 7650 printf("reconPartiton: wrong termination\n"); 7651 assert(false); 7652 } 7653 7654 // Reconstruct Region from Chain Code 7655 Bool* pbVisit = (Bool*) xMalloc( Bool, iWidth * iHeight ); 7656 Int* piStack = (Int* ) xMalloc( Int, iWidth * iHeight ); 7657 7658 for( UInt ui = 0; ui < iWidth * iHeight; ui++ ) 7659 { 7660 pbRegion[ ui ] = true; // fill it as region 1 (we'll discover region 0 next) 7661 pbVisit [ ui ] = false; 7662 } 7663 7664 iPtr = 0; 7665 piStack[iPtr++] = (0 << 8) | (0); 7666 pbRegion[ 0 ] = false; 7667 7668 while(iPtr > 0) 7669 { 7670 Int iTmp = piStack[--iPtr]; 7671 Int iX1, iY1; 7672 iX1 = iTmp & 0xff; 7673 iY1 = (iTmp >> 8) & 0xff; 7674 7675 pbVisit[ iX1 + iY1 * iWidth ] = true; 7676 7677 assert( iX1 >= 0 && iX1 < iWidth ); 7678 assert( iY1 >= 0 && iY1 < iHeight ); 7679 7680 if( iX1 > 0 && !pbEdge[ 2 * iX1 - 1 + 4 * iY1 * iWidth ] && !pbVisit[ iX1 - 1 + iY1 * iWidth ] ) 7681 { 7682 piStack[iPtr++] = (iY1 << 8) | (iX1 - 1); 7683 pbRegion[ iX1 - 1 + iY1 * iWidth ] = false; 7684 } 7685 if( iX1 < iWidth - 1 && !pbEdge[ 2 * iX1 + 1 + 4 * iY1 * iWidth ] && !pbVisit[ iX1 + 1 + iY1 * iWidth ] ) 7686 { 7687 piStack[iPtr++] = (iY1 << 8) | (iX1 + 1); 7688 pbRegion[ iX1 + 1 + iY1 * iWidth ] = false; 7689 } 7690 if( iY1 > 0 && !pbEdge[ 2 * iX1 + 2 * (2 * iY1 - 1) * iWidth ] && !pbVisit[ iX1 + (iY1 - 1) * iWidth ] ) 7691 { 7692 piStack[iPtr++] = ((iY1 - 1) << 8) | iX1; 7693 pbRegion[ iX1 + (iY1 - 1) * iWidth ] = false; 7694 } 7695 if( iY1 < iHeight - 1 && !pbEdge[ 2 * iX1 + 2 * (2 * iY1 + 1) * iWidth ] && !pbVisit[ iX1 + (iY1 + 1) * iWidth ] ) 7696 { 7697 piStack[iPtr++] = ((iY1 + 1) << 8) | iX1; 7698 pbRegion[ iX1 + (iY1 + 1) * iWidth ] = false; 7699 } 7700 } 7701 7702 xFree( pbEdge ); 7703 xFree( pbVisit ); 7704 xFree( piStack ); 7705 } 7706 #endif 7707 #endif 6720 7708 #endif 6721 7709 -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComDataCU.h
r597 r598 226 226 #endif 227 227 #endif 228 #if LGE_INTER_SDC_E0156 229 Bool* m_pbInterSDCFlag; 230 Int* m_apSegmentInterDCOffset[4]; 231 UChar* m_pucInterSDCMask; 232 #endif 228 233 229 234 // ------------------------------------------------------------------------------------------------------------------- … … 508 513 #endif //H_3D_NBDV_REF 509 514 #endif 515 #if MTK_FAST_TEXTURE_ENCODING_E0173 516 Void getIVNStatus ( UInt uiPartIdx, DisInfo* pDInfo, Bool& bIVFMerge, Int& iIVFMaxD); 517 #endif 510 518 #if H_3D_IV_MERGE 511 519 Bool getInterViewMergeCands ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc ); … … 586 594 #endif 587 595 #endif 596 #if LGE_INTER_SDC_E0156 597 Bool* getInterSDCFlag () { return m_pbInterSDCFlag; } 598 Bool getInterSDCFlag ( UInt uiIdx ) { return m_pbInterSDCFlag[uiIdx]; } 599 Void setInterSDCFlagSubParts ( Bool bInterSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 600 UInt getCtxInterSDCFlag ( UInt uiAbsPartIdx ); 601 Int* getInterSDCSegmentDCOffset( UInt uiSeg ) { return m_apSegmentInterDCOffset[uiSeg]; } 602 Int getInterSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentInterDCOffset[uiSeg][uiPartIdx]; } 603 Void setInterSDCSegmentDCOffset( Int pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentInterDCOffset[uiSeg][uiPartIdx] = pOffset; } 604 605 Void xSetInterSDCCUMask( TComDataCU *pcCU, UChar *pMask ); 606 607 UChar* getInterSDCMask () { return m_pucInterSDCMask; } 608 #endif 588 609 589 610 // ------------------------------------------------------------------------------------------------------------------- … … 611 632 Void getMvPredAbove ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldB.getMv(); } 612 633 Void getMvPredAboveRight ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldC.getMv(); } 613 634 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 635 Void compressMV (int scale); 636 #else 614 637 Void compressMV (); 615 638 #endif 616 639 // ------------------------------------------------------------------------------------------------------------------- 617 640 // utility functions for neighbouring information -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComPattern.h
r504 r598 102 102 Bool m_bICFlag; 103 103 #endif 104 #if LGE_INTER_SDC_E0156 105 Bool m_bSDCMRSADFlag; 106 #endif 104 107 static const UChar m_aucIntraFilter[5]; 105 108 … … 115 118 Bool getICFlag() { return m_bICFlag; } 116 119 Void setICFlag( Bool bICFlag ) { m_bICFlag = bICFlag; } 120 #endif 121 #if LGE_INTER_SDC_E0156 122 Bool getSDCMRSADFlag() { return m_bSDCMRSADFlag; } 123 Void setSDCMRSADFlag( Bool bSDCMRSADFlag ) { m_bSDCMRSADFlag = bSDCMRSADFlag; } 117 124 #endif 118 125 -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComPic.cpp
r597 r598 146 146 deleteSEIs(m_SEIs); 147 147 } 148 148 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 149 Void TComPic::compressMotion(int scale) 150 #else 149 151 Void TComPic::compressMotion() 152 #endif 150 153 { 151 154 TComPicSym* pPicSym = getPicSym(); … … 153 156 { 154 157 TComDataCU* pcCU = pPicSym->getCU(uiCUAddr); 158 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 159 pcCU->compressMV(scale); 160 #else 155 161 pcCU->compressMV(); 162 #endif 156 163 } 157 164 } -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComPic.h
r597 r598 36 36 */ 37 37 38 38 39 #ifndef __TCOMPIC__ 39 40 #define __TCOMPIC__ … … 185 186 Void setNumReorderPics(Int i, UInt tlayer) { m_numReorderPics[tlayer] = i; } 186 187 Int getNumReorderPics(UInt tlayer) { return m_numReorderPics[tlayer]; } 187 188 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 189 Void compressMotion(int scale); 190 #else 188 191 Void compressMotion(); 192 #endif 189 193 UInt getCurrSliceIdx() { return m_uiCurrSliceIdx; } 190 194 Void setCurrSliceIdx(UInt i) { m_uiCurrSliceIdx = i; } -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComPrediction.cpp
r597 r598 39 39 #include "TComPrediction.h" 40 40 41 #if SHARP_ILLUCOMP_REFINE_E0046 42 #define IC_REG_COST_SHIFT 7 43 #define IC_CONST_SHIFT 5 44 #define IC_SHIFT_DIFF 12 45 #endif 46 41 47 //! \ingroup TLibCommon 42 48 //! \{ … … 137 143 } 138 144 #if H_3D_IC 145 #if SHARP_ILLUCOMP_REFINE_E0046 146 m_uiaShift[0] = 0; 139 147 for( Int i = 1; i < 64; i++ ) 140 148 { 149 m_uiaShift[i] = ( (1 << 15) + i/2 ) / i; 150 } 151 #else 152 for( Int i = 1; i < 64; i++ ) 153 { 141 154 m_uiaShift[i-1] = ( (1 << 15) + i/2 ) / i; 142 155 } 156 #endif 143 157 #endif 144 158 } … … 685 699 #endif 686 700 , bICFlag ); 701 #if SHARP_ILLUCOMP_REFINE_E0046 702 bICFlag = bICFlag && (iWidth > 8); 703 #endif 687 704 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi 688 705 #if H_3D_ARP … … 970 987 if ( yFrac == 0 ) 971 988 { 989 #if MTK_CLIPPING_ALIGN_IC_E0168 990 m_if.filterHorLuma( ref, refStride, dst, dstStride, width, height, xFrac, !bi || bICFlag 991 #else 972 992 m_if.filterHorLuma( ref, refStride, dst, dstStride, width, height, xFrac, !bi 993 #endif 973 994 #if H_3D_ARP 974 995 , filterType … … 978 999 else if ( xFrac == 0 ) 979 1000 { 1001 #if MTK_CLIPPING_ALIGN_IC_E0168 1002 m_if.filterVerLuma( ref, refStride, dst, dstStride, width, height, yFrac, true, !bi || bICFlag 1003 #else 980 1004 m_if.filterVerLuma( ref, refStride, dst, dstStride, width, height, yFrac, true, !bi 1005 #endif 981 1006 #if H_3D_ARP 982 1007 , filterType … … 997 1022 #endif 998 1023 ); 1024 #if MTK_CLIPPING_ALIGN_IC_E0168 1025 m_if.filterVerLuma(tmp + (halfFilterSize-1)*tmpStride, tmpStride, dst, dstStride, width, height, yFrac, false, !bi || bICFlag 1026 #else 999 1027 m_if.filterVerLuma(tmp + (halfFilterSize-1)*tmpStride, tmpStride, dst, dstStride, width, height, yFrac, false, !bi 1028 #endif 1000 1029 #if H_3D_ARP 1001 1030 , filterType … … 1007 1036 if( bICFlag ) 1008 1037 { 1038 #if SHARP_ILLUCOMP_REFINE_E0046 1039 Int a, b, i, j; 1040 const Int iShift = IC_CONST_SHIFT; 1041 1042 xGetLLSICPrediction( cu, mv, refPic, a, b, TEXT_LUMA ); 1043 #else 1009 1044 Int a, b, iShift, i, j; 1010 1045 1011 1046 xGetLLSICPrediction( cu, mv, refPic, a, b, iShift, TEXT_LUMA ); 1047 #endif 1048 1012 1049 1013 1050 for ( i = 0; i < height; i++ ) … … 1015 1052 for ( j = 0; j < width; j++ ) 1016 1053 { 1054 #if !MTK_CLIPPING_ALIGN_IC_E0168 1017 1055 if( bi ) 1018 1056 { … … 1021 1059 } 1022 1060 else 1061 #endif 1023 1062 dst[j] = Clip3( 0, ( 1 << g_bitDepthY ) - 1, ( ( a*dst[j] ) >> iShift ) + b ); 1024 1063 } 1025 1064 dst += dstStride; 1026 1065 } 1066 #if MTK_CLIPPING_ALIGN_IC_E0168 1067 if(bi) 1068 { 1069 Pel *dst2 = dstPic->getLumaAddr( partAddr ); 1070 Int shift = IF_INTERNAL_PREC - g_bitDepthY; 1071 for (i = 0; i < height; i++) 1072 { 1073 for (j = 0; j < width; j++) 1074 { 1075 Short val = dst2[j] << shift; 1076 dst2[j] = val - (Short)IF_INTERNAL_OFFS; 1077 } 1078 dst2 += dstStride; 1079 } 1080 } 1081 #endif 1027 1082 } 1028 1083 #endif … … 1075 1130 if ( yFrac == 0 ) 1076 1131 { 1132 #if MTK_CLIPPING_ALIGN_IC_E0168 1133 m_if.filterHorChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, xFrac, !bi || bICFlag 1134 #else 1077 1135 m_if.filterHorChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, xFrac, !bi 1136 #endif 1078 1137 #if H_3D_ARP 1079 1138 , filterType 1080 1139 #endif 1081 1140 ); 1141 #if MTK_CLIPPING_ALIGN_IC_E0168 1142 m_if.filterHorChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, xFrac, !bi || bICFlag 1143 #else 1082 1144 m_if.filterHorChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, xFrac, !bi 1145 #endif 1083 1146 #if H_3D_ARP 1084 1147 , filterType … … 1088 1151 else if ( xFrac == 0 ) 1089 1152 { 1153 #if MTK_CLIPPING_ALIGN_IC_E0168 1154 m_if.filterVerChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, yFrac, true, !bi || bICFlag 1155 #else 1090 1156 m_if.filterVerChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, yFrac, true, !bi 1157 #endif 1091 1158 #if H_3D_ARP 1092 1159 , filterType 1093 1160 #endif 1094 1161 ); 1162 #if MTK_CLIPPING_ALIGN_IC_E0168 1163 m_if.filterVerChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, yFrac, true, !bi || bICFlag 1164 #else 1095 1165 m_if.filterVerChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, yFrac, true, !bi 1166 #endif 1096 1167 #if H_3D_ARP 1097 1168 , filterType … … 1106 1177 #endif 1107 1178 ); 1179 #if MTK_CLIPPING_ALIGN_IC_E0168 1180 m_if.filterVerChroma(extY + (halfFilterSize-1)*extStride, extStride, dstCb, dstStride, cxWidth, cxHeight , yFrac, false, !bi || bICFlag 1181 #else 1108 1182 m_if.filterVerChroma(extY + (halfFilterSize-1)*extStride, extStride, dstCb, dstStride, cxWidth, cxHeight , yFrac, false, !bi 1183 #endif 1109 1184 #if H_3D_ARP 1110 1185 , filterType … … 1117 1192 #endif 1118 1193 ); 1194 #if MTK_CLIPPING_ALIGN_IC_E0168 1195 m_if.filterVerChroma(extY + (halfFilterSize-1)*extStride, extStride, dstCr, dstStride, cxWidth, cxHeight , yFrac, false, !bi || bICFlag 1196 #else 1119 1197 m_if.filterVerChroma(extY + (halfFilterSize-1)*extStride, extStride, dstCr, dstStride, cxWidth, cxHeight , yFrac, false, !bi 1198 #endif 1120 1199 #if H_3D_ARP 1121 1200 , filterType … … 1127 1206 if( bICFlag ) 1128 1207 { 1208 #if SHARP_ILLUCOMP_REFINE_E0046 1209 Int a, b, i, j; 1210 const Int iShift = IC_CONST_SHIFT; 1211 xGetLLSICPrediction( cu, mv, refPic, a, b, TEXT_CHROMA_U ); // Cb 1212 #else 1129 1213 Int a, b, iShift, i, j; 1130 1214 xGetLLSICPrediction( cu, mv, refPic, a, b, iShift, TEXT_CHROMA_U ); // Cb 1215 #endif 1131 1216 for ( i = 0; i < cxHeight; i++ ) 1132 1217 { 1133 1218 for ( j = 0; j < cxWidth; j++ ) 1134 1219 { 1220 #if !MTK_CLIPPING_ALIGN_IC_E0168 1135 1221 if( bi ) 1136 1222 { … … 1139 1225 } 1140 1226 else 1227 #endif 1141 1228 dstCb[j] = Clip3( 0, ( 1 << g_bitDepthC ) - 1, ( ( a*dstCb[j] ) >> iShift ) + b ); 1142 1229 } 1143 1230 dstCb += dstStride; 1144 1231 } 1232 #if SHARP_ILLUCOMP_REFINE_E0046 1233 xGetLLSICPrediction( cu, mv, refPic, a, b, TEXT_CHROMA_V ); // Cr 1234 #else 1145 1235 xGetLLSICPrediction( cu, mv, refPic, a, b, iShift, TEXT_CHROMA_V ); // Cr 1236 #endif 1146 1237 for ( i = 0; i < cxHeight; i++ ) 1147 1238 { 1148 1239 for ( j = 0; j < cxWidth; j++ ) 1149 1240 { 1241 #if !MTK_CLIPPING_ALIGN_IC_E0168 1150 1242 if( bi ) 1151 1243 { … … 1154 1246 } 1155 1247 else 1248 #endif 1156 1249 dstCr[j] = Clip3( 0, ( 1 << g_bitDepthC ) - 1, ( ( a*dstCr[j] ) >> iShift ) + b ); 1157 1250 } 1158 1251 dstCr += dstStride; 1159 1252 } 1253 #if MTK_CLIPPING_ALIGN_IC_E0168 1254 if(bi) 1255 { 1256 Pel* dstCb2 = dstPic->getCbAddr( partAddr ); 1257 Pel* dstCr2 = dstPic->getCrAddr( partAddr ); 1258 Int shift = IF_INTERNAL_PREC - g_bitDepthC; 1259 for (i = 0; i < cxHeight; i++) 1260 { 1261 for (j = 0; j < cxWidth; j++) 1262 { 1263 Short val = dstCb2[j] << shift; 1264 dstCb2[j] = val - (Short)IF_INTERNAL_OFFS; 1265 1266 val = dstCr2[j] << shift; 1267 dstCr2[j] = val - (Short)IF_INTERNAL_OFFS; 1268 } 1269 dstCb2 += dstStride; 1270 dstCr2 += dstStride; 1271 } 1272 } 1273 #endif 1160 1274 } 1161 1275 #endif … … 1306 1420 } 1307 1421 1422 #if !SHARP_ILLUCOMP_REFINE_E0046 1308 1423 /** Function for counting leading number of zeros/ones 1309 1424 * \param x input value … … 1347 1462 return clz; 1348 1463 } 1464 #endif 1349 1465 1350 1466 /** Function for deriving LM illumination compensation. 1351 1467 */ 1468 #if SHARP_ILLUCOMP_REFINE_E0046 1469 Void TComPrediction::xGetLLSICPrediction( TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, TextType eType ) 1470 #else 1352 1471 Void TComPrediction::xGetLLSICPrediction( TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, Int &iShift, TextType eType ) 1472 #endif 1353 1473 { 1354 1474 TComPicYuv *pRecPic = pcCU->getPic()->getPicYuvRec(); … … 1378 1498 1379 1499 Int x = 0, y = 0, xx = 0, xy = 0; 1500 #if SHARP_ILLUCOMP_REFINE_E0046 1501 Int precShift = std::max(0, (( eType == TEXT_LUMA ) ? g_bitDepthY : g_bitDepthC) - 12); 1502 #endif 1380 1503 1381 1504 if( pcCU->getPUAbove( uiTmpPartIdx, pcCU->getZorderIdxInCU() ) && iCUPelY > 0 && iRefY > 0 ) … … 1399 1522 } 1400 1523 1524 #if SHARP_ILLUCOMP_REFINE_E0046 1525 for( j = 0; j < uiWidth; j+=2 ) 1526 #else 1401 1527 for( j = 0; j < uiWidth; j++ ) 1528 #endif 1402 1529 { 1403 1530 x += pRef[j]; 1404 1531 y += pRec[j]; 1532 #if SHARP_ILLUCOMP_REFINE_E0046 1533 xx += (pRef[j] * pRef[j])>>precShift; 1534 xy += (pRef[j] * pRec[j])>>precShift; 1535 #else 1405 1536 xx += pRef[j] * pRef[j]; 1406 1537 xy += pRef[j] * pRec[j]; 1407 } 1538 #endif 1539 } 1540 #if SHARP_ILLUCOMP_REFINE_E0046 1541 iCountShift += g_aucConvertToBit[ uiWidth ] + 1; 1542 #else 1408 1543 iCountShift += g_aucConvertToBit[ uiWidth ] + 2; 1544 #endif 1409 1545 } 1410 1546 … … 1430 1566 } 1431 1567 1568 #if SHARP_ILLUCOMP_REFINE_E0046 1569 for( i = 0; i < uiHeight; i+=2 ) 1570 #else 1432 1571 for( i = 0; i < uiHeight; i++ ) 1572 #endif 1433 1573 { 1434 1574 x += pRef[0]; 1435 1575 y += pRec[0]; 1576 #if SHARP_ILLUCOMP_REFINE_E0046 1577 xx += (pRef[0] * pRef[0])>>precShift; 1578 xy += (pRef[0] * pRec[0])>>precShift; 1579 1580 pRef += iRefStride*2; 1581 pRec += iRecStride*2; 1582 #else 1436 1583 xx += pRef[0] * pRef[0]; 1437 1584 xy += pRef[0] * pRec[0]; … … 1439 1586 pRef += iRefStride; 1440 1587 pRec += iRecStride; 1441 } 1588 #endif 1589 } 1590 #if SHARP_ILLUCOMP_REFINE_E0046 1591 iCountShift += iCountShift > 0 ? 1 : ( g_aucConvertToBit[ uiWidth ] + 1 ); 1592 #else 1442 1593 iCountShift += iCountShift > 0 ? 1 : ( g_aucConvertToBit[ uiWidth ] + 2 ); 1443 } 1444 1594 #endif 1595 } 1596 1597 #if SHARP_ILLUCOMP_REFINE_E0046 1598 xy += xx >> IC_REG_COST_SHIFT; 1599 xx += xx >> IC_REG_COST_SHIFT; 1600 Int a1 = ( xy << iCountShift ) - ((y * x) >> precShift); 1601 Int a2 = ( xx << iCountShift ) - ((x * x) >> precShift); 1602 const Int iShift = IC_CONST_SHIFT; 1603 { 1604 #else 1445 1605 Int iTempShift = ( ( eType == TEXT_LUMA ) ? g_bitDepthY : g_bitDepthC ) + g_aucConvertToBit[ uiWidth ] + 3 - 15; 1446 1606 … … 1466 1626 Int a1 = ( xy << iCountShift ) - y * x; 1467 1627 Int a2 = ( xx << iCountShift ) - x * x; 1468 1628 #endif 1469 1629 { 1470 1630 const Int iShiftA2 = 6; 1631 #if !SHARP_ILLUCOMP_REFINE_E0046 1471 1632 const Int iShiftA1 = 15; 1633 #endif 1472 1634 const Int iAccuracyShift = 15; 1473 1635 … … 1477 1639 Int a2s = a2; 1478 1640 1641 #if SHARP_ILLUCOMP_REFINE_E0046 1642 a1 = Clip3(0, 2*a2, a1); 1643 iScaleShiftA2 = GetMSB( abs( a2 ) ) - iShiftA2; 1644 iScaleShiftA1 = iScaleShiftA2 - IC_SHIFT_DIFF; 1645 #else 1479 1646 iScaleShiftA1 = GetMSB( abs( a1 ) ) - iShiftA1; 1480 1647 iScaleShiftA2 = GetMSB( abs( a2 ) ) - iShiftA2; 1648 #endif 1481 1649 1482 1650 if( iScaleShiftA1 < 0 ) … … 1492 1660 Int iScaleShiftA = iScaleShiftA2 + iAccuracyShift - iShift - iScaleShiftA1; 1493 1661 1662 1494 1663 a2s = a2 >> iScaleShiftA2; 1495 1664 1496 1665 a1s = a1 >> iScaleShiftA1; 1497 1666 1667 #if SHARP_ILLUCOMP_REFINE_E0046 1668 a = a1s * m_uiaShift[ a2s ]; 1669 a = a >> iScaleShiftA; 1670 #else 1498 1671 if (a2s >= 1) 1499 1672 { … … 1528 1701 iShift -= (9-n); 1529 1702 } 1530 1703 #endif 1531 1704 b = ( y - ( ( a * x ) >> iShift ) + ( 1 << ( iCountShift - 1 ) ) ) >> iCountShift; 1532 1705 } -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComPrediction.h
r597 r598 76 76 Int m_iLumaRecStride; ///< stride of #m_pLumaRecBuffer array 77 77 #if H_3D_IC 78 #if SHARP_ILLUCOMP_REFINE_E0046 79 UInt m_uiaShift[ 64 ]; // Table for multiplication to substitue of division operation 80 #else 78 81 UInt m_uiaShift[ 63 ]; // Table for multiplication to substitue of division operation 82 #endif 79 83 #endif 80 84 … … 136 140 Void xGetLLSPrediction ( TComPattern* pcPattern, Int* pSrc0, Int iSrcStride, Pel* pDst0, Int iDstStride, UInt uiWidth, UInt uiHeight, UInt uiExt0 ); 137 141 #if H_3D_IC 142 #if SHARP_ILLUCOMP_REFINE_E0046 143 Void xGetLLSICPrediction( TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, TextType eType ); 144 #else 138 145 Void xGetLLSICPrediction( TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, Int &iShift, TextType eType ); 146 #endif 139 147 #endif 140 148 Void xDCPredFiltering( Int* pSrc, Int iSrcStride, Pel*& rpDst, Int iDstStride, Int iWidth, Int iHeight ); -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComRdCost.cpp
r537 r598 505 505 cDtParam.bUseIC = false; 506 506 #endif 507 #if LGE_INTER_SDC_E0156 508 cDtParam.bUseSDCMRSAD = false; 509 #endif 507 510 #if WEIGHTED_CHROMA_DISTORTION 508 511 if (eText == TEXT_CHROMA_U) … … 608 611 } 609 612 #endif 613 #if LGE_INTER_SDC_E0156 614 if( pcDtParam->bUseSDCMRSAD ) 615 { 616 return xGetSADic( pcDtParam ); 617 } 618 #endif 610 619 Pel* piOrg = pcDtParam->pOrg; 611 620 Pel* piCur = pcDtParam->pCur; … … 638 647 #if H_3D_IC 639 648 if( pcDtParam->bUseIC ) 649 { 650 return xGetSAD4ic( pcDtParam ); 651 } 652 #endif 653 #if LGE_INTER_SDC_E0156 654 if( pcDtParam->bUseSDCMRSAD ) 640 655 { 641 656 return xGetSAD4ic( pcDtParam ); … … 675 690 #if H_3D_IC 676 691 if( pcDtParam->bUseIC ) 692 { 693 return xGetSAD8ic( pcDtParam ); 694 } 695 #endif 696 #if LGE_INTER_SDC_E0156 697 if( pcDtParam->bUseSDCMRSAD ) 677 698 { 678 699 return xGetSAD8ic( pcDtParam ); … … 716 737 #if H_3D_IC 717 738 if( pcDtParam->bUseIC ) 739 { 740 return xGetSAD16ic( pcDtParam ); 741 } 742 #endif 743 #if LGE_INTER_SDC_E0156 744 if( pcDtParam->bUseSDCMRSAD ) 718 745 { 719 746 return xGetSAD16ic( pcDtParam ); … … 770 797 } 771 798 #endif 799 #if LGE_INTER_SDC_E0156 800 if( pcDtParam->bUseSDCMRSAD ) 801 { 802 return xGetSAD12ic( pcDtParam ); 803 } 804 #endif 772 805 Pel* piOrg = pcDtParam->pOrg; 773 806 Pel* piCur = pcDtParam->pCur; … … 808 841 #if H_3D_IC 809 842 if( pcDtParam->bUseIC ) 843 { 844 return xGetSAD16Nic( pcDtParam ); 845 } 846 #endif 847 #if LGE_INTER_SDC_E0156 848 if( pcDtParam->bUseSDCMRSAD ) 810 849 { 811 850 return xGetSAD16Nic( pcDtParam ); … … 860 899 #if H_3D_IC 861 900 if( pcDtParam->bUseIC ) 901 { 902 return xGetSAD32ic( pcDtParam ); 903 } 904 #endif 905 #if LGE_INTER_SDC_E0156 906 if( pcDtParam->bUseSDCMRSAD ) 862 907 { 863 908 return xGetSAD32ic( pcDtParam ); … … 930 975 } 931 976 #endif 977 #if LGE_INTER_SDC_E0156 978 if( pcDtParam->bUseSDCMRSAD ) 979 { 980 return xGetSAD24ic( pcDtParam ); 981 } 982 #endif 932 983 Pel* piOrg = pcDtParam->pOrg; 933 984 Pel* piCur = pcDtParam->pCur; … … 985 1036 #if H_3D_IC 986 1037 if( pcDtParam->bUseIC ) 1038 { 1039 return xGetSAD64ic( pcDtParam ); 1040 } 1041 #endif 1042 #if LGE_INTER_SDC_E0156 1043 if( pcDtParam->bUseSDCMRSAD ) 987 1044 { 988 1045 return xGetSAD64ic( pcDtParam ); … … 1087 1144 } 1088 1145 #endif 1146 #if LGE_INTER_SDC_E0156 1147 if( pcDtParam->bUseSDCMRSAD ) 1148 { 1149 return xGetSAD48ic( pcDtParam ); 1150 } 1151 #endif 1089 1152 Pel* piOrg = pcDtParam->pOrg; 1090 1153 Pel* piCur = pcDtParam->pCur; … … 1157 1220 #endif 1158 1221 1159 #if H_3D_IC 1222 #if H_3D_IC || LGE_INTER_SDC_E0156 1160 1223 UInt TComRdCost::xGetSADic( DistParam* pcDtParam ) 1161 1224 { … … 3409 3472 } 3410 3473 #endif 3474 #if LGE_INTER_SDC_E0156 3475 if( pcDtParam->bUseSDCMRSAD ) 3476 { 3477 return xGetHADsic( pcDtParam ); 3478 } 3479 #endif 3411 3480 Pel* piOrg = pcDtParam->pOrg; 3412 3481 Pel* piCur = pcDtParam->pCur; … … 3506 3575 } 3507 3576 3508 #if H_3D_IC 3577 #if H_3D_IC || LGE_INTER_SDC_E0156 3509 3578 UInt TComRdCost::xGetHADsic( DistParam* pcDtParam ) 3510 3579 { -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComRdCost.h
r537 r598 94 94 Bool bUseIC; 95 95 #endif 96 #if LGE_INTER_SDC_E0156 97 Bool bUseSDCMRSAD; 98 #endif 96 99 Int iRows; 97 100 Int iCols; … … 133 136 iStrideVir = 0; 134 137 #endif 138 #if LGE_INTER_SDC_E0156 139 bUseSDCMRSAD = false; 140 #endif 135 141 } 136 142 }; … … 274 280 static UInt xGetSSE64 ( DistParam* pcDtParam ); 275 281 static UInt xGetSSE16N ( DistParam* pcDtParam ); 276 #if H_3D_IC 282 #if H_3D_IC || LGE_INTER_SDC_E0156 277 283 static UInt xGetSADic ( DistParam* pcDtParam ); 278 284 static UInt xGetSAD4ic ( DistParam* pcDtParam ); … … 302 308 303 309 #if AMP_SAD 304 #if H_3D_IC 310 #if H_3D_IC || LGE_INTER_SDC_E0156 305 311 static UInt xGetSAD12ic ( DistParam* pcDtParam ); 306 312 static UInt xGetSAD24ic ( DistParam* pcDtParam ); … … 313 319 #endif 314 320 315 #if H_3D_IC 321 #if H_3D_IC || LGE_INTER_SDC_E0156 316 322 static UInt xGetHADsic ( DistParam* pcDtParam ); 317 323 #endif -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComSlice.cpp
r597 r598 1542 1542 #if H_3D_NBDV_REF 1543 1543 m_depthRefinementFlag [ i ] = false; 1544 #endif 1545 #if LGE_INTER_SDC_E0156 1546 m_bInterSDCFlag [ i ] = false; 1544 1547 #endif 1545 1548 } -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComSlice.h
r542 r598 507 507 Bool m_ivMvScalingFlag; 508 508 #endif 509 #if LGE_INTER_SDC_E0156 510 Bool m_bInterSDCFlag[MAX_NUM_LAYERS ]; 511 #endif 509 512 510 513 #endif … … 716 719 Bool getIvMvScalingFlag ( ) { return m_ivMvScalingFlag; } 717 720 Void setIvMvScalingFlag ( Bool b ) { m_ivMvScalingFlag = b; } 721 #endif 722 #if LGE_INTER_SDC_E0156 723 Bool getInterSDCFlag ( Int layerIdInVps ) { return m_bInterSDCFlag[layerIdInVps]; } 724 Void setInterSDCFlag ( Int layerIdInVps, Bool bval ){ m_bInterSDCFlag[layerIdInVps] = bval; } 718 725 #endif 719 726 -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TypeDef.h
r597 r598 96 96 // Unifying rounding offset, for IC part, JCT3V-D0135 97 97 // Full Pel Interpolation for Depth, HHI_FULL_PEL_DEPTH_MAP_MV_ACC 98 #define H_3D_FIX 1 // Bug Fix 99 #define SHARP_ILLUCOMP_REFINE_E0046 1 100 #define MTK_FAST_TEXTURE_ENCODING_E0173 1 // Fast merge mode decision and early CU determination for texture component of dependent view, JCT3V-E0173 101 #if H_3D_FIX 102 #if H_3D_IC 103 #define MTK_CLIPPING_ALIGN_IC_E0168 1 // To support simplify bi-prediction PU with identical motion checking, JCT3V-E0168 104 #endif 105 #else 106 #define MTK_CLIPPING_ALIGN_IC_E0168 1 // To support simplify bi-prediction PU with identical motion checking, JCT3V-E0168 107 #endif 108 #define MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 1 // Progressive MV Compression, JCT3V-E0170 109 #define LGE_INTER_SDC_E0156 1 // Enable inter SDC for depth coding 110 98 111 #if H_3D_NBDV 99 112 #define H_3D_NBDV_REF 1 // Depth oriented neighboring block disparity derivation -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r541 r598 1073 1073 } 1074 1074 #endif 1075 #if LGE_INTER_SDC_E0156 1076 READ_FLAG( uiCode, "depth_inter_SDC_flag" ); pcVPS->setInterSDCFlag( i, uiCode ? true : false ); 1077 #endif 1075 1078 } 1076 1079 } … … 2033 2036 } 2034 2037 #endif 2038 #if LGE_INTER_SDC_E0156 2039 Void TDecCavlc::parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2040 { 2041 assert(0); 2042 } 2043 2044 Void TDecCavlc::parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) 2045 { 2046 assert(0); 2047 } 2048 #endif 2035 2049 // ==================================================================================================================== 2036 2050 // Protected member functions -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecCAVLC.h
r537 r598 102 102 Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 103 103 #endif 104 #if LGE_INTER_SDC_E0156 105 Void parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 106 Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ); 107 #endif 104 108 Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 105 109 Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r597 r598 437 437 m_pcEntropyDecoder->decodeARPW ( pcCU , uiAbsPartIdx , uiDepth ); 438 438 #endif 439 #if LGE_INTER_SDC_E0156 440 m_pcEntropyDecoder->decodeInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 441 #endif 439 442 // Coefficient decoding 440 443 Bool bCodeDQP = getdQPFlag(); … … 501 504 { 502 505 case MODE_INTER: 506 #if LGE_INTER_SDC_E0156 507 if( m_ppcCU[uiDepth]->getInterSDCFlag( 0 ) ) 508 { 509 xReconInterSDC( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth ); 510 } 511 else 512 { 513 #endif 503 514 xReconInter( m_ppcCU[uiDepth], uiDepth ); 515 #if LGE_INTER_SDC_E0156 516 } 517 #endif 504 518 break; 505 519 case MODE_INTRA: … … 542 556 } 543 557 } 558 559 #if LGE_INTER_SDC_E0156 560 Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 561 { 562 // inter prediction 563 m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] ); 564 565 UInt uiWidth = pcCU->getWidth ( 0 ); 566 UInt uiHeight = pcCU->getHeight( 0 ); 567 UChar* pMask = pcCU->getInterSDCMask(); 568 569 memset( pMask, 0, uiWidth*uiHeight ); 570 pcCU->xSetInterSDCCUMask( pcCU, pMask ); 571 572 Pel *pResi; 573 UInt uiPelX, uiPelY; 574 UInt uiResiStride = m_ppcYuvResi[uiDepth]->getStride(); 575 576 pResi = m_ppcYuvResi[uiDepth]->getLumaAddr( 0 ); 577 for( uiPelY = 0; uiPelY < uiHeight; uiPelY++ ) 578 { 579 for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ ) 580 { 581 UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ]; 582 583 pResi[ uiPelX ] = pcCU->getInterSDCSegmentDCOffset( uiSeg, 0 );; 584 } 585 pResi += uiResiStride; 586 } 587 588 m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ) ); 589 590 // clear UV 591 UInt uiStrideC = m_ppcYuvReco[uiDepth]->getCStride(); 592 Pel *pRecCb = m_ppcYuvReco[uiDepth]->getCbAddr(); 593 Pel *pRecCr = m_ppcYuvReco[uiDepth]->getCrAddr(); 594 595 for (Int y = 0; y < uiHeight/2; y++) 596 { 597 for (Int x = 0; x < uiWidth/2; x++) 598 { 599 pRecCb[x] = (Pel)( 1 << ( g_bitDepthC - 1 ) ); 600 pRecCr[x] = (Pel)( 1 << ( g_bitDepthC - 1 ) ); 601 } 602 603 pRecCb += uiStrideC; 604 pRecCr += uiStrideC; 605 } 606 } 607 #endif 544 608 545 609 Void -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecCu.h
r531 r598 118 118 Void xReconIntraSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 119 119 #endif 120 #if LGE_INTER_SDC_E0156 121 Void xReconInterSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 122 #endif 120 123 }; 121 124 -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
r597 r598 675 675 #endif 676 676 677 #if LGE_INTER_SDC_E0156 678 if( pcCU->getInterSDCFlag( uiAbsPartIdx ) ) 679 { 680 assert( !pcCU->isSkipped( uiAbsPartIdx ) ); 681 assert( !pcCU->isIntra( uiAbsPartIdx) ); 682 assert( pcCU->getSlice()->getIsDepth() ); 683 684 decodeInterSDCResidualData( pcCU, uiAbsPartIdx, uiDepth ); 685 return; 686 } 687 #endif 688 677 689 if( pcCU->isIntra(uiAbsPartIdx) ) 678 690 { … … 696 708 } 697 709 710 #if LGE_INTER_SDC_E0156 711 Void TDecEntropy::decodeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 712 { 713 pcCU->setInterSDCFlagSubParts( false, uiAbsPartIdx, 0, uiDepth); 714 715 if( !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) 716 { 717 return; 718 } 719 720 if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || pcCU->isSkipped( uiAbsPartIdx ) ) 721 { 722 return; 723 } 724 725 m_pcEntropyDecoderIf->parseInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 726 } 727 728 Void TDecEntropy::decodeInterSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 729 { 730 if( !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) 731 { 732 return; 733 } 734 735 if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || !pcCU->getInterSDCFlag( uiAbsPartIdx ) ) 736 { 737 return; 738 } 739 740 UInt uiNumSegments = ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ? 1 : ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ? 4 : 2 ); 741 742 // decode residual data for each segment 743 for( UInt uiSeg = 0; uiSeg < uiNumSegments; uiSeg++ ) 744 { 745 m_pcEntropyDecoderIf->parseInterSDCResidualData( pcCU, uiAbsPartIdx, uiDepth, uiSeg ); 746 } 747 } 748 #endif 749 698 750 //! \} -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecEntropy.h
r504 r598 91 91 virtual Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 92 92 #endif 93 #if LGE_INTER_SDC_E0156 94 virtual Void parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 95 virtual Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) = 0; 96 #endif 93 97 virtual Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 94 98 virtual Void parsePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; … … 166 170 Void decodeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 167 171 #endif 168 172 #if LGE_INTER_SDC_E0156 173 Void decodeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 174 Void decodeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 175 #endif 169 176 Void decodeIPCMInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 170 177 -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecGop.cpp
r597 r598 226 226 rpcPic->destroyNonDBFilterInfo(); 227 227 } 228 228 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 229 rpcPic->compressMotion(2); 230 #endif 229 231 #if !H_3D 230 232 rpcPic->compressMotion(); -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
r541 r598 100 100 #endif 101 101 #endif 102 #if LGE_INTER_SDC_E0156 103 , m_cInterSDCFlagSCModel ( 1, 1, NUM_INTER_SDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 104 , m_cInterSDCResidualSCModel ( 1, 1, NUM_INTER_SDC_RESIDUAL_CTX , m_contextModels + m_numContextModels, m_numContextModels) 105 , m_cInterSDCResidualSignFlagSCModel ( 1, 1, NUM_INTER_SDC_SIGN_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 106 #endif 102 107 { 103 108 assert( m_numContextModels <= MAX_NUM_CTX_MOD ); … … 182 187 m_cSDCResidualSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL ); 183 188 #endif 189 #endif 190 #if LGE_INTER_SDC_E0156 191 m_cInterSDCFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_FLAG ); 192 m_cInterSDCResidualSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL ); 193 m_cInterSDCResidualSignFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_SIGN_FLAG ); 184 194 #endif 185 195 m_uiLastDQpNonZero = 0; … … 251 261 m_cSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL ); 252 262 #endif 263 #endif 264 #if LGE_INTER_SDC_E0156 265 m_cInterSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG ); 266 m_cInterSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL ); 267 m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG ); 253 268 #endif 254 269 m_pcTDecBinIf->start(); … … 2237 2252 #endif 2238 2253 2254 #if LGE_INTER_SDC_E0156 2255 Void TDecSbac::parseInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2256 { 2257 UInt uiSymbol = 0; 2258 UInt uiCtxInterSDCFlag = pcCU->getCtxInterSDCFlag( uiAbsPartIdx ); 2259 2260 m_pcTDecBinIf->decodeBin( uiSymbol, m_cInterSDCFlagSCModel.get( 0, 0, uiCtxInterSDCFlag ) ); 2261 2262 if( uiSymbol ) 2263 { 2264 pcCU->setInterSDCFlagSubParts( true, uiAbsPartIdx, 0, uiDepth ); 2265 pcCU->setTrIdxSubParts( 0, uiAbsPartIdx, uiDepth ); 2266 pcCU->setCbfSubParts( 1, 1, 1, uiAbsPartIdx, uiDepth ); 2267 } 2268 else 2269 { 2270 pcCU->setInterSDCFlagSubParts( false, uiAbsPartIdx, 0, uiDepth); 2271 } 2272 } 2273 2274 Void TDecSbac::parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment ) 2275 { 2276 UInt uiAbsIdx = 0; 2277 UInt uiSign = 0; 2278 Int iIdx = 0; 2279 2280 xReadExGolombLevel( uiAbsIdx, m_cInterSDCResidualSCModel.get( 0, 0, 0 ) ); 2281 2282 uiAbsIdx++; 2283 m_pcTDecBinIf->decodeBin( uiSign, m_cInterSDCResidualSignFlagSCModel.get( 0, 0, 0 ) ); 2284 iIdx = (Int)( uiSign ? -1 : 1 ) * uiAbsIdx; 2285 2286 pcCU->setInterSDCSegmentDCOffset( iIdx, uiSegment, uiAbsPartIdx ); 2287 } 2288 #endif 2289 2239 2290 //! \} -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecSbac.h
r531 r598 112 112 #endif 113 113 #endif 114 #if LGE_INTER_SDC_E0156 115 Void parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 116 Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ); 117 #endif 114 118 private: 115 119 TComInputBitstream* m_pcBitstream; … … 221 225 #endif 222 226 #endif 227 #if LGE_INTER_SDC_E0156 228 ContextModel3DBuffer m_cInterSDCFlagSCModel; 229 ContextModel3DBuffer m_cInterSDCResidualSCModel; 230 ContextModel3DBuffer m_cInterSDCResidualSignFlagSCModel; 231 #endif 223 232 }; 224 233 -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
r542 r598 842 842 } 843 843 #endif 844 #if LGE_INTER_SDC_E0156 845 WRITE_FLAG( pcVPS->getInterSDCFlag( i ) ? 1 : 0, "depth_inter_SDC_flag" ); 846 #endif 844 847 } 845 848 } … … 1776 1779 return true; 1777 1780 } 1781 1782 #if LGE_INTER_SDC_E0156 1783 Void TEncCavlc::codeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) 1784 { 1785 assert(0); 1786 } 1787 1788 Void TEncCavlc::codeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) 1789 { 1790 assert(0); 1791 } 1792 #endif 1778 1793 //! \} -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncCavlc.h
r537 r598 117 117 Void codeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 118 118 #endif 119 #if LGE_INTER_SDC_E0156 120 Void codeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 121 Void codeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ); 122 #endif 119 123 120 124 Void codeInterModeFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiEncMode ); -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncCfg.h
r541 r598 394 394 Bool m_bUseIC; 395 395 #endif 396 #if LGE_INTER_SDC_E0156 397 bool m_bInterSDC; 398 #endif 396 399 //====== Depth Intra Modes ====== 397 400 #if H_3D_DIM … … 490 493 Void setUseIC ( Bool bVal ) { m_bUseIC = bVal; } 491 494 Bool getUseIC () { return m_bUseIC; } 495 #endif 496 #if LGE_INTER_SDC_E0156 497 Void setInterSDCEnable ( Bool bVal ) { m_bInterSDC = bVal; } 498 Bool getInterSDCEnable () { return m_bInterSDC; } 492 499 #endif 493 500 //======== Transform ============= -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r597 r598 489 489 if(!bSliceEnd && !bSliceStart && bInsidePicture ) 490 490 { 491 #if MTK_FAST_TEXTURE_ENCODING_E0173 492 Bool bIVFMerge = false; 493 Int iIVFMaxD = 0; 494 Bool bFMD = false; 495 #endif 491 496 for (Int iQP=iMinQP; iQP<=iMaxQP; iQP++) 492 497 { … … 564 569 } 565 570 } 571 #if MTK_FAST_TEXTURE_ENCODING_E0173 572 if(rpcTempCU->getSlice()->getViewIndex() && !rpcTempCU->getSlice()->getIsDepth()) 573 { 574 PartSize ePartTemp = rpcTempCU->getPartitionSize(0); 575 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 576 rpcTempCU->getIVNStatus( 0, &DvInfo, bIVFMerge, iIVFMaxD); 577 rpcTempCU->setPartSizeSubParts( ePartTemp, 0, uiDepth ); 578 } 579 #endif 566 580 #endif 567 581 // do inter modes, SKIP and 2Nx2N … … 579 593 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 580 594 #endif 595 #if MTK_FAST_TEXTURE_ENCODING_E0173 596 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFMD ); rpcTempCU->initEstData( uiDepth, iQP );//by Competition for inter_2Nx2N 597 #else 581 598 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); rpcTempCU->initEstData( uiDepth, iQP );//by Competition for inter_2Nx2N 599 #endif 582 600 #if MTK_VSP_FIX_ALIGN_WD_E0172 583 601 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); … … 589 607 #endif 590 608 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, &earlyDetectionSkipMode );//by Merge for inter_2Nx2N 609 #if MTK_FAST_TEXTURE_ENCODING_E0173 610 bFMD = bIVFMerge && rpcBestCU->isSkipped(0); 611 #endif 591 612 rpcTempCU->initEstData( uiDepth, iQP ); 592 613 #if MTK_VSP_FIX_ALIGN_WD_E0172 … … 612 633 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 613 634 #endif 635 #if MTK_FAST_TEXTURE_ENCODING_E0173 636 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFMD ); rpcTempCU->initEstData( uiDepth, iQP ); 637 #else 614 638 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); rpcTempCU->initEstData( uiDepth, iQP ); 639 #endif 615 640 #if MTK_VSP_FIX_ALIGN_WD_E0172 616 641 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); … … 694 719 ) 695 720 { 721 #if MTK_FAST_TEXTURE_ENCODING_E0173 722 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFMD ); 723 #else 696 724 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN ); 725 #endif 697 726 rpcTempCU->initEstData( uiDepth, iQP ); 698 727 #if MTK_VSP_FIX_ALIGN_WD_E0172 … … 710 739 ) 711 740 { 741 #if MTK_FAST_TEXTURE_ENCODING_E0173 742 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFMD ); 743 #else 712 744 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N ); 745 #endif 713 746 rpcTempCU->initEstData( uiDepth, iQP ); 714 747 #if MTK_VSP_FIX_ALIGN_WD_E0172 … … 726 759 ) 727 760 { 761 #if MTK_FAST_TEXTURE_ENCODING_E0173 762 xCheckRDCostInter ( rpcBestCU, rpcTempCU, SIZE_2NxN, bFMD ); 763 #else 728 764 xCheckRDCostInter ( rpcBestCU, rpcTempCU, SIZE_2NxN ); 765 #endif 729 766 rpcTempCU->initEstData( uiDepth, iQP ); 730 767 #if MTK_VSP_FIX_ALIGN_WD_E0172 … … 761 798 ) 762 799 { 800 #if MTK_FAST_TEXTURE_ENCODING_E0173 801 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFMD ); 802 #else 763 803 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 804 #endif 764 805 rpcTempCU->initEstData( uiDepth, iQP ); 765 806 #if MTK_VSP_FIX_ALIGN_WD_E0172 … … 777 818 ) 778 819 { 820 #if MTK_FAST_TEXTURE_ENCODING_E0173 821 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFMD ); 822 #else 779 823 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 824 #endif 780 825 rpcTempCU->initEstData( uiDepth, iQP ); 781 826 #if MTK_VSP_FIX_ALIGN_WD_E0172 … … 797 842 ) 798 843 { 844 #if MTK_FAST_TEXTURE_ENCODING_E0173 845 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFMD, true ); 846 #else 799 847 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true ); 848 #endif 800 849 rpcTempCU->initEstData( uiDepth, iQP ); 801 850 #if MTK_VSP_FIX_ALIGN_WD_E0172 … … 813 862 ) 814 863 { 864 #if MTK_FAST_TEXTURE_ENCODING_E0173 865 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFMD, true ); 866 #else 815 867 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true ); 868 #endif 816 869 rpcTempCU->initEstData( uiDepth, iQP ); 817 870 #if MTK_VSP_FIX_ALIGN_WD_E0172 … … 835 888 ) 836 889 { 890 #if MTK_FAST_TEXTURE_ENCODING_E0173 891 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFMD ); 892 #else 837 893 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 894 #endif 838 895 rpcTempCU->initEstData( uiDepth, iQP ); 839 896 #if MTK_VSP_FIX_ALIGN_WD_E0172 … … 851 908 ) 852 909 { 910 #if MTK_FAST_TEXTURE_ENCODING_E0173 911 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFMD ); 912 #else 853 913 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 914 #endif 854 915 rpcTempCU->initEstData( uiDepth, iQP ); 855 916 #if MTK_VSP_FIX_ALIGN_WD_E0172 … … 867 928 ) 868 929 { 930 #if MTK_FAST_TEXTURE_ENCODING_E0173 931 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFMD, true ); 932 #else 869 933 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true ); 934 #endif 870 935 rpcTempCU->initEstData( uiDepth, iQP ); 871 936 #if MTK_VSP_FIX_ALIGN_WD_E0172 … … 883 948 ) 884 949 { 950 #if MTK_FAST_TEXTURE_ENCODING_E0173 951 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFMD, true ); 952 #else 885 953 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true ); 954 #endif 886 955 rpcTempCU->initEstData( uiDepth, iQP ); 887 956 #if MTK_VSP_FIX_ALIGN_WD_E0172 … … 930 999 #endif 931 1000 } 932 1001 #if MTK_FAST_TEXTURE_ENCODING_E0173 1002 if(!bFMD) 1003 { 1004 #endif 933 1005 // do normal intra modes 934 1006 #if H_3D_DIM_ENC … … 986 1058 } 987 1059 } 1060 #if MTK_FAST_TEXTURE_ENCODING_E0173 1061 } 1062 #endif 988 1063 if (isAddLowestQP && (iQP == lowestQP)) 989 1064 { … … 1028 1103 bSubBranch = true; 1029 1104 } 1105 #if MTK_FAST_TEXTURE_ENCODING_E0173 1106 if(rpcBestCU->getSlice()->getViewIndex() && !rpcBestCU->getSlice()->getIsDepth() && (uiDepth >=iIVFMaxD) && rpcBestCU->isSkipped(0)) 1107 { 1108 bSubBranch = false; 1109 } 1110 #endif 1030 1111 } 1031 1112 else if(!(bSliceEnd && bInsidePicture)) … … 1507 1588 #if H_3D_ARP 1508 1589 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx ); 1590 #endif 1591 #if LGE_INTER_SDC_E0156 1592 m_pcEntropyCoder->encodeInterSDCFlag( pcCU, uiAbsPartIdx, false ); 1509 1593 #endif 1510 1594 … … 1815 1899 1816 1900 rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth ); 1901 #if LGE_INTER_SDC_E0156 1902 TComDataCU *rpcTempCUPre = rpcTempCU; 1903 #endif 1817 1904 Int orgQP = rpcTempCU->getQP( 0 ); 1818 1905 xCheckDQP( rpcTempCU ); 1819 1906 xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth); 1907 #if LGE_INTER_SDC_E0156 1908 if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && !uiNoResidual ) 1909 { 1910 if( rpcTempCU != rpcTempCUPre ) 1911 { 1912 rpcTempCU->initEstData( uhDepth, orgQP ); 1913 rpcTempCU->copyPartFrom( rpcBestCU, 0, uhDepth ); 1914 } 1915 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth ); 1916 rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth ); 1917 rpcTempCU->setCbfSubParts( 1, 1, 1, 0, uhDepth ); 1918 #if H_3D_VSO //M2 1919 if( m_pcRdCost->getUseRenModel() ) 1920 { //Reset 1921 UInt uiWidth = m_ppcOrigYuv[uhDepth]->getWidth (); 1922 UInt uiHeight = m_ppcOrigYuv[uhDepth]->getHeight (); 1923 Pel* piSrc = m_ppcOrigYuv[uhDepth]->getLumaAddr (); 1924 UInt uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride (); 1925 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1926 } 1927 #endif 1928 m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU, 1929 m_ppcOrigYuv[uhDepth], 1930 ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth], 1931 m_ppcResiYuvTemp[uhDepth], 1932 m_ppcRecoYuvTemp[uhDepth], 1933 uhDepth ); 1934 1935 xCheckDQP( rpcTempCU ); 1936 xCheckBestMode( rpcBestCU, rpcTempCU, uhDepth ); 1937 } 1938 #endif 1820 1939 rpcTempCU->initEstData( uhDepth, orgQP ); 1821 1940 1822 1941 if( m_pcEncCfg->getUseFastDecisionForMerge() && !bestIsSkip ) 1823 1942 { 1943 #if LGE_INTER_SDC_E0156 1944 if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) ) 1945 { 1946 bestIsSkip = !rpcBestCU->getSDCFlag( 0 ) && ( rpcBestCU->getQtRootCbf(0) == 0 ); 1947 } 1948 else 1949 { 1950 #endif 1824 1951 bestIsSkip = rpcBestCU->getQtRootCbf(0) == 0; 1952 #if LGE_INTER_SDC_E0156 1953 } 1954 #endif 1825 1955 } 1826 1956 } … … 1865 1995 1866 1996 #if AMP_MRG 1997 #if MTK_FAST_TEXTURE_ENCODING_E0173 1998 Void TEncCu::xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bFMD, Bool bUseMRG) 1999 #else 1867 2000 Void TEncCu::xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bUseMRG) 2001 #endif 1868 2002 #else 1869 2003 Void TEncCu::xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize ) 1870 2004 #endif 1871 2005 { 2006 #if MTK_FAST_TEXTURE_ENCODING_E0173 2007 if(!(bFMD && (ePartSize == SIZE_2Nx2N))) //have motion estimation or merge check 2008 { 2009 #endif 1872 2010 UChar uhDepth = rpcTempCU->getDepth( 0 ); 1873 2011 #if H_3D_ARP … … 1943 2081 #if AMP_MRG 1944 2082 rpcTempCU->setMergeAMP (true); 2083 #if MTK_FAST_TEXTURE_ENCODING_E0173 2084 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bFMD, false, bUseMRG ); 2085 #else 1945 2086 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], false, bUseMRG ); 2087 #endif 1946 2088 #else 1947 2089 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth] ); … … 2003 2145 #endif 2004 2146 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 2005 2147 #if LGE_INTER_SDC_E0156 2148 TComDataCU *rpcTempCUPre = rpcTempCU; 2149 #endif 2006 2150 xCheckDQP( rpcTempCU ); 2007 2151 xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth); 2152 #if LGE_INTER_SDC_E0156 2153 if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() ) 2154 { 2155 if( rpcTempCU != rpcTempCUPre ) 2156 { 2157 Int orgQP = rpcBestCU->getQP( 0 ); 2158 rpcTempCU->initEstData( uhDepth, orgQP ); 2159 rpcTempCU->copyPartFrom( rpcBestCU, 0, uhDepth ); 2160 } 2161 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth ); 2162 rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth ); 2163 rpcTempCU->setCbfSubParts( 1, 1, 1, 0, uhDepth ); 2164 #if H_3D_VSO // M3 2165 if( m_pcRdCost->getUseRenModel() ) 2166 { 2167 UInt uiWidth = m_ppcOrigYuv[uhDepth]->getWidth ( ); 2168 UInt uiHeight = m_ppcOrigYuv[uhDepth]->getHeight( ); 2169 Pel* piSrc = m_ppcOrigYuv[uhDepth]->getLumaAddr( ); 2170 UInt uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride(); 2171 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 2172 } 2173 #endif 2174 2175 m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU, 2176 m_ppcOrigYuv[uhDepth], 2177 ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth], 2178 m_ppcResiYuvTemp[uhDepth], 2179 m_ppcRecoYuvTemp[uhDepth], 2180 uhDepth ); 2181 2182 xCheckDQP( rpcTempCU ); 2183 xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth); 2184 } 2185 #endif 2008 2186 #if H_3D_ARP 2187 } 2188 #endif 2189 #if MTK_FAST_TEXTURE_ENCODING_E0173 2009 2190 } 2010 2191 #endif -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncCu.h
r537 r598 145 145 146 146 #if AMP_MRG 147 #if MTK_FAST_TEXTURE_ENCODING_E0173 148 Void xCheckRDCostInter ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bFMD, Bool bUseMRG = false ) ; 149 #else 147 150 Void xCheckRDCostInter ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bUseMRG = false ); 151 #endif 148 152 #else 149 153 Void xCheckRDCostInter ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize ); -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp
r531 r598 662 662 #endif 663 663 664 #if LGE_INTER_SDC_E0156 665 if( pcCU->getInterSDCFlag( uiAbsPartIdx ) ) 666 { 667 assert( !pcCU->isSkipped( uiAbsPartIdx ) ); 668 assert( !pcCU->isIntra( uiAbsPartIdx) ); 669 assert( pcCU->getSlice()->getIsDepth() ); 670 671 encodeInterSDCResidualData( pcCU, uiAbsPartIdx, false ); 672 return; 673 } 674 #endif 675 664 676 if( pcCU->isIntra(uiAbsPartIdx) ) 665 677 { … … 812 824 } 813 825 826 #if LGE_INTER_SDC_E0156 827 Void TEncEntropy::encodeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 828 { 829 if( !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) 830 { 831 return; 832 } 833 834 if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || pcCU->isSkipped( uiAbsPartIdx ) ) 835 { 836 return; 837 } 838 839 if( bRD ) 840 { 841 uiAbsPartIdx = 0; 842 } 843 844 m_pcEntropyCoderIf->codeInterSDCFlag( pcCU, uiAbsPartIdx ); 845 } 846 847 Void TEncEntropy::encodeInterSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 848 { 849 if( !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) 850 { 851 return; 852 } 853 854 if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || !pcCU->getInterSDCFlag( uiAbsPartIdx ) ) 855 { 856 return; 857 } 858 859 if( bRD ) 860 { 861 uiAbsPartIdx = 0; 862 } 863 864 // number of segments depends on prediction mode for INTRA 865 UInt uiNumSegments = ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ? 1 : ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ? 4 : 2 ); 866 867 // encode residual data for each segment 868 for( UInt uiSeg = 0; uiSeg < uiNumSegments; uiSeg++ ) 869 { 870 m_pcEntropyCoderIf->codeInterSDCResidualData( pcCU, uiAbsPartIdx, uiSeg ); 871 } 872 } 873 #endif 874 814 875 //! \} -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncEntropy.h
r504 r598 93 93 #if H_3D_IC 94 94 virtual Void codeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 95 #endif 96 #if LGE_INTER_SDC_E0156 97 virtual Void codeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 98 virtual Void codeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) = 0; 95 99 #endif 96 100 virtual Void codeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; … … 181 185 Void encodeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 182 186 #endif 187 #if LGE_INTER_SDC_E0156 188 Void encodeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 189 Void encodeInterSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ); 190 #endif 183 191 Void encodePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 184 192 Void encodePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD = false ); -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
r597 r598 1780 1780 pcPic->destroyNonDBFilterInfo(); 1781 1781 } 1782 1783 1782 #if !H_3D 1784 1783 pcPic->compressMotion(); -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
r541 r598 106 106 #endif 107 107 #endif 108 #if LGE_INTER_SDC_E0156 109 , m_cInterSDCFlagSCModel ( 1, 1, NUM_INTER_SDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 110 , m_cInterSDCResidualSCModel ( 1, 1, NUM_INTER_SDC_RESIDUAL_CTX , m_contextModels + m_numContextModels, m_numContextModels) 111 , m_cInterSDCResidualSignFlagSCModel ( 1, 1, NUM_INTER_SDC_SIGN_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 112 #endif 108 113 { 109 114 assert( m_numContextModels <= MAX_NUM_CTX_MOD ); … … 181 186 #endif 182 187 #endif 188 #if LGE_INTER_SDC_E0156 189 m_cInterSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG ); 190 m_cInterSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL ); 191 m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG ); 192 #endif 183 193 // new structure 184 194 m_uiLastQp = iQp; … … 217 227 #if H_3D_IC 218 228 curCost += m_cCUICFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_IC_FLAG ); 229 #endif 230 #if LGE_INTER_SDC_E0156 231 curCost += m_cInterSDCFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_INTER_SDC_FLAG ); 232 curCost += m_cInterSDCResidualSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL ); 233 curCost += m_cInterSDCResidualSignFlagSCModel.calcCost( curSliceType, qp, (UChar*)INIT_INTER_SDC_SIGN_FLAG ); 219 234 #endif 220 235 curCost += m_cCUPartSizeSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_PART_SIZE ); … … 330 345 #endif 331 346 #endif 347 #if LGE_INTER_SDC_E0156 348 m_cInterSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG ); 349 m_cInterSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL ); 350 m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG ); 351 #endif 332 352 m_pcBinIf->start(); 333 353 } … … 2209 2229 this->xCopyContextsFrom(pScr); 2210 2230 } 2231 2232 #if LGE_INTER_SDC_E0156 2233 Void TEncSbac::codeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2234 { 2235 UInt uiSymbol = pcCU->getInterSDCFlag( uiAbsPartIdx ) ? 1 : 0; 2236 UInt uiCtxInterSDCFlag = pcCU->getCtxInterSDCFlag( uiAbsPartIdx ); 2237 2238 m_pcBinIf->encodeBin( uiSymbol, m_cInterSDCFlagSCModel.get( 0, 0, uiCtxInterSDCFlag ) ); 2239 } 2240 2241 Void TEncSbac::codeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) 2242 { 2243 Pel segmentDCOffset = pcCU->getInterSDCSegmentDCOffset( uiSegment, uiAbsPartIdx ); 2244 2245 UInt uiSign = segmentDCOffset < 0 ? 1 : 0; 2246 UInt uiAbsIdx = abs( segmentDCOffset ); 2247 2248 assert( uiAbsIdx > 0 ); 2249 uiAbsIdx--; 2250 xWriteExGolombLevel( uiAbsIdx, m_cInterSDCResidualSCModel.get( 0, 0, 0 ) ); 2251 m_pcBinIf->encodeBin( uiSign, m_cInterSDCResidualSignFlagSCModel.get( 0, 0, 0 ) ); 2252 } 2253 #endif 2211 2254 //! \} -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncSbac.h
r531 r598 158 158 Void codeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 159 159 #endif 160 #if LGE_INTER_SDC_E0156 161 Void codeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 162 Void codeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ); 163 #endif 160 164 Void codeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 161 165 Void codeMVPIdx ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefList ); … … 261 265 #endif 262 266 #endif 267 #if LGE_INTER_SDC_E0156 268 ContextModel3DBuffer m_cInterSDCFlagSCModel; 269 ContextModel3DBuffer m_cInterSDCResidualSCModel; 270 ContextModel3DBuffer m_cInterSDCResidualSignFlagSCModel; 271 #endif 263 272 }; 264 273 -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
r597 r598 41 41 #include "TEncSearch.h" 42 42 #include <math.h> 43 #if LGE_INTER_SDC_E0156 44 #include <memory.h> 45 #endif 43 46 44 47 //! \ingroup TLibEncoder … … 319 322 #if H_3D_IC 320 323 m_cDistParam.bUseIC = pcPatternKey->getICFlag(); 324 #endif 325 #if LGE_INTER_SDC_E0156 326 m_cDistParam.bUseSDCMRSAD = pcPatternKey->getSDCMRSADFlag(); 321 327 #endif 322 328 //-- jclee for using the SAD function pointer … … 748 754 #if H_3D_IC 749 755 m_cDistParam.bUseIC = pcPatternKey->getICFlag(); 756 #endif 757 #if LGE_INTER_SDC_E0156 758 m_cDistParam.bUseSDCMRSAD = pcPatternKey->getSDCMRSADFlag(); 750 759 #endif 751 760 m_cDistParam.pCur = piRefPos; … … 3531 3540 cDistParam.bUseIC = false; 3532 3541 #endif 3542 #if LGE_INTER_SDC_E0156 3543 cDistParam.bUseSDCMRSAD = false; 3544 #endif 3533 3545 ruiErr = cDistParam.DistFunc( &cDistParam ); 3534 3546 } … … 3690 3702 */ 3691 3703 #if AMP_MRG 3704 #if MTK_FAST_TEXTURE_ENCODING_E0173 3705 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bFMD, Bool bUseRes, Bool bUseMRG ) 3706 #else 3692 3707 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes, Bool bUseMRG ) 3708 #endif 3693 3709 #else 3694 3710 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes ) … … 3801 3817 #if AMP_MRG 3802 3818 Bool bTestNormalMC = true; 3803 3819 #if MTK_FAST_TEXTURE_ENCODING_E0173 3820 if (bFMD||( bUseMRG && pcCU->getWidth( 0 ) > 8 && iNumPart == 2 )) 3821 #else 3804 3822 if ( bUseMRG && pcCU->getWidth( 0 ) > 8 && iNumPart == 2 ) 3823 #endif 3805 3824 { 3806 3825 bTestNormalMC = false; … … 4689 4708 pcPatternKey->setICFlag( bICFlag ); 4690 4709 #endif 4710 #if LGE_INTER_SDC_E0156 4711 if ( pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) 4712 { 4713 pcPatternKey->setSDCMRSADFlag( true ); 4714 } 4715 else 4716 { 4717 pcPatternKey->setSDCMRSADFlag( false ); 4718 } 4719 #endif 4691 4720 4692 4721 if ( bBi ) … … 4834 4863 #if H_3D_IC 4835 4864 m_cDistParam.bUseIC = pcPatternKey->getICFlag(); 4865 #endif 4866 #if LGE_INTER_SDC_E0156 4867 m_cDistParam.bUseSDCMRSAD = pcPatternKey->getSDCMRSADFlag(); 4836 4868 #endif 4837 4869 m_cDistParam.bitDepth = g_bitDepthY; … … 5440 5472 #endif 5441 5473 } 5474 5475 #if LGE_INTER_SDC_E0156 5476 Void TEncSearch::encodeResAndCalcRdInterSDCCU( TComDataCU* pcCU, TComYuv* pcOrg, TComYuv* pcPred, TComYuv* pcResi, TComYuv* pcRec, const UInt uiDepth ) 5477 { 5478 if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( 0 ) ) 5479 { 5480 return; 5481 } 5482 5483 pcCU->setInterSDCFlagSubParts( true, 0, 0, uiDepth ); 5484 5485 UInt uiWidth = pcCU->getWidth ( 0 ); 5486 UInt uiHeight = pcCU->getHeight( 0 ); 5487 UChar* pMask = pcCU->getInterSDCMask(); 5488 memset( pMask, 0, uiWidth*uiHeight ); 5489 5490 pcCU->xSetInterSDCCUMask( pcCU, pMask ); 5491 5492 UInt uiSegSize[4] = { 0, 0, 0, 0 }; 5493 Pel *pPred, *pOrg; 5494 UInt uiPredStride = pcPred->getStride(); 5495 UInt uiOrgStride = pcOrg->getStride(); 5496 UInt uiPelX, uiPelY; 5497 UInt uiPartitionSize = pcCU->getPartitionSize( 0 ); 5498 UInt uiSegmentNum = ( uiPartitionSize == SIZE_2Nx2N ) ? 1 : ( uiPartitionSize == SIZE_NxN ? 4 : 2 ); 5499 5500 pPred = pcPred->getLumaAddr( 0 ); 5501 pOrg = pcOrg->getLumaAddr( 0 ); 5502 Int pResDC[4] = { 0, 0, 0, 0}; 5503 5504 //calculate dc value for prediction and original signal, and calculate residual and reconstruction 5505 for( uiPelY = 0; uiPelY < uiHeight; uiPelY++ ) 5506 { 5507 for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ ) 5508 { 5509 UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ]; 5510 pResDC[uiSeg] += (Int)( pOrg [uiPelX] - pPred[uiPelX] ); 5511 uiSegSize[uiSeg]++; 5512 } 5513 pOrg += uiOrgStride; 5514 pPred += uiPredStride; 5515 } 5516 5517 for( UInt uiSeg = 0; uiSeg < uiSegmentNum; uiSeg++ ) 5518 { 5519 Int iResiOffset = ( pResDC [uiSeg] > 0 ? ( uiSegSize[uiSeg] >> 1 ) : -1*( uiSegSize[uiSeg] >> 1 ) ); 5520 pResDC [uiSeg] = ( pResDC [uiSeg] + iResiOffset ) / (Int) uiSegSize[uiSeg]; 5521 5522 pcCU->setInterSDCSegmentDCOffset( pResDC[uiSeg], uiSeg, 0 ); 5523 } 5524 5525 Pel *pRec; 5526 UInt uiRecStride = pcRec->getStride(); 5527 pPred = pcPred->getLumaAddr( 0 ); 5528 pRec = pcRec->getLumaAddr( 0 ); 5529 5530 for( uiPelY = 0; uiPelY < uiHeight; uiPelY++ ) 5531 { 5532 for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ ) 5533 { 5534 UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ]; 5535 assert( uiSeg < uiSegmentNum ); 5536 5537 pRec[ uiPelX ] = Clip3( 0, ( 1 << g_bitDepthY ) - 1, pPred[uiPelX] + pResDC[uiSeg] ); 5538 } 5539 pPred += uiPredStride; 5540 pRec += uiRecStride; 5541 } 5542 5543 // clear UV 5544 UInt uiStrideC = pcRec->getCStride(); 5545 Pel *pRecCb = pcRec->getCbAddr(); 5546 Pel *pRecCr = pcRec->getCrAddr(); 5547 5548 for (Int y=0; y < uiHeight/2; y++) 5549 { 5550 for (Int x=0; x < uiWidth/2; x++) 5551 { 5552 pRecCb[x] = (Pel)( 1 << ( g_bitDepthC - 1 ) ); 5553 pRecCr[x] = (Pel)( 1 << ( g_bitDepthC - 1 ) ); 5554 } 5555 5556 pRecCb += uiStrideC; 5557 pRecCr += uiStrideC; 5558 } 5559 5560 Dist ruiDist; 5561 Double rdCost; 5562 #if H_3D_VSO // M13 5563 if ( m_pcRdCost->getUseVSO() ) 5564 { 5565 ruiDist = m_pcRdCost->getDistPartVSO( pcCU, 0, pcRec->getLumaAddr(), pcRec->getStride(), pcOrg->getLumaAddr(), pcOrg->getStride(), uiWidth, uiHeight , false ); 5566 } 5567 else 5568 { 5569 #endif 5570 { 5571 ruiDist = m_pcRdCost->getDistPart( g_bitDepthY, pcRec->getLumaAddr( 0 ), uiRecStride, pcOrg->getLumaAddr( 0 ), uiOrgStride, uiWidth, uiHeight ); 5572 } 5573 #if H_3D_VSO 5574 } 5575 #endif 5576 5577 Bool bNonSkip = true; 5578 for( UInt uiSeg = 0; uiSeg < uiSegmentNum; uiSeg++ ) 5579 { 5580 bNonSkip &= ( pcCU->getInterSDCSegmentDCOffset( uiSeg, 0 ) != 0 ) ? 1 : 0; 5581 } 5582 5583 if( !bNonSkip ) 5584 { 5585 pcCU->getTotalBits() = MAX_INT; 5586 pcCU->getTotalDistortion() = MAX_INT; 5587 pcCU->getTotalCost() = MAX_DOUBLE; 5588 } 5589 else 5590 { 5591 //----- determine rate and r-d cost ----- 5592 UInt uiBits = 0; 5593 TComYuv *pDummy = NULL; 5594 if( m_bUseSBACRD ) 5595 { 5596 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[pcCU->getDepth(0)][CI_CURR_BEST] ); 5597 } 5598 5599 xAddSymbolBitsInter( pcCU, 0, 0, uiBits, pDummy, NULL, pDummy ); 5600 5601 #if H_3D_VSO //M 14 5602 if ( m_pcRdCost->getUseLambdaScaleVSO() ) 5603 { 5604 rdCost = m_pcRdCost->calcRdCostVSO( uiBits, ruiDist ); 5605 } 5606 else 5607 #endif 5608 { 5609 rdCost = m_pcRdCost->calcRdCost( uiBits, ruiDist ); 5610 } 5611 5612 pcCU->getTotalBits() = m_pcEntropyCoder->getNumberOfWrittenBits(); 5613 pcCU->getTotalDistortion() = ruiDist; 5614 pcCU->getTotalCost() = rdCost; 5615 5616 if( m_bUseSBACRD ) 5617 { 5618 m_pcRDGoOnSbacCoder->store( m_pppcRDSbacCoder[ pcCU->getDepth( 0 ) ][ CI_TEMP_BEST ] ); 5619 } 5620 } 5621 5622 #if H_3D_VSO // necessary? // M15 5623 // set Model 5624 if( !m_pcRdCost->getUseEstimatedVSD() && m_pcRdCost->getUseRenModel() ) 5625 { 5626 Pel* piSrc = pcRec->getLumaAddr(); 5627 UInt uiSrcStride = pcRec->getStride(); 5628 m_pcRdCost->setRenModelData( pcCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 5629 } 5630 #endif 5631 } 5632 #endif 5442 5633 5443 5634 #if H_3D_VSO // M25 … … 6605 6796 m_pcEntropyCoder->encodeARPW( pcCU , 0 ); 6606 6797 #endif 6798 #if LGE_INTER_SDC_E0156 6799 m_pcEntropyCoder->encodeInterSDCFlag( pcCU, 0, true ); 6800 #endif 6607 6801 Bool bDummy = false; 6608 6802 m_pcEntropyCoder->encodeCoeff ( pcCU, 0, pcCU->getDepth(0), pcCU->getWidth(0), pcCU->getHeight(0), bDummy ); -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncSearch.h
r597 r598 196 196 TComYuv*& rpcResiYuv, 197 197 TComYuv*& rpcRecoYuv, 198 #if MTK_FAST_TEXTURE_ENCODING_E0173 199 Bool bFMD, 200 #endif 198 201 Bool bUseRes = false 199 202 #if AMP_MRG … … 210 213 TComYuv*& rpcYuvRec, 211 214 Bool bSkipRes ); 212 215 #if LGE_INTER_SDC_E0156 216 Void encodeResAndCalcRdInterSDCCU( TComDataCU* pcCU, 217 TComYuv* pcOrg, 218 TComYuv* pcPred, 219 TComYuv* pcResi, 220 TComYuv* pcRec, 221 const UInt uiDepth ); 222 #endif 213 223 /// set ME search range 214 224 Void setAdaptiveSearchRange ( Int iDir, Int iRefIdx, Int iSearchRange) { m_aaiAdaptSR[iDir][iRefIdx] = iSearchRange; } -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncTop.cpp
r542 r598 392 392 if( picLastCoded ) 393 393 { 394 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 395 picLastCoded->compressMotion(1); 396 #else 394 397 picLastCoded->compressMotion(); 398 #endif 395 399 } 396 400 #endif
Note: See TracChangeset for help on using the changeset viewer.