Changeset 166 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder
- Timestamp:
- 1 Nov 2012, 19:22:41 (12 years ago)
- Location:
- branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecTop.cpp
r105 r166 262 262 } 263 263 } 264 #if DEBUGIMGOUT 265 for(Int viewDepthIdx=0; viewDepthIdx<m_tVideoIOYuvReconDbgFile.size() ; viewDepthIdx++) 266 { 267 if( m_tVideoIOYuvReconDbgFile[viewDepthIdx] ) 268 { 269 m_tVideoIOYuvReconDbgFile[viewDepthIdx]->close(); 270 delete m_tVideoIOYuvReconDbgFile[viewDepthIdx]; 271 m_tVideoIOYuvReconDbgFile[viewDepthIdx] = NULL ; 272 } 273 } 274 #endif 264 275 265 276 for(Int viewDepthIdx=0; viewDepthIdx<m_tDecTop.size() ; viewDepthIdx++) … … 330 341 #endif 331 342 } 343 #if DEBUGIMGOUT 344 #if PIC_CROPPING 345 m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), sps->getPicCropLeftOffset(), sps->getPicCropRightOffset(), sps->getPicCropTopOffset(), sps->getPicCropBottomOffset() ); 346 #else 347 m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), pcPic->getSlice(0)->getSPS()->getPad() ); 348 #endif 349 #endif 332 350 333 351 // update POC of display order … … 388 406 #endif 389 407 } 408 #if DEBUGIMGOUT 409 #if PIC_CROPPING 410 m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), sps->getPicCropLeftOffset(), sps->getPicCropRightOffset(), sps->getPicCropTopOffset(), sps->getPicCropBottomOffset() ); 411 #else 412 m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), pcPic->getSlice(0)->getSPS()->getPad() ); 413 #endif 414 #endif 390 415 391 416 // update POC of display order … … 476 501 } 477 502 #endif 478 503 #if DEBUGIMGOUT 504 while( m_tVideoIOYuvReconDbgFile.size() < newNumberOfViewDepth) 505 { 506 m_tVideoIOYuvReconDbgFile.push_back(new TVideoIOYuv); 507 Char buffer[4]; 508 sprintf(buffer,"_%i", (Int)(m_tVideoIOYuvReconDbgFile.size()-1) / 2 ); 509 Char* nextFilename = NULL; 510 if( (m_tVideoIOYuvReconDbgFile.size() % 2) == 0 ) 511 { 512 Char* pchTempFilename = NULL; 513 xAppendToFileNameEnd( "DebugImg.yuv", "_depth", pchTempFilename); 514 xAppendToFileNameEnd( pchTempFilename, buffer, nextFilename); 515 free ( pchTempFilename ); 516 } 517 else 518 { 519 xAppendToFileNameEnd( "DebugImg.yuv", buffer, nextFilename); 520 } 521 if( isDepth || ( !isDepth && (m_tVideoIOYuvReconDbgFile.size() % 2) == 1 ) ) 522 { 523 m_tVideoIOYuvReconDbgFile.back()->open( nextFilename, true, m_outputBitDepth, g_uiBitDepth + g_uiBitIncrement ); 524 } 525 free ( nextFilename ); 526 } 527 #endif 479 528 while( m_pocLastDisplay.size() < newNumberOfViewDepth ) 480 529 { … … 533 582 return pcPic; 534 583 } 584 585 #if VSP_N 586 Void TAppDecTop::storeVSPInBuffer(TComPic* pcPicVSP, TComPic* pcPicAvail, Int iCodedViewIdx, Int iCoddedViewOrderIdx, Int iCurPoc, Bool bDepth) 587 { 588 //first view does not have VSP 589 #if VSP_TEXT_ONLY 590 if((iCodedViewIdx == 0)||(bDepth)) 591 #else 592 if((iCodedViewIdx == 0)) 593 #endif 594 return; 595 pcPicVSP->getSlice(0)->setPOC( iCurPoc ); 596 Int iNeighborViewId = 0; 597 Bool bRenderFromLeft; 598 //check if the neighboring view is situated to the left of the current view 599 bRenderFromLeft = ((iCoddedViewOrderIdx)>0); 600 //pointers to buffers 601 TComPicYuv* pcPicYuvVideo = getPicFromView(iNeighborViewId, iCurPoc, bDepth)->getPicYuvRec(); 602 TComPicYuv* pcPicYuvDepth = getPicFromView(iNeighborViewId, iCurPoc, true)->getPicYuvRec(); 603 TComPicYuv* pcPicYuvVSP = pcPicVSP->getPicYuvRec(); 604 TComPicYuv* pcPicYuvAvail = pcPicAvail->getPicYuvRec(); 605 //verifying buffers 606 AOF(pcPicYuvVideo); 607 AOF(pcPicYuvDepth); 608 AOF(pcPicYuvVSP); 609 AOF(pcPicYuvAvail); 610 611 TComPic* pcPic = getPicFromView( iCodedViewIdx, iCurPoc, bDepth ); 612 pcPic->setPicYuvSynth( pcPicYuvVSP ); 613 pcPic->setPicYuvAvail( pcPicYuvAvail ); 614 615 //setting look-up table 616 #if 0 617 m_cVSPRendererTop.setShiftLUTs( 618 m_cCamParsCollector.getBaseViewShiftLUTD()[iNeighborViewId][iCodedViewIdx], 619 m_cCamParsCollector.getBaseViewShiftLUTI()[iNeighborViewId][iCodedViewIdx], 620 m_cCamParsCollector.getBaseViewShiftLUTI()[iNeighborViewId][iCodedViewIdx], 621 m_cCamParsCollector.getBaseViewShiftLUTD()[iNeighborViewId][iCodedViewIdx], 622 m_cCamParsCollector.getBaseViewShiftLUTI()[iNeighborViewId][iCodedViewIdx], 623 m_cCamParsCollector.getBaseViewShiftLUTI()[iNeighborViewId][iCodedViewIdx], 624 -1 625 ); 626 #else 627 #if NTT_SUBPEL 628 m_cVSPRendererTop.setShiftLUTs( 629 m_cCamParsCollector.getBaseViewShiftLUTD()[iNeighborViewId][iCodedViewIdx], 630 m_cCamParsCollector.getBaseViewIPelLUT ()[iNeighborViewId][iCodedViewIdx], 631 NULL, 632 m_cCamParsCollector.getBaseViewShiftLUTD()[iNeighborViewId][iCodedViewIdx], 633 m_cCamParsCollector.getBaseViewIPelLUT ()[iNeighborViewId][iCodedViewIdx], 634 NULL, 635 -1 636 ); 637 m_cVSPRendererTop.setFposLUTs( 638 m_cCamParsCollector.getBaseViewFPosLUT()[iNeighborViewId][iCodedViewIdx], 639 m_cCamParsCollector.getBaseViewFPosLUT()[iNeighborViewId][iCodedViewIdx] 640 ); 641 #else 642 m_cVSPRendererTop.setShiftLUTs( 643 m_cCamParsCollector.getBaseViewShiftLUTD()[iNeighborViewId][iCodedViewIdx], 644 m_cCamParsCollector.getBaseViewShiftLUTI()[iNeighborViewId][iCodedViewIdx], 645 NULL, 646 m_cCamParsCollector.getBaseViewShiftLUTD()[iNeighborViewId][iCodedViewIdx], 647 m_cCamParsCollector.getBaseViewShiftLUTI()[iNeighborViewId][iCodedViewIdx], 648 NULL, 649 -1 650 ); 651 #endif 652 #endif 653 654 #if NTT_SUBPEL 655 m_cVSPRendererTop.setInterpolationMode( (bDepth ? 0 : 5) ); 656 #endif 657 658 //extrapolate from view iNeighborViewId to the current view, storing in the VSP buffer 659 //m_cVSPRendererTop.extrapolateView(pcPicYuvVideo,pcPicYuvDepth, pcPicYuvVSP, bRenderFromLeft); 660 m_cVSPRendererTop.extrapolateAvailabilityView(pcPicYuvVideo,pcPicYuvDepth, pcPicYuvVSP, pcPicYuvAvail, bRenderFromLeft); 661 662 // mark it should be extended 663 pcPicVSP->getPicYuvRec()->setBorderExtension(false); 664 pcPicVSP->getPicYuvRec()->extendPicBorder(); //will extend the border for prediction using pixels outside the frame 665 pcPicAvail->getPicYuvRec()->setBorderExtension(false); 666 pcPicAvail->getPicYuvRec()->extendPicBorder(); 667 #if VSP_N_DUMP 668 { 669 Char acFilenameBase[1024]; 670 ::sprintf(acFilenameBase,"VSP_dec_%sv%d_%dx%d_%04d.yuv",(bDepth?"D":"T"),iCodedViewIdx,pcPicYuvVSP->getWidth(), pcPicYuvVSP->getHeight(), iCurPoc); 671 pcPicYuvVSP->dump(acFilenameBase,0); 672 //pcPicYuvAvail->dump(acFilenameBase,iCurPoc!=0); 673 } 674 #endif 675 } 676 #endif 677 535 678 //! \} -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecTop.h
r100 r166 49 49 #include "TLibDecoder/TDecTop.h" 50 50 #include "TAppDecCfg.h" 51 #if VSP_N 52 #include "../../Lib/TLibRenderer/TRenTop.h" 53 #endif 51 54 52 55 //! \ingroup TAppDecoder … … 65 68 66 69 std::vector<TVideoIOYuv*> m_tVideoIOYuvReconFile; ///< reconstruction YUV class 70 #if DEBUGIMGOUT 71 std::vector<TVideoIOYuv*> m_tVideoIOYuvReconDbgFile; ///< debug YUV class 72 #endif 67 73 68 74 // for output control … … 79 85 TComSPSAccess m_cSPSAccess; 80 86 TComAUPicAccess m_cAUPicAccess; 87 #endif 88 89 #if VSP_N 90 TRenTop m_cVSPRendererTop; 81 91 #endif 82 92 … … 107 117 #endif 108 118 119 #if VSP_N 120 Bool getUseDepth () { return m_useDepth; } 121 TRenTop* getVSPRendererTop(){ return &m_cVSPRendererTop; } 122 Void storeVSPInBuffer(TComPic* pcPicVSP, TComPic* pcPicAvail, Int iCodedViewIdx, Int iCoddedViewOrderIdx, Int iCurPoc, Bool bDepth); 123 #endif 124 109 125 protected: 110 126 // Void xCreateDecLib (); ///< create internal classes
Note: See TracChangeset for help on using the changeset viewer.