Changeset 820 in SHVCSoftware for branches/SHM-dev/source/App/TAppDecoder
- Timestamp:
- 7 Jul 2014, 11:08:41 (10 years ago)
- Location:
- branches/SHM-dev/source/App/TAppDecoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.cpp
r815 r820 78 78 string cfg_ReconFile; 79 79 #endif 80 #if AVC_SYNTAX || SYNTAX_OUTPUT 81 string cfg_BLSyntaxFile; 82 #endif 80 83 81 string cfg_TargetDecLayerIdSetFile; 84 82 … … 96 94 ("BLSourceHeight,-hgt", m_iBLSourceHeight, 0, "BL source picture height") 97 95 #endif 98 #if AVC_SYNTAX99 ("BLSyntaxFile,-ibs", cfg_BLSyntaxFile, string(""), "BL syntax input file name")100 #endif101 96 #endif 102 97 #else 103 98 ("ReconFile,o", cfg_ReconFile, string(""), "reconstructed YUV output file name\n" 104 99 "YUV writing is skipped if omitted") 105 #endif106 #if SYNTAX_OUTPUT107 ("BLSyntaxFile,-ibs", cfg_BLSyntaxFile, string(""), "BL syntax input file name")108 ("BLSourceWidth,-wdt", m_iBLSourceWidth, 0, "BL source picture width")109 ("BLSourceHeight,-hgt", m_iBLSourceHeight, 0, "BL source picture height")110 ("BLFrames,-fr", m_iBLFrames, 0, "BL number of frames")111 100 #endif 112 101 ("SkipFrames,s", m_iSkipFrame, 0, "number of frames to skip before random access") … … 163 152 #else 164 153 m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str()); 165 #endif166 #if AVC_SYNTAX || SYNTAX_OUTPUT167 m_pchBLSyntaxFile = cfg_BLSyntaxFile.empty() ? NULL : strdup(cfg_BLSyntaxFile.c_str());168 154 #endif 169 155 -
branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.h
r713 r820 78 78 Int m_iBLSourceHeight; 79 79 #endif 80 #if AVC_SYNTAX81 Char* m_pchBLSyntaxFile; ///< input BL syntax file name82 80 #endif 83 #endif84 #endif85 86 #if SYNTAX_OUTPUT87 Char* m_pchBLSyntaxFile; ///< input BL syntax file name88 #if !REPN_FORMAT_IN_VPS89 Int m_iBLSourceWidth;90 Int m_iBLSourceHeight;91 #endif92 Int m_iBLFrames;93 81 #endif 94 82 … … 116 104 , m_iBLSourceHeight(0) 117 105 #endif 118 #if SYNTAX_OUTPUT119 , m_iBLSourceWidth(0)120 , m_iBLSourceHeight(0)121 , m_iBLFrames(0)122 #endif123 106 #endif 124 107 , m_respectDefDispWindow(0) -
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
r815 r820 102 102 } 103 103 #endif 104 #if AVC_SYNTAX || SYNTAX_OUTPUT105 if( m_pchBLSyntaxFile )106 {107 free ( m_pchBLSyntaxFile );108 m_pchBLSyntaxFile = NULL;109 }110 #endif111 104 } 112 105 … … 163 156 } 164 157 TComList<TComPic*> *cListPic = m_acTDecTop[0].getListPic(); 165 #if AVC_SYNTAX || !REPN_FORMAT_IN_VPS166 m_acTDecTop[0].setBLsize( m_iBLSourceWidth, m_iBLSourceHeight );167 #endif168 158 m_acTDecTop[0].setBLReconFile( &streamYUV ); 169 159 pcBLPic.setLayerId( 0 ); 170 160 cListPic->pushBack( &pcBLPic ); 171 #if AVC_SYNTAX172 fstream streamSyntaxFile;173 if( m_pchBLSyntaxFile )174 {175 streamSyntaxFile.open( m_pchBLSyntaxFile, fstream::in | fstream::binary );176 }177 m_acTDecTop[0].setBLSyntaxFile( &streamSyntaxFile );178 #endif179 161 #endif 180 162 … … 363 345 streamYUV.close(); 364 346 } 365 #if AVC_SYNTAX366 if( streamSyntaxFile.is_open() )367 {368 streamSyntaxFile.close();369 }370 #endif371 347 pcBLPic.destroy(); 372 348 … … 405 381 Bool openedReconFile = false; // reconstruction file not yet opened. (must be performed after SPS is seen) 406 382 Bool loopFiltered = false; 407 408 #if SYNTAX_OUTPUT409 if( !m_pchBLSyntaxFile )410 {411 printf( "Wrong base layer syntax file\n" );412 exit(EXIT_FAILURE);413 }414 fstream streamSyntaxFile( m_pchBLSyntaxFile, fstream::out | fstream::binary );415 if( !streamSyntaxFile.good() )416 {417 printf( "Base layer syntax input reading error\n" );418 exit(EXIT_FAILURE);419 }420 m_cTDecTop.setBLSyntaxFile( &streamSyntaxFile );421 422 for( Int i = m_iBLFrames * m_iBLSourceWidth * m_iBLSourceHeight * SYNTAX_BYTES / 16; i >= 0; i-- )423 {424 streamSyntaxFile.put( 0 );425 }426 streamSyntaxFile.seekp( 0 );427 #endif428 383 429 384 while (!!bitstreamFile) … … 542 497 } 543 498 } 544 545 #if SYNTAX_OUTPUT546 if( streamSyntaxFile.is_open() )547 {548 streamSyntaxFile.close();549 }550 #endif551 499 552 500 xFlushOutput( pcListPic ); … … 873 821 if ( m_pchReconFile ) 874 822 { 875 #if SYNTAX_OUTPUT876 TComPicYuv* pPicCYuvRec = pcPic->getPicYuvRec();877 #if Q0074_SEI_COLOR_MAPPING878 if( m_acTDecTop[layerIdx].m_ColorMapping->getColorMappingFlag() )879 {880 pPicCYuvRec = m_acTDecTop[layerIdx].m_ColorMapping->getColorMapping( pPicCYuvRec, 0, layerIdx );881 }882 #endif883 823 const Window &conf = pcPic->getConformanceWindow(); 884 824 const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window(); 885 m_cTVideoIOYuvReconFile.write( pPicCYuvRec, 886 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 887 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 888 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 889 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() ); 890 #endif 825 m_cTVideoIOYuvReconFile.write( pcPic->getPicYuvRec(), 826 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 827 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 828 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 829 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() ); 891 830 } 892 831
Note: See TracChangeset for help on using the changeset viewer.