Add a variable to control the number of bits per pixel

This commit is contained in:
jfmcarreira committed 2015-04-02 17:34:43 +01:00
1 parent 32c224a49d
commit d8952ce953
11 files changed
+84 -52

No files matched your search

+7 -7
View File
@@ -79,7 +79,7 @@ Int PlaYUVerTools::openInputs()
pcStream = new PlaYUVerStream;
try
{
if( !pcStream->open( inputFileNames[i], resolutionString, fmtString, 1 ) )
if( !pcStream->open( inputFileNames[i], resolutionString, fmtString, 8, 1 ) )
{
m_cCmdLineHandler.log( CommandLineHandle::ERROR, "Cannot open input stream %s! ", inputFileNames[i].c_str() );
return 2;
@@ -132,11 +132,11 @@ Int PlaYUVerTools::Open( Int argc, Char *argv[] )
if( m_cCmdLineHandler.Opts()["quality"]->count() )
{
std::string qualityMetric = m_cCmdLineHandler.m_strQualityMetric;
if( m_apcInputStreams.size() != 2 )
{
m_cCmdLineHandler.log( CommandLineHandle::ERROR, "Invalid number of inputs! " );
return 2;
}
// if( m_apcInputStreams.size() != 2 )
// {
// m_cCmdLineHandler.log( CommandLineHandle::ERROR, "Invalid number of inputs! " );
// return 2;
// }
for( UInt i = 0; i < PlaYUVerFrame::supportedQualityMetricsList().size(); i++ )
{
if( lowercase( PlaYUVerFrame::supportedQualityMetricsList()[i] ) == lowercase( qualityMetric ) )
@@ -193,7 +193,7 @@ Int PlaYUVerTools::Open( Int argc, Char *argv[] )
{
PlaYUVerFrame* pcModFrame = applyFrameModule();
PlaYUVerStream* pcModStream = new PlaYUVerStream;
if( !pcModStream->open( outputFileNames[0], pcModFrame->getWidth(), pcModFrame->getHeight(), pcModFrame->getPelFormat(), 1, false ) )
if( !pcModStream->open( outputFileNames[0], pcModFrame->getWidth(), pcModFrame->getHeight(), pcModFrame->getPelFormat(), 8, 1, false ) )
{
delete pcModStream;
pcModStream = NULL;