Fix bits per pixel in calypTools
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <climits>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
|
||||
#include "lib/CalypFrame.h"
|
||||
#include "lib/CalypModuleIf.h"
|
||||
@@ -69,7 +70,7 @@ int CalypTools::openInputs()
|
||||
|
||||
ClpString resolutionString( "" );
|
||||
ClpString fmtString( "yuv420p" );
|
||||
unsigned int uiBitPerPixel = 8;
|
||||
unsigned int uiBitsPerPixel = 8;
|
||||
unsigned int uiEndianness = 0;
|
||||
|
||||
CalypStream* pcStream;
|
||||
@@ -85,7 +86,7 @@ int CalypTools::openInputs()
|
||||
}
|
||||
if( Opts().hasOpt( "bits_pel" ) )
|
||||
{
|
||||
uiBitPerPixel = GET_PARAM( m_uiBitsPerPixel, i );
|
||||
uiBitsPerPixel = std::stoi( GET_PARAM( m_strBitsPerPixel, i ).c_str() );
|
||||
}
|
||||
if( Opts().hasOpt( "endianness" ) )
|
||||
{
|
||||
@@ -93,7 +94,7 @@ int CalypTools::openInputs()
|
||||
{
|
||||
uiEndianness = 0;
|
||||
}
|
||||
if( GET_PARAM( m_strEndianness, i ) == "little" )
|
||||
else if( GET_PARAM( m_strEndianness, i ) == "little" )
|
||||
{
|
||||
uiEndianness = 1;
|
||||
}
|
||||
@@ -101,7 +102,7 @@ int CalypTools::openInputs()
|
||||
pcStream = new CalypStream;
|
||||
try
|
||||
{
|
||||
if( !pcStream->open( inputFileNames[i], resolutionString, fmtString, uiBitPerPixel, uiEndianness, 1, true ) )
|
||||
if( !pcStream->open( inputFileNames[i], resolutionString, fmtString, uiBitsPerPixel, uiEndianness, 1, true ) )
|
||||
{
|
||||
log( CLP_LOG_ERROR, "Cannot open input stream %s! ", inputFileNames[i].c_str() );
|
||||
return -1;
|
||||
|
||||
@@ -64,7 +64,7 @@ int CalypToolsCmdParser::parseToolsArgs( int argc, char* argv[] )
|
||||
( "output,o", m_strOutput, "output file" ) /**/
|
||||
( "size,s", m_strResolution, "size (WxH)" ) /**/
|
||||
( "pel_fmt,p", m_strPelFmt, "pixel format" ) /**/
|
||||
( "bits_pel", m_uiBitsPerPixel, "bits per pixel" ) /**/
|
||||
( "bits_pel", m_strBitsPerPixel, "bits per pixel" ) /**/
|
||||
( "endianness", m_strEndianness, "File endianness (big, little)" ) /**/
|
||||
( "frames,f", m_iFrames, "number of frames to parse" ) /**/
|
||||
( "quality", m_strQualityMetric, "select a quality metric" ) /**/
|
||||
|
||||
@@ -67,7 +67,7 @@ protected:
|
||||
std::vector<ClpString> m_apcInputs;
|
||||
std::vector<ClpString> m_strResolution;
|
||||
std::vector<ClpString> m_strPelFmt;
|
||||
std::vector<unsigned int> m_uiBitsPerPixel;
|
||||
std::vector<ClpString> m_strBitsPerPixel;
|
||||
std::vector<ClpString> m_strEndianness;
|
||||
ClpString m_strOutput;
|
||||
long m_iFrames;
|
||||
|
||||
Reference in New Issue
Block a user