Changeset 795 in 3DVCSoftware
- Timestamp:
- 24 Jan 2014, 02:36:31 (11 years ago)
- Location:
- branches/HTM-9.3-dev1-MediaTek
- Files:
-
- 2 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-9.3-dev1-MediaTek/source/App/TAppEncoder/TAppEncTop.cpp
r779 r795 914 914 } 915 915 #endif 916 917 #if MTK_DDD_G0063 918 m_acTEncTopList[ layer ]->getSliceEncoder()->setDDDPar( m_cCameraData.getCodedScale()[0][ m_acTEncTopList[layer]->getViewIndex() ], 919 m_cCameraData.getCodedOffset()[0][ m_acTEncTopList[layer]->getViewIndex() ], 920 m_cCameraData.getCamParsCodedPrecision() ); 921 #endif 916 922 Int iNumEncoded = 0; 917 923 -
branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibCommon/TComDataCU.cpp
r793 r795 153 153 m_pucInterSDCMask = NULL; 154 154 #endif 155 156 #if MTK_DDD_G0063 157 m_pucDisparityDerivedDepth = NULL; 158 m_pbUseDDD = NULL; 159 #endif 155 160 } 156 161 … … 298 303 m_pcPattern = (TComPattern*)xMalloc(TComPattern, 1); 299 304 305 #if MTK_DDD_G0063 306 m_pucDisparityDerivedDepth = (UChar* )xMalloc( UChar, uiNumPartition); 307 m_pbUseDDD = (Bool* ) xMalloc( Bool, uiNumPartition); 308 #endif 309 300 310 // create motion vector fields 301 311 … … 375 385 #if H_3D_NBDV 376 386 if ( m_pDvInfo ) { xFree(m_pDvInfo); m_pDvInfo = NULL; } 387 #endif 388 389 #if MTK_DDD_G0063 390 if ( m_pucDisparityDerivedDepth ) { xFree(m_pucDisparityDerivedDepth); m_pucDisparityDerivedDepth = NULL; } 391 if ( m_pbUseDDD ) { xFree(m_pbUseDDD); m_pbUseDDD = NULL; } 377 392 #endif 378 393 … … 525 540 m_pbICFlag[ui] = pcFrom->m_pbICFlag[ui]; 526 541 #endif 542 543 #if MTK_DDD_G0063 544 m_pucDisparityDerivedDepth[ui] = pcFrom->m_pucDisparityDerivedDepth[ui]; 545 m_pbUseDDD[ui] = pcFrom->m_pbUseDDD[ui]; 546 #endif 547 527 548 m_puhWidth [ui] = pcFrom->getWidth(ui); 528 549 m_puhHeight [ui] = pcFrom->getHeight(ui); … … 602 623 memset( m_pbICFlag + firstElement, false, numElements * sizeof( *m_pbICFlag ) ); 603 624 #endif 625 626 #if MTK_DDD_G0063 627 memset( m_pucDisparityDerivedDepth + firstElement, 0, numElements * sizeof( *m_pucDisparityDerivedDepth ) ); 628 memset( m_pbUseDDD + firstElement, 0, numElements * sizeof( *m_pbUseDDD ) ); 629 #endif 630 604 631 #if H_3D_DIM 605 632 for( Int i = 0; i < DIM_NUM_TYPE; i++ ) … … 774 801 m_pbICFlag[ui] = false; 775 802 #endif 803 804 #if MTK_DDD_G0063 805 m_pucDisparityDerivedDepth[ui] = 0; 806 m_pbUseDDD[ui] = 0; 807 #endif 808 776 809 #if H_3D_DIM 777 810 for( Int i = 0; i < DIM_NUM_TYPE; i++ ) … … 879 912 memset( m_puhARPW, 0, iSizeInUchar ); 880 913 #endif 914 915 #if MTK_DDD_G0063 916 memset( m_pucDisparityDerivedDepth, 0, iSizeInUchar ); 917 memset( m_pbUseDDD, 0, iSizeInBool ); 918 #endif 919 881 920 UChar uhWidth = g_uiMaxCUWidth >> uiDepth; 882 921 UChar uhHeight = g_uiMaxCUHeight >> uiDepth; … … 964 1003 m_pbICFlag [ui] = pcCU->m_pbICFlag[uiPartOffset+ui]; 965 1004 #endif 1005 1006 #if MTK_DDD_G0063 1007 m_pucDisparityDerivedDepth[ui] = pcCU->m_pucDisparityDerivedDepth[uiPartOffset+ui]; 1008 m_pbUseDDD[ui] = pcCU->m_pbUseDDD[uiPartOffset+ui]; 1009 #endif 1010 966 1011 #if H_3D_DIM 967 1012 for( Int i = 0; i < DIM_NUM_TYPE; i++ ) … … 1109 1154 #endif 1110 1155 1156 #if MTK_DDD_G0063 1157 m_pucDisparityDerivedDepth = pcCU->getDDDepth() + uiPart; 1158 m_pbUseDDD = pcCU->getUseDDD() + uiPart; 1159 #endif 1160 1111 1161 m_puhLumaIntraDir = pcCU->getLumaIntraDir() + uiPart; 1112 1162 m_puhChromaIntraDir = pcCU->getChromaIntraDir() + uiPart; … … 1256 1306 #if H_3D_ARP 1257 1307 m_puhARPW = pcCU->getARPW() + uiAbsPartIdx; 1308 #endif 1309 1310 #if MTK_DDD_G0063 1311 m_pucDisparityDerivedDepth = pcCU->getDDDepth() + uiAbsPartIdx; 1312 m_pbUseDDD = pcCU->getUseDDD() + uiAbsPartIdx; 1258 1313 #endif 1259 1314 … … 1314 1369 memcpy( m_puhCbf[2] + uiOffset, pcCU->getCbf(TEXT_CHROMA_V), iSizeInUchar ); 1315 1370 1371 #if MTK_DDD_G0063 1372 memcpy( m_pucDisparityDerivedDepth + uiOffset, pcCU->getDDDepth(), iSizeInUchar ); 1373 memcpy( m_pbUseDDD + uiOffset, pcCU->getUseDDD(), iSizeInBool ); 1374 #endif 1375 1376 1316 1377 #if H_3D_DIM 1317 1378 for( Int i = 0; i < DIM_NUM_TYPE; i++ ) … … 1410 1471 #if H_3D_NBDV 1411 1472 memcpy( rpcCU->getDvInfo() + m_uiAbsIdxInLCU, m_pDvInfo, sizeof(* m_pDvInfo) * m_uiNumPartition ); 1473 #endif 1474 1475 #if MTK_DDD_G0063 1476 memcpy( rpcCU->getDDDepth() + m_uiAbsIdxInLCU, m_pucDisparityDerivedDepth, iSizeInUchar ); 1477 memcpy( rpcCU->getUseDDD() + m_uiAbsIdxInLCU, m_pbUseDDD, iSizeInBool ); 1412 1478 #endif 1413 1479 … … 1544 1610 memcpy( rpcCU->getCbf(TEXT_CHROMA_V) + uiPartOffset, m_puhCbf[2], iSizeInUchar ); 1545 1611 1612 #if MTK_DDD_G0063 1613 memcpy( rpcCU->getDDDepth() + uiPartOffset, m_pucDisparityDerivedDepth, iSizeInUchar ); 1614 memcpy( rpcCU->getUseDDD() + uiPartOffset, m_pbUseDDD, iSizeInBool ); 1615 #endif 1616 1546 1617 #if H_3D_DIM 1547 1618 for( Int i = 0; i < DMM_NUM_TYPE; i++ ) … … 1611 1682 #endif 1612 1683 } 1684 1685 #if MTK_DDD_G0063 1686 Void TComDataCU::setDDDepthSubParts ( UChar ucDDD, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 1687 { 1688 setSubPart<UChar>( ucDDD, m_pucDisparityDerivedDepth, uiAbsPartIdx, uiDepth, uiPartIdx ); 1689 } 1690 1691 Void TComDataCU::setUseDDD ( Bool bUseDDD, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 1692 { 1693 setSubPart<Bool>( bUseDDD, m_pbUseDDD, uiAbsPartIdx, uiDepth, uiPartIdx ); 1694 } 1695 1696 Void TComDataCU::setUseDDD( Bool bUseDDD, UInt uiAbsPartIdx, UInt uiDepth ) 1697 { 1698 memset( m_pbUseDDD + uiAbsPartIdx, bUseDDD, (m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ))*sizeof(Bool) ); 1699 } 1700 1701 #endif 1613 1702 1614 1703 // -------------------------------------------------------------------------------------------------------------------- … … 3881 3970 TComMvField tmpMV[2]; 3882 3971 UChar tmpDir; 3972 3973 #if MTK_DDD_G0063 3974 m_iUseDDDCandIdx = -1; 3975 #endif 3883 3976 3884 3977 ////////////////////////////////// … … 4328 4421 #endif 4329 4422 } 4330 4423 #if MTK_DDD_G0063 4424 if( m_pcSlice->getIsDepth() && m_pcSlice->getViewIndex() != 0 ) 4425 { 4426 UInt uiPartIdx; 4427 TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() ); 4428 TComSlice *pcTextureSlice = pcTextureCU->getSlice(); 4429 4430 4431 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 4432 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); 4433 tmpDir = 0; 4434 4435 xDeriveCenterIdx( uiPUIdx, uiPartIdx); 4436 4437 if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdx ) ) 4438 { 4439 4440 TComMvField cMVField; 4441 UChar ucInterDir = pcTextureCU->getInterDir( uiPartIdx ); 4442 4443 Int iDV = 0; 4444 Int iViewIdx = 0; 4445 if( ucInterDir & 1 ) 4446 { 4447 pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_0, cMVField ); 4448 if( pcTextureSlice->getRefPOC( REF_PIC_LIST_0, cMVField.getRefIdx()) == pcTextureSlice->getPOC() ) 4449 { 4450 iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_0, cMVField.getRefIdx())->getViewIndex(); 4451 iDV = cMVField.getHor(); 4452 4453 4454 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, cMVField.getRefIdx() ); 4455 4456 if( iValidDepRef >= 0 ) 4457 { 4458 const TComMv cAdd( 2, 2 ); 4459 cMVField.getMv() += cAdd; 4460 cMVField.getMv() >>= 2; 4461 clipMv( cMVField.getMv() ); 4462 tmpMV[ 0 ].setMvField( cMVField.getMv(), iValidDepRef ); 4463 tmpDir = 1; 4464 } 4465 } 4466 } 4467 if( !tmpDir && ( ucInterDir & 2 )) 4468 { 4469 pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_1, cMVField ); 4470 if( pcTextureSlice->getRefPOC( REF_PIC_LIST_1, cMVField.getRefIdx()) == pcTextureSlice->getPOC() ) 4471 { 4472 iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_1, cMVField.getRefIdx())->getViewIndex(); 4473 iDV = cMVField.getHor(); 4474 4475 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_1, cMVField.getRefIdx() ); 4476 4477 if( iValidDepRef >= 0 ) 4478 { 4479 const TComMv cAdd( 2, 2 ); 4480 cMVField.getMv() += cAdd; 4481 cMVField.getMv() >>= 2; 4482 clipMv( cMVField.getMv() ); 4483 tmpMV[ 1 ].setMvField( cMVField.getMv(), iValidDepRef ); 4484 tmpDir = 2; 4485 } 4486 } 4487 } 4488 if( tmpDir != 0 ) 4489 { 4490 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV); 4491 m_ucDDTmpDepth = m_pcSlice->getDepthFromDV( iDV, iViewIdx ); 4492 m_iUseDDDCandIdx = iCount; 4493 4494 if( tmpDir == 1 ) 4495 { 4496 pcMvFieldNeighbours[ iCount << 1 ] = tmpMV[ 0 ]; 4497 } 4498 else if( tmpDir == 2 ) 4499 { 4500 pcMvFieldNeighbours[( iCount << 1 ) + 1 ] = tmpMV[ 1 ]; 4501 } 4502 4503 abCandIsInter [ iCount ] = true; 4504 puhInterDirNeighbours[ iCount ] = tmpDir; 4505 4506 if ( mrgCandIdx == iCount ) 4507 { 4508 return; 4509 } 4510 iCount ++; 4511 4512 Int iLeftAboveAvail = 0; 4513 if( iPosLeftAbove[ 0 ] != -1 ) 4514 { 4515 iPosLeftAbove[ 0 ] = iCount; 4516 iLeftAboveAvail = 1; 4517 } 4518 if( iPosLeftAbove[ 1 ] != -1 ) 4519 { 4520 iPosLeftAbove[ 1 ] = iCount + iLeftAboveAvail; 4521 } 4522 4523 } 4524 } 4525 4526 } 4527 #endif 4331 4528 ///////////////////////////////////////////////////////////////// 4332 4529 //////// DERIVE IvMC, IvMCShift,IvDCShift, IvDC Candidates ///// … … 4398 4595 for(; iCnloop >= 0; iCnloop --) 4399 4596 { 4597 #if MTK_DDD_G0063 4598 if( iCnloop == m_iUseDDDCandIdx ) 4599 { 4600 continue; 4601 } 4602 #endif 4400 4603 if(ivCandDir[0] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==tmpMV[0] && pcMvFieldNeighbours[(iCnloop<<1)+1]==tmpMV[1]) // F0125 compatible with F0093 4401 4604 { … … 4595 4798 #endif 4596 4799 4800 #if MTK_DDD_G0063 4801 // early termination 4802 if ( iCount >= getSlice()->getMaxNumMergeCand()) 4803 { 4804 return; 4805 } 4806 #endif 4597 4807 4598 4808 #if H_3D_IV_MERGE -
branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibCommon/TComDataCU.h
r787 r795 250 250 #endif 251 251 252 #if MTK_DDD_G0063 253 UChar* m_pucDisparityDerivedDepth; 254 Bool* m_pbUseDDD; 255 Int m_iUseDDDCandIdx; 256 UChar m_ucDDTmpDepth; 257 #endif 258 252 259 protected: 253 260 … … 755 762 UInt getCoefScanIdx(UInt uiAbsPartIdx, UInt uiWidth, Bool bIsLuma, Bool bIsIntra); 756 763 764 #if MTK_DDD_G0063 765 UChar* getDDDepth () { return m_pucDisparityDerivedDepth; } 766 UChar getDDDepth ( UInt uiIdx ) { return m_pucDisparityDerivedDepth[uiIdx]; } 767 Void setDDDepth ( UInt uiIdx, UChar n ) { m_pucDisparityDerivedDepth[uiIdx] = n; } 768 Void setDDDepthSubParts( UChar ucDDD, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 769 770 Bool* getUseDDD () { return m_pbUseDDD; } 771 Bool getUseDDD ( UInt uiIdx ) { return m_pbUseDDD[uiIdx]; } 772 Void setUseDDD ( UInt uiIdx, Bool n ) { m_pbUseDDD[uiIdx] = n; } 773 Void setUseDDD( Bool bUseDDD, UInt uiAbsPartIdx, UInt uiDepth ); 774 775 Void setUseDDD ( Bool bUseDDD, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 776 777 UChar getDDTmpDepth(){ return m_ucDDTmpDepth; } 778 Int getUseDDDCandIdx(){ return m_iUseDDDCandIdx;} 779 780 #endif 757 781 }; 758 782 -
branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibCommon/TComPrediction.cpp
r773 r795 783 783 TComMv cMv = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); 784 784 pcCU->clipMv(cMv); 785 786 #if MTK_DDD_G0063 787 if( pcCU->getUseDDD( uiPartAddr ) ) 788 { 789 assert( pcCU->getSPIVMPFlag( uiPartAddr ) == 0 ); 790 assert( pcCU->getSlice()->getViewIndex() != 0 ); 791 792 Int dstStride = rpcYuvPred->getStride(); 793 Int dstStrideC = rpcYuvPred->getCStride(); 794 Pel *dst = rpcYuvPred->getLumaAddr( uiPartAddr ); 795 Pel *dstU = rpcYuvPred->getCbAddr( uiPartAddr ); 796 Pel *dstV = rpcYuvPred->getCrAddr( uiPartAddr ); 797 798 Int iWidthC = iWidth >> 1; 799 Int iHeightC = iHeight >> 1; 800 Int DefaultC = 1 << ( g_bitDepthY - 1); 801 for ( Int i = 0; i < iHeight; i++) 802 { 803 for ( Int j = 0; j < iWidth ; j++) 804 { 805 dst[j] = pcCU->getDDDepth( uiPartAddr ); 806 } 807 dst += dstStride; 808 } 809 for ( Int i = 0; i < iHeightC; i++) 810 { 811 for ( Int j = 0; j < iWidthC; j++) 812 { 813 dstU[j] = dstV[j] = DefaultC; 814 } 815 dstU += dstStrideC; 816 dstV += dstStrideC; 817 } 818 819 //return; 820 } else 821 #endif 785 822 #if H_3D_ARP 786 823 if(pcCU->getARPW( uiPartAddr ) > 0 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC()) -
branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibCommon/TComSlice.cpp
r773 r795 3272 3272 #endif 3273 3273 3274 #if MTK_DDD_G0063 3275 if( getIsDepth() && getViewIndex() > 0 ) 3276 { 3277 TComSlice *pcTextSlice = getTexturePic()->getSlice( 0 ); 3278 memcpy( m_aiDDDInvScale, pcTextSlice->m_aiDDDInvScale, sizeof( Int ) * getViewIndex() ); 3279 memcpy( m_aiDDDInvOffset, pcTextSlice->m_aiDDDInvOffset, sizeof( Int ) * getViewIndex() ); 3280 memcpy( m_aiDDDShift, pcTextSlice->m_aiDDDShift, sizeof( Int ) * getViewIndex() ); 3281 } 3282 #endif 3283 3274 3284 if( !setupLUT ) 3275 3285 return; … … 3319 3329 m_depthToDisparityF[ i ][ d ] = ( invCodScale[ i ] * d + invOffset ) >> log2Div; 3320 3330 } 3321 } 3322 } 3323 #endif 3324 #endif 3331 3332 #if MTK_DDD_G0063 3333 InitializeDDDPara( vps->getCamParPrecision(), codScale[ i ], codOffset[ i ], i ); 3334 #endif 3335 } 3336 } 3337 #endif 3338 #endif 3339 3340 #if MTK_DDD_G0063 3341 Void TComSlice::InitializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ) 3342 { 3343 UInt uiViewId = getViewIndex(); 3344 3345 if( uiViewId == 0 ) 3346 { 3347 m_aiDDDInvScale[ iBaseViewIdx ] = m_aiDDDInvOffset[ iBaseViewIdx ] = m_aiDDDShift[ iBaseViewIdx ] = 0; 3348 return; 3349 } 3350 3351 3352 Int iSign = iCodedScale >= 0 ? 1 : -1; 3353 iCodedScale = abs( iCodedScale ); 3354 3355 Int iBitWidth = 0; 3356 3357 const Int iInvPres = 9; 3358 3359 while( ((( 1 << iBitWidth ) << 1 ) <= iCodedScale ) ) 3360 { 3361 iBitWidth ++; 3362 } 3363 iBitWidth += iInvPres; 3364 Int iTargetValue = 1 << iBitWidth; 3365 3366 Int iMinError = MAX_INT; 3367 Int iBestD = 1 << ( iInvPres - 1 ); 3368 for( Int d = 1 << ( iInvPres - 1 ); d < ( 1 << iInvPres ); d++ ) 3369 { 3370 Int iError = abs( iCodedScale * d - iTargetValue ); 3371 if( iError < iMinError ) 3372 { 3373 iMinError = iError; 3374 iBestD = d; 3375 } 3376 if( iMinError == 0 ) 3377 { 3378 break; 3379 } 3380 } 3381 Int iRoundingDir = 0; 3382 if( iCodedScale * iBestD > iTargetValue ) 3383 { 3384 iRoundingDir = -1; 3385 } 3386 else if( iCodedScale * iBestD < iTargetValue ) 3387 { 3388 iRoundingDir = 1; 3389 } 3390 Int iCamPres = uiCamParsCodedPrecision - 1; 3391 m_aiDDDInvScale [ iBaseViewIdx ] = ( iBestD << ( iCamPres + g_bitDepthY )) * iSign; 3392 m_aiDDDInvOffset[ iBaseViewIdx ] = -iSign * iBestD * ( iCodedOffset << g_bitDepthY ); 3393 m_aiDDDShift [ iBaseViewIdx ] = iBitWidth; 3394 m_aiDDDInvOffset[ iBaseViewIdx ] += 1 << ( m_aiDDDShift[ iBaseViewIdx ] - 1 ); 3395 m_aiDDDInvOffset[ iBaseViewIdx ] += ( 1 << ( m_aiDDDShift[ iBaseViewIdx ] - 4 ) ) * iRoundingDir; 3396 3397 return; 3398 } 3399 #endif 3400 3325 3401 /** get scaling matrix from RefMatrixID 3326 3402 * \param sizeId size index -
branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibCommon/TComSlice.h
r779 r795 2062 2062 #endif 2063 2063 #endif 2064 2065 #if MTK_DDD_G0063 2066 Int m_aiDDDInvScale [MAX_NUM_LAYERS]; 2067 Int m_aiDDDInvOffset[MAX_NUM_LAYERS]; 2068 UInt m_aiDDDShift [MAX_NUM_LAYERS]; 2069 #endif 2070 2064 2071 public: 2065 2072 TComSlice(); … … 2408 2415 TComPic* getPicFromRefPicSetInterLayer( Int setIdc, Int layerId ); 2409 2416 #endif 2417 2418 #if MTK_DDD_G0063 2419 Void InitializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ); 2420 Int getDepthFromDV( Int iDV, Int iBaseViewIdx ) 2421 { 2422 return ClipY(( iDV * m_aiDDDInvScale[ iBaseViewIdx ] + m_aiDDDInvOffset[ iBaseViewIdx ] ) >> m_aiDDDShift[ iBaseViewIdx ]); 2423 } 2424 #endif 2425 2410 2426 protected: 2411 2427 TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, -
branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibCommon/TypeDef.h
r793 r795 258 258 #define MTK_RBIP_VSP_G0069 1 // Restricted bi-prediction for VSP 259 259 #endif 260 261 #define MTK_DDD_G0063 1 // Disparity derived depth coding 260 262 261 263 ///// ***** ILLUMATION COMPENSATION ********* -
branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibDecoder/TDecCu.cpp
r787 r795 213 213 DTRACE_CU("cqtDepth" , uiDepth) 214 214 #endif 215 215 216 TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx()); 216 217 Bool bStartInCU = pcCU->getSCUAddr()+uiAbsPartIdx+uiCurNumParts>pcSlice->getSliceSegmentCurStartCUAddr()&&pcCU->getSCUAddr()+uiAbsPartIdx<pcSlice->getSliceSegmentCurStartCUAddr(); … … 274 275 #if H_MV_ENC_DEC_TRAC 275 276 DTRACE_CU_S("=========== coding_unit ===========\n") 277 #endif 278 279 280 #if MTK_DDD_G0063 281 pcCU->setUseDDD( false, uiAbsPartIdx, uiDepth ); 276 282 #endif 277 283 … … 437 443 #endif 438 444 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 445 446 #if MTK_DDD_G0063 447 if( uiMergeIndex == m_ppcCU[uiDepth]->getUseDDDCandIdx() ) 448 { 449 assert( pcCU->getSlice()->getViewIndex() != 0 ); 450 pcCU->setUseDDD( true, uiAbsPartIdx, 0, uiDepth ); 451 pcCU->setDDDepthSubParts( m_ppcCU[uiDepth]->getDDTmpDepth(),uiAbsPartIdx, 0, uiDepth ); 452 } 453 #endif 439 454 440 455 TComMv cTmpMv( 0, 0 ); -
branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibDecoder/TDecEntropy.cpp
r773 r795 320 320 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 321 321 322 #if MTK_DDD_G0063 323 if( uiMergeIndex == pcSubCU->getUseDDDCandIdx() ) 324 { 325 assert( pcCU->getSlice()->getViewIndex() != 0 ); 326 pcCU->setUseDDD( true, uiSubPartIdx, uiPartIdx, uiDepth ); 327 pcCU->setDDDepthSubParts( pcSubCU->getDDTmpDepth(),uiSubPartIdx, uiPartIdx, uiDepth ); 328 } 329 else 330 { 331 pcCU->setUseDDD( false, uiSubPartIdx, uiPartIdx, uiDepth ); 332 } 333 #endif 334 322 335 TComMv cTmpMv( 0, 0 ); 323 336 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) -
branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibDecoder/TDecTop.h
r773 r795 82 82 #endif 83 83 84 #if MTK_DDD_G0063 85 Int getCodedScale( Int iBaseView, Int iCureView){ return m_aaiCodedScale[ iBaseView ][ iCureView ];} 86 Int getCodedOffset( Int iBaseView, Int iCureView){ return m_aaiCodedOffset[ iBaseView ][ iCureView ];} 87 UInt getCamParsCodedPrecision(){ return m_uiCamParsCodedPrecision; } 88 #endif 89 84 90 private: 85 91 Bool xIsComplete (); -
branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibEncoder/TEncCu.cpp
r787 r795 1881 1881 1882 1882 #endif 1883 1884 #if MTK_DDD_G0063 1885 Int iDDDCand = rpcTempCU->getUseDDDCandIdx(); 1886 UChar ucDDDepth = rpcTempCU->getDDTmpDepth(); 1887 rpcTempCU->setUseDDD( false, 0, uhDepth ); 1888 #endif 1889 1883 1890 for( UInt uiNoResidual = 0; uiNoResidual < iteration; ++uiNoResidual ) 1884 1891 { … … 1914 1921 rpcTempCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, 0, 0, uhDepth ); 1915 1922 #endif 1923 1924 #if MTK_DDD_G0063 1925 if( rpcTempCU->getSlice()->getIsDepth() && rpcTempCU->getSlice()->getViewIndex() != 0 && iDDDCand == uiMergeCand ) 1926 { 1927 rpcTempCU->setUseDDD( true, 0, 0, uhDepth ); 1928 rpcTempCU->setDDDepthSubParts( ucDDDepth, 0, 0, uhDepth ); 1929 } 1930 else 1931 { 1932 rpcTempCU->setUseDDD( false, 0, 0, uhDepth ); 1933 } 1934 #endif 1935 1916 1936 #if H_3D_SPIVMP 1917 1937 rpcTempCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeCand], 0, 0, uhDepth); … … 2122 2142 rpcTempCU->setCUTransquantBypassSubParts ( m_pcEncCfg->getCUTransquantBypassFlagValue(), 0, uhDepth ); 2123 2143 2144 #if MTK_DDD_G0063 2145 rpcTempCU->setUseDDD( false, 0, uhDepth ); 2146 #endif 2147 2124 2148 #if H_3D_ARP 2125 2149 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); -
branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibEncoder/TEncSearch.cpp
r773 r795 3675 3675 #endif 3676 3676 3677 #if MTK_DDD_G0063 3678 if( uiMergeCand == pcCU->getUseDDDCandIdx() ) 3679 { 3680 pcCU->setUseDDD( true, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3681 pcCU->setDDDepthSubParts( pcCU->getDDTmpDepth(), uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3682 } 3683 else 3684 { 3685 pcCU->setUseDDD( false, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3686 } 3687 #endif 3688 3677 3689 xGetInterPredictionError( pcCU, pcYuvOrg, iPUIdx, uiCostCand, m_pcEncCfg->getUseHADME() ); 3678 3690 uiBitsCand = uiMergeCand + 1; … … 4372 4384 pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMRGIndex].m_acDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4373 4385 #endif 4386 4387 #if MTK_DDD_G0063 4388 if( uiMRGIndex == pcCU->getUseDDDCandIdx() ) 4389 { 4390 assert( vspFlag[uiMRGIndex] == 0 ); 4391 assert( bSPIVMPFlag[uiMRGIndex] == 0 ); 4392 pcCU->setUseDDD( true, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4393 pcCU->setDDDepthSubParts( pcCU->getDDTmpDepth(), uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4394 } 4395 else 4396 { 4397 pcCU->setUseDDD( false, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4398 } 4399 #endif 4400 4374 4401 #if H_3D_SPIVMP 4375 4402 pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); … … 4422 4449 #if H_3D_SPIVMP 4423 4450 pcCU->setSPIVMPFlagSubParts(0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4451 #endif 4452 4453 #if MTK_DDD_G0063 4454 pcCU->setUseDDD( false, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4424 4455 #endif 4425 4456 // set ME result -
branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibEncoder/TEncSlice.h
r655 r795 107 107 UInt m_uiSliceIdx; 108 108 std::vector<TEncSbac*> CTXMem; 109 110 #if MTK_DDD_G0063 111 Int m_iDDDScale; 112 Int m_iDDDOffset; 113 UInt m_uiDDDPrecision; 114 #endif 109 115 public: 110 116 TEncSlice(); … … 147 153 Void setCtxMem( TEncSbac* sb, Int b ) { CTXMem[b] = sb; } 148 154 155 #if MTK_DDD_G0063 156 Void setDDDPar( Int iScale, Int iOffset, UInt uiPrecision ){ m_iDDDScale = iScale; m_iDDDOffset = iOffset; m_uiDDDPrecision = uiPrecision; } 157 #endif 158 149 159 private: 150 160 Double xGetQPValueAccordingToLambda ( Double lambda );
Note: See TracChangeset for help on using the changeset viewer.