Changeset 1258 in 3DVCSoftware for branches/HTM-14.1-update-dev1-MediaTek
- Timestamp:
- 16 Jun 2015, 04:13:09 (10 years ago)
- Location:
- branches/HTM-14.1-update-dev1-MediaTek
- Files:
-
- 2 added
- 27 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 -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/NALread.h
r1200 r1258 41 41 #ifndef __NALREAD__ 42 42 #define __NALREAD__ 43 44 43 #include "TLibCommon/CommonDef.h" 45 44 #include "TLibCommon/TComBitStream.h" 46 45 #include "TLibCommon/NAL.h" 47 48 46 //! \ingroup TLibDecoder 49 47 //! \{ -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/SyntaxElementParser.h
r1200 r1258 42 42 #pragma once 43 43 #endif // _MSC_VER > 1000 44 45 44 #include "TLibCommon/TComRom.h" 46 47 45 #if ENC_DEC_TRACE 48 46 -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1247 r1258 3224 3224 } 3225 3225 3226 #if H_3D3226 #if NH_3D_DIS 3227 3227 Void TDecCavlc::parseDIS( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 3228 3228 { -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecCAVLC.h
r1227 r1258 111 111 112 112 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 113 #if H_3D114 Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );113 #if NH_3D_DIS 114 Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 115 115 #endif 116 116 Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecCu.cpp
r1243 r1258 512 512 return; 513 513 } 514 #if H_3D514 #if NH_3D_DIS 515 515 m_pcEntropyDecoder->decodeDIS( pcCU, uiAbsPartIdx, uiDepth ); 516 516 if(!pcCU->getDISFlag(uiAbsPartIdx)) … … 547 547 setIsChromaQpAdjCoded( isChromaQpAdjCoded ); 548 548 setdQPFlag( bCodeDQP ); 549 #if H_3D549 #if NH_3D_DIS 550 550 } 551 551 #endif … … 643 643 case MODE_INTRA: 644 644 #if NH_3D 645 if( false /*m_ppcCU[uiDepth]->getDISFlag(0)*/ ) 646 { 647 //xReconDIS( m_ppcCU[uiDepth], 0, uiDepth ); 648 } 645 #if NH_3D_DIS 646 if( m_ppcCU[uiDepth]->getDISFlag(0) ) 647 { 648 xReconDIS( m_ppcCU[uiDepth], 0, uiDepth ); 649 } 650 #else 651 if(false ) 652 { 653 // xReconDIS( m_ppcCU[uiDepth], 0, uiDepth ); 654 } 655 #endif 649 656 #if NH_3D_SDC_INTRA 650 657 else if( m_ppcCU[uiDepth]->getSDCFlag(0) ) … … 723 730 } 724 731 725 #if H_3D732 #if NH_3D_DIS 726 733 Void TDecCu::xReconDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 727 734 { … … 731 738 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; 732 739 733 UInt uiStride = pcRecoYuv->getStride ( );734 Pel* piReco = pcRecoYuv->get LumaAddr(uiAbsPartIdx );740 UInt uiStride = pcRecoYuv->getStride (COMPONENT_Y); 741 Pel* piReco = pcRecoYuv->getAddr( COMPONENT_Y, uiAbsPartIdx ); 735 742 736 743 … … 740 747 Bool bAboveAvail = false; 741 748 Bool bLeftAvail = false; 742 pcCU->getPattern()->initPattern ( pcCU, 0, uiAbsPartIdx ); 743 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, 744 m_pcPrediction->getPredicBuf (), 745 m_pcPrediction->getPredicBufWidth (), 746 m_pcPrediction->getPredicBufHeight (), 747 bAboveAvail, bLeftAvail 748 ); 749 750 TComTURecurse rTu(pcCU, 0); 751 const ChromaFormat chFmt = rTu.GetChromaFormat(); 749 752 750 753 if ( pcCU->getDISType(uiAbsPartIdx) == 0 ) 751 754 { 752 m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), VER_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 755 const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, VER_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag()); 756 m_pcPrediction->initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions DEBUG_STRING_PASS_INTO(sTemp) ); 757 m_pcPrediction->predIntraAng( COMPONENT_Y, VER_IDX, 0 /* Decoder does not have an original image */, 0, piReco, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions ); 753 758 } 754 759 else if ( pcCU->getDISType(uiAbsPartIdx) == 1 ) 755 760 { 756 m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 761 const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, HOR_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag()); 762 m_pcPrediction->initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions DEBUG_STRING_PASS_INTO(sTemp) ); 763 m_pcPrediction->predIntraAng( COMPONENT_Y, HOR_IDX, 0 /* Decoder does not have an original image */, 0, piReco, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions ); 757 764 } 758 765 else if ( pcCU->getDISType(uiAbsPartIdx) == 2 ) 759 766 { 760 Pel pSingleDepth = 1 << ( g_bitDepthY- 1 );767 Pel pSingleDepth = 1 << ( pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 ); 761 768 pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 ); 762 769 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) … … 771 778 else if ( pcCU->getDISType(uiAbsPartIdx) == 3 ) 772 779 { 773 Pel pSingleDepth = 1 << ( g_bitDepthY- 1 );780 Pel pSingleDepth = 1 << ( pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 ); 774 781 pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 ); 775 782 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) … … 784 791 785 792 // clear UV 786 UInt uiStrideC = pcRecoYuv->get CStride();787 Pel *pRecCb = pcRecoYuv->get CbAddr();788 Pel *pRecCr = pcRecoYuv->get CrAddr();793 UInt uiStrideC = pcRecoYuv->getStride(COMPONENT_Cb); 794 Pel *pRecCb = pcRecoYuv->getAddr(COMPONENT_Cb); 795 Pel *pRecCr = pcRecoYuv->getAddr(COMPONENT_Cr); 789 796 790 797 for (Int y=0; y<uiHeight/2; y++) … … 792 799 for (Int x=0; x<uiWidth/2; x++) 793 800 { 794 pRecCb[x] = 1<<( g_bitDepthC-1);795 pRecCr[x] = 1<<( g_bitDepthC-1);801 pRecCb[x] = 1<<(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)-1); 802 pRecCr[x] = 1<<(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)-1); 796 803 } 797 804 -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecCu.h
r1227 r1258 124 124 Void xFillPCMBuffer (TComDataCU* pCU, UInt depth); 125 125 126 #if H_3D126 #if NH_3D_DIS 127 127 Void xReconDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 128 128 #endif -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecEntropy.cpp
r1227 r1258 60 60 m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth ); 61 61 } 62 #if H_3D62 #if NH_3D_DIS 63 63 Void TDecEntropy::decodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 64 64 { … … 67 67 return; 68 68 } 69 70 69 m_pcEntropyDecoderIf->parseDIS( pcCU, uiAbsPartIdx, uiDepth ); 71 70 } -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecEntropy.h
r1227 r1258 38 38 #ifndef __TDECENTROPY__ 39 39 #define __TDECENTROPY__ 40 41 40 #include "TLibCommon/CommonDef.h" 42 41 #include "TLibCommon/TComBitStream.h" … … 45 44 #include "TLibCommon/TComSampleAdaptiveOffset.h" 46 45 #include "TLibCommon/TComRectangle.h" 47 48 46 class TDecSbac; 49 47 class TDecCavlc; … … 78 76 public: 79 77 virtual Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 80 #if H_3D78 #if NH_3D_DIS 81 79 virtual Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 82 80 #endif … … 167 165 Void decodeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 168 166 Void decodeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 169 #if H_3D167 #if NH_3D_DIS 170 168 Void decodeDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ; 171 169 #endif -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecSbac.cpp
r1239 r1258 67 67 , m_cCUSplitFlagSCModel ( 1, 1, NUM_SPLIT_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 68 68 , m_cCUSkipFlagSCModel ( 1, 1, NUM_SKIP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 69 #if H_3D70 , m_cCUDISFlagSCModel ( 1, 1, NUM_DIS_FLAG_CTX, m_contextModels + m_numContextModels, m_numContextModels)71 , m_cCUDISTypeSCModel ( 1, 1, NUM_DIS_TYPE_CTX, m_contextModels + m_numContextModels, m_numContextModels)69 #if NH_3D_DIS 70 , m_cCUDISFlagSCModel ( 1, 1, NUM_DIS_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 71 , m_cCUDISTypeSCModel ( 1, 1, NUM_DIS_TYPE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 72 72 #endif 73 73 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 159 159 m_cCUSplitFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 160 160 m_cCUSkipFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SKIP_FLAG ); 161 #if H_3D162 m_cCUDISFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DIS_FLAG );163 m_cCUDISTypeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DIS_TYPE );161 #if NH_3D_DIS 162 m_cCUDISFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DIS_FLAG ); 163 m_cCUDISTypeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DIS_TYPE ); 164 164 #endif 165 165 m_cCUMergeFlagExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT ); … … 238 238 } 239 239 240 #if H_3D241 m_cCUDISFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG );242 m_cCUDISTypeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE );243 #endif244 240 #if H_3D_ARP 245 241 m_cCUPUARPWSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ARPW ); … … 525 521 526 522 } 527 #if H_3D523 #if NH_3D_DIS 528 524 Void TDecSbac::parseDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 529 525 { 530 526 pcCU->setDISFlagSubParts( false, uiAbsPartIdx, uiDepth ); 531 527 UInt uiSymbol = 0; 532 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUDISFlagSCModel.get( 0, 0, 0 ) );528 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUDISFlagSCModel.get( 0, 0, 0 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__SKIP_FLAG) ); 533 529 if( uiSymbol ) 534 530 { … … 538 534 pcCU->setPredModeSubParts( MODE_INTRA, uiAbsPartIdx, uiDepth ); 539 535 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 540 pcCU->set LumaIntraDirSubParts (DC_IDX, uiAbsPartIdx, uiDepth );541 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );536 pcCU->setIntraDirSubParts(CHANNEL_TYPE_LUMA, DC_IDX, uiAbsPartIdx, uiDepth ); 537 pcCU->setSizeSubParts( pcCU->getSlice()->getSPS()->getMaxCUWidth()>>uiDepth, pcCU->getSlice()->getSPS()->getMaxCUHeight()>>uiDepth, uiAbsPartIdx, uiDepth ); 542 538 pcCU->setMergeFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 543 539 pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth); 544 pcCU->setCbfSubParts(0, 1, 1, uiAbsPartIdx, uiDepth);540 pcCU->setCbfSubParts(0, COMPONENT_Y, uiAbsPartIdx, uiDepth); 545 541 546 542 UInt uiUnaryIdx = 0; … … 554 550 if ( uiUnaryIdx==0 ) 555 551 { 556 m_pcTDecBinIf->decodeBin( uiSymbol2, m_cCUDISTypeSCModel.get( 0, 0, 0 ) );552 m_pcTDecBinIf->decodeBin( uiSymbol2, m_cCUDISTypeSCModel.get( 0, 0, 0 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__SKIP_FLAG) ); 557 553 } 558 554 else 559 555 { 560 m_pcTDecBinIf->decodeBinEP( uiSymbol2 );556 m_pcTDecBinIf->decodeBinEP( uiSymbol2 RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__SKIP_FLAG)); 561 557 } 562 558 if( uiSymbol2 == 0 ) … … 566 562 } 567 563 } 568 pcCU->setDISTypeSubParts( uiUnaryIdx, uiAbsPartIdx, 0, uiDepth);564 pcCU->setDISTypeSubParts((UChar)uiUnaryIdx, uiAbsPartIdx, uiDepth); 569 565 } 570 566 } -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecSbac.h
r1227 r1258 133 133 134 134 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 135 #if H_3D135 #if NH_3D_DIS 136 136 Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 137 137 #endif … … 182 182 ContextModel3DBuffer m_cCUSplitFlagSCModel; 183 183 ContextModel3DBuffer m_cCUSkipFlagSCModel; 184 #if H_3D184 #if NH_3D_DIS 185 185 ContextModel3DBuffer m_cCUDISFlagSCModel; 186 186 ContextModel3DBuffer m_cCUDISTypeSCModel; -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncCavlc.cpp
r1247 r1258 2550 2550 assert(0); 2551 2551 } 2552 #if H_3D2552 #if NH_3D_DIS 2553 2553 Void TEncCavlc::codeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2554 2554 { -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncCavlc.h
r1227 r1258 121 121 Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ); 122 122 Void codeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 123 #if H_3D123 #if NH_3D_DIS 124 124 Void codeDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 125 125 #endif -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncCu.cpp
r1227 r1258 739 739 } 740 740 #endif 741 #if H_3D741 #if NH_3D_DIS 742 742 rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP ); 743 743 if( rpcBestCU->getSlice()->getDepthIntraSkipFlag() ) … … 1583 1583 } 1584 1584 1585 #if H_3D1585 #if NH_3D_DIS 1586 1586 m_pcEntropyCoder->encodeDIS( pcCU, uiAbsPartIdx ); 1587 1587 if(!pcCU->getDISFlag(uiAbsPartIdx)) … … 1628 1628 setCodeChromaQpAdjFlag( codeChromaQpAdj ); 1629 1629 setdQPFlag( bCodeDQP ); 1630 #if H_3D1630 #if NH_3D_DIS 1631 1631 } 1632 1632 #endif … … 2021 2021 mergeCandBuffer[uiMergeCand] = 1; 2022 2022 } 2023 #if H_3D2023 #if NH_3D_DIS 2024 2024 rpcTempCU->setDISFlagSubParts( false, 0, uhDepth ); 2025 2025 #endif … … 2063 2063 } 2064 2064 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth ); 2065 #if H_3D2065 #if NH_3D_DIS 2066 2066 rpcTempCU->setDISFlagSubParts( false, 0, uhDepth ); 2067 2067 #endif … … 2214 2214 } 2215 2215 #endif 2216 #if H_3D2216 #if NH_3D_DIS 2217 2217 rpcTempCU->setDISFlagSubParts( false, 0, uhDepth ); 2218 2218 #endif … … 2331 2331 } 2332 2332 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth ); 2333 #if H_3D2333 #if NH_3D_DIS 2334 2334 rpcTempCU->setDISFlagSubParts( false, 0, uhDepth ); 2335 2335 #endif … … 2440 2440 pMask += 2*uiMaskStride; 2441 2441 } 2442 }2443 2444 Void TEncCu::xCheckRDCostDIS( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize )2445 {2446 UInt uiDepth = rpcTempCU->getDepth( 0 );2447 if( !rpcBestCU->getSlice()->getIsDepth() || (eSize != SIZE_2Nx2N))2448 {2449 return;2450 }2451 2452 #if NH_3D_VSO // M52453 if( m_pcRdCost->getUseRenModel() )2454 {2455 UInt uiWidth = m_ppcOrigYuv[uiDepth]->getWidth ( COMPONENT_Y );2456 UInt uiHeight = m_ppcOrigYuv[uiDepth]->getHeight ( COMPONENT_Y );2457 Pel* piSrc = m_ppcOrigYuv[uiDepth]->getAddr ( COMPONENT_Y );2458 UInt uiSrcStride = m_ppcOrigYuv[uiDepth]->getStride ( COMPONENT_Y );2459 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );2460 }2461 #endif2462 2463 rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );2464 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );2465 rpcTempCU->setPredModeSubParts( MODE_INTRA, 0, uiDepth );2466 rpcTempCU->setCUTransquantBypassSubParts( rpcTempCU->getCUTransquantBypass(0), 0, uiDepth );2467 2468 rpcTempCU->setTrIdxSubParts(0, 0, uiDepth);2469 rpcTempCU->setCbfSubParts(0, 1, 1, 0, uiDepth);2470 rpcTempCU->setDISFlagSubParts(true, 0, uiDepth);2471 rpcTempCU->setLumaIntraDirSubParts (DC_IDX, 0, uiDepth);2472 #if NH_3D_SDC_INTRA2473 rpcTempCU->setSDCFlagSubParts( false, 0, uiDepth);2474 #endif2475 2476 UInt uiPreCalcDistC;2477 m_pcPredSearch ->estIntraPredDIS ( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth], uiPreCalcDistC, false );2478 2479 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC2480 Int oldTraceCopyBack = g_traceCopyBack;2481 g_traceCopyBack = false;2482 #endif2483 m_ppcRecoYuvTemp[uiDepth]->copyToPicLuma(rpcTempCU->getPic()->getPicYuvRec(), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU() );2484 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC2485 g_traceCopyBack = oldTraceCopyBack;2486 #endif2487 2488 2489 m_pcEntropyCoder->resetBits();2490 if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())2491 {2492 m_pcEntropyCoder->encodeCUTransquantBypassFlag( rpcTempCU, 0, true );2493 }2494 m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0, true );2495 m_pcEntropyCoder->encodeDIS( rpcTempCU, 0, true );2496 2497 2498 m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);2499 2500 rpcTempCU->getTotalBits() = m_pcEntropyCoder->getNumberOfWrittenBits();2501 rpcTempCU->getTotalBins() = ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();2502 2503 2504 #if NH_3D_VSO // M62505 if( m_pcRdCost->getUseLambdaScaleVSO())2506 {2507 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCostVSO( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );2508 }2509 else2510 #endif2511 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );2512 2513 2514 xCheckDQP( rpcTempCU );2515 xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth);2516 2442 } 2517 2443 … … 2651 2577 } 2652 2578 #endif 2653 2579 #if NH_3D_DIS 2580 Void TEncCu::xCheckRDCostDIS( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize ) 2581 { 2582 UInt uiDepth = rpcTempCU->getDepth( 0 ); 2583 if( !rpcBestCU->getSlice()->getIsDepth() || (eSize != SIZE_2Nx2N)) 2584 { 2585 return; 2586 } 2587 2588 #if NH_3D_VSO // M5 2589 if( m_pcRdCost->getUseRenModel() ) 2590 { 2591 UInt uiWidth = m_ppcOrigYuv[uiDepth]->getWidth ( COMPONENT_Y ); 2592 UInt uiHeight = m_ppcOrigYuv[uiDepth]->getHeight ( COMPONENT_Y ); 2593 Pel* piSrc = m_ppcOrigYuv[uiDepth]->getAddr ( COMPONENT_Y ); 2594 UInt uiSrcStride = m_ppcOrigYuv[uiDepth]->getStride ( COMPONENT_Y ); 2595 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 2596 } 2597 #endif 2598 2599 rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth ); 2600 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 2601 rpcTempCU->setPredModeSubParts( MODE_INTRA, 0, uiDepth ); 2602 rpcTempCU->setCUTransquantBypassSubParts( rpcTempCU->getCUTransquantBypass(0), 0, uiDepth ); 2603 2604 rpcTempCU->setTrIdxSubParts(0, 0, uiDepth); 2605 rpcTempCU->setCbfSubParts(0, COMPONENT_Y, 0, uiDepth); 2606 rpcTempCU->setDISFlagSubParts(true, 0, uiDepth); 2607 rpcTempCU->setIntraDirSubParts(CHANNEL_TYPE_LUMA, DC_IDX, 0, uiDepth); 2608 #if NH_3D_SDC_INTRA 2609 rpcTempCU->setSDCFlagSubParts( false, 0, uiDepth); 2610 #endif 2611 2612 UInt uiPreCalcDistC; 2613 m_pcPredSearch ->estIntraPredDIS ( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth], uiPreCalcDistC, false ); 2614 2615 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 2616 Int oldTraceCopyBack = g_traceCopyBack; 2617 g_traceCopyBack = false; 2618 #endif 2619 m_ppcRecoYuvTemp[uiDepth]->copyToPicComponent(COMPONENT_Y, rpcTempCU->getPic()->getPicYuvRec(), rpcTempCU->getCtuRsAddr(), rpcTempCU->getZorderIdxInCtu() ); 2620 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 2621 g_traceCopyBack = oldTraceCopyBack; 2622 #endif 2623 2624 m_pcEntropyCoder->resetBits(); 2625 if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag()) 2626 { 2627 m_pcEntropyCoder->encodeCUTransquantBypassFlag( rpcTempCU, 0, true ); 2628 } 2629 m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0, true ); 2630 m_pcEntropyCoder->encodeDIS( rpcTempCU, 0, true ); 2631 2632 m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]); 2633 2634 rpcTempCU->getTotalBits() = m_pcEntropyCoder->getNumberOfWrittenBits(); 2635 rpcTempCU->getTotalBins() = ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded(); 2636 2637 #if NH_3D_VSO // M6 2638 if( m_pcRdCost->getUseLambdaScaleVSO()) 2639 { 2640 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCostVSO( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 2641 } 2642 else 2643 #endif 2644 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 2645 2646 xCheckDQP( rpcTempCU ); 2647 xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth); 2648 } 2649 #endif 2654 2650 Void TEncCu::xCheckRDCostIntra( TComDataCU *&rpcBestCU, 2655 2651 TComDataCU *&rpcTempCU, … … 2677 2673 2678 2674 rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth ); 2679 #if H_3D2675 #if NH_3D_DIS 2680 2676 rpcTempCU->setDISFlagSubParts( false, 0, uiDepth ); 2681 2677 #endif … … 2715 2711 m_pcEntropyCoder->encodeCUTransquantBypassFlag( rpcTempCU, 0, true ); 2716 2712 } 2717 #if H_3D2713 #if NH_3D_DIS 2718 2714 m_pcEntropyCoder->encodeDIS( rpcTempCU, 0, true ); 2719 2715 if(!rpcTempCU->getDISFlag(0)) … … 2735 2731 setCodeChromaQpAdjFlag( codeChromaQpAdjFlag ); 2736 2732 setdQPFlag( bCodeDQP ); 2737 #if H_3D2733 #if NH_3D_DIS 2738 2734 } 2739 2735 #endif … … 2782 2778 2783 2779 rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth ); 2784 #if H_3D2780 #if NH_3D_DIS 2785 2781 rpcTempCU->setDISFlagSubParts( false, 0, uiDepth ); 2786 2782 #endif … … 2804 2800 2805 2801 m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0, true ); 2806 #if H_3D2802 #if NH_3D_DIS 2807 2803 m_pcEntropyCoder->encodeDIS( rpcTempCU, 0, true ); 2808 2804 #endif -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncCu.h
r1209 r1258 159 159 Void xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG = false ); 160 160 #endif 161 #if H_3D161 #if NH_3D_DIS 162 162 Void xCheckRDCostDIS ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize ); 163 163 #endif -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncEntropy.cpp
r1227 r1258 116 116 m_pcEntropyCoderIf->codeSkipFlag( pcCU, uiAbsPartIdx ); 117 117 } 118 #if H_3D118 #if NH_3D_DIS 119 119 Void TEncEntropy::encodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 120 120 { -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncEntropy.h
r1227 r1258 79 79 virtual Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 80 80 virtual Void codeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 81 #if H_3D81 #if NH_3D_DIS 82 82 virtual Void codeDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 83 83 #endif … … 165 165 Void encodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 166 166 Void encodeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 167 #if H_3D167 #if NH_3D_DIS 168 168 Void encodeDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD=false ); 169 169 #endif -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncSbac.cpp
r1227 r1258 62 62 , m_cCUSplitFlagSCModel ( 1, 1, NUM_SPLIT_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 63 63 , m_cCUSkipFlagSCModel ( 1, 1, NUM_SKIP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 64 #if H_3D64 #if NH_3D_DIS 65 65 , m_cCUDISFlagSCModel ( 1, 1, NUM_DIS_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 66 66 , m_cCUDISTypeSCModel ( 1, 1, NUM_DIS_TYPE_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 143 143 m_cCUSplitFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG ); 144 144 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 145 #if H_3D145 #if NH_3D_DIS 146 146 m_cCUDISFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG ); 147 147 m_cCUDISTypeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE ); … … 231 231 curCost = m_cCUSplitFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 232 232 curCost += m_cCUSkipFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SKIP_FLAG ); 233 #if H_3D233 #if NH_3D_DIS 234 234 curCost += m_cCUDISFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DIS_FLAG ); 235 235 curCost += m_cCUDISTypeSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DIS_TYPE ); … … 297 297 } 298 298 } 299 300 #if H_3D301 m_cCUDISFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG );302 m_cCUDISTypeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE );303 #endif304 299 #if H_3D_ARP 305 300 m_cCUPUARPWSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ARPW ); … … 420 415 } 421 416 422 #if H_3D417 #if NH_3D_DIS 423 418 Void TEncSbac::codeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx ) 424 419 { -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncSbac.h
r1227 r1258 138 138 Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ); 139 139 Void codeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 140 #if H_3D140 #if NH_3D_DIS 141 141 Void codeDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 142 142 #endif … … 204 204 ContextModel3DBuffer m_cCUSplitFlagSCModel; 205 205 ContextModel3DBuffer m_cCUSkipFlagSCModel; 206 #if H_3D206 #if NH_3D_DIS 207 207 ContextModel3DBuffer m_cCUDISFlagSCModel; 208 208 ContextModel3DBuffer m_cCUDISTypeSCModel; -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncSearch.cpp
r1248 r1258 1007 1007 } 1008 1008 m_pcEntropyCoder->encodeSkipFlag( pcCU, 0, true ); 1009 #if H_3D1009 #if NH_3D_DIS 1010 1010 m_pcEntropyCoder->encodeDIS(pcCU, 0, true ); 1011 1011 if(!pcCU->getDISFlag(uiAbsPartIdx)) … … 1013 1013 m_pcEntropyCoder->encodePredMode( pcCU, 0, true ); 1014 1014 } 1015 #if H_3D1015 #if NH_3D_DIS 1016 1016 else 1017 1017 { … … 1019 1019 } 1020 1020 #endif 1021 #if H_3D1021 #if NH_3D_DIS 1022 1022 if(!pcCU->getDISFlag(uiAbsPartIdx)) 1023 1023 { … … 1037 1037 } 1038 1038 } 1039 #if H_3D1040 } 1041 #endif 1042 } 1043 #if H_3D1039 #if NH_3D_DIS 1040 } 1041 #endif 1042 } 1043 #if NH_3D_DIS 1044 1044 if(!pcCU->getDISFlag(uiAbsPartIdx)) 1045 1045 { … … 1080 1080 #endif 1081 1081 #endif 1082 #if H_3D1082 #if NH_3D_DIS 1083 1083 } 1084 1084 #endif … … 1875 1875 } 1876 1876 1877 #if H_3D1877 #if NH_3D_DIS 1878 1878 Void TEncSearch::xIntraCodingDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode ) 1879 1879 { 1880 1880 UInt uiWidth = pcCU ->getWidth ( 0 ); 1881 1881 UInt uiHeight = pcCU ->getHeight ( 0 ); 1882 UInt uiStride = pcOrgYuv ->getStride ( );1883 Pel* piOrg = pcOrgYuv ->get LumaAddr(uiAbsPartIdx );1884 Pel* piPred = pcPredYuv->get LumaAddr(uiAbsPartIdx );1882 UInt uiStride = pcOrgYuv ->getStride (COMPONENT_Y); 1883 Pel* piOrg = pcOrgYuv ->getAddr(COMPONENT_Y, uiAbsPartIdx ); 1884 Pel* piPred = pcPredYuv->getAddr(COMPONENT_Y, uiAbsPartIdx ); 1885 1885 1886 1886 AOF( uiWidth == uiHeight ); 1887 1887 AOF( uiAbsPartIdx == 0 ); 1888 pcCU->setDISTypeSubParts( uiPredMode, uiAbsPartIdx, 0, pcCU->getDepth(0));1888 pcCU->setDISTypeSubParts((UChar)uiPredMode, uiAbsPartIdx, pcCU->getDepth(0)); 1889 1889 //===== reconstruction ===== 1890 1890 1891 1891 Bool bAboveAvail = false; 1892 1892 Bool bLeftAvail = false; 1893 pcCU->getPattern()->initPattern ( pcCU, 0, 0 ); 1894 pcCU->getPattern()->initAdiPattern( pcCU, 0, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail ); 1893 1894 TComTURecurse rTu(pcCU, 0); 1895 const ChromaFormat chFmt = rTu.GetChromaFormat(); 1895 1896 1896 1897 if ( uiPredMode == 0 ) 1897 1898 { 1898 predIntraLumaAng( pcCU->getPattern(), VER_IDX, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 1899 const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, VER_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag()); 1900 initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions DEBUG_STRING_PASS_INTO(sTemp) ); 1901 predIntraAng( COMPONENT_Y, VER_IDX, 0, uiStride, piPred, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions ); 1899 1902 } 1900 1903 else if ( uiPredMode == 1 ) 1901 1904 { 1902 predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 1905 const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, HOR_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag()); 1906 initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions DEBUG_STRING_PASS_INTO(sTemp) ); 1907 predIntraAng( COMPONENT_Y, HOR_IDX, 0, uiStride, piPred, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions ); 1903 1908 } 1904 1909 else if ( uiPredMode == 2 ) 1905 1910 { 1906 Pel pSingleDepth = 1 << ( g_bitDepthY- 1 );1911 Pel pSingleDepth = 1 << ( pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 ); 1907 1912 pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 ); 1908 1913 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) … … 1917 1922 else if ( uiPredMode == 3 ) 1918 1923 { 1919 Pel pSingleDepth = 1 << ( g_bitDepthY- 1 );1924 Pel pSingleDepth = 1 << ( pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 ); 1920 1925 pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 ); 1921 1926 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) … … 1930 1935 1931 1936 // clear UV 1932 UInt uiStrideC = pcPredYuv->get CStride();1933 Pel *pRecCb = pcPredYuv->get CbAddr();1934 Pel *pRecCr = pcPredYuv->get CrAddr();1937 UInt uiStrideC = pcPredYuv->getStride(COMPONENT_Cb); 1938 Pel *pRecCb = pcPredYuv->getAddr(COMPONENT_Cb); 1939 Pel *pRecCr = pcPredYuv->getAddr(COMPONENT_Cr); 1935 1940 1936 1941 for (Int y=0; y<uiHeight/2; y++) … … 1938 1943 for (Int x=0; x<uiWidth/2; x++) 1939 1944 { 1940 pRecCb[x] = 1<<( g_bitDepthC-1);1941 pRecCr[x] = 1<<( g_bitDepthC-1);1945 pRecCb[x] = 1<<(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)-1); 1946 pRecCr[x] = 1<<(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)-1); 1942 1947 } 1943 1948 … … 1946 1951 } 1947 1952 1948 piPred = pcPredYuv->get LumaAddr(uiAbsPartIdx );1953 piPred = pcPredYuv->getAddr(COMPONENT_Y, uiAbsPartIdx ); 1949 1954 //===== determine distortion ===== 1950 #if H_3D_VSO1955 #if NH_3D_VSO 1951 1956 if ( m_pcRdCost->getUseVSO() ) 1952 ruiDist = m_pcRdCost->getDistPartVSO ( pcCU, uiAbsPartIdx, p iPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, false );1957 ruiDist = m_pcRdCost->getDistPartVSO ( pcCU, uiAbsPartIdx, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA), piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, false ); 1953 1958 else 1954 1959 #endif 1955 ruiDist = m_pcRdCost->getDistPart( g_bitDepthY, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight);1960 ruiDist = m_pcRdCost->getDistPart(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA), piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, COMPONENT_Y ); 1956 1961 1957 1962 //===== determine rate and r-d cost ===== … … 1960 1965 UInt uiBits = m_pcEntropyCoder->getNumberOfWrittenBits(); 1961 1966 1962 #if H_3D_VSO1967 #if NH_3D_VSO 1963 1968 if ( m_pcRdCost->getUseLambdaScaleVSO()) 1964 1969 dRDCost = m_pcRdCost->calcRdCostVSO( uiBits, ruiDist ); … … 2721 2726 } 2722 2727 2723 #if H_3D2728 #if NH_3D_DIS 2724 2729 Void TEncSearch::estIntraPredDIS( TComDataCU* pcCU, 2725 2730 TComYuv* pcOrgYuv, … … 2734 2739 UInt uiHeight = pcCU->getHeight(0); 2735 2740 2736 2737 Pel* piOrg = pcOrgYuv ->get LumaAddr(0, uiWidth );2738 UInt uiStride = pcPredYuv->getStride( );2739 2741 #if NH_3D_VSO // M36 2742 Pel* piOrg = pcOrgYuv ->getAddr(COMPONENT_Y, 0, uiWidth ); 2743 UInt uiStride = pcPredYuv->getStride(COMPONENT_Y); 2744 #endif 2740 2745 Dist uiDist = 0; 2741 2746 Double dCost = 0.0; … … 2752 2757 uiDist = 0; 2753 2758 dCost = 0.0; 2754 #if H_3D_VSO // M362759 #if NH_3D_VSO // M36 2755 2760 if( m_pcRdCost->getUseRenModel() ) 2756 2761 { … … 2771 2776 2772 2777 2773 pcCU->setDISTypeSubParts( uiBestDISType, 0, 0, uiDepth);2778 pcCU->setDISTypeSubParts((UChar)uiBestDISType, 0, uiDepth); 2774 2779 assert(uiBestDISType >= 0); 2775 2780 … … 7091 7096 7092 7097 m_pcEntropyCoder->encodeSkipFlag ( pcCU, 0, true ); 7093 #if H_3D7098 #if NH_3D_DIS 7094 7099 m_pcEntropyCoder->encodeDIS ( pcCU, 0, true ); 7095 7100 #endif -
branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncSearch.h
r1243 r1258 192 192 Pel resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][MAX_CU_SIZE * MAX_CU_SIZE] 193 193 DEBUG_STRING_FN_DECLARE(sDebug)); 194 #if H_3D194 #if NH_3D_DIS 195 195 Void estIntraPredDIS ( TComDataCU* pcCU, 196 196 TComYuv* pcOrgYuv, … … 344 344 Void xStoreIntraResultQT ( const ComponentID compID, TComTU &rTu); 345 345 Void xLoadIntraResultQT ( const ComponentID compID, TComTU &rTu); 346 #if H_3D346 #if NH_3D_DIS 347 347 Void xIntraCodingDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode ); 348 348 #endif
Note: See TracChangeset for help on using the changeset viewer.