Changeset 38 in SHVCSoftware for branches/SHM-1.1-dev/source/Lib/TLibDecoder
- Timestamp:
- 20 Feb 2013, 21:24:20 (12 years ago)
- Location:
- branches/SHM-1.1-dev/source/Lib/TLibDecoder
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-1.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r30 r38 81 81 memset(m_cIlpPic, 0, sizeof(m_cIlpPic)); 82 82 #endif 83 #if AVC_SYNTAX || SYNTAX_OUTPUT 84 m_pBLSyntaxFile = NULL; 85 #endif 83 86 84 87 } … … 335 338 336 339 m_cGopDecoder.filterPicture(pcPic); 340 341 #if SYNTAX_OUTPUT 342 pcPic->wrireBLSyntax( getBLSyntaxFile(), SYNTAX_BYTES ); 343 #endif 337 344 338 345 TComSlice::sortPicList( m_cListPic ); // sorting for application output … … 559 566 { 560 567 TComPic* pBLPic = (*m_ppcTDecTop[0]->getListPic()->begin()); 561 FILE* pFile= m_ppcTDecTop[0]->getBLReconFile();562 UInt uiWidth = pBLPic->getPicYuvRec()->getWidth();563 UInt uiHeight = pBLPic->getPicYuvRec()->getHeight();568 fstream* pFile = m_ppcTDecTop[0]->getBLReconFile(); 569 UInt uiWidth = pBLPic->getPicYuvRec()->getWidth() - pBLPic->getPicYuvRec()->getPicCropLeftOffset() - pBLPic->getPicYuvRec()->getPicCropRightOffset();; 570 UInt uiHeight = pBLPic->getPicYuvRec()->getHeight() - pBLPic->getPicYuvRec()->getPicCropTopOffset() - pBLPic->getPicYuvRec()->getPicCropBottomOffset(); 564 571 565 if( pFile ) 566 { 567 fseek( pFile, m_apcSlicePilot->getPOC() * uiWidth * uiHeight * 3 / 2, SEEK_SET ); 572 if( pFile->good() ) 573 { 574 UInt64 uiPos = (UInt64) m_apcSlicePilot->getPOC() * uiWidth * uiHeight * 3 / 2; 575 576 pFile->seekg((UInt)uiPos, ios::beg ); 568 577 569 578 Pel* pPel = pBLPic->getPicYuvRec()->getLumaAddr(); … … 573 582 for( Int j = 0; j < uiWidth; j++ ) 574 583 { 575 pPel[j] = fgetc( pFile);584 pPel[j] = pFile->get(); 576 585 } 577 586 pPel += uiStride; … … 584 593 for( Int j = 0; j < uiWidth/2; j++ ) 585 594 { 586 pPel[j] = fgetc( pFile);595 pPel[j] = pFile->get(); 587 596 } 588 597 pPel += uiStride; … … 595 604 for( Int j = 0; j < uiWidth/2; j++ ) 596 605 { 597 pPel[j] = fgetc( pFile);606 pPel[j] = pFile->get(); 598 607 } 599 608 pPel += uiStride; 600 609 } 601 610 } 611 #if AVC_SYNTAX 612 if( m_apcSlicePilot->getPOC() == 0 ) 613 { 614 // initialize partition order. 615 UInt* piTmp = &g_auiZscanToRaster[0]; 616 initZscanToRaster( pBLPic->getPicSym()->getMaxDepth() + 1, 1, 0, piTmp ); 617 initRasterToZscan( pBLPic->getPicSym()->getMaxCUWidth(), pBLPic->getPicSym()->getMaxCUHeight(), pBLPic->getPicSym()->getMaxDepth() + 1 ); 618 } 619 pBLPic->getSlice( 0 )->setPOC( m_apcSlicePilot->getPOC() ); 620 pBLPic->getSlice( 0 )->setSliceType( m_apcSlicePilot->getSliceType() ); 621 pBLPic->readBLSyntax( m_ppcTDecTop[0]->getBLSyntaxFile(), SYNTAX_BYTES ); 622 #endif 602 623 } 603 624 #endif … … 979 1000 { 980 1001 #if SVC_UPSAMPLING 1002 #if AVC_SYNTAX 1003 TComSPS* sps = new TComSPS(); 1004 pBLPic->create( m_ppcTDecTop[0]->getBLWidth(), m_ppcTDecTop[0]->getBLHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, sps, true); 1005 #else 981 1006 pBLPic->create( m_ppcTDecTop[0]->getBLWidth(), m_ppcTDecTop[0]->getBLHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL, true); 1007 #endif 982 1008 #else 983 1009 pBLPic->create( m_ppcTDecTop[0]->getBLWidth(), m_ppcTDecTop[0]->getBLHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true); -
branches/SHM-1.1-dev/source/Lib/TLibDecoder/TDecTop.h
r28 r38 127 127 TDecTop** m_ppcTDecTop; 128 128 #if AVC_BASE 129 FILE*m_pBLReconFile;129 fstream* m_pBLReconFile; 130 130 Int m_iBLSourceWidth; 131 131 Int m_iBLSourceHeight; 132 132 #endif 133 133 #endif 134 #if AVC_SYNTAX || SYNTAX_OUTPUT 135 fstream* m_pBLSyntaxFile; 136 #endif 134 137 #if REF_IDX_FRAMEWORK 135 138 TComPic* m_cIlpPic[MAX_NUM_REF]; ///< Inter layer Prediction picture = upsampled picture … … 165 168 TDecTop* getLayerDec(UInt layer) { return m_ppcTDecTop[layer]; } 166 169 #if AVC_BASE 167 Void setBLReconFile( FILE* pFile ) { m_pBLReconFile = pFile; }168 FILE*getBLReconFile() { return m_pBLReconFile; }170 Void setBLReconFile( fstream* pFile ) { m_pBLReconFile = pFile; } 171 fstream* getBLReconFile() { return m_pBLReconFile; } 169 172 Void setBLsize( Int iWidth, Int iHeight ) { m_iBLSourceWidth = iWidth; m_iBLSourceHeight = iHeight; } 170 173 Int getBLWidth() { return m_iBLSourceWidth; } 171 174 Int getBLHeight() { return m_iBLSourceHeight; } 172 175 #endif 176 #endif 177 #if AVC_SYNTAX || SYNTAX_OUTPUT 178 Void setBLSyntaxFile( fstream* pFile ) { m_pBLSyntaxFile = pFile; } 179 fstream* getBLSyntaxFile() { return m_pBLSyntaxFile; } 173 180 #endif 174 181 #if REF_IDX_FRAMEWORK
Note: See TracChangeset for help on using the changeset viewer.