Changeset 213 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenModel.cpp
- Timestamp:
- 31 Dec 2012, 18:33:14 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenModel.cpp
r193 r213 35 35 #include "TRenFilter.h" 36 36 #include "TRenModel.h" 37 37 #if !QC_MVHEVC_B0046 38 38 /////////// TRENMODEL ////////////////////// 39 39 TRenModel::TRenModel() … … 42 42 m_iWidth = -1; 43 43 m_iHeight = -1; 44 #if FIX_VSO_SETUP45 44 m_iUsedHeight = -1; 46 #endif47 45 m_iNumOfBaseViews = -1; 48 46 m_iSampledWidth = -1; … … 437 435 { 438 436 AOT( iViewNum < 0 || iViewNum > m_iNumOfBaseViews ); 439 #if FIX_VSO_SETUP440 437 AOF( pcPicYuvVideoData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvVideoData->getWidth() == m_iWidth ); 441 438 AOF( pcPicYuvDepthData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvDepthData->getWidth() == m_iWidth ); 442 #else443 AOF( pcPicYuvVideoData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvVideoData->getWidth() == m_iWidth );444 AOF( pcPicYuvDepthData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvDepthData->getWidth() == m_iWidth );445 #endif446 439 447 440 pcPicYuvVideoData->extendPicBorder(); 448 441 449 #if FIX_VSO_SETUP450 442 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 443 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 444 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 445 TRenFilter::copy ( pcPicYuvDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvDepthData->getStride () , pcPicYuvDepthData->getStride(), m_iWidth, m_iUsedHeight, m_apiCurDepthPel [ iViewNum], m_aiCurDepthStrides [iViewNum] ); 454 #else455 TRenFilter::sampleHorUp ( m_iShiftPrec, pcPicYuvVideoData->getLumaAddr() + m_uiHorOff * pcPicYuvVideoData->getStride () , pcPicYuvVideoData->getStride() , m_iWidth, m_iHeight, m_aapiCurVideoPel[ iViewNum ][0], m_aaiCurVideoStrides[iViewNum][0] );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] );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] );458 TRenFilter::copy ( pcPicYuvDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvDepthData->getStride () , pcPicYuvDepthData->getStride(), m_iWidth, m_iHeight, m_apiCurDepthPel [ iViewNum], m_aiCurDepthStrides [iViewNum] );459 #endif460 446 461 447 // Used for rendering reference pic from original video data … … 465 451 if ( m_abSetupVideoFromOrgForView[iViewNum] ) 466 452 { 467 #if FIX_VSO_SETUP468 453 AOF( pcPicYuvOrgVideoData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvOrgVideoData->getWidth() == m_iWidth ); 469 454 pcPicYuvOrgVideoData->extendPicBorder(); … … 471 456 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 457 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 #else474 AOF( pcPicYuvOrgVideoData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvOrgVideoData->getWidth() == m_iWidth );475 pcPicYuvOrgVideoData->extendPicBorder();476 TRenFilter::sampleHorUp ( m_iShiftPrec, pcPicYuvOrgVideoData->getLumaAddr() + m_uiHorOff * pcPicYuvOrgVideoData->getStride() , pcPicYuvOrgVideoData->getStride() , m_iWidth, m_iHeight, m_aapiOrgVideoPel[ iViewNum ][0], m_aaiOrgVideoStrides[iViewNum][0] );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] );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 #endif480 458 } 481 459 482 460 if ( m_abSetupDepthFromOrgForView[iViewNum] ) 483 461 { 484 #if FIX_VSO_SETUP485 462 AOF( pcPicYuvOrgDepthData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvOrgDepthData->getWidth() == m_iWidth ); 486 463 TRenFilter::copy ( pcPicYuvOrgDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvOrgDepthData->getStride() , pcPicYuvOrgDepthData->getStride(), m_iWidth, m_iUsedHeight, m_apiOrgDepthPel [ iViewNum], m_aiOrgDepthStrides [iViewNum] ); 487 #else488 AOF( pcPicYuvOrgDepthData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvOrgDepthData->getWidth() == m_iWidth );489 TRenFilter::copy ( pcPicYuvOrgDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvOrgDepthData->getStride() , pcPicYuvOrgDepthData->getStride(), m_iWidth, m_iHeight, m_apiOrgDepthPel [ iViewNum], m_aiOrgDepthStrides [iViewNum] );490 #endif491 464 } 492 465 } … … 497 470 AOT( iModelNum < 0 || iModelNum > m_iNumOfRenModels ); 498 471 499 #if FIX_VSO_SETUP500 472 m_apcRenModels[iModelNum]->setupPart( m_uiHorOff, m_iUsedHeight ); 501 #endif502 473 503 474 // Switch model to original data for setup if given to render reference … … 520 491 } 521 492 522 #if FIX_VSO_SETUP523 493 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, false ); 524 #else525 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, false, m_uiHorOff );526 #endif527 494 528 495 // Setup to Org … … 545 512 546 513 // setup keeping reference rendered from original data 547 #if FIX_VSO_SETUP548 514 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, true ); 549 #else550 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, true, m_uiHorOff);551 #endif552 515 } 553 516 } … … 579 542 580 543 581 #if FIX_VSO_SETUP582 544 Void 583 545 TRenModel::setupPart ( UInt uiHorOff, Int iUsedHeight ) … … 587 549 m_iUsedHeight = iUsedHeight; 588 550 } 589 #else590 Void591 TRenModel::setHorOffset ( UInt uiHorOff )592 {593 m_uiHorOff = uiHorOff;594 }595 #endif596 551 597 552 #if LGE_VSO_EARLY_SKIP_A0093 … … 606 561 607 562 AOT( iWidth + iStartPosX > m_iWidth ); 608 #if FIX_VSO_SETUP609 563 AOT( iHeight + iStartPosY > m_iUsedHeight ); 610 #else611 AOT( iHeight + iStartPosY > m_iHeight );612 #endif613 564 614 565 AOT( iStartPosX < 0); … … 644 595 645 596 iWidth = min(iWidth , m_iWidth - iStartPosX ); 646 #if FIX_VSO_SETUP647 597 iHeight = min(iHeight, m_iUsedHeight - iStartPosY ); 648 #else649 iHeight = min(iHeight, m_iHeight - iStartPosY );650 #endif651 598 652 599 AOT( iStartPosX < 0); … … 684 631 TRenModel::getSynthVideo( Int iModelNum, Int iViewNum, TComPicYuv* pcPicYuv ) 685 632 { 686 #if FIX_VSO_SETUP687 633 m_apcRenModels[iModelNum]->getSynthVideo(iViewNum, pcPicYuv ); 688 #else689 m_apcRenModels[iModelNum]->getSynthVideo(iViewNum, pcPicYuv, m_uiHorOff );690 #endif691 634 } 692 635 … … 694 637 TRenModel::getSynthDepth( Int iModelNum, Int iViewNum, TComPicYuv* pcPicYuv ) 695 638 { 696 #if HHI_VSO_SPEEDUP_A0033 && !FIX_VSO_SETUP697 m_apcRenModels[iModelNum]->getSynthDepth(iViewNum, pcPicYuv, m_uiHorOff );698 #else699 639 m_apcRenModels[iModelNum]->getSynthDepth(iViewNum, pcPicYuv ); 700 #endif701 640 } 702 641 … … 705 644 { 706 645 TComPicYuv cPicYuvSynth; 707 #if FIX_VSO_SETUP708 646 cPicYuvSynth.create( m_iWidth, m_iUsedHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 709 #else710 cPicYuvSynth.create( m_iWidth, m_iHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );711 #endif712 647 713 648 TComPicYuv cPicYuvTempRef; 714 #if FIX_VSO_SETUP715 649 cPicYuvTempRef.create( m_iWidth, m_iUsedHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth); 716 #else717 cPicYuvTempRef.create( m_iWidth, m_iHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);718 #endif719 650 720 651 Int64 iSSEY = 0; … … 724 655 for (Int iCurModel = 0; iCurModel < m_iNumOfCurRenModels; iCurModel++) 725 656 { 726 #if FIX_VSO_SETUP727 657 m_apcCurRenModels[iCurModel]->getSynthVideo( m_aiCurPosInModels[iCurModel], &cPicYuvSynth ); 728 658 m_apcCurRenModels[iCurModel]->getRefVideo ( m_aiCurPosInModels[iCurModel], &cPicYuvTempRef ); … … 731 661 iSSEU += TRenFilter::SSE( cPicYuvSynth.getCbAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, cPicYuvTempRef.getCbAddr() , cPicYuvTempRef.getCStride()); 732 662 iSSEV += TRenFilter::SSE( cPicYuvSynth.getCrAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, cPicYuvTempRef.getCrAddr() , cPicYuvTempRef.getCStride()); 733 #else734 m_apcCurRenModels[iCurModel]->getSynthVideo( m_aiCurPosInModels[iCurModel], &cPicYuvSynth, 0 );735 TComPicYuv* pcPicYuvRef = &cPicYuvTempRef;736 m_apcCurRenModels[iCurModel]->getRefVideo ( m_aiCurPosInModels[iCurModel], pcPicYuvRef , 0 );737 738 iSSEY += TRenFilter::SSE( cPicYuvSynth.getLumaAddr(), cPicYuvSynth.getStride(), m_iWidth, m_iHeight , pcPicYuvRef->getLumaAddr(), pcPicYuvRef->getStride() );739 iSSEU += TRenFilter::SSE( cPicYuvSynth.getCbAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iHeight >> 1, pcPicYuvRef->getCbAddr() , pcPicYuvRef->getCStride());740 iSSEV += TRenFilter::SSE( cPicYuvSynth.getCrAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iHeight >> 1, pcPicYuvRef->getCrAddr() , pcPicYuvRef->getCStride());741 #endif742 663 } 743 664 … … 776 697 } 777 698 } 699 #endif 700
Note: See TracChangeset for help on using the changeset viewer.