Changeset 1262 in 3DVCSoftware
- Timestamp:
- 29 Jun 2015, 19:43:32 (9 years ago)
- Location:
- branches/HTM-14.1-update-dev4-Qualcomm
- Files:
-
- 1 added
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/CommonDef.h
r1200 r1262 363 363 #endif 364 364 365 #if H_3D_IV_MERGE 365 #if H_3D_IV_MERGE || NH_3D_ARP 366 366 #define MRG_MAX_NUM_CANDS_MEM (MRG_MAX_NUM_CANDS+1) // one extra for inter-view motion prediction 367 367 #endif -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/ContextTables.h
r1222 r1262 162 162 #define NUM_CU_TRANSQUANT_BYPASS_FLAG_CTX 1 163 163 164 #if H_3D_ARP164 #if NH_3D_ARP 165 165 #define NUM_ARPW_CTX 3 ///< number of context models for weighting factor index used by advanced residual prediction 166 166 #endif … … 542 542 //! \} 543 543 544 #if H_3D_ARP544 #if NH_3D_ARP 545 545 static const UChar 546 546 INIT_ARPW[3][NUM_ARPW_CTX] = -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/TComCodingStatistics.h
r1246 r1262 82 82 #if NH_3D_DBBP 83 83 STATS__CABAC_BITS__DBBP_FLAG, 84 #endif 85 #if NH_3D_ARP 86 STATS__CABAC_BITS__ARP_FLAG, 84 87 #endif 85 88 STATS__CABAC_BITS__SAO, -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp
r1246 r1262 134 134 m_pbSPIVMPFlag = NULL; 135 135 #endif 136 #if H_3D_ARP136 #if NH_3D_ARP 137 137 m_puhARPW = NULL; 138 138 #endif … … 249 249 } 250 250 251 #if H_3D_ARP252 m_puhARPW = new UChar[ uiNumPartition];251 #if NH_3D_ARP 252 m_puhARPW = (UChar* )xMalloc(UChar, uiNumPartition); 253 253 #endif 254 254 #if H_3D_IC … … 468 468 469 469 470 #if H_3D_ARP471 if ( m_puhARPW ) { delete[] m_puhARPW;m_puhARPW = NULL; }470 #if NH_3D_ARP 471 if ( m_puhARPW ) { xFree(m_puhARPW); m_puhARPW = NULL; } 472 472 #endif 473 473 #if H_3D_IC … … 598 598 memset( m_puhHeight , maxCUHeight, m_uiNumPartition * sizeof( *m_puhHeight ) ); 599 599 600 #if H_3D_ARP601 m_puhARPW [ui] = pcFrom->getARPW( ui );602 #endif603 600 #if H_3D_IC 604 601 m_pbICFlag[ui] = pcFrom->m_pbICFlag[ui]; … … 651 648 } 652 649 653 #if H_3D_ARP654 memset( m_puhARPW + firstElement, 0, numElements * sizeof( UChar) );650 #if NH_3D_ARP 651 memset( m_puhARPW , 0, m_uiNumPartition * sizeof( *m_puhARPW ) ); 655 652 #endif 656 653 #if H_3D_IC … … 809 806 m_puhCbf[comp][ui] = 0; 810 807 } 811 #if H_3D_ARP812 808 #if NH_3D_ARP 809 m_puhARPW[ui] = 0; 813 810 #endif 814 811 #if H_3D_IC … … 915 912 memset( m_explicitRdpcmMode[comp], NUMBER_OF_RDPCM_MODES, iSizeInUchar ); 916 913 } 917 #if H_3D_ARP 918 memset( m_puhARPW, 0, iSizeInUchar ); 919 #endif 914 920 915 921 916 memset( m_puhDepth, uiDepth, iSizeInUchar ); … … 923 918 memset( m_puhHeight, uhHeight, iSizeInUchar ); 924 919 memset( m_pbIPCMFlag, 0, iSizeInBool ); 920 #if NH_3D_ARP 921 memset( m_puhARPW, 0, iSizeInUchar ); 922 #endif 925 923 #if H_3D_IC 926 924 memset( m_pbICFlag, 0, iSizeInBool ); … … 982 980 m_pbSPIVMPFlag[ui]=pcCU->m_pbSPIVMPFlag[uiPartOffset+ui]; 983 981 #endif 984 #if H_3D_ARP985 m_puhARPW [ui] = pcCU->getARPW( uiPartOffset+ui );982 #if NH_3D_ARP 983 m_puhARPW [ui] = pcCU->getARPW( uiPartOffset + ui ); 986 984 #endif 987 985 #if H_3D_IC … … 1089 1087 m_pbSPIVMPFlag = pcCU->getSPIVMPFlag() + uiPart; 1090 1088 #endif 1091 #if H_3D_ARP1089 #if NH_3D_ARP 1092 1090 m_puhARPW = pcCU->getARPW() + uiPart; 1093 1091 #endif … … 1249 1247 m_apiMVPIdx[eRefPicList] = pcCU->getMVPIdx(eRefPicList) + uiAbsPartIdx; 1250 1248 m_apiMVPNum[eRefPicList] = pcCU->getMVPNum(eRefPicList) + uiAbsPartIdx; 1251 #if H_3D_ARP1249 #if NH_3D_ARP 1252 1250 m_puhARPW = pcCU->getARPW() + uiAbsPartIdx; 1253 1251 #endif … … 1343 1341 memcpy( m_pbDBBPFlag + uiOffset, pcCU->getDBBPFlag(), iSizeInBool ); 1344 1342 #endif 1343 #if NH_3D_ARP 1344 memcpy( m_puhARPW + uiOffset, pcCU->getARPW(), iSizeInUchar ); 1345 #endif 1345 1346 1346 1347 memcpy( m_puhDepth + uiOffset, pcCU->getDepth(), iSizeInUchar ); … … 1383 1384 } 1384 1385 1385 #if H_3D_ARP 1386 memcpy( m_puhARPW + uiOffset, pcCU->getARPW(), iSizeInUchar ); 1387 #endif 1386 1388 1387 #if H_3D_IC 1389 1388 memcpy( m_pbICFlag + uiOffset, pcCU->getICFlag(), iSizeInBool ); … … 1473 1472 memcpy( pCtu->getDBBPFlag() + m_absZIdxInCtu, m_pbDBBPFlag, iSizeInBool ); 1474 1473 #endif 1475 1474 #if NH_3D_ARP 1475 memcpy( pCtu->getARPW() + m_absZIdxInCtu, m_puhARPW, iSizeInUchar ); 1476 #endif 1476 1477 memcpy( pCtu->getDepth() + m_absZIdxInCtu, m_puhDepth, iSizeInUchar ); 1477 1478 memcpy( pCtu->getWidth() + m_absZIdxInCtu, m_puhWidth, iSizeInUchar ); … … 1506 1507 } 1507 1508 1508 #if H_3D_ARP 1509 memcpy( rpcCU->getARPW() + m_uiAbsIdxInLCU, m_puhARPW, iSizeInUchar ); 1510 #endif 1509 1511 1510 #if H_3D_IC 1512 1511 memcpy( rpcCU->getICFlag() + m_uiAbsIdxInLCU, m_pbICFlag, iSizeInBool ); … … 1544 1543 memcpy( rpcCU->getSDCSegmentDCOffset(1) + uiPartOffset, m_apSegmentDCOffset[1], sizeof( Pel ) * uiQNumPart); 1545 1544 #endif 1546 #endif1547 #if H_3D_ARP1548 memcpy( rpcCU->getARPW() + uiPartOffset, m_puhARPW, iSizeInUchar );1549 1545 #endif 1550 1546 #if H_3D_IC … … 2102 2098 return uiCtx; 2103 2099 } 2104 #if H_3D_ARP2100 #if NH_3D_ARP 2105 2101 UInt TComDataCU::getCTXARPWFlag( UInt uiAbsPartIdx ) 2106 2102 { … … 2109 2105 UInt uiCtx = 0; 2110 2106 2111 pcTempCU = getPULeft( uiTempPartIdx, m_ uiAbsIdxInLCU+ uiAbsPartIdx );2107 pcTempCU = getPULeft( uiTempPartIdx, m_absZIdxInCtu + uiAbsPartIdx ); 2112 2108 uiCtx = ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1) : 0; 2113 2109 return uiCtx; 2114 2110 } 2115 2111 #endif … … 3706 3702 Bool bICFlag = getICFlag(uiAbsPartIdx); 3707 3703 #endif 3708 #if H_3D_ARP3704 #if NH_3D_ARP 3709 3705 Bool bARPFlag = getARPW(uiAbsPartIdx) > 0; 3710 3706 #endif … … 3744 3740 && !bICFlag 3745 3741 #endif 3746 #if H_3D_ARP3742 #if NH_3D_ARP 3747 3743 && !bARPFlag 3748 3744 #endif … … 4192 4188 !bICFlag && 4193 4189 #endif 4194 #if H_3D_ARP4190 #if NH_3D_ARP 4195 4191 !bARPFlag && 4196 4192 #endif … … 6131 6127 Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiDepth ) 6132 6128 { 6129 #if BUF_FIX 6130 UInt uiCurrPartNumb = m_pcPic->getNumPartitionsInCtu() >> (uiDepth << 1); 6131 assert(m_pcPic->getNumPartitionsInCtu() ==m_pcPic->getNumPartInCtuWidth()*m_pcPic->getNumPartInCtuHeight()); 6132 #else 6133 6133 UInt uiCurrPartNumb = m_pcPic->getNumPartInCtuWidth() >> (uiDepth << 1); 6134 #endif 6134 6135 for (UInt ui = 0; ui < uiCurrPartNumb; ui++ ) 6135 6136 { … … 6675 6676 } 6676 6677 #endif 6677 #if H_3D_ARP6678 #if NH_3D_ARP 6678 6679 Void TComDataCU::setARPWSubParts ( UChar w, UInt uiAbsPartIdx, UInt uiDepth ) 6679 6680 { 6680 assert( sizeof( *m_puhARPW) == 1 ); 6681 memset( m_puhARPW + uiAbsPartIdx, w, m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ) ); 6681 setSubPart<UChar>( w, m_puhARPW, uiAbsPartIdx, uiDepth, 0 ); 6682 6682 } 6683 6683 #endif -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/TComDataCU.h
r1246 r1262 50 50 #include "TComPattern.h" 51 51 52 #if H_3D_ARP53 #include "TComYuv.h"54 #endif55 52 #if H_3D 56 53 #include <algorithm> … … 176 173 Bool* m_pbSPIVMPFlag; ///< array of sub-PU IVMP flags to indicate whehter a block uses sub-PU IVMP ///< 0: non-SPIVMP; 1: SPIVMP 177 174 #endif 178 #if H_3D_ARP175 #if NH_3D_ARP 179 176 UChar* m_puhARPW; 180 177 #endif … … 251 248 252 249 /// compute scaling factor from POC difference 253 #if ! H_3D_ARP250 #if !NH_3D_ARP 254 251 Int xGetDistScaleFactor ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC ); 255 252 #endif … … 268 265 // create / destroy / initialize / copy 269 266 // ------------------------------------------------------------------------------------------------------------------- 270 #if H_3D_ARP 267 #if NH_3D_ARP 268 /// compute scaling factor from POC difference 271 269 Int xGetDistScaleFactor ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC ); 272 270 #endif … … 318 316 Void getPosInPic ( UInt uiAbsPartIndex, Int& riPosX, Int& riPosY ) const; 319 317 #endif 320 318 #if NH_3D_ARP 319 Void setSlice ( TComSlice* pcSlice) { m_pcSlice = pcSlice; } 320 Void setPic ( TComDataCU* pcCU ) { m_pcPic = pcCU->getPic(); } 321 #endif 321 322 // ------------------------------------------------------------------------------------------------------------------- 322 323 // member functions for CU data … … 531 532 ); 532 533 #endif 533 #if H_3D_ARP534 #if NH_3D_ARP 534 535 UChar* getARPW () { return m_puhARPW; } 535 536 UChar getARPW ( UInt uiIdx ) { return m_puhARPW[uiIdx]; } 536 537 Void setARPW ( UInt uiIdx, UChar w ) { m_puhARPW[uiIdx] = w; } 537 538 Void setARPWSubParts ( UChar w, UInt uiAbsPartIdx, UInt uiDepth ); 538 Double getARPWFactor ( UInt uiIdx );539 539 #endif 540 540 #if H_3D_IC … … 710 710 Bool isIC ( UInt uiPartIdx ); 711 711 #endif 712 713 712 // ------------------------------------------------------------------------------------------------------------------- 714 713 // member functions for symbol prediction (most probable / mode conversion) … … 729 728 UInt getCtxSkipFlag ( UInt uiAbsPartIdx ); 730 729 UInt getCtxInterDir ( UInt uiAbsPartIdx ); 731 #if H_3D_ARP730 #if NH_3D_ARP 732 731 UInt getCTXARPWFlag ( UInt uiAbsPartIdx ); 733 732 #endif -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/TComInterpolationFilter.cpp
r1200 r1262 75 75 }; 76 76 77 #if H_3D_ARP77 #if NH_3D_ARP 78 78 const Short TComInterpolationFilter::m_lumaFilterARP[4][NTAPS_LUMA_ARP] = 79 79 { … … 361 361 */ 362 362 Void TComInterpolationFilter::filterHor(const ComponentID compID, Pel *src, Int srcStride, Pel *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast, const ChromaFormat fmt, const Int bitDepth 363 #if H_3D_ARP363 #if NH_3D_ARP 364 364 , Bool filterType 365 365 #endif … … 372 372 else if (isLuma(compID)) 373 373 { 374 #if H_3D_ARP 374 assert(frac >= 0 && frac < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS); 375 #if NH_3D_ARP 375 376 if(filterType) 376 377 { 377 filterHor<NTAPS_LUMA_ARP>( g_bitDepthY, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilterARP[frac]);378 filterHor<NTAPS_LUMA_ARP>(bitDepth, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilterARP[frac]); 378 379 } 379 380 else 380 381 { 381 382 #endif 382 383 assert(frac >= 0 && frac < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS); 384 filterHor<NTAPS_LUMA>(bitDepth, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilter[frac]); 385 #if H_3D_ARP 386 } 387 #endif 388 383 filterHor<NTAPS_LUMA>(bitDepth, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilter[frac]); 384 #if NH_3D_ARP 385 } 386 #endif 389 387 } 390 388 else … … 392 390 const UInt csx = getComponentScaleX(compID, fmt); 393 391 assert(frac >=0 && csx<2 && (frac<<(1-csx)) < CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS); 394 filterHor<NTAPS_CHROMA>(bitDepth, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilter[frac<<(1-csx)]); 392 #if NH_3D_ARP 393 if(filterType) 394 { 395 filterHor<NTAPS_CHROMA_ARP>(bitDepth, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilterARP[frac]); 396 } 397 else 398 { 399 #endif 400 filterHor<NTAPS_CHROMA>(bitDepth, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilter[frac<<(1-csx)]); 401 #if NH_3D_ARP 402 } 403 #endif 395 404 } 396 405 } … … 414 423 */ 415 424 Void TComInterpolationFilter::filterVer(const ComponentID compID, Pel *src, Int srcStride, Pel *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast, const ChromaFormat fmt, const Int bitDepth 416 #if H_3D_ARP425 #if NH_3D_ARP 417 426 , Bool filterType 418 427 #endif … … 425 434 else if (isLuma(compID)) 426 435 { 427 #if H_3D_ARP 436 assert(frac >= 0 && frac < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS); 437 #if NH_3D_ARP 428 438 if(filterType) 429 439 { 430 filterVer<NTAPS_LUMA_ARP>( g_bitDepthY, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilterARP[frac]);440 filterVer<NTAPS_LUMA_ARP>(bitDepth, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilterARP[frac]); 431 441 } 432 442 else 433 443 { 434 444 #endif 435 assert(frac >= 0 && frac < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS);436 445 filterVer<NTAPS_LUMA>(bitDepth, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilter[frac]); 437 #if H_3D_ARP 438 } 439 #endif 440 446 #if NH_3D_ARP 447 } 448 #endif 441 449 } 442 450 else … … 444 452 const UInt csy = getComponentScaleY(compID, fmt); 445 453 assert(frac >=0 && csy<2 && (frac<<(1-csy)) < CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS); 454 #if NH_3D_ARP 455 if(filterType) 456 { 457 filterVer<NTAPS_CHROMA_ARP>(bitDepth, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilterARP[frac]); 458 } 459 else 460 { 461 #endif 446 462 filterVer<NTAPS_CHROMA>(bitDepth, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilter[frac<<(1-csy)]); 447 } 448 } 449 450 #if H_3D_ARP 451 , Bool filterType 452 #endif 453 454 #if H_3D_ARP 455 if(filterType) 456 { 457 filterHor<NTAPS_CHROMA_ARP>(g_bitDepthC, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilterARP[frac]); 458 } 459 else 460 { 461 #endif 462 #if H_3D_ARP 463 } 464 #endif 465 #if H_3D_ARP 466 , Bool filterType 467 #endif 468 #if H_3D_ARP 469 if(filterType) 470 { 471 filterVer<NTAPS_CHROMA_ARP>(g_bitDepthC, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilterARP[frac]); 472 } 473 else 474 { 475 #endif 476 #if H_3D_ARP 477 } 478 #endif 479 480 481 463 #if NH_3D_ARP 464 } 465 #endif 466 } 467 } 482 468 //! \} -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/TComInterpolationFilter.h
r1200 r1262 45 45 //! \{ 46 46 47 #if H_3D_ARP47 #if NH_3D_ARP 48 48 #define NTAPS_LUMA_ARP 2 ///< Number of taps for luma 49 49 #define NTAPS_CHROMA_ARP 2 ///< Number of taps for chroma … … 63 63 static const TFilterCoeff m_lumaFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_LUMA]; ///< Luma filter taps 64 64 static const TFilterCoeff m_chromaFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA]; ///< Chroma filter taps 65 #if H_3D_ARP65 #if NH_3D_ARP 66 66 static const Short m_lumaFilterARP [4][NTAPS_LUMA_ARP]; ///< Luma filter taps for ARP 67 67 static const Short m_chromaFilterARP[8][NTAPS_CHROMA_ARP]; ///< Chroma filter taps for ARP … … 83 83 84 84 Void filterHor(const ComponentID compID, Pel *src, Int srcStride, Pel *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast, const ChromaFormat fmt, const Int bitDepth 85 #if H_3D_ARP85 #if NH_3D_ARP 86 86 , Bool filterType = false 87 87 #endif 88 88 ); 89 89 Void filterVer(const ComponentID compID, Pel *src, Int srcStride, Pel *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast, const ChromaFormat fmt, const Int bitDepth 90 #if H_3D_ARP90 #if NH_3D_ARP 91 91 , Bool filterType = false 92 92 #endif … … 94 94 }; 95 95 96 #if H_3D_ARP97 , Bool filterType = false98 #endif99 #if H_3D_ARP100 , Bool filterType = false101 #endif102 103 96 //! \} 104 97 -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/TComPic.cpp
r1210 r1262 143 143 } 144 144 #if NH_3D 145 #if NH_3D_ARP 146 Void TComPic::getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx ) 147 { 148 Int iMaxCUWidth = (Int) ( getPicSym()->getSPS().getMaxCUWidth() ); 149 Int iMaxCuHeight = (Int) ( getPicSym()->getSPS().getMaxCUHeight() ); 150 151 UInt uiMaxTotalCUDepth = getPicSym()->getSPS().getMaxTotalCUDepth(); 152 Int iBaseUnitWidth = iMaxCUWidth >> uiMaxTotalCUDepth; 153 Int iBaseUnitHeight = iMaxCUWidth >> uiMaxTotalCUDepth; 154 155 Int iNumCuInWidth = getPicYuvRec()->getWidth(COMPONENT_Y) / iMaxCUWidth; 156 iNumCuInWidth += ( getPicYuvRec()->getWidth(COMPONENT_Y) % iMaxCUWidth ) ? 1 : 0; 157 158 159 Int iCuX = iX / iMaxCUWidth; 160 Int iCuY = iY / iMaxCuHeight; 161 Int iBaseX = ( iX - iCuX * iMaxCUWidth ) / iBaseUnitWidth; 162 Int iBaseY = ( iY - iCuY * iMaxCuHeight ) / iBaseUnitHeight; 163 Int iCuSizeInBases = iMaxCuHeight / iBaseUnitWidth; 164 165 riCuAddr = iCuY * iNumCuInWidth + iCuX; 166 Int iRastPartIdx = iBaseY * iCuSizeInBases + iBaseX; 167 riAbsZorderIdx = g_auiRasterToZscan[ iRastPartIdx ]; 168 } 169 #endif 145 170 Void TComPic::compressMotion(Int scale) 146 171 #else … … 283 308 return getPicYuv( layerIdInNuh, poc, recon ); 284 309 } 285 #if H_3D_ARP310 #if NH_3D_ARP 286 311 TComList<TComPic*>* TComPicLists::getPicList( Int layerIdInNuh ) 287 312 { -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/TComPic.h
r1210 r1262 182 182 #endif 183 183 #if NH_3D 184 #if NH_3D_ARP 185 Void getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx ); 186 #endif 184 187 Void compressMotion(Int scale); 185 188 #else … … 248 251 Void push_back( TComList<TComPic*>* list ) { m_lists.push_back( list ); } 249 252 Int size () { return (Int) m_lists.size(); } 250 #if H_3D_ARP253 #if NH_3D_ARP 251 254 TComList<TComPic*>* getPicList ( Int layerIdInNuh ); 252 255 #endif -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/TComPicYuv.cpp
r1200 r1262 306 306 riY = iCuY * m_iCuHeight + iBaseY * m_iBaseUnitHeight; 307 307 } 308 309 Void310 TComPicYuv::getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx )311 {312 Int iCuX = iX / m_iCuWidth;313 Int iCuY = iY / m_iCuHeight;314 Int iBaseX = ( iX - iCuX * m_iCuWidth ) / m_iBaseUnitWidth;315 Int iBaseY = ( iY - iCuY * m_iCuHeight ) / m_iBaseUnitHeight;316 Int iCuSizeInBases = m_iCuWidth / m_iBaseUnitWidth;317 riCuAddr = iCuY * m_iNumCuInWidth + iCuX;318 Int iRastPartIdx = iBaseY * iCuSizeInBases + iBaseX;319 riAbsZorderIdx = g_auiRasterToZscan[ iRastPartIdx ];320 }321 308 #endif 322 309 Void TComPicYuv::setLumaTo( Pel pVal ) -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/TComPicYuv.h
r1200 r1262 167 167 // Set Function 168 168 Void setLumaTo ( Pel pVal ); 169 Void setChromaTo ( Pel pVal ); 170 #if H_3D_IV_MERGE 169 Void setChromaTo ( Pel pVal ); 170 #if H_3D_IV_MERGE 171 171 // sample to block and block to sample conversion 172 172 Void getTopLeftSamplePos( Int iCuAddr, Int iAbsZorderIdx, Int& riX, Int& riY ); 173 Void getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx );174 173 #endif 175 174 #endif -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/TComPrediction.cpp
r1222 r1262 123 123 m_cYuvPredTemp.destroy(); 124 124 125 #if H_3D_ARP125 #if NH_3D_ARP 126 126 m_acYuvPredBase[0].destroy(); 127 127 m_acYuvPredBase[1].destroy(); … … 182 182 183 183 m_cYuvPredTemp.create( MAX_CU_SIZE, MAX_CU_SIZE, chromaFormatIDC ); 184 #if H_3D_ARP185 m_acYuvPredBase[0] .create( g_uiMaxCUWidth, g_uiMaxCUHeight);186 m_acYuvPredBase[1] .create( g_uiMaxCUWidth, g_uiMaxCUHeight);184 #if NH_3D_ARP 185 m_acYuvPredBase[0] .create( MAX_CU_SIZE, MAX_CU_SIZE, chromaFormatIDC ); 186 m_acYuvPredBase[1] .create( MAX_CU_SIZE, MAX_CU_SIZE, chromaFormatIDC ); 187 187 #endif 188 188 #if H_3D_VSP … … 648 648 Int RefPOCL0 = pcCU->getSlice()->getRefPic(REF_PIC_LIST_0, pcCU->getCUMvField(REF_PIC_LIST_0)->getRefIdx(PartAddr))->getPOC(); 649 649 Int RefPOCL1 = pcCU->getSlice()->getRefPic(REF_PIC_LIST_1, pcCU->getCUMvField(REF_PIC_LIST_1)->getRefIdx(PartAddr))->getPOC(); 650 #if H_3D_ARP650 #if NH_3D_ARP 651 651 if(!pcCU->getARPW(PartAddr) && RefPOCL0 == RefPOCL1 && pcCU->getCUMvField(REF_PIC_LIST_0)->getMv(PartAddr) == pcCU->getCUMvField(REF_PIC_LIST_1)->getMv(PartAddr)) 652 652 #else … … 1389 1389 pcCU->checkMvVertRest(cMv, eRefPicList, iRefIdx ); 1390 1390 #endif 1391 #if H_3D_ARP 1392 if(pcCU->getARPW( uiPartAddr ) > 0 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC()) 1393 { 1394 xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , rpcYuvPred , bi ); 1391 #if NH_3D_ARP 1392 if( pcCU->getARPW( uiPartAddr ) > 0 ) 1393 { 1394 if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC() ) 1395 { 1396 xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , pcYuvPred , bi ); 1397 } 1398 else 1399 { 1400 xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, bi ); 1401 } 1395 1402 } 1396 1403 else 1397 1404 { 1398 if( pcCU->getARPW( uiPartAddr ) > 01399 && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N1400 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()!= pcCU->getSlice()->getPOC()1401 )1402 {1403 xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi );1404 }1405 else1406 {1407 1405 #endif 1408 1406 #if H_3D_IC 1409 1407 Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() != pcCU->getSlice()->getViewIndex() ); 1410 1408 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi 1411 #if H_3D_ARP1409 #if NH_3D_ARP 1412 1410 , false 1413 1411 #endif … … 1415 1413 bICFlag = bICFlag && (iWidth > 8); 1416 1414 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi 1417 #if H_3D_ARP1415 #if NH_3D_ARP 1418 1416 , false 1419 1417 #endif … … 1427 1425 } 1428 1426 #endif 1429 #if H_3D_ARP 1430 } 1427 #if NH_3D_ARP 1431 1428 } 1432 1429 #endif … … 1479 1476 #endif 1480 1477 1481 #if H_3D_ARP 1482 Void TComPrediction::xPredInterUniARP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled ) 1483 { 1484 Int iRefIdx = pNewMvFiled ? pNewMvFiled->getRefIdx() : pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr ); 1485 TComMv cMv = pNewMvFiled ? pNewMvFiled->getMv() : pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); 1478 #if NH_3D_ARP 1479 //temporal ARP 1480 Void TComPrediction::xPredInterUniARP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi ) 1481 { 1482 Int iRefIdx = pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr ); 1483 TComMv cMv = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); 1486 1484 Bool bTobeScaled = false; 1487 1485 TComPic* pcPicYuvBaseCol = NULL; … … 1497 1495 UChar dW = pcCU->getARPW ( uiPartAddr ); 1498 1496 1499 { 1500 Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList); 1501 if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() ) 1497 Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList); 1498 if (arpRefIdx < 0 || !pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, cDistparity.m_aVIdxCan)) 1499 { 1500 dW = 0; 1501 bTobeScaled = false; 1502 } 1503 else 1504 { 1505 if( arpRefIdx != iRefIdx ) 1502 1506 { 1503 1507 bTobeScaled = true; 1504 1508 } 1505 1506 1509 pcPicYuvBaseCol = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getPOC(), cDistparity.m_aVIdxCan ); 1507 1508 1510 pcPicYuvBaseRef = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC(), cDistparity.m_aVIdxCan ); 1509 1510 if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, cDistparity.m_aVIdxCan)) 1511 { 1512 dW = 0; 1513 bTobeScaled = false; 1514 } 1515 else 1516 { 1517 assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC() ); 1518 } 1519 1520 if(bTobeScaled) 1521 { 1522 Int iCurrPOC = pcCU->getSlice()->getPOC(); 1523 Int iColRefPOC = pcCU->getSlice()->getRefPOC( eRefPicList, iRefIdx ); 1524 Int iCurrRefPOC = pcCU->getSlice()->getRefPOC( eRefPicList, 0); 1525 Int iScale = pcCU-> xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iCurrPOC, iColRefPOC); 1526 if ( iScale != 4096 ) 1527 { 1528 cMv = cMv.scaleMv( iScale ); 1529 } 1530 iRefIdx = 0; 1531 } 1511 } 1512 if(bTobeScaled) 1513 { 1514 Int iCurrPOC = pcCU->getSlice()->getPOC(); 1515 Int iColRefPOC = pcCU->getSlice()->getRefPOC( eRefPicList, iRefIdx ); 1516 Int iCurrRefPOC = pcCU->getSlice()->getRefPOC( eRefPicList, arpRefIdx ); 1517 Int iScale = pcCU-> xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iCurrPOC, iColRefPOC); 1518 if ( iScale != 4096 ) 1519 { 1520 cMv = cMv.scaleMv( iScale ); 1521 } 1522 iRefIdx = arpRefIdx; 1532 1523 } 1533 1524 1534 1525 pcCU->clipMv(cMv); 1535 1526 TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(); 1536 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 ), true ); 1537 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 ), true ); 1527 1528 for (UInt comp=COMPONENT_Y; comp< rpcYuvPred->getNumberValidComponents(); comp++) 1529 { 1530 const ComponentID compID=ComponentID(comp); 1531 xPredInterBlk ( compID, pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 ), pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), true ); 1532 } 1538 1533 1539 1534 if( dW > 0 ) … … 1551 1546 pcCU->clipMv( cNBDV ); 1552 1547 1553 pcPicYuvRef= pcPicYuvBaseCol->getPicYuvRec();1554 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, true);1555 if (iWidth > 8) 1556 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, true );1557 1558 pcPicYuvRef = pcPicYuvBaseRef->getPicYuvRec();1559 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, true);1560 1561 if (iWidth > 8)1562 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, true );1563 1548 TComPicYuv* pcPicYuvBaseColRec = pcPicYuvBaseCol->getPicYuvRec(); 1549 TComPicYuv* pcPicYuvBaseRefRec = pcPicYuvBaseRef->getPicYuvRec(); 1550 1551 UInt uiCompNum = ( iWidth > 8 ) ? 3: 1; 1552 for (UInt comp=COMPONENT_Y; comp< uiCompNum; comp++) 1553 { 1554 const ComponentID compID=ComponentID(comp); 1555 xPredInterBlk ( compID, pcCU, pcPicYuvBaseColRec, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), true ); 1556 xPredInterBlk ( compID, pcCU, pcPicYuvBaseRefRec, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), true ); 1557 } 1558 1564 1559 pYuvB0->subtractARP( pYuvB0 , pYuvB1 , uiPartAddr , iWidth , iHeight ); 1565 1566 1560 if( 2 == dW ) 1567 1561 { 1568 1562 pYuvB0->multiplyARP( uiPartAddr , iWidth , iHeight , dW ); 1569 1563 } 1570 rpcYuvPred->addARP( rpcYuvPred , pYuvB0 , uiPartAddr , iWidth , iHeight , !bi ); 1571 } 1572 } 1573 1564 rpcYuvPred->addARP( rpcYuvPred , pYuvB0 , uiPartAddr , iWidth , iHeight , !bi, pcCU->getSlice()->getSPS()->getBitDepths() ); 1565 } 1566 } 1574 1567 Bool TComPrediction::xCheckBiInterviewARP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eBaseRefPicList, TComPic*& pcPicYuvCurrTRef, TComMv& cBaseTMV, Int& iCurrTRefPoc ) 1575 1568 { … … 1577 1570 TComMv cDMv = pcCU->getCUMvField( eBaseRefPicList )->getMv( uiPartAddr ); 1578 1571 TComPic* pcPicYuvBaseCol = pcCU->getSlice()->getRefPic( eBaseRefPicList, iRefIdx ); 1579 TComPicYuv* pcYuvBaseCol = pcPicYuvBaseCol->getPicYuvRec();1580 Int uiLCUAddr,uiAbsPartAddr;1581 1572 Int irefPUX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[uiPartAddr]] + iWidth/2 + ((cDMv.getHor() + 2)>>2); 1582 1573 Int irefPUY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[uiPartAddr]] + iHeight/2 + ((cDMv.getVer() + 2)>>2); … … 1584 1575 irefPUX = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()-> getPicWidthInLumaSamples()-1, irefPUX); 1585 1576 irefPUY = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples()-1, irefPUY); 1586 pcYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr); 1587 TComDataCU *pColCU = pcPicYuvBaseCol->getCU( uiLCUAddr ); 1577 1578 Int uiLCUAddr,uiAbsPartAddr; 1579 pcPicYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr); 1580 TComDataCU *pColCU = pcPicYuvBaseCol->getCtu( uiLCUAddr ); 1588 1581 1589 1582 TComPic* pcPicYuvBaseTRef = NULL; … … 1636 1629 return false; 1637 1630 } 1638 1639 Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi , TComMvField * pNewMvFiled)1631 //inter-view ARP 1632 Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi ) 1640 1633 { 1641 1634 Int iRefIdx = pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr ); … … 1650 1643 Bool bTMVAvai = false; 1651 1644 TComMv cBaseTMV; 1652 if( pNewMvFiled ) 1653 { 1654 iRefIdx = pNewMvFiled->getRefIdx(); 1655 cDMv = pNewMvFiled->getMv(); 1656 } 1645 1657 1646 pcCU->clipMv(cTempDMv); 1658 1647 1659 assert(dW > 0);1660 if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, pcPicYuvBaseCol->getViewIndex()))1661 {1662 dW = 0;1663 }1664 Int uiLCUAddr,uiAbsPartAddr;1665 1648 Int irefPUX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[uiPartAddr]] + iWidth/2 + ((cDMv.getHor() + 2)>>2); 1666 1649 Int irefPUY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[uiPartAddr]] + iHeight/2 + ((cDMv.getVer() + 2)>>2); … … 1668 1651 irefPUX = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()-> getPicWidthInLumaSamples()-1, irefPUX); 1669 1652 irefPUY = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples()-1, irefPUY); 1670 pcYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr); 1671 TComDataCU *pColCU = pcPicYuvBaseCol->getCU( uiLCUAddr ); 1653 1654 Int uiLCUAddr,uiAbsPartAddr; 1655 pcPicYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr); 1656 TComDataCU *pColCU = pcPicYuvBaseCol->getCtu( uiLCUAddr ); 1672 1657 if( pcCU->getSlice()->isInterB() && !pcCU->getSlice()->getIsDepth() ) 1673 1658 { … … 1714 1699 Int iCurrTRefPoc; 1715 1700 bTMVAvai = ( eBaseList != eRefPicList ) && ( pcCU->getSlice()->getViewIndex() != pcCU->getSlice()->getRefPic( eOtherRefList, iOtherRefIdx )->getViewIndex() ); 1716 1717 1701 if ( bTMVAvai ) 1718 1702 { 1719 if( xCheckBiInterviewARP( pcCU, uiPartAddr, iWidth, iHeight, eBaseList, pcPicYuvCurrTRef, cBaseTMV, iCurrTRefPoc ) ) 1703 if( xCheckBiInterviewARP( pcCU, uiPartAddr, iWidth, iHeight, eBaseList, pcPicYuvCurrTRef, cBaseTMV, iCurrTRefPoc ) ) 1720 1704 { 1721 1705 pcPicYuvBaseTRef = pcCU->getSlice()->getBaseViewRefPic( iCurrTRefPoc, pcPicYuvBaseCol->getViewIndex() ); … … 1740 1724 RefPicList eRefPicListCurr = RefPicList(iList); 1741 1725 Int iRef = pColCU->getCUMvField(eRefPicListCurr)->getRefIdx(uiAbsPartAddr); 1742 if( iRef != -1 )1726 if( iRef != -1 && pcCU->getSlice()->getArpRefPicAvailable( eRefPicListCurr, pcPicYuvBaseCol->getViewIndex())) 1743 1727 { 1744 1728 pcPicYuvBaseTRef = pColCU->getSlice()->getRefPic(eRefPicListCurr, iRef); … … 1774 1758 } 1775 1759 1776 xPredInterLumaBlk ( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 && bTMVAvai ), bTMVAvai); 1777 xPredInterChromaBlk( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 && bTMVAvai ), bTMVAvai); 1778 1779 if( dW > 0 && bTMVAvai ) 1780 { 1760 for (UInt comp=COMPONENT_Y; comp< rpcYuvPred->getNumberValidComponents(); comp++) 1761 { 1762 const ComponentID compID=ComponentID(comp); 1763 xPredInterBlk ( compID, pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 && bTMVAvai ), pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), bTMVAvai ); 1764 } 1765 1766 if( dW > 0 ) 1767 { 1768 assert ( bTMVAvai ); 1781 1769 TComYuv* pYuvCurrTRef = &m_acYuvPredBase[0]; 1782 1770 TComYuv* pYuvBaseTRef = &m_acYuvPredBase[1]; … … 1792 1780 pYuvCurrTRef->clear(); pYuvBaseTRef->clear(); 1793 1781 } 1794 xPredInterLumaBlk ( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true, true); 1795 1796 if (iWidth > 8) 1797 xPredInterChromaBlk( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true, true); 1798 1799 xPredInterLumaBlk ( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv, iWidth, iHeight, pYuvBaseTRef, true, true); 1800 1801 if (iWidth > 8) 1802 xPredInterChromaBlk( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv, iWidth, iHeight, pYuvBaseTRef, true, true); 1782 1783 UInt uiCompNum = ( iWidth > 8 ) ? 3: 1; 1784 for (UInt comp=COMPONENT_Y; comp< uiCompNum; comp++) 1785 { 1786 const ComponentID compID=ComponentID(comp); 1787 xPredInterBlk ( compID, pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), true ); 1788 xPredInterBlk ( compID, pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv, iWidth, iHeight, pYuvBaseTRef, true, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), true ); 1789 } 1803 1790 1804 1791 pYuvCurrTRef->subtractARP( pYuvCurrTRef , pYuvBaseTRef , uiPartAddr , iWidth , iHeight ); … … 1807 1794 pYuvCurrTRef->multiplyARP( uiPartAddr , iWidth , iHeight , dW ); 1808 1795 } 1809 rpcYuvPred->addARP( rpcYuvPred , pYuvCurrTRef , uiPartAddr , iWidth , iHeight , !bi );1796 rpcYuvPred->addARP( rpcYuvPred , pYuvCurrTRef , uiPartAddr , iWidth , iHeight , !bi, pcCU->getSlice()->getSPS()->getBitDepths() ); 1810 1797 } 1811 1798 } … … 1907 1894 1908 1895 Void TComPrediction::xPredInterBlk(const ComponentID compID, TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *dstPic, Bool bi, const Int bitDepth 1909 #if H_3D_ARP1896 #if NH_3D_ARP 1910 1897 , Bool filterType 1911 1898 #endif … … 1951 1938 m_if.filterHor(compID, ref, refStride, dst, dstStride, cxWidth, cxHeight, xFrac, !bi, chFmt, bitDepth 1952 1939 #endif 1953 #if H_3D_ARP1940 #if NH_3D_ARP 1954 1941 , filterType 1955 1942 #endif 1956 );1943 ); 1957 1944 } 1958 1945 else if ( xFrac == 0 ) … … 1963 1950 m_if.filterVer(compID, ref, refStride, dst, dstStride, cxWidth, cxHeight, yFrac, true, !bi, chFmt, bitDepth 1964 1951 #endif 1965 #if H_3D_ARP1952 #if NH_3D_ARP 1966 1953 , filterType 1967 1954 #endif 1968 );1955 ); 1969 1956 } 1970 1957 else … … 1976 1963 1977 1964 m_if.filterHor(compID, ref - ((vFilterSize>>1) -1)*refStride, refStride, tmp, tmpStride, cxWidth, cxHeight+vFilterSize-1, xFrac, false, chFmt, bitDepth 1978 #if H_3D_ARP1965 #if N_3D_ARP 1979 1966 , filterType 1980 1967 #endif 1981 );1968 ); 1982 1969 #if H_3D_IC 1983 1970 m_if.filterVerLuma(tmp + (halfFilterSize-1)*tmpStride, tmpStride, dst, dstStride, width, height, yFrac, false, !bi || bICFlag … … 1985 1972 m_if.filterVer(compID, tmp + ((vFilterSize>>1) -1)*tmpStride, tmpStride, dst, dstStride, cxWidth, cxHeight, yFrac, false, !bi, chFmt, bitDepth 1986 1973 #endif 1987 #if H_3D_ARP1974 #if NH_3D_ARP 1988 1975 , filterType 1989 1976 #endif 1990 );1977 ); 1991 1978 } 1992 1979 … … 2028 2015 } 2029 2016 2030 2031 #if H_3D_ARP2032 , Bool filterType2033 #endif2034 2017 #if H_3D_IC 2035 2018 , Bool bICFlag … … 2039 2022 #else 2040 2023 #endif 2041 #if H_3D_ARP2042 , filterType2043 #endif2044 2024 #if H_3D_IC 2045 2025 m_if.filterHorChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, xFrac, !bi || bICFlag 2046 2026 #else 2047 2027 #endif 2048 #if H_3D_ARP2049 , filterType2050 #endif2051 2028 #if H_3D_IC 2052 2029 m_if.filterVerChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, yFrac, true, !bi || bICFlag 2053 2030 #else 2054 2031 #endif 2055 #if H_3D_ARP2056 , filterType2057 #endif2058 2032 #if H_3D_IC 2059 2033 m_if.filterVerChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, yFrac, true, !bi || bICFlag 2060 2034 #else 2061 #endif 2062 #if H_3D_ARP 2063 , filterType 2064 #endif 2065 #if H_3D_ARP 2066 , filterType 2067 #endif 2035 #endif 2068 2036 #if H_3D_IC 2069 2037 m_if.filterVerChroma(extY + (halfFilterSize-1)*extStride, extStride, dstCb, dstStride, cxWidth, cxHeight , yFrac, false, !bi || bICFlag 2070 2038 #else 2071 2039 #endif 2072 #if H_3D_ARP2073 , filterType2074 #endif2075 #if H_3D_ARP2076 , filterType2077 #endif2078 2040 #if H_3D_IC 2079 2041 m_if.filterVerChroma(extY + (halfFilterSize-1)*extStride, extStride, dstCr, dstStride, cxWidth, cxHeight , yFrac, false, !bi || bICFlag 2080 2042 #else 2081 2043 #endif 2082 #if H_3D_ARP2083 , filterType2084 #endif2085 2044 #if H_3D_IC 2086 2045 if( bICFlag ) -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/TComPrediction.h
r1222 r1262 44 44 #include "TComInterpolationFilter.h" 45 45 #include "TComWeightPrediction.h" 46 46 #if NH_3D_ARP 47 #include "TComPic.h" 48 #endif 47 49 // forward declaration 48 50 class TComMv; … … 77 79 TComYuv m_acYuvPred[NUM_REF_PIC_LIST_01]; 78 80 TComYuv m_cYuvPredTemp; 79 #if H_3D_ARP81 #if NH_3D_ARP 80 82 TComYuv m_acYuvPredBase[2]; 81 83 #endif … … 100 102 101 103 // motion compensation functions 102 #if H_3D_ARP103 Void xPredInterUniARP ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi =false, TComMvField * pNewMvFiled = NULL);104 Bool xCheckBiInterviewARP ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eBaseRefPicList, TComPic*& pcPicYuvCurrTRef, TComMv& cBaseTMV, Int& iCurrTRefPoc);105 Void xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled = NULL );104 #if NH_3D_ARP 105 Void xPredInterUniARP ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi ); 106 Void xPredInterUniARPviewRef ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi ); 107 Bool xCheckBiInterviewARP ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eBaseRefPicList, TComPic*& pcPicYuvCurrTRef, TComMv& cBaseTMV, Int& iCurrTRefPoc ); 106 108 #endif 107 109 … … 114 116 115 117 Void xPredInterBlk(const ComponentID compID, TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *dstPic, Bool bi, const Int bitDepth 116 #if H_3D_ARP118 #if NH_3D_ARP 117 119 , Bool filterType = false 118 120 #endif … … 122 124 ); 123 125 124 #if H_3D_ARP 125 , Bool filterType = false 126 #endif 126 127 127 #if H_3D_IC 128 128 , Bool bICFlag = false -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/TComSlice.cpp
r1246 r1262 1996 1996 m_dimensionId[i][j] = 0; 1997 1997 } 1998 #if H_3D_ARP1998 #if NH_3D_ARP 1999 1999 #endif 2000 2000 } … … 3621 3621 #endif 3622 3622 3623 #if H_3D_ARP3623 #if NH_3D_ARP 3624 3624 Void TComSlice::setARPStepNum( TComPicLists*ivPicLists ) 3625 3625 { … … 3688 3688 m_arpRefPicAvailable[eRefPicList][layerIdInNuh] = false; 3689 3689 } 3690 } 3691 } 3692 } 3693 if( m_nARPStepNum > 1) 3694 { 3695 for(Int i = 0; i < getNumActiveRefLayerPics(); i ++ ) 3696 { 3697 Int iLayerId = getRefPicLayerId( i ); 3698 Int iViewIdx = getVPS()->getViewIndex(iLayerId); 3699 Bool bIsDepth = ( getVPS()->getDepthId ( iLayerId ) == 1 ); 3700 if( iViewIdx<getViewIndex() && !bIsDepth ) 3701 { 3702 setBaseViewRefPicList( ivPicLists->getPicList( iLayerId ), iViewIdx ); 3690 3703 } 3691 3704 } -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/TComSlice.h
r1210 r1262 2594 2594 Int m_aiAlterRefIdx [2]; 2595 2595 #endif 2596 #if H_3D_ARP2596 #if NH_3D_ARP 2597 2597 Bool m_arpRefPicAvailable[2][MAX_NUM_LAYERS]; 2598 2598 TComList<TComPic*> * m_pBaseViewRefPicList[MAX_NUM_LAYERS]; … … 2718 2718 Bool getIcSkipParseFlag() { return m_icSkipParseFlag; } 2719 2719 #endif 2720 #if H_3D_ARP2720 #if NH_3D_ARP 2721 2721 Void setBaseViewRefPicList( TComList<TComPic*> *pListPic, Int iViewIdx ) { m_pBaseViewRefPicList[iViewIdx] = pListPic; } 2722 2722 Void setARPStepNum( TComPicLists*ivPicLists ); … … 2925 2925 Int getAlterRefIdx ( RefPicList e ) { return m_aiAlterRefIdx[e]; } 2926 2926 #endif 2927 #if H_3D_ARP2927 #if NH_3D_ARP 2928 2928 Int getFirstTRefIdx ( RefPicList e ) { return m_aiFirstTRefIdx[e]; } 2929 2929 Void setFirstTRefIdx ( RefPicList e, Int i ) { m_aiFirstTRefIdx[e] = i; } -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/TComYuv.cpp
r1200 r1262 487 487 } 488 488 489 #if H_3D_ARP490 Void TComYuv::addARP( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip )491 { 492 addARPLuma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth , uiHeight , bClip );493 addARPChroma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth>>1, uiHeight>>1 , bClip );494 } 495 496 Void TComYuv::addARPLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip )489 #if NH_3D_ARP 490 Void TComYuv::addARP( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip, const BitDepths &clipBitDepths ) 491 { 492 addARPLuma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth , uiHeight , bClip , clipBitDepths); 493 addARPChroma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth>>1, uiHeight>>1 , bClip , clipBitDepths); 494 } 495 496 Void TComYuv::addARPLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip, const BitDepths &clipBitDepths ) 497 497 { 498 498 Int x, y; 499 499 500 Pel* pSrc0 = pcYuvSrc0->getLumaAddr( uiAbsPartIdx ); 501 Pel* pSrc1 = pcYuvSrc1->getLumaAddr( uiAbsPartIdx ); 502 Pel* pDst = getLumaAddr( uiAbsPartIdx ); 503 504 UInt iSrc0Stride = pcYuvSrc0->getStride(); 505 UInt iSrc1Stride = pcYuvSrc1->getStride(); 506 UInt iDstStride = getStride(); 507 Int iIFshift = IF_INTERNAL_PREC - g_bitDepthY; 500 Pel* pSrc0 = pcYuvSrc0->getAddr( COMPONENT_Y, uiAbsPartIdx ); 501 Pel* pSrc1 = pcYuvSrc1->getAddr( COMPONENT_Y, uiAbsPartIdx ); 502 Pel* pDst = getAddr( COMPONENT_Y, uiAbsPartIdx ); 503 504 UInt iSrc0Stride = pcYuvSrc0->getStride(COMPONENT_Y); 505 UInt iSrc1Stride = pcYuvSrc1->getStride(COMPONENT_Y); 506 UInt iDstStride = getStride(COMPONENT_Y); 507 const Int clipbd = clipBitDepths.recon[CHANNEL_TYPE_LUMA]; 508 Int iIFshift = IF_INTERNAL_PREC - clipbd; 508 509 Int iOffSet = ( 1 << ( iIFshift - 1 ) ) + IF_INTERNAL_OFFS; 510 509 511 for ( y = uiHeight-1; y >= 0; y-- ) 510 512 { … … 514 516 if( bClip ) 515 517 { 516 pDst[x] = ClipY( ( pDst[x] + iOffSet ) >> iIFshift);518 pDst[x] = Pel(ClipBD<Int>(Int( ( pDst[x] + iOffSet ) >> iIFshift ), clipbd)); 517 519 } 518 520 } … … 523 525 } 524 526 525 Void TComYuv::addARPChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip )527 Void TComYuv::addARPChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip, const BitDepths &clipBitDepths ) 526 528 { 527 529 Int x, y; 528 530 529 Pel* pSrcU0 = pcYuvSrc0->getCbAddr( uiAbsPartIdx ); 530 Pel* pSrcU1 = pcYuvSrc1->getCbAddr( uiAbsPartIdx ); 531 Pel* pSrcV0 = pcYuvSrc0->getCrAddr( uiAbsPartIdx ); 532 Pel* pSrcV1 = pcYuvSrc1->getCrAddr( uiAbsPartIdx ); 533 Pel* pDstU = getCbAddr( uiAbsPartIdx ); 534 Pel* pDstV = getCrAddr( uiAbsPartIdx ); 535 536 UInt iSrc0Stride = pcYuvSrc0->getCStride(); 537 UInt iSrc1Stride = pcYuvSrc1->getCStride(); 538 UInt iDstStride = getCStride(); 539 540 Int iIFshift = IF_INTERNAL_PREC - g_bitDepthC; 531 Pel* pSrcU0 = pcYuvSrc0->getAddr( COMPONENT_Cb, uiAbsPartIdx ); 532 Pel* pSrcU1 = pcYuvSrc1->getAddr( COMPONENT_Cb, uiAbsPartIdx ); 533 Pel* pSrcV0 = pcYuvSrc0->getAddr( COMPONENT_Cr, uiAbsPartIdx ); 534 Pel* pSrcV1 = pcYuvSrc1->getAddr( COMPONENT_Cr, uiAbsPartIdx ); 535 Pel* pDstU = getAddr( COMPONENT_Cb, uiAbsPartIdx ); 536 Pel* pDstV = getAddr( COMPONENT_Cr, uiAbsPartIdx ); 537 538 UInt iSrc0StrideCb = pcYuvSrc0->getStride(COMPONENT_Cb); 539 UInt iSrc1StrideCb = pcYuvSrc1->getStride(COMPONENT_Cb); 540 UInt iDstStrideCb = getStride(COMPONENT_Cb); 541 542 UInt iSrc0StrideCr = pcYuvSrc0->getStride(COMPONENT_Cr); 543 UInt iSrc1StrideCr = pcYuvSrc1->getStride(COMPONENT_Cr); 544 UInt iDstStrideCr = getStride(COMPONENT_Cr); 545 546 const Int clipbd = clipBitDepths.recon[CHANNEL_TYPE_CHROMA]; 547 Int iIFshift = IF_INTERNAL_PREC - clipbd; 541 548 Int iOffSet = ( 1 << ( iIFshift - 1 ) ) + IF_INTERNAL_OFFS; 542 549 … … 549 556 if( bClip ) 550 557 { 551 pDstU[x] = ClipC( ( pDstU[x] + iOffSet ) >> iIFshift ); 552 pDstV[x] = ClipC( ( pDstV[x] + iOffSet ) >> iIFshift ); 553 } 554 } 555 558 pDstU[x] = Pel(ClipBD<Int>( Int( ( pDstU[x] + iOffSet ) >> iIFshift ), clipbd)); 559 pDstV[x] = Pel(ClipBD<Int>( Int( ( pDstV[x] + iOffSet ) >> iIFshift ), clipbd)); 560 } 561 } 562 563 pSrcU0 += iSrc0StrideCb; 564 pSrcU1 += iSrc1StrideCb; 565 pSrcV0 += iSrc0StrideCr; 566 pSrcV1 += iSrc1StrideCr; 567 pDstU += iDstStrideCb; 568 pDstV += iDstStrideCr; 569 } 570 } 571 572 Void TComYuv::subtractARP( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight ) 573 { 574 subtractARPLuma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth , uiHeight ); 575 576 if (uiWidth > 8 && pcYuvSrc1->getNumberValidComponents() > 1) 577 { 578 subtractARPChroma( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth>>1 , uiHeight>>1 ); 579 } 580 } 581 582 Void TComYuv::subtractARPLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight ) 583 { 584 Int x, y; 585 586 Pel* pSrc0 = pcYuvSrc0->getAddr(COMPONENT_Y, uiAbsPartIdx ); 587 Pel* pSrc1 = pcYuvSrc1->getAddr(COMPONENT_Y, uiAbsPartIdx ); 588 Pel* pDst = getAddr (COMPONENT_Y, uiAbsPartIdx ); 589 590 Int iSrc0Stride = pcYuvSrc0->getStride(COMPONENT_Y); 591 Int iSrc1Stride = pcYuvSrc1->getStride(COMPONENT_Y); 592 Int iDstStride = getStride(COMPONENT_Y); 593 for ( y = uiHeight-1; y >= 0; y-- ) 594 { 595 for ( x = uiWidth-1; x >= 0; x-- ) 596 { 597 pDst[x] = pSrc0[x] - pSrc1[x]; 598 } 599 pSrc0 += iSrc0Stride; 600 pSrc1 += iSrc1Stride; 601 pDst += iDstStride; 602 } 603 } 604 605 Void TComYuv::subtractARPChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight ) 606 { 607 Int x, y; 608 609 Pel* pSrcU0 = pcYuvSrc0->getAddr(COMPONENT_Cb, uiAbsPartIdx ); 610 Pel* pSrcU1 = pcYuvSrc1->getAddr(COMPONENT_Cb, uiAbsPartIdx ); 611 Pel* pSrcV0 = pcYuvSrc0->getAddr(COMPONENT_Cr, uiAbsPartIdx ); 612 Pel* pSrcV1 = pcYuvSrc1->getAddr(COMPONENT_Cr, uiAbsPartIdx ); 613 Pel* pDstU = getAddr(COMPONENT_Cb, uiAbsPartIdx ); 614 Pel* pDstV = getAddr(COMPONENT_Cr, uiAbsPartIdx ); 615 616 Int iSrc0Stride = pcYuvSrc0->getStride(COMPONENT_Cb); 617 Int iSrc1Stride = pcYuvSrc1->getStride(COMPONENT_Cb); 618 Int iDstStride = getStride( COMPONENT_Cb ); 619 for ( y = uiHeight-1; y >= 0; y-- ) 620 { 621 for ( x = uiWidth-1; x >= 0; x-- ) 622 { 623 pDstU[x] = pSrcU0[x] - pSrcU1[x]; 624 pDstV[x] = pSrcV0[x] - pSrcV1[x]; 625 } 556 626 pSrcU0 += iSrc0Stride; 557 627 pSrcU1 += iSrc1Stride; … … 563 633 } 564 634 565 Void TComYuv::subtractARP( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight )566 {567 subtractARPLuma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth , uiHeight );568 569 if (uiWidth > 8)570 subtractARPChroma( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth>>1 , uiHeight>>1 );571 }572 573 Void TComYuv::subtractARPLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight )574 {575 Int x, y;576 577 Pel* pSrc0 = pcYuvSrc0->getLumaAddr( uiAbsPartIdx );578 Pel* pSrc1 = pcYuvSrc1->getLumaAddr( uiAbsPartIdx );579 Pel* pDst = getLumaAddr( uiAbsPartIdx );580 581 Int iSrc0Stride = pcYuvSrc0->getStride();582 Int iSrc1Stride = pcYuvSrc1->getStride();583 Int iDstStride = getStride();584 for ( y = uiHeight-1; y >= 0; y-- )585 {586 for ( x = uiWidth-1; x >= 0; x-- )587 {588 pDst[x] = pSrc0[x] - pSrc1[x];589 }590 pSrc0 += iSrc0Stride;591 pSrc1 += iSrc1Stride;592 pDst += iDstStride;593 }594 }595 596 Void TComYuv::subtractARPChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight )597 {598 Int x, y;599 600 Pel* pSrcU0 = pcYuvSrc0->getCbAddr( uiAbsPartIdx );601 Pel* pSrcU1 = pcYuvSrc1->getCbAddr( uiAbsPartIdx );602 Pel* pSrcV0 = pcYuvSrc0->getCrAddr( uiAbsPartIdx );603 Pel* pSrcV1 = pcYuvSrc1->getCrAddr( uiAbsPartIdx );604 Pel* pDstU = getCbAddr( uiAbsPartIdx );605 Pel* pDstV = getCrAddr( uiAbsPartIdx );606 607 Int iSrc0Stride = pcYuvSrc0->getCStride();608 Int iSrc1Stride = pcYuvSrc1->getCStride();609 Int iDstStride = getCStride();610 for ( y = uiHeight-1; y >= 0; y-- )611 {612 for ( x = uiWidth-1; x >= 0; x-- )613 {614 pDstU[x] = pSrcU0[x] - pSrcU1[x];615 pDstV[x] = pSrcV0[x] - pSrcV1[x];616 }617 pSrcU0 += iSrc0Stride;618 pSrcU1 += iSrc1Stride;619 pSrcV0 += iSrc0Stride;620 pSrcV1 += iSrc1Stride;621 pDstU += iDstStride;622 pDstV += iDstStride;623 }624 }625 626 635 Void TComYuv::multiplyARP( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW ) 627 636 { 628 637 multiplyARPLuma( uiAbsPartIdx , uiWidth , uiHeight , dW ); 629 638 630 if (uiWidth > 8) 639 if ( uiWidth > 8 && getNumberValidComponents() > 1 ) 640 { 631 641 multiplyARPChroma( uiAbsPartIdx , uiWidth >> 1 , uiHeight >> 1 , dW ); 642 } 632 643 } 633 644 … … 641 652 Void TComYuv::multiplyARPLuma( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW ) 642 653 { 643 Pel* pDst = get LumaAddr(uiAbsPartIdx );644 Int iDstStride = getStride( );654 Pel* pDst = getAddr(COMPONENT_Y, uiAbsPartIdx ); 655 Int iDstStride = getStride(COMPONENT_Y); 645 656 for ( Int y = uiHeight-1; y >= 0; y-- ) 646 657 { … … 652 663 Void TComYuv::multiplyARPChroma( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW ) 653 664 { 654 Pel* pDstU = get CbAddr(uiAbsPartIdx );655 Pel* pDstV = get CrAddr(uiAbsPartIdx );656 657 Int iDstStride = get CStride();665 Pel* pDstU = getAddr( COMPONENT_Cb, uiAbsPartIdx ); 666 Pel* pDstV = getAddr( COMPONENT_Cr, uiAbsPartIdx ); 667 668 Int iDstStride = getStride( COMPONENT_Cb ); 658 669 for ( Int y = uiHeight-1; y >= 0; y-- ) 659 670 { -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/TComYuv.h
r1200 r1262 206 206 #if NH_3D 207 207 Void addClipPartLuma( Int bitDepth, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize ); 208 #if H_3D_ARP209 Void addARP ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip );210 Void addARPLuma ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip );211 Void addARPChroma ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip );208 #if NH_3D_ARP 209 Void addARP ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip, const BitDepths &clipBitDepths ); 210 Void addARPLuma ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip, const BitDepths &clipBitDepths ); 211 Void addARPChroma ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip, const BitDepths &clipBitDepths ); 212 212 Void subtractARP ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight ); 213 213 Void subtractARPLuma ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight ); -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibCommon/TypeDef.h
r1222 r1262 73 73 74 74 #define NH_3D_DBBP 1 75 #define TEST 0 76 #define BUF_FIX 1 77 #define NH_3D_ARP 1 // Advanced residual prediction (ARP), JCT3V-D0177 78 // QC_MTK_INTERVIEW_ARP_F0123_F0108 JCT3V-F0123; JCT3V-F0108 79 // SHARP_ARP_REF_CHECK_F0105 ARP reference picture selection and DPB check 80 // LGE_ARP_CTX_F0161 JCT3V-F0161 81 // MTK_ARP_FLAG_CABAC_SIMP_G0061 Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061 82 // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053 83 // MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085 Align the SW and WD for the bi-prediction ARP PUs by disallowing non-normative fast bi-prediction for ARP PUs, JCT3V-H0085 84 // QC_I0051_ARP_SIMP 85 // SHARP_ARP_CHROMA_I0104 86 // MTK_I0072_IVARP_SCALING_FIX 87 // SEC_ARP_VIEW_REF_CHECK_J0037 Signaling iv_res_pred_weight_idx when the current slice has both view and temporal reference picture(s), JCT3V-J0037 item1 88 // SEC_ARP_REM_ENC_RESTRICT_K0035 Removal of encoder restriction of ARP, JCT3V-K0035 75 89 #endif 76 90 … … 101 115 // MTK_TEXTURE_MRGCAND_BUGFIX_E0182 Bug fix for TEXTURE MERGING CANDIDATE , JCT3V-E0182 102 116 // LGE_SIMP_DISP_AVAIL_J0041 // Use 2 status for disparity availability - DISP_AVAILABLE and DISP_NONE 103 #define H_3D_ARP 1 // Advanced residual prediction (ARP), JCT3V-D0177104 // QC_MTK_INTERVIEW_ARP_F0123_F0108 JCT3V-F0123; JCT3V-F0108105 // SHARP_ARP_REF_CHECK_F0105 ARP reference picture selection and DPB check106 // LGE_ARP_CTX_F0161 JCT3V-F0161107 // MTK_ARP_FLAG_CABAC_SIMP_G0061 Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061108 // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053109 // MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085 Align the SW and WD for the bi-prediction ARP PUs by disallowing non-normative fast bi-prediction for ARP PUs, JCT3V-H0085110 // QC_I0051_ARP_SIMP111 // SHARP_ARP_CHROMA_I0104112 // MTK_I0072_IVARP_SCALING_FIX113 // SEC_ARP_VIEW_REF_CHECK_J0037 Signaling iv_res_pred_weight_idx when the current slice has both view and temporal reference picture(s), JCT3V-J0037 item1114 // SEC_ARP_REM_ENC_RESTRICT_K0035 Removal of encoder restriction of ARP, JCT3V-K0035115 117 #define H_3D_IC 1 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060 116 118 // Unifying rounding offset, for IC part, JCT3V-D0135 … … 297 299 #endif 298 300 ///// ***** ADVANCED INTERVIEW RESIDUAL PREDICTION ********* 299 #if H_3D_ARP301 #if NH_3D_ARP 300 302 #define H_3D_ARP_WFNR 3 301 303 #endif -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1246 r1262 3376 3376 } 3377 3377 3378 #if H_3D_ARP3378 #if NH_3D_ARP 3379 3379 Void TDecCavlc::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 3380 3380 { -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.h
r1222 r1262 117 117 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 118 118 Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex ); 119 #if H_3D_ARP119 #if NH_3D_ARP 120 120 Void parseARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 121 121 #endif -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibDecoder/TDecCu.cpp
r1246 r1262 293 293 if(!pcCU->getSlice()->isIntra()) 294 294 { 295 #if H_3D_ARP && H_3D_IV_MERGE295 #if NH_3D_ARP && H_3D_IV_MERGE 296 296 if( pcCU->getSlice()->getIvResPredFlag() || pcCU->getSlice()->getIvMvPredFlag() ) 297 297 #else 298 #if H_3D_ARP299 if( pcCU->getSlice()->get VPS()->getUseAdvRP(pcCU->getSlice()->getLayerId()) )298 #if NH_3D_ARP 299 if( pcCU->getSlice()->getIvResPredFlag( ) ) 300 300 #else 301 301 #if H_3D_IV_MERGE … … 399 399 m_pcEntropyDecoder->decodeMergeIndex( pcCU, 0, uiAbsPartIdx, uiDepth ); 400 400 UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx); 401 #if H_3D_ARP401 #if NH_3D_ARP 402 402 m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth ); 403 403 #endif -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.cpp
r1246 r1262 105 105 } 106 106 107 #if H_3D_ARP107 #if NH_3D_ARP 108 108 Void TDecEntropy::decodeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 109 109 { … … 297 297 //decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth ); 298 298 299 #if H_3D_ARP299 #if NH_3D_ARP 300 300 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth ); 301 301 #endif -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.h
r1246 r1262 85 85 virtual Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ) = 0; 86 86 virtual Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex ) = 0; 87 #if H_3D_ARP87 #if NH_3D_ARP 88 88 virtual Void parseARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 89 89 #endif … … 174 174 Void decodePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 175 175 176 #if H_3D_ARP176 #if NH_3D_ARP 177 177 Void decodeARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 178 178 #endif -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibDecoder/TDecSbac.cpp
r1246 r1262 73 73 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 74 74 , m_cCUMergeIdxExtSCModel ( 1, 1, NUM_MERGE_IDX_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 75 #if H_3D_ARP76 , m_cCUPUARPWSCModel ( 1, 1,NUM_ARPW_CTX , m_contextModels + m_numContextModels, m_numContextModels)75 #if NH_3D_ARP 76 , m_cCUPUARPWSCModel ( 1, 1, NUM_ARPW_CTX , m_contextModels + m_numContextModels, m_numContextModels) 77 77 #endif 78 78 #if H_3D_IC … … 164 164 m_cCUMergeFlagExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT ); 165 165 m_cCUMergeIdxExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT ); 166 #if H_3D_ARP167 m_cCUPUARPWSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ARPW );166 #if NH_3D_ARP 167 m_cCUPUARPWSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ARPW ); 168 168 #endif 169 169 #if H_3D_IC … … 240 240 m_cCUDISFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG ); 241 241 m_cCUDISTypeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE ); 242 #endif243 #if H_3D_ARP244 m_cCUPUARPWSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ARPW );245 242 #endif 246 243 #if H_3D_IC … … 2417 2414 } 2418 2415 2419 #if H_3D_ARP2416 #if NH_3D_ARP 2420 2417 Void TDecSbac::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2421 2418 { 2422 UInt uiMaxW = pcCU->getSlice()->getARPStepNum() - 1;2423 2419 UInt uiW = 0; 2424 2420 UInt uiOffset = pcCU->getCTXARPWFlag(uiAbsPartIdx); 2425 2421 UInt uiCode = 0; 2426 2422 2427 assert ( uiMaxW > 0 ); 2428 2429 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 0 + uiOffset ) ); 2423 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 0 + uiOffset ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__ARP_FLAG)); 2430 2424 2431 2425 uiW = uiCode; 2432 2426 if( 1 == uiW ) 2433 2427 { 2434 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 2 ) );2428 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 2 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__ARP_FLAG)); 2435 2429 uiW += ( 1 == uiCode ? 1 : 0 ); 2436 2430 } … … 2438 2432 DTRACE_CU("iv_res_pred_weight_idx", uiW ) 2439 2433 #endif 2434 2440 2435 pcCU->setARPWSubParts( ( UChar )( uiW ) , uiAbsPartIdx, uiDepth ); 2441 2436 } -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibDecoder/TDecSbac.h
r1222 r1262 139 139 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 140 140 Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex ); 141 #if H_3D_ARP141 #if NH_3D_ARP 142 142 Void parseARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 143 143 #endif … … 190 190 ContextModel3DBuffer m_cCUMergeFlagExtSCModel; 191 191 ContextModel3DBuffer m_cCUMergeIdxExtSCModel; 192 #if H_3D_ARP192 #if NH_3D_ARP 193 193 ContextModel3DBuffer m_cCUPUARPWSCModel; 194 194 #endif -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibDecoder/TDecTop.cpp
r1210 r1262 1145 1145 pcSlice->setDefaultRefView(); 1146 1146 #endif 1147 #if H_3D_ARP1147 #if NH_3D_ARP 1148 1148 pcSlice->setARPStepNum(m_ivPicLists); 1149 if( pcSlice->getARPStepNum() > 1 )1150 {1151 // GT: This seems to be broken, not all nuh_layer_ids are necessarily present1152 for(Int iLayerId = 0; iLayerId < nalu.m_nuhLayerId; iLayerId ++ )1153 {1154 Int iViewIdx = pcSlice->getVPS()->getViewIndex(iLayerId);1155 Bool bIsDepth = ( pcSlice->getVPS()->getDepthId ( iLayerId ) == 1 );1156 if( iViewIdx<getViewIndex() && !bIsDepth )1157 {1158 pcSlice->setBaseViewRefPicList( m_ivPicLists->getPicList( iLayerId ), iViewIdx );1159 }1160 }1161 }1162 1149 #endif 1163 1150 #else -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.cpp
r1222 r1262 2578 2578 } 2579 2579 2580 #if H_3D_ARP2580 #if NH_3D_ARP 2581 2581 Void TEncCavlc::codeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2582 2582 { -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.h
r1222 r1262 126 126 Void codeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 127 127 Void codeMergeIndex ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 128 #if H_3D_ARP128 #if NH_3D_ARP 129 129 Void codeARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 130 130 #endif -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp
r1246 r1262 68 68 m_ppcTempCU = new TComDataCU*[m_uhTotalDepth-1]; 69 69 70 #if H_3D_ARP70 #if NH_3D_ARP 71 71 m_ppcWeightedTempCU = new TComDataCU*[m_uhTotalDepth-1]; 72 72 #endif … … 92 92 m_ppcBestCU[i] = new TComDataCU; m_ppcBestCU[i]->create( chromaFormat, uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) ); 93 93 m_ppcTempCU[i] = new TComDataCU; m_ppcTempCU[i]->create( chromaFormat, uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) ); 94 #if H_3D_ARP95 m_ppcWeightedTempCU[i] = new TComDataCU; m_ppcWeightedTempCU[i]->create( uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) );94 #if NH_3D_ARP 95 m_ppcWeightedTempCU[i] = new TComDataCU; m_ppcWeightedTempCU[i]->create( chromaFormat, uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) ); 96 96 #endif 97 97 … … 146 146 m_ppcTempCU[i]->destroy(); delete m_ppcTempCU[i]; m_ppcTempCU[i] = NULL; 147 147 } 148 #if H_3D_ARP148 #if NH_3D_ARP 149 149 if(m_ppcWeightedTempCU[i]) 150 150 { … … 198 198 } 199 199 200 #if H_3D_ARP200 #if NH_3D_ARP 201 201 if(m_ppcWeightedTempCU) 202 202 { … … 279 279 m_ppcBestCU[0]->initCtu( pCtu->getPic(), pCtu->getCtuRsAddr() ); 280 280 m_ppcTempCU[0]->initCtu( pCtu->getPic(), pCtu->getCtuRsAddr() ); 281 282 #if NH_3D_ARP 283 m_ppcWeightedTempCU[0]->initCtu( pCtu->getPic(), pCtu->getCtuRsAddr() ); 284 #endif 281 285 282 286 #if KWU_RC_MADPRED_E0227 … … 587 591 if( rpcTempCU->getSlice()->getSliceType() != I_SLICE ) 588 592 { 589 #if H_3D_ARP && H_3D_IV_MERGE593 #if NH_3D_ARP && H_3D_IV_MERGE 590 594 if( rpcTempCU->getSlice()->getIvResPredFlag() || rpcTempCU->getSlice()->getIvMvPredFlag() ) 591 595 #else 592 #if H_3D_ARP593 if( rpcTempCU->getSlice()->get VPS()->getUseAdvRP(rpcTempCU->getSlice()->getLayerId()) )596 #if NH_3D_ARP 597 if( rpcTempCU->getSlice()->getIvResPredFlag() ) 594 598 #else 595 599 #if H_3D_IV_MERGE … … 1272 1276 TComDataCU* pcSubTempPartCU = m_ppcTempCU[uhNextDepth]; 1273 1277 DEBUG_STRING_NEW(sTempDebug) 1274 1278 #if NH_3D_ARP 1279 m_ppcWeightedTempCU[uhNextDepth]->setSlice( m_ppcWeightedTempCU[ uiDepth]->getSlice()); 1280 m_ppcWeightedTempCU[uhNextDepth]->setPic ( m_ppcWeightedTempCU[ uiDepth] ); 1281 #endif 1275 1282 for ( UInt uiPartUnitIdx = 0; uiPartUnitIdx < 4; uiPartUnitIdx++ ) 1276 1283 { … … 1578 1585 1579 1586 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx ); 1580 #if H_3D_ARP1587 #if NH_3D_ARP 1581 1588 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx ); 1582 1589 #endif … … 1621 1628 m_pcEntropyCoder->encodeSDCFlag( pcCU, uiAbsPartIdx, false ); 1622 1629 #endif 1623 #if H_3D_ARP1630 #if NH_3D_ARP 1624 1631 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx ); 1625 1632 #endif … … 1795 1802 #endif 1796 1803 1797 #if H_3D_ARP1804 #if NH_3D_ARP 1798 1805 DisInfo cOrigDisInfo = rpcTempCU->getDvInfo(0); 1799 1806 #else … … 1802 1809 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to CTU level 1803 1810 #if H_3D_VSP 1804 #if ! H_3D_ARP1811 #if !NH_3D_ARP 1805 1812 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 1806 1813 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); … … 1832 1839 Int mergeCandBuffer[MRG_MAX_NUM_CANDS]; 1833 1840 #endif 1834 #if H_3D_ARP 1835 for( UInt ui = 0; ui < rpcTempCU->getSlice()->getMaxNumMergeCand(); ++ui ) 1836 #else 1841 1837 1842 for( UInt ui = 0; ui < numValidMergeCand; ++ui ) 1838 #endif1839 1840 1843 { 1841 1844 mergeCandBuffer[ui] = 0; … … 1855 1858 DEBUG_STRING_NEW(bestStr) 1856 1859 1857 #if H_3D_ARP1860 #if NH_3D_ARP 1858 1861 Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1; 1862 #if H_3D_IC 1859 1863 if( nARPWMax < 0 || bICFlag ) 1864 #else 1865 if( nARPWMax < 0 ) 1866 #endif 1860 1867 { 1861 1868 nARPWMax = 0; 1862 1869 } 1863 for( Int nARPW=nARPWMax; nARPW >= 0 ; nARPW-- ) 1864 { 1865 memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS_MEM*sizeof(Int) ); 1866 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level 1867 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 1870 for( Int nARPW = nARPWMax; nARPW >= 0 ; nARPW-- ) 1871 { 1872 #if NH_3D_IV_MERGE 1873 memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS_MEM * sizeof(Int) ); 1874 #else 1875 memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS * sizeof(Int) ); 1876 #endif 1877 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N , 0 , uhDepth ); // interprets depth relative to LCU level 1878 rpcTempCU->setARPWSubParts ( (UChar)nARPW , 0 , uhDepth ); 1868 1879 #if H_3D_IC 1869 1880 rpcTempCU->setICFlagSubParts( bICFlag, 0, 0, uhDepth ); 1870 1881 #endif 1871 1882 rpcTempCU->getDvInfo(0) = cOrigDisInfo; 1872 rpcTempCU->setDvInfoSubParts(cOrigDisInfo, 0, 0,uhDepth );1883 rpcTempCU->setDvInfoSubParts(cOrigDisInfo, 0, uhDepth ); 1873 1884 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 1874 1885 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); … … 1897 1908 , numValidMergeCand 1898 1909 ); 1899 1900 #else 1901 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag, numValidMergeCand ); 1910 #else 1911 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); 1902 1912 #endif 1903 1913 … … 1929 1939 rpcTempCU->setICFlagSubParts( bICFlag, 0, 0, uhDepth ); 1930 1940 #endif 1931 #if H_3D_ARP1932 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );1933 #endif1934 1941 rpcTempCU->setCUTransquantBypassSubParts( bTransquantBypassFlag, 0, uhDepth ); 1935 1942 rpcTempCU->setChromaQpAdjSubParts( bTransquantBypassFlag ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uhDepth ); … … 1937 1944 rpcTempCU->setMergeFlagSubParts( true, 0, 0, uhDepth ); // interprets depth relative to CTU level 1938 1945 rpcTempCU->setMergeIndexSubParts( uiMergeCand, 0, 0, uhDepth ); // interprets depth relative to CTU level 1946 #if NH_3D_ARP 1947 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 1948 #endif 1939 1949 #if H_3D_VSP 1940 1950 rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth ); … … 2112 2122 2113 2123 rpcTempCU->initEstData( uhDepth, orgQP, bTransquantBypassFlag ); 2114 2115 2124 if( m_pcEncCfg->getUseFastDecisionForMerge() && !bestIsSkip ) 2116 2125 { … … 2167 2176 delete[] puhInterDirSP; 2168 2177 #endif 2169 #if H_3D_ARP2178 #if NH_3D_ARP 2170 2179 } 2171 2180 #endif … … 2187 2196 2188 2197 // prior to this, rpcTempCU will have just been reset using rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 2189 #if H_3D 2198 #if H_3D || NH_3D_ARP 2190 2199 const Bool bTransquantBypassFlag = rpcTempCU->getCUTransquantBypass(0); 2191 2200 #endif … … 2195 2204 #endif 2196 2205 UChar uhDepth = rpcTempCU->getDepth( 0 ); 2197 #if H_3D_ARP2206 #if NH_3D_ARP 2198 2207 Bool bFirstTime = true; 2199 2208 Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1; 2209 #if H_3D_IC 2200 2210 if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || rpcTempCU->getICFlag(0) ) 2211 #else 2212 if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N ) 2213 #endif 2201 2214 { 2202 2215 nARPWMax = 0; … … 2226 2239 rpcTempCU->setPredModeSubParts ( MODE_INTER, 0, uhDepth ); 2227 2240 rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uhDepth ); 2228 #if H_3D_ARP2229 2230 #endif 2231 #if H_3D_ARP2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2241 #if NH_3D_ARP 2242 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 2243 #endif 2244 #if NH_3D_ARP 2245 if( bFirstTime == false && nARPWMax ) 2246 { 2247 rpcTempCU->copyPartFrom( m_ppcWeightedTempCU[uhDepth] , 0 , uhDepth ); 2248 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 2249 2250 m_pcPredSearch->motionCompensation( rpcTempCU , m_ppcPredYuvTemp[uhDepth] ); 2251 } 2252 else 2253 { 2254 bFirstTime = false; 2242 2255 #endif 2243 2256 #if AMP_MRG … … 2252 2265 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth] ); 2253 2266 #endif 2254 #if H_3D_ARP2255 2256 2257 2258 2259 2267 #if NH_3D_ARP 2268 if( nARPWMax ) 2269 { 2270 m_ppcWeightedTempCU[uhDepth]->copyPartFrom( rpcTempCU , 0 , uhDepth ); 2271 } 2272 } 2260 2273 #endif 2261 2274 … … 2263 2276 if ( !rpcTempCU->getMergeAMP() ) 2264 2277 { 2265 #if H_3D_ARP2266 2267 2268 2269 2270 2278 #if NH_3D_ARP 2279 if( nARPWMax ) 2280 { 2281 continue; 2282 } 2283 else 2271 2284 #endif 2272 2285 return; … … 2380 2393 } 2381 2394 #endif 2382 #if H_3D_ARP2395 #if NH_3D_ARP 2383 2396 } 2384 2397 #endif -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibEncoder/TEncCu.h
r1222 r1262 69 69 TComDataCU** m_ppcBestCU; ///< Best CUs in each depth 70 70 TComDataCU** m_ppcTempCU; ///< Temporary CUs in each depth 71 #if H_3D_ARP71 #if NH_3D_ARP 72 72 TComDataCU** m_ppcWeightedTempCU; 73 73 #endif -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.cpp
r1222 r1262 184 184 #endif 185 185 186 #if H_3D_ARP186 #if NH_3D_ARP 187 187 Void TEncEntropy::encodeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx ) 188 188 { -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.h
r1222 r1262 84 84 virtual Void codeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 85 85 virtual Void codeMergeIndex ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 86 #if H_3D_ARP86 #if NH_3D_ARP 87 87 virtual Void codeARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 88 88 #endif … … 173 173 Void encodeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 174 174 Void encodeMergeIndex ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 175 #if H_3D_ARP175 #if NH_3D_ARP 176 176 Void encodeARPW ( TComDataCU* pcCU, UInt uiAbspartIdx ); 177 177 #endif -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibEncoder/TEncGOP.cpp
r1210 r1262 1474 1474 pcSlice->setDefaultRefView(); 1475 1475 #endif 1476 #if H_3D_ARP1476 #if NH_3D_ARP 1477 1477 //GT: This seems to be broken when layerId in vps is not equal to layerId in nuh 1478 1478 pcSlice->setARPStepNum(m_ivPicLists); 1479 if(pcSlice->getARPStepNum() > 1)1480 {1481 for(Int iLayerId = 0; iLayerId < getLayerId(); iLayerId ++ )1482 {1483 Int iViewIdx = pcSlice->getVPS()->getViewIndex(iLayerId);1484 Bool bIsDepth = ( pcSlice->getVPS()->getDepthId ( iLayerId ) == 1 );1485 if( iViewIdx<getViewIndex() && !bIsDepth )1486 {1487 pcSlice->setBaseViewRefPicList( m_ivPicLists->getPicList( iLayerId ), iViewIdx );1488 }1489 }1490 }1491 1479 #endif 1492 1480 #if H_3D_IC -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibEncoder/TEncSbac.cpp
r1222 r1262 68 68 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 69 69 , m_cCUMergeIdxExtSCModel ( 1, 1, NUM_MERGE_IDX_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 70 #if H_3D_ARP70 #if NH_3D_ARP 71 71 , m_cCUPUARPWSCModel ( 1, 1, NUM_ARPW_CTX , m_contextModels + m_numContextModels, m_numContextModels) 72 72 #endif … … 148 148 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT); 149 149 m_cCUMergeIdxExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT); 150 #if H_3D_ARP150 #if NH_3D_ARP 151 151 m_cCUPUARPWSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ARPW ); 152 152 #endif … … 235 235 curCost += m_cCUMergeFlagExtSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT); 236 236 curCost += m_cCUMergeIdxExtSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_MERGE_IDX_EXT); 237 #if H_3D_ARP237 #if NH_3D_ARP 238 238 curCost += m_cCUPUARPWSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_ARPW ); 239 239 #endif … … 302 302 m_cCUDISTypeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE ); 303 303 #endif 304 #if H_3D_ARP305 m_cCUPUARPWSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ARPW );306 #endif307 304 #if H_3D_IC 308 305 m_cCUICFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_IC_FLAG ); … … 971 968 } 972 969 973 #if H_3D_ARP970 #if NH_3D_ARP 974 971 Void TEncSbac::codeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx ) 975 972 { -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibEncoder/TEncSbac.h
r1222 r1262 140 140 Void codeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 141 141 Void codeMergeIndex ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 142 #if H_3D_ARP142 #if NH_3D_ARP 143 143 Void codeARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 144 144 #endif … … 212 212 ContextModel3DBuffer m_cCUMergeFlagExtSCModel; 213 213 ContextModel3DBuffer m_cCUMergeIdxExtSCModel; 214 #if H_3D_ARP214 #if NH_3D_ARP 215 215 ContextModel3DBuffer m_cCUPUARPWSCModel; 216 216 #endif -
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibEncoder/TEncSearch.cpp
r1222 r1262 5007 5007 if ( pcCU->getSlice()->testWeightPred() && pcCU->getSlice()->getSliceType()==P_SLICE ) 5008 5008 { 5009 xPredInterBlk( COMPONENT_Y, pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, true, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) ); 5009 xPredInterBlk( COMPONENT_Y, pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, true, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) 5010 #if NH_3D_ARP 5011 , false //add this for IC, otherwise, it could be removed 5012 #endif 5013 ); 5010 5014 } 5011 5015 else 5012 5016 { 5013 5017 xPredInterBlk( COMPONENT_Y, pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, false, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) 5014 #if H_3D_ARP5018 #if NH_3D_ARP 5015 5019 , false 5016 5020 #endif … … 5781 5785 m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true); 5782 5786 m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, true ); 5783 #if H_3D_ARP5787 #if NH_3D_ARP 5784 5788 m_pcEntropyCoder->encodeARPW( pcCU, 0 ); 5785 5789 #endif … … 7097 7101 m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true); 7098 7102 m_pcEntropyCoder->encodeMergeIndex(pcCU, 0, true); 7099 #if H_3D_ARP7103 #if NH_3D_ARP 7100 7104 m_pcEntropyCoder->encodeARPW( pcCU, 0 ); 7101 7105 #endif … … 7124 7128 m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true ); 7125 7129 #endif 7126 #if H_3D_ARP7130 #if NH_3D_ARP 7127 7131 m_pcEntropyCoder->encodeARPW( pcCU , 0 ); 7128 7132 #endif
Note: See TracChangeset for help on using the changeset viewer.