Changeset 124 in 3DVCSoftware for trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp
- Timestamp:
- 7 Sep 2012, 15:24:21 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp
r121 r124 44 44 m_iHeight = -1; 45 45 m_iStride = -1; 46 #if FIX_VSO_SETUP 47 m_iUsedHeight = -1; 48 m_iHorOffset = -1; 49 #endif 46 50 m_iMode = -1; 47 51 m_iPad = PICYUV_PAD; … … 90 94 { 91 95 #ifdef LGE_VSO_EARLY_SKIP_A0093 92 if ( m_pbHorSkip)96 if ( m_pbHorSkip ) 93 97 { 94 98 delete[] m_pbHorSkip; … … 193 197 Int iOffsetX = ( iViewPos == VIEWPOS_RIGHT ) ? 1 : 0; 194 198 199 #if FIX_VSO_SETUP 200 for ( Int iPosY = 0; iPosY < m_iUsedHeight; iPosY++ ) 201 #else 195 202 for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ ) 203 #endif 196 204 { 197 205 if ( iViewPos == VIEWPOS_RIGHT ) … … 237 245 238 246 } 239 240 template <BlenMod iBM, Bool bBitInc> Void 247 #if FIX_VSO_SETUP 248 template <BlenMod iBM, Bool bBitInc> Void 249 TRenSingleModelC<iBM,bBitInc>::setupPart ( UInt uiHorOffset, Int iUsedHeight ) 250 { 251 AOT( iUsedHeight > m_iHeight ); 252 253 m_iUsedHeight = iUsedHeight; 254 m_iHorOffset = (Int) uiHorOffset; 255 } 256 #endif 257 258 template <BlenMod iBM, Bool bBitInc> Void 259 #if FIX_VSO_SETUP 260 TRenSingleModelC<iBM,bBitInc>::setup( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference ) 261 #else 241 262 TRenSingleModelC<iBM,bBitInc>::setup( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference, UInt uiHorOff ) 263 #endif 242 264 { 243 265 AOT( !m_bUseOrgRef && pcOrgVideo ); … … 253 275 if ( pcOrgVideo && !bKeepReference ) 254 276 { 277 #if FIX_VSO_SETUP 278 TRenFilter::copy( pcOrgVideo->getLumaAddr() + m_iHorOffset * pcOrgVideo->getStride() , pcOrgVideo->getStride() , m_iWidth, m_iUsedHeight, m_aapiRefVideoPel[0], m_aiRefVideoStrides[0]); 279 TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCbAddr() + (m_iHorOffset >> 1) * pcOrgVideo->getCStride(), pcOrgVideo->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiRefVideoPel[1], m_aiRefVideoStrides[1]); 280 TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCrAddr() + (m_iHorOffset >> 1) * pcOrgVideo->getCStride(), pcOrgVideo->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiRefVideoPel[2], m_aiRefVideoStrides[2]); 281 #else 255 282 TRenFilter::copy( pcOrgVideo->getLumaAddr() + uiHorOff * pcOrgVideo->getStride() , pcOrgVideo->getStride() , m_iWidth, m_iHeight, m_aapiRefVideoPel[0], m_aiRefVideoStrides[0]); 256 283 TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCbAddr() + (uiHorOff >> 1) * pcOrgVideo->getCStride(), pcOrgVideo->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiRefVideoPel[1], m_aiRefVideoStrides[1]); 257 284 TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCrAddr() + (uiHorOff >> 1) * pcOrgVideo->getCStride(), pcOrgVideo->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiRefVideoPel[2], m_aiRefVideoStrides[2]); 285 #endif 258 286 xSetStructRefView(); 259 287 } … … 262 290 xResetStructError(); 263 291 xInitSampleStructs(); 264 292 #if FIX_VSO_SETUP 293 switch ( m_iMode ) 294 { 295 case 0: 296 #if LGE_VSO_EARLY_SKIP_A0093 297 xRenderL<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0],false ); 298 #else 299 xRenderL<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0] ); 300 #endif 301 break; 302 case 1: 303 #ifdef LGE_VSO_EARLY_SKIP_A0093 304 xRenderR<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1],false); 305 #else 306 xRenderR<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1] ); 307 #endif 308 break; 309 case 2: 310 TRenFilter::setupZLUT( true, 30, iDistToLeft, ppiBaseShiftLutLeft, ppiBaseShiftLutRight, m_iBlendZThres, m_iBlendDistWeight, m_piInvZLUTLeft, m_piInvZLUTRight ); 311 #ifdef LGE_VSO_EARLY_SKIP_A0093 312 xRenderL<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0],false); 313 xRenderR<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1],false); 314 #else 315 xRenderL<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0] ); 316 xRenderR<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1] ); 317 #endif 318 break; 319 default: 320 AOT(true); 321 } 322 #else 265 323 switch ( m_iMode ) 266 324 { … … 292 350 AOT(true); 293 351 } 352 #endif 294 353 295 354 // Get Rendered View as Reference … … 354 413 #endif 355 414 415 #if FIX_VSO_SETUP 416 for ( Int iPosY = 0; iPosY < m_iUsedHeight; iPosY++ ) 417 #else 356 418 for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ ) 419 #endif 357 420 { 358 421 for ( Int iPosX = 0; iPosX < m_iWidth; iPosX++ ) … … 407 470 #endif 408 471 472 #if FIX_VSO_SETUP 473 for ( Int iPosY = 0; iPosY < m_iUsedHeight; iPosY++ ) 474 #else 409 475 for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ ) 476 #endif 410 477 { 411 478 for ( Int iPosX = 0; iPosX < m_iWidth; iPosX++ ) … … 550 617 } 551 618 619 #if FIX_VSO_SETUP 620 template <BlenMod iBM, Bool bBitInc> Void 621 TRenSingleModelC<iBM,bBitInc>::getSynthVideo( Int iViewPos, TComPicYuv* pcPicYuv ) 622 { 623 AOT( pcPicYuv->getWidth() != m_iWidth ); 624 AOT( pcPicYuv->getHeight() < m_iUsedHeight + m_iHorOffset ); 625 626 #if HHI_VSO_COLOR_PLANES 627 Pel RenModelOutPels::* piText[3] = { NULL, NULL, NULL }; 628 xGetSampleStrTextPtrs(iViewPos, piText[0], piText[1], piText[2]); 629 630 // Temp image for chroma down sampling 631 PelImage cTempImage( m_iWidth, m_iUsedHeight, 3, 0); 632 633 Int aiStrides[3]; 634 Pel* apiData [3]; 635 636 cTempImage.getDataAndStrides( apiData, aiStrides ); 637 638 for (UInt uiCurPlane = 0; uiCurPlane < 3; uiCurPlane++ ) 639 { 640 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piText[uiCurPlane], apiData[uiCurPlane], aiStrides[uiCurPlane] , m_iWidth, m_iUsedHeight); 641 } 642 xCopy2PicYuv( apiData, aiStrides, pcPicYuv ); 643 #else 644 Pel RenModelOutPels::* piY; 645 xGetSampleStrTextPtrs(iViewPos, piY); 646 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piY, pcPicYuv->getLumaAddr() + m_iHorOffset * pcPicYuv->getStride(), pcPicYuv->getStride(), m_iWidth, m_iUsedHeight ); 647 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement ); 648 #endif 649 } 650 #else 552 651 template <BlenMod iBM, Bool bBitInc> Void 553 652 TRenSingleModelC<iBM,bBitInc>::getSynthVideo( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) … … 562 661 // Temp image for chroma down sampling 563 662 PelImage cTempImage( m_iWidth, m_iHeight, 3, 0); 663 564 664 Int aiStrides[3]; 565 665 Pel* apiData [3]; … … 571 671 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piText[uiCurPlane], apiData[uiCurPlane], aiStrides[uiCurPlane] , m_iWidth, m_iHeight); 572 672 } 573 574 673 xCopy2PicYuv( apiData, aiStrides, pcPicYuv, uiHorOffset ); 575 674 #else … … 580 679 #endif 581 680 } 582 583 681 #endif 682 683 #if FIX_VSO_SETUP 684 template <BlenMod iBM, Bool bBitInc> Void 685 TRenSingleModelC<iBM,bBitInc>::getSynthDepth( Int iViewPos, TComPicYuv* pcPicYuv ) 686 { 687 AOT( iViewPos != 0 && iViewPos != 1); 688 AOT( pcPicYuv->getWidth() != m_iWidth ); 689 AOT( pcPicYuv->getHeight() < m_iUsedHeight + m_iHorOffset ); 690 691 Pel RenModelOutPels::* piD = 0; 692 xGetSampleStrDepthPtrs(iViewPos, piD); 693 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piD, pcPicYuv->getLumaAddr() + pcPicYuv->getStride() * m_iHorOffset, pcPicYuv->getStride(), m_iWidth, m_iUsedHeight ); 694 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement ); 695 } 696 697 #else 584 698 template <BlenMod iBM, Bool bBitInc> Void 585 699 TRenSingleModelC<iBM,bBitInc>::getSynthDepth( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOff ) 586 700 { 587 701 AOT( iViewPos != 0 && iViewPos != 1); 588 589 702 AOT( pcPicYuv->getWidth() != m_iWidth ); 590 703 AOT( pcPicYuv->getHeight() > m_iHeight + uiHorOff ); … … 595 708 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement ); 596 709 } 597 710 #endif 711 712 #if FIX_VSO_SETUP 713 template <BlenMod iBM, Bool bBitInc> Void 714 TRenSingleModelC<iBM,bBitInc>::getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv ) 715 { 716 AOT( pcPicYuv->getWidth() != m_iWidth ); 717 AOT( pcPicYuv->getHeight() < m_iUsedHeight + m_iHorOffset); 718 719 #if HHI_VSO_COLOR_PLANES 720 Pel RenModelOutPels::* piText[3]; 721 piText[0] = &RenModelOutPels::iYRef; 722 piText[1] = &RenModelOutPels::iURef; 723 piText[2] = &RenModelOutPels::iVRef; 724 725 // Temp image for chroma down sampling 726 727 PelImage cTempImage( m_iWidth, m_iUsedHeight, 3, 0); 728 Int aiStrides[3]; 729 Pel* apiData [3]; 730 731 cTempImage.getDataAndStrides( apiData, aiStrides ); 732 733 for (UInt uiCurPlane = 0; uiCurPlane < 3; uiCurPlane++ ) 734 { 735 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piText[uiCurPlane], apiData[uiCurPlane], aiStrides[uiCurPlane] , m_iWidth, m_iUsedHeight); 736 } 737 738 xCopy2PicYuv( apiData, aiStrides, pcPicYuv ); 739 #else 740 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, &RenModelOutPels::iYRef, pcPicYuv->getLumaAddr() * pcPicYuv->getStride() + m_iHorOffset, pcPicYuv->getStride(), m_iWidth, m_iUsedHeight ); 741 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement ); 742 #endif 743 } 744 #else 598 745 template <BlenMod iBM, Bool bBitInc> Void 599 746 TRenSingleModelC<iBM,bBitInc>::getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) … … 609 756 610 757 // Temp image for chroma down sampling 758 611 759 PelImage cTempImage( m_iWidth, m_iHeight, 3, 0); 612 760 Int aiStrides[3]; … … 618 766 { 619 767 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piText[uiCurPlane], apiData[uiCurPlane], aiStrides[uiCurPlane] , m_iWidth, m_iHeight); 620 } 768 } 621 769 622 770 xCopy2PicYuv( apiData, aiStrides, pcPicYuv, uiHorOffset ); … … 626 774 #endif 627 775 } 628 776 #endif 629 777 630 778 template <BlenMod iBM, Bool bBitInc> RMDist … … 682 830 // Get Data 683 831 m_ppiCurLUT = m_appiShiftLut [iCurViewPos]; 684 685 832 xSetViewRow ( iStartPosY); 686 833 … … 770 917 { 771 918 break; 772 919 } 773 920 774 921 iCurPosX--; … … 816 963 iEndChangePos = m_iStartChangePosX + iWidth - 1; 817 964 818 819 965 for (Int iPosY = iStartPosY; iPosY < iStartPosY + iHeight; iPosY++ ) 820 966 { 821 822 967 #ifdef LGE_VSO_EARLY_SKIP_A0093 823 968 if( m_bEarlySkip && bFast ) … … 1873 2018 } 1874 2019 2020 #if FIX_VSO_SETUP 2021 template <BlenMod iBM, Bool bBitInc> Void 2022 TRenSingleModelC<iBM,bBitInc>::xCopy2PicYuv( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget ) 2023 { 2024 TRenFilter::copy ( ppiSrcVideoPel[0], piStrides[0], m_iWidth, m_iUsedHeight, rpcPicYuvTarget->getLumaAddr() + m_iHorOffset * rpcPicYuvTarget->getStride() , rpcPicYuvTarget->getStride () ); 2025 TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[1], piStrides[1], m_iWidth, m_iUsedHeight, rpcPicYuvTarget->getCbAddr () + (m_iHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() ); 2026 TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[2], piStrides[2], m_iWidth, m_iUsedHeight, rpcPicYuvTarget->getCrAddr () + (m_iHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() ); 2027 } 2028 #else 1875 2029 template <BlenMod iBM, Bool bBitInc> Void 1876 2030 TRenSingleModelC<iBM,bBitInc>::xCopy2PicYuv( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget, UInt uiHorOffset ) … … 1880 2034 TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[2], piStrides[2], m_iWidth, m_iHeight, rpcPicYuvTarget->getCrAddr () + (uiHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() ); 1881 2035 } 2036 #endif 1882 2037 1883 2038 template class TRenSingleModelC<BLEND_NONE ,true>;
Note: See TracChangeset for help on using the changeset viewer.