Changeset 189 in 3DVCSoftware for trunk/source/Lib/TLibRenderer
- Timestamp:
- 18 Nov 2012, 22:11:37 (12 years ago)
- Location:
- trunk/source/Lib/TLibRenderer
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibRenderer/TRenImage.cpp
r101 r189 106 106 } 107 107 108 #if HHI_VSO_SPEEDUP_A0033109 108 template<typename T> 110 109 Void TRenImage<T>::getDataAndStrides( T** pptData, Int* piStrides ) … … 127 126 } 128 127 } 129 #endif130 128 131 129 template<typename T> -
trunk/source/Lib/TLibRenderer/TRenImage.h
r101 r189 69 69 TRenImagePlane<T>** getPlanes() const; 70 70 71 #if HHI_VSO_SPEEDUP_A003372 71 Void getDataAndStrides( T** pptData, Int* piStrides ); 73 72 Void getWidthAndHeight( Int* piWidths, Int* piHeights ); 74 #endif75 73 76 74 UInt getNumberOfPlanes() const; -
trunk/source/Lib/TLibRenderer/TRenModel.cpp
r124 r189 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 -
trunk/source/Lib/TLibRenderer/TRenModel.h
r124 r189 62 62 63 63 // Set horizontal offset 64 #if FIX_VSO_SETUP65 64 Void setupPart ( UInt uiHorOff, Int iUsedHeight ); 66 #else67 Void setHorOffset ( UInt uiHorOff );68 #endif69 65 70 66 // Set Mode … … 104 100 Int m_iSampledWidth; 105 101 Int m_iPad; 106 #if FIX_VSO_SETUP107 102 Int m_iUsedHeight; // height currently used in buffer, whereas m_iHeight is the total height of the buffer 108 #endif109 103 110 104 111 105 Int m_iNumOfBaseViews; 112 106 113 #if HHI_VSO_SPEEDUP_A0033114 107 // Horizontal Offset in input data 115 108 UInt m_uiHorOff; 116 #endif117 109 118 110 /// Current Error Type /// -
trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp
r124 r189 44 44 m_iHeight = -1; 45 45 m_iStride = -1; 46 #if FIX_VSO_SETUP47 46 m_iUsedHeight = -1; 48 47 m_iHorOffset = -1; 49 #endif50 48 m_iMode = -1; 51 49 m_iPad = PICYUV_PAD; … … 104 102 if ( m_pcInputSamples [1] ) delete[] m_pcInputSamples [1]; 105 103 106 #if FIX_MEM_LEAKS107 104 if ( m_pcOutputSamples ) delete[] m_pcOutputSamples ; 108 #else 109 if ( m_pcOutputSamples ) delete m_pcOutputSamples ; 110 #endif 111 112 #if FIX_MEM_LEAKS 105 113 106 if ( m_piInvZLUTLeft ) delete[] m_piInvZLUTLeft ; 114 107 if ( m_piInvZLUTRight ) delete[] m_piInvZLUTRight; … … 117 110 if ( m_aapiRefVideoPel[1] ) delete[] ( m_aapiRefVideoPel[1] - ( m_aiRefVideoStrides[1] * m_iPad + m_iPad ) ); 118 111 if ( m_aapiRefVideoPel[2] ) delete[] ( m_aapiRefVideoPel[2] - ( m_aiRefVideoStrides[2] * m_iPad + m_iPad ) ); 119 #endif120 112 } 121 113 … … 197 189 Int iOffsetX = ( iViewPos == VIEWPOS_RIGHT ) ? 1 : 0; 198 190 199 #if FIX_VSO_SETUP200 191 for ( Int iPosY = 0; iPosY < m_iUsedHeight; iPosY++ ) 201 #else202 for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ )203 #endif204 192 { 205 193 if ( iViewPos == VIEWPOS_RIGHT ) … … 245 233 246 234 } 247 #if FIX_VSO_SETUP248 235 template <BlenMod iBM, Bool bBitInc> Void 249 236 TRenSingleModelC<iBM,bBitInc>::setupPart ( UInt uiHorOffset, Int iUsedHeight ) … … 254 241 m_iHorOffset = (Int) uiHorOffset; 255 242 } 256 #endif257 243 258 244 template <BlenMod iBM, Bool bBitInc> Void 259 #if FIX_VSO_SETUP260 245 TRenSingleModelC<iBM,bBitInc>::setup( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference ) 261 #else262 TRenSingleModelC<iBM,bBitInc>::setup( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference, UInt uiHorOff )263 #endif264 246 { 265 247 AOT( !m_bUseOrgRef && pcOrgVideo ); … … 275 257 if ( pcOrgVideo && !bKeepReference ) 276 258 { 277 #if FIX_VSO_SETUP278 259 TRenFilter::copy( pcOrgVideo->getLumaAddr() + m_iHorOffset * pcOrgVideo->getStride() , pcOrgVideo->getStride() , m_iWidth, m_iUsedHeight, m_aapiRefVideoPel[0], m_aiRefVideoStrides[0]); 279 260 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 261 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 #else282 TRenFilter::copy( pcOrgVideo->getLumaAddr() + uiHorOff * pcOrgVideo->getStride() , pcOrgVideo->getStride() , m_iWidth, m_iHeight, m_aapiRefVideoPel[0], m_aiRefVideoStrides[0]);283 TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCbAddr() + (uiHorOff >> 1) * pcOrgVideo->getCStride(), pcOrgVideo->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiRefVideoPel[1], m_aiRefVideoStrides[1]);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 #endif286 262 xSetStructRefView(); 287 263 } … … 290 266 xResetStructError(); 291 267 xInitSampleStructs(); 292 #if FIX_VSO_SETUP293 268 switch ( m_iMode ) 294 269 { … … 320 295 AOT(true); 321 296 } 322 #else323 switch ( m_iMode )324 {325 case 0:326 #if LGE_VSO_EARLY_SKIP_A0093327 xRenderL<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0],false );328 #else329 xRenderL<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0] );330 #endif331 break;332 case 1:333 #ifdef LGE_VSO_EARLY_SKIP_A0093334 xRenderR<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1],false);335 #else336 xRenderR<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1] );337 #endif338 break;339 case 2:340 TRenFilter::setupZLUT( true, 30, iDistToLeft, ppiBaseShiftLutLeft, ppiBaseShiftLutRight, m_iBlendZThres, m_iBlendDistWeight, m_piInvZLUTLeft, m_piInvZLUTRight );341 #ifdef LGE_VSO_EARLY_SKIP_A0093342 xRenderL<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0],false);343 xRenderR<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1],false);344 #else345 xRenderL<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0] );346 xRenderR<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1] );347 #endif348 break;349 default:350 AOT(true);351 }352 #endif353 297 354 298 // Get Rendered View as Reference … … 413 357 #endif 414 358 415 #if FIX_VSO_SETUP416 359 for ( Int iPosY = 0; iPosY < m_iUsedHeight; iPosY++ ) 417 #else418 for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ )419 #endif420 360 { 421 361 for ( Int iPosX = 0; iPosX < m_iWidth; iPosX++ ) … … 470 410 #endif 471 411 472 #if FIX_VSO_SETUP473 412 for ( Int iPosY = 0; iPosY < m_iUsedHeight; iPosY++ ) 474 #else475 for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ )476 #endif477 413 { 478 414 for ( Int iPosX = 0; iPosX < m_iWidth; iPosX++ ) … … 617 553 } 618 554 619 #if FIX_VSO_SETUP620 555 template <BlenMod iBM, Bool bBitInc> Void 621 556 TRenSingleModelC<iBM,bBitInc>::getSynthVideo( Int iViewPos, TComPicYuv* pcPicYuv ) … … 648 583 #endif 649 584 } 650 #else 651 template <BlenMod iBM, Bool bBitInc> Void 652 TRenSingleModelC<iBM,bBitInc>::getSynthVideo( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) 653 { 654 AOT( pcPicYuv->getWidth() != m_iWidth ); 655 AOT( pcPicYuv->getHeight() > m_iHeight + uiHorOffset ); 656 657 #if HHI_VSO_COLOR_PLANES 658 Pel RenModelOutPels::* piText[3] = { NULL, NULL, NULL }; 659 xGetSampleStrTextPtrs(iViewPos, piText[0], piText[1], piText[2]); 660 661 // Temp image for chroma down sampling 662 PelImage cTempImage( m_iWidth, m_iHeight, 3, 0); 663 664 Int aiStrides[3]; 665 Pel* apiData [3]; 666 667 cTempImage.getDataAndStrides( apiData, aiStrides ); 668 669 for (UInt uiCurPlane = 0; uiCurPlane < 3; uiCurPlane++ ) 670 { 671 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piText[uiCurPlane], apiData[uiCurPlane], aiStrides[uiCurPlane] , m_iWidth, m_iHeight); 672 } 673 xCopy2PicYuv( apiData, aiStrides, pcPicYuv, uiHorOffset ); 674 #else 675 Pel RenModelOutPels::* piY; 676 xGetSampleStrTextPtrs(iViewPos, piY); 677 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piY, pcPicYuv->getLumaAddr() + uiHorOffset * pcPicYuv->getStride(), pcPicYuv->getStride(), m_iWidth, m_iHeight ); 678 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement ); 679 #endif 680 } 681 #endif 682 683 #if FIX_VSO_SETUP 585 684 586 template <BlenMod iBM, Bool bBitInc> Void 685 587 TRenSingleModelC<iBM,bBitInc>::getSynthDepth( Int iViewPos, TComPicYuv* pcPicYuv ) … … 695 597 } 696 598 697 #else 698 template <BlenMod iBM, Bool bBitInc> Void 699 TRenSingleModelC<iBM,bBitInc>::getSynthDepth( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOff ) 700 { 701 AOT( iViewPos != 0 && iViewPos != 1); 702 AOT( pcPicYuv->getWidth() != m_iWidth ); 703 AOT( pcPicYuv->getHeight() > m_iHeight + uiHorOff ); 704 705 Pel RenModelOutPels::* piD = 0; 706 xGetSampleStrDepthPtrs(iViewPos, piD); 707 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piD, pcPicYuv->getLumaAddr() + pcPicYuv->getStride() * uiHorOff, pcPicYuv->getStride(), m_iWidth, m_iHeight ); 708 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement ); 709 } 710 #endif 711 712 #if FIX_VSO_SETUP 599 713 600 template <BlenMod iBM, Bool bBitInc> Void 714 601 TRenSingleModelC<iBM,bBitInc>::getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv ) … … 742 629 #endif 743 630 } 744 #else745 template <BlenMod iBM, Bool bBitInc> Void746 TRenSingleModelC<iBM,bBitInc>::getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset )747 {748 AOT( pcPicYuv->getWidth() != m_iWidth );749 AOT( pcPicYuv->getHeight() > m_iHeight + uiHorOffset);750 751 #if HHI_VSO_COLOR_PLANES752 Pel RenModelOutPels::* piText[3];753 piText[0] = &RenModelOutPels::iYRef;754 piText[1] = &RenModelOutPels::iURef;755 piText[2] = &RenModelOutPels::iVRef;756 757 // Temp image for chroma down sampling758 759 PelImage cTempImage( m_iWidth, m_iHeight, 3, 0);760 Int aiStrides[3];761 Pel* apiData [3];762 763 cTempImage.getDataAndStrides( apiData, aiStrides );764 765 for (UInt uiCurPlane = 0; uiCurPlane < 3; uiCurPlane++ )766 {767 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piText[uiCurPlane], apiData[uiCurPlane], aiStrides[uiCurPlane] , m_iWidth, m_iHeight);768 }769 770 xCopy2PicYuv( apiData, aiStrides, pcPicYuv, uiHorOffset );771 #else772 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, &RenModelOutPels::iYRef, pcPicYuv->getLumaAddr() * pcPicYuv->getStride() + uiHorOffset, pcPicYuv->getStride(), m_iWidth, m_iHeight );773 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement );774 #endif775 }776 #endif777 631 778 632 template <BlenMod iBM, Bool bBitInc> RMDist … … 2018 1872 } 2019 1873 2020 #if FIX_VSO_SETUP2021 1874 template <BlenMod iBM, Bool bBitInc> Void 2022 1875 TRenSingleModelC<iBM,bBitInc>::xCopy2PicYuv( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget ) … … 2026 1879 TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[2], piStrides[2], m_iWidth, m_iUsedHeight, rpcPicYuvTarget->getCrAddr () + (m_iHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() ); 2027 1880 } 2028 #else2029 template <BlenMod iBM, Bool bBitInc> Void2030 TRenSingleModelC<iBM,bBitInc>::xCopy2PicYuv( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget, UInt uiHorOffset )2031 {2032 TRenFilter::copy ( ppiSrcVideoPel[0], piStrides[0], m_iWidth, m_iHeight, rpcPicYuvTarget->getLumaAddr() + uiHorOffset * rpcPicYuvTarget->getStride() , rpcPicYuvTarget->getStride () );2033 TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[1], piStrides[1], m_iWidth, m_iHeight, rpcPicYuvTarget->getCbAddr () + (uiHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() );2034 TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[2], piStrides[2], m_iWidth, m_iHeight, rpcPicYuvTarget->getCrAddr () + (uiHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() );2035 }2036 #endif2037 1881 2038 1882 template class TRenSingleModelC<BLEND_NONE ,true>; -
trunk/source/Lib/TLibRenderer/TRenSingleModel.h
r124 r189 69 69 public: 70 70 71 #if FIX_VIRT_DESTRUCTOR72 71 virtual ~TRenSingleModel() { } 73 #endif74 72 #if LGE_VSO_EARLY_SKIP_A0093 75 73 virtual Void create ( Int iMode, Int iWidth, Int iHeight, Int iShiftPrec, Int*** aaaiSubPelShiftTable, Int iHoleMargin, Bool bUseOrgRef, Int iBlendMode, Bool bEarlySkip ) = 0; … … 80 78 // Set Frame dependent data 81 79 virtual Void setLRView ( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride ) = 0; 82 #if FIX_VSO_SETUP83 80 virtual Void setupPart ( UInt uiHorOffset, Int iUsedHeight ) = 0; 84 81 virtual Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference ) = 0; 85 #else86 virtual Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference, UInt uiHorOffset ) = 0;87 #endif88 82 89 83 // Set Data … … 103 97 virtual RMDist getDistVideo ( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) = 0; 104 98 105 #if FIX_VSO_SETUP106 99 virtual Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv ) = 0; 107 100 virtual Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv ) = 0; 108 101 virtual Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv ) = 0; 109 #else110 virtual Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) = 0;111 virtual Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) = 0;112 virtual Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) = 0;113 #endif114 102 }; 115 103 … … 181 169 // Set Frame dependent data 182 170 Void setLRView ( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride ); 183 #if FIX_VSO_SETUP184 171 Void setupPart ( UInt uiHorOffset, Int uiUsedHeight ); 185 172 Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference ); 186 #else187 Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference, UInt uiHorOffset );188 #endif189 173 190 174 #if LGE_VSO_EARLY_SKIP_A0093 … … 203 187 RMDist getDistVideo ( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ); 204 188 205 #if FIX_VSO_SETUP206 189 Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv ); 207 190 Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv ); 208 191 Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv ); 209 #else210 Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset );211 Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset );212 Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset );213 #endif214 192 215 193 private: … … 293 271 Void xInitSampleStructs (); 294 272 Void xSetStructSynthViewAsRefView (); 295 #if FIX_VSO_SETUP296 273 Void xCopy2PicYuv ( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget ); 297 #else298 Void xCopy2PicYuv ( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget, UInt uiHorOffset );299 #endif300 274 301 275 template< typename S, typename T> 302 276 Void xCopyFromSampleStruct ( S* ptSource , Int iSourceStride, T S::* ptSourceElement, T* ptTarget, Int iTargetStride, Int iWidth, Int iHeight ) 303 277 { 304 #if FIX_VSO_SETUP305 278 AOT( iWidth != m_iWidth ); 306 279 for (Int iPosY = 0; iPosY < iHeight; iPosY++) 307 #else308 for (Int iPosY = 0; iPosY < m_iHeight; iPosY++)309 #endif310 280 { 311 281 for (Int iPosX = 0; iPosX < m_iWidth; iPosX++) … … 321 291 Void xCopyToSampleStruct ( T* ptSource , Int iSourceStride, S* ptTarget, Int iTargetStride, T S::* ptSourceElement, Int iWidth, Int iHeight ) 322 292 { 323 #if FIX_VSO_SETUP324 293 AOT( iWidth != m_iWidth ); 325 294 for (Int iPosY = 0; iPosY < iHeight; iPosY++) 326 #else327 for (Int iPosY = 0; iPosY < m_iHeight; iPosY++)328 #endif329 295 { 330 296 for (Int iPosX = 0; iPosX < m_iWidth; iPosX++) … … 344 310 Int m_iStride; 345 311 Int m_iPad; 346 #if FIX_VSO_SETUP347 312 Int m_iUsedHeight; 348 313 Int m_iHorOffset; 349 #endif350 314 351 315 Int m_iSampledWidth; 352 #if FIX_VSO_SETUP353 #else354 Int m_iSampledHeight;355 #endif356 316 Int m_iSampledStride; 357 317
Note: See TracChangeset for help on using the changeset viewer.