Blame view

src/dvpp/DvppRgbMemory.hpp 647 Bytes
63e6f7bc   Hu Chunming   完成dvpp。但是nv和gb281...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  #include<string>
  
  #include "dvpp_headers.h"
  
  using namespace std;
  
  class DvppRgbMemory : public DeviceRgbMemory
  {
  public:
       DvppRgbMemory(int _channel, int _width, int _height, int _size, string _id, string _dev_id, bool _key_frame)
       :DeviceRgbMemory(_channel, _width, _height, _id, _dev_id, _key_frame, false){
          data_size = _size;
          int ret = acldvppMalloc((void **)&pHwRgb, data_size);
          if(ret != ACL_ERROR_NONE){
              cout << "acldvppMalloc failed" << endl;
          }
      }
  
      ~DvppRgbMemory(){
          if (pHwRgb) {
              acldvppFree((uint8_t*)pHwRgb);
              pHwRgb = nullptr;
          }
      }
  };