Init the version 2 of module API. The process functions include a std vector and the create function signals if the module can be created with the chosen inputs
This commit is contained in:
@@ -31,6 +31,7 @@ namespace plaYUVer
|
||||
AbsoluteFrameDifference::AbsoluteFrameDifference()
|
||||
{
|
||||
/* Module Definition */
|
||||
m_iModuleAPI = MODULE_API_2;
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE;
|
||||
m_pchModuleCategory = "Measurements";
|
||||
m_pchModuleName = "AbsoluteFrameDifference";
|
||||
@@ -40,13 +41,16 @@ AbsoluteFrameDifference::AbsoluteFrameDifference()
|
||||
m_pcFrameDifference = NULL;
|
||||
}
|
||||
|
||||
Void AbsoluteFrameDifference::create( PlaYUVerFrame* Input )
|
||||
Bool AbsoluteFrameDifference::create( std::vector<PlaYUVerFrame*> apcFrameList )
|
||||
{
|
||||
m_pcFrameDifference = new PlaYUVerFrame( Input->getWidth(), Input->getHeight(), PlaYUVerFrame::GRAY );
|
||||
m_pcFrameDifference = new PlaYUVerFrame( apcFrameList[0]->getWidth(), apcFrameList[0]->getHeight(), PlaYUVerFrame::GRAY );
|
||||
return true;
|
||||
}
|
||||
|
||||
PlaYUVerFrame* AbsoluteFrameDifference::process( PlaYUVerFrame* Input1, PlaYUVerFrame* Input2 )
|
||||
PlaYUVerFrame* AbsoluteFrameDifference::process( std::vector<PlaYUVerFrame*> apcFrameList )
|
||||
{
|
||||
PlaYUVerFrame* Input1 = apcFrameList[0];
|
||||
PlaYUVerFrame* Input2 = apcFrameList[1];
|
||||
Pel* pInput1PelYUV = Input1->getPelBufferYUV()[0][0];
|
||||
Pel* pInput2PelYUV = Input2->getPelBufferYUV()[0][0];
|
||||
Pel* pOutputPelYUV = m_pcFrameDifference->getPelBufferYUV()[0][0];
|
||||
|
||||
Reference in New Issue
Block a user