Changeset 1396 in 3DVCSoftware for trunk/source/Lib/TLibRenderer/TRenModel.cpp
- Timestamp:
- 11 Mar 2016, 16:54:51 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibRenderer/TRenModel.cpp
r1313 r1396 216 216 Void 217 217 #if H_3D_VSO_EARLY_SKIP 218 TRenModel::create( Int iNumOfBaseViews, Int iNumOfModels, Int iWidth, Int iHeight, Int iShiftPrec, Int iHoleMargin, Bool b EarlySkip )218 TRenModel::create( Int iNumOfBaseViews, Int iNumOfModels, Int iWidth, Int iHeight, Int iShiftPrec, Int iHoleMargin, Bool bLimOutput, Bool bEarlySkip ) 219 219 #else 220 TRenModel::create( Int iNumOfBaseViews, Int iNumOfModels, Int iWidth, Int iHeight, Int iShiftPrec, Int iHoleMargin ) 221 #endif 222 { 220 TRenModel::create( Int iNumOfBaseViews, Int iNumOfModels, Int iWidth, Int iHeight, Int iShiftPrec, Int iHoleMargin, Bool bLimOutput ) 221 #endif 222 { 223 m_bLimOutput = bLimOutput; 224 223 225 m_iNumOfBaseViews = iNumOfBaseViews; 224 226 m_iNumOfRenModels = iNumOfModels; … … 416 418 417 419 #if H_3D_VSO_EARLY_SKIP 418 m_apcRenModels[iModelNum]->create( iMode ,m_iWidth, m_iHeight, m_iShiftPrec, m_aaaiSubPelShiftLut, m_iHoleMargin, bUseOrgRef, iBlendMode, m_bEarlySkip ); 420 #if RM_INIT_FIX 421 m_apcRenModels[iModelNum]->create( iMode ,m_iWidth, m_iHeight, m_iShiftPrec, m_aaaiSubPelShiftLut, m_iHoleMargin, bUseOrgRef, ( iMode != 2 ) ? BLEND_NONE : iBlendMode , m_bLimOutput, m_bEarlySkip ); 419 422 #else 420 m_apcRenModels[iModelNum]->create( iMode ,m_iWidth, m_iHeight, m_iShiftPrec, m_aaaiSubPelShiftLut, m_iHoleMargin, bUseOrgRef, iBlendMode ); 423 m_apcRenModels[iModelNum]->create( iMode ,m_iWidth, m_iHeight, m_iShiftPrec, m_aaaiSubPelShiftLut, m_iHoleMargin, bUseOrgRef, iBlendMode, m_bLimOutput, m_bEarlySkip ); 424 #endif 425 426 #else 427 428 #if RM_INIT_FIX 429 m_apcRenModels[iModelNum]->create( iMode ,m_iWidth, m_iHeight, m_iShiftPrec, m_aaaiSubPelShiftLut, m_iHoleMargin, bUseOrgRef, ( iMode != 2 ) ? BLEND_NONE : iBlendMode, m_bLimOutput ); 430 #else 431 m_apcRenModels[iModelNum]->create( iMode ,m_iWidth, m_iHeight, m_iShiftPrec, m_aaaiSubPelShiftLut, m_iHoleMargin, bUseOrgRef, iBlendMode, m_bLimOutput ); 432 #endif 421 433 #endif 422 434 … … 470 482 471 483 Void 472 TRenModel::setSingleModel( Int iModelNum, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, TComPicYuv* pcPicYuvRefView 484 TRenModel::setSingleModel( Int iModelNum, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, TComPicYuv* pcPicYuvRefView, Int iEncViewSIdx) 473 485 { 474 486 AOT( iModelNum < 0 || iModelNum > m_iNumOfRenModels ); … … 486 498 if ( m_aaeBaseViewPosInModel[iBaseViewIdx][iModelNum] != VIEWPOS_INVALID ) 487 499 { 488 bAnyRefFromOrg = true;489 500 m_apcRenModels[iModelNum]->setLRView( m_aaeBaseViewPosInModel[iBaseViewIdx][iModelNum], 490 501 ( bSetupFromOrgVideo ? m_aapiOrgVideoPel : m_aapiCurVideoPel ) [iBaseViewIdx], … … 495 506 } 496 507 497 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, false ); 498 499 // Setup to Org 500 if ( bAnyRefFromOrg ) 501 { 502 // Restore old values 508 // Render 509 #if !RM_FIX_SETUP 510 m_apcRenModels[iModelNum]->setupLutAndRef( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, bAnyRefFromOrg ); 511 512 // Setup with actual data 503 513 for (Int iBaseViewIdx = 0; iBaseViewIdx < m_iNumOfBaseViews; iBaseViewIdx++ ) 504 514 { … … 514 524 } 515 525 } 516 517 // setup keeping reference rendered from original data 518 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, true ); 519 } 526 // Render initial state 527 AOT( m_bLimOutput && m_aaeBaseViewPosInModel[ iEncViewSIdx ][iModelNum] == VIEWPOS_INVALID ); 528 m_apcRenModels[iModelNum]->setupInitialState( m_bLimOutput ? m_aaeBaseViewPosInModel[ iEncViewSIdx ][iModelNum] : VIEWPOS_INVALID ); 529 530 #else 531 m_apcRenModels[iModelNum]->setupLut( ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft ); 532 533 // Copy yuv to reference if given. 534 AOT( pcPicYuvRefView != NULL && bAnyRefFromOrg ); 535 536 if (pcPicYuvRefView ) 537 { 538 m_apcRenModels[iModelNum]->setupRefView( pcPicYuvRefView ); 539 } 540 541 m_apcRenModels[iModelNum]->renderAll( ); 542 543 // pcPicYuvRefView != NULL && bAnyRefFromOrg --> invalid combination 544 // pcPicYuvRefView != NULL && !bAnyRefFromOrg --> distortion correct; reference view correct; current view correct 545 // pcPicYuvRefView == NULL && bAnyRefFromOrg --> distortion TBD ; reference view TBD ; current view TBD 546 // pcPicYuvRefView == NULL && !bAnyRefFromOrg --> distortion TBD ; reference view TBD ; current view correct 547 548 if ( pcPicYuvRefView == NULL ) 549 { 550 // Update reference view 551 m_apcRenModels[iModelNum]->setStructSynthViewAsRefView(); 552 553 // pcPicYuvRefView != NULL && bAnyRefFromOrg --> invalid combination 554 // pcPicYuvRefView != NULL && !bAnyRefFromOrg --> distortion correct; reference view correct; current view correct 555 // pcPicYuvRefView == NULL && bAnyRefFromOrg --> distortion TBD ; reference view correct; current view TBD 556 // pcPicYuvRefView == NULL && !bAnyRefFromOrg --> distortion TBD ; reference view correct; current view correct 557 558 if ( bAnyRefFromOrg ) 559 { 560 // Update current view and distortion 561 for (Int iBaseViewIdx = 0; iBaseViewIdx < m_iNumOfBaseViews; iBaseViewIdx++ ) 562 { 563 if ( m_aaeBaseViewPosInModel[iBaseViewIdx][iModelNum] != VIEWPOS_INVALID ) 564 { 565 m_apcRenModels[iModelNum]->setLRView( 566 m_aaeBaseViewPosInModel[iBaseViewIdx][iModelNum], 567 m_aapiCurVideoPel [iBaseViewIdx], 568 m_aaiCurVideoStrides [iBaseViewIdx], 569 m_apiCurDepthPel [iBaseViewIdx], 570 m_aiCurDepthStrides [iBaseViewIdx] 571 ); 572 } 573 } 574 m_apcRenModels[iModelNum]->renderAll( ); 575 } 576 else 577 { 578 // Update to distortion 579 m_apcRenModels[iModelNum]->resetStructError(); 580 } 581 } 582 583 if ( m_bLimOutput ) 584 { 585 AOT( m_aaeBaseViewPosInModel[ iEncViewSIdx ][iModelNum] == VIEWPOS_INVALID ); 586 Int curViewPosInModel = m_aaeBaseViewPosInModel[ iEncViewSIdx ][iModelNum]; 587 m_apcRenModels[iModelNum]->setLimOutStruct( (curViewPosInModel == VIEWPOS_RIGHT) ? VIEWPOS_LEFT : VIEWPOS_RIGHT ); 588 } 589 #endif 520 590 } 521 591 … … 549 619 TRenModel::setupPart ( UInt uiHorOff, Int iUsedHeight ) 550 620 { 551 AOT( iUsedHeight > m_iHeight );621 // AOT( iUsedHeight > m_iHeight ); 552 622 m_uiHorOff = uiHorOff; 553 623 m_iUsedHeight = iUsedHeight; … … 589 659 } 590 660 } 591 592 return ( iDist + (m_iNumOfCurRenModels >> 1) ) / m_iNumOfCurRenModels; 661 return m_iNumOfCurRenModels > 0 ? ( iDist + (m_iNumOfCurRenModels >> 1) ) / m_iNumOfCurRenModels : 0; 593 662 } 594 663
Note: See TracChangeset for help on using the changeset viewer.