hi_avs_position_query.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /******************************************************************************
  2. Copyright (C), 2017-2018, Hisilicon Tech. Co., Ltd.
  3. ******************************************************************************
  4. File Name : hi_avs_position_query.h
  5. Version : Version 1.0
  6. Created : 2018/1/24
  7. Last Modified :
  8. Description : API for avs position query library.
  9. Function List :
  10. History :
  11. 1.Date : 2018/05/09
  12. Modification : First time to delivery
  13. ******************************************************************************/
  14. #ifndef __HI_AVS_POSITION_QUERY_H__
  15. #define __HI_AVS_POSITION_QUERY_H__
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. #include "hi_comm_avs.h"
  20. #define AVS_MAX_INPUT_NUMBER 6
  21. /**Specification of the LUT accuracy*/
  22. typedef enum hiAVS_QUERY_MODE_E
  23. {
  24. AVS_DST_QUERY_SRC = 0,
  25. AVS_SRC_QUERY_DST = 1, /* Not support */
  26. AVS_QUERY_MODE_BUTT
  27. }AVS_QUERY_MODE_E;
  28. typedef struct hiAVS_CONFIG_S
  29. {
  30. AVS_QUERY_MODE_E enMeshMode; /* mesh generating mode. */
  31. HI_U32 u32Camera; /* camera number*/
  32. SIZE_S stSrcSize; /* Range: Hi3559AV100ES = [256, 8192] | Hi3559AV100 = [256, 8192] | Hi3556AV100 = [256, 8192]; Size of source image. */
  33. SIZE_S stDstSize; /* Range: Hi3559AV100ES = [256, 16384] | Hi3559AV100 = [256, 16384] | Hi3556AV100 = [256, 8192]; Size of target image. */
  34. AVS_PROJECTION_MODE_E enPrjMode; /* Projection mode. */
  35. POINT_S stCenter; /* Range: [-8192,8192]: Center point. */
  36. AVS_FOV_S stFOV; /* Output FOV. */
  37. AVS_ROTATION_S stORIRotation; /* Output original rotation. */
  38. AVS_ROTATION_S stRotation; /* Output rotation. */
  39. HI_U32 u32MeshWinSize; /* Range:[2,256], the window size of mesh data. */
  40. AVS_LUT_ACCURACY_E enLutAccuracy; /* Accuracy of lut file. */
  41. HI_U64 u64LutVirAddr[AVS_MAX_INPUT_NUMBER]; /* the virtual address of lut data. */
  42. }AVS_CONFIG_S;
  43. /**
  44. Generates the lookup table about the position between output image and source image.
  45. pstAvsConfig: output image config
  46. pstPosMeshCfg: position mesh config
  47. **/
  48. HI_S32 HI_AVS_PosMeshGenerate(AVS_CONFIG_S *pstAvsConfig, HI_U64 u64MeshVirAddr[AVS_MAX_INPUT_NUMBER]);
  49. /**
  50. Query the position in source image space from the output image space
  51. pstDstSize : the resolution of destination image;
  52. u32WindowSize : the windows size of position mesh data, should be same as generating the position mesh.
  53. u64MeshVirAddr: the virtual address of position mesh data, the memory size should be same as the mesh file.
  54. pstDstPointIn : the input position in destination image space.
  55. pstSrcPointOut: the output position in source image space.
  56. **/
  57. HI_S32 HI_AVS_PosQueryDst2Src(SIZE_S *pstDstSize, HI_U32 u32WindowSize,HI_U64 u64MeshVirAddr,
  58. POINT_S *pstDstPointIn, POINT_S *pstSrcPointOut);
  59. #ifdef __cplusplus
  60. }
  61. #endif
  62. #endif /*hi_avs_position_query.h*/