Changeset 100 in 3DVCSoftware for trunk/source/Lib/TLibRenderer
- Timestamp:
- 9 Aug 2012, 12:53:16 (13 years ago)
- Location:
- trunk/source/Lib/TLibRenderer
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibRenderer/TRenImage.cpp
r56 r100 106 106 } 107 107 108 #if HHI_VSO_SPEEDUP_A033 109 template<typename T> 110 Void TRenImage<T>::getDataAndStrides( T** pptData, Int* piStrides ) 111 { 112 for (UInt uiCurPlane = 0; uiCurPlane < m_uiNumberOfPlanes; uiCurPlane++ ) 113 { 114 piStrides[uiCurPlane] = m_apcPlanes[uiCurPlane]->getStride (); 115 pptData [uiCurPlane] = m_apcPlanes[uiCurPlane]->getPlaneData(); 116 } 117 } 118 119 120 template<typename T> 121 Void TRenImage<T>::getWidthAndHeight( Int* ppiWidths, Int* ppiHeights ) 122 { 123 for (UInt uiCurPlane = 0; uiCurPlane < m_uiNumberOfPlanes; uiCurPlane++ ) 124 { 125 ppiWidths [uiCurPlane] = m_apcPlanes[uiCurPlane]->getWidth (); 126 ppiHeights[uiCurPlane] = m_apcPlanes[uiCurPlane]->getHeight(); 127 } 128 } 129 #endif 130 108 131 template<typename T> 109 132 Void TRenImage<T>::allocatePlanes( UInt uiWidth, UInt uiHeight, UInt uiNumberOfFullPlanes, UInt uiNumberOfQuaterPlanes ) -
trunk/source/Lib/TLibRenderer/TRenImage.h
r56 r100 69 69 TRenImagePlane<T>** getPlanes() const; 70 70 71 #if HHI_VSO_SPEEDUP_A033 72 Void getDataAndStrides( T** pptData, Int* piStrides ); 73 Void getWidthAndHeight( Int* piWidths, Int* piHeights ); 74 #endif 75 71 76 UInt getNumberOfPlanes() const; 72 77 UInt getNumberOfQuaterPlanes() const; -
trunk/source/Lib/TLibRenderer/TRenModSetupStrParser.cpp
r56 r100 357 357 { 358 358 case 'E': 359 iBlendMode = -1;359 iBlendMode = BLEND_NONE; 360 360 break; 361 361 case 'I': 362 iBlendMode = 0;362 iBlendMode = BLEND_AVRG; 363 363 break; 364 364 case 'L': 365 iBlendMode = 1;365 iBlendMode = BLEND_LEFT; 366 366 break; 367 367 case 'R': 368 iBlendMode = 2;368 iBlendMode = BLEND_RIGHT; 369 369 break; 370 370 default: -
trunk/source/Lib/TLibRenderer/TRenModel.cpp
r56 r100 32 32 */ 33 33 34 35 36 34 #include "TRenImage.h" 37 35 #include "TRenFilter.h" … … 48 46 m_iShiftPrec = 0; 49 47 m_iHoleMargin = 1; 48 m_uiHorOff = -1; 49 #if LGE_VSO_EARLY_SKIP_A0093 50 m_bEarlySkip = false; 51 #endif 50 52 51 53 // Current Error Type /// … … 211 213 212 214 Void 215 #if LGE_VSO_EARLY_SKIP_A0093 216 TRenModel::create( Int iNumOfBaseViews, Int iNumOfModels, Int iWidth, Int iHeight, Int iShiftPrec, Int iHoleMargin, Bool bEarlySkip ) 217 #else 213 218 TRenModel::create( Int iNumOfBaseViews, Int iNumOfModels, Int iWidth, Int iHeight, Int iShiftPrec, Int iHoleMargin ) 219 #endif 214 220 { 215 221 m_iNumOfBaseViews = iNumOfBaseViews; … … 219 225 m_iShiftPrec = iShiftPrec; 220 226 m_iHoleMargin = iHoleMargin; 227 #if LGE_VSO_EARLY_SKIP_A0093 228 m_bEarlySkip = bEarlySkip; 229 #endif 230 221 231 222 232 // LUTs for sub pel shifting … … 231 241 232 242 TRenFilter::setSubPelShiftLUT( m_iShiftPrec, m_aaaiSubPelShiftLut[0], 0 ); 233 TRenFilter::setSubPelShiftLUT( m_iShiftPrec, m_aaaiSubPelShiftLut[1], -1);243 TRenFilter::setSubPelShiftLUT( m_iShiftPrec, m_aaaiSubPelShiftLut[1], 0 ); 234 244 235 245 m_iSampledWidth = iWidth << m_iShiftPrec; … … 268 278 for (Int iModelNum = 0; iModelNum < m_iNumOfRenModels; iModelNum++) 269 279 { 270 m_apcRenModels [iModelNum] = new TRenSingleModel();280 m_apcRenModels [iModelNum] = NULL; 271 281 } 272 282 … … 339 349 340 350 AOT( iMode == -1); 341 AOT( iModelNum < 0 || iModelNum > m_iNumOfRenModels ); 342 AOF( m_apcRenModels[iModelNum] ); 351 AOT( iModelNum < 0 || iModelNum > m_iNumOfRenModels ); 343 352 AOT( iLeftViewNum < -1 || iLeftViewNum > m_iNumOfBaseViews ); 344 353 AOT( iRightViewNum < -1 || iRightViewNum > m_iNumOfBaseViews ); … … 348 357 AOT( iBlendMode < -1 || iBlendMode > 2 ); 349 358 359 Bool bBitInc = (g_uiBitIncrement != 0); 360 361 AOT( m_apcRenModels[iModelNum] ); 362 363 if ( bBitInc ) 364 { 365 if ( iMode != 2 ) 366 { // No Blending 367 m_apcRenModels[iModelNum] = new TRenSingleModelC<BLEND_NONE, true>; 368 } 369 else 370 { 371 switch ( iBlendMode ) 372 { 373 case BLEND_AVRG: // average 374 m_apcRenModels[iModelNum] = new TRenSingleModelC<BLEND_AVRG, true>; 375 break; 376 case BLEND_LEFT: // left view is main view 377 m_apcRenModels[iModelNum] = new TRenSingleModelC<BLEND_LEFT, true>; 378 break; 379 case BLEND_RIGHT: // right view is main view 380 m_apcRenModels[iModelNum] = new TRenSingleModelC<BLEND_RIGHT, true>; 381 break; 382 default: 383 AOT(true); 384 break; 385 } 386 } 387 } 388 else 389 { 390 if ( iMode != 2 ) 391 { // No Blending 392 m_apcRenModels[iModelNum] = new TRenSingleModelC<BLEND_NONE, false>; 393 } 394 else 395 { 396 switch ( iBlendMode ) 397 { 398 case BLEND_AVRG: // average 399 m_apcRenModels[iModelNum] = new TRenSingleModelC<BLEND_AVRG, false>; 400 break; 401 case BLEND_LEFT: // left view is main view 402 m_apcRenModels[iModelNum] = new TRenSingleModelC<BLEND_LEFT, false>; 403 break; 404 case BLEND_RIGHT: // right view is main view 405 m_apcRenModels[iModelNum] = new TRenSingleModelC<BLEND_RIGHT, false>; 406 break; 407 default: 408 AOT(true); 409 break; 410 } 411 } 412 } 413 414 415 #if LGE_VSO_EARLY_SKIP_A0093 416 m_apcRenModels[iModelNum]->create( iMode ,m_iWidth, m_iHeight, m_iShiftPrec, m_aaaiSubPelShiftLut, m_iHoleMargin, bUseOrgRef, iBlendMode, m_bEarlySkip ); 417 #else 350 418 m_apcRenModels[iModelNum]->create( iMode ,m_iWidth, m_iHeight, m_iShiftPrec, m_aaaiSubPelShiftLut, m_iHoleMargin, bUseOrgRef, iBlendMode ); 419 #endif 351 420 352 421 if ( iLeftViewNum != -1 ) … … 361 430 } 362 431 363 364 432 Void 365 433 TRenModel::setBaseView( Int iViewNum, TComPicYuv* pcPicYuvVideoData, TComPicYuv* pcPicYuvDepthData, TComPicYuv* pcPicYuvOrgVideoData, TComPicYuv* pcPicYuvOrgDepthData ) 366 434 { 367 435 AOT( iViewNum < 0 || iViewNum > m_iNumOfBaseViews ); 368 AOF( pcPicYuvVideoData->getHeight() == m_iHeight|| pcPicYuvVideoData->getWidth() == m_iWidth );369 AOF( pcPicYuvDepthData->getHeight() == m_iHeight|| pcPicYuvDepthData->getWidth() == m_iWidth );436 AOF( pcPicYuvVideoData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvVideoData->getWidth() == m_iWidth ); 437 AOF( pcPicYuvDepthData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvDepthData->getWidth() == m_iWidth ); 370 438 371 439 pcPicYuvVideoData->extendPicBorder(); 372 TRenFilter::sampleHorUp ( m_iShiftPrec, pcPicYuvVideoData->getLumaAddr(), pcPicYuvVideoData->getStride() , m_iWidth, m_iHeight, m_aapiCurVideoPel[ iViewNum ][0], m_aaiCurVideoStrides[iViewNum][0] ); 373 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCbAddr() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiCurVideoPel[ iViewNum ][1], m_aaiCurVideoStrides[iViewNum][1] ); 374 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCrAddr() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiCurVideoPel[ iViewNum ][2], m_aaiCurVideoStrides[iViewNum][2] ); 375 TRenFilter::copy ( pcPicYuvDepthData->getLumaAddr(), pcPicYuvDepthData->getStride(), m_iWidth, m_iHeight, m_apiCurDepthPel [ iViewNum], m_aiCurDepthStrides [iViewNum] ); 440 441 442 443 444 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 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 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 TRenFilter::copy ( pcPicYuvDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvDepthData->getStride () , pcPicYuvDepthData->getStride(), m_iWidth, m_iHeight, m_apiCurDepthPel [ iViewNum], m_aiCurDepthStrides [iViewNum] ); 376 448 377 449 // Used for rendering reference pic from original video data … … 381 453 if ( m_abSetupVideoFromOrgForView[iViewNum] ) 382 454 { 383 AOF( pcPicYuvOrgVideoData->getHeight() == m_iHeight|| pcPicYuvOrgVideoData->getWidth() == m_iWidth );455 AOF( pcPicYuvOrgVideoData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvOrgVideoData->getWidth() == m_iWidth ); 384 456 pcPicYuvOrgVideoData->extendPicBorder(); 385 TRenFilter::sampleHorUp ( m_iShiftPrec, pcPicYuvOrgVideoData->getLumaAddr() , pcPicYuvOrgVideoData->getStride() , m_iWidth, m_iHeight, m_aapiOrgVideoPel[ iViewNum ][0], m_aaiOrgVideoStrides[iViewNum][0] );386 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCbAddr() , pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][1], m_aaiOrgVideoStrides[iViewNum][1] );387 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCrAddr() , pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][2], m_aaiOrgVideoStrides[iViewNum][2] );457 TRenFilter::sampleHorUp ( m_iShiftPrec, pcPicYuvOrgVideoData->getLumaAddr() + m_uiHorOff * pcPicYuvOrgVideoData->getStride() , pcPicYuvOrgVideoData->getStride() , m_iWidth, m_iHeight, m_aapiOrgVideoPel[ iViewNum ][0], m_aaiOrgVideoStrides[iViewNum][0] ); 458 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 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] ); 388 460 } 389 461 390 462 if ( m_abSetupDepthFromOrgForView[iViewNum] ) 391 463 { 392 AOF( pcPicYuvOrgDepthData->getHeight() == m_iHeight|| pcPicYuvOrgDepthData->getWidth() == m_iWidth );393 TRenFilter::copy ( pcPicYuvOrgDepthData->getLumaAddr() , pcPicYuvOrgDepthData->getStride(), m_iWidth, m_iHeight, m_apiOrgDepthPel [ iViewNum], m_aiOrgDepthStrides [iViewNum] );464 AOF( pcPicYuvOrgDepthData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvOrgDepthData->getWidth() == m_iWidth ); 465 TRenFilter::copy ( pcPicYuvOrgDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvOrgDepthData->getStride() , pcPicYuvOrgDepthData->getStride(), m_iWidth, m_iHeight, m_apiOrgDepthPel [ iViewNum], m_aiOrgDepthStrides [iViewNum] ); 394 466 } 395 467 } … … 404 476 for (Int iBaseViewIdx = 0; iBaseViewIdx < m_iNumOfBaseViews; iBaseViewIdx++ ) 405 477 { 478 406 479 Bool bSetupFromOrgVideo = m_abSetupVideoFromOrgForView[iBaseViewIdx]; 407 480 Bool bSetupFromOrgDepth = m_abSetupDepthFromOrgForView[iBaseViewIdx]; 408 409 if ( ( bSetupFromOrgVideo || bSetupFromOrgDepth ) && m_aaeBaseViewPosInModel[iBaseViewIdx][iModelNum] != VIEWPOS_INVALID ) 481 bAnyRefFromOrg = bAnyRefFromOrg || bSetupFromOrgVideo || bSetupFromOrgDepth; 482 483 if ( m_aaeBaseViewPosInModel[iBaseViewIdx][iModelNum] != VIEWPOS_INVALID ) 410 484 { 411 485 bAnyRefFromOrg = true; … … 418 492 } 419 493 420 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, false );494 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, false, m_uiHorOff ); 421 495 422 496 // Setup to Org … … 438 512 } 439 513 440 // setup keeping reference from original data441 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, true 514 // setup keeping reference rendered from original data 515 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, true, m_uiHorOff); 442 516 } 443 517 } … … 468 542 } 469 543 544 545 Void 546 TRenModel::setHorOffset ( UInt uiHorOff ) 547 { 548 m_uiHorOff = uiHorOff; 549 } 550 551 #if LGE_VSO_EARLY_SKIP_A0093 552 RMDist 553 TRenModel::getDist( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Pel * piOrgData, Int iOrgStride) 554 #else 470 555 RMDist 471 556 TRenModel::getDist( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) 472 { 557 #endif 558 { 559 iStartPosY -= m_uiHorOff; 560 473 561 AOT( iWidth + iStartPosX > m_iWidth ); 474 562 AOT( iHeight + iStartPosY > m_iHeight ); … … 484 572 if (m_iCurrentContent == 1) 485 573 { 574 #if LGE_VSO_EARLY_SKIP_A0093 575 iDist += m_apcCurRenModels[iModelNum]->getDistDepth ( m_aiCurPosInModels[iModelNum], iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData , piOrgData, iOrgStride); 576 #else 486 577 iDist += m_apcCurRenModels[iModelNum]->getDistDepth ( m_aiCurPosInModels[iModelNum], iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData ); 578 #endif 487 579 } 488 580 else … … 498 590 TRenModel::setData( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) 499 591 { 592 iStartPosY -= m_uiHorOff; 593 500 594 iWidth = min(iWidth , m_iWidth - iStartPosX ); 501 595 iHeight = min(iHeight, m_iHeight - iStartPosY ); … … 510 604 if (m_iCurrentContent == 1) 511 605 { 606 #ifdef LGE_VSO_EARLY_SKIP_A0093 607 Int iTargetStride = m_aiCurDepthStrides[ m_iCurrentView ]; 608 m_apcCurRenModels[iModelNum]->setDepth ( m_aiCurPosInModels[iModelNum], iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData,m_apiCurDepthPel[ m_iCurrentView ] + iStartPosY * iTargetStride + iStartPosX ,iTargetStride ); 609 #else 512 610 m_apcCurRenModels[iModelNum]->setDepth ( m_aiCurPosInModels[iModelNum], iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData ); 513 611 #endif 514 612 } 515 613 else … … 519 617 } 520 618 619 #ifdef LGE_VSO_EARLY_SKIP_A0093 521 620 if (m_iCurrentContent == 1) 522 621 { … … 524 623 TRenFilter::copy( piNewData, iStride, iWidth, iHeight, m_apiCurDepthPel[ m_iCurrentView ] + iStartPosY * iTargetStride + iStartPosX, iTargetStride ); 525 624 } 526 else 527 { 528 Int iTargetStride = m_aaiCurVideoStrides[ m_iCurrentView ][m_iCurrentPlane]; 529 TRenFilter::copy( piNewData, iStride, iWidth, iHeight, m_aapiCurVideoPel[ m_iCurrentView ][m_iCurrentPlane] + iStartPosY * iTargetStride + iStartPosX, iTargetStride); 530 } 531 } 532 533 Void 534 TRenModel::getSynthVideo( Int iModelNum, Int iViewNum, TComPicYuv*& rpcPicYuvSynthVideo ) 535 { 536 Pel** ppiSynthVideoPel = NULL; 537 Pel* ppiSynthDepthPel = NULL; 538 Int iStride = -1; 539 Int aiStrides[3]; 540 541 m_apcRenModels[iModelNum]->getSynthView(iViewNum, ppiSynthVideoPel, ppiSynthDepthPel, iStride ); 542 543 aiStrides[0] = iStride; aiStrides[1] = iStride; aiStrides[2] = iStride; 544 xCopy2PicYuv( ppiSynthVideoPel, aiStrides, rpcPicYuvSynthVideo ); 545 } 546 547 Void 548 TRenModel::getSynthDepth( Int iModelNum, Int iViewNum, TComPicYuv*& rpcPicYuvSynthDepth ) 549 { 550 Pel** ppiSynthVideoPel = NULL; 551 Pel* piSynthDepthPel = NULL; 552 Int iStride = -1; 553 554 m_apcRenModels[iModelNum]->getSynthView(iViewNum, ppiSynthVideoPel, piSynthDepthPel, iStride ); 555 TRenFilter::copy( piSynthDepthPel, iStride, m_iWidth, m_iHeight, rpcPicYuvSynthDepth->getLumaAddr(), rpcPicYuvSynthDepth->getStride() ); 556 rpcPicYuvSynthDepth->setChromaTo( 128 << g_uiBitIncrement ); 557 } 558 625 #endif 626 } 627 628 Void 629 TRenModel::getSynthVideo( Int iModelNum, Int iViewNum, TComPicYuv* pcPicYuv ) 630 { 631 m_apcRenModels[iModelNum]->getSynthVideo(iViewNum, pcPicYuv, m_uiHorOff ); 632 } 633 634 Void 635 TRenModel::getSynthDepth( Int iModelNum, Int iViewNum, TComPicYuv* pcPicYuv ) 636 { 637 #if HHI_VSO_SPEEDUP_A033 638 m_apcRenModels[iModelNum]->getSynthDepth(iViewNum, pcPicYuv, m_uiHorOff ); 639 #else 640 m_apcRenModels[iModelNum]->getSynthDepth(iViewNum, pcPicYuv ); 641 #endif 642 } 559 643 560 644 Void … … 573 657 for (Int iCurModel = 0; iCurModel < m_iNumOfCurRenModels; iCurModel++) 574 658 { 575 Pel** ppiSynthVideoPel = NULL; 576 Pel* ppiSynthDepthPel = NULL; 577 Pel** ppiRefVideoPel = NULL; 578 Int iSynStride = -1; 579 Int* piRefStrides = NULL; 580 Int aiSynStrides[3]; 581 582 m_apcCurRenModels[iCurModel]->getSynthView( m_aiCurPosInModels[iCurModel], ppiSynthVideoPel, ppiSynthDepthPel, iSynStride ); 583 aiSynStrides[0] = iSynStride; aiSynStrides[1] = iSynStride; aiSynStrides[2] = iSynStride; 584 xCopy2PicYuv( ppiSynthVideoPel, aiSynStrides, &cPicYuvSynth ); 585 586 TComPicYuv* pcPicYuvOrgRef; 587 TComPicYuv* pcPicYuvRef; 588 m_apcCurRenModels[iCurModel]->getRefView ( pcPicYuvOrgRef, ppiRefVideoPel, piRefStrides ); 589 590 if (!pcPicYuvOrgRef ) 591 { 592 xCopy2PicYuv( ppiRefVideoPel, piRefStrides, &cPicYuvTempRef); 593 pcPicYuvRef = &cPicYuvTempRef; 594 } 595 else 596 { 597 pcPicYuvRef = pcPicYuvOrgRef; 598 } 659 m_apcCurRenModels[iCurModel]->getSynthVideo( m_aiCurPosInModels[iCurModel], &cPicYuvSynth, 0 ); 660 TComPicYuv* pcPicYuvRef = &cPicYuvTempRef; 661 m_apcCurRenModels[iCurModel]->getRefVideo ( m_aiCurPosInModels[iCurModel], pcPicYuvRef , 0 ); 599 662 600 663 iSSEY += TRenFilter::SSE( cPicYuvSynth.getLumaAddr(), cPicYuvSynth.getStride(), m_iWidth, m_iHeight , pcPicYuvRef->getLumaAddr(), pcPicYuvRef->getStride() ); … … 620 683 m_aaeBaseViewPosInModel[iBaseViewNum][iModelNum] = iViewPos; 621 684 622 m_apcRenModels[iModelNum]->setLRView( iViewPos, m_aapiCurVideoPel[iBaseViewNum], m_aaiCurVideoStrides[iBaseViewNum], m_apiCurDepthPel[iBaseViewNum], m_aiCurDepthStrides [iBaseViewNum] );623 624 685 if (bAdd) 625 686 { … … 639 700 } 640 701 } 641 642 Void643 TRenModel::xCopy2PicYuv( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget )644 {645 TRenFilter::copy ( ppiSrcVideoPel[0], piStrides[0], m_iWidth, m_iHeight, rpcPicYuvTarget->getLumaAddr(), rpcPicYuvTarget->getStride() );646 TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[1], piStrides[1], m_iWidth, m_iHeight, rpcPicYuvTarget->getCbAddr (), rpcPicYuvTarget->getCStride() );647 TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[2], piStrides[2], m_iWidth, m_iHeight, rpcPicYuvTarget->getCrAddr (), rpcPicYuvTarget->getCStride() );648 } -
trunk/source/Lib/TLibRenderer/TRenModel.h
r56 r100 50 50 51 51 // Creation 52 #if LGE_VSO_EARLY_SKIP_A0093 53 Void create ( Int iNumOfBaseViews, Int iNumOfModels, Int iWidth, Int iHeight, Int iShiftPrec, Int iHoleMargin, Bool bEarlySkip ); 54 #else 52 55 Void create ( Int iNumOfBaseViews, Int iNumOfModels, Int iWidth, Int iHeight, Int iShiftPrec, Int iHoleMargin ); 56 #endif 53 57 Void createSingleModel( Int iBaseViewNum, Int iContent, Int iModelNum, Int iLeftViewNum, Int iRightViewNum, Bool bUseOrgRef, Int iBlendMode ); 54 58 … … 57 61 Void setSingleModel ( Int iModelNum, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, TComPicYuv* pcPicYuvRefView ); 58 62 63 // Set horizontal offset 64 Void setHorOffset ( UInt uiHorOff ); 65 59 66 // Set Mode 60 67 Void setErrorMode ( Int iView, Int iContent, int iPlane ); 61 68 62 69 // Get Distortion, set Data 70 #ifdef LGE_VSO_EARLY_SKIP_A0093 71 Int64 getDist ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Pel * piOrgData, Int iOrgStride); 72 #else 63 73 Int64 getDist ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ); 74 #endif 64 75 Void setData ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ); 65 76 66 77 // Get Rendered View 67 Void getSynthVideo ( Int iModelNum, Int iViewNum, TComPicYuv*& rpcPicYuvSynthVideo ); 68 Void getSynthDepth ( Int iModelNum, Int iViewNum, TComPicYuv*& rpcPicYuvSynthDepth ); 78 79 Void getSynthVideo ( Int iModelNum, Int iViewNum, TComPicYuv* pcPicYuvSynthVideo ); 80 Void getSynthDepth ( Int iModelNum, Int iViewNum, TComPicYuv* pcPicYuvSynthDepth ); 69 81 70 82 // Get Total Distortion … … 74 86 // helpers 75 87 Void xSetLRViewAndAddModel( Int iModelNum, Int iBaseViewNum, Int iContent, Int iViewPos, Bool bAdd ); 76 Void xCopy2PicYuv ( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget );77 88 78 89 // Settings … … 80 91 Int** m_aaaiSubPelShiftLut[2]; 81 92 Int m_iHoleMargin; 93 #if LGE_VSO_EARLY_SKIP_A0093 94 Bool m_bEarlySkip; 95 #endif 82 96 83 97 /// Size of Video and Depth … … 88 102 89 103 Int m_iNumOfBaseViews; 104 105 #if HHI_VSO_SPEEDUP_A033 106 // Horizontal Offset in input data 107 UInt m_uiHorOff; 108 #endif 90 109 91 110 /// Current Error Type /// -
trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp
r81 r100 32 32 */ 33 33 34 35 34 #include "TRenImage.h" 36 35 #include "TRenFilter.h" … … 38 37 39 38 ////////////// TRENSINGLE MODEL /////////////// 40 TRenSingleModel::TRenSingleModel() 39 template <BlenMod iBM, Bool bBitInc> 40 TRenSingleModelC<iBM,bBitInc>::TRenSingleModelC() 41 41 : m_iDistShift ( g_uiBitIncrement << 1 ) 42 42 { … … 50 50 51 51 m_pcPicYuvRef = NULL; 52 53 m_pcOutputSamples = NULL; 54 m_pcOutputSamplesRow = NULL; 55 m_iOutputSamplesStride = -1; 56 57 m_ppiCurLUT = NULL; 58 m_piInvZLUTLeft = NULL; 59 m_piInvZLUTRight = NULL; 60 52 61 m_aapiRefVideoPel[0] = NULL; 53 62 m_aapiRefVideoPel[1] = NULL; 54 63 m_aapiRefVideoPel[2] = NULL; 55 64 56 57 65 m_aiRefVideoStrides[0] = -1; 58 66 m_aiRefVideoStrides[1] = -1; 59 67 m_aiRefVideoStrides[2] = -1; 60 68 69 61 70 for (UInt uiViewNum = 0 ; uiViewNum < 2; uiViewNum++) 62 71 { 63 72 // LUT 64 73 m_appiShiftLut[uiViewNum] = NULL; 74 75 m_pcInputSamples[uiViewNum] = NULL; 76 m_iInputSamplesStride = -1; 77 65 78 m_ppiCurLUT = NULL; 66 79 m_piInvZLUTLeft = NULL; 67 80 m_piInvZLUTRight = NULL; 68 69 // Cur Data 70 m_apiBaseDepthPel [uiViewNum] = NULL; 71 m_aiBaseDepthStrides [uiViewNum] = -1; 72 73 // State Data 74 m_apbOccluded [uiViewNum] = NULL; 75 m_apiFilled [uiViewNum] = NULL; 76 77 // Cur Data 78 m_aapiBaseVideoPel [uiViewNum] = NULL; 79 m_aaiBaseVideoStrides [uiViewNum] = NULL; 80 }; 81 82 m_piError = NULL; 83 84 for (UInt uiViewNum = 0 ; uiViewNum < 3; uiViewNum++) 85 { 86 m_apiSynthDepthPel[uiViewNum] = NULL; 87 for (UInt uiPlaneNum = 0; uiPlaneNum < 3; uiPlaneNum++) 88 { 89 // Rendered Data 90 m_aapiSynthVideoPel[uiViewNum][uiPlaneNum] = NULL; 91 } 92 } 93 } 94 95 TRenSingleModel::~TRenSingleModel() 96 { 97 if ( m_apbOccluded[0] ) delete[] m_apbOccluded[0]; 98 if ( m_apbOccluded[1] ) delete[] m_apbOccluded[1]; 99 100 if ( m_apiFilled [0] ) delete[] m_apiFilled [0]; 101 if ( m_apiFilled [1] ) delete[] m_apiFilled [1]; 102 103 if ( m_piError ) delete[] m_piError ; 104 105 106 for (UInt uiViewNum = 0 ; uiViewNum < 3; uiViewNum++) 107 { 108 for (UInt uiPlaneNum = 0; uiPlaneNum < 3; uiPlaneNum++) 109 { 110 if ( m_aapiSynthVideoPel[uiViewNum] && m_aapiSynthVideoPel[uiViewNum][uiPlaneNum] ) delete[] m_aapiSynthVideoPel[uiViewNum][uiPlaneNum]; 111 } 112 if ( m_apiSynthDepthPel[uiViewNum] ) delete[] m_apiSynthDepthPel[uiViewNum]; 113 } 114 115 delete[] (m_aapiRefVideoPel[0] - m_iPad * m_aiRefVideoStrides[0] - m_iPad ); 116 delete[] (m_aapiRefVideoPel[1] - m_iPad * m_aiRefVideoStrides[1] - m_iPad ); 117 delete[] (m_aapiRefVideoPel[2] - m_iPad * m_aiRefVideoStrides[2] - m_iPad ); 118 119 if ( m_piInvZLUTLeft ) delete[] m_piInvZLUTLeft; 120 if ( m_piInvZLUTRight ) delete[] m_piInvZLUTRight; 121 } 122 123 Void 124 TRenSingleModel::create( Int iMode, Int iWidth, Int iHeight, Int iShiftPrec, Int*** aaaiSubPelShiftTable, Int iHoleMargin, Bool bUseOrgRef, Int iBlendMode ) 125 { 126 m_iBlendMode = iBlendMode; 81 } 82 83 #ifdef LGE_VSO_EARLY_SKIP_A0093 84 m_pbHorSkip = NULL; 85 #endif 86 } 87 88 template <BlenMod iBM, Bool bBitInc> 89 TRenSingleModelC<iBM,bBitInc>::~TRenSingleModelC() 90 { 91 #ifdef LGE_VSO_EARLY_SKIP_A0093 92 if (m_pbHorSkip) 93 { 94 delete[] m_pbHorSkip; 95 m_pbHorSkip = NULL; 96 } 97 #endif 98 99 if ( m_pcInputSamples [0] ) delete[] m_pcInputSamples [0]; 100 if ( m_pcInputSamples [1] ) delete[] m_pcInputSamples [1]; 101 if ( m_pcOutputSamples ) delete m_pcOutputSamples ; 102 } 103 104 template <BlenMod iBM, Bool bBitInc> Void 105 #if LGE_VSO_EARLY_SKIP_A0093 106 TRenSingleModelC<iBM,bBitInc>::create( Int iMode, Int iWidth, Int iHeight, Int iShiftPrec, Int*** aaaiSubPelShiftTable, Int iHoleMargin, Bool bUseOrgRef, Int iBlendMode, Bool bEarlySkip ) 107 #else 108 TRenSingleModelC<iBM,bBitInc>::create( Int iMode, Int iWidth, Int iHeight, Int iShiftPrec, Int*** aaaiSubPelShiftTable, Int iHoleMargin, Bool bUseOrgRef, Int iBlendMode ) 109 #endif 110 111 { 112 #if LGE_VSO_EARLY_SKIP_A0093 113 m_pbHorSkip = new Bool [MAX_CU_SIZE]; 114 m_bEarlySkip = bEarlySkip; 115 #endif 116 117 AOF( iBlendMode == iBM ); 118 127 119 m_iMode = iMode; 120 128 121 m_iWidth = iWidth; 129 122 m_iHeight = iHeight; … … 160 153 m_aapiRefVideoPel [2] += m_aiRefVideoStrides[2] * m_iPad + m_iPad; 161 154 162 m_piError = new Int [m_iStride*m_iHeight]; 163 164 // Create Buffers 165 if ( (m_iMode == 0) || (m_iMode == 2 ) ) 166 { 167 m_apbOccluded [0] = new Bool[m_iStride*m_iHeight]; 168 m_apiFilled [0] = new Pel [m_iStride*m_iHeight]; 169 170 for (UInt uiPlaneNum = 0; uiPlaneNum < 3; uiPlaneNum++) 171 { 172 m_aapiSynthVideoPel[0][uiPlaneNum] = new Pel[m_iStride*m_iHeight]; 173 } 174 } 175 176 if ( (m_iMode == 1) || (m_iMode == 2 ) ) 177 { 178 m_apbOccluded [1] = new Bool[m_iStride*m_iHeight]; 179 m_apiFilled [1] = new Pel [m_iStride*m_iHeight]; 180 181 for (UInt uiPlaneNum = 0; uiPlaneNum < 3; uiPlaneNum++) 182 { 183 m_aapiSynthVideoPel[1][uiPlaneNum] = new Pel[m_iStride*m_iHeight]; 184 } 185 } 186 187 if ( m_iMode == 2 ) 188 { 189 m_apiSynthDepthPel[0] = new Pel[m_iStride*m_iHeight]; 190 m_apiSynthDepthPel[1] = new Pel[m_iStride*m_iHeight]; 191 m_apiSynthDepthPel[2] = new Pel[m_iStride*m_iHeight]; 192 193 for (UInt uiPlaneNum = 0; uiPlaneNum < 3; uiPlaneNum++) 194 { 195 m_aapiSynthVideoPel[2][uiPlaneNum] = new Pel[m_iStride*m_iHeight]; 196 } 197 } 198 } 199 200 Void 201 TRenSingleModel::setLRView( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride ) 155 m_iInputSamplesStride = m_iWidth+1; 156 m_iOutputSamplesStride = m_iWidth; 157 158 m_pcInputSamples[0] = new RenModelInPels[m_iInputSamplesStride*m_iHeight]; 159 m_pcInputSamples[1] = new RenModelInPels[m_iInputSamplesStride*m_iHeight]; 160 161 m_pcOutputSamples = new RenModelOutPels[m_iOutputSamplesStride*m_iHeight]; 162 } 163 164 template <BlenMod iBM, Bool bBitInc> Void 165 TRenSingleModelC<iBM,bBitInc>::setLRView( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride ) 202 166 { 203 167 AOF(( iViewPos == 0) || (iViewPos == 1) ); 168 169 RenModelInPels* pcCurInputSampleRow = m_pcInputSamples[iViewPos]; 170 171 Pel* piDRow = piCurDepthPel; 172 Pel* piYRow = apiCurVideoPel[0]; 173 #if HHI_VSO_COLOR_PLANES 174 Pel* piURow = apiCurVideoPel[1]; 175 Pel* piVRow = apiCurVideoPel[2]; 176 #endif 177 178 179 Int iOffsetX = ( iViewPos == VIEWPOS_RIGHT ) ? 1 : 0; 180 181 for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ ) 182 { 183 if ( iViewPos == VIEWPOS_RIGHT ) 184 { 185 Int iSubPosX = (1 << m_iShiftPrec); 186 pcCurInputSampleRow[0].aiY[iSubPosX] = piYRow[0]; 187 #if HHI_VSO_COLOR_PLANES 188 pcCurInputSampleRow[0].aiU[iSubPosX] = piURow[0]; 189 pcCurInputSampleRow[0].aiV[iSubPosX] = piVRow[0]; 190 #endif 191 } 192 193 for ( Int iPosX = 0; iPosX < m_iWidth; iPosX++ ) 194 { 195 pcCurInputSampleRow[iPosX].iD = piDRow[iPosX]; 196 197 for (Int iSubPosX = 0; iSubPosX < (1 << m_iShiftPrec)+1; iSubPosX++ ) 198 { 199 Int iShift = (iPosX << m_iShiftPrec) + iSubPosX; 200 pcCurInputSampleRow[iPosX+iOffsetX].aiY[iSubPosX] = piYRow[iShift]; 201 #if HHI_VSO_COLOR_PLANES 202 pcCurInputSampleRow[iPosX+iOffsetX].aiU[iSubPosX] = piURow[iShift]; 203 pcCurInputSampleRow[iPosX+iOffsetX].aiV[iSubPosX] = piVRow[iShift]; 204 #endif 205 } 206 } 207 208 pcCurInputSampleRow += m_iInputSamplesStride; 209 210 piDRow += iCurDepthStride; 211 piYRow += aiCurVideoStride[0]; 212 #if HHI_VSO_COLOR_PLANES 213 piURow += aiCurVideoStride[1]; 214 piVRow += aiCurVideoStride[2]; 215 #endif 216 } 217 218 204 219 m_aapiBaseVideoPel [iViewPos] = apiCurVideoPel; 205 220 m_aaiBaseVideoStrides [iViewPos] = aiCurVideoStride; 206 221 m_apiBaseDepthPel [iViewPos] = piCurDepthPel; 207 222 m_aiBaseDepthStrides [iViewPos] = iCurDepthStride; 208 } 209 210 Void 211 TRenSingleModel::setup( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference ) 223 224 } 225 226 template <BlenMod iBM, Bool bBitInc> Void 227 TRenSingleModelC<iBM,bBitInc>::setup( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference, UInt uiHorOff ) 212 228 { 213 229 AOT( !m_bUseOrgRef && pcOrgVideo ); 214 230 AOT( (ppiShiftLutLeft == NULL) && (m_iMode == 0 || m_iMode == 2) ); 215 231 AOT( (ppiShiftLutRight == NULL) && (m_iMode == 1 || m_iMode == 2) ); 216 #if HHI_FIX217 #else218 AOT( pcOrgVideo != NULL && bKeepReference );219 #endif220 232 221 233 m_appiShiftLut[0] = ppiShiftLutLeft; … … 225 237 m_pcPicYuvRef = pcOrgVideo; 226 238 227 #if HHI_FIX228 239 if ( pcOrgVideo && !bKeepReference ) 229 #else 230 if ( pcOrgVideo ) 231 #endif 232 { 233 TRenFilter::copy( pcOrgVideo->getLumaAddr(), pcOrgVideo->getStride() , m_iWidth, m_iHeight, m_aapiRefVideoPel[0], m_aiRefVideoStrides[0]); 234 TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCbAddr() , pcOrgVideo->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiRefVideoPel[1], m_aiRefVideoStrides[1]); 235 TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCrAddr() , pcOrgVideo->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiRefVideoPel[2], m_aiRefVideoStrides[2]); 240 { 241 TRenFilter::copy( pcOrgVideo->getLumaAddr() + uiHorOff * pcOrgVideo->getStride() , pcOrgVideo->getStride() , m_iWidth, m_iHeight, m_aapiRefVideoPel[0], m_aiRefVideoStrides[0]); 242 TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCbAddr() + (uiHorOff >> 1) * pcOrgVideo->getCStride(), pcOrgVideo->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiRefVideoPel[1], m_aiRefVideoStrides[1]); 243 TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCrAddr() + (uiHorOff >> 1) * pcOrgVideo->getCStride(), pcOrgVideo->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiRefVideoPel[2], m_aiRefVideoStrides[2]); 244 xSetStructRefView(); 236 245 } 237 246 238 247 // Initial Rendering 239 xSetInts( m_piError , m_iStride, m_iWidth, m_iHeight, 0 ); 248 xResetStructError(); 249 xInitSampleStructs(); 240 250 241 251 switch ( m_iMode ) 242 { 243 case 0: 244 xInitView( VIEWPOS_LEFT ); 245 xRenderL( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0], true ); 252 { 253 case 0: 254 #if LGE_VSO_EARLY_SKIP_A0093 255 xRenderL<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0],false ); 256 #else 257 xRenderL<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0] ); 258 #endif 246 259 break; 247 case 1: 248 xInitView( VIEWPOS_RIGHT ); 249 xRenderR( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1], true ); 260 case 1: 261 #ifdef LGE_VSO_EARLY_SKIP_A0093 262 xRenderR<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1],false); 263 #else 264 xRenderR<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1] ); 265 #endif 250 266 break; 251 267 case 2: 252 268 TRenFilter::setupZLUT( true, 30, iDistToLeft, ppiBaseShiftLutLeft, ppiBaseShiftLutRight, m_iBlendZThres, m_iBlendDistWeight, m_piInvZLUTLeft, m_piInvZLUTRight ); 253 xInitView( VIEWPOS_LEFT ); 254 xInitView( VIEWPOS_RIGHT ); 255 xInitView( VIEWPOS_MERGED ); 256 xRenderL( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0], true ); 257 xRenderR( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1], true ); 269 #ifdef LGE_VSO_EARLY_SKIP_A0093 270 xRenderL<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0],false); 271 xRenderR<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1],false); 272 #else 273 xRenderL<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0] ); 274 xRenderR<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1] ); 275 #endif 258 276 break; 259 277 default: … … 264 282 if ( !pcOrgVideo && !bKeepReference ) 265 283 { 266 xSetInts ( m_piError , m_iStride, m_iWidth, m_iHeight, 0 ); 267 TRenFilter::copy( m_aapiSynthVideoPel[m_iMode ][0], m_iStride, m_iWidth, m_iHeight , m_aapiRefVideoPel[0], m_aiRefVideoStrides[0]); 268 TRenFilter::copy( m_aapiSynthVideoPel[m_iMode ][1], m_iStride, m_iWidth, m_iHeight , m_aapiRefVideoPel[1], m_aiRefVideoStrides[1]); 269 TRenFilter::copy( m_aapiSynthVideoPel[m_iMode ][2], m_iStride, m_iWidth, m_iHeight , m_aapiRefVideoPel[2], m_aiRefVideoStrides[2]); 270 } 271 } 272 273 RMDist 274 TRenSingleModel::getDistDepth( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) 275 { 276 RMDist iSSE = 0; 277 switch (iViewPos ) 284 xResetStructError(); 285 xSetStructSynthViewAsRefView(); 286 } 287 } 288 289 template <BlenMod iBM, Bool bBitInc> Void 290 #if HHI_VSO_COLOR_PLANES 291 TRenSingleModelC<iBM,bBitInc>::xGetSampleStrTextPtrs( Int iViewNum, Pel RenModelOutPels::*& rpiSrcY, Pel RenModelOutPels::*& rpiSrcU, Pel RenModelOutPels::*& rpiSrcV ) 292 #else 293 TRenSingleModelC<iBM,bBitInc>::xGetSampleStrTextPtrs( Int iViewNum, Pel RenModelOutPels::*& rpiSrcY ) 294 #endif 295 { 296 switch ( iViewNum ) 278 297 { 279 298 case 0: 280 iSSE = xRenderL( iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData, false ); 299 rpiSrcY = &RenModelOutPels::iYLeft; 300 #if HHI_VSO_COLOR_PLANES 301 rpiSrcU = &RenModelOutPels::iULeft; 302 rpiSrcV = &RenModelOutPels::iVLeft; 303 #endif 281 304 break; 282 305 case 1: 283 iSSE = xRenderR( iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData, false ); 306 rpiSrcY = &RenModelOutPels::iYRight; 307 #if HHI_VSO_COLOR_PLANES 308 rpiSrcU = &RenModelOutPels::iURight; 309 rpiSrcV = &RenModelOutPels::iVRight; 310 #endif 311 break; 312 case 2: 313 rpiSrcY = &RenModelOutPels::iYBlended; 314 #if HHI_VSO_COLOR_PLANES 315 rpiSrcU = &RenModelOutPels::iUBlended; 316 rpiSrcV = &RenModelOutPels::iVBlended; 317 #endif 318 break; 319 } 320 } 321 322 323 template <BlenMod iBM, Bool bBitInc> Void 324 TRenSingleModelC<iBM,bBitInc>::xGetSampleStrDepthPtrs( Int iViewNum, Pel RenModelOutPels::*& rpiSrcD ) 325 { 326 AOT(iViewNum != 0 && iViewNum != 1); 327 rpiSrcD = (iViewNum == 1) ? &RenModelOutPels::iDRight : &RenModelOutPels::iDLeft; 328 } 329 330 331 template <BlenMod iBM, Bool bBitInc> Void 332 TRenSingleModelC<iBM,bBitInc>::xSetStructRefView( ) 333 { 334 RenModelOutPels* pcCurOutSampleRow = m_pcOutputSamples; 335 336 Pel* piYRow = m_aapiRefVideoPel[0]; 337 #if HHI_VSO_COLOR_PLANES 338 Pel* piURow = m_aapiRefVideoPel[1]; 339 Pel* piVRow = m_aapiRefVideoPel[2]; 340 #endif 341 342 for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ ) 343 { 344 for ( Int iPosX = 0; iPosX < m_iWidth; iPosX++ ) 345 { 346 pcCurOutSampleRow[iPosX].iYRef = piYRow[iPosX]; 347 #if HHI_VSO_COLOR_PLANES 348 pcCurOutSampleRow[iPosX].iURef = piURow[iPosX]; 349 pcCurOutSampleRow[iPosX].iVRef = piVRow[iPosX]; 350 #endif 351 } 352 353 pcCurOutSampleRow += m_iOutputSamplesStride; 354 355 piYRow += m_aiRefVideoStrides[0]; 356 #if HHI_VSO_COLOR_PLANES 357 piURow += m_aiRefVideoStrides[1]; 358 piVRow += m_aiRefVideoStrides[2]; 359 #endif 360 } 361 } 362 363 template <BlenMod iBM, Bool bBitInc> Void 364 TRenSingleModelC<iBM,bBitInc>::xResetStructError( ) 365 { 366 RenModelOutPels* pcCurOutSampleRow = m_pcOutputSamples; 367 368 for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ ) 369 { 370 for ( Int iPosX = 0; iPosX < m_iWidth; iPosX++ ) 371 { 372 pcCurOutSampleRow[iPosX].iError = 0; 373 } 374 pcCurOutSampleRow += m_iOutputSamplesStride; 375 } 376 } 377 378 template <BlenMod iBM, Bool bBitInc> Void 379 TRenSingleModelC<iBM,bBitInc>::xSetStructSynthViewAsRefView( ) 380 { 381 AOT( m_iMode < 0 || m_iMode > 2); 382 383 RenModelOutPels* pcCurOutSampleRow = m_pcOutputSamples; 384 385 Pel RenModelOutPels::* piSrcY = NULL; 386 387 #if HHI_VSO_COLOR_PLANES 388 Pel RenModelOutPels::* piSrcU = NULL; 389 Pel RenModelOutPels::* piSrcV = NULL; 390 xGetSampleStrTextPtrs( m_iMode, piSrcY, piSrcU, piSrcV ); 391 #else 392 xGetSampleStrTextPtrs( m_iMode, piSrcY ); 393 #endif 394 395 for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ ) 396 { 397 for ( Int iPosX = 0; iPosX < m_iWidth; iPosX++ ) 398 { 399 pcCurOutSampleRow[iPosX].iYRef = pcCurOutSampleRow[iPosX].*piSrcY; 400 #if HHI_VSO_COLOR_PLANES 401 pcCurOutSampleRow[iPosX].iURef = pcCurOutSampleRow[iPosX].*piSrcU; 402 pcCurOutSampleRow[iPosX].iVRef = pcCurOutSampleRow[iPosX].*piSrcV; 403 #endif 404 } 405 pcCurOutSampleRow += m_iOutputSamplesStride; 406 } 407 } 408 409 template <BlenMod iBM, Bool bBitInc> Void 410 TRenSingleModelC<iBM,bBitInc>::xInitSampleStructs() 411 { 412 RenModelOutPels* pcOutSampleRow = m_pcOutputSamples; 413 RenModelInPels * pcLeftInSampleRow = m_pcInputSamples[0]; 414 RenModelInPels * pcRightInSampleRow = m_pcInputSamples[1]; 415 416 417 for (Int iPosY = 0; iPosY < m_iHeight; iPosY++) 418 { 419 for (Int iPosX = 0; iPosX < m_iWidth; iPosX++) 420 { 421 //// Output Samples 422 pcOutSampleRow[iPosX].iFilledLeft = REN_IS_HOLE; 423 pcOutSampleRow[iPosX].iFilledRight = REN_IS_HOLE; 424 425 pcOutSampleRow[iPosX].iDLeft = 0; 426 pcOutSampleRow[iPosX].iDRight = 0; 427 pcOutSampleRow[iPosX].iDBlended = 0; 428 429 // Y Planes 430 pcOutSampleRow[iPosX].iYLeft = 0; 431 pcOutSampleRow[iPosX].iYRight = 0; 432 pcOutSampleRow[iPosX].iYBlended = 0; 433 #if HHI_VSO_COLOR_PLANES 434 // U Planes 435 pcOutSampleRow[iPosX].iULeft = 128 << g_uiBitIncrement; 436 pcOutSampleRow[iPosX].iURight = 128 << g_uiBitIncrement; 437 pcOutSampleRow[iPosX].iUBlended = 128 << g_uiBitIncrement; 438 439 // V Planes 440 pcOutSampleRow[iPosX].iVLeft = 128 << g_uiBitIncrement; 441 pcOutSampleRow[iPosX].iVRight = 128 << g_uiBitIncrement; 442 pcOutSampleRow[iPosX].iVBlended = 128 << g_uiBitIncrement; 443 #endif 444 //// Input Samples 445 pcLeftInSampleRow [iPosX].bOccluded = false; 446 pcRightInSampleRow[iPosX].bOccluded = false; 447 } 448 449 pcOutSampleRow += m_iOutputSamplesStride; 450 pcLeftInSampleRow += m_iInputSamplesStride; 451 pcRightInSampleRow += m_iInputSamplesStride; 452 } 453 } 454 455 456 #ifdef LGE_VSO_EARLY_SKIP_A0093 457 template <BlenMod iBM, Bool bBitInc> RMDist 458 TRenSingleModelC<iBM,bBitInc>::getDistDepth( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData , Pel * piOrgData, Int iOrgStride ) 459 #else 460 template <BlenMod iBM, Bool bBitInc> RMDist 461 TRenSingleModelC<iBM,bBitInc>::getDistDepth( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) 462 #endif 463 { 464 RMDist iSSE = 0; 465 #ifdef LGE_VSO_EARLY_SKIP_A0093 466 Bool bEarlySkip; 467 #endif 468 switch ( iViewPos ) 469 { 470 case 0: 471 #ifdef LGE_VSO_EARLY_SKIP_A0093 472 bEarlySkip = m_bEarlySkip ? xDetectEarlySkipL(iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData, piOrgData, iOrgStride) : false; 473 if( !bEarlySkip ) 474 { 475 iSSE = xRenderL<false>( iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData,true ); 476 } 477 #else 478 iSSE = xRenderL<false>( iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData ); 479 #endif 480 break; 481 case 1: 482 #ifdef LGE_VSO_EARLY_SKIP_A0093 483 bEarlySkip = m_bEarlySkip ? xDetectEarlySkipR(iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData, piOrgData, iOrgStride) : false; 484 if( !bEarlySkip ) 485 { 486 iSSE = xRenderR<false>( iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData,true ); 487 } 488 #else 489 iSSE = xRenderR<false>( iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData ); 490 #endif 284 491 break; 285 492 default: 286 493 assert(0); 287 494 } 495 288 496 return iSSE; 289 497 } 290 291 Void 292 TRenSingleModel::setDepth( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) 293 { 294 switch (iViewPos ) 295 { 296 case 0: 297 xRenderL( iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData, true ); 298 break; 299 case 1: 300 xRenderR( iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData, true ); 301 break; 302 default: 303 assert(0); 304 } 305 } 306 307 308 Void 309 TRenSingleModel::getSynthView( Int iViewPos, Pel**& rppiRenVideoPel, Pel*& rpiRenDepthPel, Int& riStride ) 310 { 311 rppiRenVideoPel = m_aapiSynthVideoPel[iViewPos]; 312 rpiRenDepthPel = m_apiSynthDepthPel [iViewPos]; 313 riStride = m_iStride; 314 } 315 316 317 Void 318 TRenSingleModel::getRefView( TComPicYuv*& rpcPicYuvRefView, Pel**& rppiRefVideoPel, Int*& raiStrides ) 319 { 320 rpcPicYuvRefView = m_pcPicYuvRef; 321 rppiRefVideoPel = m_aapiRefVideoPel; 322 raiStrides = m_aiRefVideoStrides; 323 } 324 325 326 RMDist 327 TRenSingleModel::getDistVideo( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) 498 #ifdef LGE_VSO_EARLY_SKIP_A0093 499 template <BlenMod iBM, Bool bBitInc> Void 500 TRenSingleModelC<iBM,bBitInc>::setDepth( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Pel* piOrgData, Int iOrgStride ) 501 #else 502 template <BlenMod iBM, Bool bBitInc> Void 503 TRenSingleModelC<iBM,bBitInc>::setDepth( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) 504 #endif 505 { 506 #ifdef LGE_VSO_EARLY_SKIP_A0093 507 Bool bEarlySkip; 508 #endif 509 switch ( iViewPos ) 510 { 511 case 0: 512 #ifdef LGE_VSO_EARLY_SKIP_A0093 513 bEarlySkip = m_bEarlySkip ? xDetectEarlySkipL(iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData, piOrgData,iOrgStride) : false; 514 if( !bEarlySkip ) 515 { 516 xRenderL<true>( iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData,true ); 517 } 518 #else 519 xRenderL<true>( iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData ); 520 #endif 521 break; 522 case 1: 523 #ifdef LGE_VSO_EARLY_SKIP_A0093 524 bEarlySkip = m_bEarlySkip ? xDetectEarlySkipR(iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData, piOrgData,iOrgStride) : false; 525 if( !bEarlySkip ) 526 { 527 xRenderR<true>( iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData,true ); 528 } 529 #else 530 xRenderR<true>( iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData ); 531 #endif 532 break; 533 default: 534 assert(0); 535 } 536 } 537 538 template <BlenMod iBM, Bool bBitInc> Void 539 TRenSingleModelC<iBM,bBitInc>::getSynthVideo( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) 540 { 541 AOT( pcPicYuv->getWidth() != m_iWidth ); 542 AOT( pcPicYuv->getHeight() > m_iHeight + uiHorOffset ); 543 544 #if HHI_VSO_COLOR_PLANES 545 Pel RenModelOutPels::* piText[3] = { NULL, NULL, NULL }; 546 xGetSampleStrTextPtrs(iViewPos, piText[0], piText[1], piText[2]); 547 548 // Temp image for chroma down sampling 549 PelImage cTempImage( m_iWidth, m_iHeight, 3, 0); 550 Int aiStrides[3]; 551 Pel* apiData [3]; 552 553 cTempImage.getDataAndStrides( apiData, aiStrides ); 554 555 for (UInt uiCurPlane = 0; uiCurPlane < 3; uiCurPlane++ ) 556 { 557 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piText[uiCurPlane], apiData[uiCurPlane], aiStrides[uiCurPlane] , m_iWidth, m_iHeight); 558 } 559 560 xCopy2PicYuv( apiData, aiStrides, pcPicYuv, uiHorOffset ); 561 #else 562 Pel RenModelOutPels::* piY; 563 xGetSampleStrTextPtrs(iViewPos, piY); 564 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piY, pcPicYuv->getLumaAddr() + uiHorOffset * pcPicYuv->getStride(), pcPicYuv->getStride(), m_iWidth, m_iHeight ); 565 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement ); 566 #endif 567 } 568 569 570 template <BlenMod iBM, Bool bBitInc> Void 571 TRenSingleModelC<iBM,bBitInc>::getSynthDepth( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOff ) 572 { 573 AOT( iViewPos != 0 && iViewPos != 1); 574 575 AOT( pcPicYuv->getWidth() != m_iWidth ); 576 AOT( pcPicYuv->getHeight() > m_iHeight + uiHorOff ); 577 578 Pel RenModelOutPels::* piD = 0; 579 xGetSampleStrDepthPtrs(iViewPos, piD); 580 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piD, pcPicYuv->getLumaAddr() + pcPicYuv->getStride() * uiHorOff, pcPicYuv->getStride(), m_iWidth, m_iHeight ); 581 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement ); 582 } 583 584 template <BlenMod iBM, Bool bBitInc> Void 585 TRenSingleModelC<iBM,bBitInc>::getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) 586 { 587 AOT( pcPicYuv->getWidth() != m_iWidth ); 588 AOT( pcPicYuv->getHeight() > m_iHeight + uiHorOffset); 589 590 #if HHI_VSO_COLOR_PLANES 591 Pel RenModelOutPels::* piText[3]; 592 piText[0] = &RenModelOutPels::iYRef; 593 piText[1] = &RenModelOutPels::iURef; 594 piText[2] = &RenModelOutPels::iVRef; 595 596 // Temp image for chroma down sampling 597 PelImage cTempImage( m_iWidth, m_iHeight, 3, 0); 598 Int aiStrides[3]; 599 Pel* apiData [3]; 600 601 cTempImage.getDataAndStrides( apiData, aiStrides ); 602 603 for (UInt uiCurPlane = 0; uiCurPlane < 3; uiCurPlane++ ) 604 { 605 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piText[uiCurPlane], apiData[uiCurPlane], aiStrides[uiCurPlane] , m_iWidth, m_iHeight); 606 } 607 608 xCopy2PicYuv( apiData, aiStrides, pcPicYuv, uiHorOffset ); 609 #else 610 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, &RenModelOutPels::iYRef, pcPicYuv->getLumaAddr() * pcPicYuv->getStride() + uiHorOffset, pcPicYuv->getStride(), m_iWidth, m_iHeight ); 611 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement ); 612 #endif 613 } 614 615 616 template <BlenMod iBM, Bool bBitInc> RMDist 617 TRenSingleModelC<iBM,bBitInc>::getDistVideo( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) 328 618 { 329 619 AOF(false); … … 331 621 } 332 622 333 Void334 TRenSingleModel ::setVideo( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData )623 template <BlenMod iBM, Bool bBitInc> Void 624 TRenSingleModelC<iBM,bBitInc>::setVideo( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) 335 625 { 336 626 AOF(false); … … 339 629 340 630 341 __inline Void 342 TRenSingleModel::xSetViewRow( Int iPosY ) 343 { 344 m_aapiBaseVideoPelRow [m_iCurViewPos][0] = m_aapiBaseVideoPel [m_iCurViewPos] [0] + m_aaiBaseVideoStrides [ m_iCurViewPos ][0] * iPosY; 345 m_aapiBaseVideoPelRow [m_iCurViewPos][1] = m_aapiBaseVideoPel [m_iCurViewPos] [1] + m_aaiBaseVideoStrides [ m_iCurViewPos ][1] * iPosY; 346 m_aapiBaseVideoPelRow [m_iCurViewPos][2] = m_aapiBaseVideoPel [m_iCurViewPos] [2] + m_aaiBaseVideoStrides [ m_iCurViewPos ][2] * iPosY; 347 348 m_apiBaseDepthPelRow [m_iCurViewPos] = m_apiBaseDepthPel [m_iCurViewPos] + m_aiBaseDepthStrides [ m_iCurViewPos] * iPosY; 349 m_apbOccludedRow [m_iCurViewPos] = m_apbOccluded [m_iCurViewPos] + m_iStride * iPosY; 350 m_apiFilledRow [m_iCurViewPos] = m_apiFilled [m_iCurViewPos] + m_iStride * iPosY; 351 m_apiErrorRow = m_piError + m_iStride * iPosY; 352 353 m_aapiSynthVideoPelRow [m_iCurViewPos][0] = m_aapiSynthVideoPel [m_iCurViewPos] [0] + m_iStride * iPosY; 354 m_aapiSynthVideoPelRow [m_iCurViewPos][1] = m_aapiSynthVideoPel [m_iCurViewPos] [1] + m_iStride * iPosY; 355 m_aapiSynthVideoPelRow [m_iCurViewPos][2] = m_aapiSynthVideoPel [m_iCurViewPos] [2] + m_iStride * iPosY; 356 357 m_aapiRefVideoPelRow [0] = m_aapiRefVideoPel [0] + m_aiRefVideoStrides [0] * iPosY; 358 m_aapiRefVideoPelRow [1] = m_aapiRefVideoPel [1] + m_aiRefVideoStrides [1] * iPosY; 359 m_aapiRefVideoPelRow [2] = m_aapiRefVideoPel [2] + m_aiRefVideoStrides [2] * iPosY; 360 361 if (m_iMode == 2) 362 { 363 m_apiSynthDepthPelRow [m_iCurViewPos ] = m_apiSynthDepthPel [m_iCurViewPos] + m_iStride * iPosY; 364 m_aapiSynthVideoPelRow[m_iOtherViewPos][0] = m_aapiSynthVideoPel [m_iOtherViewPos][0] + m_iStride * iPosY; 365 m_aapiSynthVideoPelRow[m_iOtherViewPos][1] = m_aapiSynthVideoPel [m_iOtherViewPos][1] + m_iStride * iPosY; 366 m_aapiSynthVideoPelRow[m_iOtherViewPos][2] = m_aapiSynthVideoPel [m_iOtherViewPos][2] + m_iStride * iPosY; 367 368 m_apiFilledRow [m_iOtherViewPos] = m_apiFilled [m_iOtherViewPos] + m_iStride * iPosY; 369 m_apiSynthDepthPelRow [m_iOtherViewPos] = m_apiSynthDepthPel [m_iOtherViewPos] + m_iStride * iPosY; 370 371 m_aapiSynthVideoPelRow[2 ][0] = m_aapiSynthVideoPel[2] [0] + m_iStride * iPosY; 372 m_aapiSynthVideoPelRow[2 ][1] = m_aapiSynthVideoPel[2] [1] + m_iStride * iPosY; 373 m_aapiSynthVideoPelRow[2 ][2] = m_aapiSynthVideoPel[2] [2] + m_iStride * iPosY; 374 } 375 } 376 377 __inline Void 378 TRenSingleModel::xIncViewRow( ) 379 { 380 m_aapiBaseVideoPelRow [m_iCurViewPos][0] += m_aaiBaseVideoStrides [ m_iCurViewPos ][0]; 381 m_aapiBaseVideoPelRow [m_iCurViewPos][1] += m_aaiBaseVideoStrides [ m_iCurViewPos ][1]; 382 m_aapiBaseVideoPelRow [m_iCurViewPos][2] += m_aaiBaseVideoStrides [ m_iCurViewPos ][2]; 383 384 m_apiBaseDepthPelRow [m_iCurViewPos] += m_aiBaseDepthStrides [ m_iCurViewPos] ; 385 m_apbOccludedRow [m_iCurViewPos] += m_iStride ; 386 m_apiFilledRow [m_iCurViewPos] += m_iStride ; 387 m_apiErrorRow += m_iStride ; 388 389 m_aapiSynthVideoPelRow [m_iCurViewPos][0] += m_iStride ; 390 m_aapiSynthVideoPelRow [m_iCurViewPos][1] += m_iStride ; 391 m_aapiSynthVideoPelRow [m_iCurViewPos][2] += m_iStride ; 392 393 m_aapiRefVideoPelRow [0] += m_aiRefVideoStrides [0]; 394 m_aapiRefVideoPelRow [1] += m_aiRefVideoStrides [1]; 395 m_aapiRefVideoPelRow [2] += m_aiRefVideoStrides [2]; 396 397 if (m_iMode == 2) 398 { 399 m_apiSynthDepthPelRow [m_iCurViewPos ] += m_iStride ; // This is correct! 400 401 m_aapiSynthVideoPelRow[m_iOtherViewPos][0] += m_iStride ; 402 m_aapiSynthVideoPelRow[m_iOtherViewPos][1] += m_iStride ; 403 m_aapiSynthVideoPelRow[m_iOtherViewPos][2] += m_iStride ; 404 405 m_apiFilledRow [m_iOtherViewPos] += m_iStride ; 406 m_apiSynthDepthPelRow [m_iOtherViewPos] += m_iStride ; 407 408 m_aapiSynthVideoPelRow[2 ][0] += m_iStride ; 409 m_aapiSynthVideoPelRow[2 ][1] += m_iStride ; 410 m_aapiSynthVideoPelRow[2 ][2] += m_iStride ; 411 } 412 } 413 414 __inline RMDist 415 TRenSingleModel::xRenderL( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Bool bAdd ) 416 { 417 m_bSet = bAdd; 418 m_iCurViewPos = 0; 419 m_iOtherViewPos = 1; 631 template <BlenMod iBM, Bool bBitInc> __inline Void 632 TRenSingleModelC<iBM,bBitInc>::xSetViewRow( Int iPosY ) 633 { 634 m_pcInputSamplesRow[0] = m_pcInputSamples[0] + m_iInputSamplesStride * iPosY; 635 m_pcInputSamplesRow[1] = m_pcInputSamples[1] + m_iInputSamplesStride * iPosY; 636 m_pcOutputSamplesRow = m_pcOutputSamples + m_iOutputSamplesStride * iPosY; 637 638 } 639 640 template <BlenMod iBM, Bool bBitInc> __inline Void 641 TRenSingleModelC<iBM,bBitInc>::xIncViewRow( ) 642 { 643 m_pcInputSamplesRow[0] += m_iInputSamplesStride ; 644 m_pcInputSamplesRow[1] += m_iInputSamplesStride ; 645 m_pcOutputSamplesRow += m_iOutputSamplesStride; 646 } 647 #if LGE_VSO_EARLY_SKIP_A0093 648 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline RMDist 649 TRenSingleModelC<iBM,bBitInc>::xRenderL( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Bool bFast) 650 #else 651 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline RMDist 652 TRenSingleModelC<iBM,bBitInc>::xRenderL( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData) 653 #endif 654 { 655 const Int iCurViewPos = 0; 656 const Int iOtherViewPos = 1; 657 658 m_iCurViewPos = iCurViewPos ; 659 m_iOtherViewPos = iOtherViewPos; 420 660 421 661 m_piNewDepthData = piNewData; … … 426 666 return 0; 427 667 428 //TODO: Specialize to left and right; setData and getDist429 430 668 // Get Data 431 m_ppiCurLUT = m_appiShiftLut [ m_iCurViewPos];669 m_ppiCurLUT = m_appiShiftLut [iCurViewPos]; 432 670 433 671 xSetViewRow ( iStartPosY); … … 441 679 for (Int iPosY = iStartPosY; iPosY < iStartPosY + iHeight; iPosY++ ) 442 680 { 681 #ifdef LGE_VSO_EARLY_SKIP_A0093 682 if( m_bEarlySkip && bFast ) 683 { 684 if ( m_pbHorSkip[iPosY-iStartPosY] ) 685 { 686 xIncViewRow(); 687 m_piNewDepthData += iStride; 688 continue; 689 } 690 } 691 #endif 443 692 m_bInOcclusion = false; 444 693 … … 454 703 m_iLastOccludedSPos = iCurSPos + 1; 455 704 m_iLastOccludedSPosFP = xRangeLeftL( m_iLastOccludedSPos ); 456 xExtrapolateMarginL ( iCurSPos, iEndChangePos, iError ); 457 iMinChangedSPos = Min( iMinChangedSPos, (iEndChangePos << m_iShiftPrec) - m_ppiCurLUT[0][ RemoveBitIncrement( max(m_apiBaseDepthPelRow[m_iCurViewPos][iEndChangePos], m_piNewDepthData[iPosXinNewData] )) ]); 705 xExtrapolateMarginL<bSet> ( iCurSPos, iEndChangePos, iError ); 706 707 iMinChangedSPos = Min( iMinChangedSPos, (iEndChangePos << m_iShiftPrec) - m_ppiCurLUT[0][ RenModRemoveBitInc( Max(m_pcInputSamplesRow[iCurViewPos][iEndChangePos].iD, m_piNewDepthData[iPosXinNewData] )) ]); 458 708 iLastSPos = iCurSPos; 459 709 m_iLastDepth = m_iCurDepth; 710 711 if ( bSet ) 712 { 713 m_pcInputSamplesRow[iCurViewPos][iEndChangePos].iD = m_piNewDepthData[iPosXinNewData]; 714 } 715 460 716 iPosXinNewData--; 461 717 iEndChangePos--; … … 464 720 { 465 721 iLastSPos = xShift(iEndChangePos+1); 466 m_iLastDepth = m_ apiBaseDepthPelRow[m_iCurViewPos][iEndChangePos+1];722 m_iLastDepth = m_pcInputSamplesRow [iCurViewPos][iEndChangePos+1].iD; 467 723 xInitRenderPartL( iEndChangePos, iLastSPos ); 468 724 } … … 473 729 { 474 730 // Get minimal changed sample position 475 iMinChangedSPos = Min( iMinChangedSPos, (iCurPosX << m_iShiftPrec) - m_ppiCurLUT[0][ RemoveBitIncrement( max(m_apiBaseDepthPelRow[m_iCurViewPos][iCurPosX], m_piNewDepthData[iPosXinNewData] )) ]); 731 732 iMinChangedSPos = Min( iMinChangedSPos, (iCurPosX << m_iShiftPrec) - m_ppiCurLUT[0][ RenModRemoveBitInc( Max(m_pcInputSamplesRow[iCurViewPos][iCurPosX].iD, m_piNewDepthData[iPosXinNewData] )) ]); 476 733 Int iCurSPos = xShiftNewData(iCurPosX,iPosXinNewData); 477 734 m_iCurDepth = m_piNewDepthData[iPosXinNewData]; 478 xRenderRangeL (iCurSPos, iLastSPos, iCurPosX, iError );735 xRenderRangeL<bSet>(iCurSPos, iLastSPos, iCurPosX, iError ); 479 736 iLastSPos = iCurSPos; 480 737 m_iLastDepth = m_iCurDepth; 738 739 if ( bSet ) 740 { 741 m_pcInputSamplesRow[iCurViewPos][iCurPosX].iD = m_piNewDepthData[iPosXinNewData]; 742 } 743 481 744 iPosXinNewData--; 482 745 } … … 486 749 { 487 750 Int iCurSPos = xShift(iCurPosX); 488 m_iCurDepth = m_apiBaseDepthPelRow[m_iCurViewPos][iCurPosX]; 489 xRenderRangeL( iCurSPos, iLastSPos, iCurPosX, iError ); 751 752 m_iCurDepth = m_pcInputSamplesRow[iCurViewPos][iCurPosX].iD; 753 xRenderRangeL<bSet>( iCurSPos, iLastSPos, iCurPosX, iError ); 490 754 491 755 if ( iCurSPos < iMinChangedSPos ) … … 499 763 } 500 764 765 501 766 xIncViewRow(); 502 767 m_piNewDepthData += iStride; … … 505 770 } 506 771 507 508 __inline RMDist 509 TRenSingleModel::xRenderR( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Bool bAdd ) 510 { 511 m_bSet = bAdd; 512 m_iCurViewPos = 1; 513 m_iOtherViewPos = 0; 772 #ifdef LGE_VSO_EARLY_SKIP_A0093 773 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline RMDist 774 TRenSingleModelC<iBM,bBitInc>::xRenderR( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData , Bool bFast) 775 #else 776 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline RMDist 777 TRenSingleModelC<iBM,bBitInc>::xRenderR( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) 778 #endif 779 { 780 781 const Int iCurViewPos = 1; 782 const Int iOtherViewPos = 0; 783 784 m_iCurViewPos = iCurViewPos; 785 m_iOtherViewPos = iOtherViewPos; 514 786 515 787 m_piNewDepthData = piNewData; … … 521 793 522 794 // Get Data 523 m_ppiCurLUT = m_appiShiftLut [m_iCurViewPos]; 524 795 m_ppiCurLUT = m_appiShiftLut [iCurViewPos]; 525 796 xSetViewRow ( iStartPosY); 526 797 … … 534 805 for (Int iPosY = iStartPosY; iPosY < iStartPosY + iHeight; iPosY++ ) 535 806 { 807 808 #ifdef LGE_VSO_EARLY_SKIP_A0093 809 if( m_bEarlySkip && bFast ) 810 { 811 if ( m_pbHorSkip[iPosY-iStartPosY] ) 812 { 813 xIncViewRow(); 814 m_piNewDepthData += iStride; 815 continue; 816 } 817 } 818 #endif 536 819 m_bInOcclusion = false; 537 820 … … 547 830 m_iLastOccludedSPos = iCurSPos - 1; 548 831 m_iLastOccludedSPosFP = xRangeRightR( m_iLastOccludedSPos ); 549 xExtrapolateMarginR ( iCurSPos, iStartChangePos, iError ); 550 iMaxChangedSPos = max( iMaxChangedSPos, (iStartChangePos << m_iShiftPrec) - m_ppiCurLUT[0][ RemoveBitIncrement( max(m_apiBaseDepthPelRow[m_iCurViewPos][iStartChangePos], m_piNewDepthData[iPosXinNewData] )) ]); 832 xExtrapolateMarginR<bSet> ( iCurSPos, iStartChangePos, iError ); 833 834 iMaxChangedSPos = Max( iMaxChangedSPos, (iStartChangePos << m_iShiftPrec) - m_ppiCurLUT[0][ RenModRemoveBitInc( Max(m_pcInputSamplesRow[iCurViewPos][iStartChangePos].iD, m_piNewDepthData[iPosXinNewData] )) ]); 551 835 iLastSPos = iCurSPos; 552 836 m_iLastDepth = m_iCurDepth; 837 if ( bSet ) 838 { 839 m_pcInputSamplesRow[iCurViewPos][iStartChangePos].iD = m_piNewDepthData[iPosXinNewData]; 840 } 841 842 553 843 iPosXinNewData++; 554 844 iStartChangePos++; … … 557 847 { 558 848 iLastSPos = xShift(iStartChangePos-1); 559 m_iLastDepth = m_apiBaseDepthPelRow[m_iCurViewPos][iStartChangePos-1]; 849 850 m_iLastDepth = m_pcInputSamplesRow[iCurViewPos][iStartChangePos-1].iD; 560 851 xInitRenderPartR( iStartChangePos, iLastSPos ); 561 852 } … … 566 857 { 567 858 // Get minimal changed sample position 568 iMaxChangedSPos = max( iMaxChangedSPos, (iCurPosX << m_iShiftPrec) - m_ppiCurLUT[0][ RemoveBitIncrement( max(m_apiBaseDepthPelRow[m_iCurViewPos][iCurPosX], m_piNewDepthData[iPosXinNewData] )) ]); 859 860 iMaxChangedSPos = Max( iMaxChangedSPos, (iCurPosX << m_iShiftPrec) - m_ppiCurLUT[0][ RenModRemoveBitInc( Max(m_pcInputSamplesRow[iCurViewPos][iCurPosX].iD, m_piNewDepthData[iPosXinNewData] )) ]); 569 861 Int iCurSPos = xShiftNewData(iCurPosX,iPosXinNewData); 570 862 m_iCurDepth = m_piNewDepthData[iPosXinNewData]; 571 xRenderRangeR (iCurSPos, iLastSPos, iCurPosX, iError );863 xRenderRangeR<bSet>(iCurSPos, iLastSPos, iCurPosX, iError ); 572 864 iLastSPos = iCurSPos; 573 865 m_iLastDepth = m_iCurDepth; 866 867 if ( bSet ) 868 { 869 m_pcInputSamplesRow[iCurViewPos][iCurPosX].iD = m_piNewDepthData[iPosXinNewData]; 870 } 871 574 872 iPosXinNewData++; 575 873 } … … 579 877 { 580 878 Int iCurSPos = xShift(iCurPosX); 581 m_iCurDepth = m_apiBaseDepthPelRow[m_iCurViewPos][iCurPosX]; 582 xRenderRangeR( iCurSPos, iLastSPos, iCurPosX, iError ); 879 880 m_iCurDepth = m_pcInputSamplesRow[iCurViewPos][iCurPosX].iD; 881 xRenderRangeR<bSet>( iCurSPos, iLastSPos, iCurPosX, iError ); 583 882 584 883 if ( iCurSPos > iMaxChangedSPos ) … … 590 889 m_iLastDepth = m_iCurDepth; 591 890 } 891 592 892 xIncViewRow(); 593 893 m_piNewDepthData += iStride; … … 597 897 598 898 599 __inline Void 600 TRenSingleModel::xInitRenderPartL( Int iEndChangePos, Int iLastSPos ) 601 { 899 template <BlenMod iBM, Bool bBitInc> __inline Void 900 TRenSingleModelC<iBM,bBitInc>::xInitRenderPartL( Int iEndChangePos, Int iLastSPos ) 901 { 902 const Int iCurViewPos = 0; 602 903 // GET MINIMAL OCCLUDED SAMPLE POSITION 603 904 Int iCurPosX = iEndChangePos; 604 905 605 if ( ( iCurPosX + 1 < m_iWidth ) && (m_apbOccludedRow[m_iCurViewPos][ iCurPosX + 1] ) ) 906 907 if ( ( iCurPosX + 1 < m_iWidth ) && (m_pcInputSamplesRow[iCurViewPos][ iCurPosX + 1].bOccluded ) ) 606 908 { 607 909 iCurPosX++; 608 while ( (iCurPosX + 1 < m_iWidth) && (m_apbOccludedRow[m_iCurViewPos][ iCurPosX + 1] ) ) 910 911 while ( (iCurPosX + 1 < m_iWidth) && (m_pcInputSamplesRow[iCurViewPos][ iCurPosX + 1].bOccluded ) ) 912 609 913 iCurPosX++; 610 914 … … 630 934 }; 631 935 632 __inline Void 633 TRenSingleModel::xInitRenderPartR( Int iStartChangePos, Int iLastSPos ) 634 { 936 template <BlenMod iBM, Bool bBitInc> __inline Void 937 TRenSingleModelC<iBM,bBitInc>::xInitRenderPartR( Int iStartChangePos, Int iLastSPos ) 938 { 939 const Int iCurViewPos = 1; 635 940 // GET MINIMAL OCCLUDED SAMPLE POSITION 636 941 Int iCurPosX = iStartChangePos; 637 942 638 if ( ( iCurPosX - 1 > -1 ) && (m_ apbOccludedRow[m_iCurViewPos][ iCurPosX - 1]) )943 if ( ( iCurPosX - 1 > -1 ) && (m_pcInputSamplesRow[iCurViewPos][ iCurPosX - 1].bOccluded ) ) 639 944 { 640 945 iCurPosX--; 641 while ( (iCurPosX - 1 > -1 ) && (m_apbOccludedRow[m_iCurViewPos][ iCurPosX - 1] ) ) 946 947 while ( (iCurPosX - 1 > -1 ) && (m_pcInputSamplesRow[iCurViewPos][ iCurPosX - 1].bOccluded ) ) 642 948 iCurPosX--; 643 949 … … 663 969 664 970 665 __inline Void666 TRenSingleModel ::xRenderShiftedRangeL(Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError )971 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline Void 972 TRenSingleModelC<iBM,bBitInc>::xRenderShiftedRangeL(Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ) 667 973 { 668 974 assert( iCurSPos <= iLastSPos ); … … 672 978 if ( iDeltaSPos > m_iGapTolerance ) 673 979 { 674 xFillHoleL ( iCurSPos, iLastSPos, iCurPos, riError );980 xFillHoleL<bSet>( iCurSPos, iLastSPos, iCurPos, riError ); 675 981 } 676 982 else … … 679 985 return; 680 986 681 AOT( iDeltaSPos > m_iGapTolerance );987 RM_AOT( iDeltaSPos > m_iGapTolerance ); 682 988 683 989 m_iThisDepth = m_iCurDepth; 684 for (Int iFillSPos = max(0, xRangeLeftL(iCurSPos) ); iFillSPos <= min(xRangeRightL( iLastSPos ) ,m_iLastOccludedSPosFP-1); iFillSPos++ )990 for (Int iFillSPos = Max(0, xRangeLeftL(iCurSPos) ); iFillSPos <= min(xRangeRightL( iLastSPos ) ,m_iLastOccludedSPosFP-1); iFillSPos++ ) 685 991 { 686 992 Int iDeltaCurSPos = (iFillSPos << m_iShiftPrec) - iCurSPos; 687 993 688 AOT( iDeltaCurSPos > iDeltaSPos ); 689 AOT( iDeltaCurSPos < 0 ); 690 AOT( m_aaiSubPelShiftL[iDeltaSPos][iDeltaCurSPos] == 0xdeaddead); 691 692 Int iSourcePos = (iCurPos << m_iShiftPrec) + m_aaiSubPelShiftL[iDeltaSPos][iDeltaCurSPos]; // GT: = iPosX - iStep + ( iStep * iDeltaCurPos + ( iDeltaPos >> 1) ) / iDeltaPos; 693 xSetShiftedPel( iSourcePos, iFillSPos, REN_IS_FILLED, riError ); 994 RM_AOT( iDeltaCurSPos > iDeltaSPos ); 995 RM_AOT( iDeltaCurSPos < 0 ); 996 RM_AOT( m_aaiSubPelShiftL[iDeltaSPos][iDeltaCurSPos] == 0xdeaddead); 997 998 xSetShiftedPelL<bSet>( iCurPos, m_aaiSubPelShiftL[iDeltaSPos][iDeltaCurSPos], iFillSPos, REN_IS_FILLED, riError ); 694 999 } 695 1000 }; 696 1001 } 697 1002 698 __inline Void699 TRenSingleModel ::xRenderShiftedRangeR(Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError )1003 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline Void 1004 TRenSingleModelC<iBM,bBitInc>::xRenderShiftedRangeR(Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ) 700 1005 { 701 1006 assert( iCurSPos >= iLastSPos ); 702 //assert( iRightSPos < m_iWidth );703 1007 704 1008 Int iDeltaSPos = iCurSPos - iLastSPos; 705 1009 if ( iDeltaSPos > m_iGapTolerance ) 706 1010 { 707 xFillHoleR ( iCurSPos, iLastSPos, iCurPos, riError );1011 xFillHoleR<bSet>( iCurSPos, iLastSPos, iCurPos, riError ); 708 1012 } 709 1013 else … … 713 1017 714 1018 m_iThisDepth = m_iCurDepth; 715 AOT( iDeltaSPos > m_iGapTolerance );1019 RM_AOT( iDeltaSPos > m_iGapTolerance ); 716 1020 for (Int iFillSPos = max(m_iLastOccludedSPosFP+1, xRangeLeftR(iLastSPos) ); iFillSPos <= min(xRangeRightR( iCurSPos ) ,m_iWidth -1); iFillSPos++ ) 717 1021 { 718 1022 Int iDeltaCurSPos = (iFillSPos << m_iShiftPrec) - iLastSPos; 719 1023 720 AOT( iDeltaCurSPos > iDeltaSPos ); 721 AOT( iDeltaCurSPos < 0 ); 722 AOT( m_aaiSubPelShiftR[iDeltaSPos][iDeltaCurSPos] == 0xdeaddead); 723 724 Int iSourcePos = (iCurPos << m_iShiftPrec) + m_aaiSubPelShiftR[iDeltaSPos][iDeltaCurSPos]; // GT: = iPosX - iStep + ( iStep * iDeltaCurPos + ( iDeltaPos >> 1) ) / iDeltaPos; 725 726 xSetShiftedPel( iSourcePos, iFillSPos, REN_IS_FILLED, riError ); 1024 RM_AOT( iDeltaCurSPos > iDeltaSPos ); 1025 RM_AOT( iDeltaCurSPos < 0 ); 1026 RM_AOT( m_aaiSubPelShiftR[iDeltaSPos][iDeltaCurSPos] == 0xdeaddead); 1027 1028 xSetShiftedPelR<bSet>( iCurPos, m_aaiSubPelShiftR[iDeltaSPos][iDeltaCurSPos], iFillSPos, REN_IS_FILLED, riError ); 727 1029 } 728 1030 }; … … 731 1033 732 1034 733 __inline Void 734 TRenSingleModel::xRenderRangeL(Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ) 735 { 1035 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline Void 1036 TRenSingleModelC<iBM,bBitInc>::xRenderRangeL(Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ) 1037 { 1038 const Int iCurViewPos = 0; 736 1039 if ( !m_bInOcclusion ) 737 1040 { … … 744 1047 { 745 1048 m_iThisDepth = m_iLastDepth; 746 xSetShiftedPel( (iCurPos+1) << m_iShiftPrec, iRightSPosFP, REN_IS_FILLED, riError ); 1049 1050 xSetShiftedPelL<bSet>( iCurPos+1, 0, iRightSPosFP, REN_IS_FILLED, riError ); 747 1051 } 748 1052 m_iLastOccludedSPosFP = iRightSPosFP; … … 750 1054 m_bInOcclusion = true; 751 1055 752 if ( m_bSet )753 { 754 m_ apbOccludedRow[m_iCurViewPos][ iCurPos ]= true;1056 if ( bSet ) 1057 { 1058 m_pcInputSamplesRow[iCurViewPos][ iCurPos ].bOccluded = true; 755 1059 } 756 1060 } 757 1061 else 758 1062 { 759 if ( m_bSet )760 { 761 m_ apbOccludedRow[m_iCurViewPos][ iCurPos ]= false;762 } 763 764 xRenderShiftedRangeL (iCurSPos, iLastSPos, iCurPos, riError );1063 if ( bSet ) 1064 { 1065 m_pcInputSamplesRow[iCurViewPos][ iCurPos ].bOccluded = false; 1066 } 1067 1068 xRenderShiftedRangeL<bSet>(iCurSPos, iLastSPos, iCurPos, riError ); 765 1069 } 766 1070 } … … 770 1074 { 771 1075 m_bInOcclusion = false; 772 if ( m_bSet )773 { 774 m_ apbOccludedRow[m_iCurViewPos][ iCurPos ]= false;775 } 776 777 xRenderShiftedRangeL (iCurSPos, iLastSPos, iCurPos, riError );1076 if ( bSet ) 1077 { 1078 m_pcInputSamplesRow[iCurViewPos][ iCurPos ].bOccluded = false; 1079 } 1080 1081 xRenderShiftedRangeL<bSet>(iCurSPos, iLastSPos, iCurPos, riError ); 778 1082 } 779 1083 else 780 1084 { 781 if ( m_bSet ) 782 { 783 m_apbOccludedRow[m_iCurViewPos][ iCurPos ] = true; 784 } 785 } 786 } 787 } 788 789 __inline Void 790 TRenSingleModel::xRenderRangeR(Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ) 791 { 1085 if ( bSet ) 1086 { 1087 m_pcInputSamplesRow[iCurViewPos][ iCurPos ].bOccluded = true; 1088 } 1089 } 1090 } 1091 } 1092 1093 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline Void 1094 TRenSingleModelC<iBM,bBitInc>::xRenderRangeR(Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ) 1095 { 1096 const Int iCurViewPos = 1; 792 1097 // Find out if current sample is occluded 793 1098 if ( !m_bInOcclusion ) … … 801 1106 { 802 1107 m_iThisDepth = m_iLastDepth; 803 xSetShiftedPel ( (iCurPos-1) << m_iShiftPrec, iLeftSPosFP, REN_IS_FILLED, riError );1108 xSetShiftedPelR<bSet>( iCurPos-1,1 << m_iShiftPrec , iLeftSPosFP, REN_IS_FILLED, riError ); 804 1109 } 805 1110 m_iLastOccludedSPosFP = iLeftSPosFP; … … 807 1112 m_bInOcclusion = true; 808 1113 809 if ( m_bSet )810 { 811 m_ apbOccludedRow[m_iCurViewPos][ iCurPos ]= true;1114 if ( bSet ) 1115 { 1116 m_pcInputSamplesRow[iCurViewPos][ iCurPos ].bOccluded = true; 812 1117 } 813 1118 } 814 1119 else 815 1120 { 816 if ( m_bSet )817 { 818 m_ apbOccludedRow[m_iCurViewPos][ iCurPos ]= false;819 } 820 821 xRenderShiftedRangeR (iCurSPos, iLastSPos, iCurPos, riError );1121 if ( bSet ) 1122 { 1123 m_pcInputSamplesRow[iCurViewPos][ iCurPos ].bOccluded = false; 1124 } 1125 1126 xRenderShiftedRangeR<bSet>(iCurSPos, iLastSPos, iCurPos, riError ); 822 1127 } 823 1128 } … … 827 1132 { 828 1133 m_bInOcclusion = false; 829 if ( m_bSet )830 { 831 m_ apbOccludedRow[m_iCurViewPos][ iCurPos ]= false;832 } 833 834 xRenderShiftedRangeR (iCurSPos, iLastSPos, iCurPos, riError );1134 if ( bSet ) 1135 { 1136 m_pcInputSamplesRow[iCurViewPos][ iCurPos ].bOccluded = false; 1137 } 1138 1139 xRenderShiftedRangeR<bSet>(iCurSPos, iLastSPos, iCurPos, riError ); 835 1140 } 836 1141 else 837 1142 { 838 if ( m_bSet )839 { 840 m_ apbOccludedRow[m_iCurViewPos][ iCurPos ]= true;841 } 842 } 843 } 844 } 845 846 __inline Void847 TRenSingleModel ::xFillHoleL( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError )1143 if ( bSet ) 1144 { 1145 m_pcInputSamplesRow[iCurViewPos][ iCurPos ].bOccluded = true; 1146 } 1147 } 1148 } 1149 } 1150 1151 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline Void 1152 TRenSingleModelC<iBM,bBitInc>::xFillHoleL( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ) 848 1153 { 849 1154 if (iLastSPos < 0) … … 861 1166 { 862 1167 m_iThisDepth = m_iCurDepth; 863 xSetShiftedPel ( iStartFillPos << m_iShiftPrec, iStartFillSPosFP, REN_IS_FILLED, riError );1168 xSetShiftedPelL<bSet> ( iStartFillPos, 0, iStartFillSPosFP, REN_IS_FILLED, riError ); 864 1169 } 865 1170 } … … 870 1175 871 1176 m_iThisDepth = m_iLastDepth; 872 for (Int iFillSPos = max(iStartFillSPosFP+1,0); iFillSPos <= min(xRangeRightL( iLastSPos ), m_iLastOccludedSPosFP-1 ); iFillSPos++ )873 { 874 xSetShiftedPel ( iLastPos << m_iShiftPrec,iFillSPos, REN_IS_HOLE, riError );875 } 876 } 877 878 __inline Void879 TRenSingleModel ::xFillHoleR( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError )1177 for (Int iFillSPos = Max(iStartFillSPosFP+1,0); iFillSPos <= min(xRangeRightL( iLastSPos ), m_iLastOccludedSPosFP-1 ); iFillSPos++ ) 1178 { 1179 xSetShiftedPelL<bSet>( iLastPos, 0, iFillSPos, REN_IS_HOLE, riError ); 1180 } 1181 } 1182 1183 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline Void 1184 TRenSingleModelC<iBM,bBitInc>::xFillHoleR( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ) 880 1185 { 881 1186 if (iLastSPos < 0) … … 893 1198 { 894 1199 m_iThisDepth = m_iCurDepth; 895 xSetShiftedPel ( iEndFillPos << m_iShiftPrec, iStartFillSPosFP, REN_IS_FILLED, riError );1200 xSetShiftedPelR<bSet>( iEndFillPos, 1 << m_iShiftPrec , iStartFillSPosFP, REN_IS_FILLED, riError ); 896 1201 } 897 1202 } … … 904 1209 for (Int iFillSPos = max(xRangeLeftR( iLastSPos ), m_iLastOccludedSPosFP+1); iFillSPos <= min(iStartFillSPosFP,m_iWidth)-1 ; iFillSPos++ ) 905 1210 { 906 xSetShiftedPel ( iLastPos<< m_iShiftPrec, iFillSPos, REN_IS_HOLE, riError );907 } 908 } 909 910 __inline Void911 TRenSingleModel ::xExtrapolateMarginL(Int iCurSPos, Int iCurPos, RMDist& riError )1211 xSetShiftedPelR<bSet>( iLastPos, 1 << m_iShiftPrec, iFillSPos, REN_IS_HOLE, riError ); 1212 } 1213 } 1214 1215 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline Void 1216 TRenSingleModelC<iBM,bBitInc>::xExtrapolateMarginL(Int iCurSPos, Int iCurPos, RMDist& riError ) 912 1217 { 913 1218 // if (iLeftSPos < 0 ) 914 1219 // return; 915 1220 916 Int iSPosFullPel = max(0,xRangeLeftL(iCurSPos));1221 Int iSPosFullPel = Max(0,xRangeLeftL(iCurSPos)); 917 1222 918 1223 m_iThisDepth = m_iCurDepth; 919 1224 if (iSPosFullPel < m_iWidth) 920 1225 { 921 xSetShiftedPel ( iCurPos << m_iShiftPrec, iSPosFullPel, REN_IS_FILLED, riError );1226 xSetShiftedPelL<bSet>( iCurPos, 0, iSPosFullPel, REN_IS_FILLED, riError ); 922 1227 } 923 1228 924 1229 for (Int iFillSPos = iSPosFullPel +1; iFillSPos < m_iWidth; iFillSPos++ ) 925 1230 { 926 xSetShiftedPel ( iCurPos << m_iShiftPrec, iFillSPos, REN_IS_HOLE, riError );927 } 928 } 929 930 __inline Void931 TRenSingleModel ::xExtrapolateMarginR(Int iCurSPos, Int iCurPos, RMDist& riError )1231 xSetShiftedPelL<bSet>( iCurPos, 0, iFillSPos, REN_IS_HOLE, riError ); 1232 } 1233 } 1234 1235 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline Void 1236 TRenSingleModelC<iBM,bBitInc>::xExtrapolateMarginR(Int iCurSPos, Int iCurPos, RMDist& riError ) 932 1237 { 933 1238 // if (iLeftSPos < 0 ) … … 939 1244 if (iSPosFullPel > -1) 940 1245 { 941 xSetShiftedPel ( iCurPos<< m_iShiftPrec, iSPosFullPel, REN_IS_FILLED, riError );1246 xSetShiftedPelR<bSet>( iCurPos, 1 << m_iShiftPrec, iSPosFullPel, REN_IS_FILLED, riError ); 942 1247 } 943 1248 944 1249 for (Int iFillSPos = iSPosFullPel -1; iFillSPos > -1; iFillSPos-- ) 945 1250 { 946 xSetShiftedPel ( iCurPos<< m_iShiftPrec, iFillSPos, REN_IS_HOLE, riError );947 } 948 } 949 950 951 __inline Int 952 TRenSingleModel::xShiftNewData( Int iPosX, Int iPosInNewData ) 953 { 954 AOT( iPosInNewData < 0);955 AOF( iPosInNewData < m_iNewDataWidth ); 956 957 return (iPosX << m_iShiftPrec) - m_ppiCurLUT[0][ RemoveBitIncrement( m_piNewDepthData[iPosInNewData] )]; 958 } 959 960 __inline Int 961 TRenSingleModel::xShift( Int iPosX ) 962 { 963 AOT( iPosX < 0);964 AOF( iPosX < m_iWidth); 965 return (iPosX << m_iShiftPrec) - m_ppiCurLUT[0][ Re moveBitIncrement( m_apiBaseDepthPelRow[m_iCurViewPos][iPosX])];966 } 967 968 969 __inline Int970 TRenSingleModel ::xShift( Int iPos, Int iPosInNewData )1251 xSetShiftedPelR<bSet>( iCurPos , 1 << m_iShiftPrec, iFillSPos, REN_IS_HOLE, riError ); 1252 } 1253 } 1254 1255 template <BlenMod iBM, Bool bBitInc> __inline Int 1256 TRenSingleModelC<iBM,bBitInc>::xShiftNewData( Int iPosX, Int iPosInNewData ) 1257 { 1258 RM_AOT( iPosInNewData < 0 ); 1259 RM_AOF( iPosInNewData < m_iNewDataWidth ); 1260 1261 return (iPosX << m_iShiftPrec) - m_ppiCurLUT[0][ RenModRemoveBitInc( m_piNewDepthData[iPosInNewData] )]; 1262 } 1263 1264 template <BlenMod iBM, Bool bBitInc> __inline Int 1265 TRenSingleModelC<iBM,bBitInc>::xShift( Int iPosX ) 1266 { 1267 RM_AOT( iPosX < 0); 1268 RM_AOF( iPosX < m_iWidth); 1269 1270 return (iPosX << m_iShiftPrec) - m_ppiCurLUT[0][ RenModRemoveBitInc( m_pcInputSamplesRow[m_iCurViewPos][iPosX].iD )]; 1271 } 1272 1273 1274 template <BlenMod iBM, Bool bBitInc> __inline Int 1275 TRenSingleModelC<iBM,bBitInc>::xShift( Int iPos, Int iPosInNewData ) 971 1276 { 972 1277 if ( (iPosInNewData >= 0) && (iPosInNewData < m_iNewDataWidth) ) … … 980 1285 } 981 1286 982 __inline Int983 TRenSingleModel ::xRangeLeftL( Int iPos )1287 template <BlenMod iBM, Bool bBitInc> __inline Int 1288 TRenSingleModelC<iBM,bBitInc>::xRangeLeftL( Int iPos ) 984 1289 { 985 1290 return ( iPos + (1 << m_iShiftPrec) - 1) >> m_iShiftPrec; … … 987 1292 988 1293 989 __inline Int990 TRenSingleModel ::xRangeLeftR( Int iPos )1294 template <BlenMod iBM, Bool bBitInc> __inline Int 1295 TRenSingleModelC<iBM,bBitInc>::xRangeLeftR( Int iPos ) 991 1296 { 992 1297 … … 995 1300 996 1301 997 __inline Int998 TRenSingleModel ::xRangeRightL( Int iPos )1302 template <BlenMod iBM, Bool bBitInc> __inline Int 1303 TRenSingleModelC<iBM,bBitInc>::xRangeRightL( Int iPos ) 999 1304 { 1000 1305 return xRangeLeftL(iPos) - 1; 1001 1306 } 1002 1307 1003 __inline Int1004 TRenSingleModel ::xRangeRightR( Int iPos )1308 template <BlenMod iBM, Bool bBitInc> __inline Int 1309 TRenSingleModelC<iBM,bBitInc>::xRangeRightR( Int iPos ) 1005 1310 { 1006 1311 return iPos >> m_iShiftPrec; … … 1008 1313 1009 1314 1010 __inline Int1011 TRenSingleModel ::xRoundL( Int iPos )1315 template <BlenMod iBM, Bool bBitInc> __inline Int 1316 TRenSingleModelC<iBM,bBitInc>::xRoundL( Int iPos ) 1012 1317 { 1013 1318 return (iPos + (( 1 << m_iShiftPrec ) >> 1 )) >> m_iShiftPrec; 1014 1319 } 1015 1320 1016 __inline Int1017 TRenSingleModel ::xRoundR( Int iPos )1321 template <BlenMod iBM, Bool bBitInc> __inline Int 1322 TRenSingleModelC<iBM,bBitInc>::xRoundR( Int iPos ) 1018 1323 { 1019 1324 return (m_iShiftPrec == 0) ? iPos : xRoundL(iPos - 1); … … 1021 1326 1022 1327 1023 Void1024 TRenSingleModel ::xSetPels( Pel* piPelSource , Int iSourceStride, Int iWidth, Int iHeight, Pel iVal )1328 template <BlenMod iBM, Bool bBitInc> Void 1329 TRenSingleModelC<iBM,bBitInc>::xSetPels( Pel* piPelSource , Int iSourceStride, Int iWidth, Int iHeight, Pel iVal ) 1025 1330 { 1026 1331 for (Int iYPos = 0; iYPos < iHeight; iYPos++) … … 1034 1339 } 1035 1340 1036 Void1037 TRenSingleModel ::xSetInts( Int* piPelSource , Int iSourceStride, Int iWidth, Int iHeight, Int iVal )1341 template <BlenMod iBM, Bool bBitInc> Void 1342 TRenSingleModelC<iBM,bBitInc>::xSetInts( Int* piPelSource , Int iSourceStride, Int iWidth, Int iHeight, Int iVal ) 1038 1343 { 1039 1344 for (Int iYPos = 0; iYPos < iHeight; iYPos++) … … 1048 1353 1049 1354 1050 Void1051 TRenSingleModel ::xSetBools( Bool* pbPelSource , Int iSourceStride, Int iWidth, Int iHeight, Bool bVal )1355 template <BlenMod iBM, Bool bBitInc> Void 1356 TRenSingleModelC<iBM,bBitInc>::xSetBools( Bool* pbPelSource , Int iSourceStride, Int iWidth, Int iHeight, Bool bVal ) 1052 1357 { 1053 1358 for (Int iYPos = 0; iYPos < iHeight; iYPos++) … … 1061 1366 } 1062 1367 1063 Void 1064 TRenSingleModel::xInitView( Int iViewPos ) 1065 { 1066 AOT( iViewPos == VIEWPOS_MERGED && ( m_iMode == 0 || m_iMode == 1 ) ); 1067 1068 xSetPels( m_aapiSynthVideoPel[iViewPos][0], m_iStride, m_iWidth, m_iHeight, 0 ); 1069 xSetPels( m_aapiSynthVideoPel[iViewPos][1], m_iStride, m_iWidth, m_iHeight, 128 << g_uiBitIncrement ); 1070 xSetPels( m_aapiSynthVideoPel[iViewPos][2], m_iStride, m_iWidth, m_iHeight, 128 << g_uiBitIncrement ); 1071 1072 if ( iViewPos != VIEWPOS_MERGED) 1073 { 1074 xSetBools( m_apbOccluded [iViewPos], m_iStride, m_iWidth, m_iHeight, false ); 1075 xSetPels ( m_apiFilled [iViewPos], m_iStride, m_iWidth, m_iHeight, REN_IS_HOLE); 1076 if ( m_iMode == 2 ) 1077 { 1078 xSetPels( m_apiSynthDepthPel [iViewPos], m_iStride, m_iWidth, m_iHeight, 0); 1079 } 1080 } 1081 } 1082 1083 __inline Void 1084 TRenSingleModel::xSetShiftedPel(Int iSourcePos, Int iTargetSPos, Pel iFilled, RMDist& riError ) 1085 { 1086 AOT( iSourcePos < 0 ); 1087 AOT( iSourcePos >= m_iSampledWidth ); 1088 1089 AOT( iTargetSPos < 0 ); 1090 AOT( iTargetSPos >= m_iWidth ); 1091 // AOT( m_apiFilledRow[m_iViewPos][iTargetSPos] != REN_IS_HOLE); 1092 1093 if ( m_iMode == 2) 1094 { 1095 xSetShiftedPelBlend(iSourcePos, iTargetSPos, iFilled, riError ); 1096 return; 1097 } 1098 1099 if ( m_bSet ) 1100 { 1101 m_aapiSynthVideoPelRow[m_iCurViewPos][0][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][0][iSourcePos]; 1102 #if HHI_VSO_COLOR_PLANES 1103 m_aapiSynthVideoPelRow[m_iCurViewPos][1][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][1][iSourcePos]; 1104 m_aapiSynthVideoPelRow[m_iCurViewPos][2][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][2][iSourcePos]; 1105 #endif 1106 m_apiFilledRow [m_iCurViewPos] [iTargetSPos] = iFilled; 1107 Int iDiffY = m_aapiRefVideoPelRow [0][iTargetSPos] - m_aapiSynthVideoPelRow[m_iCurViewPos][0][iTargetSPos]; 1108 #if HHI_VSO_COLOR_PLANES 1109 Int iDiffU = m_aapiRefVideoPelRow [1][iTargetSPos] - m_aapiSynthVideoPelRow[m_iCurViewPos][1][iTargetSPos]; 1110 Int iDiffV = m_aapiRefVideoPelRow [2][iTargetSPos] - m_aapiSynthVideoPelRow[m_iCurViewPos][2][iTargetSPos]; 1111 m_apiErrorRow [iTargetSPos] = xGetDist( iDiffY, iDiffU, iDiffV); 1112 #else 1113 m_apiErrorRow [iTargetSPos] = xGetDist(iDiffY); 1114 #endif 1368 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline Void 1369 TRenSingleModelC<iBM,bBitInc>::xSetShiftedPelL(Int iSourcePos, Int iSubSourcePos, Int iTargetSPos, Pel iFilled, RMDist& riError ) 1370 { 1371 RM_AOT( iSourcePos < 0 ); 1372 RM_AOT( iSourcePos >= m_iWidth ); 1373 RM_AOT( iSubSourcePos < 0 ); 1374 RM_AOT( iSubSourcePos > (1 << m_iShiftPrec) ); 1375 RM_AOT( iTargetSPos < 0 ); 1376 RM_AOT( iTargetSPos >= m_iWidth ); 1377 1378 RenModelOutPels* pcOutSample = m_pcOutputSamplesRow + iTargetSPos; 1379 RenModelInPels * pcInSample = m_pcInputSamplesRow[VIEWPOS_LEFT] + iSourcePos ; 1380 1381 if ( iBM != BLEND_NONE ) 1382 { 1383 xSetShiftedPelBlendL<bSet> (pcInSample, iSubSourcePos, pcOutSample, iFilled, riError); 1115 1384 } 1116 1385 else 1117 1386 { 1118 Int iSDOld = m_apiErrorRow [iTargetSPos]; 1119 Int iDiffY = m_aapiRefVideoPelRow [0][iTargetSPos] - m_aapiBaseVideoPelRow [m_iCurViewPos][0][iSourcePos]; 1120 #if HHI_VSO_COLOR_PLANES 1121 Int iDiffU = m_aapiRefVideoPelRow [1][iTargetSPos] - m_aapiBaseVideoPelRow [m_iCurViewPos][1][iSourcePos]; 1122 Int iDiffV = m_aapiRefVideoPelRow [2][iTargetSPos] - m_aapiBaseVideoPelRow [m_iCurViewPos][2][iSourcePos]; 1123 riError += ( xGetDist(iDiffY,iDiffU,iDiffV) - iSDOld ); 1124 #else 1125 riError += ( xGetDist( iDiffY ) - iSDOld ); 1126 #endif 1127 } 1128 } 1129 1130 __inline Void 1131 TRenSingleModel::xSetShiftedPelBlend( Int iSourcePos, Int iTargetSPos, Pel iFilled, RMDist& riError ) 1132 { 1133 AOT( iSourcePos < 0 ); 1134 AOT( iSourcePos >= m_iSampledWidth ); 1135 1136 AOT( iTargetSPos < 0 ); 1137 AOT( iTargetSPos >= m_iWidth ); 1138 // AOT( m_apiFilledRow[m_iViewPos][iTargetSPos] != REN_IS_HOLE); 1139 1387 xSetShiftedPelNoBlendL<bSet>(pcInSample, iSubSourcePos, pcOutSample, iFilled, riError); 1388 } 1389 } 1390 1391 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline Void 1392 TRenSingleModelC<iBM,bBitInc>::xSetShiftedPelNoBlendL(RenModelInPels* pcInSample, Int iSubSourcePos, RenModelOutPels* pcOutSample, Pel iFilled, RMDist& riError ) 1393 { 1394 if ( bSet ) 1395 { 1396 // Filled 1397 pcOutSample->iFilledLeft = iFilled; 1398 1399 // Yuv 1400 pcOutSample->iYLeft = pcInSample->aiY[iSubSourcePos]; 1401 #if HHI_VSO_COLOR_PLANES 1402 pcOutSample->iULeft = pcInSample->aiU[iSubSourcePos]; 1403 pcOutSample->iVLeft = pcInSample->aiV[iSubSourcePos]; 1404 1405 pcOutSample->iError = xGetDist( pcOutSample->iYLeft - pcOutSample->iYRef, 1406 pcOutSample->iULeft - pcOutSample->iURef, 1407 pcOutSample->iVLeft - pcOutSample->iVRef 1408 ); 1409 #else 1410 pcOutSample->iError = xGetDist( pcOutSample->iYLeft - pcOutSample->iYRef ); 1411 #endif 1412 1413 } 1414 else 1415 { 1416 #if HHI_VSO_COLOR_PLANES 1417 riError += xGetDist( pcInSample->aiY[iSubSourcePos] - pcOutSample->iYRef, 1418 pcInSample->aiU[iSubSourcePos] - pcOutSample->iURef, 1419 pcInSample->aiV[iSubSourcePos] - pcOutSample->iVRef 1420 ); 1421 #else 1422 riError += xGetDist( pcInSample->aiY[iSubSourcePos] - pcOutSample->iYRef ); 1423 #endif 1424 1425 riError -= pcOutSample->iError; 1426 } 1427 } 1428 1429 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline Void 1430 TRenSingleModelC<iBM,bBitInc>::xSetShiftedPelBlendL(RenModelInPels* pcInSample, Int iSubSourcePos, RenModelOutPels* pcOutSample, Pel iFilled, RMDist& riError ) 1431 { 1140 1432 Pel piBlendedValueY; 1141 1433 #if HHI_VSO_COLOR_PLANES … … 1144 1436 #endif 1145 1437 1146 1147 if (m_iCurViewPos == 0) 1148 { 1149 xGetBlendedValue ( 1150 m_aapiBaseVideoPelRow [0][0][iSourcePos ] , 1151 m_aapiSynthVideoPelRow [1][0][iTargetSPos] , 1152 #if HHI_VSO_COLOR_PLANES 1153 m_aapiBaseVideoPelRow [0][1][iSourcePos ] , 1154 m_aapiSynthVideoPelRow [1][1][iTargetSPos] , 1155 m_aapiBaseVideoPelRow [0][2][iSourcePos ] , 1156 m_aapiSynthVideoPelRow [1][2][iTargetSPos] , 1157 #endif 1158 m_piInvZLUTLeft [RemoveBitIncrement(m_iThisDepth) ], 1159 m_piInvZLUTRight[RemoveBitIncrement(m_apiSynthDepthPelRow[1] [iTargetSPos])], 1160 iFilled, 1161 m_apiFilledRow [1] [iTargetSPos] , 1162 piBlendedValueY 1438 xGetBlendedValue ( 1439 pcInSample ->aiY[iSubSourcePos], 1440 pcOutSample->iYRight, 1441 #if HHI_VSO_COLOR_PLANES 1442 pcInSample ->aiU[iSubSourcePos], 1443 pcOutSample->iURight, 1444 pcInSample ->aiV[iSubSourcePos], 1445 pcOutSample->iVRight, 1446 #endif 1447 m_piInvZLUTLeft [RenModRemoveBitInc(m_iThisDepth) ], 1448 m_piInvZLUTRight[RenModRemoveBitInc(pcOutSample->iDRight)], 1449 iFilled, 1450 pcOutSample->iFilledRight , 1451 piBlendedValueY 1163 1452 #if HHI_VSO_COLOR_PLANES 1164 1453 , piBlendedValueU, 1165 1454 piBlendedValueV 1166 1455 #endif 1167 1456 ); 1457 1458 if ( bSet ) 1459 { 1460 // Set values 1461 pcOutSample->iDLeft = m_iThisDepth; 1462 pcOutSample->iYLeft = pcInSample ->aiY[iSubSourcePos]; 1463 pcOutSample->iYBlended = piBlendedValueY; 1464 #if HHI_VSO_COLOR_PLANES 1465 pcOutSample->iULeft = pcInSample ->aiU[iSubSourcePos]; 1466 pcOutSample->iUBlended = piBlendedValueU; 1467 pcOutSample->iVLeft = pcInSample ->aiV[iSubSourcePos]; 1468 pcOutSample->iVBlended = piBlendedValueV; 1469 #endif 1470 pcOutSample->iFilledLeft = iFilled; 1471 1472 // Get Error 1473 Int iDiffY = pcOutSample->iYRef - piBlendedValueY; 1474 #if HHI_VSO_COLOR_PLANES 1475 Int iDiffU = pcOutSample->iURef - piBlendedValueU; 1476 Int iDiffV = pcOutSample->iVRef - piBlendedValueV; 1477 pcOutSample->iError = xGetDist(iDiffY, iDiffU, iDiffV ); 1478 #else 1479 pcOutSample->iError = xGetDist(iDiffY ); 1480 #endif 1168 1481 } 1169 1482 else 1170 1483 { 1171 xGetBlendedValue ( 1172 m_aapiSynthVideoPelRow [0][0][iTargetSPos], 1173 m_aapiBaseVideoPelRow [1][0][iSourcePos ], 1174 #if HHI_VSO_COLOR_PLANES 1175 m_aapiSynthVideoPelRow [0][1][iTargetSPos], 1176 m_aapiBaseVideoPelRow [1][1][iSourcePos ], 1177 m_aapiSynthVideoPelRow [0][2][iTargetSPos], 1178 m_aapiBaseVideoPelRow [1][2][iSourcePos ], 1179 #endif 1180 m_piInvZLUTLeft [RemoveBitIncrement(m_apiSynthDepthPelRow[0] [iTargetSPos])], 1181 m_piInvZLUTRight[RemoveBitIncrement(m_iThisDepth) ], 1182 m_apiFilledRow [0] [iTargetSPos], 1183 iFilled , 1184 piBlendedValueY 1484 Int iDiffY = pcOutSample->iYRef - piBlendedValueY; 1485 #if HHI_VSO_COLOR_PLANES 1486 Int iDiffU = pcOutSample->iURef - piBlendedValueU; 1487 Int iDiffV = pcOutSample->iVRef - piBlendedValueV; 1488 riError += ( xGetDist( iDiffY, iDiffU, iDiffV ) - pcOutSample->iError ); 1489 1490 #else 1491 riError += ( xGetDist( iDiffY ) - pcOutSample->iError ); 1492 #endif 1493 1494 } 1495 } 1496 1497 1498 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline Void 1499 TRenSingleModelC<iBM,bBitInc>::xSetShiftedPelR(Int iSourcePos, Int iSubSourcePos, Int iTargetSPos, Pel iFilled, RMDist& riError ) 1500 { 1501 RM_AOT( iSourcePos < 0 ); 1502 RM_AOT( iSourcePos >= m_iWidth ); 1503 RM_AOT( iSubSourcePos < 0 ); 1504 RM_AOT( iSubSourcePos >= (1 << m_iShiftPrec)+1 ); 1505 RM_AOT( iTargetSPos < 0 ); 1506 RM_AOT( iTargetSPos >= m_iWidth ); 1507 1508 RenModelOutPels* pcOutSample = m_pcOutputSamplesRow + iTargetSPos; 1509 RenModelInPels * pcInSample = m_pcInputSamplesRow[VIEWPOS_RIGHT] + iSourcePos ; 1510 1511 if ( iBM != BLEND_NONE ) 1512 { 1513 xSetShiftedPelBlendR<bSet> (pcInSample, iSubSourcePos, pcOutSample, iFilled, riError); 1514 } 1515 else 1516 { 1517 xSetShiftedPelNoBlendR<bSet> (pcInSample, iSubSourcePos, pcOutSample, iFilled, riError); 1518 } 1519 } 1520 1521 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline Void 1522 TRenSingleModelC<iBM,bBitInc>::xSetShiftedPelNoBlendR(RenModelInPels* pcInSample, Int iSubSourcePos, RenModelOutPels* pcOutSample, Pel iFilled, RMDist& riError ) 1523 { 1524 if ( bSet ) 1525 { 1526 // Filled 1527 pcOutSample->iFilledRight = iFilled; 1528 1529 // Yuv 1530 pcOutSample->iYRight = pcInSample->aiY[iSubSourcePos]; 1531 #if HHI_VSO_COLOR_PLANES 1532 pcOutSample->iURight = pcInSample->aiU[iSubSourcePos]; 1533 pcOutSample->iVRight = pcInSample->aiV[iSubSourcePos]; 1534 1535 pcOutSample->iError = xGetDist( 1536 pcOutSample->iYRight - pcOutSample->iYRef, 1537 pcOutSample->iURight - pcOutSample->iURef, 1538 pcOutSample->iVRight - pcOutSample->iVRef 1539 ); 1540 #else 1541 pcOutSample->iError = xGetDist( pcOutSample->iYRight - pcOutSample->iYRef ); 1542 #endif 1543 1544 } 1545 else 1546 { 1547 #if HHI_VSO_COLOR_PLANES 1548 riError += xGetDist( pcInSample->aiY[iSubSourcePos] - pcOutSample->iYRef, 1549 pcInSample->aiU[iSubSourcePos] - pcOutSample->iURef, 1550 pcInSample->aiV[iSubSourcePos] - pcOutSample->iVRef 1551 ); 1552 #else 1553 riError += xGetDist( pcInSample->aiY[iSubSourcePos] - pcOutSample->iYRef ); 1554 #endif 1555 1556 riError -= pcOutSample->iError; 1557 } 1558 } 1559 1560 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline Void 1561 TRenSingleModelC<iBM,bBitInc>::xSetShiftedPelBlendR(RenModelInPels* pcInSample, Int iSubSourcePos, RenModelOutPels* pcOutSample, Pel iFilled, RMDist& riError ) 1562 { 1563 Pel piBlendedValueY; 1564 #if HHI_VSO_COLOR_PLANES 1565 Pel piBlendedValueU; 1566 Pel piBlendedValueV; 1567 #endif 1568 1569 xGetBlendedValue ( 1570 pcOutSample->iYLeft, 1571 pcInSample ->aiY[iSubSourcePos], 1572 #if HHI_VSO_COLOR_PLANES 1573 pcOutSample->iULeft, 1574 pcInSample ->aiU[iSubSourcePos], 1575 pcOutSample->iVLeft, 1576 pcInSample ->aiV[iSubSourcePos], 1577 #endif 1578 m_piInvZLUTLeft [RenModRemoveBitInc(pcOutSample->iDLeft)], 1579 m_piInvZLUTRight [RenModRemoveBitInc(m_iThisDepth) ], 1580 pcOutSample->iFilledLeft, 1581 iFilled, 1582 piBlendedValueY 1185 1583 #if HHI_VSO_COLOR_PLANES 1186 1584 , piBlendedValueU, 1187 1585 piBlendedValueV 1188 1586 #endif 1189 1587 ); 1190 } 1191 1192 if ( m_bSet ) 1193 { 1194 m_apiSynthDepthPelRow [m_iCurViewPos] [iTargetSPos] = m_iThisDepth; 1195 m_aapiSynthVideoPelRow[m_iCurViewPos][0][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][0][iSourcePos]; 1196 m_aapiSynthVideoPelRow[2 ][0][iTargetSPos] = piBlendedValueY; 1197 #if HHI_VSO_COLOR_PLANES 1198 m_aapiSynthVideoPelRow[m_iCurViewPos][1][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][1][iSourcePos]; 1199 m_aapiSynthVideoPelRow[2 ][1][iTargetSPos] = piBlendedValueU; 1200 m_aapiSynthVideoPelRow[m_iCurViewPos][2][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][2][iSourcePos]; 1201 m_aapiSynthVideoPelRow[2 ][2][iTargetSPos] = piBlendedValueV; 1202 #endif 1203 m_apiFilledRow [m_iCurViewPos] [iTargetSPos] = iFilled; 1204 1205 Int iDiffY = m_aapiRefVideoPelRow [0][iTargetSPos] - piBlendedValueY; 1206 #if HHI_VSO_COLOR_PLANES 1207 Int iDiffU = m_aapiRefVideoPelRow [1][iTargetSPos] - piBlendedValueU; 1208 Int iDiffV = m_aapiRefVideoPelRow [2][iTargetSPos] - piBlendedValueV; 1209 m_apiErrorRow [iTargetSPos] = xGetDist(iDiffY, iDiffU, iDiffV ); 1210 #else 1211 m_apiErrorRow [iTargetSPos] = xGetDist(iDiffY); 1588 1589 if ( bSet ) 1590 { 1591 // Set values 1592 pcOutSample->iDRight = m_iThisDepth; 1593 pcOutSample->iYRight = pcInSample ->aiY[iSubSourcePos]; 1594 pcOutSample->iYBlended = piBlendedValueY; 1595 #if HHI_VSO_COLOR_PLANES 1596 pcOutSample->iURight = pcInSample ->aiU[iSubSourcePos]; 1597 pcOutSample->iUBlended = piBlendedValueU; 1598 pcOutSample->iVRight = pcInSample ->aiV[iSubSourcePos]; 1599 pcOutSample->iVBlended = piBlendedValueV; 1600 #endif 1601 pcOutSample->iFilledRight = iFilled; 1602 1603 // Get Error 1604 Int iDiffY = pcOutSample->iYRef - piBlendedValueY; 1605 #if HHI_VSO_COLOR_PLANES 1606 Int iDiffU = pcOutSample->iURef - piBlendedValueU; 1607 Int iDiffV = pcOutSample->iVRef - piBlendedValueV; 1608 pcOutSample->iError = xGetDist(iDiffY, iDiffU, iDiffV ); 1609 #else 1610 pcOutSample->iError = xGetDist(iDiffY ); 1212 1611 #endif 1213 1612 } 1214 1613 else 1215 1614 { 1216 Int iSDOld = m_apiErrorRow [iTargetSPos]; 1217 Int iDiffY = m_aapiRefVideoPelRow [0][iTargetSPos] - piBlendedValueY; 1218 #if HHI_VSO_COLOR_PLANES 1219 Int iDiffU = m_aapiRefVideoPelRow [1][iTargetSPos] - piBlendedValueU; 1220 Int iDiffV = m_aapiRefVideoPelRow [2][iTargetSPos] - piBlendedValueV; 1221 riError += ( xGetDist( iDiffY, iDiffU, iDiffV ) - iSDOld ); 1222 #else 1223 riError += ( xGetDist( iDiffY )- iSDOld ); 1224 #endif 1225 } 1226 } 1227 1228 1229 __inline Int 1230 TRenSingleModel::xGetDist( Int iDiffY, Int iDiffU, Int iDiffV ) 1231 { 1232 return ( ((iDiffY * iDiffY) >> m_iDistShift) 1233 + ((( ((iDiffU * iDiffU) >> m_iDistShift) 1234 +((iDiffV * iDiffV) >> m_iDistShift) 1615 Int iDiffY = pcOutSample->iYRef - piBlendedValueY; 1616 #if HHI_VSO_COLOR_PLANES 1617 Int iDiffU = pcOutSample->iURef - piBlendedValueU; 1618 Int iDiffV = pcOutSample->iVRef - piBlendedValueV; 1619 riError += ( xGetDist( iDiffY, iDiffU, iDiffV ) - pcOutSample->iError ); 1620 #else 1621 riError += ( xGetDist( iDiffY ) - pcOutSample->iError ); 1622 #endif 1623 } 1624 } 1625 1626 template <BlenMod iBM, Bool bBitInc> __inline Int 1627 TRenSingleModelC<iBM,bBitInc>::xGetDist( Int iDiffY, Int iDiffU, Int iDiffV ) 1628 { 1629 1630 if ( !bBitInc ) 1631 { 1632 return ( (iDiffY * iDiffY ) 1633 + ((( (iDiffU * iDiffU ) 1634 +(iDiffV * iDiffV ) 1635 ) 1636 ) >> 2 1235 1637 ) 1236 ) >> 2 1237 ) 1238 ); 1239 } 1240 1241 __inline Int 1242 TRenSingleModel::xGetDist( Int iDiffY ) 1243 { 1244 return ((iDiffY * iDiffY) >> m_iDistShift); 1245 } 1246 1247 #if HHI_VSO_COLOR_PLANES 1248 __inline Void 1249 TRenSingleModel::xGetBlendedValue( 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 ) 1250 #else 1251 Void 1252 TRenSingleModel::xGetBlendedValue( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY ) 1253 #endif 1254 { 1255 if (m_iBlendMode != 0 ) 1256 { 1257 if (m_iBlendMode == 1 ) 1638 ); 1639 } 1640 else 1641 { 1642 return ( ((iDiffY * iDiffY) >> m_iDistShift) 1643 + ((( ((iDiffU * iDiffU) >> m_iDistShift) 1644 +((iDiffV * iDiffV) >> m_iDistShift) 1645 ) 1646 ) >> 2 1647 ) 1648 ); 1649 1650 } 1651 } 1652 1653 template <BlenMod iBM, Bool bBitInc> __inline Int 1654 TRenSingleModelC<iBM,bBitInc>::xGetDist( Int iDiffY ) 1655 { 1656 if ( !bBitInc ) 1657 { 1658 return (iDiffY * iDiffY); 1659 } 1660 else 1661 { 1662 return ((iDiffY * iDiffY) >> m_iDistShift); 1663 } 1664 1665 } 1666 1667 1668 #if HHI_VSO_COLOR_PLANES 1669 template <BlenMod iBM, Bool bBitInc> __inline Void 1670 TRenSingleModelC<iBM,bBitInc>::xGetBlendedValue( 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 ) 1671 #else 1672 template <BlenMod iBM, Bool bBitInc> __inline Void 1673 TRenSingleModelC<iBM,bBitInc>::xGetBlendedValue( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY ) 1674 #endif 1675 { 1676 1677 RM_AOT( iBM != BLEND_AVRG && iBM != BLEND_LEFT && iBM != BLEND_RIGHT ); 1678 1679 if (iBM != BLEND_AVRG ) 1680 { 1681 if (iBM == BLEND_LEFT ) 1258 1682 { 1259 1683 #if HHI_VSO_COLOR_PLANES … … 1299 1723 else 1300 1724 { 1301 #if HHI_FIX1302 1725 riY = xBlend( iYL, iYR, m_iBlendDistWeight ); 1303 1726 #if HHI_VSO_COLOR_PLANES … … 1305 1728 riV = xBlend( iVL, iVR, m_iBlendDistWeight ); 1306 1729 #endif 1307 #else1308 riY = xBlend( iYR, iYL, m_iBlendDistWeight );1309 #if HHI_VSO_COLOR_PLANES1310 riU = xBlend( iUR, iUL, m_iBlendDistWeight );1311 riV = xBlend( iVR, iVL, m_iBlendDistWeight );1312 #endif1313 #endif1314 1730 } 1315 1731 } … … 1369 1785 } 1370 1786 } 1371 1372 } 1373 1374 __inline Void 1375 #if HHI_VSO_COLOR_PLANES 1376 TRenSingleModel::xGetBlendedValueBM1( 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 ) 1377 #else 1378 TRenSingleModel::xGetBlendedValueBM1( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY ) 1379 #endif 1380 { 1381 if ( iFilledL == REN_IS_FILLED || iFilledR == REN_IS_HOLE ) 1787 } 1788 1789 template <BlenMod iBM, Bool bBitInc> __inline Void 1790 #if HHI_VSO_COLOR_PLANES 1791 TRenSingleModelC<iBM,bBitInc>::xGetBlendedValueBM1( 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 ) 1792 #else 1793 TRenSingleModelC<iBM,bBitInc>::xGetBlendedValueBM1( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY ) 1794 #endif 1795 { 1796 if ( iFilledL == REN_IS_FILLED || iFilledR == REN_IS_HOLE ) 1382 1797 { 1383 1798 riY = iYL; … … 1405 1820 } 1406 1821 1407 __inline Void1408 #if HHI_VSO_COLOR_PLANES 1409 TRenSingleModel ::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 )1410 #else 1411 TRenSingleModel ::xGetBlendedValueBM2( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY )1822 template <BlenMod iBM, Bool bBitInc> __inline Void 1823 #if HHI_VSO_COLOR_PLANES 1824 TRenSingleModelC<iBM,bBitInc>::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 ) 1825 #else 1826 TRenSingleModelC<iBM,bBitInc>::xGetBlendedValueBM2( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY ) 1412 1827 #endif 1413 1828 { … … 1438 1853 } 1439 1854 1440 __inline Pel1441 TRenSingleModel ::xBlend( Pel pVal1, Pel pVal2, Int iWeightVal2 )1855 template <BlenMod iBM, Bool bBitInc> __inline Pel 1856 TRenSingleModelC<iBM,bBitInc>::xBlend( Pel pVal1, Pel pVal2, Int iWeightVal2 ) 1442 1857 { 1443 1858 return pVal1 + (Pel) ( ( (Int) ( pVal2 - pVal1) * iWeightVal2 + (1 << (REN_VDWEIGHT_PREC - 1)) ) >> REN_VDWEIGHT_PREC ); 1444 1859 } 1860 1861 template <BlenMod iBM, Bool bBitInc> Void 1862 TRenSingleModelC<iBM,bBitInc>::xCopy2PicYuv( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget, UInt uiHorOffset ) 1863 { 1864 TRenFilter::copy ( ppiSrcVideoPel[0], piStrides[0], m_iWidth, m_iHeight, rpcPicYuvTarget->getLumaAddr() + uiHorOffset * rpcPicYuvTarget->getStride() , rpcPicYuvTarget->getStride () ); 1865 TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[1], piStrides[1], m_iWidth, m_iHeight, rpcPicYuvTarget->getCbAddr () + (uiHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() ); 1866 TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[2], piStrides[2], m_iWidth, m_iHeight, rpcPicYuvTarget->getCrAddr () + (uiHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() ); 1867 } 1868 1869 template class TRenSingleModelC<BLEND_NONE ,true>; 1870 template class TRenSingleModelC<BLEND_AVRG ,true>; 1871 template class TRenSingleModelC<BLEND_LEFT ,true>; 1872 template class TRenSingleModelC<BLEND_RIGHT,true>; 1873 1874 template class TRenSingleModelC<BLEND_NONE ,false>; 1875 template class TRenSingleModelC<BLEND_AVRG ,false>; 1876 template class TRenSingleModelC<BLEND_LEFT ,false>; 1877 template class TRenSingleModelC<BLEND_RIGHT,false>; 1878 1879 #ifdef LGE_VSO_EARLY_SKIP_A0093 1880 template <BlenMod iBM, Bool bBitInc> 1881 __inline Bool 1882 TRenSingleModelC<iBM,bBitInc>::xDetectEarlySkipL( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData,Pel* piOrgData, Int iOrgStride) 1883 { 1884 RM_AOF( m_bEarlySkip ); 1885 const Int iCurViewPos = 0; 1886 Int** ppiCurLUT = m_appiShiftLut [ iCurViewPos ]; 1887 1888 Bool bNoDiff = true; 1889 1890 for (Int iPosY=0; iPosY < iHeight; iPosY++) 1891 { 1892 m_pbHorSkip[iPosY] = true; 1893 1894 for (Int iPosX = 0; iPosX < iWidth; iPosX++) 1895 { 1896 Int iDisparityRec = abs(ppiCurLUT[0][ RenModRemoveBitInc(piNewData[iPosX])]); 1897 Int iDispartyOrg = abs(ppiCurLUT[0][ RenModRemoveBitInc(piOrgData[iPosX])]); 1898 1899 if( iDispartyOrg != iDisparityRec) 1900 { 1901 m_pbHorSkip[iPosY] = false; 1902 bNoDiff = false; 1903 break; 1904 } 1905 } 1906 piNewData += iStride; 1907 piOrgData += iOrgStride; 1908 } 1909 return bNoDiff; 1910 } 1911 1912 template <BlenMod iBM, Bool bBitInc> 1913 __inline Bool 1914 TRenSingleModelC<iBM,bBitInc>::xDetectEarlySkipR( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData,Pel* piOrgData, Int iOrgStride) 1915 { 1916 RM_AOF( m_bEarlySkip ); 1917 Bool bNoDiff = true; 1918 1919 const Int iCurViewPos = 1; 1920 Int** ppiCurLUT = m_appiShiftLut [ iCurViewPos ]; 1921 1922 for ( Int iPosY = 0; iPosY < iHeight; iPosY++ ) 1923 { 1924 m_pbHorSkip[iPosY] = true; 1925 1926 for (Int iPosX = 0; iPosX < iWidth; iPosX++) 1927 { 1928 Int iDisparityRec = abs( ppiCurLUT[0][ RenModRemoveBitInc(piNewData[iPosX])] ); 1929 Int iDisparityOrg = abs( ppiCurLUT[0][ RenModRemoveBitInc(piOrgData[iPosX])] ); 1930 1931 if( iDisparityRec != iDisparityOrg ) 1932 { 1933 m_pbHorSkip[iPosY] = false; 1934 bNoDiff = false; 1935 break; 1936 } 1937 } 1938 1939 piNewData += iStride; 1940 piOrgData += iOrgStride; 1941 } 1942 return bNoDiff; 1943 } 1944 #endif -
trunk/source/Lib/TLibRenderer/TRenSingleModel.h
r56 r100 55 55 56 56 57 #if HHI_VSO_RM_ASSERTIONS 58 #define RM_AOT( exp ) AOT ( exp ) 59 #define RM_AOF( exp ) AOF ( exp ) 60 #else 61 #define RM_AOT( exp ) ((void)0) 62 #define RM_AOF( exp ) ((void)0) 63 #endif 64 65 #define RenModRemoveBitInc( exp ) bBitInc ? ( RemoveBitIncrement( exp ) ) : ( exp ) 66 57 67 class TRenSingleModel 58 68 { 69 public: 70 #if LGE_VSO_EARLY_SKIP_A0093 71 virtual Void create ( Int iMode, Int iWidth, Int iHeight, Int iShiftPrec, Int*** aaaiSubPelShiftTable, Int iHoleMargin, Bool bUseOrgRef, Int iBlendMode, Bool bEarlySkip ) = 0; 72 #else 73 virtual Void create ( Int iMode, Int iWidth, Int iHeight, Int iShiftPrec, Int*** aaaiSubPelShiftTable, Int iHoleMargin, Bool bUseOrgRef, Int iBlendMode ) = 0; 74 #endif 75 76 // Set Frame dependent data 77 virtual Void setLRView ( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride ) = 0; 78 virtual Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference, UInt uiHorOffset ) = 0; 79 80 // Set Data 81 #ifdef LGE_VSO_EARLY_SKIP_A0093 82 virtual Void setDepth ( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Pel* piOrgData, Int iOrgStride ) = 0; 83 #else 84 virtual Void setDepth ( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) = 0; 85 #endif 86 virtual Void setVideo ( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) = 0; 87 88 // Get Distortion 89 #ifdef LGE_VSO_EARLY_SKIP_A0093 90 virtual RMDist getDistDepth ( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Pel * piOrgData , Int iOrgStride)=0; 91 #else 92 virtual RMDist getDistDepth ( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) = 0; 93 #endif 94 virtual RMDist getDistVideo ( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) = 0; 95 96 virtual Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) = 0; 97 virtual Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) = 0; 98 virtual Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) = 0; 99 }; 100 101 template < BlenMod iBM, Bool bBitInc > 102 class TRenSingleModelC : public TRenSingleModel 103 { 104 struct RenModelInPels 105 { 106 // video 107 Pel aiY[5] ; // y-value 108 #if HHI_VSO_COLOR_PLANES 109 Pel aiU[5] ; // u-value 110 Pel aiV[5] ; // v-value 111 #endif 112 // depth 113 Pel iD ; // depth 114 115 // state 116 Bool bOccluded; // Occluded 117 }; 118 119 struct RenModelOutPels 120 { 121 // video 122 Pel iYLeft ; 123 Pel iYRight ; 124 Pel iYBlended ; 125 #if HHI_VSO_COLOR_PLANES 126 Pel iULeft ; 127 Pel iURight ; 128 Pel iUBlended ; 129 Pel iVLeft ; 130 Pel iVRight ; 131 Pel iVBlended ; 132 #endif 133 // depth 134 Pel iDLeft ; 135 Pel iDRight ; 136 Pel iDBlended ; 137 138 // state 139 Int iFilledLeft ; 140 Int iFilledRight; 141 142 // error 143 Int iError ; 144 145 // reference 146 Pel iYRef ; 147 #if HHI_VSO_COLOR_PLANES 148 Pel iURef ; 149 Pel iVRef ; 150 #endif 151 }; 152 153 59 154 60 155 public: 61 TRenSingleModel ();62 ~TRenSingleModel ();156 TRenSingleModelC(); 157 ~TRenSingleModelC(); 63 158 64 159 // Create Model 160 #if LGE_VSO_EARLY_SKIP_A0093 161 Void create ( Int iMode, Int iWidth, Int iHeight, Int iShiftPrec, Int*** aaaiSubPelShiftTable, Int iHoleMargin, Bool bUseOrgRef, Int iBlendMode, Bool bEarlySkip ); 162 #else 65 163 Void create ( Int iMode, Int iWidth, Int iHeight, Int iShiftPrec, Int*** aaaiSubPelShiftTable, Int iHoleMargin, Bool bUseOrgRef, Int iBlendMode ); 164 #endif 66 165 67 166 // Set Frame dependent data 68 167 Void setLRView ( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride ); 69 Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference ); 70 71 // Set Data 168 Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference, UInt uiHorOffset ); 169 170 #if LGE_VSO_EARLY_SKIP_A0093 171 Void setDepth ( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Pel* piOrgData, Int iOrgStride ); 172 #else 72 173 Void setDepth ( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ); 174 #endif 73 175 Void setVideo ( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ); 74 176 75 177 // Get Distortion 178 #ifdef LGE_VSO_EARLY_SKIP_A0093 179 RMDist getDistDepth ( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Pel * piOrgData , Int iOrgStride); 180 #else 76 181 RMDist getDistDepth ( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ); 182 #endif 77 183 RMDist getDistVideo ( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ); 78 184 79 // Get Rendered Data 80 Void getSynthView( Int iViewPos, Pel**& rppiRenVideoPel, Pel*& rpiRenDepthPel, Int& riStride ); 81 82 // Get Reference Data 83 Void getRefView ( TComPicYuv*& rpcPicYuvRefView, Pel**& rppiRefVideoPel, Int*& raiStrides ); 185 Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ); 186 Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ); 187 Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ); 84 188 85 189 private: … … 90 194 ///// Rendering ///// 91 195 // Left to Right 92 __inline RMDist xRenderL ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Bool bSet); 93 __inline Void xInitRenderPartL ( Int iEndChangePos, Int iLastSPos ); 94 __inline Void xRenderRangeL ( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ); 95 __inline Void xRenderShiftedRangeL( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ); 96 __inline Void xFillHoleL ( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ); 97 __inline Void xExtrapolateMarginL ( Int iCurSPos, Int iCurPos, RMDist& riError ); 98 __inline Int xRangeLeftL ( Int iPos ); 99 __inline Int xRangeRightL ( Int iPos ); 100 __inline Int xRoundL ( Int iPos ); 196 #ifdef LGE_VSO_EARLY_SKIP_A0093 197 __inline Bool xDetectEarlySkipL ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData,Pel* piOrgData, Int iOrgStride ); 198 __inline Bool xDetectEarlySkipR ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData,Pel* piOrgData, Int iOrgStride ); 199 template<Bool bSet> __inline RMDist xRenderL ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Bool bFast ); 200 template<Bool bSet> __inline RMDist xRenderR ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Bool bFast ); 201 #else 202 template<Bool bSet> __inline RMDist xRenderR ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ); 203 template<Bool bSet> __inline RMDist xRenderL ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ); 204 #endif 205 __inline Void xInitRenderPartL ( Int iEndChangePos, Int iLastSPos ); 206 template<Bool bSet> __inline Void xRenderRangeL ( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ); 207 template<Bool bSet> __inline Void xRenderShiftedRangeL( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ); 208 template<Bool bSet> __inline Void xFillHoleL ( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ); 209 template<Bool bSet> __inline Void xExtrapolateMarginL ( Int iCurSPos, Int iCurPos, RMDist& riError ); 210 __inline Int xRangeLeftL ( Int iPos ); 211 __inline Int xRangeRightL ( Int iPos ); 212 __inline Int xRoundL ( Int iPos ); 101 213 102 214 // Right to Left 103 __inline RMDist xRenderR ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Bool bSet ); 104 __inline Void xInitRenderPartR ( Int iStartChangePos, Int iLastSPos ); 105 __inline Void xRenderShiftedRangeR( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ); 106 __inline Void xRenderRangeR ( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ); 107 __inline Void xFillHoleR ( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ); 108 __inline Void xExtrapolateMarginR ( Int iCurSPos, Int iCurPos, RMDist& riError ); 109 __inline Int xRangeLeftR ( Int iPos ); 110 __inline Int xRangeRightR ( Int iPos ); 111 __inline Int xRoundR ( Int iPos ); 215 __inline Void xInitRenderPartR ( Int iStartChangePos, Int iLastSPos ); 216 template<Bool bSet> __inline Void xRenderShiftedRangeR( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ); 217 template<Bool bSet> __inline Void xRenderRangeR ( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ); 218 template<Bool bSet> __inline Void xFillHoleR ( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ); 219 template<Bool bSet> __inline Void xExtrapolateMarginR ( Int iCurSPos, Int iCurPos, RMDist& riError ); 220 __inline Int xRangeLeftR ( Int iPos ); 221 __inline Int xRangeRightR ( Int iPos ); 222 __inline Int xRoundR ( Int iPos ); 112 223 113 224 // Blending 114 __inline Void xSetShiftedPelBlend ( Int iSourcePos, Int iTargetSPos, Pel iFilled, RMDist& riError );225 template<Bool bSet> __inline Void xSetShiftedPelBlend ( Int iSourcePos, Int iTargetSPos, Pel iFilled, RMDist& riError ); 115 226 116 227 #if HHI_VSO_COLOR_PLANES … … 125 236 __inline Pel xBlend ( Pel pVal1, Pel pVal2, Int iWeightVal2 ); 126 237 127 // General 128 __inline Void xSetShiftedPel ( Int iSourcePos, Int iTargetSPos, Pel iFilled, RMDist& riError ); 238 // General 239 template<Bool bSet> __inline Void xSetShiftedPelL (Int iSourcePos, Int iSubSourcePos, Int iTargetSPos, Pel iFilled, RMDist& riError ); 240 template<Bool bSet> __inline Void xSetShiftedPelBlendL (RenModelInPels* pcInSample, Int iSubSourcePos, RenModelOutPels* pcOutSample, Pel iFilled, RMDist& riError ); 241 template<Bool bSet> __inline Void xSetShiftedPelNoBlendL(RenModelInPels* pcInSample, Int iSubSourcePos, RenModelOutPels* pcOutSample, Pel iFilled, RMDist& riError ); 242 243 template<Bool bSet> __inline Void xSetShiftedPelR (Int iSourcePos, Int iSubSourcePos, Int iTargetSPos, Pel iFilled, RMDist& riError ); 244 template<Bool bSet> __inline Void xSetShiftedPelBlendR (RenModelInPels* pcInSample, Int iSubSourcePos, RenModelOutPels* pcOutSample, Pel iFilled, RMDist& riError ); 245 template<Bool bSet> __inline Void xSetShiftedPelNoBlendR(RenModelInPels* pcInSample, Int iSubSourcePos, RenModelOutPels* pcOutSample, Pel iFilled, RMDist& riError ); 246 129 247 __inline Int xShiftNewData ( Int iPos, Int iPosInNewData ); 130 248 __inline Int xShift ( Int iPos ); … … 134 252 135 253 // Utilities 136 __inline Void xInitView ( Int iViewPos );137 254 __inline Void xSetPels ( Pel* piPelSource , Int iSourceStride, Int iWidth, Int iHeight, Pel iVal ); 138 255 __inline Void xSetBools ( Bool* pbSource , Int iSourceStride, Int iWidth, Int iHeight, Bool bVal ); 139 256 __inline Void xSetInts ( Int* piPelSource , Int iSourceStride, Int iWidth, Int iHeight, Int iVal ); 257 258 #if HHI_VSO_COLOR_PLANES 259 Void xGetSampleStrTextPtrs ( Int iViewNum, Pel RenModelOutPels::*& rpiSrcY, Pel RenModelOutPels::*& rpiSrcU, Pel RenModelOutPels::*& rpiSrcV ); 260 #else 261 Void xGetSampleStrTextPtrs ( Int iViewNum, Pel RenModelOutPels::*& rpiSrcY ); 262 #endif 263 Void xGetSampleStrDepthPtrs( Int iViewNum, Pel RenModelOutPels::*& rpiSrcD ); 264 265 Void xSetStructRefView (); 266 Void xResetStructError (); 267 Void xInitSampleStructs (); 268 Void xSetStructSynthViewAsRefView (); 269 Void xCopy2PicYuv ( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget, UInt uiHorOffset ); 270 271 272 template< typename S, typename T> 273 Void xCopyFromSampleStruct ( S* ptSource , Int iSourceStride, T S::* ptSourceElement, T* ptTarget, Int iTargetStride, Int iWidth, Int iHeight ) 274 { 275 for (Int iPosY = 0; iPosY < m_iHeight; iPosY++) 276 { 277 for (Int iPosX = 0; iPosX < m_iWidth; iPosX++) 278 { 279 ptTarget[iPosX] = ptSource[iPosX].*ptSourceElement; 280 } 281 ptSource += iSourceStride; 282 ptTarget += iTargetStride; 283 } 284 } 285 286 template< typename S, typename T> 287 Void xCopyToSampleStruct ( T* ptSource , Int iSourceStride, S* ptTarget, Int iTargetStride, T S::* ptSourceElement, Int iWidth, Int iHeight ) 288 { 289 for (Int iPosY = 0; iPosY < m_iHeight; iPosY++) 290 { 291 for (Int iPosX = 0; iPosX < m_iWidth; iPosX++) 292 { 293 ptTarget[iPosX] = ptSource[iPosX].*ptSourceElement; 294 } 295 ptSource += iSourceStride; 296 ptTarget += iTargetStride; 297 } 298 } 140 299 141 300 private: … … 151 310 Int m_iSampledStride; 152 311 312 RenModelInPels* m_pcInputSamples[2]; 313 Int m_iInputSamplesStride; 314 153 315 // Base 154 316 Pel** m_aapiBaseVideoPel [2]; // Dim1: ViewPosition 0->Left, 1->Right; Dim2: Plane 0-> Y, 1->U, 2->V … … 157 319 Pel* m_apiBaseDepthPel [2]; // Dim1: ViewPosition 158 320 Int m_aiBaseDepthStrides [2]; // Dim1: ViewPosition 321 159 322 160 323 // LUT … … 170 333 //// Reference Data //// 171 334 TComPicYuv* m_pcPicYuvRef ; // Reference PIcYuv 335 336 //// Output Samples 337 RenModelOutPels* m_pcOutputSamples; 338 Int m_iOutputSamplesStride; 339 172 340 Pel* m_aapiRefVideoPel [3]; // Dim1: Plane 0-> Y, 1->U, 2->V 173 341 Int m_aiRefVideoStrides [3]; // Dim1: Plane 0-> Y, 1->U, 2->V 174 175 // Renderer State176 Int* m_piError ;177 Pel* m_apiFilled [2]; // Dim1: ViewPosition178 Bool* m_apbOccluded [2]; // Dim1: ViewPosition179 Pel* m_aapiSynthVideoPel [3][3]; // Dim1: ViewPosition 0: Left, 1:Right, 2: Merged, Dim2: Plane 0-> Y, 1->U, 2->V180 Pel* m_apiSynthDepthPel [3]; // Dim1: ViewPosition 0: Left, 1:Right, 2: Merged, Dim2: Plane 0-> Y, 1->U, 2->V181 342 182 343 // Rendering State … … 185 346 Int m_iLastOccludedSPosFP; // Position of last topmost shifted position in FullPels 186 347 187 Bool m_bSet; // Set Data, or get Error188 348 Int m_iCurViewPos; // Current View Position 0: Left, 1: Right 189 349 Int m_iOtherViewPos; // Other View Position 0: Left, 1: Right … … 201 361 Int m_iShiftPrec; 202 362 Int m_iHoleMargin; 203 Int m_iBlendMode; 363 #ifdef LGE_VSO_EARLY_SKIP_A0093 364 Bool m_bEarlySkip; 365 #endif 204 366 205 367 // Derived settings … … 209 371 210 372 //// Current Pointers //// 211 Pel* m_aapiBaseVideoPelRow [2][3]; // Dim1: ViewPosition 0->Left, 1->Right; Dim2: Plane 0-> Y, 1->U, 2->V 212 Pel* m_apiBaseDepthPelRow [2]; // Dim1: ViewPosition 213 Bool* m_apbOccludedRow [2]; // Dim1: ViewPosition 214 Pel* m_apiFilledRow [2]; // Dim1: ViewPosition 215 Int* m_apiErrorRow ; 216 217 Pel* m_aapiRefVideoPelRow [3]; // Dim1: Plane 0-> Y, 1->U, 2->V 218 Pel* m_aapiSynthVideoPelRow [3][3]; // Dim1: ViewPosition 0: Left, 1:Right, 2: Merged, Dim2: Plane 0-> Y, 1->U, 2->V 219 Pel* m_apiSynthDepthPelRow [3]; // Dim1: ViewPosition 0: Left, 1:Right, 2: Merged 220 373 374 RenModelInPels* m_pcInputSamplesRow [2]; 375 RenModelOutPels* m_pcOutputSamplesRow; 221 376 222 377 //// MISC //// 223 378 const Int m_iDistShift; // Shift in Distortion computation 379 380 //// Early Skip 381 #ifdef LGE_VSO_EARLY_SKIP_A0093 382 Bool* m_pbHorSkip; 383 #endif 224 384 }; 225 385 -
trunk/source/Lib/TLibRenderer/TRenTop.cpp
r81 r100 1013 1013 if ((iPrevShiftedPos + (iStep >> 1) ) > iPrevShiftedPosCeiled ) 1014 1014 { 1015 #if HHI_FIX1016 1015 if ( !((iInterPolPos < (Int) 0) || (iInterPolPos >= iOutputWidth))) 1017 1016 { … … 1026 1025 iInterPolPos++; 1027 1026 } 1028 #else1029 if ( (iInterPolPos < (Int) 0) || (iInterPolPos >= iOutputWidth))1030 {1031 // skip Interpolation if Interpolation position is outside frame1032 iPrevShiftedPos = iShiftedPos;1033 continue;1034 };1035 1036 for( UInt uiCurPlane = 0; uiCurPlane < uiNumberOfPlanes; uiCurPlane++)1037 {1038 apcOutputData[uiCurPlane][iInterPolPos] = apcInputData[uiCurPlane][iPosX - iStep];1039 }1040 pcFilledData[iInterPolPos] = REN_IS_FILLED;1041 iInterPolPos++;1042 }1043 #endif1044 1027 1045 1028 // Fill Disocclusion … … 1064 1047 { 1065 1048 iInterPolPos = iShiftedPosFloor >> m_iRelShiftLUTPrec; 1066 #if HHI_FIX1067 1049 if ( !((iInterPolPos < (Int) 0) || (iInterPolPos >= iOutputWidth))) 1068 1050 { … … 1074 1056 pcFilledData[iInterPolPos] = REN_IS_FILLED; 1075 1057 } 1076 #else1077 if ( (iInterPolPos < (Int) 0) || (iInterPolPos >= iOutputWidth))1078 {1079 // skip Interpolation if Interpolation position is outside frame1080 iPrevShiftedPos = iShiftedPos;1081 continue;1082 };1083 1084 for( UInt uiCurPlane = 0; uiCurPlane < uiNumberOfPlanes; uiCurPlane++)1085 {1086 apcOutputData[uiCurPlane][iInterPolPos] = apcInputData[uiCurPlane][iPosX ];1087 }1088 1089 pcFilledData[iInterPolPos] = REN_IS_FILLED;1090 #endif1091 1058 } 1092 1059 } … … 1959 1926 for( Int iCurPosX = 0; iCurPosX < 4; iCurPosX++) 1960 1927 { 1961 iSAD += abs( pcVideoLastDataBlk[iCurPosX] - pcVideoCurDataBlk[iCurPosX] ); 1928 iSAD += abs( pcVideoLastDataBlk[iCurPosX] - pcVideoCurDataBlk[iCurPosX] ); //SAD 1962 1929 } 1963 1930 pcVideoLastDataBlk += iVideoLastStride;
Note: See TracChangeset for help on using the changeset viewer.