eznn_api.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. #ifndef _EZNN_API_H_
  2. #define _EZNN_API_H_
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif /* __cplusplus */
  6. #ifndef MAX_CLASSIFICATION_DET_NUM
  7. #define MAX_CLASSIFICATION_DET_NUM 256
  8. #endif
  9. typedef enum EzaxImageFormat_e {
  10. EZAX_YUV420_SP = 0x02,
  11. EZAX_YVU420_SP = 0x04,
  12. EZAX_BGRA = 0x09,
  13. } ezax_img_fmt_e;
  14. typedef struct ezax_imres
  15. {
  16. /* picture resolution */
  17. int w; int h;
  18. }ezax_imres_t;
  19. typedef struct ezax_freq
  20. {
  21. /*dev_id; freq*/
  22. int id; int freq;
  23. }ezax_freq_t;
  24. typedef struct ezax_rt
  25. {
  26. /* left top */
  27. int x0; int y0;
  28. /* right bottom */
  29. int x1; int y1;
  30. /* class */
  31. int c;
  32. /* score */
  33. float s;
  34. /* id */
  35. int id;
  36. /* area */
  37. int area;
  38. /* exit */
  39. int exist;
  40. /* input extern information such as ezax_face_kpts_t */
  41. void *in_ex_inform;
  42. /* output extern information*/
  43. void *out_ex_inform;
  44. /* rsved */
  45. int rev;
  46. }ezax_rt_t;
  47. typedef struct ezax_boxes
  48. {
  49. /* roi boxes */
  50. ezax_rt_t *pRect;
  51. /* rect num */
  52. int num;
  53. /* */
  54. unsigned int nUID;
  55. /* rzv inform */
  56. void *rzv;
  57. }ezax_boxes_t;
  58. typedef struct ezax_img_handle {
  59. /* vir addr*/
  60. void *pVir;
  61. void *pVir_UV;
  62. /* phy addr*/
  63. unsigned int pPhy;
  64. unsigned int pPhy_UV;
  65. /* size */
  66. int sz;
  67. /* fmt */
  68. int fmt;
  69. /* iw */
  70. int w;
  71. /* ih */
  72. int h;
  73. /* channels */
  74. int c;
  75. /* wstride */
  76. int stride;
  77. /* color matrixs */
  78. int csc_mode;
  79. } ezax_img_handle_t;
  80. typedef struct ezax_img
  81. {
  82. /* img_handle */
  83. ezax_img_handle_t img_handle;
  84. /* valid roi */
  85. ezax_rt_t roi;
  86. /* input extern information such as ezax_face_kpts_t*/
  87. unsigned int nUID;
  88. /* reved */
  89. unsigned int rzv;
  90. }ezax_img_t;
  91. typedef struct ezax_img_batch
  92. {
  93. /* batch images */
  94. ezax_img_t *pImg;
  95. /* batch num */
  96. unsigned int nNum;
  97. }ezax_img_batch_t;
  98. typedef struct ezax_img_rois
  99. {
  100. /* img_handle */
  101. ezax_img_handle_t img_handle;
  102. /* valid roi */
  103. ezax_rt_t *roi;
  104. /* roi num */
  105. int roi_num;
  106. /* */
  107. unsigned int nUID;
  108. /* reserved */
  109. unsigned int rzv;
  110. }ezax_img_rois_t;
  111. #ifdef __cplusplus
  112. }
  113. #endif /* __cplusplus */
  114. #endif