Changeset 226 in 3DVCSoftware for branches/HTM-5.1-dev1-HHI/source/Lib
- Timestamp:
- 24 Jan 2013, 19:24:16 (12 years ago)
- Location:
- branches/HTM-5.1-dev1-HHI/source/Lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-5.1-dev1-HHI/source/Lib/TLibCommon/TComPrediction.cpp
r210 r226 2277 2277 getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft ); 2278 2278 2279 #if HHI_DMM_DELTADC_Q1_C0034 2280 #else 2279 2281 if( bDelta ) 2280 2282 { … … 2282 2284 xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 ); 2283 2285 } 2286 #endif 2284 2287 2285 2288 // assign wedge pred DCs to prediction … … 2302 2305 getWedgePredDCs( pcContourWedge, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft ); 2303 2306 2307 #if HHI_DMM_DELTADC_Q1_C0034 2308 #else 2304 2309 if( bDelta ) 2305 2310 { … … 2307 2312 xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 ); 2308 2313 } 2314 #endif 2309 2315 2310 2316 // assign wedge pred DCs to prediction … … 2483 2489 getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft ); 2484 2490 2491 #if HHI_DMM_DELTADC_Q1_C0034 2492 #else 2485 2493 if( bDelta ) 2486 2494 { … … 2488 2496 xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 ); 2489 2497 } 2498 #endif 2490 2499 2491 2500 // assign wedge pred DCs to prediction … … 2524 2533 getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft ); 2525 2534 2535 #if HHI_DMM_DELTADC_Q1_C0034 2536 #else 2526 2537 if( bDelta ) 2527 2538 { … … 2529 2540 xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 ); 2530 2541 } 2542 #endif 2531 2543 2532 2544 // assign wedge pred DCs to prediction -
branches/HTM-5.1-dev1-HHI/source/Lib/TLibCommon/TypeDef.h
r225 r226 81 81 #define RWTH_SDC_DLT_B0036 1 // JCT3V-B0036: Simplified Depth Coding + Depth Lookup Table 82 82 #define HHIQC_DMMFASTSEARCH_B0039 1 // JCT3V-B0039: fast Wedgelet search for DMM modes 1 and 3 83 #define HHI_DMM_DELTADC_Q1_C0034 1 // JCT3V-C0034: no quantization and fast encoder search for DMM delta DC values 84 83 85 84 86 ///// ***** INTERVIEW MOTION VECTOR PREDICTION ********* -
branches/HTM-5.1-dev1-HHI/source/Lib/TLibEncoder/TEncSearch.cpp
r210 r226 6564 6564 Int iFullDeltaDC2 = riDeltaDC2; 6565 6565 6566 #if HHI_DMM_DELTADC_Q1_C0034 6567 #else 6566 6568 xDeltaDCQuantScaleDown( pcCU, iFullDeltaDC1 ); 6567 6569 xDeltaDCQuantScaleDown( pcCU, iFullDeltaDC2 ); 6570 #endif 6568 6571 6569 6572 Dist uiBestDist = RDO_DIST_MAX; … … 6578 6581 uiDeltaDC2Max += (uiDeltaDC2Max>>1); 6579 6582 6583 #if HHI_DMM_DELTADC_Q1_C0034 6584 // limit search range to [0, IBDI_MAX] 6585 if( iFullDeltaDC1 < 0 && uiDeltaDC1Max > abs(iPredDC1) ) { uiDeltaDC1Max = abs(iPredDC1); } 6586 if( iFullDeltaDC1 >= 0 && uiDeltaDC1Max > g_uiIBDI_MAX - abs(iPredDC1) ) { uiDeltaDC1Max = g_uiIBDI_MAX - abs(iPredDC1); } 6587 6588 if( iFullDeltaDC2 < 0 && uiDeltaDC2Max > abs(iPredDC2) ) { uiDeltaDC2Max = abs(iPredDC2); } 6589 if( iFullDeltaDC2 >= 0 && uiDeltaDC2Max > g_uiIBDI_MAX - abs(iPredDC2) ) { uiDeltaDC2Max = g_uiIBDI_MAX - abs(iPredDC2); } 6590 6591 // init dist with original DCs 6592 assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iDC1, iDC2 ); 6593 6594 Dist uiOrgDist = RDO_DIST_MAX; 6595 #if SAIT_VSO_EST_A0033 6596 if ( m_pcRdCost->getUseEstimatedVSD() ) 6597 { 6598 TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv(); 6599 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6600 uiOrgDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 6601 #if LGE_WVSO_A0119 6602 if ( m_pcRdCost->getUseWVSO() ) 6603 { 6604 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6605 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6606 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6607 uiOrgDist = (iDWeight * iD + iVSDWeight * (Dist) uiOrgDist) / ( iDWeight + iVSDWeight); 6608 } 6609 #endif // LGE_WVSO_A0119 6610 } 6611 else 6612 #endif // SAIT_VSO_EST_A0033 6613 { 6614 uiOrgDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, 0 ); 6615 #if LGE_WVSO_A0119 6616 if ( m_pcRdCost->getUseWVSO() ) 6617 { 6618 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6619 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 6620 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6621 uiOrgDist = (iDWeight * iD + iVSOWeight * (Dist) uiOrgDist) / ( iDWeight + iVSOWeight); 6622 } 6623 #endif // LGE_WVSO_A0119 6624 } 6625 uiBestDist = uiOrgDist; 6626 uiBestQStepDC1 = abs(iFullDeltaDC1); 6627 uiBestQStepDC2 = abs(iFullDeltaDC2); 6628 6629 // coarse search with step size 4 6630 for( UInt uiQStepDC1 = 0; uiQStepDC1 < uiDeltaDC1Max; uiQStepDC1 += 4 ) 6631 { 6632 Int iTestDC1 = Clip( iPredDC1 + ((Int)(uiQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1)) ); 6633 for( UInt uiQStepDC2 = 0; uiQStepDC2 < uiDeltaDC2Max; uiQStepDC2 += 4 ) 6634 { 6635 Int iTestDC2 = Clip( iPredDC2 + ((Int)(uiQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1)) ); 6636 6637 assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iTestDC1, iTestDC2 ); 6638 6639 Dist uiAct4Dist = RDO_DIST_MAX; 6640 #if SAIT_VSO_EST_A0033 6641 if ( m_pcRdCost->getUseEstimatedVSD() ) 6642 { 6643 TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv(); 6644 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6645 uiAct4Dist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 6646 #if LGE_WVSO_A0119 6647 if ( m_pcRdCost->getUseWVSO() ) 6648 { 6649 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6650 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6651 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6652 uiAct4Dist = (iDWeight * iD + iVSDWeight * (Dist) uiAct4Dist) / ( iDWeight + iVSDWeight); 6653 } 6654 #endif // LGE_WVSO_A0119 6655 } 6656 else 6657 #endif // SAIT_VSO_EST_A0033 6658 { 6659 uiAct4Dist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, 0 ); 6660 #if LGE_WVSO_A0119 6661 if ( m_pcRdCost->getUseWVSO() ) 6662 { 6663 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6664 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 6665 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6666 uiAct4Dist = (iDWeight * iD + iVSOWeight * (Dist) uiAct4Dist) / ( iDWeight + iVSOWeight); 6667 } 6668 #endif // LGE_WVSO_A0119 6669 } 6670 6671 if( uiAct4Dist < uiBestDist || uiBestDist == RDO_DIST_MAX ) 6672 { 6673 uiBestDist = uiAct4Dist; 6674 uiBestQStepDC1 = uiQStepDC1; 6675 uiBestQStepDC2 = uiQStepDC2; 6676 } 6677 } 6678 } 6679 6680 // refinement +-3 6681 for( UInt uiQStepDC1 = (UInt)max(0, ((Int)uiBestQStepDC1-3)); uiQStepDC1 <= (uiBestQStepDC1+3); uiQStepDC1++ ) 6682 { 6683 Int iTestDC1 = Clip( iPredDC1 + ((Int)(uiQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1)) ); 6684 for( UInt uiQStepDC2 = (UInt)max(0, ((Int)uiBestQStepDC2-3)); uiQStepDC2 <= (uiBestQStepDC2+3); uiQStepDC2++ ) 6685 { 6686 Int iTestDC2 = Clip( iPredDC2 + ((Int)(uiQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1)) ); 6687 6688 assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iTestDC1, iTestDC2 ); 6689 6690 Dist uiActDist = RDO_DIST_MAX; 6691 #if SAIT_VSO_EST_A0033 6692 if ( m_pcRdCost->getUseEstimatedVSD() ) 6693 { 6694 TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv(); 6695 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6696 uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 6697 #if LGE_WVSO_A0119 6698 if ( m_pcRdCost->getUseWVSO() ) 6699 { 6700 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6701 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6702 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6703 uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight); 6704 } 6705 #endif // LGE_WVSO_A0119 6706 } 6707 else 6708 #endif // SAIT_VSO_EST_A0033 6709 { 6710 uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, 0 ); 6711 #if LGE_WVSO_A0119 6712 if ( m_pcRdCost->getUseWVSO() ) 6713 { 6714 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6715 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 6716 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6717 uiActDist = (iDWeight * iD + iVSOWeight * (Dist) uiActDist) / ( iDWeight + iVSOWeight); 6718 } 6719 #endif // LGE_WVSO_A0119 6720 } 6721 6722 if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX ) 6723 { 6724 uiBestDist = uiActDist; 6725 uiBestQStepDC1 = uiQStepDC1; 6726 uiBestQStepDC2 = uiQStepDC2; 6727 } 6728 } 6729 } 6730 #else 6580 6731 for( UInt uiQStepDC1 = 1; uiQStepDC1 <= uiDeltaDC1Max; uiQStepDC1++ ) 6581 6732 { … … 6633 6784 } 6634 6785 } 6635 6786 #endif 6636 6787 iFullDeltaDC1 = (Int)(uiBestQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1); 6637 6788 iFullDeltaDC2 = (Int)(uiBestQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1); 6789 #if HHI_DMM_DELTADC_Q1_C0034 6790 #else 6638 6791 xDeltaDCQuantScaleUp( pcCU, iFullDeltaDC1 ); 6639 6792 xDeltaDCQuantScaleUp( pcCU, iFullDeltaDC2 ); 6793 #endif 6640 6794 riDeltaDC1 = iFullDeltaDC1; 6641 6795 riDeltaDC2 = iFullDeltaDC2; … … 6643 6797 #endif 6644 6798 6799 #if HHI_DMM_DELTADC_Q1_C0034 6800 #else 6645 6801 xDeltaDCQuantScaleDown( pcCU, riDeltaDC1 ); 6646 6802 xDeltaDCQuantScaleDown( pcCU, riDeltaDC2 ); 6803 #endif 6647 6804 } 6648 6805 #endif
Note: See TracChangeset for help on using the changeset viewer.