Fix warnings to build with Werror flag

This commit is contained in:
2021-09-28 00:38:33 +01:00
parent 4aebcb979c
commit 2c89e47b8a
51 changed files with 338 additions and 407 deletions
+6 -8
View File
@@ -80,26 +80,24 @@ bool FrameResampling::create( std::vector<CalypFrame*> apcFrameList )
{
m_iHeight = apcFrameList[0]->getHeight() * double( m_iWidth ) / double( apcFrameList[0]->getWidth() );
}
m_pcOutputFrame = new CalypFrame( m_iWidth, m_iHeight, apcFrameList[0]->getPelFormat(), apcFrameList[0]->getBitsPel() );
return m_pcOutputFrame;
m_resamplingFrame = std::make_unique<CalypFrame>( m_iWidth, m_iHeight, apcFrameList[0]->getPelFormat(), apcFrameList[0]->getBitsPel() );
return true;
}
CalypFrame* FrameResampling::process( std::vector<CalypFrame*> apcFrameList )
{
m_pcOutputFrame->reset();
m_resamplingFrame->reset();
for( unsigned ch = 0; ch < apcFrameList[0]->getNumberChannels(); ch++ )
{
Mat inputFrame, outputFrame;
cv::Size outSize( m_pcOutputFrame->getWidth( ch ), m_pcOutputFrame->getHeight( ch ) );
cv::Size outSize( m_resamplingFrame->getWidth( ch ), m_resamplingFrame->getHeight( ch ) );
apcFrameList[0]->toMat( inputFrame, true, false, ch );
cv::resize( inputFrame, outputFrame, outSize, 0, 0, m_iInterpolation );
m_pcOutputFrame->fromMat( outputFrame, ch );
m_resamplingFrame->fromMat( outputFrame, ch );
}
return m_pcOutputFrame;
return m_resamplingFrame.get();
}
void FrameResampling::destroy()
{
if( m_pcOutputFrame )
delete m_pcOutputFrame;
}