stf_isp_r2y_rdma.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /**
  2. ******************************************************************************
  3. * @file stf_isp_r2y_rdma.h
  4. * @author StarFive Isp Team
  5. * @version V1.0
  6. * @date 12/14/2019
  7. * @brief
  8. ******************************************************************************
  9. * @copy
  10. *
  11. * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  12. * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  13. * TIME. AS A RESULT, STARFIVE SHALL NOT BE HELD LIABLE FOR ANY
  14. * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  15. * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  16. * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  17. *
  18. * Copyright (C) 2019 - 2022 StarFive Technology Co., Ltd.
  19. */
  20. #ifndef __STF_ISP_R2Y_RDMA_H__
  21. #define __STF_ISP_R2Y_RDMA_H__
  22. #include "registers/stf_isp_rdma.h"
  23. /* add RGB to YUV registers structure */
  24. typedef struct _ST_R2Y_MATRIX {
  25. STF_U16 au16Matrix[3][3];
  26. } ST_R2Y_MATRIX, *PST_R2Y_MATRIX;
  27. typedef struct _ST_R2Y_MATRIX_PARAM {
  28. STF_U8 u8IspIdx;
  29. ST_R2Y_MATRIX stR2yMatrix;
  30. } ST_R2Y_MATRIX_PARAM, *PST_R2Y_MATRIX_PARAM;
  31. typedef struct _ST_R2Y_REG {
  32. REG_ICCONV_0 Matrix[3][3]; // 0x0E40 - 0x0E63, RGB to YUV color space conversion Register.
  33. } ST_R2Y_REG, *PST_R2Y_REG;
  34. #define ST_R2Y_REG_SIZE (sizeof(ST_R2Y_REG))
  35. #define ST_R2Y_REG_LEN (ST_R2Y_REG_SIZE / sizeof(STF_U32))
  36. #pragma pack(push, 8)
  37. typedef struct _ST_R2Y_RDMA {
  38. #if defined(SUPPORT_RDMA_FEATURE)
  39. ST_RDMA_CMD stRdmaStartCmd __attribute__ ((aligned (8)));
  40. #endif //SUPPORT_RDMA_FEATURE
  41. ST_R2Y_REG stR2yReg __attribute__ ((aligned (8)));
  42. #if defined(SUPPORT_RDMA_FEATURE)
  43. ST_RDMA_CMD stRdmaEndCmd __attribute__ ((aligned (8)));
  44. #endif //SUPPORT_RDMA_FEATURE
  45. } ST_R2Y_RDMA, *PST_R2Y_RDMA;
  46. #define ST_R2Y_RDMA_SIZE (sizeof(ST_R2Y_RDMA))
  47. #define ST_R2Y_RDMA_LEN (ST_R2Y_RDMA_SIZE / (sizeof(STF_U32) * 2))
  48. typedef struct _ST_ISP_R2Y_RDMA {
  49. STF_U8 u8IspIdx;
  50. ST_R2Y_RDMA stR2yRdma __attribute__ ((aligned (8)));
  51. } ST_ISP_R2Y_RDMA, *PST_ISP_R2Y_RDMA;
  52. #pragma pack(pop)
  53. ///* RGB to YUV registers interface */
  54. ////-----------------------------------------------------------------------------
  55. //extern
  56. //STF_VOID STFHAL_ISP_R2Y_SetReg(
  57. // STF_U8 u8IspIdx,
  58. // ST_R2Y_RDMA *pstR2yRdma
  59. // );
  60. ////-----------------------------------------------------------------------------
  61. //extern
  62. //STF_VOID STFHAL_ISP_R2Y_SetColorMatrix(
  63. // STF_U8 u8IspIdx,
  64. // STF_U16 au16Matrix[][3]
  65. // );
  66. ////-----------------------------------------------------------------------------
  67. //
  68. //
  69. #endif //__STF_ISP_R2Y_RDMA_H__