FunctionDataTypeCommon.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. #pragma once
  2. #include "PipelineDataCommon.h"
  3. #include <string>
  4. using namespace std;
  5. enum FUNCTION_DATATYPE
  6. {
  7. FUNCTION_DATATYPE_BASEMEMERY = 0,
  8. FUNCTION_DATATYPE_2D_GRAY_IMG,
  9. FUNCTION_DATATYPE_2D_RGB_IMG,
  10. FUNCTION_DATATYPE_INTLIST = 10000,
  11. FUNCTION_DATATYPE_POINTLIST,
  12. FUNCTION_DATATYPE_FLOATLIST,
  13. FUNCTION_DATATYPE_WCHARSTRING,
  14. FUNCTION_DATATYPE_END,
  15. };
  16. enum PIN_STATUS
  17. {
  18. PIN_STATUS_IN,
  19. PIN_STATUS_OUT,
  20. PIN_STATUS_PARAM,
  21. PIN_STATUS_END,
  22. };
  23. enum MEM_STATUS
  24. {
  25. MEM_NULL = 0,
  26. MEM_MEMORY = 1,
  27. MEM_GPU,
  28. MEM_SHAREMEMORY,
  29. MEM_END,
  30. };
  31. #define PIPELINE_DATATYPE FUNCTION_DATATYPE
  32. #ifndef _PIPELINE_DATASTINFO
  33. #define _PIPELINE_DATASTINFO
  34. typedef struct _MicroDisp
  35. {
  36. wstring strMicroName;
  37. float fMinData;
  38. float fMaxData;
  39. unsigned int nMaxLevel;
  40. _MicroDisp()
  41. {
  42. strMicroName = L"";
  43. fMinData = 0.0f;
  44. fMaxData = 0.0f;
  45. nMaxLevel = 0xffffffff;
  46. }
  47. _MicroDisp& operator= (const _MicroDisp& fh)
  48. {
  49. strMicroName = fh.strMicroName;
  50. fMinData = fh.fMinData;
  51. fMaxData = fh.fMaxData;
  52. nMaxLevel = fh.nMaxLevel;
  53. return *this;
  54. }
  55. }
  56. MICRO_DISP;
  57. //PIPELINE_SKEY_FLOATLIST
  58. typedef struct _MemoryInfo
  59. {
  60. unsigned int nElementSize;
  61. unsigned int nElementCount;
  62. _MemoryInfo()
  63. {
  64. memset(this, 0, sizeof(_MemoryInfo));
  65. }
  66. _MemoryInfo& operator=(const _MemoryInfo& fhd)
  67. {
  68. memcpy(this, &fhd, sizeof(_MemoryInfo));
  69. return *this;
  70. }
  71. _MemoryInfo& operator=(const PIPELINE_MEMORYINFO& fhd)
  72. {
  73. nElementSize = fhd.nElementSize;
  74. nElementCount = fhd.nElementCount;
  75. return *this;
  76. }
  77. void ConvertFrom(const PIPELINE_MEMORYINFO& fhd)
  78. {
  79. nElementSize = fhd.nElementSize;
  80. nElementCount = fhd.nElementCount;
  81. }
  82. }
  83. MEMORYINFO;
  84. typedef struct _FuncIODisp
  85. {
  86. FUNCTION_DATATYPE eIOType;
  87. MEM_STATUS eMemStatus;
  88. _FuncIODisp()
  89. {
  90. eIOType = FUNCTION_DATATYPE_END;
  91. eMemStatus = MEM_MEMORY;
  92. }
  93. _FuncIODisp& operator= (const _FuncIODisp& fh)
  94. {
  95. eIOType = fh.eIOType;
  96. eMemStatus = fh.eMemStatus;
  97. return *this;
  98. }
  99. }
  100. FUNCIO_DISP;
  101. //PIPELINE_SKEY_2D_GRAY
  102. typedef struct _Image2DGrayInfo
  103. {
  104. unsigned int nWidth;
  105. unsigned int nHeight;
  106. unsigned int nBits;
  107. unsigned int nFrameId;
  108. _Image2DGrayInfo()
  109. {
  110. memset(this, 0, sizeof(_Image2DGrayInfo));
  111. }
  112. _Image2DGrayInfo& operator=(const _Image2DGrayInfo& fhd)
  113. {
  114. memcpy(this, &fhd, sizeof(_Image2DGrayInfo));
  115. return *this;
  116. }
  117. _Image2DGrayInfo& operator=(const PIPELINE_2DGRAYIMGINFO& fhd)
  118. {
  119. nWidth = fhd.nWidth;
  120. nHeight = fhd.nHeight;
  121. nBits = fhd.nBits;
  122. nFrameId = fhd.nFrameId;
  123. return *this;
  124. }
  125. void ConvertFrom(const PIPELINE_2DGRAYIMGINFO& fhd)
  126. {
  127. nWidth = fhd.nWidth;
  128. nHeight = fhd.nHeight;
  129. nBits = fhd.nBits;
  130. nFrameId = fhd.nFrameId;
  131. }
  132. }
  133. IMG2DGRAYINFO;
  134. enum RGB_PLANARCONFIGURATION
  135. {
  136. PLANAR_RGBRGB,
  137. PLANAR_BBGGRR,
  138. PLANAR_MEM_END,
  139. };
  140. //FUNCTION_DATATYPE_2D_RGB24_IMG
  141. typedef struct _Image2DRGBInfo
  142. {
  143. unsigned int nWidth;
  144. unsigned int nHeight;
  145. unsigned int nBitsperSample;
  146. unsigned int nSamplesperPixel;
  147. unsigned int nFrameId;
  148. RGB_PLANARCONFIGURATION nPlanarConfiguration;
  149. _Image2DRGBInfo()
  150. {
  151. memset(this, 0, sizeof(_Image2DRGBInfo));
  152. nBitsperSample = 8;
  153. }
  154. _Image2DRGBInfo& operator=(const _Image2DRGBInfo& fhd)
  155. {
  156. memcpy(this, &fhd, sizeof(_Image2DRGBInfo));
  157. return *this;
  158. }
  159. _Image2DRGBInfo& operator=(const PIPELINE_2DRGBIMGINFO& fhd)
  160. {
  161. nWidth = fhd.nWidth;
  162. nHeight = fhd.nHeight;
  163. nBitsperSample = fhd.nBitsperSample;
  164. nSamplesperPixel = fhd.nSamplesperPixel;
  165. nPlanarConfiguration = (RGB_PLANARCONFIGURATION)fhd.nPlanarConfiguration;
  166. nFrameId = fhd.nFrameId;
  167. return *this;
  168. }
  169. void ConvertFrom(const PIPELINE_2DRGBIMGINFO& fhd)
  170. {
  171. nWidth = fhd.nWidth;
  172. nHeight = fhd.nHeight;
  173. nBitsperSample = fhd.nBitsperSample;
  174. nSamplesperPixel = fhd.nSamplesperPixel;
  175. nPlanarConfiguration = (RGB_PLANARCONFIGURATION)fhd.nPlanarConfiguration;
  176. nFrameId = fhd.nFrameId;
  177. }
  178. }
  179. IMG2DRGBINFO;
  180. //PIPELINE_MKEY_LIST
  181. typedef struct _ListInfo
  182. {
  183. unsigned int nCount;
  184. _ListInfo()
  185. {
  186. memset(this, 0, sizeof(_ListInfo));
  187. }
  188. _ListInfo& operator=(const _ListInfo& fhd)
  189. {
  190. memcpy(this, &fhd, sizeof(_ListInfo));
  191. return *this;
  192. }
  193. _ListInfo& operator=(const PIPELINE_FLOATLISTINFO& fhd)
  194. {
  195. nCount = fhd.nCount;
  196. return *this;
  197. }
  198. }
  199. LISTINFO;
  200. #endif