Changeset 1258 in 3DVCSoftware for branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibCommon
- Timestamp:
- 16 Jun 2015, 04:13:09 (10 years ago)
- Location:
- branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibCommon
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibCommon/ContextTables.h
r1227 r1258 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 #if H_3D53 #if NH_3D_DIS 54 54 #define NUM_DIS_FLAG_CTX 1 55 55 #define NUM_DIS_TYPE_CTX 1 … … 218 218 { CNU, CNU, CNU, }, 219 219 }; 220 #if H_3D220 #if NH_3D_DIS 221 221 static const UChar 222 222 INIT_DIS_FLAG[3][NUM_DIS_FLAG_CTX] = -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibCommon/Debug.h
r1200 r1258 46 46 #include <sstream> 47 47 #include <TLibCommon/CommonDef.h> 48 49 48 #if DEBUG_STRING 50 49 extern const Char *debug_reorder_data_inter_token[MAX_NUM_COMPONENT+1]; -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibCommon/SEI.h
r1200 r1258 42 42 #include "CommonDef.h" 43 43 #include "libmd5/MD5.h" 44 45 44 //! \ingroup TLibCommon 46 45 //! \{ -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibCommon/TComDataCU.cpp
r1243 r1258 55 55 56 56 m_skipFlag = NULL; 57 #if H_3D57 #if NH_3D_DIS 58 58 m_bDISFlag = NULL; 59 m_u iDISType = NULL;59 m_ucDISType = NULL; 60 60 #endif 61 61 m_pePartSize = NULL; … … 169 169 m_ChromaQpAdj = new UChar[ uiNumPartition ]; 170 170 m_skipFlag = new Bool[ uiNumPartition ]; 171 #if H_3D171 #if NH_3D_DIS 172 172 m_bDISFlag = new Bool[ uiNumPartition ]; 173 m_u iDISType = (UInt*)xMalloc(UInt, uiNumPartition);173 m_ucDISType = (UChar*)xMalloc(UChar, uiNumPartition); 174 174 #endif 175 175 m_pePartSize = new Char[ uiNumPartition ]; … … 321 321 } 322 322 323 #if H_3D323 #if NH_3D_DIS 324 324 if ( m_bDISFlag ) { delete[] m_bDISFlag; m_bDISFlag = NULL; } 325 if ( m_u iDISType ) { xFree(m_uiDISType); m_uiDISType = NULL; }325 if ( m_ucDISType ) { xFree(m_ucDISType); m_ucDISType = NULL; } 326 326 #endif 327 327 … … 570 570 memset( m_skipFlag , false, m_uiNumPartition * sizeof( *m_skipFlag ) ); 571 571 572 #if H_3D573 m _bDISFlag[ui] = pcFrom->getDISFlag(ui);574 m _uiDISType[ui] = pcFrom->getDISType(ui);572 #if NH_3D_DIS 573 memset( m_bDISFlag , false, m_uiNumPartition * sizeof( *m_bDISFlag ) ); 574 memset( m_ucDISType , false, m_uiNumPartition * sizeof( *m_ucDISType ) ); 575 575 #endif 576 576 … … 619 619 #if H_3D_DBBP 620 620 m_pbDBBPFlag[ui] = pcFrom->m_pbDBBPFlag[ui]; 621 #endif622 #if H_3D623 memset( m_bDISFlag + firstElement, false, numElements * sizeof( *m_bDISFlag ) );624 memset( m_uiDISType + firstElement, 0, numElements * sizeof( *m_uiDISType) );625 621 #endif 626 622 #if H_3D_VSP … … 762 758 } 763 759 m_skipFlag[ui] = false; 764 #if H_3D765 m_bDISFlag[ui]= false;766 m_uiDISType[ui]= 0;760 #if NH_3D_DIS 761 m_bDISFlag[ui] = false; 762 m_ucDISType[ui] = 0; 767 763 #endif 768 764 m_pePartSize[ui] = NUMBER_OF_PART_SIZES; … … 921 917 { 922 918 m_skipFlag[ui] = false; 923 #if H_3D919 #if NH_3D_DIS 924 920 m_bDISFlag[ui] = false; 925 m_u iDISType[ui] = 0;921 m_ucDISType[ui] = 0; 926 922 #endif 927 923 … … 937 933 m_apiMVPNum[rpl][ui] = -1; 938 934 } 939 #if H_3D935 #if NH_3D_DIS 940 936 m_bDISFlag[ui] = pcCU->getDISFlag(uiPartOffset+ui); 941 m_u iDISType[ui] = pcCU->getDISType(uiPartOffset+ui);937 m_ucDISType[ui] = pcCU->getDISType(uiPartOffset+ui); 942 938 #endif 943 939 #if H_3D_VSP … … 1028 1024 1029 1025 m_skipFlag=pcCU->getSkipFlag() + uiPart; 1030 #if H_3D1026 #if NH_3D_DIS 1031 1027 m_bDISFlag = pcCU->getDISFlag() + uiPart; 1032 m_u iDISType = pcCU->getDISType() + uiPart;1028 m_ucDISType = pcCU->getDISType() + uiPart; 1033 1029 #endif 1034 1030 … … 1166 1162 1167 1163 m_skipFlag = pcCU->getSkipFlag () + uiAbsPartIdx; 1168 #if H_3D1164 #if NH_3D_DIS 1169 1165 m_bDISFlag = pcCU->getDISFlag () + uiAbsPartIdx; 1170 m_u iDISType = pcCU->getDISType() + uiAbsPartIdx;1166 m_ucDISType = pcCU->getDISType() + uiAbsPartIdx; 1171 1167 #endif 1172 1168 … … 1240 1236 Int sizeInChar = sizeof( Char ) * uiNumPartition; 1241 1237 memcpy( m_skipFlag + uiOffset, pcCU->getSkipFlag(), sizeof( *m_skipFlag ) * uiNumPartition ); 1242 #if H_3D1243 memcpy( m_bDISFlag + uiOffset, pcCU->getDISFlag(), sizeof( *m_bDISFlag ) * uiNumPartition );1244 memcpy( m_u iDISType + uiOffset, pcCU->getDISType(), sizeof( *m_uiDISType ) * uiNumPartition);1238 #if NH_3D_DIS 1239 memcpy( m_bDISFlag + uiOffset, pcCU->getDISFlag(), sizeof( *m_bDISFlag ) * uiNumPartition ); 1240 memcpy( m_ucDISType + uiOffset, pcCU->getDISType(), sizeof( *m_ucDISType ) * uiNumPartition); 1245 1241 #endif 1246 1242 memcpy( m_phQP + uiOffset, pcCU->getQP(), sizeInChar ); … … 1357 1353 1358 1354 memcpy( pCtu->getSkipFlag() + m_absZIdxInCtu, m_skipFlag, sizeof( *m_skipFlag ) * m_uiNumPartition ); 1359 #if H_3D1360 memcpy( rpcCU->getDISFlag() + m_uiAbsIdxInLCU, m_bDISFlag,sizeof( *m_bDISFlag ) * m_uiNumPartition );1361 memcpy( rpcCU->getDISType() + m_uiAbsIdxInLCU, m_uiDISType, sizeof( *m_uiDISType ) * m_uiNumPartition );1355 #if NH_3D_DIS 1356 memcpy( pCtu->getDISFlag() + m_absZIdxInCtu, m_bDISFlag, sizeof( *m_bDISFlag ) * m_uiNumPartition ); 1357 memcpy( pCtu->getDISType() + m_absZIdxInCtu, m_ucDISType, sizeof( *m_ucDISType ) * m_uiNumPartition ); 1362 1358 #endif 1363 1359 … … 1455 1451 pCtu->getTotalBins() = m_uiTotalBins; 1456 1452 } 1457 1458 #if H_3D1459 memcpy( rpcCU->getDISFlag() + uiPartOffset, m_bDISFlag, sizeof( *m_bDISFlag ) * uiQNumPart );1460 memcpy( rpcCU->getDISType() + uiPartOffset, m_uiDISType, sizeof( *m_uiDISType ) * uiQNumPart );1461 #endif1462 1463 1453 #if H_3D_VSP 1464 1454 memcpy( rpcCU->getVSPFlag() + uiPartOffset, m_piVSPFlag, sizeof(Char) * uiQNumPart ); … … 2205 2195 } 2206 2196 2207 #if H_3D2208 Void TComDataCU::setDISFlagSubParts( Bool bDIS, UInt absPartIdx, UInt depth )2197 #if NH_3D_DIS 2198 Void TComDataCU::setDISFlagSubParts( Bool bDIS, UInt uiAbsPartIdx, UInt uiDepth ) 2209 2199 { 2210 2200 assert( sizeof( *m_bDISFlag) == 1 ); 2211 memset( m_bDISFlag + absPartIdx, bDIS, m_pcPic->getNumPartInCU() >> ( 2 * depth ) ); 2212 } 2213 2214 Void TComDataCU::setDISTypeSubParts(UInt uiDISType, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ) 2215 { 2216 setSubPartT( uiDISType, m_uiDISType, uiAbsPartIdx, uiDepth, uiPUIdx ); 2201 memset( m_bDISFlag + uiAbsPartIdx, bDIS, m_pcPic->getNumPartitionsInCtu() >> ( 2 * uiDepth ) ); 2202 } 2203 2204 Void TComDataCU::setDISTypeSubParts(UChar ucDISType, UInt uiAbsPartIdx, UInt uiDepth ) 2205 { 2206 assert( sizeof( *m_ucDISType) == 1 ); 2207 memset( m_ucDISType + uiAbsPartIdx, ucDISType, m_pcPic->getNumPartitionsInCtu() >> ( 2 * uiDepth ) ); 2217 2208 } 2218 2209 #endif … … 5604 5595 #endif 5605 5596 5606 #if H_3D5597 #if NH_3D_DIS 5607 5598 Bool TComDataCU::getNeighDepth ( UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index ) 5608 5599 { 5609 UInt uiPartIdxLT, uiPartIdxRT; 5610 this->deriveLeftRightTopIdxAdi( uiPartIdxLT, uiPartIdxRT, 0, 0 ); 5600 assert(uiPartIdx==0); 5601 const UInt uiPartIdxLT = getZorderIdxInCtu() + uiPartAddr; 5602 const Int iPartIdxStride = getPic()->getNumPartInCtuWidth(); 5603 5611 5604 UInt uiMidPart, uiPartNeighbor; 5612 5605 TComDataCU* pcCUNeighbor; 5613 5606 Bool bDepAvail = false; 5614 Pel *pDepth = this->getPic()->getPicYuvRec()->get LumaAddr();5615 Int iDepStride = this->getPic()->getPicYuvRec()->getStride( );5607 Pel *pDepth = this->getPic()->getPicYuvRec()->getAddr(COMPONENT_Y); 5608 Int iDepStride = this->getPic()->getPicYuvRec()->getStride(COMPONENT_Y); 5616 5609 5617 5610 Int xP, yP, nPSW, nPSH; … … 5621 5614 { 5622 5615 case 0: // Mid Left 5623 uiMidPart = g_auiZscanToRaster[uiPartIdxLT] + (nPSH>>1) / this->getPic()->getMinCUHeight() * this->getPic()->getNumPartInWidth();5616 uiMidPart = g_auiZscanToRaster[uiPartIdxLT] + (nPSH>>1) / this->getPic()->getMinCUHeight() * iPartIdxStride; 5624 5617 pcCUNeighbor = this->getPULeft( uiPartNeighbor, g_auiRasterToZscan[uiMidPart] ); 5625 5618 if ( pcCUNeighbor ) -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibCommon/TComDataCU.h
r1243 r1258 116 116 117 117 Bool* m_skipFlag; ///< array of skip flags 118 #if H_3D119 Bool* m_bDISFlag;120 U Int* m_uiDISType;118 #if NH_3D_DIS 119 Bool* m_bDISFlag; 120 UChar* m_ucDISType; 121 121 #endif 122 122 Char* m_pePartSize; ///< array of partition sizes … … 334 334 Void setSkipFlag ( UInt idx, Bool skip) { m_skipFlag[idx] = skip; } 335 335 Void setSkipFlagSubParts ( Bool skip, UInt absPartIdx, UInt depth ); 336 #if H_3D336 #if NH_3D_DIS 337 337 Bool* getDISFlag () { return m_bDISFlag; } 338 338 Bool getDISFlag ( UInt idx) { return m_bDISFlag[idx]; } 339 339 Void setDISFlag ( UInt idx, Bool bDIS) { m_bDISFlag[idx] = bDIS; } 340 Void setDISFlagSubParts ( Bool bDIS, UInt absPartIdx, UInt depth );341 342 U Int* getDISType () { return m_uiDISType; }343 U Int getDISType ( UInt idx) { return m_uiDISType[idx]; }344 Void getDISType ( UInt idx, U Int uiDISType) { m_uiDISType[idx] = uiDISType; }345 Void setDISTypeSubParts ( U Int uiDISType, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth );340 Void setDISFlagSubParts ( Bool bDIS, UInt uiAbsPartIdx, UInt uiDepth ); 341 342 UChar* getDISType () { return m_ucDISType; } 343 UChar getDISType ( UInt idx) { return m_ucDISType[idx]; } 344 Void getDISType ( UInt idx, UChar ucDISType) { m_ucDISType[idx] = ucDISType; } 345 Void setDISTypeSubParts ( UChar ucDISType, UInt uiAbsPartIdx, UInt uiDepth ); 346 346 #endif 347 347 Char* getPredictionMode () { return m_pePredMode; } … … 501 501 Void getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 502 502 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); 503 504 Bool getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index);505 503 #endif 506 504 #if H_3D_NBDV_REF … … 508 506 Void estimateDVFromDM(Int refViewIdx, UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred ); 509 507 #endif //H_3D_NBDV_REF 508 #endif 509 #if NH_3D_DIS 510 Bool getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index); 510 511 #endif 511 512 #if H_3D_FAST_TEXTURE_ENCODING -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibCommon/TComSlice.cpp
r1251 r1258 150 150 , m_depthToDisparityF (NULL) 151 151 #endif 152 #if H_3D152 #if NH_3D_DIS 153 153 , m_bApplyDIS (false) 154 154 #endif … … 1168 1168 } 1169 1169 #endif 1170 #if H_3D1170 #if NH_3D_DIS 1171 1171 m_bApplyDIS = pSrc->m_bApplyDIS; 1172 1172 #endif -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibCommon/TypeDef.h
r1247 r1258 61 61 #define NH_3D ( HEVC_EXT == 2) 62 62 63 63 64 ///////////////////////////////////////////////////////////////////////////////////////// 64 65 /////////////////////////////////// MAJOR DEFINES /////////////////////////////////// … … 78 79 // HHI_DMM4_ENC_I0066 79 80 // H_3D_FAST_DEPTH_INTRA 81 #define NH_3D_DIS 1 80 82 #endif 81 83
Note: See TracChangeset for help on using the changeset viewer.