OMX_VideoExt.h revision 203f89a75a28222b1d9940227d266a3bdd7f99b9
1/*
2 * Copyright (c) 2010 The Khronos Group Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject
10 * to the following conditions:
11 * The above copyright notice and this permission notice shall be included
12 * in all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23
24/** OMX_VideoExt.h - OpenMax IL version 1.1.2
25 * The OMX_VideoExt header file contains extensions to the
26 * definitions used by both the application and the component to
27 * access video items.
28 */
29
30#ifndef OMX_VideoExt_h
31#define OMX_VideoExt_h
32
33#ifdef __cplusplus
34extern "C" {
35#endif /* __cplusplus */
36
37/* Each OMX header shall include all required header files to allow the
38 * header to compile without errors.  The includes below are required
39 * for this header file to compile successfully
40 */
41#include <OMX_Core.h>
42
43/** NALU Formats */
44typedef enum OMX_NALUFORMATSTYPE {
45    OMX_NaluFormatStartCodes = 1,
46    OMX_NaluFormatOneNaluPerBuffer = 2,
47    OMX_NaluFormatOneByteInterleaveLength = 4,
48    OMX_NaluFormatTwoByteInterleaveLength = 8,
49    OMX_NaluFormatFourByteInterleaveLength = 16,
50    OMX_NaluFormatCodingMax = 0x7FFFFFFF
51} OMX_NALUFORMATSTYPE;
52
53/** NAL Stream Format */
54typedef struct OMX_NALSTREAMFORMATTYPE{
55    OMX_U32 nSize;
56    OMX_VERSIONTYPE nVersion;
57    OMX_U32 nPortIndex;
58    OMX_NALUFORMATSTYPE eNaluFormat;
59} OMX_NALSTREAMFORMATTYPE;
60
61/** Enum for standard video codingtype extensions */
62typedef enum OMX_VIDEO_CODINGEXTTYPE {
63    OMX_VIDEO_ExtCodingUnused = OMX_VIDEO_CodingKhronosExtensions,
64    OMX_VIDEO_CodingVP8,        /**< VP8/WebM */
65} OMX_VIDEO_CODINGEXTTYPE;
66
67/** VP8 profiles */
68typedef enum OMX_VIDEO_VP8PROFILETYPE {
69    OMX_VIDEO_VP8ProfileMain = 0x01,
70    OMX_VIDEO_VP8ProfileUnknown = 0x6EFFFFFF,
71    OMX_VIDEO_VP8ProfileMax = 0x7FFFFFFF
72} OMX_VIDEO_VP8PROFILETYPE;
73
74/** VP8 levels */
75typedef enum OMX_VIDEO_VP8LEVELTYPE {
76    OMX_VIDEO_VP8Level_Version0 = 0x01,
77    OMX_VIDEO_VP8Level_Version1 = 0x02,
78    OMX_VIDEO_VP8Level_Version2 = 0x04,
79    OMX_VIDEO_VP8Level_Version3 = 0x08,
80    OMX_VIDEO_VP8LevelUnknown = 0x6EFFFFFF,
81    OMX_VIDEO_VP8LevelMax = 0x7FFFFFFF
82} OMX_VIDEO_VP8LEVELTYPE;
83
84/** VP8 Param */
85typedef struct OMX_VIDEO_PARAM_VP8TYPE {
86    OMX_U32 nSize;
87    OMX_VERSIONTYPE nVersion;
88    OMX_U32 nPortIndex;
89    OMX_VIDEO_VP8PROFILETYPE eProfile;
90    OMX_VIDEO_VP8LEVELTYPE eLevel;
91    OMX_U32 nDCTPartitions;
92    OMX_BOOL bErrorResilientMode;
93} OMX_VIDEO_PARAM_VP8TYPE;
94
95/** Structure for configuring VP8 reference frames */
96typedef struct OMX_VIDEO_VP8REFERENCEFRAMETYPE {
97    OMX_U32 nSize;
98    OMX_VERSIONTYPE nVersion;
99    OMX_U32 nPortIndex;
100    OMX_BOOL bPreviousFrameRefresh;
101    OMX_BOOL bGoldenFrameRefresh;
102    OMX_BOOL bAlternateFrameRefresh;
103    OMX_BOOL bUsePreviousFrame;
104    OMX_BOOL bUseGoldenFrame;
105    OMX_BOOL bUseAlternateFrame;
106} OMX_VIDEO_VP8REFERENCEFRAMETYPE;
107
108/** Structure for querying VP8 reference frame type */
109typedef struct OMX_VIDEO_VP8REFERENCEFRAMEINFOTYPE {
110    OMX_U32 nSize;
111    OMX_VERSIONTYPE nVersion;
112    OMX_U32 nPortIndex;
113    OMX_BOOL bIsIntraFrame;
114    OMX_BOOL bIsGoldenOrAlternateFrame;
115} OMX_VIDEO_VP8REFERENCEFRAMEINFOTYPE;
116
117
118#ifdef __cplusplus
119}
120#endif /* __cplusplus */
121
122#endif /* OMX_VideoExt_h */
123/* File EOF */
124