Skip to content
Snippets Groups Projects
Commit 4961be95 authored by Vadim Seregin's avatar Vadim Seregin
Browse files

static bitstream

parent 9b93350c
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,10 @@ using namespace std; ...@@ -57,6 +57,10 @@ using namespace std;
// Constructor / destructor / initialization / destroy // Constructor / destructor / initialization / destroy
// ==================================================================================================================== // ====================================================================================================================
#if JVET_N0278_FIXES
fstream EncApp::m_bitstream;
#endif
EncApp::EncApp() EncApp::EncApp()
{ {
m_iFrameRcvd = 0; m_iFrameRcvd = 0;
...@@ -717,10 +721,13 @@ void EncApp::createLib() ...@@ -717,10 +721,13 @@ void EncApp::createLib()
m_ext360 = new TExt360AppEncTop( *this, m_cEncLib.getGOPEncoder()->getExt360Data(), *( m_cEncLib.getGOPEncoder() ), orgPic ); m_ext360 = new TExt360AppEncTop( *this, m_cEncLib.getGOPEncoder()->getExt360Data(), *( m_cEncLib.getGOPEncoder() ), orgPic );
#endif #endif
m_bitstream.open( m_bitstreamFileName.c_str(), fstream::binary | fstream::out ); if( !m_bitstream.is_open() )
if( !m_bitstream )
{ {
EXIT( "Failed to open bitstream file " << m_bitstreamFileName.c_str() << " for writing\n" ); m_bitstream.open( m_bitstreamFileName.c_str(), fstream::binary | fstream::out );
if( !m_bitstream )
{
EXIT( "Failed to open bitstream file " << m_bitstreamFileName.c_str() << " for writing\n" );
}
} }
// initialize internal class & member variables // initialize internal class & member variables
...@@ -746,7 +753,10 @@ void EncApp::destroyLib() ...@@ -746,7 +753,10 @@ void EncApp::destroyLib()
xDestroyLib(); xDestroyLib();
m_bitstream.close(); if( m_bitstream.is_open() )
{
m_bitstream.close();
}
m_orgPic->destroy(); m_orgPic->destroy();
m_trueOrgPic->destroy(); m_trueOrgPic->destroy();
......
...@@ -68,7 +68,11 @@ private: ...@@ -68,7 +68,11 @@ private:
int m_iFrameRcvd; ///< number of received frames int m_iFrameRcvd; ///< number of received frames
uint32_t m_essentialBytes; uint32_t m_essentialBytes;
uint32_t m_totalBytes; uint32_t m_totalBytes;
#if JVET_N0278_FIXES
static fstream m_bitstream;
#else
fstream m_bitstream; fstream m_bitstream;
#endif
#if JVET_O0756_CALCULATE_HDRMETRICS #if JVET_O0756_CALCULATE_HDRMETRICS
std::chrono::duration<long long, ratio<1, 1000000000>> m_metricTime; std::chrono::duration<long long, ratio<1, 1000000000>> m_metricTime;
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment