Projektarbeit Line Following Robot bei Prof. Chowanetz im WS22/23
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mmal_encodings.h 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. /*
  2. Copyright (c) 2012, Broadcom Europe Ltd
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions are met:
  6. * Redistributions of source code must retain the above copyright
  7. notice, this list of conditions and the following disclaimer.
  8. * Redistributions in binary form must reproduce the above copyright
  9. notice, this list of conditions and the following disclaimer in the
  10. documentation and/or other materials provided with the distribution.
  11. * Neither the name of the copyright holder nor the
  12. names of its contributors may be used to endorse or promote products
  13. derived from this software without specific prior written permission.
  14. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  15. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  16. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  17. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
  18. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  19. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  20. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  21. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  22. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  23. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24. */
  25. #ifndef MMAL_ENCODINGS_H
  26. #define MMAL_ENCODINGS_H
  27. #include "mmal_common.h"
  28. /** \defgroup MmalEncodings List of pre-defined encodings
  29. * This defines a list of common encodings. This list isn't exhaustive and is only
  30. * provided as a convenience to avoid clients having to use FourCC codes directly.
  31. * However components are allowed to define and use their own FourCC codes. */
  32. /* @{ */
  33. /** \name Pre-defined video encodings */
  34. /* @{ */
  35. #define MMAL_ENCODING_H264 MMAL_FOURCC('H','2','6','4')
  36. #define MMAL_ENCODING_H263 MMAL_FOURCC('H','2','6','3')
  37. #define MMAL_ENCODING_MP4V MMAL_FOURCC('M','P','4','V')
  38. #define MMAL_ENCODING_MP2V MMAL_FOURCC('M','P','2','V')
  39. #define MMAL_ENCODING_MP1V MMAL_FOURCC('M','P','1','V')
  40. #define MMAL_ENCODING_WMV3 MMAL_FOURCC('W','M','V','3')
  41. #define MMAL_ENCODING_WMV2 MMAL_FOURCC('W','M','V','2')
  42. #define MMAL_ENCODING_WMV1 MMAL_FOURCC('W','M','V','1')
  43. #define MMAL_ENCODING_WVC1 MMAL_FOURCC('W','V','C','1')
  44. #define MMAL_ENCODING_VP8 MMAL_FOURCC('V','P','8',' ')
  45. #define MMAL_ENCODING_VP7 MMAL_FOURCC('V','P','7',' ')
  46. #define MMAL_ENCODING_VP6 MMAL_FOURCC('V','P','6',' ')
  47. #define MMAL_ENCODING_THEORA MMAL_FOURCC('T','H','E','O')
  48. #define MMAL_ENCODING_SPARK MMAL_FOURCC('S','P','R','K')
  49. #define MMAL_ENCODING_MJPEG MMAL_FOURCC('M','J','P','G')
  50. #define MMAL_ENCODING_JPEG MMAL_FOURCC('J','P','E','G')
  51. #define MMAL_ENCODING_GIF MMAL_FOURCC('G','I','F',' ')
  52. #define MMAL_ENCODING_PNG MMAL_FOURCC('P','N','G',' ')
  53. #define MMAL_ENCODING_PPM MMAL_FOURCC('P','P','M',' ')
  54. #define MMAL_ENCODING_TGA MMAL_FOURCC('T','G','A',' ')
  55. #define MMAL_ENCODING_BMP MMAL_FOURCC('B','M','P',' ')
  56. #define MMAL_ENCODING_I420 MMAL_FOURCC('I','4','2','0')
  57. #define MMAL_ENCODING_I420_SLICE MMAL_FOURCC('S','4','2','0')
  58. #define MMAL_ENCODING_YV12 MMAL_FOURCC('Y','V','1','2')
  59. #define MMAL_ENCODING_I422 MMAL_FOURCC('I','4','2','2')
  60. #define MMAL_ENCODING_I422_SLICE MMAL_FOURCC('S','4','2','2')
  61. #define MMAL_ENCODING_YUYV MMAL_FOURCC('Y','U','Y','V')
  62. #define MMAL_ENCODING_YVYU MMAL_FOURCC('Y','V','Y','U')
  63. #define MMAL_ENCODING_UYVY MMAL_FOURCC('U','Y','V','Y')
  64. #define MMAL_ENCODING_VYUY MMAL_FOURCC('V','Y','U','Y')
  65. #define MMAL_ENCODING_NV12 MMAL_FOURCC('N','V','1','2')
  66. #define MMAL_ENCODING_NV21 MMAL_FOURCC('N','V','2','1')
  67. #define MMAL_ENCODING_ARGB MMAL_FOURCC('A','R','G','B')
  68. #define MMAL_ENCODING_RGBA MMAL_FOURCC('R','G','B','A')
  69. #define MMAL_ENCODING_ABGR MMAL_FOURCC('A','B','G','R')
  70. #define MMAL_ENCODING_BGRA MMAL_FOURCC('B','G','R','A')
  71. #define MMAL_ENCODING_RGB16 MMAL_FOURCC('R','G','B','2')
  72. #define MMAL_ENCODING_RGB24 MMAL_FOURCC('R','G','B','3')
  73. #define MMAL_ENCODING_RGB32 MMAL_FOURCC('R','G','B','4')
  74. #define MMAL_ENCODING_BGR16 MMAL_FOURCC('B','G','R','2')
  75. #define MMAL_ENCODING_BGR24 MMAL_FOURCC('B','G','R','3')
  76. #define MMAL_ENCODING_BGR32 MMAL_FOURCC('B','G','R','4')
  77. /** SAND Video (YUVUV128) format, native format understood by VideoCore.
  78. * This format is *not* opaque - if requested you will receive full frames
  79. * of YUV_UV video.
  80. */
  81. #define MMAL_ENCODING_YUVUV128 MMAL_FOURCC('S','A','N','D')
  82. /** VideoCore opaque image format, image handles are returned to
  83. * the host but not the actual image data.
  84. */
  85. #define MMAL_ENCODING_OPAQUE MMAL_FOURCC('O','P','Q','V')
  86. /** An EGL image handle
  87. */
  88. #define MMAL_ENCODING_EGL_IMAGE MMAL_FOURCC('E','G','L','I')
  89. /* }@ */
  90. /** \name Pre-defined audio encodings */
  91. /* @{ */
  92. #define MMAL_ENCODING_PCM_UNSIGNED_BE MMAL_FOURCC('P','C','M','U')
  93. #define MMAL_ENCODING_PCM_UNSIGNED_LE MMAL_FOURCC('p','c','m','u')
  94. #define MMAL_ENCODING_PCM_SIGNED_BE MMAL_FOURCC('P','C','M','S')
  95. #define MMAL_ENCODING_PCM_SIGNED_LE MMAL_FOURCC('p','c','m','s')
  96. #define MMAL_ENCODING_PCM_FLOAT_BE MMAL_FOURCC('P','C','M','F')
  97. #define MMAL_ENCODING_PCM_FLOAT_LE MMAL_FOURCC('p','c','m','f')
  98. /* Defines for native endianness */
  99. #ifdef MMAL_IS_BIG_ENDIAN
  100. #define MMAL_ENCODING_PCM_UNSIGNED MMAL_ENCODING_PCM_UNSIGNED_BE
  101. #define MMAL_ENCODING_PCM_SIGNED MMAL_ENCODING_PCM_SIGNED_BE
  102. #define MMAL_ENCODING_PCM_FLOAT MMAL_ENCODING_PCM_FLOAT_BE
  103. #else
  104. #define MMAL_ENCODING_PCM_UNSIGNED MMAL_ENCODING_PCM_UNSIGNED_LE
  105. #define MMAL_ENCODING_PCM_SIGNED MMAL_ENCODING_PCM_SIGNED_LE
  106. #define MMAL_ENCODING_PCM_FLOAT MMAL_ENCODING_PCM_FLOAT_LE
  107. #endif
  108. #define MMAL_ENCODING_MP4A MMAL_FOURCC('M','P','4','A')
  109. #define MMAL_ENCODING_MPGA MMAL_FOURCC('M','P','G','A')
  110. #define MMAL_ENCODING_ALAW MMAL_FOURCC('A','L','A','W')
  111. #define MMAL_ENCODING_MULAW MMAL_FOURCC('U','L','A','W')
  112. #define MMAL_ENCODING_ADPCM_MS MMAL_FOURCC('M','S',0x0,0x2)
  113. #define MMAL_ENCODING_ADPCM_IMA_MS MMAL_FOURCC('M','S',0x0,0x1)
  114. #define MMAL_ENCODING_ADPCM_SWF MMAL_FOURCC('A','S','W','F')
  115. #define MMAL_ENCODING_WMA1 MMAL_FOURCC('W','M','A','1')
  116. #define MMAL_ENCODING_WMA2 MMAL_FOURCC('W','M','A','2')
  117. #define MMAL_ENCODING_WMAP MMAL_FOURCC('W','M','A','P')
  118. #define MMAL_ENCODING_WMAL MMAL_FOURCC('W','M','A','L')
  119. #define MMAL_ENCODING_WMAV MMAL_FOURCC('W','M','A','V')
  120. #define MMAL_ENCODING_AMRNB MMAL_FOURCC('A','M','R','N')
  121. #define MMAL_ENCODING_AMRWB MMAL_FOURCC('A','M','R','W')
  122. #define MMAL_ENCODING_AMRWBP MMAL_FOURCC('A','M','R','P')
  123. #define MMAL_ENCODING_AC3 MMAL_FOURCC('A','C','3',' ')
  124. #define MMAL_ENCODING_EAC3 MMAL_FOURCC('E','A','C','3')
  125. #define MMAL_ENCODING_DTS MMAL_FOURCC('D','T','S',' ')
  126. #define MMAL_ENCODING_MLP MMAL_FOURCC('M','L','P',' ')
  127. #define MMAL_ENCODING_FLAC MMAL_FOURCC('F','L','A','C')
  128. #define MMAL_ENCODING_VORBIS MMAL_FOURCC('V','O','R','B')
  129. #define MMAL_ENCODING_SPEEX MMAL_FOURCC('S','P','X',' ')
  130. #define MMAL_ENCODING_ATRAC3 MMAL_FOURCC('A','T','R','3')
  131. #define MMAL_ENCODING_ATRACX MMAL_FOURCC('A','T','R','X')
  132. #define MMAL_ENCODING_ATRACL MMAL_FOURCC('A','T','R','L')
  133. #define MMAL_ENCODING_MIDI MMAL_FOURCC('M','I','D','I')
  134. #define MMAL_ENCODING_EVRC MMAL_FOURCC('E','V','R','C')
  135. #define MMAL_ENCODING_NELLYMOSER MMAL_FOURCC('N','E','L','Y')
  136. #define MMAL_ENCODING_QCELP MMAL_FOURCC('Q','C','E','L')
  137. #define MMAL_ENCODING_MP4V_DIVX_DRM MMAL_FOURCC('M','4','V','D')
  138. /* @} */
  139. /* @} MmalEncodings List */
  140. /** \defgroup MmalEncodingVariants List of pre-defined encoding variants
  141. * This defines a list of common encoding variants. This list isn't exhaustive and is only
  142. * provided as a convenience to avoid clients having to use FourCC codes directly.
  143. * However components are allowed to define and use their own FourCC codes. */
  144. /* @{ */
  145. /** \name Pre-defined H264 encoding variants */
  146. /* @{ */
  147. /** ISO 14496-10 Annex B byte stream format */
  148. #define MMAL_ENCODING_VARIANT_H264_DEFAULT 0
  149. /** ISO 14496-15 AVC stream format */
  150. #define MMAL_ENCODING_VARIANT_H264_AVC1 MMAL_FOURCC('A','V','C','1')
  151. /** Implicitly delineated NAL units without emulation prevention */
  152. #define MMAL_ENCODING_VARIANT_H264_RAW MMAL_FOURCC('R','A','W',' ')
  153. /* @} */
  154. /** \name Pre-defined MPEG4 audio encoding variants */
  155. /* @{ */
  156. /** Raw stream format */
  157. #define MMAL_ENCODING_VARIANT_MP4A_DEFAULT 0
  158. /** ADTS stream format */
  159. #define MMAL_ENCODING_VARIANT_MP4A_ADTS MMAL_FOURCC('A','D','T','S')
  160. /* @} */
  161. /* @} MmalEncodingVariants List */
  162. /** \defgroup MmalColorSpace List of pre-defined video color spaces
  163. * This defines a list of common color spaces. This list isn't exhaustive and is only
  164. * provided as a convenience to avoid clients having to use FourCC codes directly.
  165. * However components are allowed to define and use their own FourCC codes. */
  166. /* @{ */
  167. /** Unknown color space */
  168. #define MMAL_COLOR_SPACE_UNKNOWN 0
  169. /** ITU-R BT.601-5 [SDTV] */
  170. #define MMAL_COLOR_SPACE_ITUR_BT601 MMAL_FOURCC('Y','6','0','1')
  171. /** ITU-R BT.709-3 [HDTV] */
  172. #define MMAL_COLOR_SPACE_ITUR_BT709 MMAL_FOURCC('Y','7','0','9')
  173. /** JPEG JFIF */
  174. #define MMAL_COLOR_SPACE_JPEG_JFIF MMAL_FOURCC('Y','J','F','I')
  175. /** Title 47 Code of Federal Regulations (2003) 73.682 (a) (20) */
  176. #define MMAL_COLOR_SPACE_FCC MMAL_FOURCC('Y','F','C','C')
  177. /** Society of Motion Picture and Television Engineers 240M (1999) */
  178. #define MMAL_COLOR_SPACE_SMPTE240M MMAL_FOURCC('Y','2','4','0')
  179. /** ITU-R BT.470-2 System M */
  180. #define MMAL_COLOR_SPACE_BT470_2_M MMAL_FOURCC('Y','_','_','M')
  181. /** ITU-R BT.470-2 System BG */
  182. #define MMAL_COLOR_SPACE_BT470_2_BG MMAL_FOURCC('Y','_','B','G')
  183. /** JPEG JFIF, but with 16..255 luma */
  184. #define MMAL_COLOR_SPACE_JFIF_Y16_255 MMAL_FOURCC('Y','Y','1','6')
  185. /* @} MmalColorSpace List */
  186. #endif /* MMAL_ENCODINGS_H */