Changeset 193 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenModel.cpp
- Timestamp:
- 19 Nov 2012, 21:15:40 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenModel.cpp
r166 r193 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 … … 700 776 } 701 777 } 702
Note: See TracChangeset for help on using the changeset viewer.