Changeset 1413 in 3DVCSoftware for trunk/source/Lib/TLibRenderer
- Timestamp:
- 11 Jul 2018, 15:19:49 (7 years ago)
- Location:
- trunk/source/Lib/TLibRenderer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibRenderer/TRenModel.cpp
r1405 r1413 418 418 419 419 #if H_3D_VSO_EARLY_SKIP 420 #if RM_INIT_FIX421 420 m_apcRenModels[iModelNum]->create( iMode ,m_iWidth, m_iHeight, m_iShiftPrec, m_aaaiSubPelShiftLut, m_iHoleMargin, bUseOrgRef, ( iMode != 2 ) ? BLEND_NONE : iBlendMode , m_bLimOutput, m_bEarlySkip ); 421 422 422 #else 423 m_apcRenModels[iModelNum]->create( iMode ,m_iWidth, m_iHeight, m_iShiftPrec, m_aaaiSubPelShiftLut, m_iHoleMargin, bUseOrgRef, iBlendMode, m_bLimOutput, m_bEarlySkip );424 #endif425 426 #else427 428 #if RM_INIT_FIX429 423 m_apcRenModels[iModelNum]->create( iMode ,m_iWidth, m_iHeight, m_iShiftPrec, m_aaaiSubPelShiftLut, m_iHoleMargin, bUseOrgRef, ( iMode != 2 ) ? BLEND_NONE : iBlendMode, m_bLimOutput ); 430 #else431 m_apcRenModels[iModelNum]->create( iMode ,m_iWidth, m_iHeight, m_iShiftPrec, m_aaaiSubPelShiftLut, m_iHoleMargin, bUseOrgRef, iBlendMode, m_bLimOutput );432 #endif433 424 #endif 434 425 … … 507 498 508 499 // Render 509 #if !RM_FIX_SETUP510 m_apcRenModels[iModelNum]->setupLutAndRef( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, bAnyRefFromOrg );511 512 // Setup with actual data513 for (Int iBaseViewIdx = 0; iBaseViewIdx < m_iNumOfBaseViews; iBaseViewIdx++ )514 {515 if ( m_aaeBaseViewPosInModel[iBaseViewIdx][iModelNum] != VIEWPOS_INVALID )516 {517 m_apcRenModels[iModelNum]->setLRView(518 m_aaeBaseViewPosInModel[iBaseViewIdx][iModelNum],519 m_aapiCurVideoPel [iBaseViewIdx],520 m_aaiCurVideoStrides [iBaseViewIdx],521 m_apiCurDepthPel [iBaseViewIdx],522 m_aiCurDepthStrides [iBaseViewIdx]523 );524 }525 }526 // Render initial state527 AOT( m_bLimOutput && m_aaeBaseViewPosInModel[ iEncViewSIdx ][iModelNum] == VIEWPOS_INVALID );528 m_apcRenModels[iModelNum]->setupInitialState( m_bLimOutput ? m_aaeBaseViewPosInModel[ iEncViewSIdx ][iModelNum] : VIEWPOS_INVALID );529 530 #else531 500 m_apcRenModels[iModelNum]->setupLut( ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft ); 532 501 … … 587 556 m_apcRenModels[iModelNum]->setLimOutStruct( (curViewPosInModel == VIEWPOS_RIGHT) ? VIEWPOS_LEFT : VIEWPOS_RIGHT ); 588 557 } 589 #endif590 558 } 591 559 -
trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp
r1405 r1413 246 246 247 247 248 #if !RM_FIX_SETUP249 template <BlenMod iBM, Bool bBitInc> Void250 TRenSingleModelC<iBM,bBitInc>::setupInitialState( Int curViewPosInModel )251 {252 xRenderAll( );253 254 if ( m_bLimOutput )255 {256 AOT( curViewPosInModel == VIEWPOS_INVALID )257 xSetLimOutStruct( (curViewPosInModel == VIEWPOS_RIGHT) ? VIEWPOS_LEFT : VIEWPOS_RIGHT );258 }259 }260 #endif261 262 #if RM_FIX_SETUP263 248 template <BlenMod iBM, Bool bBitInc> Void 264 249 TRenSingleModelC<iBM,bBitInc>::setupRefView ( TComPicYuv* pcOrgVideo ) … … 287 272 template <BlenMod iBM, Bool bBitInc> Void 288 273 TRenSingleModelC<iBM,bBitInc>::setupLut( Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft ) 289 #else 290 template <BlenMod iBM, Bool bBitInc> Void 291 TRenSingleModelC<iBM,bBitInc>::setupLutAndRef( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bRenderRef ) 292 #endif 293 { 294 #if !RM_FIX_SETUP 295 AOT( !m_bUseOrgRef && pcOrgVideo ); 296 #endif 274 { 297 275 AOT( (ppiShiftLutLeft == NULL) && (m_iMode == 0 || m_iMode == 2) ); 298 276 AOT( (ppiShiftLutRight == NULL) && (m_iMode == 1 || m_iMode == 2) ); … … 306 284 TRenFilter<REN_BIT_DEPTH>::setupZLUT( true, 30, iDistToLeft, ppiBaseShiftLutLeft, ppiBaseShiftLutRight, m_iBlendZThres, m_iBlendDistWeight, m_piInvZLUTLeft, m_piInvZLUTRight ); 307 285 } 308 309 #if !RM_FIX_SETUP 310 // Copy Reference 311 m_pcPicYuvRef = pcOrgVideo; 312 313 if ( pcOrgVideo ) 314 { 315 assert( pcOrgVideo->getChromaFormat() == CHROMA_420 ); 316 317 TRenFilter<REN_BIT_DEPTH>::copy( pcOrgVideo->getAddr( COMPONENT_Y ) + m_iHorOffset * pcOrgVideo->getStride( COMPONENT_Y ), pcOrgVideo->getStride( COMPONENT_Y ), m_iWidth, m_iUsedHeight, m_aapiRefVideoPel[0], m_aiRefVideoStrides[0]); 318 TRenFilter<REN_BIT_DEPTH>::sampleCUpHorUp(0, pcOrgVideo->getAddr( COMPONENT_Cb ) + (m_iHorOffset >> 1) * pcOrgVideo->getStride( COMPONENT_Cb ), pcOrgVideo->getStride( COMPONENT_Cb ), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiRefVideoPel[1], m_aiRefVideoStrides[1]); 319 TRenFilter<REN_BIT_DEPTH>::sampleCUpHorUp(0, pcOrgVideo->getAddr( COMPONENT_Cr ) + (m_iHorOffset >> 1) * pcOrgVideo->getStride( COMPONENT_Cr ), pcOrgVideo->getStride( COMPONENT_Cr ), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiRefVideoPel[2], m_aiRefVideoStrides[2]); 320 xSetStructRefView(); 321 } 322 else 323 { 324 if ( bRenderRef ) 325 { 326 xRenderAll( ); 327 xSetStructSynthViewAsRefView(); 328 } 329 } 330 #endif 331 } 332 333 template <BlenMod iBM, Bool bBitInc> Void 334 #if RM_FIX_SETUP 286 } 287 288 template <BlenMod iBM, Bool bBitInc> Void 335 289 TRenSingleModelC<iBM,bBitInc>::renderAll( ) 336 #else337 TRenSingleModelC<iBM,bBitInc>::xRenderAll( )338 #endif339 290 { 340 291 // Initial Rendering 341 #if RM_FIX_SETUP342 292 resetStructError(); 343 #else344 xResetStructError();345 #endif346 293 xInitSampleStructs(); 347 294 switch ( m_iMode ) … … 465 412 466 413 template <BlenMod iBM, Bool bBitInc> Void 467 #if RM_FIX_SETUP468 414 TRenSingleModelC<iBM,bBitInc>::resetStructError( ) 469 #else470 TRenSingleModelC<iBM,bBitInc>::xResetStructError( )471 #endif472 415 { 473 416 RenModelOutPels* pcCurOutSampleRow = m_pcOutputSamples; … … 484 427 485 428 template <BlenMod iBM, Bool bBitInc> Void 486 #if RM_FIX_SETUP487 429 TRenSingleModelC<iBM,bBitInc>::setLimOutStruct(Int iSourceViewPos ) 488 #else489 TRenSingleModelC<iBM,bBitInc>::xSetLimOutStruct(Int iSourceViewPos )490 #endif491 430 { 492 431 RM_AOF( m_bLimOutput ); … … 537 476 538 477 template <BlenMod iBM, Bool bBitInc> Void 539 #if RM_FIX_SETUP540 478 TRenSingleModelC<iBM,bBitInc>::setStructSynthViewAsRefView( ) 541 #else542 TRenSingleModelC<iBM,bBitInc>::xSetStructSynthViewAsRefView( )543 #endif544 479 { 545 480 AOT( m_iMode < 0 || m_iMode > 2); -
trunk/source/Lib/TLibRenderer/TRenSingleModel.h
r1405 r1413 78 78 virtual Void setLRView ( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride ) = 0; 79 79 virtual Void setupPart ( UInt uiHorOffset, Int iUsedHeight ) = 0; 80 #if RM_FIX_SETUP 80 81 81 virtual Void setupLut ( Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft ) = 0; 82 82 virtual Void setupRefView ( TComPicYuv* pcOrgVideo ) = 0; … … 86 86 virtual Void resetStructError () = 0; 87 87 virtual Void setLimOutStruct ( Int iSourceViewPos ) = 0; 88 #else89 virtual Void setupLutAndRef ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bRenderRef ) = 0;90 virtual Void setupInitialState ( Int curViewPosInModel ) = 0;91 #endif92 88 93 89 // Set Data … … 195 191 Void setLRView ( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride ); 196 192 Void setupPart ( UInt uiHorOffset, Int uiUsedHeight ); 197 #if RM_FIX_SETUP 193 198 194 Void setupLut ( Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft); 199 195 Void setupRefView ( TComPicYuv* pcOrgVideo ); … … 203 199 Void resetStructError (); 204 200 Void setLimOutStruct ( Int iSourceViewPos ); 205 #else206 Void setupLutAndRef ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bRenderRef );207 Void setupInitialState ( Int curViewPosInModel );208 #endif209 201 210 202 … … 229 221 230 222 private: 231 232 #if !RM_FIX_SETUP233 __inline Void xRenderAll( );234 #endif235 223 236 224 … … 310 298 311 299 Void xSetStructRefView (); 312 #if !RM_FIX_SETUP313 Void xResetStructError ();314 Void xSetLimOutStruct (Int iSourceViewPos );315 #endif316 317 300 Void xInitSampleStructs (); 318 #if !RM_FIX_SETUP319 Void xSetStructSynthViewAsRefView ();320 #endif321 301 Void xCopy2PicYuv ( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget ); 322 302
Note: See TracChangeset for help on using the changeset viewer.