You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1013 B
49 lines
1013 B
#ifndef IPROCESSSTRATEGY_H
|
|
#define IPROCESSSTRATEGY_H
|
|
|
|
#include <QObject>
|
|
#include <QMetaType>
|
|
#include "OpenCLHelper.h"
|
|
#include "Utils.h"
|
|
#include "ScenarioParams.h"
|
|
|
|
#ifdef USE_DBL
|
|
typedef double myflt;
|
|
#else
|
|
typedef float myflt;
|
|
#endif
|
|
|
|
using namespace cl;
|
|
|
|
class IProcessStrategy : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
virtual void cpuProcess(ScenGenOutput_t parameters) = 0;
|
|
virtual void finalize() = 0;
|
|
virtual void ReadParams(QString path, ScenGenOutput_t* params) = 0;
|
|
virtual Image* processKernel(Image* inputFrame, Buffer* scratchPad) = 0;
|
|
|
|
protected:
|
|
Kernel _kernel;
|
|
IProcessStrategy(const Context context,
|
|
const QString kernelPath,
|
|
const QString kernelName);
|
|
|
|
Context _CLContext;
|
|
Device getDefaultDevice(const Context& context);
|
|
|
|
|
|
|
|
OpenCLHelper _openCLHelper;
|
|
|
|
signals:
|
|
void sgl_outputReady(Image* frames, Buffer* scratchPad);
|
|
|
|
public slots:
|
|
void slt_process(Image* frames, Buffer* scratchPad);
|
|
|
|
};
|
|
|
|
#endif // IPROCESSSTRATEGY_H
|
|
|