VpcUtils.h
823 Bytes
#include "dvpp_headers.h"
#include "depend_headers.h"
#include "DvppDataMemory.hpp"
#include <mutex>
class VpcUtils{
public:
static VpcUtils* getInstance(){
static VpcUtils* singleton = nullptr;
if (singleton == nullptr){
singleton = new VpcUtils();
}
return singleton;
}
VpcUtils();
~VpcUtils();
int init(int);
DvppDataMemory* convert2bgr(acldvppPicDesc *input, int out_width, int out_height, bool key_frame);
DvppDataMemory* convert2bgr(DvppDataMemory* inMem);
DvppDataMemory* resize(acldvppPicDesc *inputDesc_, int out_width, int out_height);
private:
void release();
private:
aclrtContext context_{nullptr};
aclrtStream stream_{nullptr};
int m_devId;
acldvppChannelDesc *dvppChannelDesc_ {nullptr};
string m_dec_name;
std::mutex m_resize_mtx;
};