vidstabinternal.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 : Standalone stabilization internal stuff
  17. -
  18. ------------------------------------------------------------------------------*/
  19. #ifndef __VIDSTBINTERNAL_H__
  20. #define __VIDSTBINTERNAL_H__
  21. #include "basetype.h"
  22. #include "vidstabcommon.h"
  23. #include "vidstbapi.h"
  24. #include "ewl.h"
  25. /* HW status register bits */
  26. #define ASIC_STATUS_IRQ_INTERVAL 0x100
  27. #define ASIC_STATUS_TEST_IRQ2 0x080
  28. #define ASIC_STATUS_TEST_IRQ1 0x040
  29. #define ASIC_STATUS_BUFF_FULL 0x020
  30. #define ASIC_STATUS_HW_RESET 0x010
  31. #define ASIC_STATUS_ERROR 0x008
  32. #define ASIC_STATUS_FRAME_READY 0x004
  33. #define ASIC_STATUS_ALL (ASIC_STATUS_IRQ_INTERVAL |\
  34. ASIC_STATUS_TEST_IRQ2 |\
  35. ASIC_STATUS_TEST_IRQ1 |\
  36. ASIC_STATUS_BUFF_FULL |\
  37. ASIC_STATUS_HW_RESET |\
  38. ASIC_STATUS_ERROR |\
  39. ASIC_STATUS_FRAME_READY)
  40. #define ASIC_IRQ_LINE 0x001
  41. #define ASIC_STATUS_ENABLE 0x001
  42. #define ASIC_VS_MODE_OFF 0x00
  43. #define ASIC_VS_MODE_ALONE 0x01
  44. #define ASIC_VS_MODE_ENCODER 0x02
  45. #define ASIC_INPUT_YUV420PLANAR 0x00
  46. #define ASIC_INPUT_YUV420SEMIPLANAR 0x01
  47. #define ASIC_INPUT_YUYV422INTERLEAVED 0x02
  48. #define ASIC_INPUT_UYVY422INTERLEAVED 0x03
  49. #define ASIC_INPUT_RGB565 0x04
  50. #define ASIC_INPUT_RGB555 0x05
  51. #define ASIC_INPUT_RGB444 0x06
  52. #define ASIC_INPUT_RGB888 0x07
  53. #define ASIC_INPUT_RGB101010 0x08
  54. typedef struct RegValues_
  55. {
  56. u32 irqDisable;
  57. u32 mbsInCol;
  58. u32 mbsInRow;
  59. u32 pixelsOnRow;
  60. u32 xFill;
  61. u32 yFill;
  62. u32 inputImageFormat;
  63. u32 inputLumBase;
  64. u32 inputLumaBaseOffset;
  65. u32 rwNextLumaBase;
  66. u32 rwStabMode;
  67. u32 rMaskMsb;
  68. u32 gMaskMsb;
  69. u32 bMaskMsb;
  70. u32 colorConversionCoeffA;
  71. u32 colorConversionCoeffB;
  72. u32 colorConversionCoeffC;
  73. u32 colorConversionCoeffE;
  74. u32 colorConversionCoeffF;
  75. HWStabData hwStabData;
  76. u32 asicCfgReg;
  77. #ifdef ASIC_WAVE_TRACE_TRIGGER
  78. u32 vop_count;
  79. #endif
  80. } RegValues;
  81. typedef u32 SwStbMotionType;
  82. typedef struct VideoStb_
  83. {
  84. const void *ewl;
  85. u32 regMirror[64];
  86. const void *checksum;
  87. SwStbData data;
  88. RegValues regval;
  89. u32 stride;
  90. VideoStbInputFormat yuvFormat;
  91. } VideoStb;
  92. void VSSetCropping(VideoStb * pVidStab, u32 currentPictBus, u32 nextPictBus);
  93. void VSInitAsicCtrl(VideoStb * pVidStab);
  94. i32 VSCheckInput(const VideoStbParam * param);
  95. void VSSetupAsicAll(VideoStb * pVidStab);
  96. i32 VSWaitAsicReady(VideoStb * pVidStab);
  97. #endif /* __VIDSTBINTERNAL_H__ */