diff --git a/tools/CalypTools.cpp b/tools/CalypTools.cpp index c1f1162..3fd6111 100644 --- a/tools/CalypTools.cpp +++ b/tools/CalypTools.cpp @@ -120,10 +120,10 @@ int CalypTools::openInputs() } catch( const char* msg ) { - log( CLP_LOG_ERROR, "Cannot open input stream %s with the following error: \n%s\n", inputFileNames[i].c_str(), - msg ); + log( CLP_LOG_ERROR, "Cannot open input stream %s with the following error: \n%s\n", inputFileNames[i].c_str(), msg ); return -1; } + m_uiOutEndianness = uiEndianness; } } @@ -234,7 +234,7 @@ int CalypTools::Open( int argc, char* argv[] ) try { pcOutputStream->open( m_pcOutputFileNames[0], pcInputFrame->getWidth(), pcInputFrame->getHeight(), - pcInputFrame->getPelFormat(), pcInputFrame->getBitsPel(), CLP_LITTLE_ENDIAN, 1, + pcInputFrame->getPelFormat(), pcInputFrame->getBitsPel(), m_uiOutEndianness, 1, false ); log( CLP_LOG_INFO, "Output stream from rate-reduction!\n" ); reportStreamInfo( pcOutputStream ); diff --git a/tools/CalypToolsCmdParser.h b/tools/CalypToolsCmdParser.h index 837ce79..180b3f0 100644 --- a/tools/CalypToolsCmdParser.h +++ b/tools/CalypToolsCmdParser.h @@ -71,6 +71,7 @@ protected: std::vector m_strEndianness; ClpString m_strOutput; long m_iFrames; + unsigned m_uiOutEndianness; int m_iRateReductionFactor; ClpString m_strQualityMetric;