Fix CalypTools loop with the new module API

This commit is contained in:
2019-02-22 17:31:53 +00:00
parent 1dfbc06d7f
commit b20d5aef49
2 changed files with 6 additions and 7 deletions
+2 -2
View File
@@ -52,7 +52,7 @@ bool ThreeSixtySpatialtoTemporal::flush()
bool ThreeSixtySpatialtoTemporal::needFrame() bool ThreeSixtySpatialtoTemporal::needFrame()
{ {
if( m_iFrameBufferCount == 0 ) if( m_iFrameBufferCount <= 0 )
{ {
return true; return true;
} }
@@ -70,7 +70,7 @@ bool ThreeSixtySpatialtoTemporal::create( std::vector<CalypFrame*> apcFrameList
iHeight = apcFrameList[0]->getHeight() / m_uiFacesY; iHeight = apcFrameList[0]->getHeight() / m_uiFacesY;
m_pcOutputFrame = new CalypFrame( iWidth, iHeight, apcFrameList[0]->getPelFormat(), m_pcOutputFrame = new CalypFrame( iWidth, iHeight, apcFrameList[0]->getPelFormat(),
apcFrameList[0]->getBitsPel() ); apcFrameList[0]->getBitsPel() );
m_pcTmpFrame = new CalypFrame( apcFrameList[0]->getWidth(), apcFrameList[0]->getHeight(), apcFrameList[0]->getPelFormat(), m_pcTmpFrame = new CalypFrame( apcFrameList[0]->getWidth(), apcFrameList[0]->getHeight(), apcFrameList[0]->getPelFormat(),
apcFrameList[0]->getBitsPel() ); apcFrameList[0]->getBitsPel() );
+4 -5
View File
@@ -573,13 +573,9 @@ int CalypTools::ModuleOperation()
apcFrameList.push_back( m_apcInputStreams[i]->getCurrFrame() ); apcFrameList.push_back( m_apcInputStreams[i]->getCurrFrame() );
} }
for( unsigned int frame = 0; frame < m_uiNumberOfFrames; frame++ ) for( unsigned int frame = 0; frame < m_uiNumberOfFrames; )
{ {
bool bReadFrame = true; bool bReadFrame = true;
if( apcFrameList.size() == 0 )
{
break;
}
if( m_pcCurrModuleIf->m_iModuleType == CLP_FRAME_PROCESSING_MODULE ) if( m_pcCurrModuleIf->m_iModuleType == CLP_FRAME_PROCESSING_MODULE )
{ {
if( m_pcCurrModuleIf->m_iModuleAPI >= CLP_MODULE_API_2 ) if( m_pcCurrModuleIf->m_iModuleAPI >= CLP_MODULE_API_2 )
@@ -607,7 +603,10 @@ int CalypTools::ModuleOperation()
bReadFrame = m_pcCurrModuleIf->needFrame(); bReadFrame = m_pcCurrModuleIf->needFrame();
} }
if( bReadFrame ) if( bReadFrame )
{
apcFrameList = readInput(); apcFrameList = readInput();
frame++;
}
} }
if( m_pcCurrModuleIf->m_iModuleAPI >= CLP_MODULE_API_3 ) if( m_pcCurrModuleIf->m_iModuleAPI >= CLP_MODULE_API_3 )