Changeset 124 in 3DVCSoftware for trunk/source
- Timestamp:
- 7 Sep 2012, 15:24:21 (12 years ago)
- Location:
- trunk/source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r121 r124 1269 1269 Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset ) 1270 1270 { 1271 #if FIX_VSO_SETUP 1272 m_cRendererModel.setupPart( iHorOffset, Min( g_uiMaxCUHeight, m_iSourceHeight - iHorOffset ) ); 1273 #else 1271 1274 m_cRendererModel.setHorOffset( iHorOffset ); 1275 #endif 1272 1276 #else 1273 1277 Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent ) -
trunk/source/App/TAppRenderer/TAppRendererTop.cpp
r101 r124 533 533 534 534 #if HHI_VSO_SPEEDUP_A0033 535 #if FIX_VSO_SETUP 536 cCurModel.setupPart( 0, m_iSourceHeight ); 537 #else 535 538 cCurModel.setHorOffset( 0 ); 539 #endif 536 540 #endif 537 541 … … 710 714 AOT( m_iLog2SamplingFactor != 0 ); 711 715 #if HHI_VSO_SPEEDUP_A0033 716 #if FIX_VSO_SETUP 717 cCurModel.setupPart( 0, m_iSourceHeight ); 718 #else 712 719 cCurModel.setHorOffset( 0 ); 720 #endif 713 721 #endif 714 722 #if LGE_VSO_EARLY_SKIP_A0093 -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r121 r124 2321 2321 #if H0204_QP_PREDICTION 2322 2322 UInt lPartIdx, aPartIdx; 2323 #if FIX_COMP_WARNING_INIT 2324 lPartIdx = 0; 2325 aPartIdx = 0; 2326 #endif 2323 2327 TComDataCU* cULeft = getQpMinCuLeft ( lPartIdx, m_uiAbsIdxInLCU + uiCurrAbsIdxInLCU ); 2324 2328 TComDataCU* cUAbove = getQpMinCuAbove( aPartIdx, m_uiAbsIdxInLCU + uiCurrAbsIdxInLCU ); -
trunk/source/Lib/TLibCommon/TypeDef.h
r121 r124 48 48 #define FIX_VIRT_DESTRUCTOR 1 49 49 #define FIX_MEM_LEAKS 1 50 #define FIX_VSO_SETUP 1 51 #define FIX_COMP_WARNING_INIT 1 50 52 51 53 #define FIX_LG_RESTRICTEDRESPRED_M24766 1 -
trunk/source/Lib/TLibRenderer/TRenModel.cpp
r101 r124 42 42 m_iWidth = -1; 43 43 m_iHeight = -1; 44 #if FIX_VSO_SETUP 45 m_iUsedHeight = -1; 46 #endif 44 47 m_iNumOfBaseViews = -1; 45 48 m_iSampledWidth = -1; … … 434 437 { 435 438 AOT( iViewNum < 0 || iViewNum > m_iNumOfBaseViews ); 439 #if FIX_VSO_SETUP 440 AOF( pcPicYuvVideoData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvVideoData->getWidth() == m_iWidth ); 441 AOF( pcPicYuvDepthData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvDepthData->getWidth() == m_iWidth ); 442 #else 436 443 AOF( pcPicYuvVideoData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvVideoData->getWidth() == m_iWidth ); 437 444 AOF( pcPicYuvDepthData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvDepthData->getWidth() == m_iWidth ); 445 #endif 438 446 439 447 pcPicYuvVideoData->extendPicBorder(); 440 448 441 442 443 449 #if FIX_VSO_SETUP 450 TRenFilter::sampleHorUp ( m_iShiftPrec, pcPicYuvVideoData->getLumaAddr() + m_uiHorOff * pcPicYuvVideoData->getStride () , pcPicYuvVideoData->getStride() , m_iWidth, m_iUsedHeight, m_aapiCurVideoPel[ iViewNum ][0], m_aaiCurVideoStrides[iViewNum][0] ); 451 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCbAddr() + (m_uiHorOff >> 1 ) * pcPicYuvVideoData->getCStride() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiCurVideoPel[ iViewNum ][1], m_aaiCurVideoStrides[iViewNum][1] ); 452 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCrAddr() + (m_uiHorOff >> 1 ) * pcPicYuvVideoData->getCStride() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiCurVideoPel[ iViewNum ][2], m_aaiCurVideoStrides[iViewNum][2] ); 453 TRenFilter::copy ( pcPicYuvDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvDepthData->getStride () , pcPicYuvDepthData->getStride(), m_iWidth, m_iUsedHeight, m_apiCurDepthPel [ iViewNum], m_aiCurDepthStrides [iViewNum] ); 454 #else 444 455 TRenFilter::sampleHorUp ( m_iShiftPrec, pcPicYuvVideoData->getLumaAddr() + m_uiHorOff * pcPicYuvVideoData->getStride () , pcPicYuvVideoData->getStride() , m_iWidth, m_iHeight, m_aapiCurVideoPel[ iViewNum ][0], m_aaiCurVideoStrides[iViewNum][0] ); 445 456 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCbAddr() + (m_uiHorOff >> 1 ) * pcPicYuvVideoData->getCStride() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiCurVideoPel[ iViewNum ][1], m_aaiCurVideoStrides[iViewNum][1] ); 446 457 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCrAddr() + (m_uiHorOff >> 1 ) * pcPicYuvVideoData->getCStride() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiCurVideoPel[ iViewNum ][2], m_aaiCurVideoStrides[iViewNum][2] ); 447 458 TRenFilter::copy ( pcPicYuvDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvDepthData->getStride () , pcPicYuvDepthData->getStride(), m_iWidth, m_iHeight, m_apiCurDepthPel [ iViewNum], m_aiCurDepthStrides [iViewNum] ); 459 #endif 448 460 449 461 // Used for rendering reference pic from original video data … … 453 465 if ( m_abSetupVideoFromOrgForView[iViewNum] ) 454 466 { 467 #if FIX_VSO_SETUP 468 AOF( pcPicYuvOrgVideoData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvOrgVideoData->getWidth() == m_iWidth ); 469 pcPicYuvOrgVideoData->extendPicBorder(); 470 TRenFilter::sampleHorUp ( m_iShiftPrec, pcPicYuvOrgVideoData->getLumaAddr() + m_uiHorOff * pcPicYuvOrgVideoData->getStride() , pcPicYuvOrgVideoData->getStride() , m_iWidth, m_iUsedHeight, m_aapiOrgVideoPel[ iViewNum ][0], m_aaiOrgVideoStrides[iViewNum][0] ); 471 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCbAddr() + (m_uiHorOff >> 1 ) * pcPicYuvOrgVideoData->getCStride(), pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][1], m_aaiOrgVideoStrides[iViewNum][1] ); 472 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCrAddr() + (m_uiHorOff >> 1 ) * pcPicYuvOrgVideoData->getCStride(), pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][2], m_aaiOrgVideoStrides[iViewNum][2] ); 473 #else 455 474 AOF( pcPicYuvOrgVideoData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvOrgVideoData->getWidth() == m_iWidth ); 456 475 pcPicYuvOrgVideoData->extendPicBorder(); … … 458 477 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCbAddr() + (m_uiHorOff >> 1 ) * pcPicYuvOrgVideoData->getCStride(), pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][1], m_aaiOrgVideoStrides[iViewNum][1] ); 459 478 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCrAddr() + (m_uiHorOff >> 1 ) * pcPicYuvOrgVideoData->getCStride(), pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][2], m_aaiOrgVideoStrides[iViewNum][2] ); 479 #endif 460 480 } 461 481 462 482 if ( m_abSetupDepthFromOrgForView[iViewNum] ) 463 483 { 484 #if FIX_VSO_SETUP 485 AOF( pcPicYuvOrgDepthData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvOrgDepthData->getWidth() == m_iWidth ); 486 TRenFilter::copy ( pcPicYuvOrgDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvOrgDepthData->getStride() , pcPicYuvOrgDepthData->getStride(), m_iWidth, m_iUsedHeight, m_apiOrgDepthPel [ iViewNum], m_aiOrgDepthStrides [iViewNum] ); 487 #else 464 488 AOF( pcPicYuvOrgDepthData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvOrgDepthData->getWidth() == m_iWidth ); 465 489 TRenFilter::copy ( pcPicYuvOrgDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvOrgDepthData->getStride() , pcPicYuvOrgDepthData->getStride(), m_iWidth, m_iHeight, m_apiOrgDepthPel [ iViewNum], m_aiOrgDepthStrides [iViewNum] ); 490 #endif 466 491 } 467 492 } … … 471 496 { 472 497 AOT( iModelNum < 0 || iModelNum > m_iNumOfRenModels ); 498 499 #if FIX_VSO_SETUP 500 m_apcRenModels[iModelNum]->setupPart( m_uiHorOff, m_iUsedHeight ); 501 #endif 473 502 474 503 // Switch model to original data for setup if given to render reference … … 476 505 for (Int iBaseViewIdx = 0; iBaseViewIdx < m_iNumOfBaseViews; iBaseViewIdx++ ) 477 506 { 478 479 507 Bool bSetupFromOrgVideo = m_abSetupVideoFromOrgForView[iBaseViewIdx]; 480 508 Bool bSetupFromOrgDepth = m_abSetupDepthFromOrgForView[iBaseViewIdx]; … … 492 520 } 493 521 522 #if FIX_VSO_SETUP 523 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, false ); 524 #else 494 525 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, false, m_uiHorOff ); 526 #endif 495 527 496 528 // Setup to Org … … 513 545 514 546 // setup keeping reference rendered from original data 547 #if FIX_VSO_SETUP 548 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, true ); 549 #else 515 550 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, true, m_uiHorOff); 551 #endif 516 552 } 517 553 } … … 543 579 544 580 545 Void 581 #if FIX_VSO_SETUP 582 Void 583 TRenModel::setupPart ( UInt uiHorOff, Int iUsedHeight ) 584 { 585 AOT( iUsedHeight > m_iHeight ); 586 m_uiHorOff = uiHorOff; 587 m_iUsedHeight = iUsedHeight; 588 } 589 #else 590 Void 546 591 TRenModel::setHorOffset ( UInt uiHorOff ) 547 592 { 548 m_uiHorOff = uiHorOff; 549 } 593 m_uiHorOff = uiHorOff; 594 } 595 #endif 550 596 551 597 #if LGE_VSO_EARLY_SKIP_A0093 … … 560 606 561 607 AOT( iWidth + iStartPosX > m_iWidth ); 608 #if FIX_VSO_SETUP 609 AOT( iHeight + iStartPosY > m_iUsedHeight ); 610 #else 562 611 AOT( iHeight + iStartPosY > m_iHeight ); 612 #endif 613 563 614 AOT( iStartPosX < 0); 564 615 AOT( iStartPosY < 0); … … 593 644 594 645 iWidth = min(iWidth , m_iWidth - iStartPosX ); 646 #if FIX_VSO_SETUP 647 iHeight = min(iHeight, m_iUsedHeight - iStartPosY ); 648 #else 595 649 iHeight = min(iHeight, m_iHeight - iStartPosY ); 650 #endif 596 651 597 652 AOT( iStartPosX < 0); … … 629 684 TRenModel::getSynthVideo( Int iModelNum, Int iViewNum, TComPicYuv* pcPicYuv ) 630 685 { 686 #if FIX_VSO_SETUP 687 m_apcRenModels[iModelNum]->getSynthVideo(iViewNum, pcPicYuv ); 688 #else 631 689 m_apcRenModels[iModelNum]->getSynthVideo(iViewNum, pcPicYuv, m_uiHorOff ); 690 #endif 632 691 } 633 692 … … 635 694 TRenModel::getSynthDepth( Int iModelNum, Int iViewNum, TComPicYuv* pcPicYuv ) 636 695 { 637 #if HHI_VSO_SPEEDUP_A0033 696 #if HHI_VSO_SPEEDUP_A0033 && !FIX_VSO_SETUP 638 697 m_apcRenModels[iModelNum]->getSynthDepth(iViewNum, pcPicYuv, m_uiHorOff ); 639 698 #else … … 646 705 { 647 706 TComPicYuv cPicYuvSynth; 707 #if FIX_VSO_SETUP 708 cPicYuvSynth.create( m_iWidth, m_iUsedHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 709 #else 648 710 cPicYuvSynth.create( m_iWidth, m_iHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 711 #endif 649 712 650 713 TComPicYuv cPicYuvTempRef; 714 #if FIX_VSO_SETUP 715 cPicYuvTempRef.create( m_iWidth, m_iUsedHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth); 716 #else 651 717 cPicYuvTempRef.create( m_iWidth, m_iHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth); 718 #endif 652 719 653 720 Int64 iSSEY = 0; … … 657 724 for (Int iCurModel = 0; iCurModel < m_iNumOfCurRenModels; iCurModel++) 658 725 { 726 #if FIX_VSO_SETUP 727 m_apcCurRenModels[iCurModel]->getSynthVideo( m_aiCurPosInModels[iCurModel], &cPicYuvSynth ); 728 m_apcCurRenModels[iCurModel]->getRefVideo ( m_aiCurPosInModels[iCurModel], &cPicYuvTempRef ); 729 730 iSSEY += TRenFilter::SSE( cPicYuvSynth.getLumaAddr(), cPicYuvSynth.getStride(), m_iWidth, m_iUsedHeight , cPicYuvTempRef.getLumaAddr(), cPicYuvTempRef.getStride() ); 731 iSSEU += TRenFilter::SSE( cPicYuvSynth.getCbAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, cPicYuvTempRef.getCbAddr() , cPicYuvTempRef.getCStride()); 732 iSSEV += TRenFilter::SSE( cPicYuvSynth.getCrAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, cPicYuvTempRef.getCrAddr() , cPicYuvTempRef.getCStride()); 733 #else 659 734 m_apcCurRenModels[iCurModel]->getSynthVideo( m_aiCurPosInModels[iCurModel], &cPicYuvSynth, 0 ); 660 735 TComPicYuv* pcPicYuvRef = &cPicYuvTempRef; … … 664 739 iSSEU += TRenFilter::SSE( cPicYuvSynth.getCbAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iHeight >> 1, pcPicYuvRef->getCbAddr() , pcPicYuvRef->getCStride()); 665 740 iSSEV += TRenFilter::SSE( cPicYuvSynth.getCrAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iHeight >> 1, pcPicYuvRef->getCrAddr() , pcPicYuvRef->getCStride()); 741 #endif 666 742 } 667 743 -
trunk/source/Lib/TLibRenderer/TRenModel.h
r101 r124 62 62 63 63 // Set horizontal offset 64 #if FIX_VSO_SETUP 65 Void setupPart ( UInt uiHorOff, Int iUsedHeight ); 66 #else 64 67 Void setHorOffset ( UInt uiHorOff ); 68 #endif 65 69 66 70 // Set Mode 67 Void setErrorMode ( Int iView, Int iContent, int iPlane );71 Void setErrorMode ( Int iView, Int iContent, Int iPlane ); 68 72 69 73 // Get Distortion, set Data … … 100 104 Int m_iSampledWidth; 101 105 Int m_iPad; 106 #if FIX_VSO_SETUP 107 Int m_iUsedHeight; // height currently used in buffer, whereas m_iHeight is the total height of the buffer 108 #endif 109 102 110 103 111 Int m_iNumOfBaseViews; -
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>; -
trunk/source/Lib/TLibRenderer/TRenSingleModel.h
r105 r124 80 80 // Set Frame dependent data 81 81 virtual Void setLRView ( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride ) = 0; 82 #if FIX_VSO_SETUP 83 virtual Void setupPart ( UInt uiHorOffset, Int iUsedHeight ) = 0; 84 virtual Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference ) = 0; 85 #else 82 86 virtual Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference, UInt uiHorOffset ) = 0; 87 #endif 83 88 84 89 // Set Data … … 98 103 virtual RMDist getDistVideo ( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) = 0; 99 104 105 #if FIX_VSO_SETUP 106 virtual Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv ) = 0; 107 virtual Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv ) = 0; 108 virtual Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv ) = 0; 109 #else 100 110 virtual Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) = 0; 101 111 virtual Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) = 0; 102 112 virtual Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) = 0; 113 #endif 103 114 }; 104 115 … … 170 181 // Set Frame dependent data 171 182 Void setLRView ( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride ); 183 #if FIX_VSO_SETUP 184 Void setupPart ( UInt uiHorOffset, Int uiUsedHeight ); 185 Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference ); 186 #else 172 187 Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference, UInt uiHorOffset ); 188 #endif 173 189 174 190 #if LGE_VSO_EARLY_SKIP_A0093 … … 187 203 RMDist getDistVideo ( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ); 188 204 205 #if FIX_VSO_SETUP 206 Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv ); 207 Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv ); 208 Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv ); 209 #else 189 210 Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ); 190 211 Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ); 191 212 Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ); 213 #endif 192 214 193 215 private: … … 198 220 ///// Rendering ///// 199 221 // Left to Right 200 #if defLGE_VSO_EARLY_SKIP_A0093222 #if LGE_VSO_EARLY_SKIP_A0093 201 223 __inline Bool xDetectEarlySkipL ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData,Pel* piOrgData, Int iOrgStride ); 202 224 __inline Bool xDetectEarlySkipR ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData,Pel* piOrgData, Int iOrgStride ); … … 234 256 __inline Void xGetBlendedValueBM2 ( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV ); 235 257 #else 236 __inline Void xGetBlendedValue ( Pel iYL, 258 __inline Void xGetBlendedValue ( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY ); 237 259 __inline Void xGetBlendedValueBM1 ( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY ); 238 260 __inline Void xGetBlendedValueBM2 ( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY ); … … 241 263 242 264 // General 243 template<Bool bSet> __inline Void xSetShiftedPelL (Int iSourcePos, Int iSubSourcePos, Int iTargetSPos,Pel iFilled, RMDist& riError );265 template<Bool bSet> __inline Void xSetShiftedPelL (Int iSourcePos, Int iSubSourcePos, Int iTargetSPos, Pel iFilled, RMDist& riError ); 244 266 template<Bool bSet> __inline Void xSetShiftedPelBlendL (RenModelInPels* pcInSample, Int iSubSourcePos, RenModelOutPels* pcOutSample, Pel iFilled, RMDist& riError ); 245 267 template<Bool bSet> __inline Void xSetShiftedPelNoBlendL(RenModelInPels* pcInSample, Int iSubSourcePos, RenModelOutPels* pcOutSample, Pel iFilled, RMDist& riError ); 246 268 247 template<Bool bSet> __inline Void xSetShiftedPelR (Int iSourcePos, Int iSubSourcePos, Int iTargetSPos,Pel iFilled, RMDist& riError );269 template<Bool bSet> __inline Void xSetShiftedPelR (Int iSourcePos, Int iSubSourcePos, Int iTargetSPos, Pel iFilled, RMDist& riError ); 248 270 template<Bool bSet> __inline Void xSetShiftedPelBlendR (RenModelInPels* pcInSample, Int iSubSourcePos, RenModelOutPels* pcOutSample, Pel iFilled, RMDist& riError ); 249 271 template<Bool bSet> __inline Void xSetShiftedPelNoBlendR(RenModelInPels* pcInSample, Int iSubSourcePos, RenModelOutPels* pcOutSample, Pel iFilled, RMDist& riError ); … … 271 293 Void xInitSampleStructs (); 272 294 Void xSetStructSynthViewAsRefView (); 295 #if FIX_VSO_SETUP 296 Void xCopy2PicYuv ( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget ); 297 #else 273 298 Void xCopy2PicYuv ( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget, UInt uiHorOffset ); 274 299 #endif 275 300 276 301 template< typename S, typename T> 277 302 Void xCopyFromSampleStruct ( S* ptSource , Int iSourceStride, T S::* ptSourceElement, T* ptTarget, Int iTargetStride, Int iWidth, Int iHeight ) 278 303 { 304 #if FIX_VSO_SETUP 305 AOT( iWidth != m_iWidth ); 306 for (Int iPosY = 0; iPosY < iHeight; iPosY++) 307 #else 279 308 for (Int iPosY = 0; iPosY < m_iHeight; iPosY++) 309 #endif 280 310 { 281 311 for (Int iPosX = 0; iPosX < m_iWidth; iPosX++) … … 291 321 Void xCopyToSampleStruct ( T* ptSource , Int iSourceStride, S* ptTarget, Int iTargetStride, T S::* ptSourceElement, Int iWidth, Int iHeight ) 292 322 { 323 #if FIX_VSO_SETUP 324 AOT( iWidth != m_iWidth ); 325 for (Int iPosY = 0; iPosY < iHeight; iPosY++) 326 #else 293 327 for (Int iPosY = 0; iPosY < m_iHeight; iPosY++) 328 #endif 294 329 { 295 330 for (Int iPosX = 0; iPosX < m_iWidth; iPosX++) … … 309 344 Int m_iStride; 310 345 Int m_iPad; 346 #if FIX_VSO_SETUP 347 Int m_iUsedHeight; 348 Int m_iHorOffset; 349 #endif 311 350 312 351 Int m_iSampledWidth; 352 #if FIX_VSO_SETUP 353 #else 313 354 Int m_iSampledHeight; 355 #endif 314 356 Int m_iSampledStride; 315 357 316 358 RenModelInPels* m_pcInputSamples[2]; 317 Int 359 Int m_iInputSamplesStride; 318 360 319 361 // Base
Note: See TracChangeset for help on using the changeset viewer.