| 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 |
|
| 26 |
|
| 27 |
#ifndef MEDIADRIVER_AGNOSTIC_COMMON_CM_CMSURFACE2DUPRT_H_ |
| 28 |
#define MEDIADRIVER_AGNOSTIC_COMMON_CM_CMSURFACE2DUPRT_H_ |
| 29 |
|
| 30 |
#include "cm_surface_2d_up.h" |
| 31 |
#include "cm_surface.h" |
| 32 |
|
| 33 |
namespace CMRT_UMD |
| 34 |
{ |
| 35 |
class CmSurface2DUPRT: public CmSurface, public CmSurface2DUP |
| 36 |
{ |
| 37 |
public: |
| 38 |
static int32_t Create(uint32_t index, |
| 39 |
uint32_t handle, |
| 40 |
uint32_t width, |
| 41 |
uint32_t height, |
| 42 |
CM_SURFACE_FORMAT format, |
| 43 |
void *sysMem, |
| 44 |
CmSurfaceManager *surfaceManager, |
| 45 |
CmSurface2DUPRT* &surface); |
| 46 |
|
| 47 |
CM_RT_API int32_t GetIndex(SurfaceIndex* &index); |
| 48 |
|
| 49 |
virtual int32_t GetHandle(uint32_t &handle); |
| 50 |
|
| 51 |
|
| 52 |
CM_ENUM_CLASS_TYPE Type() const |
| 53 |
{ return CM_ENUM_CLASS_TYPE_CMSURFACE2DUP; } |
| 54 |
|
| 55 |
int32_t SetMemoryObjectControl(MEMORY_OBJECT_CONTROL memCtrl, |
| 56 |
MEMORY_TYPE memType, |
| 57 |
uint32_t age); |
| 58 |
|
| 59 |
CM_RT_API virtual int32_t GetSurfaceDesc(uint32_t &width, |
| 60 |
uint32_t &height, |
| 61 |
CM_SURFACE_FORMAT &format, |
| 62 |
uint32_t &sizeperpixel); |
| 63 |
|
| 64 |
CM_RT_API int32_t |
| 65 |
SelectMemoryObjectControlSetting(MEMORY_OBJECT_CONTROL memCtrl); |
| 66 |
|
| 67 |
CM_RT_API int32_t SetProperty(CM_FRAME_TYPE frameType); |
| 68 |
|
| 69 |
CMRT_UMD_API int32_t SetResourceUsage(const MOS_HW_RESOURCE_DEF mosUsage); |
| 70 |
|
| 71 |
void Log(std::ostringstream &oss); |
| 72 |
|
| 73 |
void DumpContent(uint32_t kernelNumber, |
| 74 |
char *kernelName, |
| 75 |
int32_t taskId, |
| 76 |
uint32_t argIndex, |
| 77 |
uint32_t vectorIndex); |
| 78 |
|
| 79 |
protected: |
| 80 |
CmSurface2DUPRT(uint32_t handle, |
| 81 |
uint32_t width, |
| 82 |
uint32_t height, |
| 83 |
CM_SURFACE_FORMAT format, |
| 84 |
void *sysMem, |
| 85 |
CmSurfaceManager *surfaceManager); |
| 86 |
|
| 87 |
~CmSurface2DUPRT(); |
| 88 |
|
| 89 |
int32_t Initialize(uint32_t index); |
| 90 |
|
| 91 |
uint32_t m_handle; |
| 92 |
uint32_t m_width; |
| 93 |
uint32_t m_height; |
| 94 |
CM_FRAME_TYPE m_frameType; |
| 95 |
CM_SURFACE_FORMAT m_format; |
| 96 |
void *m_sysMem; |
| 97 |
|
| 98 |
private: |
| 99 |
CmSurface2DUPRT(const CmSurface2DUPRT& other); |
| 100 |
CmSurface2DUPRT& operator=(const CmSurface2DUPRT& other); |
| 101 |
}; |
| 102 |
}; |
| 103 |
|
| 104 |
#endif |