vidstbapi.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /*------------------------------------------------------------------------------
  2. -- --
  3. -- This software is confidential and proprietary and may be used --
  4. -- only as expressly authorized by a licensing agreement from --
  5. -- --
  6. -- Hantro Products Oy. --
  7. -- --
  8. -- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
  9. -- ALL RIGHTS RESERVED --
  10. -- --
  11. -- The entire notice above must be reproduced --
  12. -- on all copies and should not be removed. --
  13. -- --
  14. --------------------------------------------------------------------------------
  15. -
  16. - Description : Video Stabilization Standalone API
  17. -
  18. ------------------------------------------------------------------------------*/
  19. #ifndef __VIDSTBAPI_H__
  20. #define __VIDSTBAPI_H__
  21. #ifdef __cplusplus
  22. extern "C"
  23. {
  24. #endif
  25. #include "basetype.h"
  26. /* Function return values */
  27. typedef enum VideoStbRet_
  28. {
  29. VIDEOSTB_OK = 0,
  30. VIDEOSTB_ERROR = -1,
  31. VIDEOSTB_NULL_ARGUMENT = -2,
  32. VIDEOSTB_INVALID_ARGUMENT = -3,
  33. VIDEOSTB_MEMORY_ERROR = -4,
  34. VIDEOSTB_EWL_ERROR = -5,
  35. VIDEOSTB_EWL_MEMORY_ERROR = -6,
  36. VIDEOSTB_HW_BUS_ERROR = -9,
  37. VIDEOSTB_HW_TIMEOUT = -11,
  38. VIDEOSTB_HW_RESERVED = -12,
  39. VIDEOSTB_SYSTEM_ERROR = -13,
  40. VIDEOSTB_INSTANCE_ERROR = -14,
  41. VIDEOSTB_HW_RESET = -16
  42. } VideoStbRet;
  43. /* YUV type for initialization */
  44. typedef enum VideoStbInputFormat_
  45. {
  46. VIDEOSTB_YUV420_PLANAR = 0, /* YYYY... UUUU... VVVV */
  47. VIDEOSTB_YUV420_SEMIPLANAR = 1, /* YYYY... UVUVUV... */
  48. VIDEOSTB_YUV422_INTERLEAVED_YUYV = 2, /* YUYVYUYV... */
  49. VIDEOSTB_YUV422_INTERLEAVED_UYVY = 3, /* UYVYUYVY... */
  50. VIDEOSTB_RGB565 = 4, /* 16-bit RGB */
  51. VIDEOSTB_BGR565 = 5, /* 16-bit RGB */
  52. VIDEOSTB_RGB555 = 6, /* 15-bit RGB */
  53. VIDEOSTB_BGR555 = 7, /* 15-bit RGB */
  54. VIDEOSTB_RGB444 = 8, /* 12-bit RGB */
  55. VIDEOSTB_BGR444 = 9, /* 12-bit RGB */
  56. VIDEOSTB_RGB888 = 10, /* 24-bit RGB */
  57. VIDEOSTB_BGR888 = 11, /* 24-bit RGB */
  58. VIDEOSTB_RGB101010 = 12, /* 30-bit RGB */
  59. VIDEOSTB_BGR101010 = 13 /* 30-bit RGB */
  60. } VideoStbInputFormat;
  61. typedef const void *VideoStbInst;
  62. typedef struct VideoStbParam_
  63. {
  64. u32 inputWidth;
  65. u32 inputHeight;
  66. u32 stride;
  67. u32 stabilizedWidth;
  68. u32 stabilizedHeight;
  69. VideoStbInputFormat format;
  70. } VideoStbParam;
  71. typedef struct VideoStbResult_
  72. {
  73. u32 stabOffsetX;
  74. u32 stabOffsetY;
  75. } VideoStbResult;
  76. /* Version information */
  77. typedef struct
  78. {
  79. u32 major; /* API major version */
  80. u32 minor; /* API minor version */
  81. } VideoStbApiVersion;
  82. typedef struct
  83. {
  84. u32 swBuild; /* Software build ID */
  85. u32 hwBuild; /* Hardware build ID */
  86. } VideoStbBuild;
  87. /*------------------------------------------------------------------------------
  88. API prototypes
  89. ------------------------------------------------------------------------------*/
  90. /* Version information */
  91. VideoStbApiVersion VideoStbGetApiVersion(void);
  92. VideoStbBuild VideoStbGetBuild(void);
  93. /* Initialization & release */
  94. VideoStbRet VideoStbInit(VideoStbInst * instAddr,
  95. const VideoStbParam * param);
  96. VideoStbRet VideoStbReset(VideoStbInst vidStab,
  97. const VideoStbParam * param);
  98. VideoStbRet VideoStbRelease(VideoStbInst vidStab);
  99. /* Stabilize next image based on the current one */
  100. VideoStbRet VideoStbStabilize(VideoStbInst vidStab, VideoStbResult * result,
  101. u32 referenceFrameLum, u32 stabilizedFameLum);
  102. /* API tracing callback function */
  103. void VideoStb_Trace(const char *str);
  104. #ifdef __cplusplus
  105. }
  106. #endif
  107. #endif /* __VIDSTBAPI_H__ */