enccfg.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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 : Encoder common configuration parameters
  17. --
  18. ------------------------------------------------------------------------------*/
  19. #ifndef __ENCCFG_H__
  20. #define __ENCCFG_H__
  21. #include "basetype.h"
  22. /* Here is defined the default values for the encoder build-time configuration.
  23. * You can override these settings by defining the values as compiler flags
  24. * in the Makefile.
  25. */
  26. /* The input image's 32-bit swap: 0 or 1
  27. * This defines the 32-bit endianess of the ASIC input YUV
  28. * 1 = 64-bit endianess */
  29. #ifndef ENC8290_INPUT_SWAP_32_YUV
  30. #define ENC8290_INPUT_SWAP_32_YUV 1
  31. #endif
  32. /* The input image's 16-bit swap: 0 or 1
  33. * This defines the 16-bit endianess of the ASIC input YUV
  34. */
  35. #ifndef ENC8290_INPUT_SWAP_16_YUV
  36. #define ENC8290_INPUT_SWAP_16_YUV 1
  37. #endif
  38. /* The input image's 8-bit swap: 0 or 1
  39. * This defines the byte endianess of the ASIC input YUV
  40. */
  41. #ifndef ENC8290_INPUT_SWAP_8_YUV
  42. #define ENC8290_INPUT_SWAP_8_YUV 1
  43. #endif
  44. /* The input image's 32-bit swap: 0 or 1
  45. * This defines the 32-bit endianess of the ASIC input RGB16
  46. * 1 = 64-bit endianess */
  47. #ifndef ENC8290_INPUT_SWAP_32_RGB16
  48. #define ENC8290_INPUT_SWAP_32_RGB16 0
  49. #endif
  50. /* The input image's 16-bit swap: 0 or 1
  51. * This defines the 16-bit endianess of the ASIC input RGB16
  52. */
  53. #ifndef ENC8290_INPUT_SWAP_16_RGB16
  54. #define ENC8290_INPUT_SWAP_16_RGB16 1
  55. #endif
  56. /* The input image's byte swap: 0 or 1
  57. * This defines the byte endianess of the ASIC input RGB16
  58. */
  59. #ifndef ENC8290_INPUT_SWAP_8_RGB16
  60. #define ENC8290_INPUT_SWAP_8_RGB16 0
  61. #endif
  62. /* The input image's 32-bit swap: 0 or 1
  63. * This defines the 32-bit endianess of the ASIC input RGB32
  64. * 1 = 64-bit endianess */
  65. #ifndef ENC8290_INPUT_SWAP_32_RGB32
  66. #define ENC8290_INPUT_SWAP_32_RGB32 0
  67. #endif
  68. /* The input image's 16-bit swap: 0 or 1
  69. * This defines the 16-bit endianess of the ASIC input RGB32
  70. */
  71. #ifndef ENC8290_INPUT_SWAP_16_RGB32
  72. #define ENC8290_INPUT_SWAP_16_RGB32 0
  73. #endif
  74. /* The input image's byte swap: 0 or 1
  75. * This defines the byte endianess of the ASIC input RGB32
  76. */
  77. #ifndef ENC8290_INPUT_SWAP_8_RGB32
  78. #define ENC8290_INPUT_SWAP_8_RGB32 0
  79. #endif
  80. /* ENC8290_OUTPUT_SWAP_XX define the byte endianess of the ASIC output data.
  81. * This MUST be configured to be the same as the native system endianess,
  82. * because the control software relies on system endianess when reading
  83. * the data from the memory. */
  84. /* The output data's 32-bit swap: 0 or 1
  85. * This defines the 32-bit endianess of the ASIC output data
  86. * 1 = 64-bit endianess */
  87. #ifndef ENC8290_OUTPUT_SWAP_32
  88. #define ENC8290_OUTPUT_SWAP_32 1
  89. #endif
  90. /* The output data's 16-bit swap: 0 or 1
  91. * This defines the 16-bit endianess of the ASIC output data.
  92. */
  93. #ifndef ENC8290_OUTPUT_SWAP_16
  94. #define ENC8290_OUTPUT_SWAP_16 1
  95. #endif
  96. /* The output data's 8-bit swap: 0 or 1
  97. * This defines the byte endianess of the ASIC output data.
  98. */
  99. #ifndef ENC8290_OUTPUT_SWAP_8
  100. #define ENC8290_OUTPUT_SWAP_8 1
  101. #endif
  102. /* ASIC interrupt enable.
  103. * This enables/disables the ASIC to generate interrupts
  104. * If this is '1', the EWL must poll the registers to find out
  105. * when the HW is ready.
  106. */
  107. #ifndef ENC8290_IRQ_DISABLE
  108. #define ENC8290_IRQ_DISABLE 0
  109. #endif
  110. /* ASIC bus interface configuration values */
  111. /* DO NOT CHANGE IF NOT FAMILIAR WITH THE CONCEPTS INVOLVED */
  112. /* Burst length. This sets the maximum length of a single ASIC burst in addresses.
  113. * Allowed values are:
  114. * AHB {0, 4, 8, 16} ( 0 means incremental burst type INCR)
  115. * OCP [1,63]
  116. * AXI [1,16]
  117. */
  118. #ifndef ENC8290_BURST_LENGTH
  119. #define ENC8290_BURST_LENGTH 16
  120. #endif
  121. /* SCMD burst mode disable */
  122. /* 0 - enable SCMD burst mode */
  123. /* 1 - disable SCMD burst mode */
  124. #ifndef ENC8290_BURST_SCMD_DISABLE
  125. #define ENC8290_BURST_SCMD_DISABLE 0
  126. #endif
  127. /* INCR type burst mode */
  128. /* 0 - enable INCR type bursts */
  129. /* 1 - disable INCR type and use SINGLE instead */
  130. #ifndef ENC8290_BURST_INCR_TYPE_ENABLED
  131. #define ENC8290_BURST_INCR_TYPE_ENABLED 0
  132. #endif
  133. /* Data discard mode. When enabled read bursts of length 2 or 3 are converted */
  134. /* to BURST4 and useless data is discarded. Otherwise use INCR type for that */
  135. /* kind of read bursts */
  136. /* 0 - disable data discard */
  137. /* 1 - enable data discard */
  138. #ifndef ENC8290_BURST_DATA_DISCARD_ENABLED
  139. #define ENC8290_BURST_DATA_DISCARD_ENABLED 0
  140. #endif
  141. /* AXI bus read and write ID values used by HW. 0 - 255 */
  142. #ifndef ENC8290_AXI_READ_ID
  143. #define ENC8290_AXI_READ_ID 0
  144. #endif
  145. #ifndef ENC8290_AXI_WRITE_ID
  146. #define ENC8290_AXI_WRITE_ID 0
  147. #endif
  148. /* End of "ASIC bus interface configuration values" */
  149. /* ASIC internal clock gating control. 0 - disabled, 1 - enabled */
  150. #ifndef ENC8290_ASIC_CLOCK_GATING_ENABLED
  151. #define ENC8290_ASIC_CLOCK_GATING_ENABLED 1
  152. #endif
  153. /* ASIC timeout interrupt enable/disable */
  154. #ifndef ENC8290_TIMEOUT_INTERRUPT
  155. #define ENC8290_TIMEOUT_INTERRUPT 1
  156. #endif
  157. /* H.264 slice ready interrupt enable/disable. When enabled the HW will raise */
  158. /* interrupt after every completed slice creating several IRQ per frame. */
  159. /* When disabled the HW will raise interrupt only when the frame encoding is */
  160. /* finished. */
  161. #ifndef ENC8290_SLICE_READY_INTERRUPT
  162. #define ENC8290_SLICE_READY_INTERRUPT 1
  163. #endif
  164. #endif