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.
41 lines
853 B
41 lines
853 B
#ifndef PERSIST_H
|
|
#define PERSIST_H
|
|
|
|
#include <QObject>
|
|
#include <QMetaType>
|
|
#include "model/processor/IProcessStrategy.h"
|
|
#include "utils/OpenCLHelper.h"
|
|
|
|
#define PERSIST_MAX_SIZE 8
|
|
|
|
typedef struct Persist_t
|
|
{
|
|
cl_int persist;
|
|
cl_int mode;
|
|
}Persist_t;
|
|
|
|
|
|
class Persist : public IProcessStrategy
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
Q_INVOKABLE Persist(const Context context, const QString kernelPath, const QObject *parent);
|
|
virtual void cpuProcess(ScenGenOutput_t parameters) override;
|
|
virtual void finalize() override;
|
|
|
|
private:
|
|
KernelFunctor<Image2D, Image2D, Image2D, Image2D, Persist_t> _kernelFunctor;
|
|
virtual Image* processKernel(Image *frames, Buffer* scratchPad) override;
|
|
|
|
Persist_t _kernelParameters;
|
|
|
|
QVector<Image*> _queue;
|
|
Image* _imageSum;
|
|
|
|
bool _reCalc;
|
|
quint64 _lastWidth;
|
|
quint64 _lastHeight;
|
|
};
|
|
|
|
|
|
#endif // PERSIST_H
|
|
|