Changeset 373 in 3DVCSoftware for branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon
- Timestamp:
- 5 May 2013, 05:25:40 (11 years ago)
- Location:
- branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/ContextTables.h
r332 r373 487 487 #endif 488 488 }; 489 #if QC_ARP_D0177 490 #define NUM_ARPW_CTX 4 ///< number of context models for generalized residual prediction weighting factor 491 static const UChar 492 INIT_ARPW[3][NUM_ARPW_CTX] = 493 { 494 { 154 , 154 , 154 , 154 }, 495 { 154 , 154 , 154 , 154 }, 496 { 154 , 154 , 154 , 154 }, 497 }; 498 #endif 489 499 490 500 #if LGE_EDGE_INTRA_A0070 -
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp
r351 r373 225 225 m_pbResPredFlag = NULL; 226 226 #endif 227 #if QC_ARP_D0177 228 m_puhARPW = NULL; 229 #endif 227 230 #if LGE_EDGE_INTRA_A0070 228 231 m_pucEdgeCode = NULL; … … 301 304 m_pbResPredAvailable = (Bool* )xMalloc(Bool, uiNumPartition); 302 305 m_pbResPredFlag = (Bool* )xMalloc(Bool, uiNumPartition); 306 #if QC_ARP_D0177 307 m_puhARPW = new UChar[ uiNumPartition]; 308 #endif 303 309 #endif 304 310 m_puhLumaIntraDir = (UChar* )xMalloc(UChar, uiNumPartition); … … 463 469 if ( m_pDvInfo ) { xFree(m_pDvInfo); m_pDvInfo = NULL; } 464 470 #endif 471 #if QC_ARP_D0177 472 if ( m_puhARPW ) { delete[] m_puhARPW; m_puhARPW = NULL; } 473 #endif 465 474 if ( m_puhLumaIntraDir ) { xFree(m_puhLumaIntraDir); m_puhLumaIntraDir = NULL; } 466 475 if ( m_puhChromaIntraDir ) { xFree(m_puhChromaIntraDir); m_puhChromaIntraDir = NULL; } … … 636 645 m_pbSDCFlag[ui] = pcFrom->getSDCFlag(ui); 637 646 #endif 647 #if QC_ARP_D0177 648 m_puhARPW[ui] = pcFrom->getARPW( ui ); 649 #endif 638 650 m_puhWidth [ui] = pcFrom->getWidth(ui); 639 651 m_puhHeight [ui] = pcFrom->getHeight(ui); … … 733 745 memset( m_pbResPredFlag + firstElement, 0 , sizeof( Bool ) * numElements ); 734 746 #endif 747 #if QC_ARP_D0177 748 memset( m_puhARPW + firstElement, 0 , sizeof( UChar ) * numElements ); 749 #endif 735 750 } 736 751 … … 875 890 m_pbResPredFlag[ui] = 0; 876 891 #endif 892 #if QC_ARP_D0177 893 m_puhARPW[ui] = 0; 894 #endif 877 895 m_puhLumaIntraDir[ui] = 2; 878 896 m_puhChromaIntraDir[ui] = 0; … … 985 1003 memset( m_pbResPredAvailable, 0, iSizeInBool ); 986 1004 memset( m_pbResPredFlag, 0, iSizeInBool ); 1005 #endif 1006 #if QC_ARP_D0177 1007 memset( m_puhARPW, 0, iSizeInUchar ); 987 1008 #endif 988 1009 memset( m_puhLumaIntraDir, 2, iSizeInUchar ); … … 1102 1123 m_pbResPredFlag [ui] = pcCU->m_pbResPredFlag [ uiPartOffset + ui ]; 1103 1124 #endif 1125 #if QC_ARP_D0177 1126 m_puhARPW [ui] = pcCU->getARPW( uiPartOffset+ui ); 1127 #endif 1104 1128 #if RWTH_SDC_DLT_B0036 1105 1129 m_pbSDCFlag [ui] = pcCU->m_pbSDCFlag [ uiPartOffset + ui ]; … … 1224 1248 m_pbResPredFlag = pcCU->getResPredFlag () + uiPart; 1225 1249 #endif 1250 #if QC_ARP_D0177 1251 m_puhARPW = pcCU->getARPW() + uiPart; 1252 #endif 1226 1253 m_puhLumaIntraDir = pcCU->getLumaIntraDir() + uiPart; 1227 1254 m_puhChromaIntraDir = pcCU->getChromaIntraDir() + uiPart; … … 1392 1419 m_pbResPredFlag = pcCU->getResPredFlag () + uiAbsPartIdx; 1393 1420 #endif 1421 #if QC_ARP_D0177 1422 m_puhARPW = pcCU->getARPW() + uiAbsPartIdx; 1423 #endif 1394 1424 m_apiMVPIdx[eRefPicList] = pcCU->getMVPIdx(eRefPicList) + uiAbsPartIdx; 1395 1425 m_apiMVPNum[eRefPicList] = pcCU->getMVPNum(eRefPicList) + uiAbsPartIdx; … … 1409 1439 // Copy small CU to bigger CU. 1410 1440 // One of quarter parts overwritten by predicted sub part. 1411 Void TComDataCU::copyPartFrom( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth ) 1441 Void TComDataCU::copyPartFrom( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth 1442 #if QC_ARP_D0177 1443 , 1444 Bool bRP 1445 #endif 1446 ) 1412 1447 { 1413 1448 assert( uiPartUnitIdx<4 ); … … 1446 1481 memcpy( m_pbResPredFlag + uiOffset, pcCU->getResPredFlag(), iSizeInBool ); 1447 1482 #endif 1483 #if QC_ARP_D0177 1484 memcpy( m_puhARPW + uiOffset, pcCU->getARPW(), iSizeInUchar ); 1485 #endif 1448 1486 memcpy( m_puhLumaIntraDir + uiOffset, pcCU->getLumaIntraDir(), iSizeInUchar ); 1449 1487 memcpy( m_puhChromaIntraDir + uiOffset, pcCU->getChromaIntraDir(), iSizeInUchar ); … … 1522 1560 1523 1561 #if LGE_EDGE_INTRA_A0070 1562 #if QC_ARP_D0177 1563 if( !bRP && pcCU->getSlice()->getSPS()->isDepth() ) 1564 #else 1524 1565 if( getSlice()->getSPS()->isDepth() ) 1566 #endif 1525 1567 { 1526 1568 memcpy( getEdgeCode( uiOffset ), pcCU->getEdgeCode(0), iSizeInUchar * LGE_EDGE_INTRA_MAX_EDGE_NUM_PER_4x4 ); … … 1588 1630 memcpy( rpcCU->getResPredFlag() + m_uiAbsIdxInLCU, m_pbResPredFlag, iSizeInBool ); 1589 1631 #endif 1632 #if QC_ARP_D0177 1633 memcpy( rpcCU->getARPW() + m_uiAbsIdxInLCU, m_puhARPW, iSizeInUchar ); 1634 #endif 1590 1635 memcpy( rpcCU->getLumaIntraDir() + m_uiAbsIdxInLCU, m_puhLumaIntraDir, iSizeInUchar ); 1591 1636 memcpy( rpcCU->getChromaIntraDir() + m_uiAbsIdxInLCU, m_puhChromaIntraDir, iSizeInUchar ); … … 1718 1763 memcpy( rpcCU->getResPredAvail() + uiPartOffset, m_pbResPredAvailable, iSizeInBool ); 1719 1764 memcpy( rpcCU->getResPredFlag() + uiPartOffset, m_pbResPredFlag, iSizeInBool ); 1765 #endif 1766 #if QC_ARP_D0177 1767 memcpy( rpcCU->getARPW() + uiPartOffset, m_puhARPW, iSizeInUchar ); 1720 1768 #endif 1721 1769 memcpy( rpcCU->getLumaIntraDir() + uiPartOffset, m_puhLumaIntraDir, iSizeInUchar ); … … 2709 2757 return uiCtx; 2710 2758 } 2711 2759 #if QC_ARP_D0177 2760 UInt TComDataCU::getCTXARPWFlag( UInt uiAbsPartIdx ) 2761 { 2762 TComDataCU* pcTempCU; 2763 UInt uiTempPartIdx; 2764 UInt uiCtx = 0; 2765 2766 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2767 uiCtx = ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1) : 0; 2768 2769 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2770 uiCtx += ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1): 0; 2771 2772 return uiCtx; 2773 } 2774 #endif 2712 2775 #if LGE_ILLUCOMP_B0045 2713 2776 UInt TComDataCU::getCtxICFlag( UInt uiAbsPartIdx ) … … 3632 3695 #endif //H3D_NBDV 3633 3696 3634 #if H3D_IVRP 3697 #if H3D_IVRP & !QC_ARP_D0177 3635 3698 Bool bDVAvail = true; 3636 3699 #endif … … 3689 3752 cDisInfo.m_aVIdxCan[0] = 0; 3690 3753 #endif 3691 #if H3D_IVRP 3754 #if H3D_IVRP & !QC_ARP_D0177 3692 3755 bDVAvail = false; 3693 3756 #endif … … 3752 3815 iPdmDir[1] = iPdmInterDir; 3753 3816 #endif // H3D_NBDV 3754 #if H3D_IVRP 3817 #if H3D_IVRP & !QC_ARP_D0177 3755 3818 if (m_pcSlice->getSPS()->getMultiviewResPredMode()==1 && iPdmDir[0] && !bNoPdmMerge && cCurPS == SIZE_2Nx2N && bDVAvail) 3756 3819 { … … 7278 7341 TComDataCU::getResidualSamples( UInt uiPartIdx, Bool bRecon, TComYuv* pcYuv ) 7279 7342 { 7343 #if !QC_ARP_D0177 7280 7344 TComResidualGenerator* pcResidualGenerator = m_pcSlice->getSPS()->getResidualGenerator(); 7281 7345 ROFRS( pcResidualGenerator, false ); 7346 #endif 7347 7282 7348 #if H3D_NBDV 7283 7349 DisInfo cDisInfo; … … 7308 7374 #if !QC_CU_NBDV_D0181 7309 7375 getDisMvpCandNBDV( 0, 0, &cDisInfo, false ); 7310 7311 7376 if( cDisInfo.iN == 0) 7312 7377 #else … … 7326 7391 } 7327 7392 else 7393 #if QC_ARP_D0177 7394 if(m_pcSlice->getSPS()->getUseAdvRP()) 7395 { 7396 m_pePartSize[0] = m_peSaved; 7397 return true; 7398 } 7399 else 7400 return false; 7401 #else 7328 7402 { 7329 7403 Bool bAvailable = pcResidualGenerator->getResidualSamples( this, uiPartIdx, pcYuv, cDisInfo.m_acMvCand[0], bRecon ); … … 7331 7405 return bAvailable; 7332 7406 } 7407 #endif 7333 7408 #else 7334 7409 return pcResidualGenerator->getResidualSamples( this, uiPartIdx, pcYuv, bRecon ); … … 7336 7411 } 7337 7412 #endif 7338 7413 #if QC_ARP_D0177 7414 Void TComDataCU::setARPWSubParts ( UChar w, UInt uiAbsPartIdx, UInt uiDepth ) 7415 { 7416 assert( sizeof( *m_puhARPW) == 1 ); 7417 memset( m_puhARPW + uiAbsPartIdx, w, m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ) ); 7418 } 7419 #endif 7339 7420 #if LGE_EDGE_INTRA_A0070 7340 7421 Void TComDataCU::reconPartition( UInt uiAbsPartIdx, UInt uiDepth, Bool bLeft, UChar ucStartPos, UChar ucNumEdge, UChar* pucEdgeCode, Bool* pbRegion ) -
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TComDataCU.h
r351 r373 214 214 Bool* m_pbResPredFlag; ///< array of residual prediction flags 215 215 #endif 216 216 #if QC_ARP_D0177 217 UChar* m_puhARPW; 218 #endif 217 219 #if LGE_EDGE_INTRA_A0070 218 220 UChar* m_pucEdgeCode; ///< array of edge code … … 301 303 302 304 /// compute scaling factor from POC difference 305 #if !QC_ARP_D0177 303 306 Int xGetDistScaleFactor ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC ); 304 307 #endif 305 308 Void xDeriveCenterIdx( PartSize eCUMode, UInt uiPartIdx, UInt& ruiPartIdxCenter ); 306 309 Bool xGetCenterCol( UInt uiPartIdx, RefPicList eRefPicList, int iRefIdx, TComMv *pcMv ); … … 316 319 // create / destroy / initialize / copy 317 320 // ------------------------------------------------------------------------------------------------------------------- 318 321 #if QC_ARP_D0177 322 Int xGetDistScaleFactor ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC ); 323 #endif 324 319 325 Void create ( UInt uiNumPartition, UInt uiWidth, UInt uiHeight, Bool bDecSubCu, Int unitSize 320 326 #if ADAPTIVE_QP_SELECTION … … 337 343 #endif 338 344 ); 339 Void copyPartFrom ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth ); 345 Void copyPartFrom ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth 346 #if QC_ARP_D0177 347 , 348 Bool bRP = false 349 #endif 350 ); 340 351 341 352 Void copyToPic ( UChar uiDepth ); … … 585 596 Bool getResidualSamples( UInt uiPartIdx, Bool bRecon, TComYuv* pcYuv = 0 ); 586 597 #endif 598 #if QC_ARP_D0177 599 UChar* getARPW () { return m_puhARPW; } 600 UChar getARPW ( UInt uiIdx ) { return m_puhARPW[uiIdx]; } 601 Void setARPW ( UInt uiIdx, UChar w ) { m_puhARPW[uiIdx] = w; } 602 Void setARPWSubParts ( UChar w, UInt uiAbsPartIdx, UInt uiDepth ); 603 Double getARPWFactor ( UInt uiIdx ); 604 #endif 587 605 // ------------------------------------------------------------------------------------------------------------------- 588 606 // member functions for accessing partition information … … 705 723 UInt getCtxResPredFlag ( UInt uiAbsPartIdx ); 706 724 #endif 707 725 #if QC_ARP_D0177 726 UInt getCTXARPWFlag ( UInt uiAbsPartIdx ); 727 #endif 708 728 UInt getSliceStartCU ( UInt pos ) { return m_uiSliceStartCU[pos-m_uiAbsIdxInLCU]; } 709 729 UInt getEntropySliceStartCU ( UInt pos ) { return m_uiEntropySliceStartCU[pos-m_uiAbsIdxInLCU]; } -
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TComDepthMapGenerator.h
r332 r373 80 80 81 81 UInt getPdm () { if( m_aacActiveSPS[0][1] ) { return m_aacActiveSPS[0][1]->getPredDepthMapGeneration(); } return 0; } 82 #if H3D_IVRP 82 #if H3D_IVRP & !QC_ARP_D0177 83 83 UInt getResPrd () { if( m_aacActiveSPS[0][1] ) { return m_aacActiveSPS[0][1]->getMultiviewResPredMode (); } return 0; } 84 84 #endif -
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TComInterpolationFilter.cpp
r56 r373 72 72 { -2, 10, 58, -2 } 73 73 }; 74 74 #if QC_ARP_D0177 75 const Short TComInterpolationFilter::m_lumaFilterARP[4][NTAPS_LUMA_ARP] = 76 { 77 {64, 0}, 78 {48, 16}, 79 {32, 32}, 80 {16, 48} 81 }; 82 const Short TComInterpolationFilter::m_chromaFilterARP[8][NTAPS_CHROMA_ARP] = 83 { 84 {64, 0}, 85 {56, 8}, 86 {48, 16}, 87 {40, 24}, 88 {32, 32}, 89 {24, 40}, 90 {16, 48}, 91 {8, 56} 92 }; 93 #endif 75 94 // ==================================================================================================================== 76 95 // Private member functions … … 320 339 * \param isLast Flag indicating whether it is the last filtering operation 321 340 */ 322 Void TComInterpolationFilter::filterHorLuma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast ) 341 Void TComInterpolationFilter::filterHorLuma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast 342 #if QC_ARP_D0177 343 , 344 Bool filterType 345 #endif 346 ) 323 347 { 324 348 assert(frac >= 0 && frac < 4); … … 330 354 else 331 355 { 332 filterHor<NTAPS_LUMA>(src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilter[frac]); 356 #if QC_ARP_D0177 357 if(filterType) 358 filterHor<NTAPS_LUMA_ARP>(src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilterARP[frac]); 359 else 360 #endif 361 filterHor<NTAPS_LUMA>(src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilter[frac]); 333 362 } 334 363 } … … 347 376 * \param isLast Flag indicating whether it is the last filtering operation 348 377 */ 349 Void TComInterpolationFilter::filterVerLuma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast ) 378 Void TComInterpolationFilter::filterVerLuma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast 379 #if QC_ARP_D0177 380 , 381 Bool filterType 382 #endif 383 ) 350 384 { 351 385 assert(frac >= 0 && frac < 4); … … 357 391 else 358 392 { 359 filterVer<NTAPS_LUMA>(src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilter[frac]); 393 #if QC_ARP_D0177 394 if(filterType) 395 filterVer<NTAPS_LUMA_ARP>(src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilterARP[frac]); 396 else 397 #endif 398 filterVer<NTAPS_LUMA>(src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilter[frac]); 360 399 } 361 400 } … … 373 412 * \param isLast Flag indicating whether it is the last filtering operation 374 413 */ 375 Void TComInterpolationFilter::filterHorChroma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast ) 414 Void TComInterpolationFilter::filterHorChroma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast 415 #if QC_ARP_D0177 416 , 417 Bool filterType 418 #endif 419 ) 376 420 { 377 421 assert(frac >= 0 && frac < 8); … … 383 427 else 384 428 { 429 #if QC_ARP_D0177 430 if(filterType) 431 filterHor<NTAPS_CHROMA_ARP>(src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilterARP[frac]); 432 else 433 #endif 385 434 filterHor<NTAPS_CHROMA>(src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilter[frac]); 386 435 } … … 400 449 * \param isLast Flag indicating whether it is the last filtering operation 401 450 */ 402 Void TComInterpolationFilter::filterVerChroma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast ) 451 Void TComInterpolationFilter::filterVerChroma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast 452 #if QC_ARP_D0177 453 , 454 Bool filterType 455 #endif 456 ) 403 457 { 404 458 assert(frac >= 0 && frac < 8); … … 410 464 else 411 465 { 412 filterVer<NTAPS_CHROMA>(src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilter[frac]); 466 #if QC_ARP_D0177 467 if(filterType) 468 filterVer<NTAPS_CHROMA_ARP>(src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilterARP[frac]); 469 else 470 #endif 471 filterVer<NTAPS_CHROMA>(src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilter[frac]); 413 472 } 414 473 } -
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TComInterpolationFilter.h
r56 r373 44 44 //! \ingroup TLibCommon 45 45 //! \{ 46 #if QC_ARP_D0177 47 #define NTAPS_LUMA_ARP 2 ///< Number of taps for luma 48 #define NTAPS_CHROMA_ARP 2 ///< Number of taps for chroma 49 #endif 46 50 47 51 #define NTAPS_LUMA 8 ///< Number of taps for luma … … 58 62 static const Short m_lumaFilter[4][NTAPS_LUMA]; ///< Luma filter taps 59 63 static const Short m_chromaFilter[8][NTAPS_CHROMA]; ///< Chroma filter taps 60 64 #if QC_ARP_D0177 65 static const Short m_lumaFilterARP [4][NTAPS_LUMA_ARP]; ///< Luma filter taps 66 static const Short m_chromaFilterARP[8][NTAPS_CHROMA_ARP]; ///< Chroma filter taps 67 #endif 68 61 69 static Void filterCopy(const Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Bool isFirst, Bool isLast); 62 70 … … 73 81 ~TComInterpolationFilter() {} 74 82 75 Void filterHorLuma (Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast ); 76 Void filterVerLuma (Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast ); 77 Void filterHorChroma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast ); 78 Void filterVerChroma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast ); 83 Void filterHorLuma (Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast 84 #if QC_ARP_D0177 85 , 86 Bool filterType = 0 87 #endif 88 ); 89 Void filterVerLuma (Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast 90 #if QC_ARP_D0177 91 , 92 Bool filterType = 0 93 #endif 94 ); 95 Void filterHorChroma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast 96 #if QC_ARP_D0177 97 , 98 Bool filterType = 0 99 #endif 100 ); 101 Void filterVerChroma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast 102 #if QC_ARP_D0177 103 , 104 Bool filterType = 0 105 #endif 106 ); 79 107 }; 80 108 -
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TComPicYuv.cpp
r332 r373 488 488 } 489 489 } 490 490 #if QC_ARP_D0177 491 Void TComPicYuv::clearPic() 492 { 493 ::memset ( m_apiPicBufY, 0 , sizeof (Pel) * ( m_iPicWidth + (m_iLumaMarginX << 1)) * ( m_iPicHeight + (m_iLumaMarginY << 1)) ); 494 ::memset ( m_apiPicBufU, 0 , sizeof (Pel) * ((m_iPicWidth >> 1) + (m_iChromaMarginX << 1)) * ((m_iPicHeight >> 1) + (m_iChromaMarginY << 1)) ); 495 ::memset ( m_apiPicBufV, 0 , sizeof (Pel) * ((m_iPicWidth >> 1) + (m_iChromaMarginX << 1)) * ((m_iPicHeight >> 1) + (m_iChromaMarginY << 1)) ); 496 } 497 #endif 491 498 //! \} -
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TComPicYuv.h
r56 r373 183 183 Void setLumaTo ( Pel pVal ); 184 184 Void setChromaTo ( Pel pVal ); 185 185 #if QC_ARP_D0177 186 Void clearPic(); 187 #endif 186 188 };// END CLASS DEFINITION TComPicYuv 187 189 -
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TComPrediction.cpp
r332 r373 78 78 79 79 m_cYuvPredTemp.destroy(); 80 80 #if QC_ARP_D0177 81 m_acYuvPredBase[0].destroy(); 82 m_acYuvPredBase[1].destroy(); 83 m_acYuvDiff[0].destroy(); 84 m_acYuvDiff[1].destroy(); 85 #endif 81 86 if( m_pLumaRecBuffer ) 82 87 { … … 119 124 120 125 m_cYuvPredTemp.create( g_uiMaxCUWidth, g_uiMaxCUHeight ); 126 #if QC_ARP_D0177 127 m_acYuvPredBase[0] .create( g_uiMaxCUWidth, g_uiMaxCUHeight ); 128 m_acYuvPredBase[1] .create( g_uiMaxCUWidth, g_uiMaxCUHeight ); 129 m_acYuvDiff [0] .create( g_uiMaxCUWidth, g_uiMaxCUHeight ); 130 m_acYuvDiff [1] .create( g_uiMaxCUWidth, g_uiMaxCUHeight ); 131 #endif 121 132 } 122 133 … … 751 762 } 752 763 753 #if H3D_IVRP 764 #if H3D_IVRP & !QC_ARP_D0177 754 765 Void TComPrediction::residualPrediction(TComDataCU* pcCU, TComYuv* pcYuvPred, TComYuv* pcYuvResPred) 755 766 { … … 810 821 } 811 822 #endif 812 823 #if QC_ARP_D0177 824 if( pcCU->getSlice()->getSPS()->isDepth() == false 825 && pcCU->getSlice()->getSPS()->getViewId() > 0 826 && pcCU->getSlice()->getSPS()->getUseAdvRP() > 0 827 && pcCU->getARPW( uiPartAddr ) > 0 828 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() 829 && (pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N || pcCU->isSkipped(uiPartAddr)) 830 ) 831 { 832 xPredInterUniARP( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , rpcYuvPred , iPartIdx , bi ); 833 } 834 else 835 { 836 #endif 813 837 #if HHI_FULL_PEL_DEPTH_MAP_MV_ACC 814 838 if( pcCU->getSlice()->getSPS()->isDepth() ) … … 911 935 } 912 936 #endif 913 } 914 937 #if QC_ARP_D0177 938 } 939 #endif 940 } 941 942 #if QC_ARP_D0177 943 Void TComPrediction::xPredInterUniARP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bi, TComMvField * pNewMvFiled ) 944 { 945 Int iRefIdx = pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr ); 946 TComMv cMv = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); 947 Bool bTobeScaled = false; 948 UChar dW = pcCU->getARPW ( uiPartAddr ); 949 TComPic* pcPicYuvBaseCol = NULL; 950 TComPic* pcPicYuvBaseRef = NULL; 951 DisInfo cDistparity; 952 953 if( pNewMvFiled ) 954 { 955 iRefIdx = pNewMvFiled->getRefIdx(); 956 cMv = pNewMvFiled->getMv(); 957 } 958 959 #if QC_CU_NBDV_D0181 960 cDistparity.bDV = pcCU->getDvInfo(uiPartAddr).bDV; 961 if( cDistparity.bDV ) 962 { 963 #if MERL_VSP_C0152 964 cDistparity.m_acMvCand[0] = pcCU->getDvInfo(0).m_acMvCandNoRef[0]; 965 #else 966 cDistparity.m_acMvCand[0] = pcCU->getDvInfo(0).m_acMvCand[0]; 967 #endif 968 assert(pcCU->getDvInfo(uiPartAddr).bDV == pcCU->getDvInfo(0).bDV); 969 cDistparity.m_aVIdxCan[0] = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan[0]; 970 cDistparity.iN = pcCU->getDvInfo(uiPartAddr).iN; 971 } 972 else 973 cDistparity.iN = 0; 974 #else 975 pcCU->getDisMvpCandNBDV( iPartIdx, uiPartAddr, &cDistparity, false ); 976 #endif 977 978 dW = !cDistparity.iN ? 0: dW; 979 if( cDistparity.iN ) 980 { 981 if(dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC()!= pcCU->getSlice()->getPOC()) 982 bTobeScaled = true; 983 pcPicYuvBaseCol = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getPOC(), cDistparity.m_aVIdxCan[0] ); 984 pcPicYuvBaseRef = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC(), cDistparity.m_aVIdxCan[0] ); 985 if( (!pcPicYuvBaseCol || pcPicYuvBaseCol->getPOC() != pcCU->getSlice()->getPOC()) || (!pcPicYuvBaseRef || pcPicYuvBaseRef->getPOC() != pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() )) 986 { 987 dW = 0; 988 bTobeScaled = false; 989 } 990 else 991 assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() ); 992 if(bTobeScaled) 993 { 994 Int iCurrPOC = pcCU->getSlice()->getPOC(); 995 Int iColRefPOC = pcCU->getSlice()->getRefPOC( eRefPicList, iRefIdx ); 996 Int iCurrRefPOC = pcCU->getSlice()->getRefPOC( eRefPicList, 0); 997 Int iScale = pcCU-> xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iCurrPOC, iColRefPOC); 998 if ( iScale != 4096 ) 999 cMv = cMv.scaleMv( iScale ); 1000 iRefIdx = 0; 1001 } 1002 } 1003 pcCU->clipMv(cMv); 1004 TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(); 1005 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi 1006 #if LGE_ILLUCOMP_B0045 1007 , false 1008 #endif 1009 , true 1010 ); 1011 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi 1012 #if LGE_ILLUCOMP_B0045 1013 , false 1014 #endif 1015 , true 1016 ); 1017 if( dW > 0 ) 1018 { 1019 TComYuv * pYuvmB0 = &m_acYuvPredBase[0]; 1020 TComYuv * pYuvB1 = &m_acYuvPredBase[1]; 1021 assert ( cDistparity.iN == 1 ); 1022 pcPicYuvRef = pcPicYuvBaseCol->getPicYuvRec(); 1023 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cDistparity.m_acMvCand[0], iWidth, iHeight, pYuvB1, bi 1024 #if LGE_ILLUCOMP_B0045 1025 , false 1026 #endif 1027 , true 1028 ); 1029 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cDistparity.m_acMvCand[0], iWidth, iHeight, pYuvB1, bi 1030 #if LGE_ILLUCOMP_B0045 1031 , false 1032 #endif 1033 , true 1034 ); 1035 pcPicYuvRef = pcPicYuvBaseRef->getPicYuvRec(); 1036 TComMv cMVwithDisparity = cMv + cDistparity.m_acMvCand[0]; 1037 pcCU->clipMv(cMVwithDisparity); 1038 xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvmB0, bi 1039 #if LGE_ILLUCOMP_B0045 1040 , false 1041 #endif 1042 , true 1043 ); 1044 xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvmB0, bi 1045 #if LGE_ILLUCOMP_B0045 1046 , false 1047 #endif 1048 , true 1049 ); 1050 pYuvB1->subtractARP( pYuvB1 , pYuvmB0 , uiPartAddr , iWidth , iHeight ); 1051 if(dW == 2) 1052 pYuvB1->multiplyARP( uiPartAddr , iWidth , iHeight , dW ); 1053 rpcYuvPred->addARP( rpcYuvPred , pYuvB1 , uiPartAddr , iWidth , iHeight , !bi ); 1054 } 1055 } 1056 #endif 915 1057 916 1058 #if MERL_VSP_C0152 … … 1108 1250 */ 1109 1251 #if LGE_ILLUCOMP_B0045 1110 Void TComPrediction::xPredInterLumaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi, Bool bICFlag) 1111 #else 1112 Void TComPrediction::xPredInterLumaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi ) 1252 Void TComPrediction::xPredInterLumaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi, Bool bICFlag 1253 #if QC_ARP_D0177 1254 , 1255 Int filterType 1256 #endif 1257 ) 1258 #else 1259 Void TComPrediction::xPredInterLumaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi 1260 #if QC_ARP_D0177 1261 , 1262 Int filterType 1263 #endif 1264 ) 1113 1265 #endif 1114 1266 { … … 1129 1281 if ( yFrac == 0 ) 1130 1282 { 1131 m_if.filterHorLuma( ref, refStride, dst, dstStride, width, height, xFrac, !bi ); 1283 m_if.filterHorLuma( ref, refStride, dst, dstStride, width, height, xFrac, !bi 1284 #if QC_ARP_D0177 1285 , 1286 filterType 1287 #endif 1288 ); 1132 1289 } 1133 1290 else if ( xFrac == 0 ) 1134 1291 { 1135 m_if.filterVerLuma( ref, refStride, dst, dstStride, width, height, yFrac, true, !bi ); 1292 m_if.filterVerLuma( ref, refStride, dst, dstStride, width, height, yFrac, true, !bi 1293 #if QC_ARP_D0177 1294 , 1295 filterType 1296 #endif 1297 ); 1136 1298 } 1137 1299 else … … 1143 1305 Int halfFilterSize = ( filterSize >> 1 ); 1144 1306 1145 m_if.filterHorLuma(ref - (halfFilterSize-1)*refStride, refStride, tmp, tmpStride, width, height+filterSize-1, xFrac, false ); 1146 m_if.filterVerLuma(tmp + (halfFilterSize-1)*tmpStride, tmpStride, dst, dstStride, width, height, yFrac, false, !bi); 1307 m_if.filterHorLuma(ref - (halfFilterSize-1)*refStride, refStride, tmp, tmpStride, width, height+filterSize-1, xFrac, false 1308 #if QC_ARP_D0177 1309 , 1310 filterType 1311 #endif 1312 ); 1313 m_if.filterVerLuma(tmp + (halfFilterSize-1)*tmpStride, tmpStride, dst, dstStride, width, height, yFrac, false, !bi 1314 #if QC_ARP_D0177 1315 , 1316 filterType 1317 #endif 1318 ); 1147 1319 } 1148 1320 … … 1185 1357 */ 1186 1358 #if LGE_ILLUCOMP_B0045 1187 Void TComPrediction::xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi, Bool bICFlag ) 1188 #else 1189 Void TComPrediction::xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi ) 1359 Void TComPrediction::xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi, Bool bICFlag 1360 #if QC_ARP_D0177 1361 , 1362 Int filterType 1363 #endif 1364 ) 1365 #else 1366 Void TComPrediction::xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi 1367 #if QC_ARP_D0177 1368 , Int filterType 1369 #endif 1370 ) 1190 1371 #endif 1191 1372 { … … 1215 1396 if ( yFrac == 0 ) 1216 1397 { 1217 m_if.filterHorChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, xFrac, !bi); 1218 m_if.filterHorChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, xFrac, !bi); 1398 m_if.filterHorChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, xFrac, !bi 1399 #if QC_ARP_D0177 1400 , 1401 filterType 1402 #endif 1403 ); 1404 m_if.filterHorChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, xFrac, !bi 1405 #if QC_ARP_D0177 1406 , 1407 filterType 1408 #endif 1409 ); 1219 1410 } 1220 1411 else if ( xFrac == 0 ) 1221 1412 { 1222 m_if.filterVerChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, yFrac, true, !bi); 1223 m_if.filterVerChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, yFrac, true, !bi); 1413 m_if.filterVerChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, yFrac, true, !bi 1414 #if QC_ARP_D0177 1415 , 1416 filterType 1417 #endif 1418 ); 1419 m_if.filterVerChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, yFrac, true, !bi 1420 #if QC_ARP_D0177 1421 , 1422 filterType 1423 #endif 1424 ); 1224 1425 } 1225 1426 else 1226 1427 { 1227 m_if.filterHorChroma(refCb - (halfFilterSize-1)*refStride, refStride, extY, extStride, cxWidth, cxHeight+filterSize-1, xFrac, false); 1228 m_if.filterVerChroma(extY + (halfFilterSize-1)*extStride, extStride, dstCb, dstStride, cxWidth, cxHeight , yFrac, false, !bi); 1428 m_if.filterHorChroma(refCb - (halfFilterSize-1)*refStride, refStride, extY, extStride, cxWidth, cxHeight+filterSize-1, xFrac, false 1429 #if QC_ARP_D0177 1430 , 1431 filterType 1432 #endif 1433 ); 1434 m_if.filterVerChroma(extY + (halfFilterSize-1)*extStride, extStride, dstCb, dstStride, cxWidth, cxHeight , yFrac, false, !bi 1435 #if QC_ARP_D0177 1436 , 1437 filterType 1438 #endif 1439 ); 1229 1440 1230 m_if.filterHorChroma(refCr - (halfFilterSize-1)*refStride, refStride, extY, extStride, cxWidth, cxHeight+filterSize-1, xFrac, false); 1231 m_if.filterVerChroma(extY + (halfFilterSize-1)*extStride, extStride, dstCr, dstStride, cxWidth, cxHeight , yFrac, false, !bi); 1441 m_if.filterHorChroma(refCr - (halfFilterSize-1)*refStride, refStride, extY, extStride, cxWidth, cxHeight+filterSize-1, xFrac, false 1442 #if QC_ARP_D0177 1443 , 1444 filterType 1445 #endif 1446 ); 1447 m_if.filterVerChroma(extY + (halfFilterSize-1)*extStride, extStride, dstCr, dstStride, cxWidth, cxHeight , yFrac, false, !bi 1448 #if QC_ARP_D0177 1449 , 1450 filterType 1451 #endif 1452 ); 1232 1453 } 1233 1454 #if LGE_ILLUCOMP_B0045 -
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TComPrediction.h
r332 r373 69 69 TComYuv m_acYuvPred[2]; 70 70 TComYuv m_cYuvPredTemp; 71 #if QC_ARP_D0177 72 TComYuv m_acYuvPredBase[2]; 73 TComYuv m_acYuvDiff[2]; 74 #endif 71 75 TComYuv m_filteredBlock[4][4]; 72 76 TComYuv m_filteredBlockTmp[4]; … … 86 90 87 91 // motion compensation functions 92 #if QC_ARP_D0177 93 Void xPredInterUniARP ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bi=false, TComMvField * pNewMvFiled = NULL ); 94 #endif 88 95 #if MERL_VSP_C0152 89 96 Void xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap, UInt uiSubSampExpX = 0, UInt uiSubSampExpY = 0, Bool bi=false ); … … 113 120 114 121 #if LGE_ILLUCOMP_B0045 115 Void xPredInterLumaBlk ( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi, Bool bICFlag = false ); 116 Void xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi, Bool bICFlag = false ); 117 #else 118 Void xPredInterLumaBlk ( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi ); 119 Void xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi ); 122 Void xPredInterLumaBlk ( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi, Bool bICFlag = false 123 #if QC_ARP_D0177 124 , 125 Int filterType = 0 126 #endif 127 ); 128 Void xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi, Bool bICFlag = false 129 #if QC_ARP_D0177 130 , 131 Int filterType = 0 132 #endif 133 ); 134 #else 135 Void xPredInterLumaBlk ( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi 136 #if QC_ARP_D0177 137 , 138 Int filterType = 0 139 #endif 140 ); 141 Void xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi 142 #if QC_ARP_D0177 143 , 144 Int filterType = 0 145 #endif 146 ); 120 147 #endif 121 148 Void xWeightedAverage ( TComDataCU* pcCU, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, Int iRefIdx0, Int iRefIdx1, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvDst ); … … 169 196 #endif 170 197 171 #if H3D_IVRP 198 #if H3D_IVRP & !QC_ARP_D0177 172 199 Void residualPrediction (TComDataCU* pcCU, TComYuv* pcYuvPred, TComYuv* pcYuvResPred); 173 200 #endif -
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TComResidualGenerator.cpp
r351 r373 44 44 45 45 46 #if H3D_IVRP 46 #if H3D_IVRP & !QC_ARP_D0177 47 47 48 48 … … 225 225 } 226 226 } 227 227 #endif 228 229 #if !QC_ARP_D0177 228 230 #if H3D_NBDV 229 231 Bool … … 249 251 } 250 252 251 #if H3D_NBDV 253 #if H3D_NBDV 252 254 Bool 253 255 TComResidualGenerator::getResidualSamples( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, TComMv iDisp, Bool bRecon) … … 263 265 } 264 266 UInt uiXPosInRefView = uiXPos , uiYPosInRefView = uiYPos; 267 #if QC_ARP_D0177 268 if(pcPic->getSPS()->getMultiviewResPredMode()) 269 { 270 #endif 265 271 #if H3D_NBDV 266 272 xSetPredResidualBlock( pcPic, uiBaseViewId, uiXPos, uiYPos, uiBlkWidth, uiBlkHeight, pcYuv, iDisp, &uiXPosInRefView , &uiYPosInRefView , bRecon ); … … 269 275 #endif 270 276 return true; 277 #if QC_ARP_D0177 278 } 279 else 280 return true; 281 #endif 271 282 } 272 283 -
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TComResidualGenerator.h
r332 r373 50 50 51 51 52 #if H3D_IVRP 52 #if H3D_IVRP & !QC_ARP_D0177 53 53 54 54 class TComResidualGenerator -
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TComSlice.cpp
r332 r373 1386 1386 } 1387 1387 #endif 1388 1388 #if QC_ARP_D0177 1389 Void TComSlice::setARPStepNum() 1390 { 1391 Bool bAllIvRef = false; 1392 if(!getSPS()->getUseAdvRP()) 1393 m_nARPStepNum = 0; 1394 else 1395 { 1396 for( Int iRefListId = 0; iRefListId < 2; iRefListId++ ) 1397 { 1398 RefPicList eRefPicList = RefPicList( iRefListId ); 1399 Int iNumRefIdx = getNumRefIdx(eRefPicList); 1400 if( iNumRefIdx <= 0 ) 1401 continue; 1402 for (Int i = 0; i < iNumRefIdx; i++) 1403 { 1404 if(getRefPic( REF_PIC_LIST_0, i)->getPOC() != getPOC()) 1405 { 1406 bAllIvRef = true; 1407 break; 1408 } 1409 } 1410 if( bAllIvRef == true ) 1411 break; 1412 } 1413 if(bAllIvRef== true) 1414 m_nARPStepNum = getSPS()->getARPStepNum(); 1415 else 1416 m_nARPStepNum = 0; 1417 } 1418 } 1419 #endif 1389 1420 // ------------------------------------------------------------------------------------------------ 1390 1421 // Video parameter set (VPS) … … 1576 1607 m_uiMultiviewMvPredMode = 0; 1577 1608 #endif 1578 1609 #if QC_ARP_D0177 1610 m_nUseAdvResPred = 0; 1611 m_nARPStepNum = 1; 1612 #endif 1579 1613 ::memset( m_aiUsableInterViewRefs, 0, sizeof( m_aiUsableInterViewRefs ) ); 1580 1614 -
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TComSlice.h
r332 r373 54 54 class TComDepthMapGenerator; 55 55 #endif 56 #if H3D_IVRP 56 #if H3D_IVRP & !QC_ARP_D0177 57 57 class TComResidualGenerator; 58 58 #endif … … 390 390 #endif 391 391 #if H3D_IVRP 392 #if QC_ARP_D0177 393 UInt m_nUseAdvResPred; 394 UInt m_nARPStepNum; 395 #else 392 396 UInt m_uiMultiviewResPredMode; 397 #endif 393 398 #endif 394 399 … … 396 401 TComDepthMapGenerator* m_pcDepthMapGenerator; 397 402 #endif 398 #if H3D_IVRP 403 #if H3D_IVRP & !QC_ARP_D0177 399 404 TComResidualGenerator* m_pcResidualGenerator; 400 405 #endif … … 643 648 Void setPredDepthMapGeneration( UInt uiViewId, Bool bIsDepth, UInt uiPdmGenMode = 0, UInt uiPdmMvPredMode = 0, UInt uiPdmPrec = 0, Int** aaiPdmScaleNomDelta = 0, Int** aaiPdmOffset = 0 ); 644 649 #endif 645 #if H3D_IVRP 650 #if H3D_IVRP & !QC_ARP_D0177 646 651 Void setMultiviewResPredMode ( UInt uiResPrdMode ) { m_uiMultiviewResPredMode = uiResPrdMode; } 647 652 #endif … … 658 663 #endif 659 664 #if H3D_IVRP 665 #if QC_ARP_D0177 666 UInt getUseAdvRP() { return m_nUseAdvResPred; } 667 Void setUseAdvRP(UInt n) { m_nUseAdvResPred = n; } 668 UInt getARPStepNum() { return m_nARPStepNum; } 669 Void setARPStepNum(UInt n) { m_nARPStepNum = n; } 670 #else 660 671 UInt getMultiviewResPredMode () { return m_uiMultiviewResPredMode; } 672 #endif 661 673 #endif 662 674 … … 665 677 TComDepthMapGenerator* getDepthMapGenerator() { return m_pcDepthMapGenerator; } 666 678 #endif 667 #if H3D_IVRP 679 #if H3D_IVRP & !QC_ARP_D0177 668 680 Void setResidualGenerator( TComResidualGenerator* pcResidualGenerator ) { m_pcResidualGenerator = pcResidualGenerator; } 669 681 TComResidualGenerator* getResidualGenerator() { return m_pcResidualGenerator; } … … 1107 1119 Bool m_bApplyIC; 1108 1120 #endif 1121 #if QC_ARP_D0177 1122 TComList<TComPic*> * m_pBaseViewRefPicList[MAX_VIEW_NUM]; 1123 UInt m_nARPStepNum; 1124 #endif 1109 1125 #if INTER_VIEW_VECTOR_SCALING_C0115|QC_MVHEVC_B0046 1110 1126 Bool m_bIVScalingFlag; … … 1253 1269 Void setRefPicListMvc ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& rapcInterViewRefPics ); 1254 1270 Void setRefPOCnViewListsMvc(); 1255 1271 #if QC_ARP_D0177 1272 Void setBaseViewRefPicList( TComList<TComPic*> *pListPic, Int iViewIdx ) { m_pBaseViewRefPicList[iViewIdx] = pListPic; } 1273 TComPic* getBaseViewRefPic ( UInt uiPOC , Int iViewIdx ) { return xGetRefPic( *m_pBaseViewRefPicList[iViewIdx], uiPOC ); } 1274 Void setARPStepNum(); 1275 UInt getARPStepNum( ) { return m_nARPStepNum; } 1276 #endif 1256 1277 Void setColDir ( UInt uiDir ) { m_uiColDir = uiDir; } 1257 1278 #if COLLOCATED_REF_IDX -
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TComYuv.cpp
r332 r373 741 741 } 742 742 } 743 #if QC_ARP_D0177 744 Void TComYuv::addARP(TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip ) 745 { 746 addARPLuma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth , uiHeight , bClip ); 747 addARPChroma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth>>1, uiHeight>>1 , bClip ); 748 } 749 750 Void TComYuv::addARPLuma(TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip ) 751 { 752 Int x, y; 753 754 Pel* pSrc0 = pcYuvSrc0->getLumaAddr( uiAbsPartIdx ); 755 Pel* pSrc1 = pcYuvSrc1->getLumaAddr( uiAbsPartIdx ); 756 Pel* pDst = getLumaAddr( uiAbsPartIdx ); 757 758 UInt iSrc0Stride = pcYuvSrc0->getStride(); 759 UInt iSrc1Stride = pcYuvSrc1->getStride(); 760 UInt iDstStride = getStride(); 761 for ( y = uiHeight-1; y >= 0; y-- ) 762 { 763 for ( x = uiWidth-1; x >= 0; x-- ) 764 { 765 pDst[x] = pSrc0[x] + pSrc1[x]; 766 if( bClip ) 767 pDst[x] = Clip( pDst[x] ); 768 } 769 pSrc0 += iSrc0Stride; 770 pSrc1 += iSrc1Stride; 771 pDst += iDstStride; 772 } 773 } 774 775 Void TComYuv::addARPChroma(TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip ) 776 { 777 Int x, y; 778 779 Pel* pSrcU0 = pcYuvSrc0->getCbAddr( uiAbsPartIdx ); 780 Pel* pSrcU1 = pcYuvSrc1->getCbAddr( uiAbsPartIdx ); 781 Pel* pSrcV0 = pcYuvSrc0->getCrAddr( uiAbsPartIdx ); 782 Pel* pSrcV1 = pcYuvSrc1->getCrAddr( uiAbsPartIdx ); 783 Pel* pDstU = getCbAddr( uiAbsPartIdx ); 784 Pel* pDstV = getCrAddr( uiAbsPartIdx ); 785 786 UInt iSrc0Stride = pcYuvSrc0->getCStride(); 787 UInt iSrc1Stride = pcYuvSrc1->getCStride(); 788 UInt iDstStride = getCStride(); 789 for ( y = uiHeight-1; y >= 0; y-- ) 790 { 791 for ( x = uiWidth-1; x >= 0; x-- ) 792 { 793 pDstU[x] = pSrcU0[x] + pSrcU1[x]; 794 pDstV[x] = pSrcV0[x] + pSrcV1[x]; 795 if( bClip ) 796 { 797 pDstU[x] = Clip( pDstU[x] ); 798 pDstV[x] = Clip( pDstV[x] ); 799 } 800 } 801 802 pSrcU0 += iSrc0Stride; 803 pSrcU1 += iSrc1Stride; 804 pSrcV0 += iSrc0Stride; 805 pSrcV1 += iSrc1Stride; 806 pDstU += iDstStride; 807 pDstV += iDstStride; 808 } 809 } 810 811 Void TComYuv::subtractARP(TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight) 812 { 813 subtractARPLuma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth , uiHeight ); 814 subtractARPChroma( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth>>1 , uiHeight>>1 ); 815 } 816 817 Void TComYuv::subtractARPLuma(TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight) 818 { 819 Int x, y; 820 821 Pel* pSrc0 = pcYuvSrc0->getLumaAddr( uiAbsPartIdx ); 822 Pel* pSrc1 = pcYuvSrc1->getLumaAddr( uiAbsPartIdx ); 823 Pel* pDst = getLumaAddr( uiAbsPartIdx ); 824 825 Int iSrc0Stride = pcYuvSrc0->getStride(); 826 Int iSrc1Stride = pcYuvSrc1->getStride(); 827 Int iDstStride = getStride(); 828 for ( y = uiHeight-1; y >= 0; y-- ) 829 { 830 for ( x = uiWidth-1; x >= 0; x-- ) 831 { 832 pDst[x] = pSrc0[x] - pSrc1[x]; 833 } 834 pSrc0 += iSrc0Stride; 835 pSrc1 += iSrc1Stride; 836 pDst += iDstStride; 837 } 838 } 839 840 Void TComYuv::subtractARPChroma(TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight) 841 { 842 Int x, y; 843 844 Pel* pSrcU0 = pcYuvSrc0->getCbAddr( uiAbsPartIdx ); 845 Pel* pSrcU1 = pcYuvSrc1->getCbAddr( uiAbsPartIdx ); 846 Pel* pSrcV0 = pcYuvSrc0->getCrAddr( uiAbsPartIdx ); 847 Pel* pSrcV1 = pcYuvSrc1->getCrAddr( uiAbsPartIdx ); 848 Pel* pDstU = getCbAddr( uiAbsPartIdx ); 849 Pel* pDstV = getCrAddr( uiAbsPartIdx ); 850 851 Int iSrc0Stride = pcYuvSrc0->getCStride(); 852 Int iSrc1Stride = pcYuvSrc1->getCStride(); 853 Int iDstStride = getCStride(); 854 for ( y = uiHeight-1; y >= 0; y-- ) 855 { 856 for ( x = uiWidth-1; x >= 0; x-- ) 857 { 858 pDstU[x] = pSrcU0[x] - pSrcU1[x]; 859 pDstV[x] = pSrcV0[x] - pSrcV1[x]; 860 } 861 pSrcU0 += iSrc0Stride; 862 pSrcU1 += iSrc1Stride; 863 pSrcV0 += iSrc0Stride; 864 pSrcV1 += iSrc1Stride; 865 pDstU += iDstStride; 866 pDstV += iDstStride; 867 } 868 } 869 870 Void TComYuv::multiplyARP( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW ) 871 { 872 multiplyARPLuma( uiAbsPartIdx , uiWidth , uiHeight , dW ); 873 multiplyARPChroma( uiAbsPartIdx , uiWidth >> 1 , uiHeight >> 1 , dW ); 874 } 875 876 Void TComYuv::xxMultiplyLine( Pel * pSrcDst , UInt uiWidth , UChar dW ) 877 { 878 assert( dW == 2 ); 879 for( UInt x = 0 ; x < uiWidth ; x++ ) 880 pSrcDst[x] = pSrcDst[x] >> 1; 881 } 882 883 Void TComYuv::multiplyARPLuma( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW ) 884 { 885 Pel* pDst = getLumaAddr( uiAbsPartIdx ); 886 Int iDstStride = getStride(); 887 for ( Int y = uiHeight-1; y >= 0; y-- ) 888 { 889 xxMultiplyLine( pDst , uiWidth , dW ); 890 pDst += iDstStride; 891 } 892 } 893 894 Void TComYuv::multiplyARPChroma( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW ) 895 { 896 Pel* pDstU = getCbAddr( uiAbsPartIdx ); 897 Pel* pDstV = getCrAddr( uiAbsPartIdx ); 898 899 Int iDstStride = getCStride(); 900 for ( Int y = uiHeight-1; y >= 0; y-- ) 901 { 902 xxMultiplyLine( pDstU , uiWidth , dW ); 903 xxMultiplyLine( pDstV , uiWidth , dW ); 904 pDstU += iDstStride; 905 pDstV += iDstStride; 906 } 907 } 908 #endif 743 909 //! \} -
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TComYuv.h
r332 r373 199 199 200 200 __inline Pel xClip (Pel x ) { return ( (x < 0) ? 0 : (x > (Pel)g_uiIBDI_MAX) ? (Pel)g_uiIBDI_MAX : x ); } 201 #if QC_ARP_D0177 202 Void addARP ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip ); 203 Void addARPLuma ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip ); 204 Void addARPChroma ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip ); 205 Void subtractARP ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight ); 206 Void subtractARPLuma ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight ); 207 Void subtractARPChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight ); 208 Void multiplyARP ( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW ); 209 Void multiplyARPLuma ( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW ); 210 Void multiplyARPChroma( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW ); 211 private: 212 Void xxMultiplyLine( Pel * pSrcDst , UInt uiWidth , UChar dW ); 213 #endif 201 214 };// END CLASS DEFINITION TComYuv 202 215 -
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TypeDef.h
r351 r373 95 95 // FIX_LG_RESTRICTEDRESPRED_M24766 1 96 96 97 #define QC_ARP_D0177 1 ////< advanced residual prediction 98 #if QC_ARP_D0177 99 #define QC_ARP_WFNR 3 100 #endif 97 101 ///// ***** DISPARITY VECTOR DERIVATION ********* 98 102 #define H3D_NBDV 1 // Neighboring block disparity derivation
Note: See TracChangeset for help on using the changeset viewer.