hv_drv_OsdRotate.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /**
  2. * @file hv_drv_OsdRotate.h
  3. * @brief Osd driver rotation interface.
  4. * @verbatim
  5. * ==============================================================================
  6. * ##### How to use this driver #####
  7. * ==============================================================================
  8. * (+) Use Hv_Drv_OsdSetRotateType(...) to set rotate type.
  9. * (+) Use Hv_Drv_OsdGetRotateType(...) to get rotate type.
  10. * (+) Use Hv_Drv_OsdAppendDrawAreaBox(...) to append draw area box for rotation.
  11. * (+) Use Hv_Drv_OsdRotationWhole(...) to rotate whole DDR buffer.
  12. * (+) Use Hv_Drv_OsdRotationArea(...) to rotate areas in DDR buffer.
  13. *
  14. * @endverbatim
  15. *
  16. * @author HiView SoC Software Team
  17. * @version 0.0.1
  18. * @date 2022-08-22
  19. */
  20. #ifndef _HV_DRV_OSDROTATE_H
  21. #define _HV_DRV_OSDROTATE_H
  22. #include "hv_comm_DataType.h"
  23. #include "hv_drv_OsdTypes.h"
  24. #if (HV_PROJECT_CONFIG_OSD_ROTATION == HV_CONFIG_ON)
  25. /**
  26. * @brief set rotate type
  27. * @param[in] enRotate rotate type
  28. */
  29. VOID Hv_Drv_OsdSetRotateType(OsdRotationType enRotate);
  30. /**
  31. * @brief get rotate type
  32. * @return OsdRotationType rotate type
  33. */
  34. OsdRotationType Hv_Drv_OsdGetRotateType(VOID);
  35. OsdRotationType Hv_Drv_OsdGetRealRotateType(VOID);
  36. /**
  37. * @brief set rotate skip
  38. * @param[in] bSkip HV_TRUE-skip(do not rotate), HV_FALSE-do not skip
  39. */
  40. VOID Hv_Drv_OsdSetRotateSkip(BOOL bSkip);
  41. /**
  42. * @brief get rotate skip
  43. * @return BOOL HV_TRUE-skip(do not rotate), HV_FALSE-do not skip
  44. */
  45. BOOL Hv_Drv_OsdGetRotateSkip(VOID);
  46. /**
  47. * @brief append draw area box for rotation
  48. * @param[in] stBox area box: x, y, width, height
  49. */
  50. VOID Hv_Drv_OsdAppendDrawAreaBox(OsdBox stBox);
  51. /**
  52. * @brief clear draw area box for rotation
  53. */
  54. VOID Hv_Drv_OsdClearDrawAreaBox(VOID);
  55. VOID Hv_Drv_OsdSetRotationPartFlag(UCHAR8 ucSceneId);
  56. VOID Hv_Drv_OsdRecordAbsolutePostion(USHORT16 usX, USHORT16 usY);
  57. VOID Hv_Drv_OsdCancelAbsolutePostion(VOID);
  58. /**
  59. * @brief rotate whole DDR buffer
  60. */
  61. VOID Hv_Drv_OsdRotationWhole(VOID);
  62. /**
  63. * @brief rotate areas in DDR buffer
  64. */
  65. VOID Hv_Drv_OsdRotationArea(UCHAR8 ucSceneId);
  66. #if (HV_PROJECT_CONFIG_OSD_ROTATION_TYPE == OSD_ROTATE_IN_PLACE_ALL)
  67. VOID Hv_Drv_OsdCalculateUnrotateBoxOnScreen(OsdBox *pstBox, UINT32 uiTotalWidth, UINT32 uiTotalHeight, OsdRotationType enRotate);
  68. #else
  69. VOID Hv_Drv_OsdCalculateRotateBoxOnScreen(OsdBox *pstBox, UINT32 uiTotalWidth, UINT32 uiTotalHeight, OsdRotationType enRotate);
  70. #endif
  71. #endif
  72. #endif