Fix problems with modules

This commit is contained in:
jfmcarreira committed 2015-01-13 22:36:47 +00:00
1 parent d9403404dc
commit bf686359dd
3 files changed
+15 -12

No files matched your search

+4 -4
View File
@@ -28,18 +28,18 @@
namespace plaYUVer namespace plaYUVer
{ {
FilterComponent::FilterComponent() FilterComponentModule::FilterComponentModule()
{ {
m_pcFilteredFrame = NULL; m_pcFilteredFrame = NULL;
} }
Void FilterComponent::createFilter( UInt uiWidth, UInt uiHeight ) Void FilterComponentModule::createFilter( UInt uiWidth, UInt uiHeight )
{ {
m_pcFilteredFrame = NULL; m_pcFilteredFrame = NULL;
m_pcFilteredFrame = new PlaYUVerFrame( uiWidth, uiHeight, PlaYUVerFrame::GRAY ); m_pcFilteredFrame = new PlaYUVerFrame( uiWidth, uiHeight, PlaYUVerFrame::GRAY );
} }
PlaYUVerFrame* FilterComponent::filterComponent( PlaYUVerFrame* InputFrame, Int Component ) PlaYUVerFrame* FilterComponentModule::filterComponent( PlaYUVerFrame* InputFrame, Int Component )
{ {
Pel*** pppOutputPelYUV = m_pcFilteredFrame->getPelBufferYUV(); Pel*** pppOutputPelYUV = m_pcFilteredFrame->getPelBufferYUV();
Pel*** pppInputPelYUV = InputFrame->getPelBufferYUV(); Pel*** pppInputPelYUV = InputFrame->getPelBufferYUV();
@@ -47,7 +47,7 @@ PlaYUVerFrame* FilterComponent::filterComponent( PlaYUVerFrame* InputFrame, Int
return m_pcFilteredFrame; return m_pcFilteredFrame;
} }
Void FilterComponent::destroy() Void FilterComponentModule::destroy()
{ {
if( m_pcFilteredFrame ) if( m_pcFilteredFrame )
delete m_pcFilteredFrame; delete m_pcFilteredFrame;
+10 -7
View File
@@ -30,21 +30,24 @@
namespace plaYUVer namespace plaYUVer
{ {
class FilterComponent class FilterComponentModule: public PlaYUVerModuleIf
{ {
private: private:
PlaYUVerFrame* m_pcFilteredFrame; PlaYUVerFrame* m_pcFilteredFrame;
public: public:
FilterComponent(); FilterComponentModule();
virtual ~FilterComponent() virtual ~FilterComponentModule()
{ {
} }
Void create( PlaYUVerFrame* ) = 0;
PlaYUVerFrame* process( PlaYUVerFrame* ) = 0;
Void destroy();
Void createFilter( UInt uiWidth, UInt uiHeight ); Void createFilter( UInt uiWidth, UInt uiHeight );
PlaYUVerFrame* filterComponent( PlaYUVerFrame* InputFrame, Int Component ); PlaYUVerFrame* filterComponent( PlaYUVerFrame* InputFrame, Int Component );
Void destroy();
}; };
class FilterComponentLuma: public FilterComponent, public PlaYUVerModuleIf class FilterComponentLuma: public FilterComponentModule
{ {
REGISTER_CLASS_FACTORY( FilterComponentLuma ) REGISTER_CLASS_FACTORY( FilterComponentLuma )
public: public:
@@ -56,7 +59,7 @@ public:
PlaYUVerFrame* process( PlaYUVerFrame* InputFrame ); PlaYUVerFrame* process( PlaYUVerFrame* InputFrame );
}; };
class FilterComponentChromaU: public FilterComponent, public PlaYUVerModuleIf class FilterComponentChromaU: public FilterComponentModule
{ {
REGISTER_CLASS_FACTORY( FilterComponentChromaU ) REGISTER_CLASS_FACTORY( FilterComponentChromaU )
public: public:
@@ -68,7 +71,7 @@ public:
PlaYUVerFrame* process( PlaYUVerFrame* InputFrame ); PlaYUVerFrame* process( PlaYUVerFrame* InputFrame );
}; };
class FilterComponentChromaV: public FilterComponent, public PlaYUVerModuleIf class FilterComponentChromaV: public FilterComponentModule
{ {
REGISTER_CLASS_FACTORY( FilterComponentChromaV ) REGISTER_CLASS_FACTORY( FilterComponentChromaV )
public: public:
+1 -1
View File
@@ -100,7 +100,7 @@ public:
virtual Double measure( PlaYUVerFrame*, PlaYUVerFrame* ) { return 0; } virtual Double measure( PlaYUVerFrame*, PlaYUVerFrame* ) { return 0; }
virtual Double measure( PlaYUVerFrame*, PlaYUVerFrame*, PlaYUVerFrame* ) { return 0; } virtual Double measure( PlaYUVerFrame*, PlaYUVerFrame*, PlaYUVerFrame* ) { return 0; }
virtual Void destroy() { } virtual Void destroy() = 0;
}; };