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_parameters_video.h 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486
  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_PARAMETERS_VIDEO_H
  26. #define MMAL_PARAMETERS_VIDEO_H
  27. #include "mmal_parameters_common.h"
  28. /*************************************************
  29. * ALWAYS ADD NEW ENUMS AT THE END OF THIS LIST! *
  30. ************************************************/
  31. /** Video-specific MMAL parameter IDs.
  32. * @ingroup MMAL_PARAMETER_IDS
  33. */
  34. enum {
  35. MMAL_PARAMETER_DISPLAYREGION /**< Takes a @ref MMAL_DISPLAYREGION_T */
  36. = MMAL_PARAMETER_GROUP_VIDEO,
  37. MMAL_PARAMETER_SUPPORTED_PROFILES, /**< Takes a @ref MMAL_PARAMETER_VIDEO_PROFILE_T */
  38. MMAL_PARAMETER_PROFILE, /**< Takes a @ref MMAL_PARAMETER_VIDEO_PROFILE_T */
  39. MMAL_PARAMETER_INTRAPERIOD, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */
  40. MMAL_PARAMETER_RATECONTROL, /**< Takes a @ref MMAL_PARAMETER_VIDEO_RATECONTROL_T */
  41. MMAL_PARAMETER_NALUNITFORMAT, /**< Takes a @ref MMAL_PARAMETER_VIDEO_NALUNITFORMAT_T */
  42. MMAL_PARAMETER_MINIMISE_FRAGMENTATION, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
  43. MMAL_PARAMETER_MB_ROWS_PER_SLICE, /**< Takes a @ref MMAL_PARAMETER_UINT32_T.
  44. * Setting the value to zero resets to the default (one slice per frame). */
  45. MMAL_PARAMETER_VIDEO_LEVEL_EXTENSION, /**< Takes a @ref MMAL_PARAMETER_VIDEO_LEVEL_EXTENSION_T */
  46. MMAL_PARAMETER_VIDEO_EEDE_ENABLE, /**< Takes a @ref MMAL_PARAMETER_VIDEO_EEDE_ENABLE_T */
  47. MMAL_PARAMETER_VIDEO_EEDE_LOSSRATE, /**< Takes a @ref MMAL_PARAMETER_VIDEO_EEDE_LOSSRATE_T */
  48. MMAL_PARAMETER_VIDEO_REQUEST_I_FRAME, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T.
  49. * Request an I-frame. */
  50. MMAL_PARAMETER_VIDEO_INTRA_REFRESH, /**< Takes a @ref MMAL_PARAMETER_VIDEO_INTRA_REFRESH_T */
  51. MMAL_PARAMETER_VIDEO_IMMUTABLE_INPUT, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T. */
  52. MMAL_PARAMETER_VIDEO_BIT_RATE, /**< Takes a @ref MMAL_PARAMETER_UINT32_T.
  53. * Run-time bit rate control */
  54. MMAL_PARAMETER_VIDEO_FRAME_RATE, /**< Takes a @ref MMAL_PARAMETER_FRAME_RATE_T */
  55. MMAL_PARAMETER_VIDEO_ENCODE_MIN_QUANT, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. */
  56. MMAL_PARAMETER_VIDEO_ENCODE_MAX_QUANT, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. */
  57. MMAL_PARAMETER_VIDEO_ENCODE_RC_MODEL, /**< Takes a @ref MMAL_PARAMETER_VIDEO_ENCODE_RC_MODEL_T. */
  58. MMAL_PARAMETER_EXTRA_BUFFERS, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. */
  59. MMAL_PARAMETER_VIDEO_ALIGN_HORIZ, /**< Takes a @ref MMAL_PARAMETER_UINT32_T.
  60. Changing this paramater from the default can reduce frame rate
  61. because image buffers need to be re-pitched.*/
  62. MMAL_PARAMETER_VIDEO_ALIGN_VERT, /**< Takes a @ref MMAL_PARAMETER_UINT32_T.
  63. Changing this paramater from the default can reduce frame rate
  64. because image buffers need to be re-pitched.*/
  65. MMAL_PARAMETER_VIDEO_DROPPABLE_PFRAMES, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */
  66. MMAL_PARAMETER_VIDEO_ENCODE_INITIAL_QUANT, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. */
  67. MMAL_PARAMETER_VIDEO_ENCODE_QP_P, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. */
  68. MMAL_PARAMETER_VIDEO_ENCODE_RC_SLICE_DQUANT, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. */
  69. MMAL_PARAMETER_VIDEO_ENCODE_FRAME_LIMIT_BITS, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */
  70. MMAL_PARAMETER_VIDEO_ENCODE_PEAK_RATE, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. */
  71. /*H264 specific parameters*/
  72. MMAL_PARAMETER_VIDEO_ENCODE_H264_DISABLE_CABAC, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */
  73. MMAL_PARAMETER_VIDEO_ENCODE_H264_LOW_LATENCY, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */
  74. MMAL_PARAMETER_VIDEO_ENCODE_H264_AU_DELIMITERS, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */
  75. MMAL_PARAMETER_VIDEO_ENCODE_H264_DEBLOCK_IDC, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. */
  76. MMAL_PARAMETER_VIDEO_ENCODE_H264_MB_INTRA_MODE, /**< Takes a @ref MMAL_PARAMETER_VIDEO_ENCODER_H264_MB_INTRA_MODES_T. */
  77. MMAL_PARAMETER_VIDEO_ENCODE_HEADER_ON_OPEN, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
  78. MMAL_PARAMETER_VIDEO_ENCODE_PRECODE_FOR_QP, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
  79. MMAL_PARAMETER_VIDEO_DRM_INIT_INFO, /**< Takes a @ref MMAL_PARAMETER_VIDEO_DRM_INIT_INFO_T. */
  80. MMAL_PARAMETER_VIDEO_TIMESTAMP_FIFO, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
  81. MMAL_PARAMETER_VIDEO_DECODE_ERROR_CONCEALMENT, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
  82. MMAL_PARAMETER_VIDEO_DRM_PROTECT_BUFFER, /**< Takes a @ref MMAL_PARAMETER_VIDEO_DRM_PROTECT_BUFFER_T. */
  83. MMAL_PARAMETER_VIDEO_DECODE_CONFIG_VD3, /**< Takes a @ref MMAL_PARAMETER_BYTES_T */
  84. MMAL_PARAMETER_VIDEO_ENCODE_H264_VCL_HRD_PARAMETERS, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */
  85. MMAL_PARAMETER_VIDEO_ENCODE_H264_LOW_DELAY_HRD_FLAG, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */
  86. MMAL_PARAMETER_VIDEO_ENCODE_INLINE_HEADER, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */
  87. MMAL_PARAMETER_VIDEO_ENCODE_SEI_ENABLE, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */
  88. MMAL_PARAMETER_VIDEO_ENCODE_INLINE_VECTORS, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */
  89. MMAL_PARAMETER_VIDEO_RENDER_STATS, /**< Take a @ref MMAL_PARAMETER_VIDEO_RENDER_STATS_T. */
  90. MMAL_PARAMETER_VIDEO_INTERLACE_TYPE, /**< Take a @ref MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T. */
  91. };
  92. /** Display transformations.
  93. * Although an enumeration, the values correspond to combinations of:
  94. * \li 1 Reflect in a vertical axis
  95. * \li 2 180 degree rotation
  96. * \li 4 Reflect in the leading diagonal
  97. */
  98. typedef enum MMAL_DISPLAYTRANSFORM_T {
  99. MMAL_DISPLAY_ROT0 = 0,
  100. MMAL_DISPLAY_MIRROR_ROT0 = 1,
  101. MMAL_DISPLAY_MIRROR_ROT180 = 2,
  102. MMAL_DISPLAY_ROT180 = 3,
  103. MMAL_DISPLAY_MIRROR_ROT90 = 4,
  104. MMAL_DISPLAY_ROT270 = 5,
  105. MMAL_DISPLAY_ROT90 = 6,
  106. MMAL_DISPLAY_MIRROR_ROT270 = 7,
  107. MMAL_DISPLAY_DUMMY = 0x7FFFFFFF
  108. } MMAL_DISPLAYTRANSFORM_T;
  109. /** Display modes. */
  110. typedef enum MMAL_DISPLAYMODE_T {
  111. MMAL_DISPLAY_MODE_FILL = 0,
  112. MMAL_DISPLAY_MODE_LETTERBOX = 1,
  113. // these allow a left eye source->dest to be specified and the right eye mapping will be inferred by symmetry
  114. MMAL_DISPLAY_MODE_STEREO_LEFT_TO_LEFT = 2,
  115. MMAL_DISPLAY_MODE_STEREO_TOP_TO_TOP = 3,
  116. MMAL_DISPLAY_MODE_STEREO_LEFT_TO_TOP = 4,
  117. MMAL_DISPLAY_MODE_STEREO_TOP_TO_LEFT = 5,
  118. MMAL_DISPLAY_MODE_DUMMY = 0x7FFFFFFF
  119. } MMAL_DISPLAYMODE_T;
  120. /** Values used to indicate which fields are used when setting the
  121. * display configuration */
  122. typedef enum MMAL_DISPLAYSET_T {
  123. MMAL_DISPLAY_SET_NONE = 0,
  124. MMAL_DISPLAY_SET_NUM = 1,
  125. MMAL_DISPLAY_SET_FULLSCREEN = 2,
  126. MMAL_DISPLAY_SET_TRANSFORM = 4,
  127. MMAL_DISPLAY_SET_DEST_RECT = 8,
  128. MMAL_DISPLAY_SET_SRC_RECT = 0x10,
  129. MMAL_DISPLAY_SET_MODE = 0x20,
  130. MMAL_DISPLAY_SET_PIXEL = 0x40,
  131. MMAL_DISPLAY_SET_NOASPECT = 0x80,
  132. MMAL_DISPLAY_SET_LAYER = 0x100,
  133. MMAL_DISPLAY_SET_COPYPROTECT = 0x200,
  134. MMAL_DISPLAY_SET_ALPHA = 0x400,
  135. MMAL_DISPLAY_SET_DUMMY = 0x7FFFFFFF
  136. } MMAL_DISPLAYSET_T;
  137. /**
  138. This config sets the output display device, as well as the region used
  139. on the output display, any display transformation, and some flags to
  140. indicate how to scale the image.
  141. */
  142. typedef struct MMAL_DISPLAYREGION_T {
  143. MMAL_PARAMETER_HEADER_T hdr;
  144. /** Bitfield that indicates which fields are set and should be used. All
  145. * other fields will maintain their current value.
  146. * \ref MMAL_DISPLAYSET_T defines the bits that can be combined.
  147. */
  148. uint32_t set;
  149. /** Describes the display output device, with 0 typically being a directly
  150. * connected LCD display. The actual values will depend on the hardware.
  151. * Code using hard-wired numbers (e.g. 2) is certain to fail.
  152. */
  153. uint32_t display_num;
  154. /** Indicates that we are using the full device screen area, rather than
  155. * a window of the display. If zero, then dest_rect is used to specify a
  156. * region of the display to use.
  157. */
  158. MMAL_BOOL_T fullscreen;
  159. /** Indicates any rotation or flipping used to map frames onto the natural
  160. * display orientation.
  161. */
  162. MMAL_DISPLAYTRANSFORM_T transform;
  163. /** Where to display the frame within the screen, if fullscreen is zero.
  164. */
  165. MMAL_RECT_T dest_rect;
  166. /** Indicates which area of the frame to display. If all values are zero,
  167. * the whole frame will be used.
  168. */
  169. MMAL_RECT_T src_rect;
  170. /** If set to non-zero, indicates that any display scaling should disregard
  171. * the aspect ratio of the frame region being displayed.
  172. */
  173. MMAL_BOOL_T noaspect;
  174. /** Indicates how the image should be scaled to fit the display. \code
  175. * MMAL_DISPLAY_MODE_FILL \endcode indicates that the image should fill the
  176. * screen by potentially cropping the frames. Setting \code mode \endcode
  177. * to \code MMAL_DISPLAY_MODE_LETTERBOX \endcode indicates that all the source
  178. * region should be displayed and black bars added if necessary.
  179. */
  180. MMAL_DISPLAYMODE_T mode;
  181. /** If non-zero, defines the width of a source pixel relative to \code pixel_y
  182. * \endcode. If zero, then pixels default to being square.
  183. */
  184. uint32_t pixel_x;
  185. /** If non-zero, defines the height of a source pixel relative to \code pixel_x
  186. * \endcode. If zero, then pixels default to being square.
  187. */
  188. uint32_t pixel_y;
  189. /** Sets the relative depth of the images, with greater values being in front
  190. * of smaller values.
  191. */
  192. int32_t layer;
  193. /** Set to non-zero to ensure copy protection is used on output.
  194. */
  195. MMAL_BOOL_T copyprotect_required;
  196. /** Level of opacity of the layer, where zero is fully transparent and
  197. * 255 is fully opaque.
  198. */
  199. uint32_t alpha;
  200. } MMAL_DISPLAYREGION_T;
  201. /** Video profiles.
  202. * Only certain combinations of profile and level will be valid.
  203. * @ref MMAL_VIDEO_LEVEL_T
  204. */
  205. typedef enum MMAL_VIDEO_PROFILE_T {
  206. MMAL_VIDEO_PROFILE_H263_BASELINE,
  207. MMAL_VIDEO_PROFILE_H263_H320CODING,
  208. MMAL_VIDEO_PROFILE_H263_BACKWARDCOMPATIBLE,
  209. MMAL_VIDEO_PROFILE_H263_ISWV2,
  210. MMAL_VIDEO_PROFILE_H263_ISWV3,
  211. MMAL_VIDEO_PROFILE_H263_HIGHCOMPRESSION,
  212. MMAL_VIDEO_PROFILE_H263_INTERNET,
  213. MMAL_VIDEO_PROFILE_H263_INTERLACE,
  214. MMAL_VIDEO_PROFILE_H263_HIGHLATENCY,
  215. MMAL_VIDEO_PROFILE_MP4V_SIMPLE,
  216. MMAL_VIDEO_PROFILE_MP4V_SIMPLESCALABLE,
  217. MMAL_VIDEO_PROFILE_MP4V_CORE,
  218. MMAL_VIDEO_PROFILE_MP4V_MAIN,
  219. MMAL_VIDEO_PROFILE_MP4V_NBIT,
  220. MMAL_VIDEO_PROFILE_MP4V_SCALABLETEXTURE,
  221. MMAL_VIDEO_PROFILE_MP4V_SIMPLEFACE,
  222. MMAL_VIDEO_PROFILE_MP4V_SIMPLEFBA,
  223. MMAL_VIDEO_PROFILE_MP4V_BASICANIMATED,
  224. MMAL_VIDEO_PROFILE_MP4V_HYBRID,
  225. MMAL_VIDEO_PROFILE_MP4V_ADVANCEDREALTIME,
  226. MMAL_VIDEO_PROFILE_MP4V_CORESCALABLE,
  227. MMAL_VIDEO_PROFILE_MP4V_ADVANCEDCODING,
  228. MMAL_VIDEO_PROFILE_MP4V_ADVANCEDCORE,
  229. MMAL_VIDEO_PROFILE_MP4V_ADVANCEDSCALABLE,
  230. MMAL_VIDEO_PROFILE_MP4V_ADVANCEDSIMPLE,
  231. MMAL_VIDEO_PROFILE_H264_BASELINE,
  232. MMAL_VIDEO_PROFILE_H264_MAIN,
  233. MMAL_VIDEO_PROFILE_H264_EXTENDED,
  234. MMAL_VIDEO_PROFILE_H264_HIGH,
  235. MMAL_VIDEO_PROFILE_H264_HIGH10,
  236. MMAL_VIDEO_PROFILE_H264_HIGH422,
  237. MMAL_VIDEO_PROFILE_H264_HIGH444,
  238. MMAL_VIDEO_PROFILE_H264_CONSTRAINED_BASELINE,
  239. MMAL_VIDEO_PROFILE_DUMMY = 0x7FFFFFFF
  240. } MMAL_VIDEO_PROFILE_T;
  241. /** Video levels.
  242. * Only certain combinations of profile and level will be valid.
  243. * @ref MMAL_VIDEO_PROFILE_T
  244. */
  245. typedef enum MMAL_VIDEO_LEVEL_T {
  246. MMAL_VIDEO_LEVEL_H263_10,
  247. MMAL_VIDEO_LEVEL_H263_20,
  248. MMAL_VIDEO_LEVEL_H263_30,
  249. MMAL_VIDEO_LEVEL_H263_40,
  250. MMAL_VIDEO_LEVEL_H263_45,
  251. MMAL_VIDEO_LEVEL_H263_50,
  252. MMAL_VIDEO_LEVEL_H263_60,
  253. MMAL_VIDEO_LEVEL_H263_70,
  254. MMAL_VIDEO_LEVEL_MP4V_0,
  255. MMAL_VIDEO_LEVEL_MP4V_0b,
  256. MMAL_VIDEO_LEVEL_MP4V_1,
  257. MMAL_VIDEO_LEVEL_MP4V_2,
  258. MMAL_VIDEO_LEVEL_MP4V_3,
  259. MMAL_VIDEO_LEVEL_MP4V_4,
  260. MMAL_VIDEO_LEVEL_MP4V_4a,
  261. MMAL_VIDEO_LEVEL_MP4V_5,
  262. MMAL_VIDEO_LEVEL_MP4V_6,
  263. MMAL_VIDEO_LEVEL_H264_1,
  264. MMAL_VIDEO_LEVEL_H264_1b,
  265. MMAL_VIDEO_LEVEL_H264_11,
  266. MMAL_VIDEO_LEVEL_H264_12,
  267. MMAL_VIDEO_LEVEL_H264_13,
  268. MMAL_VIDEO_LEVEL_H264_2,
  269. MMAL_VIDEO_LEVEL_H264_21,
  270. MMAL_VIDEO_LEVEL_H264_22,
  271. MMAL_VIDEO_LEVEL_H264_3,
  272. MMAL_VIDEO_LEVEL_H264_31,
  273. MMAL_VIDEO_LEVEL_H264_32,
  274. MMAL_VIDEO_LEVEL_H264_4,
  275. MMAL_VIDEO_LEVEL_H264_41,
  276. MMAL_VIDEO_LEVEL_H264_42,
  277. MMAL_VIDEO_LEVEL_H264_5,
  278. MMAL_VIDEO_LEVEL_H264_51,
  279. MMAL_VIDEO_LEVEL_DUMMY = 0x7FFFFFFF
  280. } MMAL_VIDEO_LEVEL_T;
  281. /** Video profile and level setting.
  282. * This is a variable length structure when querying the supported profiles and
  283. * levels. To get more than one, pass a structure with more profile/level pairs.
  284. */
  285. typedef struct MMAL_PARAMETER_VIDEO_PROFILE_T
  286. {
  287. MMAL_PARAMETER_HEADER_T hdr;
  288. struct
  289. {
  290. MMAL_VIDEO_PROFILE_T profile;
  291. MMAL_VIDEO_LEVEL_T level;
  292. } profile[1];
  293. } MMAL_PARAMETER_VIDEO_PROFILE_T;
  294. /** Manner of video rate control */
  295. typedef enum MMAL_VIDEO_RATECONTROL_T {
  296. MMAL_VIDEO_RATECONTROL_DEFAULT,
  297. MMAL_VIDEO_RATECONTROL_VARIABLE,
  298. MMAL_VIDEO_RATECONTROL_CONSTANT,
  299. MMAL_VIDEO_RATECONTROL_VARIABLE_SKIP_FRAMES,
  300. MMAL_VIDEO_RATECONTROL_CONSTANT_SKIP_FRAMES,
  301. MMAL_VIDEO_RATECONTROL_DUMMY = 0x7fffffff
  302. } MMAL_VIDEO_RATECONTROL_T;
  303. /** Intra refresh modes */
  304. typedef enum MMAL_VIDEO_INTRA_REFRESH_T {
  305. MMAL_VIDEO_INTRA_REFRESH_CYCLIC,
  306. MMAL_VIDEO_INTRA_REFRESH_ADAPTIVE,
  307. MMAL_VIDEO_INTRA_REFRESH_BOTH,
  308. MMAL_VIDEO_INTRA_REFRESH_KHRONOSEXTENSIONS = 0x6F000000,
  309. MMAL_VIDEO_INTRA_REFRESH_VENDORSTARTUNUSED = 0x7F000000,
  310. MMAL_VIDEO_INTRA_REFRESH_CYCLIC_MROWS,
  311. MMAL_VIDEO_INTRA_REFRESH_PSEUDO_RAND,
  312. MMAL_VIDEO_INTRA_REFRESH_MAX,
  313. MMAL_VIDEO_INTRA_REFRESH_DUMMY = 0x7FFFFFFF
  314. } MMAL_VIDEO_INTRA_REFRESH_T;
  315. /*Encode RC Models Supported*/
  316. typedef enum MMAL_VIDEO_ENCODE_RC_MODEL_T {
  317. MMAL_VIDEO_ENCODER_RC_MODEL_DEFAULT = 0,
  318. MMAL_VIDEO_ENCODER_RC_MODEL_JVT = MMAL_VIDEO_ENCODER_RC_MODEL_DEFAULT,
  319. MMAL_VIDEO_ENCODER_RC_MODEL_VOWIFI,
  320. MMAL_VIDEO_ENCODER_RC_MODEL_CBR,
  321. MMAL_VIDEO_ENCODER_RC_MODEL_LAST,
  322. MMAL_VIDEO_ENCODER_RC_MODEL_DUMMY = 0x7FFFFFFF
  323. } MMAL_VIDEO_ENCODE_RC_MODEL_T;
  324. typedef struct MMAL_PARAMETER_VIDEO_ENCODE_RC_MODEL_T {
  325. MMAL_PARAMETER_HEADER_T hdr;
  326. MMAL_VIDEO_ENCODE_RC_MODEL_T rc_model;
  327. }MMAL_PARAMETER_VIDEO_ENCODE_RC_MODEL_T;
  328. /** Video rate control setting */
  329. typedef struct MMAL_PARAMETER_VIDEO_RATECONTROL_T {
  330. MMAL_PARAMETER_HEADER_T hdr;
  331. MMAL_VIDEO_RATECONTROL_T control;
  332. } MMAL_PARAMETER_VIDEO_RATECONTROL_T;
  333. /*H264 INTRA MB MODES*/
  334. typedef enum MMAL_VIDEO_ENCODE_H264_MB_INTRA_MODES_T {
  335. MMAL_VIDEO_ENCODER_H264_MB_4x4_INTRA = 1,
  336. MMAL_VIDEO_ENCODER_H264_MB_8x8_INTRA = 2,
  337. MMAL_VIDEO_ENCODER_H264_MB_16x16_INTRA = 4,
  338. MMAL_VIDEO_ENCODER_H264_MB_INTRA_DUMMY = 0x7fffffff
  339. } MMAL_VIDEO_ENCODE_H264_MB_INTRA_MODES_T;
  340. typedef struct MMAL_PARAMETER_VIDEO_ENCODER_H264_MB_INTRA_MODES_T {
  341. MMAL_PARAMETER_HEADER_T hdr;
  342. MMAL_VIDEO_ENCODE_H264_MB_INTRA_MODES_T mb_mode;
  343. }MMAL_PARAMETER_VIDEO_ENCODER_H264_MB_INTRA_MODES_T;
  344. /** NAL unit formats */
  345. typedef enum MMAL_VIDEO_NALUNITFORMAT_T {
  346. MMAL_VIDEO_NALUNITFORMAT_STARTCODES = 1,
  347. MMAL_VIDEO_NALUNITFORMAT_NALUNITPERBUFFER = 2,
  348. MMAL_VIDEO_NALUNITFORMAT_ONEBYTEINTERLEAVELENGTH = 4,
  349. MMAL_VIDEO_NALUNITFORMAT_TWOBYTEINTERLEAVELENGTH = 8,
  350. MMAL_VIDEO_NALUNITFORMAT_FOURBYTEINTERLEAVELENGTH = 16,
  351. MMAL_VIDEO_NALUNITFORMAT_DUMMY = 0x7fffffff
  352. } MMAL_VIDEO_NALUNITFORMAT_T;
  353. /** NAL unit format setting */
  354. typedef struct MMAL_PARAMETER_VIDEO_NALUNITFORMAT_T {
  355. MMAL_PARAMETER_HEADER_T hdr;
  356. MMAL_VIDEO_NALUNITFORMAT_T format;
  357. } MMAL_PARAMETER_VIDEO_NALUNITFORMAT_T;
  358. /** H264 Only: Overrides for max macro-blocks per second, max framesize,
  359. * and max bitrates. This overrides the default maximums for the configured level.
  360. */
  361. typedef struct MMAL_PARAMETER_VIDEO_LEVEL_EXTENSION_T {
  362. MMAL_PARAMETER_HEADER_T hdr;
  363. uint32_t custom_max_mbps;
  364. uint32_t custom_max_fs;
  365. uint32_t custom_max_br_and_cpb;
  366. } MMAL_PARAMETER_VIDEO_LEVEL_EXTENSION_T;
  367. /** H264 Only: Overrides for max macro-blocks per second, max framesize,
  368. * and max bitrates. This overrides the default maximums for the configured level.
  369. */
  370. typedef struct MMAL_PARAMETER_VIDEO_INTRA_REFRESH_T {
  371. MMAL_PARAMETER_HEADER_T hdr;
  372. MMAL_VIDEO_INTRA_REFRESH_T refresh_mode;
  373. uint32_t air_mbs;
  374. uint32_t air_ref;
  375. uint32_t cir_mbs;
  376. uint32_t pir_mbs;
  377. } MMAL_PARAMETER_VIDEO_INTRA_REFRESH_T;
  378. /** Structure for enabling EEDE, we keep it like this for now, there could be extra fields in the future */
  379. typedef struct MMAL_PARAMETER_VIDEO_EEDE_ENABLE_T {
  380. MMAL_PARAMETER_HEADER_T hdr;
  381. uint32_t enable;
  382. } MMAL_PARAMETER_VIDEO_EEDE_ENABLE_T;
  383. /** Structure for setting lossrate for EEDE, we keep it like this for now, there could be extra fields in the future */
  384. typedef struct MMAL_PARAMETER_VIDEO_EEDE_LOSSRATE_T {
  385. MMAL_PARAMETER_HEADER_T hdr;
  386. uint32_t loss_rate;
  387. } MMAL_PARAMETER_VIDEO_EEDE_LOSSRATE_T;
  388. /** Structure for setting inital DRM parameters */
  389. typedef struct MMAL_PARAMETER_VIDEO_DRM_INIT_INFO_T {
  390. MMAL_PARAMETER_HEADER_T hdr;
  391. uint32_t current_time;
  392. uint32_t ticks_per_sec;
  393. uint8_t lhs[32];
  394. } MMAL_PARAMETER_VIDEO_DRM_INIT_INFO_T;
  395. /** Structure for requesting a hardware-protected memory buffer **/
  396. typedef struct MMAL_PARAMETER_VIDEO_DRM_PROTECT_BUFFER_T {
  397. MMAL_PARAMETER_HEADER_T hdr;
  398. uint32_t size_wanted; /**< Input. Zero size means internal video decoder buffer,
  399. mem_handle and phys_addr not returned in this case */
  400. uint32_t protect; /**< Input. 1 = protect, 0 = unprotect */
  401. uint32_t mem_handle; /**< Output. Handle for protected buffer */
  402. void * phys_addr; /**< Output. Physical memory address of protected buffer */
  403. } MMAL_PARAMETER_VIDEO_DRM_PROTECT_BUFFER_T;
  404. typedef struct MMAL_PARAMETER_VIDEO_RENDER_STATS_T {
  405. MMAL_PARAMETER_HEADER_T hdr;
  406. MMAL_BOOL_T valid;
  407. uint32_t match;
  408. uint32_t period;
  409. uint32_t phase;
  410. uint32_t pixel_clock_nominal;
  411. uint32_t pixel_clock;
  412. uint32_t hvs_status;
  413. uint32_t dummy[2];
  414. } MMAL_PARAMETER_VIDEO_RENDER_STATS_T;
  415. typedef enum MMAL_INTERLACETYPE_T {
  416. MMAL_InterlaceProgressive, /**< The data is not interlaced, it is progressive scan */
  417. MMAL_InterlaceFieldSingleUpperFirst, /**< The data is interlaced, fields sent
  418. separately in temporal order, with upper field first */
  419. MMAL_InterlaceFieldSingleLowerFirst, /**< The data is interlaced, fields sent
  420. separately in temporal order, with lower field first */
  421. MMAL_InterlaceFieldsInterleavedUpperFirst, /**< The data is interlaced, two fields sent together line
  422. interleaved, with the upper field temporally earlier */
  423. MMAL_InterlaceFieldsInterleavedLowerFirst, /**< The data is interlaced, two fields sent together line
  424. interleaved, with the lower field temporally earlier */
  425. MMAL_InterlaceMixed, /**< The stream may contain a mixture of progressive
  426. and interlaced frames */
  427. MMAL_InterlaceKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  428. MMAL_InterlaceVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  429. MMAL_InterlaceMax = 0x7FFFFFFF
  430. } MMAL_INTERLACETYPE_T;
  431. typedef struct MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T {
  432. MMAL_PARAMETER_HEADER_T hdr;
  433. MMAL_INTERLACETYPE_T eMode; /**< The interlace type of the content */
  434. MMAL_BOOL_T bRepeatFirstField; /**< Whether to repeat the first field */
  435. } MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T;
  436. #endif