Changeset 1039 in 3DVCSoftware for trunk/source/Lib/TLibCommon
- Timestamp:
- 4 Aug 2014, 11:36:05 (10 years ago)
- Location:
- trunk/source/Lib/TLibCommon
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/ContextTables.h
r976 r1039 51 51 #define NUM_SPLIT_FLAG_CTX 3 ///< number of context models for split flag 52 52 #define NUM_SKIP_FLAG_CTX 3 ///< number of context models for skip flag 53 53 #if MTK_SINGLE_DEPTH_MODE_I0095 54 #define NUM_SINGLEDEPTH_FLAG_CTX 1 55 #define NUM_SINGLE_DEPTH_VALUE_DATA_CTX 1 56 #endif 54 57 #define NUM_MERGE_FLAG_EXT_CTX 1 ///< number of context models for merge flag of merge extended 55 58 #define NUM_MERGE_IDX_EXT_CTX 1 ///< number of context models for merge index of merge extended … … 150 153 { CNU, CNU, CNU, }, 151 154 }; 152 155 #if MTK_SINGLE_DEPTH_MODE_I0095 156 static const UChar 157 INIT_SINGLEDEPTH_FLAG[3][NUM_SINGLEDEPTH_FLAG_CTX] = 158 { 159 { 185 }, 160 { 185 }, 161 { 185 }, 162 }; 163 static const UChar 164 INIT_SINGLE_DEPTH_VALUE_DATA[3][NUM_SINGLE_DEPTH_VALUE_DATA_CTX] = 165 { 166 { 137 }, 167 { 137 }, 168 { 137 }, 169 }; 170 #endif 153 171 static const UChar 154 172 INIT_MERGE_FLAG_EXT[3][NUM_MERGE_FLAG_EXT_CTX] = … … 432 450 static const UChar INIT_DBBP_FLAG[3][DBBP_NUM_FLAG_CTX] = 433 451 { 452 #if SEC_DBBP_EXPLICIT_SIG_I0077 453 { CNU }, 454 { CNU }, 455 { CNU }, 456 #else 434 457 { 161 }, 435 458 { 161 }, 436 459 { 161 }, 437 }; 438 #endif 439 440 #endif 460 #endif 461 }; 462 #endif 463 464 #endif -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r976 r1039 60 60 61 61 m_skipFlag = NULL; 62 62 #if MTK_SINGLE_DEPTH_MODE_I0095 63 m_singleDepthFlag = NULL; 64 m_apSingleDepthValue = NULL; 65 #endif 63 66 m_pePartSize = NULL; 64 67 m_pePredMode = NULL; … … 182 185 183 186 m_skipFlag = new Bool[ uiNumPartition ]; 184 187 #if MTK_SINGLE_DEPTH_MODE_I0095 188 m_singleDepthFlag = new Bool[ uiNumPartition ]; 189 m_apSingleDepthValue = (Pel*)xMalloc(Pel, uiNumPartition); 190 #endif 185 191 m_pePartSize = new Char[ uiNumPartition ]; 186 192 memset( m_pePartSize, SIZE_NONE,uiNumPartition * sizeof( *m_pePartSize ) ); … … 329 335 330 336 if ( m_skipFlag ) { delete[] m_skipFlag; m_skipFlag = NULL; } 331 337 #if MTK_SINGLE_DEPTH_MODE_I0095 338 if ( m_singleDepthFlag ) { delete[] m_singleDepthFlag; m_singleDepthFlag = NULL; } 339 if ( m_apSingleDepthValue ) { xFree(m_apSingleDepthValue); m_apSingleDepthValue = NULL; } 340 #endif 332 341 if ( m_pePartSize ) { delete[] m_pePartSize; m_pePartSize = NULL; } 333 342 if ( m_pePredMode ) { delete[] m_pePredMode; m_pePredMode = NULL; } … … 494 503 TComDataCU * pcFrom = pcPic->getCU(getAddr()); 495 504 m_skipFlag[ui] = pcFrom->getSkipFlag(ui); 505 #if MTK_SINGLE_DEPTH_MODE_I0095 506 m_singleDepthFlag[ui] = pcFrom->getSingleDepthFlag(ui); 507 m_apSingleDepthValue[ui] = pcFrom->getSingleDepthValue(ui); 508 #endif 496 509 m_pePartSize[ui] = pcFrom->getPartitionSize(ui); 497 510 m_pePredMode[ui] = pcFrom->getPredictionMode(ui); … … 550 563 { 551 564 memset( m_skipFlag + firstElement, false, numElements * sizeof( *m_skipFlag ) ); 552 565 #if MTK_SINGLE_DEPTH_MODE_I0095 566 memset( m_singleDepthFlag + firstElement, false, numElements * sizeof( *m_singleDepthFlag ) ); 567 memset( m_apSingleDepthValue + firstElement, 0, numElements * sizeof( *m_apSingleDepthValue ) ); 568 #endif 553 569 memset( m_pePartSize + firstElement, SIZE_NONE, numElements * sizeof( *m_pePartSize ) ); 554 570 memset( m_pePredMode + firstElement, MODE_NONE, numElements * sizeof( *m_pePredMode ) ); … … 738 754 m_puhTransformSkip[2][ui] = 0; 739 755 m_skipFlag[ui] = false; 756 #if MTK_SINGLE_DEPTH_MODE_I0095 757 m_singleDepthFlag[ui] = false; 758 m_apSingleDepthValue[ui] = 0; 759 #endif 740 760 m_pePartSize[ui] = SIZE_NONE; 741 761 m_pePredMode[ui] = MODE_NONE; … … 913 933 { 914 934 m_skipFlag[ui] = false; 935 #if MTK_SINGLE_DEPTH_MODE_I0095 936 m_singleDepthFlag[ui] = false; 937 m_apSingleDepthValue[ui]= 0; 938 #endif 915 939 m_pePartSize[ui] = SIZE_NONE; 916 940 m_pePredMode[ui] = MODE_NONE; … … 934 958 m_puhTransformSkip[2][ui] = pcCU->getTransformSkip(uiPartOffset+ui,TEXT_CHROMA_V); 935 959 m_skipFlag[ui] = pcCU->getSkipFlag(uiPartOffset+ui); 960 #if MTK_SINGLE_DEPTH_MODE_I0095 961 m_singleDepthFlag[ui] = pcCU->getSingleDepthFlag(uiPartOffset+ui); 962 m_apSingleDepthValue[ui] = pcCU->getSingleDepthValue(uiPartOffset+ui); 963 #endif 936 964 m_pePartSize[ui] = pcCU->getPartitionSize(uiPartOffset+ui); 937 965 m_pePredMode[ui] = pcCU->getPredictionMode(uiPartOffset+ui); … … 1083 1111 1084 1112 m_skipFlag=pcCU->getSkipFlag() + uiPart; 1085 1113 #if MTK_SINGLE_DEPTH_MODE_I0095 1114 m_singleDepthFlag = pcCU->getSingleDepthFlag() + uiPart; 1115 m_apSingleDepthValue = pcCU->getSingleDepthValue() + uiPart; 1116 #endif 1086 1117 m_phQP=pcCU->getQP() + uiPart; 1087 1118 m_pePartSize = pcCU->getPartitionSize() + uiPart; … … 1221 1252 1222 1253 m_skipFlag = pcCU->getSkipFlag () + uiAbsPartIdx; 1223 1254 #if MTK_SINGLE_DEPTH_MODE_I0095 1255 m_singleDepthFlag = pcCU->getSingleDepthFlag () + uiAbsPartIdx; 1256 m_apSingleDepthValue = pcCU->getSingleDepthValue () + uiAbsPartIdx; 1257 #endif 1224 1258 m_pePartSize = pcCU->getPartitionSize () + uiAbsPartIdx; 1225 1259 #if H_3D_NBDV … … 1297 1331 Int sizeInChar = sizeof( Char ) * uiNumPartition; 1298 1332 memcpy( m_skipFlag + uiOffset, pcCU->getSkipFlag(), sizeof( *m_skipFlag ) * uiNumPartition ); 1333 #if MTK_SINGLE_DEPTH_MODE_I0095 1334 memcpy( m_singleDepthFlag + uiOffset, pcCU->getSingleDepthFlag(), sizeof( *m_singleDepthFlag ) * uiNumPartition ); 1335 memcpy( m_apSingleDepthValue + uiOffset, pcCU->getSingleDepthValue(), sizeof( *m_apSingleDepthValue ) * uiNumPartition); 1336 #endif 1299 1337 memcpy( m_phQP + uiOffset, pcCU->getQP(), sizeInChar ); 1300 1338 memcpy( m_pePartSize + uiOffset, pcCU->getPartitionSize(), sizeof( *m_pePartSize ) * uiNumPartition ); … … 1417 1455 1418 1456 memcpy( rpcCU->getSkipFlag() + m_uiAbsIdxInLCU, m_skipFlag, sizeof( *m_skipFlag ) * m_uiNumPartition ); 1419 1457 #if MTK_SINGLE_DEPTH_MODE_I0095 1458 memcpy( rpcCU->getSingleDepthFlag() + m_uiAbsIdxInLCU, m_singleDepthFlag, sizeof( *m_singleDepthFlag ) * m_uiNumPartition ); 1459 memcpy( rpcCU->getSingleDepthValue() + m_uiAbsIdxInLCU, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * m_uiNumPartition); 1460 #endif 1420 1461 memcpy( rpcCU->getQP() + m_uiAbsIdxInLCU, m_phQP, sizeInChar ); 1421 1462 #if H_3D_NBDV … … 1533 1574 Int sizeInChar = sizeof( Char ) * uiQNumPart; 1534 1575 memcpy( rpcCU->getSkipFlag() + uiPartOffset, m_skipFlag, sizeof( *m_skipFlag ) * uiQNumPart ); 1535 1576 #if MTK_SINGLE_DEPTH_MODE_I0095 1577 memcpy( rpcCU->getSingleDepthFlag() + uiPartOffset, m_singleDepthFlag, sizeof( *m_singleDepthFlag ) * uiQNumPart ); 1578 memcpy( rpcCU->getSingleDepthValue() + uiPartOffset, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * uiQNumPart); 1579 #endif 1536 1580 memcpy( rpcCU->getQP() + uiPartOffset, m_phQP, sizeInChar ); 1537 1581 memcpy( rpcCU->getPartitionSize() + uiPartOffset, m_pePartSize, sizeof( *m_pePartSize ) * uiQNumPart ); … … 2453 2497 memset( m_skipFlag + absPartIdx, skip, m_pcPic->getNumPartInCU() >> ( 2 * depth ) ); 2454 2498 } 2455 2499 #if MTK_SINGLE_DEPTH_MODE_I0095 2500 Void TComDataCU::setSingleDepthFlagSubParts( Bool singleDepth, UInt absPartIdx, UInt depth ) 2501 { 2502 assert( sizeof( *m_singleDepthFlag) == 1 ); 2503 memset( m_singleDepthFlag + absPartIdx, singleDepth, m_pcPic->getNumPartInCU() >> ( 2 * depth ) ); 2504 } 2505 2506 Void TComDataCU::setSingleDepthValueSubParts(Pel singleDepthValue, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ) 2507 { 2508 setSubPartT<Pel>( singleDepthValue, m_apSingleDepthValue, uiAbsPartIdx, uiDepth, uiPUIdx ); 2509 } 2510 #endif 2456 2511 Void TComDataCU::setPredModeSubParts( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth ) 2457 2512 { … … 2622 2677 } 2623 2678 2679 #if HS_DMM_SIGNALLING_I0120 2680 if( isDimMode( getLumaIntraDir( uiAbsPartIdx ) ) ) 2681 #else 2624 2682 if( isDimMode( getLumaIntraDir( uiAbsPartIdx ) ) && !isDimDeltaDC( getLumaIntraDir( uiAbsPartIdx ) ) ) 2683 #endif 2625 2684 { 2626 2685 return true; … … 2635 2694 // check prediction mode 2636 2695 UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx ); 2696 #if HS_DMM_SIGNALLING_I0120 2697 if( uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX ) ) 2698 #else 2637 2699 if( uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) ) 2700 #endif 2638 2701 return true; 2639 2702 … … 3310 3373 for(Int iLoop = 0; iLoop < 2; iLoop ++ ) 3311 3374 { 3375 #if !SEC_SIMP_SHIFTED_DV_I0086 3312 3376 // IvDcShift (Derived from spatial Iv neighboring blocks) 3313 3377 if( iLoop == 1 ) … … 3343 3407 } 3344 3408 } 3409 #endif 3345 3410 3346 3411 /// iLoop = 0 --> IvMCShift … … 3390 3455 } 3391 3456 3457 #if !SEC_SIMP_SHIFTED_DV_I0086 3392 3458 inline Bool TComDataCU::xGetPosFirstAvailDmvCand(Int iCount, Int& posFirstAvailDmvCand ) 3393 3459 { … … 3406 3472 return false; 3407 3473 } 3474 #endif 3408 3475 3409 3476 #endif … … 3854 3921 Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours 3855 3922 #endif 3856 #if H_3D_VSP 3923 #if H_3D_VSP && !FIX_TICKET_79 3857 3924 , InheritedVSPDisInfo* inheritedVSPDisInfo 3858 3925 #endif … … 3884 3951 ////////////////////////////////// 3885 3952 DisInfo cDisInfo = getDvInfo(uiAbsPartIdx); 3953 #if !FIX_TICKET_79 3886 3954 for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++) 3887 3955 { 3888 3956 inheritedVSPDisInfo[i].m_acDvInfo = cDisInfo; // To prevent run-time error, this code must be executed always for merging process. 3889 3957 } 3958 #endif 3890 3959 m_cDefaultDisInfo = cDisInfo; 3891 3960 … … 4178 4247 TComMv cMv = cDefaultMvField.getMv() + cMvRounding; 4179 4248 cMv >>= 2; 4249 #if !FIX_TICKET_68 4180 4250 clipMv( cMv ); 4251 #endif 4181 4252 cMvFieldSaved[eCurrRefPicList].setMvField(cMv, iRefPicList) ; 4182 4253 break; … … 5250 5321 #endif 5251 5322 5252 5323 #if !FIX_TICKET_76 5253 5324 #if H_3D_VSP 5254 5325 inline Void TComDataCU::xInheritVSPDisInfo(TComDataCU* pcCURef, UInt uiAbsPartIdx, Int iCount, InheritedVSPDisInfo* inheritedVSPDisInfo) … … 5257 5328 inheritedVSPDisInfo[iCount].m_acDvInfo.m_aVIdxCan = pcCURef->getDvInfo(uiAbsPartIdx).m_aVIdxCan; 5258 5329 } 5330 #endif 5259 5331 #endif 5260 5332 /** Check whether the current PU and a spatial neighboring PU are in a same ME region. … … 5900 5972 Int iColRefViewId = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewIndex(); 5901 5973 iScale = xGetDistScaleFactor( iCurrViewId, iCurrRefViewId, iColViewId, iColRefViewId ); 5974 #if SEC_HLS_CLEANUP_I0100 5975 if ( iScale != 4096 && m_pcSlice->getVPS()->getIvMvScalingFlag(getSlice()->getLayerIdInVps()) ) 5976 #else 5902 5977 if ( iScale != 4096 && m_pcSlice->getVPS()->getIvMvScalingFlag() ) 5978 #endif 5903 5979 { 5904 5980 rcMv = cColMv.scaleMv( iScale ); … … 6083 6159 6084 6160 TComMv cMv; 6161 #if MTK_I0093 6162 Int iDisp = getSlice()->getDepthToDisparityB( 0 )[ 1 << ( getSlice()->getSPS()->getBitDepthY() - 1 ) ]; 6163 #else 6085 6164 Int iDisp = getSlice()->getDepthToDisparityB( 0 )[ 128 ]; 6165 #endif 6086 6166 cMv.setHor(iDisp); 6087 6167 cMv.setVer(0); … … 6091 6171 return true; 6092 6172 } 6173 #endif 6174 6175 #if MTK_SINGLE_DEPTH_MODE_I0095 6176 Bool TComDataCU::getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index) 6177 { 6178 6179 Bool bDepAvail = false; 6180 Pel *pDepth = this->getPic()->getPicYuvRec()->getLumaAddr(); 6181 Int iDepStride = this->getPic()->getPicYuvRec()->getStride(); 6182 6183 Int xP, yP, nPSW, nPSH; 6184 this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH); 6185 UInt PicHeight=this->getPic()->getPicYuvRec()->getHeight(); 6186 UInt PicWidth=this->getPic()->getPicYuvRec()->getWidth(); 6187 switch(index) 6188 { 6189 case 0: // Mid Left 6190 if( ( xP != 0 ) && ( ( yP + ( nPSH >> 1 ) ) < PicHeight ) ) 6191 { 6192 *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ]; 6193 bDepAvail = true; 6194 } 6195 break; 6196 case 1: // Mid Above 6197 if( ( yP != 0 ) && ( ( xP + ( nPSW >> 1 ) ) < PicWidth ) ) 6198 { 6199 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ]; 6200 bDepAvail = true; 6201 } 6202 break; 6203 case 2: // Above 6204 if(yP != 0) 6205 { 6206 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP) ]; 6207 bDepAvail = true; 6208 } 6209 break; 6210 case 3: // Left 6211 if(xP != 0) 6212 { 6213 *pNeighDepth = pDepth[ (yP) * iDepStride + (xP-1) ]; 6214 bDepAvail = true; 6215 } 6216 break; 6217 case 4: // Above_Left 6218 if(xP != 0 && yP != 0) 6219 { 6220 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP-1) ]; 6221 bDepAvail = true; 6222 } 6223 break; 6224 default: 6225 break; 6226 } 6227 return bDepAvail; 6228 } 6229 6093 6230 #endif 6094 6231 #if H_3D_NBDV … … 6650 6787 if( getSlice()->getIsDepth() ) 6651 6788 { 6789 #if MTK_I0099_VPS_EX2 6790 iSubPUSize = 1<<getSlice()->getVPS()->getSubPUMPILog2Size(getSlice()->getLayerId()); 6791 #else 6652 6792 iSubPUSize = 1 << getSlice()->getVPS()->getSubPUMPILog2Size(); 6793 #endif 6653 6794 } 6654 6795 -
trunk/source/Lib/TLibCommon/TComDataCU.h
r976 r1039 110 110 // ------------------------------------------------------------------------------------------------------------------- 111 111 Bool* m_skipFlag; ///< array of skip flags 112 #if MTK_SINGLE_DEPTH_MODE_I0095 113 Bool* m_singleDepthFlag; ///< array of single depth flags 114 Pel* m_apSingleDepthValue; 115 #endif 112 116 Char* m_pePartSize; ///< array of partition sizes 113 117 Char* m_pePredMode; ///< array of prediction modes … … 246 250 #if H_3D_IV_MERGE 247 251 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx ); 252 #if! SEC_SIMP_SHIFTED_DV_I0086 248 253 Bool xGetPosFirstAvailDmvCand( Int iCount, Int& iFirDispCand ); 254 #endif 249 255 #endif 250 256 … … 347 353 Void setSkipFlag ( UInt idx, Bool skip) { m_skipFlag[idx] = skip; } 348 354 Void setSkipFlagSubParts ( Bool skip, UInt absPartIdx, UInt depth ); 349 355 #if MTK_SINGLE_DEPTH_MODE_I0095 356 Bool* getSingleDepthFlag () { return m_singleDepthFlag; } 357 Bool getSingleDepthFlag (UInt idx) { return m_singleDepthFlag[idx]; } 358 Void setSingleDepthFlag ( UInt idx, Bool singleDepth) { m_singleDepthFlag[idx] = singleDepth; } 359 Void setSingleDepthFlagSubParts ( Bool singleDepth, UInt absPartIdx, UInt depth ); 360 361 Pel* getSingleDepthValue( ) { return m_apSingleDepthValue; } 362 Pel getSingleDepthValue (UInt idx) { return m_apSingleDepthValue[idx]; } 363 Void setSingleDepthValue ( UInt idx, Pel pDepthValue) { m_apSingleDepthValue[idx] = pDepthValue; } 364 Void setSingleDepthValueSubParts (Pel singleDepthValue, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ); 365 #endif 350 366 Char* getPredictionMode () { return m_pePredMode; } 351 367 PredMode getPredictionMode ( UInt uiIdx ) { return static_cast<PredMode>( m_pePredMode[uiIdx] ); } … … 489 505 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); 490 506 #endif 491 507 #if MTK_SINGLE_DEPTH_MODE_I0095 508 Bool getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index); 509 #endif 492 510 #if H_3D_NBDV_REF 493 511 Pel getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT ); … … 652 670 Void getInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours 653 671 #endif 654 #if H_3D_VSP 672 #if H_3D_VSP && !FIX_TICKET_79 655 673 , InheritedVSPDisInfo* inheritedVSPDisInfo 656 674 #endif … … 662 680 663 681 #if H_3D_VSP 682 #if !FIX_TICKET_76 664 683 inline Void xInheritVSPDisInfo(TComDataCU* pcCURef, UInt uiAbsPartIdx, Int iCount, InheritedVSPDisInfo* inheritedVSPDisInfo); 684 #endif 665 685 666 686 #if H_3D_SPIVMP … … 750 770 751 771 #endif 772 773 #if SHARP_DMM1_I0110 774 Bool isDMM1UpscaleMode ( UInt uiWidth ){ Bool bDMM1UpsampleModeFlag = true; UInt uiBaseWidth = 16; if( uiBaseWidth >= uiWidth ){ bDMM1UpsampleModeFlag = false; } return bDMM1UpsampleModeFlag; }; 775 UInt getDMM1BasePatternWidth ( UInt uiWidth ){ UInt uiBaseWidth = 16; if( uiBaseWidth >= uiWidth ){ uiBaseWidth = uiWidth; } return uiBaseWidth; } 776 #endif 777 752 778 }; 753 779 -
trunk/source/Lib/TLibCommon/TComMotionInfo.h
r976 r1039 79 79 } IDVInfo; 80 80 #endif 81 #if H_3D_VSP 81 #if H_3D_VSP && !FIX_TICKET_79 82 82 typedef struct _InheritedVSPDisCand 83 83 { -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r976 r1039 423 423 424 424 UInt dimType = getDimType ( uiIntraMode ); 425 Bool dimDeltaDC = isDimDeltaDC( uiIntraMode ); 425 #if !HS_DMM_SIGNALLING_I0120 426 Bool dimDeltaDC = isDimDeltaDC( uiIntraMode ); 427 #endif 426 428 Bool isDmmMode = (dimType < DMM_NUM_TYPE); 427 429 … … 438 440 case( DMM1_IDX ): 439 441 { 442 #if SHARP_DMM1_I0110 443 dmmSegmentation = pcCU->isDMM1UpscaleMode((UInt)iWidth) ? 444 &(g_dmmWedgeLists[ g_aucConvertToBit[pcCU->getDMM1BasePatternWidth((UInt)iWidth)] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]) : 445 &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]); 446 #else 440 447 dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]); 448 #endif 441 449 } break; 442 450 case( DMM4_IDX ): … … 456 464 } 457 465 assert( dmmSegmentation ); 466 #if SHARP_DMM1_I0110 467 if( dimType == DMM1_IDX && pcCU->isDMM1UpscaleMode((UInt)iWidth) ) 468 { 469 biSegPattern = dmmSegmentation->getScaledPattern((UInt)iWidth); 470 patternStride = iWidth; 471 } 472 else 473 { 474 biSegPattern = dmmSegmentation->getPattern(); 475 patternStride = dmmSegmentation->getStride (); 476 } 477 #else 458 478 biSegPattern = dmmSegmentation->getPattern(); 459 479 patternStride = dmmSegmentation->getStride (); 480 #endif 460 481 } 461 482 #endif … … 474 495 Pel segDC1 = 0; 475 496 Pel segDC2 = 0; 497 #if HS_DMM_SIGNALLING_I0120 498 if( !pcCU->getSDCFlag( uiAbsPartIdx ) ) 499 #else 476 500 if( dimDeltaDC ) 501 #endif 477 502 { 478 503 Pel deltaDC1 = pcCU->getDimDeltaDC( dimType, 0, uiAbsPartIdx ); … … 543 568 pcCU->getSPAbsPartIdx(uiPartAddr, iSPWidth, iSPHeight, i, iNumSPInOneLine, uiSPAddr[i]); 544 569 } 570 #if SHARP_ARP_CHROMA_I0104 571 if( pcCU->getARPW( uiPartAddr ) != 0 ) 572 { 573 return; 574 } 575 #endif 545 576 // horizontal sub-PU merge 546 577 for (Int i=0; i<iNumSP; i++) … … 714 745 Int uiMinDepth = MAX_INT; 715 746 Int uiMaxDepth = 0; 747 #if SEC_DBBP_DMM4_THRESHOLD_I0076 748 iSumDepth = pDepthPels[ 0 ]; 749 iSumDepth += pDepthPels[ uiWidth - 1 ]; 750 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) ]; 751 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]; 752 753 uiMinDepth = pDepthPels[ 0 ]; 754 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiWidth - 1 ]); 755 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]); 756 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]); 757 758 uiMaxDepth = pDepthPels[ 0 ]; 759 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiWidth - 1 ]); 760 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]); 761 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]); 762 #else 716 763 for (Int y=0; y<uiHeight; y++) 717 764 { … … 734 781 pDepthPels += uiDepthStride; 735 782 } 783 #endif 736 784 737 785 // don't generate mask for blocks with small depth range (encoder decision) … … 742 790 743 791 AOF(uiWidth==uiHeight); 792 #if SEC_DBBP_DMM4_THRESHOLD_I0076 793 Int iMean = iSumDepth >> 2; 794 #else 744 795 Int iSizeInBits = g_aucConvertToBit[uiWidth]+2; 745 796 Int iMean = iSumDepth >> iSizeInBits*2; // iMean /= (uiWidth*uiHeight); 797 #endif 746 798 747 799 // start again for segmentation … … 790 842 } 791 843 844 #if SHARP_DBBP_SIMPLE_FLTER_I0109 845 Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize ) 846 #else 792 847 Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr ) 848 #endif 793 849 { 794 850 Pel* piSrc[2] = {pInYuv[0]->getLumaAddr(uiPartAddr), pInYuv[1]->getLumaAddr(uiPartAddr)}; … … 798 854 799 855 UInt uiMaskStride= MAX_CU_SIZE; 856 #if !SHARP_DBBP_SIMPLE_FLTER_I0109 800 857 Pel filSrc = 0; 858 #endif 801 859 Pel* tmpTar = 0; 802 860 tmpTar = (Pel *)xMalloc(Pel, uiWidth*uiHeight); … … 822 880 } 823 881 882 #if SHARP_DBBP_SIMPLE_FLTER_I0109 883 if (partSize == SIZE_Nx2N) 884 { 885 for (Int y=0; y<uiHeight; y++) 886 { 887 for (Int x=0; x<uiWidth; x++) 888 { 889 Bool l = (x==0)?pMaskStart[y*uiMaskStride+x]:pMaskStart[y*uiMaskStride+x-1]; 890 Bool r = (x==uiWidth-1)?pMaskStart[y*uiMaskStride+x]:pMaskStart[y*uiMaskStride+x+1]; 891 892 Pel left, right; 893 left = (x==0) ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x-1]; 894 right = (x==uiWidth-1) ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x+1]; 895 896 piDst[x] = (l!=r) ? ClipY( Pel(( left + (tmpTar[y*uiWidth+x] << 1) + right ) >> 2 )) : tmpTar[y*uiWidth+x]; 897 } 898 piDst += uiDstStride; 899 } 900 } 901 else // SIZE_2NxN 902 { 903 for (Int y=0; y<uiHeight; y++) 904 { 905 for (Int x=0; x<uiWidth; x++) 906 { 907 Bool t = (y==0)?pMaskStart[y*uiMaskStride+x]:pMaskStart[(y-1)*uiMaskStride+x]; 908 Bool b = (y==uiHeight-1)?pMaskStart[y*uiMaskStride+x]:pMaskStart[(y+1)*uiMaskStride+x]; 909 910 Pel top, bottom; 911 top = (y==0) ? tmpTar[y*uiWidth+x] : tmpTar[(y-1)*uiWidth+x]; 912 bottom = (y==uiHeight-1) ? tmpTar[y*uiWidth+x] : tmpTar[(y+1)*uiWidth+x]; 913 914 piDst[x] = (t!=b) ? ClipY( Pel(( top + (tmpTar[y*uiWidth+x] << 1) + bottom ) >> 2 )) : tmpTar[y*uiWidth+x]; 915 } 916 piDst += uiDstStride; 917 } 918 } 919 #else 824 920 for (Int y=0; y<uiHeight; y++) 825 921 { … … 855 951 piDst += uiDstStride; 856 952 } 953 #endif 954 857 955 if ( tmpTar ) { xFree(tmpTar); tmpTar = NULL; } 858 956 … … 891 989 } 892 990 991 #if SHARP_DBBP_SIMPLE_FLTER_I0109 992 if (partSize == SIZE_Nx2N) 993 { 994 for (Int y=0; y<uiHeightC; y++) 995 { 996 for (Int x=0; x<uiWidthC; x++) 997 { 998 Bool l = (x==0)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[y*2*uiMaskStride+(x-1)*2]; 999 Bool r = (x==uiWidthC-1)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[y*2*uiMaskStride+(x+1)*2]; 1000 1001 Pel leftU, rightU; 1002 leftU = (x==0) ? tmpTarU[y*uiWidthC+x] : tmpTarU[y*uiWidthC+x-1]; 1003 rightU = (x==uiWidthC-1) ? tmpTarU[y*uiWidthC+x] : tmpTarU[y*uiWidthC+x+1]; 1004 Pel leftV, rightV; 1005 leftV = (x==0) ? tmpTarV[y*uiWidthC+x] : tmpTarV[y*uiWidthC+x-1]; 1006 rightV = (x==uiWidthC-1) ? tmpTarV[y*uiWidthC+x] : tmpTarV[y*uiWidthC+x+1]; 1007 1008 if (l!=r) 1009 { 1010 filSrcU = ClipC( Pel(( leftU + (tmpTarU[y*uiWidthC+x] << 1) + rightU ) >> 2 )); 1011 filSrcV = ClipC( Pel(( leftV + (tmpTarV[y*uiWidthC+x] << 1) + rightV ) >> 2 )); 1012 } 1013 else 1014 { 1015 filSrcU = tmpTarU[y*uiWidthC+x]; 1016 filSrcV = tmpTarV[y*uiWidthC+x]; 1017 } 1018 piDstU[x] = filSrcU; 1019 piDstV[x] = filSrcV; 1020 } 1021 piDstU += uiDstStrideC; 1022 piDstV += uiDstStrideC; 1023 } 1024 } 1025 else 1026 { 1027 for (Int y=0; y<uiHeightC; y++) 1028 { 1029 for (Int x=0; x<uiWidthC; x++) 1030 { 1031 Bool t = (y==0)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[(y-1)*2*uiMaskStride+x*2]; 1032 Bool b = (y==uiHeightC-1)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[(y+1)*2*uiMaskStride+x*2]; 1033 1034 Pel topU, bottomU; 1035 topU = (y==0) ? tmpTarU[y*uiWidthC+x] : tmpTarU[(y-1)*uiWidthC+x]; 1036 bottomU = (y==uiHeightC-1) ? tmpTarU[y*uiWidthC+x] : tmpTarU[(y+1)*uiWidthC+x]; 1037 Pel topV, bottomV; 1038 topV = (y==0) ? tmpTarV[y*uiWidthC+x] : tmpTarV[(y-1)*uiWidthC+x]; 1039 bottomV = (y==uiHeightC-1) ? tmpTarV[y*uiWidthC+x] : tmpTarV[(y+1)*uiWidthC+x]; 1040 1041 if (t!=b) 1042 { 1043 filSrcU = ClipC( Pel(( topU + (tmpTarU[y*uiWidthC+x] << 1) + bottomU ) >> 2 )); 1044 filSrcV = ClipC( Pel(( topV + (tmpTarV[y*uiWidthC+x] << 1) + bottomV ) >> 2 )); 1045 } 1046 else 1047 { 1048 filSrcU = tmpTarU[y*uiWidthC+x]; 1049 filSrcV = tmpTarV[y*uiWidthC+x]; 1050 } 1051 piDstU[x] = filSrcU; 1052 piDstV[x] = filSrcV; 1053 } 1054 piDstU += uiDstStrideC; 1055 piDstV += uiDstStrideC; 1056 } 1057 } 1058 #else 893 1059 for (Int y=0; y<uiHeightC; y++) 894 1060 { … … 936 1102 piDstV += uiDstStrideC; 937 1103 } 1104 #endif 938 1105 if ( tmpTarU ) { xFree(tmpTarU); tmpTarU = NULL; } 939 1106 if ( tmpTarV ) { xFree(tmpTarV); tmpTarV = NULL; } … … 1308 1475 pcCU->clipMv(cMv); 1309 1476 TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(); 1477 #if QC_I0129_ARP_FIX 1478 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 ), true ); 1479 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 ), true ); 1480 #else 1310 1481 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi, true ); 1311 1482 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi, true ); 1312 1483 #endif 1313 1484 if( dW > 0 ) 1314 1485 { … … 1318 1489 TComMv cMVwithDisparity = cMv + cDistparity.m_acNBDV; 1319 1490 pcCU->clipMv(cMVwithDisparity); 1491 #if SHARP_ARP_CHROMA_I0104 1492 if (iWidth <= 8) 1493 { 1494 pYuvB0->clear(); pYuvB1->clear(); 1495 } 1496 #endif 1320 1497 1321 1498 assert ( cDistparity.bDV ); … … 1326 1503 1327 1504 pcPicYuvRef = pcPicYuvBaseCol->getPicYuvRec(); 1505 #if QC_I0129_ARP_FIX 1506 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, true ); 1507 #if SHARP_ARP_CHROMA_I0104 1508 if (iWidth > 8) 1509 #endif 1510 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, true ); 1511 #else 1328 1512 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, bi, true ); 1329 1513 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, bi, true ); 1514 #endif 1330 1515 #else 1331 1516 pcPicYuvRef = pcPicYuvBaseCol->getPicYuvRec(); … … 1335 1520 1336 1521 pcPicYuvRef = pcPicYuvBaseRef->getPicYuvRec(); 1522 #if QC_I0129_ARP_FIX 1523 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, true ); 1524 #if SHARP_ARP_CHROMA_I0104 1525 if (iWidth > 8) 1526 #endif 1527 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, true ); 1528 #else 1337 1529 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, bi, true ); 1338 1530 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, bi, true ); 1339 1531 #endif 1340 1532 pYuvB0->subtractARP( pYuvB0 , pYuvB1 , uiPartAddr , iWidth , iHeight ); 1341 1533 … … 1347 1539 } 1348 1540 } 1541 1542 #if QC_I0051_ARP_SIMP 1543 Bool TComPrediction::xCheckBiInterviewARP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eBaseRefPicList, TComPic*& pcPicYuvCurrTRef, TComMv& cBaseTMV, Int& iCurrTRefPoc ) 1544 { 1545 Int iRefIdx = pcCU->getCUMvField( eBaseRefPicList )->getRefIdx( uiPartAddr ); 1546 TComMv cDMv = pcCU->getCUMvField( eBaseRefPicList )->getMv( uiPartAddr ); 1547 TComPic* pcPicYuvBaseCol = pcCU->getSlice()->getRefPic( eBaseRefPicList, iRefIdx ); 1548 TComPicYuv* pcYuvBaseCol = pcPicYuvBaseCol->getPicYuvRec(); 1549 Int uiLCUAddr,uiAbsPartAddr; 1550 Int irefPUX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[uiPartAddr]] + iWidth/2 + ((cDMv.getHor() + 2)>>2); 1551 Int irefPUY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[uiPartAddr]] + iHeight/2 + ((cDMv.getVer() + 2)>>2); 1552 1553 irefPUX = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()-> getPicWidthInLumaSamples()-1, irefPUX); 1554 irefPUY = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples()-1, irefPUY); 1555 pcYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr); 1556 TComDataCU *pColCU = pcPicYuvBaseCol->getCU( uiLCUAddr ); 1557 1558 TComPic* pcPicYuvBaseTRef = NULL; 1559 pcPicYuvCurrTRef = NULL; 1560 1561 //If there is available motion in base reference list, use it 1562 if(!pColCU->isIntra(uiAbsPartAddr)) 1563 { 1564 for(Int iList = 0; iList < (pColCU->getSlice()->isInterB() ? 2: 1); iList ++) 1565 { 1566 RefPicList eRefPicListCurr = RefPicList(iList); 1567 Int iRef = pColCU->getCUMvField(eRefPicListCurr)->getRefIdx(uiAbsPartAddr); 1568 if( iRef != -1) 1569 { 1570 pcPicYuvBaseTRef = pColCU->getSlice()->getRefPic(eRefPicListCurr, iRef); 1571 Int iCurrPOC = pColCU->getSlice()->getPOC(); 1572 Int iCurrRefPOC = pcPicYuvBaseTRef->getPOC(); 1573 Int iCurrRef = pcCU->getSlice()->getFirstTRefIdx(eRefPicListCurr); 1574 #if MTK_I0072_IVARP_SCALING_FIX 1575 if( iCurrRef >= 0 && iCurrPOC != iCurrRefPOC) 1576 #else 1577 if( iCurrRef >= 0) 1578 #endif 1579 { 1580 pcPicYuvCurrTRef = pcCU->getSlice()->getRefPic(eRefPicListCurr,iCurrRef); 1581 Int iTargetPOC = pcPicYuvCurrTRef->getPOC(); 1582 pcPicYuvBaseTRef = pcCU->getSlice()->getBaseViewRefPic(iTargetPOC, pcPicYuvBaseCol->getViewIndex() ); 1583 if(pcPicYuvBaseTRef) 1584 { 1585 cBaseTMV = pColCU->getCUMvField(eRefPicListCurr)->getMv(uiAbsPartAddr); 1586 Int iScale = pcCU-> xGetDistScaleFactor(iCurrPOC, iTargetPOC, iCurrPOC, iCurrRefPOC); 1587 if ( iScale != 4096 ) 1588 { 1589 cBaseTMV = cBaseTMV.scaleMv( iScale ); 1590 } 1591 iCurrTRefPoc = iTargetPOC; 1592 return true; 1593 } 1594 } 1595 } 1596 } 1597 } 1598 1599 //If there is no available motion in base reference list, use ( 0, 0 ) 1600 if( pcCU->getSlice()->getFirstTRefIdx( eBaseRefPicList ) >= 0 ) 1601 { 1602 cBaseTMV.set( 0, 0 ); 1603 pcPicYuvCurrTRef = pcCU->getSlice()->getRefPic( eBaseRefPicList, pcCU->getSlice()->getFirstTRefIdx( eBaseRefPicList ) ); 1604 iCurrTRefPoc = pcPicYuvCurrTRef->getPOC(); 1605 return true; 1606 } 1607 1608 return false; 1609 } 1610 #endif 1611 1349 1612 Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled ) 1350 1613 { … … 1380 1643 pcYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr); 1381 1644 TComDataCU *pColCU = pcPicYuvBaseCol->getCU( uiLCUAddr ); 1382 1645 #if QC_I0051_ARP_SIMP 1646 if( pcCU->getSlice()->isInterB() && !pcCU->getSlice()->getIsDepth() ) 1647 { 1648 RefPicList eOtherRefList = ( eRefPicList == REF_PIC_LIST_0 ) ? REF_PIC_LIST_1 : REF_PIC_LIST_0; 1649 Int iOtherRefIdx = pcCU->getCUMvField( eOtherRefList )->getRefIdx( uiPartAddr ); 1650 //The other prediction direction is temporal ARP 1651 if( iOtherRefIdx >= 0 && pcCU->getSlice()->getViewIndex() == pcCU->getSlice()->getRefPic( eOtherRefList, iOtherRefIdx )->getViewIndex() ) 1652 { 1653 bTMVAvai = true; 1654 pcPicYuvBaseTRef = pcCU->getSlice()->getRefPic( eOtherRefList, iOtherRefIdx ); 1655 Int iCurrPOC = pcCU->getSlice()->getPOC(); 1656 Int iCurrRefPOC = pcPicYuvBaseTRef->getPOC(); 1657 Int iCurrRef = pcCU->getSlice()->getFirstTRefIdx( eOtherRefList ); 1658 1659 if( iCurrRef >= 0 ) 1660 { 1661 pcPicYuvCurrTRef = pcCU->getSlice()->getRefPic( eOtherRefList,iCurrRef ); 1662 Int iTargetPOC = pcPicYuvCurrTRef->getPOC(); 1663 pcPicYuvBaseTRef = pcCU->getSlice()->getBaseViewRefPic( iTargetPOC, pcPicYuvBaseCol->getViewIndex() ); 1664 if( pcPicYuvBaseTRef ) 1665 { 1666 cBaseTMV = pcCU->getCUMvField( eOtherRefList )->getMv( uiPartAddr ); 1667 Int iScale = pcCU-> xGetDistScaleFactor( iCurrPOC, iTargetPOC, iCurrPOC, iCurrRefPOC ); 1668 if ( iScale != 4096 ) 1669 { 1670 cBaseTMV = cBaseTMV.scaleMv( iScale ); 1671 } 1672 } 1673 else 1674 { 1675 dW = 0; 1676 } 1677 } 1678 else 1679 { 1680 dW = 0; 1681 } 1682 } 1683 1684 //Both prediction directions are inter-view ARP 1685 if ( iOtherRefIdx >= 0 && !bTMVAvai ) 1686 { 1687 RefPicList eBaseList = REF_PIC_LIST_0; 1688 Int iCurrTRefPoc; 1689 bTMVAvai = ( eBaseList != eRefPicList ) && ( pcCU->getSlice()->getViewIndex() != pcCU->getSlice()->getRefPic( eOtherRefList, iOtherRefIdx )->getViewIndex() ); 1690 1691 if ( bTMVAvai ) 1692 { 1693 if( xCheckBiInterviewARP( pcCU, uiPartAddr, iWidth, iHeight, eBaseList, pcPicYuvCurrTRef, cBaseTMV, iCurrTRefPoc ) ) 1694 { 1695 pcPicYuvBaseTRef = pcCU->getSlice()->getBaseViewRefPic( iCurrTRefPoc, pcPicYuvBaseCol->getViewIndex() ); 1696 if ( pcPicYuvBaseTRef == NULL ) 1697 { 1698 dW = 0; 1699 } 1700 } 1701 else 1702 { 1703 dW = 0; 1704 } 1705 } 1706 } 1707 } 1708 1709 if( !pColCU->isIntra( uiAbsPartAddr ) && !bTMVAvai ) 1710 #else 1383 1711 if(!pColCU->isIntra(uiAbsPartAddr)) 1712 #endif 1384 1713 { 1385 1714 TComMvField puMVField; … … 1394 1723 Int iCurrRefPOC = pcPicYuvBaseTRef->getPOC(); 1395 1724 Int iCurrRef = pcCU->getSlice()->getFirstTRefIdx(eRefPicListCurr); 1725 #if MTK_I0072_IVARP_SCALING_FIX 1726 if (iCurrRef >= 0 && iCurrRefPOC != iCurrPOC) 1727 #else 1396 1728 if( iCurrRef >= 0) 1729 #endif 1397 1730 { 1398 1731 pcPicYuvCurrTRef = pcCU->getSlice()->getRefPic(eRefPicListCurr,iCurrRef); … … 1421 1754 pcPicYuvCurrTRef = pcCU->getSlice()->getRefPic (eRefPicList, pcCU->getSlice()->getFirstTRefIdx(eRefPicList)); 1422 1755 } 1423 1756 #if QC_I0129_ARP_FIX 1757 xPredInterLumaBlk ( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 && bTMVAvai ), bTMVAvai); 1758 xPredInterChromaBlk( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 && bTMVAvai ), bTMVAvai); 1759 #else 1424 1760 xPredInterLumaBlk ( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi, bTMVAvai); 1425 1761 xPredInterChromaBlk( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi, bTMVAvai); 1426 1762 #endif 1427 1763 if( dW > 0 && bTMVAvai ) 1428 1764 { … … 1435 1771 pcCU->clipMv(cBaseTMV); 1436 1772 pcCU->clipMv(cTempMv); 1437 1773 #if SHARP_ARP_CHROMA_I0104 1774 if (iWidth <= 8) 1775 { 1776 pYuvCurrTRef->clear(); pYuvBaseTRef->clear(); 1777 } 1778 #endif 1779 #if QC_I0129_ARP_FIX 1780 xPredInterLumaBlk ( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true, true); 1781 #if SHARP_ARP_CHROMA_I0104 1782 if (iWidth > 8) 1783 #endif 1784 xPredInterChromaBlk( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true, true); 1785 xPredInterLumaBlk ( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv, iWidth, iHeight, pYuvBaseTRef, true, true); 1786 #if SHARP_ARP_CHROMA_I0104 1787 if (iWidth > 8) 1788 #endif 1789 xPredInterChromaBlk( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv, iWidth, iHeight, pYuvBaseTRef, true, true); 1790 #else 1438 1791 xPredInterLumaBlk ( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, bi, true); 1439 1792 xPredInterChromaBlk( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, bi, true); … … 1441 1794 xPredInterChromaBlk( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv, iWidth, iHeight, pYuvBaseTRef, bi, true); 1442 1795 1796 #endif 1443 1797 pYuvCurrTRef->subtractARP( pYuvCurrTRef , pYuvBaseTRef , uiPartAddr , iWidth , iHeight ); 1444 1798 if(dW == 2) … … 1974 2328 Int iRecStride = ( eType == TEXT_LUMA ) ? pRecPic->getStride() : pRecPic->getCStride(); 1975 2329 Int iRefStride = ( eType == TEXT_LUMA ) ? pRefPic->getStride() : pRefPic->getCStride(); 2330 #if SEC_IC_NEIGHBOR_CLIP_I0080 2331 Int iRefOffset, iHor, iVer; 2332 #else 1976 2333 Int iCUPelX, iCUPelY, iRefX, iRefY, iRefOffset, iHor, iVer; 1977 2334 1978 2335 iCUPelX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]]; 1979 2336 iCUPelY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]]; 2337 #endif 1980 2338 iHor = pcCU->getSlice()->getIsDepth() ? pMv->getHor() : ( ( pMv->getHor() + 2 ) >> 2 ); 1981 2339 iVer = pcCU->getSlice()->getIsDepth() ? pMv->getVer() : ( ( pMv->getVer() + 2 ) >> 2 ); 2340 #if !SEC_IC_NEIGHBOR_CLIP_I0080 1982 2341 iRefX = iCUPelX + iHor; 1983 2342 iRefY = iCUPelY + iVer; 2343 #endif 1984 2344 if( eType != TEXT_LUMA ) 1985 2345 { … … 1997 2357 Int precShift = std::max(0, (( eType == TEXT_LUMA ) ? g_bitDepthY : g_bitDepthC) - 12); 1998 2358 2359 #if SEC_IC_NEIGHBOR_CLIP_I0080 2360 if( pcCU->getPUAbove( uiTmpPartIdx, pcCU->getZorderIdxInCU() ) ) 2361 #else 1999 2362 if( pcCU->getPUAbove( uiTmpPartIdx, pcCU->getZorderIdxInCU() ) && iCUPelY > 0 && iRefY > 0 ) 2363 #endif 2000 2364 { 2001 2365 iRefOffset = iHor + iVer * iRefStride - iRefStride; … … 2027 2391 } 2028 2392 2029 2393 #if SEC_IC_NEIGHBOR_CLIP_I0080 2394 if( pcCU->getPULeft( uiTmpPartIdx, pcCU->getZorderIdxInCU() ) ) 2395 #else 2030 2396 if( pcCU->getPULeft( uiTmpPartIdx, pcCU->getZorderIdxInCU() ) && iCUPelX > 0 && iRefX > 0 ) 2397 #endif 2031 2398 { 2032 2399 iRefOffset = iHor + iVer * iRefStride - 1; … … 2061 2428 iCountShift += iCountShift > 0 ? 1 : ( g_aucConvertToBit[ uiWidth ] + 1 ); 2062 2429 } 2430 2431 #if FIX_TICKET_71 2432 if( iCountShift == 0 ) 2433 { 2434 a = ( 1 << IC_CONST_SHIFT ); 2435 b = 0; 2436 return; 2437 } 2438 #endif 2063 2439 2064 2440 xy += xx >> IC_REG_COST_SHIFT; … … 2177 2553 // find contour for texture luma block 2178 2554 UInt iDC = 0; 2555 #if SEC_DBBP_DMM4_THRESHOLD_I0076 2556 iDC = piRefBlkY[ 0 ]; 2557 iDC += piRefBlkY[ uiWidth - 1 ]; 2558 iDC += piRefBlkY[ uiWidth * (uiHeight - 1) ]; 2559 iDC += piRefBlkY[ uiWidth * (uiHeight - 1) + uiWidth - 1 ]; 2560 iDC = iDC >> 2; 2561 #else 2179 2562 for( UInt k = 0; k < (uiWidth*uiHeight); k++ ) 2180 2563 { … … 2184 2567 Int cuMaxLog2Size = g_aucConvertToBit[g_uiMaxCUWidth]+2; // 2185 2568 iDC = iDC >> (cuMaxLog2Size - pcCU->getDepth(0))*2; // iDC /= (uiWidth*uiHeight); 2569 #endif 2186 2570 2187 2571 piRefBlkY = cTempYuv.getLumaAddr(); -
trunk/source/Lib/TLibCommon/TComPrediction.h
r884 r1039 90 90 #if H_3D_ARP 91 91 Void xPredInterUniARP ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false, TComMvField * pNewMvFiled = NULL ); 92 #if QC_I0051_ARP_SIMP 93 Bool xCheckBiInterviewARP ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eBaseRefPicList, TComPic*& pcPicYuvCurrTRef, TComMv& cBaseTMV, Int& iCurrTRefPoc ); 94 #endif 92 95 Void xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled = NULL ); 93 96 #endif … … 176 179 PartSize getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize); 177 180 Bool getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask ); 181 #if SHARP_DBBP_SIMPLE_FLTER_I0109 182 Void combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize ); 183 #else 178 184 Void combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr = 0 ); 185 #endif 179 186 #endif 180 187 -
trunk/source/Lib/TLibCommon/TComRom.cpp
r976 r1039 336 336 HALF_PEL, // 8x8 337 337 FULL_PEL, // 16x16 338 #if SHARP_DMM1_I0110 339 FULL_PEL, // 32x32 340 FULL_PEL, // 64x64 341 FULL_PEL // 128x128 342 #else 338 343 DOUBLE_PEL, // 32x32 339 344 DOUBLE_PEL, // 64x64 340 345 DOUBLE_PEL // 128x128 346 #endif 341 347 }; 342 348 … … 348 354 { //2x2 4x4 8x8 16x16 32x32 64x64 349 355 0, 4, 7, 8, 8, 0 }; 356 357 #if SHARP_DMM1_I0110 358 Bool g_wedgePattern[32*32]; 359 #endif 350 360 351 361 extern std::vector< std::vector<TComWedgelet> > g_dmmWedgeLists; … … 646 656 if( !g_dmmWedgeLists.empty() ) return; 647 657 658 #if SHARP_DMM1_I0110 659 for( UInt ui = g_aucConvertToBit[DIM_MIN_SIZE]; ui < (g_aucConvertToBit[DIM_MAX_SIZE]); ui++ ) 660 #else 648 661 for( UInt ui = g_aucConvertToBit[DIM_MIN_SIZE]; ui < (g_aucConvertToBit[DIM_MAX_SIZE]+1); ui++ ) 662 #endif 649 663 { 650 664 UInt uiWedgeBlockSize = ((UInt)DIM_MIN_SIZE)<<ui; … … 730 744 switch( eWedgeRes ) 731 745 { 746 #if !SHARP_DMM1_I0110 732 747 case( DOUBLE_PEL ): { uiBlockSize = (uiWidth>>1); break; } 748 #endif 733 749 case( FULL_PEL ): { uiBlockSize = uiWidth; break; } 734 750 case( HALF_PEL ): { uiBlockSize = (uiWidth<<1); break; } -
trunk/source/Lib/TLibCommon/TComRom.h
r976 r1039 166 166 extern const UChar g_dmm3IntraTabIdxBits[6]; 167 167 168 #if SHARP_DMM1_I0110 169 extern Bool g_wedgePattern[32*32]; 170 #endif 171 168 172 extern std::vector< std::vector<TComWedgelet> > g_dmmWedgeLists; 169 173 extern std::vector< std::vector<TComWedgeRef> > g_dmmWedgeRefLists; -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r976 r1039 139 139 , m_depthToDisparityF ( NULL ) 140 140 #endif 141 #if MTK_SINGLE_DEPTH_MODE_I0095 142 , m_bApplySingleDepthMode (false) 143 #endif 141 144 #endif 142 145 { … … 644 647 645 648 TComPic** refPicSetStCurr [2] = { RefPicSetStCurr0, RefPicSetStCurr1 }; 649 #if FIX_WARNING 650 Int numPocStCurr[2] = { (Int)NumPocStCurr0, (Int)NumPocStCurr1 }; 651 #else 646 652 Int numPocStCurr[2] = { NumPocStCurr0, NumPocStCurr1 }; 653 #endif 647 654 648 655 for (Int li = 0; li < ((m_eSliceType==B_SLICE) ? 2 : 1); li++) … … 1091 1098 m_interLayerPredLayerIdc[ layer ] = pSrc->m_interLayerPredLayerIdc[ layer ]; 1092 1099 } 1100 #endif 1101 #if MTK_SINGLE_DEPTH_MODE_I0095 1102 m_bApplySingleDepthMode = pSrc->m_bApplySingleDepthMode; 1093 1103 #endif 1094 1104 #if H_3D_IC … … 1942 1952 m_viewIndex [i] = -1; 1943 1953 m_vpsDepthModesFlag [i] = false; 1954 #if SEC_HLS_CLEANUP_I0100 1955 m_ivMvScalingFlag[i] = true; 1956 #else 1944 1957 m_ivMvScalingFlag = true; 1958 #endif 1959 #if SEPARATE_FLAG_I0085 1960 m_bIVPFlag [i] = false; 1961 #endif 1945 1962 #endif 1946 1963 … … 1974 1991 #endif 1975 1992 #endif 1993 #if MTK_I0099_VPS_EX2 1994 m_bLimQtPredFlag [ i ] = false; 1995 #endif 1976 1996 #if H_3D_VSP 1977 1997 m_viewSynthesisPredFlag[ i ] = false; … … 1982 2002 #if H_3D_INTER_SDC 1983 2003 m_bInterSDCFlag [ i ] = false; 2004 #endif 2005 #if SEPARATE_FLAG_I0085 2006 m_bIVPFlag [ i ] = false; 1984 2007 #endif 1985 2008 #if H_3D_DBBP … … 2502 2525 , m_pcmLog2MaxSize ( 5) 2503 2526 , m_uiPCMLog2MinSize ( 7) 2527 #if !MTK_I0099_VPS_EX2 2504 2528 #if H_3D_QTLPC 2505 2529 , m_bUseQTL (false) 2506 2530 , m_bUsePC (false) 2531 #endif 2507 2532 #endif 2508 2533 , m_bitDepthY ( 8) … … 2774 2799 // allocate some memory and initialize with default mapping 2775 2800 m_iNumDepthmapValues[i] = ((1 << m_uiDepthViewBitDepth)-1)+1; 2801 #if !FIX_TICKET_77 2776 2802 m_iBitsPerDepthValue[i] = numBitsForValue(m_iNumDepthmapValues[i]); 2777 2803 #endif 2778 2804 m_iDepthValue2Idx[i] = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]); 2779 2805 m_iIdx2DepthValue[i] = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]); … … 2864 2890 // update DLT variables 2865 2891 m_iNumDepthmapValues[layerIdInVps] = iNumDepthValues; 2892 #if !FIX_TICKET_77 2866 2893 m_iBitsPerDepthValue[layerIdInVps] = numBitsForValue(m_iNumDepthmapValues[layerIdInVps]); 2894 #endif 2867 2895 } 2868 2896 -
trunk/source/Lib/TLibCommon/TComSlice.h
r976 r1039 798 798 #if H_3D_IV_MERGE 799 799 Bool m_ivMvPredFlag [ MAX_NUM_LAYERS ]; 800 #if SEC_HLS_CLEANUP_I0100 801 Bool m_ivMvScalingFlag [ MAX_NUM_LAYERS ]; 802 #endif 800 803 #if H_3D_SPIVMP 801 804 Int m_iSubPULog2Size [MAX_NUM_LAYERS ]; 805 #if MTK_I0099_VPS_EX2 806 Int m_iSubPUMPILog2Size [MAX_NUM_LAYERS ]; 807 #else 802 808 Int m_iSubPUMPILog2Size; 803 809 #endif 810 #endif 811 #endif 812 #if MTK_I0099_VPS_EX2 813 Bool m_bLimQtPredFlag [ MAX_NUM_LAYERS ]; 804 814 #endif 805 815 #if H_3D_VSP … … 810 820 #endif 811 821 Bool m_vpsDepthModesFlag [MAX_NUM_LAYERS ]; 822 #if SEPARATE_FLAG_I0085 823 Bool m_bIVPFlag [MAX_NUM_LAYERS ]; 824 #endif 812 825 813 826 #if H_3D … … 817 830 Int ***m_aaaiCodedScale ; 818 831 Int ***m_aaaiCodedOffset; 832 833 #if !SEC_HLS_CLEANUP_I0100 819 834 Bool m_ivMvScalingFlag; 835 #endif 836 820 837 #endif 821 838 #if H_3D_INTER_SDC … … 1130 1147 Int getSubPULog2Size(Int layerIdInVps) { return m_iSubPULog2Size[layerIdInVps]; } 1131 1148 Void setSubPULog2Size(Int layerIdInVps, Int u) { m_iSubPULog2Size[layerIdInVps] = u;} 1149 #if MTK_I0099_VPS_EX2 1150 Int getSubPUMPILog2Size(Int layerIdInVps) { return m_iSubPUMPILog2Size[layerIdInVps]; } 1151 Void setSubPUMPILog2Size(Int layerIdInVps, Int u) { m_iSubPUMPILog2Size[layerIdInVps] = u;} 1152 #else 1132 1153 Int getSubPUMPILog2Size( ) { return m_iSubPUMPILog2Size; } 1133 1154 Void setSubPUMPILog2Size( Int u ) { m_iSubPUMPILog2Size = u; } 1134 1155 #endif 1156 #endif 1157 #endif 1158 #if MTK_I0099_VPS_EX2 1159 Void setLimQtPredFlag ( Int layerIdInVps, Bool val ) { m_bLimQtPredFlag[ layerIdInVps ] = val; } 1160 Bool getLimQtPredFlag ( Int layerIdInVps ) { return m_bLimQtPredFlag[layerIdInVps];} 1135 1161 #endif 1136 1162 #if H_3D_VSP … … 1144 1170 Void setVpsDepthModesFlag( Int layerIdInVps, Bool val ) { m_vpsDepthModesFlag[ layerIdInVps ] = val; } 1145 1171 Bool getVpsDepthModesFlag( Int layerIdInVps ) { return m_vpsDepthModesFlag[ layerIdInVps ]; } 1146 1172 #if SEPARATE_FLAG_I0085 1173 Void setIVPFlag( Int layerIdInVps, Bool val ) { m_bIVPFlag[ layerIdInVps ] = val; } 1174 Bool getIVPFlag( Int layerIdInVps ) { return m_bIVPFlag[ layerIdInVps ]; } 1175 #endif 1176 1177 #if SEC_HLS_CLEANUP_I0100 1178 Bool getIvMvScalingFlag ( Int layerIdInVps ) { return m_ivMvScalingFlag[ layerIdInVps ]; } 1179 Void setIvMvScalingFlag (Int layerIdInVps, Bool b ) { m_ivMvScalingFlag[ layerIdInVps ] = b; } 1180 #else 1147 1181 Bool getIvMvScalingFlag ( ) { return m_ivMvScalingFlag; } 1148 1182 Void setIvMvScalingFlag ( Bool b ) { m_ivMvScalingFlag = b; } 1183 #endif 1184 1149 1185 #if H_3D_INTER_SDC 1150 1186 Bool getInterSDCFlag ( Int layerIdInVps ) { return m_bInterSDCFlag[layerIdInVps]; } … … 1171 1207 Bool m_bInterViewDltPredEnableFlag[ MAX_NUM_LAYERS ]; 1172 1208 1209 #if !FIX_TICKET_77 1173 1210 Int m_iBitsPerDepthValue [ MAX_NUM_LAYERS ]; 1211 #endif 1174 1212 Int m_iNumDepthmapValues [ MAX_NUM_LAYERS ]; 1175 1213 Int* m_iDepthValue2Idx [ MAX_NUM_LAYERS ]; … … 1198 1236 UInt getDepthViewBitDepth() { return m_uiDepthViewBitDepth; } 1199 1237 1238 #if !FIX_TICKET_77 1200 1239 Int getBitsPerDepthValue( Int layerIdInVps ) { return getUseDLTFlag(layerIdInVps)?m_iBitsPerDepthValue[layerIdInVps]:g_bitDepthY; } 1240 #endif 1201 1241 Int getNumDepthValues( Int layerIdInVps ) { return getUseDLTFlag(layerIdInVps)?m_iNumDepthmapValues[layerIdInVps]:((1 << g_bitDepthY)-1); } 1202 1242 Int depthValue2idx( Int layerIdInVps, Pel value ) { return getUseDLTFlag(layerIdInVps)?m_iDepthValue2Idx[layerIdInVps][value]:value; } 1243 #if RWTH_DLT_CLIP_I0057 1244 Pel idx2DepthValue( Int layerIdInVps, UInt uiIdx ) { return getUseDLTFlag(layerIdInVps)?m_iIdx2DepthValue[layerIdInVps][ClipY(uiIdx)]:uiIdx; } 1245 #else 1203 1246 Pel idx2DepthValue( Int layerIdInVps, UInt uiIdx ) { return getUseDLTFlag(layerIdInVps)?m_iIdx2DepthValue[layerIdInVps][uiIdx]:uiIdx; } 1247 #endif 1204 1248 Void setDepthLUTs( Int layerIdInVps, Int* idx2DepthValue = NULL, Int iNumDepthValues = 0 ); 1205 1249 #if H_3D_DELTA_DLT … … 1466 1510 Bool m_useAMP; 1467 1511 1512 #if !MTK_I0099_VPS_EX2 1468 1513 #if H_3D_QTLPC 1469 1514 Bool m_bUseQTL; 1470 1515 Bool m_bUsePC; 1516 #endif 1471 1517 #endif 1472 1518 // Parameter … … 1732 1778 1733 1779 #endif 1780 #if !MTK_I0099_VPS_EX2 1734 1781 #if H_3D_QTLPC 1735 1782 Void setUseQTL( Bool b ) { m_bUseQTL = b; } … … 1737 1784 Void setUsePC ( Bool b ) { m_bUsePC = b; } 1738 1785 Bool getUsePC () { return m_bUsePC; } 1786 #endif 1739 1787 #endif 1740 1788 #if H_MV … … 2205 2253 UInt m_aiDDDShift [MAX_NUM_LAYERS]; 2206 2254 #endif 2207 2255 #if MTK_SINGLE_DEPTH_MODE_I0095 2256 Bool m_bApplySingleDepthMode; 2257 #endif 2208 2258 public: 2209 2259 TComSlice(); … … 2275 2325 #if H_3D 2276 2326 TComPic* getTexturePic () { return m_ivPicsCurrPoc[0][ m_viewIndex ]; } 2327 #endif 2328 #if MTK_SINGLE_DEPTH_MODE_I0095 2329 Void setApplySingleDepthMode( Bool b ) { m_bApplySingleDepthMode = b; } 2330 Bool getApplySingleDepthMode() { return m_bApplySingleDepthMode; } 2277 2331 #endif 2278 2332 #if H_3D_IC … … 2509 2563 Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ refViewIdx ]; }; 2510 2564 Bool getVpsDepthModesFlag () { return getVPS()->getVpsDepthModesFlag( getVPS()->getLayerIdInVps( m_layerId ) ); } 2511 2565 #if SEPARATE_FLAG_I0085 2566 Bool getIVPFlag () { return getVPS()->getIVPFlag( getVPS()->getLayerIdInVps( m_layerId ) ); } 2567 #endif 2512 2568 #endif 2513 2569 #if H_MV -
trunk/source/Lib/TLibCommon/TComWedgelet.cpp
r655 r1039 68 68 m_uiHeight ( rcWedge.m_uiHeight ), 69 69 m_pbPattern( (Bool*)xMalloc( Bool, (m_uiWidth * m_uiHeight) ) ) 70 #if SHARP_DMM1_I0110 71 ,m_pbScaledPattern( g_wedgePattern ) 72 #endif 70 73 { 71 74 ::memcpy( m_pbPattern, rcWedge.m_pbPattern, sizeof(Bool) * (m_uiWidth * m_uiHeight)); … … 85 88 86 89 m_pbPattern = (Bool*)xMalloc( Bool, (m_uiWidth * m_uiHeight) ); 90 #if SHARP_DMM1_I0110 91 m_pbScaledPattern = g_wedgePattern; 92 #endif 87 93 } 88 94 … … 181 187 switch( m_eWedgeRes ) 182 188 { 189 #if !SHARP_DMM1_I0110 183 190 case( DOUBLE_PEL ): { uiTempBlockSize = m_uiWidth; uhXs = (m_uhXs<<1); uhYs = (m_uhYs<<1); uhXe = (m_uhXe<<1); uhYe = (m_uhYe<<1); } break; 191 #endif 184 192 case( FULL_PEL ): { uiTempBlockSize = m_uiWidth; uhXs = m_uhXs; uhYs = m_uhYs; uhXe = m_uhXe; uhYe = m_uhYe; } break; 185 193 case( HALF_PEL ): { uiTempBlockSize = (m_uiWidth<<1); uhXs = m_uhXs; uhYs = m_uhYs; uhXe = m_uhXe; uhYe = m_uhYe; } break; 186 194 } 187 195 196 #if !SHARP_DMM1_I0110 188 197 if( m_eWedgeRes == DOUBLE_PEL) // adjust line-end for DOUBLE_PEL resolution 189 198 { … … 194 203 if( m_uhOri == 5 ) { uhXs = uiTempBlockSize-1; } 195 204 } 205 #endif 196 206 197 207 Bool* pbTempPattern = new Bool[ (uiTempBlockSize * uiTempBlockSize) ]; … … 223 233 switch( m_eWedgeRes ) 224 234 { 235 #if !SHARP_DMM1_I0110 225 236 case( DOUBLE_PEL ): { for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) { m_pbPattern[k] = pbTempPattern[k]; }; } break; 237 #endif 226 238 case( FULL_PEL ): { for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) { m_pbPattern[k] = pbTempPattern[k]; }; } break; 227 239 case( HALF_PEL ): // sub-sampling by factor 2 … … 315 327 } 316 328 329 #if SHARP_DMM1_I0110 330 Bool* TComWedgelet::getScaledPattern(UInt uiDstSize) 331 { 332 Bool *pbSrcPat = this->getPattern(); 333 UInt uiSrcSize = this->getStride(); 334 335 Int scale = (g_aucConvertToBit[uiDstSize] - g_aucConvertToBit[uiSrcSize]); 336 assert(scale>=0); 337 for (Int y=0; y<uiDstSize; y++) 338 { 339 for (Int x=0; x<uiDstSize; x++) 340 { 341 Int srcX = x>>scale; 342 Int srcY = y>>scale; 343 m_pbScaledPattern[y*uiDstSize + x] = pbSrcPat[ srcY*uiSrcSize + srcX ]; 344 } 345 } 346 return m_pbScaledPattern; 347 } 348 #endif 349 317 350 TComWedgeNode::TComWedgeNode() 318 351 { -
trunk/source/Lib/TLibCommon/TComWedgelet.h
r773 r1039 58 58 #define DIM_NO_IDX MAX_UINT 59 59 60 #if HS_DMM_SIGNALLING_I0120 61 __inline UInt getDimType ( Int intraMode ) 62 { 63 Int dimType = intraMode-DIM_OFFSET; 64 return (dimType >= 0 && dimType < DIM_NUM_TYPE) ? (UInt)dimType : DIM_NO_IDX; 65 } 66 #else 60 67 __inline UInt getDimType ( Int intraMode ) { Int dimType = (intraMode-DIM_OFFSET)/2; return (dimType >= 0 && dimType < DIM_NUM_TYPE) ? (UInt)dimType : DIM_NO_IDX; } 68 #endif 61 69 __inline Bool isDimMode ( Int intraMode ) { return (getDimType( intraMode ) < DIM_NUM_TYPE); } 70 #if !HS_DMM_SIGNALLING_I0120 62 71 __inline Bool isDimDeltaDC( Int intraMode ) { return (isDimMode( intraMode ) && ((intraMode-DIM_OFFSET)%2) == 1); } 72 #endif 63 73 #endif 64 74 … … 69 79 enum WedgeResolution 70 80 { 81 #if !SHARP_DMM1_I0110 71 82 DOUBLE_PEL, 83 #endif 72 84 FULL_PEL, 73 85 HALF_PEL … … 94 106 95 107 Bool* m_pbPattern; 108 #if SHARP_DMM1_I0110 109 Bool* m_pbScaledPattern; 110 #endif 96 111 97 112 Void xGenerateWedgePattern(); … … 119 134 Bool getIsCoarse() { return m_bIsCoarse; } 120 135 UInt getAng () { return m_uiAng; } 136 #if SHARP_DMM1_I0110 137 Bool* getScaledPattern(UInt uiWidth); 138 #endif 121 139 122 140 Void setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes, Bool bIsCoarse = false ); -
trunk/source/Lib/TLibCommon/TComYuv.cpp
r872 r1039 689 689 UInt iSrc1Stride = pcYuvSrc1->getStride(); 690 690 UInt iDstStride = getStride(); 691 #if QC_I0129_ARP_FIX 692 Int iIFshift = IF_INTERNAL_PREC - g_bitDepthY; 693 Int iOffSet = ( 1 << ( iIFshift - 1 ) ) + IF_INTERNAL_OFFS; 694 #endif 691 695 for ( y = uiHeight-1; y >= 0; y-- ) 692 696 { … … 696 700 if( bClip ) 697 701 { 702 #if QC_I0129_ARP_FIX 703 pDst[x] = ClipY( ( pDst[x] + iOffSet ) >> iIFshift ); 704 #else 698 705 pDst[x] = ClipY( pDst[x] ); 706 #endif 699 707 } 700 708 } … … 719 727 UInt iSrc1Stride = pcYuvSrc1->getCStride(); 720 728 UInt iDstStride = getCStride(); 729 #if QC_I0129_ARP_FIX 730 Int iIFshift = IF_INTERNAL_PREC - g_bitDepthC; 731 Int iOffSet = ( 1 << ( iIFshift - 1 ) ) + IF_INTERNAL_OFFS; 732 #endif 721 733 for ( y = uiHeight-1; y >= 0; y-- ) 722 734 { … … 727 739 if( bClip ) 728 740 { 741 #if QC_I0129_ARP_FIX 742 pDstU[x] = ClipC( ( pDstU[x] + iOffSet ) >> iIFshift ); 743 pDstV[x] = ClipC( ( pDstV[x] + iOffSet ) >> iIFshift ); 744 #else 729 745 pDstU[x] = ClipC( pDstU[x] ); 730 746 pDstV[x] = ClipC( pDstV[x] ); 747 #endif 731 748 } 732 749 } … … 744 761 { 745 762 subtractARPLuma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth , uiHeight ); 763 #if SHARP_ARP_CHROMA_I0104 764 if (uiWidth > 8) 765 #endif 746 766 subtractARPChroma( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth>>1 , uiHeight>>1 ); 747 767 } … … 803 823 { 804 824 multiplyARPLuma( uiAbsPartIdx , uiWidth , uiHeight , dW ); 825 #if SHARP_ARP_CHROMA_I0104 826 if (uiWidth > 8) 827 #endif 805 828 multiplyARPChroma( uiAbsPartIdx , uiWidth >> 1 , uiHeight >> 1 , dW ); 806 829 } -
trunk/source/Lib/TLibCommon/TypeDef.h
r976 r1039 68 68 #define BUG_FIX_TK65 1 69 69 70 #define MTK_I0093 1 70 71 ///////////////////////////////////////////////////////////////////////////////////////// 71 72 /////////////////////////////////// MAJOR DEFINES /////////////////////////////////// … … 123 124 // MTK_LOW_LATENCY_IC_ENCODING_H0086 Low-latency IC encoding in JCT3V-H0086 124 125 126 #define SEC_IC_NEIGHBOR_CLIP_I0080 1 // Clipping of neighboring sample position, JCT3V-I0080 127 125 128 126 129 #if H_3D_NBDV … … 172 175 // MTK_DIS_SPBIP8X4_H0205 Disable bi-prediction for 8x4 and 4x8 sub PU and remove the SPIVMP 2Nx2N restriction 173 176 // SEC_ADAPT_DISABLE_IVMP Disalbing IVMP merge candidates when IC is enabled, JCT3V-H0070 177 178 #define SEC_SIMP_SHIFTED_DV_I0086 1 // Simplification of Shifted DV candidate, JCT3V-I0086 174 179 175 180 #define H_3D_TMVP 1 // QC_TMVP_C0047 … … 215 220 // MTK_DLT_CODING_FIX_H0091 216 221 222 #define MTK_SINGLE_DEPTH_MODE_I0095 1 // Single depth mode proposed in JCT3V-I0095 223 #if MTK_SINGLE_DEPTH_MODE_I0095 224 #define MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE 2 // size of the sample candidate list 225 #endif 217 226 218 227 #define H_3D_INTER_SDC 1 // INTER SDC, Inter simplified depth coding … … 233 242 // H_3D_FIX_DBBP_IVMP Fix . Enable IVMP is always disabled, when DBBP is enabled. The original intention is to disable Sub-PU IVMP when DBBP is enabled, not to disable IVMP itself. 234 243 244 #define SEC_DBBP_EXPLICIT_SIG_I0077 1 // Remove the partition derivation and signal dbbp_flag only when the partion mode is 2NxN/Nx2N, JCT3V-I0077 245 #define SEC_DBBP_DISALLOW_8x8_I0078 1 // Disallow DBBP in 8x8 CU, JCT3V-I0078 246 #define SHARP_DBBP_SIMPLE_FLTER_I0109 1 // Simple condition and one dimensional dilter for DBBP 247 #define SEC_DBBP_DMM4_THRESHOLD_I0076 1 // Simplification of threshold derivation for DBBP and DMM4, JCT3V-I0076 248 235 249 236 250 #define H_3D_DDD 1 // Disparity derived depth coding … … 238 252 #define H_3D_FCO 0 // Flexible coding order for 3D 239 253 240 254 #define SCU_HS_FAST_INTRA_SDC_I0123 1 241 255 242 256 // OTHERS … … 250 264 #endif 251 265 266 #define MTK_I0099_VPS_EX2 1 ///< JCT3V-I0099, sub-PU size signaling and lim_qt_pred_flag in VPS extension 2 267 #define MTK_I0099_FIX 1 ///< Fix the problem of removing encoder only QTL 268 252 269 // Rate Control 253 270 #define KWU_FIX_URQ 1 … … 255 272 #define KWU_RC_MADPRED_E0227 0 ///< JCT3V-E0227, inter-view MAD prediction 256 273 274 #define SEC_VPS_CLEANUP_I0090 1 275 #define SEC_HLS_CLEANUP_I0100 1 276 257 277 #endif // H_3D 258 278 … … 262 282 /////////////////////////////////// DERIVED DEFINES /////////////////////////////////// 263 283 ///////////////////////////////////////////////////////////////////////////////////////// 284 285 // Fixes 286 #define FIX_TICKET_79 1 // Unused VSP code 287 #define FIX_TICKET_75 1 // Bi-pred restriction bug in VSP 288 #define FIX_TICKET_68 1 // MV clipping bug in the sub-PU MPI default MV generation 289 #define FIX_TICKET_71 1 // IC parameters is meaningless in HTM when no training samples are available 290 #define FIX_TICKET_77 1 // Unused variable m_iBitsPerDepthValue 291 #define FIX_TICKET_76 1 // unused functions 292 #define FIX_TICKET_62 1 // buffer overflow for print 293 #define FIX_TICKET_61 1 // layerIdsInSets size check 264 294 265 295 ///// ***** VIEW SYNTHESIS OPTIMIZAION ********* … … 283 313 #if H_3D_ARP 284 314 #define H_3D_ARP_WFNR 3 315 #define QC_I0129_ARP_FIX 1 316 #define QC_I0051_ARP_SIMP 1 317 #define SHARP_ARP_CHROMA_I0104 1 318 #define MTK_I0072_IVARP_SCALING_FIX 1 285 319 #endif 286 320 … … 290 324 #define H_3D_DIM_SDC 1 // Simplified Depth Coding method 291 325 #define H_3D_DIM_DLT 1 // Depth Lookup Table 326 #define HS_DMM_SIGNALLING_I0120 1 327 #define SHARP_DMM1_I0110 1 // LUT size reduction for DMM1 proposed in JCT3V-I0110 328 #define FIX_WARNING 1 // fix narrowing conversion of NumPocStCurr0,NumPocStCurr1 at TComSlice.cpp 329 #define FAST_SDC_OFFSET_DECISION_I0084 1 330 #define SEPARATE_FLAG_I0085 1 292 331 293 332 #if H_3D_DIM_DLT 294 333 #define H_3D_DELTA_DLT 1 334 #define RWTH_DLT_CLIP_I0057 1 295 335 #endif 296 336 #define H_3D_DIM_ENC 1 // Depth Intra encoder optimizations, includes: 297 337 // HHI_DEPTH_INTRA_SEARCH_RAU_C0160 298 338 // LG_ZEROINTRADEPTHRESI_A0087 339 #define HHI_DMM4_ENC_I0066 1 299 340 #endif 300 341 ///// ***** VIEW SYNTHESIS PREDICTION ********* … … 381 422 382 423 // OTHERS 383 //#define H_MV_HLS_8_HSB_Q0041_03 0 // #3 (HS /Q0041/hybrid scalability) The proposed text was endorsed, with non-editorial open issues considered as follows 384 :// #define H_MV_HLS_7_OTHER_P0187_1 0 // (OTHER/P0187/NoOutputOfPriorPicsFlag) #1 Inference of NoOutputOfPriorPicsFlag and proposes to take into account colour format and bit depth for the inference in addition to spatial resolution 424 //#define H_MV_HLS_8_HSB_Q0041_03 0 // #3 (HS /Q0041/hybrid scalability) The proposed text was endorsed, with non-editorial open issues considered as follows ?// #define H_MV_HLS_7_OTHER_P0187_1 0 // (OTHER/P0187/NoOutputOfPriorPicsFlag) #1 Inference of NoOutputOfPriorPicsFlag and proposes to take into account colour format and bit depth for the inference in addition to spatial resolution 385 425 //#define H_MV_HLS_8_MIS_Q0078_24 0 // #24 (MISC /Q0078/scan and pic type) , Items 3 b,c and 4, clarifying which pictures in an output layer sets are applied the values of general_progressive_source_flag, general_interlaced_source_flag, general_non_packed_constraint_flag and general_frame_only_constraint_flag. 386 426 //#define H_MV_HLS_7_HRD_P0138_6 0 // (HRD/P0138/HRD parameters for bitstreams excluding) #6 Decision: Adopt (as revised in updated contribution, with the specification of a flag in the BP SEI (HRD/P0192/sub-DPB) #12 Establish sub-DPBs based on the representation format indicated at the VPS level. It was suggested that the expressed shared capacity limit would need to be less than or equal to the sum of the individual capacity limits. Decision: Adopt as modified. Further study is encouraged on profile/level constraint selections.
Note: See TracChangeset for help on using the changeset viewer.