My Project
mmal_parameters_video.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2012, Broadcom Europe Ltd
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7  * Redistributions of source code must retain the above copyright
8  notice, this list of conditions and the following disclaimer.
9  * Redistributions in binary form must reproduce the above copyright
10  notice, this list of conditions and the following disclaimer in the
11  documentation and/or other materials provided with the distribution.
12  * Neither the name of the copyright holder nor the
13  names of its contributors may be used to endorse or promote products
14  derived from this software without specific prior written permission.
15 
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
28 #ifndef MMAL_PARAMETERS_VIDEO_H
29 #define MMAL_PARAMETERS_VIDEO_H
30 
31 #include "mmal_parameters_common.h"
32 
33 /*************************************************
34  * ALWAYS ADD NEW ENUMS AT THE END OF THIS LIST! *
35  ************************************************/
36 
40 enum {
78  /*H264 specific parameters*/
107 };
108 
124  MMAL_DISPLAY_DUMMY = 0x7FFFFFFF
126 
128 typedef enum MMAL_DISPLAYMODE_T {
131  // these allow a left eye source->dest to be specified and the right eye mapping will be inferred by symmetry
138 
141 typedef enum MMAL_DISPLAYSET_T {
156 
169 
176 typedef struct MMAL_DISPLAYREGION_T {
182  uint32_t set;
187  uint32_t display_num;
192  MMAL_BOOL_T fullscreen;
196  MMAL_DISPLAYTRANSFORM_T transform;
199  MMAL_RECT_T dest_rect;
203  MMAL_RECT_T src_rect;
207  MMAL_BOOL_T noaspect;
214  MMAL_DISPLAYMODE_T mode;
218  uint32_t pixel_x;
222  uint32_t pixel_y;
226  int32_t layer;
229  MMAL_BOOL_T copyprotect_required;
234  uint32_t alpha;
235 } MMAL_DISPLAYREGION_T;
236 
241 typedef enum MMAL_VIDEO_PROFILE_T {
242  MMAL_VIDEO_PROFILE_H263_BASELINE,
243  MMAL_VIDEO_PROFILE_H263_H320CODING,
244  MMAL_VIDEO_PROFILE_H263_BACKWARDCOMPATIBLE,
245  MMAL_VIDEO_PROFILE_H263_ISWV2,
246  MMAL_VIDEO_PROFILE_H263_ISWV3,
247  MMAL_VIDEO_PROFILE_H263_HIGHCOMPRESSION,
248  MMAL_VIDEO_PROFILE_H263_INTERNET,
249  MMAL_VIDEO_PROFILE_H263_INTERLACE,
250  MMAL_VIDEO_PROFILE_H263_HIGHLATENCY,
251  MMAL_VIDEO_PROFILE_MP4V_SIMPLE,
252  MMAL_VIDEO_PROFILE_MP4V_SIMPLESCALABLE,
253  MMAL_VIDEO_PROFILE_MP4V_CORE,
254  MMAL_VIDEO_PROFILE_MP4V_MAIN,
255  MMAL_VIDEO_PROFILE_MP4V_NBIT,
256  MMAL_VIDEO_PROFILE_MP4V_SCALABLETEXTURE,
257  MMAL_VIDEO_PROFILE_MP4V_SIMPLEFACE,
258  MMAL_VIDEO_PROFILE_MP4V_SIMPLEFBA,
259  MMAL_VIDEO_PROFILE_MP4V_BASICANIMATED,
260  MMAL_VIDEO_PROFILE_MP4V_HYBRID,
261  MMAL_VIDEO_PROFILE_MP4V_ADVANCEDREALTIME,
262  MMAL_VIDEO_PROFILE_MP4V_CORESCALABLE,
263  MMAL_VIDEO_PROFILE_MP4V_ADVANCEDCODING,
264  MMAL_VIDEO_PROFILE_MP4V_ADVANCEDCORE,
265  MMAL_VIDEO_PROFILE_MP4V_ADVANCEDSCALABLE,
266  MMAL_VIDEO_PROFILE_MP4V_ADVANCEDSIMPLE,
267  MMAL_VIDEO_PROFILE_H264_BASELINE,
268  MMAL_VIDEO_PROFILE_H264_MAIN,
269  MMAL_VIDEO_PROFILE_H264_EXTENDED,
270  MMAL_VIDEO_PROFILE_H264_HIGH,
271  MMAL_VIDEO_PROFILE_H264_HIGH10,
272  MMAL_VIDEO_PROFILE_H264_HIGH422,
273  MMAL_VIDEO_PROFILE_H264_HIGH444,
274  MMAL_VIDEO_PROFILE_H264_CONSTRAINED_BASELINE,
275  MMAL_VIDEO_PROFILE_DUMMY = 0x7FFFFFFF
276 } MMAL_VIDEO_PROFILE_T;
277 
282 typedef enum MMAL_VIDEO_LEVEL_T {
283  MMAL_VIDEO_LEVEL_H263_10,
284  MMAL_VIDEO_LEVEL_H263_20,
285  MMAL_VIDEO_LEVEL_H263_30,
286  MMAL_VIDEO_LEVEL_H263_40,
287  MMAL_VIDEO_LEVEL_H263_45,
288  MMAL_VIDEO_LEVEL_H263_50,
289  MMAL_VIDEO_LEVEL_H263_60,
290  MMAL_VIDEO_LEVEL_H263_70,
291  MMAL_VIDEO_LEVEL_MP4V_0,
292  MMAL_VIDEO_LEVEL_MP4V_0b,
293  MMAL_VIDEO_LEVEL_MP4V_1,
294  MMAL_VIDEO_LEVEL_MP4V_2,
295  MMAL_VIDEO_LEVEL_MP4V_3,
296  MMAL_VIDEO_LEVEL_MP4V_4,
297  MMAL_VIDEO_LEVEL_MP4V_4a,
298  MMAL_VIDEO_LEVEL_MP4V_5,
299  MMAL_VIDEO_LEVEL_MP4V_6,
300  MMAL_VIDEO_LEVEL_H264_1,
301  MMAL_VIDEO_LEVEL_H264_1b,
302  MMAL_VIDEO_LEVEL_H264_11,
303  MMAL_VIDEO_LEVEL_H264_12,
304  MMAL_VIDEO_LEVEL_H264_13,
305  MMAL_VIDEO_LEVEL_H264_2,
306  MMAL_VIDEO_LEVEL_H264_21,
307  MMAL_VIDEO_LEVEL_H264_22,
308  MMAL_VIDEO_LEVEL_H264_3,
309  MMAL_VIDEO_LEVEL_H264_31,
310  MMAL_VIDEO_LEVEL_H264_32,
311  MMAL_VIDEO_LEVEL_H264_4,
312  MMAL_VIDEO_LEVEL_H264_41,
313  MMAL_VIDEO_LEVEL_H264_42,
314  MMAL_VIDEO_LEVEL_H264_5,
315  MMAL_VIDEO_LEVEL_H264_51,
316  MMAL_VIDEO_LEVEL_DUMMY = 0x7FFFFFFF
317 } MMAL_VIDEO_LEVEL_T;
318 
323 typedef struct MMAL_PARAMETER_VIDEO_PROFILE_T
324 {
326 
327  struct
328  {
329  MMAL_VIDEO_PROFILE_T profile;
330  MMAL_VIDEO_LEVEL_T level;
331  } profile[1];
332 } MMAL_PARAMETER_VIDEO_PROFILE_T;
333 
335 typedef enum MMAL_VIDEO_RATECONTROL_T {
336  MMAL_VIDEO_RATECONTROL_DEFAULT,
337  MMAL_VIDEO_RATECONTROL_VARIABLE,
338  MMAL_VIDEO_RATECONTROL_CONSTANT,
339  MMAL_VIDEO_RATECONTROL_VARIABLE_SKIP_FRAMES,
340  MMAL_VIDEO_RATECONTROL_CONSTANT_SKIP_FRAMES,
341  MMAL_VIDEO_RATECONTROL_DUMMY = 0x7fffffff
342 } MMAL_VIDEO_RATECONTROL_T;
343 
345 typedef enum MMAL_VIDEO_INTRA_REFRESH_T {
346  MMAL_VIDEO_INTRA_REFRESH_CYCLIC,
347  MMAL_VIDEO_INTRA_REFRESH_ADAPTIVE,
348  MMAL_VIDEO_INTRA_REFRESH_BOTH,
349  MMAL_VIDEO_INTRA_REFRESH_KHRONOSEXTENSIONS = 0x6F000000,
350  MMAL_VIDEO_INTRA_REFRESH_VENDORSTARTUNUSED = 0x7F000000,
351  MMAL_VIDEO_INTRA_REFRESH_CYCLIC_MROWS,
352  MMAL_VIDEO_INTRA_REFRESH_PSEUDO_RAND,
353  MMAL_VIDEO_INTRA_REFRESH_MAX,
354  MMAL_VIDEO_INTRA_REFRESH_DUMMY = 0x7FFFFFFF
355 } MMAL_VIDEO_INTRA_REFRESH_T;
356 
357 /*Encode RC Models Supported*/
358 typedef enum MMAL_VIDEO_ENCODE_RC_MODEL_T {
359  MMAL_VIDEO_ENCODER_RC_MODEL_DEFAULT = 0,
360  MMAL_VIDEO_ENCODER_RC_MODEL_JVT = MMAL_VIDEO_ENCODER_RC_MODEL_DEFAULT,
361  MMAL_VIDEO_ENCODER_RC_MODEL_VOWIFI,
362  MMAL_VIDEO_ENCODER_RC_MODEL_CBR,
363  MMAL_VIDEO_ENCODER_RC_MODEL_LAST,
364  MMAL_VIDEO_ENCODER_RC_MODEL_DUMMY = 0x7FFFFFFF
365 } MMAL_VIDEO_ENCODE_RC_MODEL_T;
366 
367 typedef struct MMAL_PARAMETER_VIDEO_ENCODE_RC_MODEL_T {
369  MMAL_VIDEO_ENCODE_RC_MODEL_T rc_model;
370 }MMAL_PARAMETER_VIDEO_ENCODE_RC_MODEL_T;
371 
373 typedef struct MMAL_PARAMETER_VIDEO_RATECONTROL_T {
375 
376  MMAL_VIDEO_RATECONTROL_T control;
377 } MMAL_PARAMETER_VIDEO_RATECONTROL_T;
378 
379 /*H264 INTRA MB MODES*/
380 typedef enum MMAL_VIDEO_ENCODE_H264_MB_INTRA_MODES_T {
381  MMAL_VIDEO_ENCODER_H264_MB_4x4_INTRA = 1,
382  MMAL_VIDEO_ENCODER_H264_MB_8x8_INTRA = 2,
383  MMAL_VIDEO_ENCODER_H264_MB_16x16_INTRA = 4,
384  MMAL_VIDEO_ENCODER_H264_MB_INTRA_DUMMY = 0x7fffffff
385 } MMAL_VIDEO_ENCODE_H264_MB_INTRA_MODES_T;
386 
387 typedef struct MMAL_PARAMETER_VIDEO_ENCODER_H264_MB_INTRA_MODES_T {
389  MMAL_VIDEO_ENCODE_H264_MB_INTRA_MODES_T mb_mode;
390 }MMAL_PARAMETER_VIDEO_ENCODER_H264_MB_INTRA_MODES_T;
391 
393 typedef enum MMAL_VIDEO_NALUNITFORMAT_T {
394  MMAL_VIDEO_NALUNITFORMAT_STARTCODES = 1,
395  MMAL_VIDEO_NALUNITFORMAT_NALUNITPERBUFFER = 2,
396  MMAL_VIDEO_NALUNITFORMAT_ONEBYTEINTERLEAVELENGTH = 4,
397  MMAL_VIDEO_NALUNITFORMAT_TWOBYTEINTERLEAVELENGTH = 8,
398  MMAL_VIDEO_NALUNITFORMAT_FOURBYTEINTERLEAVELENGTH = 16,
399  MMAL_VIDEO_NALUNITFORMAT_DUMMY = 0x7fffffff
400 } MMAL_VIDEO_NALUNITFORMAT_T;
401 
403 typedef struct MMAL_PARAMETER_VIDEO_NALUNITFORMAT_T {
405 
406  MMAL_VIDEO_NALUNITFORMAT_T format;
407 } MMAL_PARAMETER_VIDEO_NALUNITFORMAT_T;
408 
412 typedef struct MMAL_PARAMETER_VIDEO_LEVEL_EXTENSION_T {
414 
415  uint32_t custom_max_mbps;
416  uint32_t custom_max_fs;
417  uint32_t custom_max_br_and_cpb;
418 } MMAL_PARAMETER_VIDEO_LEVEL_EXTENSION_T;
419 
423 typedef struct MMAL_PARAMETER_VIDEO_INTRA_REFRESH_T {
425 
426  MMAL_VIDEO_INTRA_REFRESH_T refresh_mode;
427  uint32_t air_mbs;
428  uint32_t air_ref;
429  uint32_t cir_mbs;
430  uint32_t pir_mbs;
431 } MMAL_PARAMETER_VIDEO_INTRA_REFRESH_T;
432 
434 typedef struct MMAL_PARAMETER_VIDEO_EEDE_ENABLE_T {
436 
437  uint32_t enable;
438 } MMAL_PARAMETER_VIDEO_EEDE_ENABLE_T;
439 
441 typedef struct MMAL_PARAMETER_VIDEO_EEDE_LOSSRATE_T {
443 
444  uint32_t loss_rate;
445 } MMAL_PARAMETER_VIDEO_EEDE_LOSSRATE_T;
446 
448 typedef struct MMAL_PARAMETER_VIDEO_DRM_INIT_INFO_T {
450 
451  uint32_t current_time;
452  uint32_t ticks_per_sec;
453  uint8_t lhs[32];
454 } MMAL_PARAMETER_VIDEO_DRM_INIT_INFO_T;
455 
457 typedef struct MMAL_PARAMETER_VIDEO_DRM_PROTECT_BUFFER_T {
459 
460  uint32_t size_wanted;
462  uint32_t protect;
464  uint32_t mem_handle;
465  void * phys_addr;
467 } MMAL_PARAMETER_VIDEO_DRM_PROTECT_BUFFER_T;
468 
469 typedef struct MMAL_PARAMETER_VIDEO_RENDER_STATS_T {
471 
472  MMAL_BOOL_T valid;
473  uint32_t match;
474  uint32_t period;
475  uint32_t phase;
476  uint32_t pixel_clock_nominal;
477  uint32_t pixel_clock;
478  uint32_t hvs_status;
479  uint32_t dummy[2];
480 } MMAL_PARAMETER_VIDEO_RENDER_STATS_T;
481 
482 typedef enum MMAL_INTERLACETYPE_T {
483  MMAL_InterlaceProgressive,
484  MMAL_InterlaceFieldSingleUpperFirst,
486  MMAL_InterlaceFieldSingleLowerFirst,
488  MMAL_InterlaceFieldsInterleavedUpperFirst,
490  MMAL_InterlaceFieldsInterleavedLowerFirst,
492  MMAL_InterlaceMixed,
494  MMAL_InterlaceKhronosExtensions = 0x6F000000,
495  MMAL_InterlaceVendorStartUnused = 0x7F000000,
496  MMAL_InterlaceMax = 0x7FFFFFFF
497 } MMAL_INTERLACETYPE_T;
498 
499 typedef struct MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T {
501 
502  MMAL_INTERLACETYPE_T eMode;
503  MMAL_BOOL_T bRepeatFirstField;
504 } MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T;
505 
506 typedef enum MMAL_SOURCE_PATTERN_T {
507  MMAL_VIDEO_SOURCE_PATTERN_WHITE,
508  MMAL_VIDEO_SOURCE_PATTERN_BLACK,
509  MMAL_VIDEO_SOURCE_PATTERN_DIAGONAL,
510  MMAL_VIDEO_SOURCE_PATTERN_NOISE,
511  MMAL_VIDEO_SOURCE_PATTERN_RANDOM,
512  MMAL_VIDEO_SOURCE_PATTERN_COLOUR,
513  MMAL_VIDEO_SOURCE_PATTERN_BLOCKS,
514  MMAL_VIDEO_SOURCE_PATTERN_SWIRLY,
515  MMAL_VIDEO_SOURCE_PATTERN_DUMMY = 0x7fffffff
516 } MMAL_SOURCE_PATTERN_T;
517 
518 typedef struct MMAL_PARAMETER_VIDEO_SOURCE_PATTERN_T {
520 
521  MMAL_SOURCE_PATTERN_T pattern;
522  uint32_t param;
523  uint32_t framecount;
524  MMAL_RATIONAL_T framerate;
525 } MMAL_PARAMETER_VIDEO_SOURCE_PATTERN_T;
526 
527 
528 #endif
MMAL_DISPLAYTRANSFORM_T
MMAL_DISPLAYALPHAFLAGS_T
MMAL_DISPLAYMODE_T
int32_t MMAL_BOOL_T
Definition: mmal_common.h:60
#define MMAL_PARAMETER_GROUP_VIDEO