OMX_Video.h 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141
  1. /**
  2. * Copyright (c) 2008 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. * @file OMX_Video.h - OpenMax IL version 1.1.2
  25. * The structures is needed by Video components to exchange parameters
  26. * and configuration data with OMX components.
  27. */
  28. #ifndef OMX_Video_h
  29. #define OMX_Video_h
  30. /** @defgroup video OpenMAX IL Video Domain
  31. * @ingroup iv
  32. * Structures for OpenMAX IL Video domain
  33. * @{
  34. */
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif /* __cplusplus */
  38. /**
  39. * Each OMX header must include all required header files to allow the
  40. * header to compile without errors. The includes below are required
  41. * for this header file to compile successfully
  42. */
  43. #include <OMX_IVCommon.h>
  44. /**
  45. * Enumeration used to define the possible video compression codings.
  46. * NOTE: This essentially refers to file extensions. If the coding is
  47. * being used to specify the ENCODE type, then additional work
  48. * must be done to configure the exact flavor of the compression
  49. * to be used. For decode cases where the user application can
  50. * not differentiate between MPEG-4 and H.264 bit streams, it is
  51. * up to the codec to handle this.
  52. */
  53. typedef enum OMX_VIDEO_CODINGTYPE {
  54. OMX_VIDEO_CodingUnused, /**< Value when coding is N/A */
  55. OMX_VIDEO_CodingAutoDetect, /**< Autodetection of coding type */
  56. OMX_VIDEO_CodingMPEG2, /**< AKA: H.262 */
  57. OMX_VIDEO_CodingH263, /**< H.263 */
  58. OMX_VIDEO_CodingMPEG4, /**< MPEG-4 */
  59. OMX_VIDEO_CodingWMV, /**< all versions of Windows Media Video */
  60. OMX_VIDEO_CodingRV, /**< all versions of Real Video */
  61. OMX_VIDEO_CodingAVC, /**< H.264/AVC */
  62. OMX_VIDEO_CodingMJPEG, /**< Motion JPEG */
  63. OMX_VIDEO_CodingVP8, /**< Google VP8, formerly known as On2 VP8 */
  64. OMX_VIDEO_CodingVP9, /**< Google VP9 */
  65. OMX_VIDEO_CodingHEVC, /**< ITU H.265/HEVC */
  66. OMX_VIDEO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  67. OMX_VIDEO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  68. OMX_VIDEO_CodingMax = 0x7FFFFFFF
  69. } OMX_VIDEO_CODINGTYPE;
  70. /**
  71. * Data structure used to define a video path. The number of Video paths for
  72. * input and output will vary by type of the Video component.
  73. *
  74. * Input (aka Source) : zero Inputs, one Output,
  75. * Splitter : one Input, 2 or more Outputs,
  76. * Processing Element : one Input, one output,
  77. * Mixer : 2 or more inputs, one output,
  78. * Output (aka Sink) : one Input, zero outputs.
  79. *
  80. * The PortDefinition structure is used to define all of the parameters
  81. * necessary for the compliant component to setup an input or an output video
  82. * path. If additional vendor specific data is required, it should be
  83. * transmitted to the component using the CustomCommand function. Compliant
  84. * components will prepopulate this structure with optimal values during the
  85. * GetDefaultInitParams command.
  86. *
  87. * STRUCT MEMBERS:
  88. * cMIMEType : MIME type of data for the port
  89. * pNativeRender : Platform specific reference for a display if a
  90. * sync, otherwise this field is 0
  91. * nFrameWidth : Width of frame to be used on channel if
  92. * uncompressed format is used. Use 0 for unknown,
  93. * don't care or variable
  94. * nFrameHeight : Height of frame to be used on channel if
  95. * uncompressed format is used. Use 0 for unknown,
  96. * don't care or variable
  97. * nStride : Number of bytes per span of an image
  98. * (i.e. indicates the number of bytes to get
  99. * from span N to span N+1, where negative stride
  100. * indicates the image is bottom up
  101. * nSliceHeight : Height used when encoding in slices
  102. * nBitrate : Bit rate of frame to be used on channel if
  103. * compressed format is used. Use 0 for unknown,
  104. * don't care or variable
  105. * xFramerate : Frame rate to be used on channel if uncompressed
  106. * format is used. Use 0 for unknown, don't care or
  107. * variable. Units are Q16 frames per second.
  108. * bFlagErrorConcealment : Turns on error concealment if it is supported by
  109. * the OMX component
  110. * eCompressionFormat : Compression format used in this instance of the
  111. * component. When OMX_VIDEO_CodingUnused is
  112. * specified, eColorFormat is used
  113. * eColorFormat : Decompressed format used by this component
  114. * pNativeWindow : Platform specific reference for a window object if a
  115. * display sink , otherwise this field is 0x0.
  116. */
  117. typedef struct OMX_VIDEO_PORTDEFINITIONTYPE {
  118. OMX_STRING cMIMEType;
  119. OMX_NATIVE_DEVICETYPE pNativeRender;
  120. OMX_U32 nFrameWidth;
  121. OMX_U32 nFrameHeight;
  122. OMX_S32 nStride;
  123. OMX_U32 nSliceHeight;
  124. OMX_U32 nBitrate;
  125. OMX_U32 xFramerate;
  126. OMX_BOOL bFlagErrorConcealment;
  127. OMX_VIDEO_CODINGTYPE eCompressionFormat;
  128. OMX_COLOR_FORMATTYPE eColorFormat;
  129. OMX_NATIVE_WINDOWTYPE pNativeWindow;
  130. } OMX_VIDEO_PORTDEFINITIONTYPE;
  131. /**
  132. * Port format parameter. This structure is used to enumerate the various
  133. * data input/output format supported by the port.
  134. *
  135. * STRUCT MEMBERS:
  136. * nSize : Size of the structure in bytes
  137. * nVersion : OMX specification version information
  138. * nPortIndex : Indicates which port to set
  139. * nIndex : Indicates the enumeration index for the format from
  140. * 0x0 to N-1
  141. * eCompressionFormat : Compression format used in this instance of the
  142. * component. When OMX_VIDEO_CodingUnused is specified,
  143. * eColorFormat is used
  144. * eColorFormat : Decompressed format used by this component
  145. * xFrameRate : Indicates the video frame rate in Q16 format
  146. */
  147. typedef struct OMX_VIDEO_PARAM_PORTFORMATTYPE {
  148. OMX_U32 nSize;
  149. OMX_VERSIONTYPE nVersion;
  150. OMX_U32 nPortIndex;
  151. OMX_U32 nIndex;
  152. OMX_VIDEO_CODINGTYPE eCompressionFormat;
  153. OMX_COLOR_FORMATTYPE eColorFormat;
  154. OMX_U32 xFramerate;
  155. } OMX_VIDEO_PARAM_PORTFORMATTYPE;
  156. /**
  157. * This is a structure for configuring video compression quantization
  158. * parameter values. Codecs may support different QP values for different
  159. * frame types.
  160. *
  161. * STRUCT MEMBERS:
  162. * nSize : Size of the structure in bytes
  163. * nVersion : OMX specification version info
  164. * nPortIndex : Port that this structure applies to
  165. * nQpI : QP value to use for index frames
  166. * nQpP : QP value to use for P frames
  167. * nQpB : QP values to use for bidirectional frames
  168. */
  169. typedef struct OMX_VIDEO_PARAM_QUANTIZATIONTYPE {
  170. OMX_U32 nSize;
  171. OMX_VERSIONTYPE nVersion;
  172. OMX_U32 nPortIndex;
  173. OMX_U32 nQpI;
  174. OMX_U32 nQpP;
  175. OMX_U32 nQpB;
  176. } OMX_VIDEO_PARAM_QUANTIZATIONTYPE;
  177. /**
  178. * Structure for configuration of video fast update parameters.
  179. *
  180. * STRUCT MEMBERS:
  181. * nSize : Size of the structure in bytes
  182. * nVersion : OMX specification version info
  183. * nPortIndex : Port that this structure applies to
  184. * bEnableVFU : Enable/Disable video fast update
  185. * nFirstGOB : Specifies the number of the first macroblock row
  186. * nFirstMB : specifies the first MB relative to the specified first GOB
  187. * nNumMBs : Specifies the number of MBs to be refreshed from nFirstGOB
  188. * and nFirstMB
  189. */
  190. typedef struct OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE {
  191. OMX_U32 nSize;
  192. OMX_VERSIONTYPE nVersion;
  193. OMX_U32 nPortIndex;
  194. OMX_BOOL bEnableVFU;
  195. OMX_U32 nFirstGOB;
  196. OMX_U32 nFirstMB;
  197. OMX_U32 nNumMBs;
  198. } OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE;
  199. /**
  200. * Enumeration of possible bitrate control types
  201. */
  202. typedef enum OMX_VIDEO_CONTROLRATETYPE {
  203. OMX_Video_ControlRateDisable,
  204. OMX_Video_ControlRateVariable,
  205. OMX_Video_ControlRateConstant,
  206. OMX_Video_ControlRateVariableSkipFrames,
  207. OMX_Video_ControlRateConstantSkipFrames,
  208. OMX_Video_ControlRateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  209. OMX_Video_ControlRateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  210. OMX_Video_ControlRateMax = 0x7FFFFFFF
  211. } OMX_VIDEO_CONTROLRATETYPE;
  212. /**
  213. * Structure for configuring bitrate mode of a codec.
  214. *
  215. * STRUCT MEMBERS:
  216. * nSize : Size of the struct in bytes
  217. * nVersion : OMX spec version info
  218. * nPortIndex : Port that this struct applies to
  219. * eControlRate : Control rate type enum
  220. * nTargetBitrate : Target bitrate to encode with
  221. */
  222. typedef struct OMX_VIDEO_PARAM_BITRATETYPE {
  223. OMX_U32 nSize;
  224. OMX_VERSIONTYPE nVersion;
  225. OMX_U32 nPortIndex;
  226. OMX_VIDEO_CONTROLRATETYPE eControlRate;
  227. OMX_U32 nTargetBitrate;
  228. } OMX_VIDEO_PARAM_BITRATETYPE;
  229. /**
  230. * Enumeration of possible motion vector (MV) types
  231. */
  232. typedef enum OMX_VIDEO_MOTIONVECTORTYPE {
  233. OMX_Video_MotionVectorPixel,
  234. OMX_Video_MotionVectorHalfPel,
  235. OMX_Video_MotionVectorQuarterPel,
  236. OMX_Video_MotionVectorEighthPel,
  237. OMX_Video_MotionVectorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  238. OMX_Video_MotionVectorVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  239. OMX_Video_MotionVectorMax = 0x7FFFFFFF
  240. } OMX_VIDEO_MOTIONVECTORTYPE;
  241. /**
  242. * Structure for configuring the number of motion vectors used as well
  243. * as their accuracy.
  244. *
  245. * STRUCT MEMBERS:
  246. * nSize : Size of the struct in bytes
  247. * nVersion : OMX spec version info
  248. * nPortIndex : port that this structure applies to
  249. * eAccuracy : Enumerated MV accuracy
  250. * bUnrestrictedMVs : Allow unrestricted MVs
  251. * bFourMV : Allow use of 4 MVs
  252. * sXSearchRange : Search range in horizontal direction for MVs
  253. * sYSearchRange : Search range in vertical direction for MVs
  254. */
  255. typedef struct OMX_VIDEO_PARAM_MOTIONVECTORTYPE {
  256. OMX_U32 nSize;
  257. OMX_VERSIONTYPE nVersion;
  258. OMX_U32 nPortIndex;
  259. OMX_VIDEO_MOTIONVECTORTYPE eAccuracy;
  260. OMX_BOOL bUnrestrictedMVs;
  261. OMX_BOOL bFourMV;
  262. OMX_S32 sXSearchRange;
  263. OMX_S32 sYSearchRange;
  264. } OMX_VIDEO_PARAM_MOTIONVECTORTYPE;
  265. /**
  266. * Enumeration of possible methods to use for Intra Refresh
  267. */
  268. typedef enum OMX_VIDEO_INTRAREFRESHTYPE {
  269. OMX_VIDEO_IntraRefreshCyclic,
  270. OMX_VIDEO_IntraRefreshAdaptive,
  271. OMX_VIDEO_IntraRefreshBoth,
  272. OMX_VIDEO_IntraRefreshKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  273. OMX_VIDEO_IntraRefreshVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  274. OMX_VIDEO_IntraRefreshMax = 0x7FFFFFFF
  275. } OMX_VIDEO_INTRAREFRESHTYPE;
  276. /**
  277. * Structure for configuring intra refresh mode
  278. *
  279. * STRUCT MEMBERS:
  280. * nSize : Size of the structure in bytes
  281. * nVersion : OMX specification version information
  282. * nPortIndex : Port that this structure applies to
  283. * eRefreshMode : Cyclic, Adaptive, or Both
  284. * nAirMBs : Number of intra macroblocks to refresh in a frame when
  285. * AIR is enabled
  286. * nAirRef : Number of times a motion marked macroblock has to be
  287. * intra coded
  288. * nCirMBs : Number of consecutive macroblocks to be coded as "intra"
  289. * when CIR is enabled
  290. */
  291. typedef struct OMX_VIDEO_PARAM_INTRAREFRESHTYPE {
  292. OMX_U32 nSize;
  293. OMX_VERSIONTYPE nVersion;
  294. OMX_U32 nPortIndex;
  295. OMX_VIDEO_INTRAREFRESHTYPE eRefreshMode;
  296. OMX_U32 nAirMBs;
  297. OMX_U32 nAirRef;
  298. OMX_U32 nCirMBs;
  299. } OMX_VIDEO_PARAM_INTRAREFRESHTYPE;
  300. /**
  301. * Structure for enabling various error correction methods for video
  302. * compression.
  303. *
  304. * STRUCT MEMBERS:
  305. * nSize : Size of the structure in bytes
  306. * nVersion : OMX specification version information
  307. * nPortIndex : Port that this structure applies to
  308. * bEnableHEC : Enable/disable header extension codes (HEC)
  309. * bEnableResync : Enable/disable resynchronization markers
  310. * nResynchMarkerSpacing : Resynch markers interval (in bits) to be
  311. * applied in the stream
  312. * bEnableDataPartitioning : Enable/disable data partitioning
  313. * bEnableRVLC : Enable/disable reversible variable length
  314. * coding
  315. */
  316. typedef struct OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE {
  317. OMX_U32 nSize;
  318. OMX_VERSIONTYPE nVersion;
  319. OMX_U32 nPortIndex;
  320. OMX_BOOL bEnableHEC;
  321. OMX_BOOL bEnableResync;
  322. OMX_U32 nResynchMarkerSpacing;
  323. OMX_BOOL bEnableDataPartitioning;
  324. OMX_BOOL bEnableRVLC;
  325. } OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE;
  326. /**
  327. * Configuration of variable block-size motion compensation (VBSMC)
  328. *
  329. * STRUCT MEMBERS:
  330. * nSize : Size of the structure in bytes
  331. * nVersion : OMX specification version information
  332. * nPortIndex : Port that this structure applies to
  333. * b16x16 : Enable inter block search 16x16
  334. * b16x8 : Enable inter block search 16x8
  335. * b8x16 : Enable inter block search 8x16
  336. * b8x8 : Enable inter block search 8x8
  337. * b8x4 : Enable inter block search 8x4
  338. * b4x8 : Enable inter block search 4x8
  339. * b4x4 : Enable inter block search 4x4
  340. */
  341. typedef struct OMX_VIDEO_PARAM_VBSMCTYPE {
  342. OMX_U32 nSize;
  343. OMX_VERSIONTYPE nVersion;
  344. OMX_U32 nPortIndex;
  345. OMX_BOOL b16x16;
  346. OMX_BOOL b16x8;
  347. OMX_BOOL b8x16;
  348. OMX_BOOL b8x8;
  349. OMX_BOOL b8x4;
  350. OMX_BOOL b4x8;
  351. OMX_BOOL b4x4;
  352. } OMX_VIDEO_PARAM_VBSMCTYPE;
  353. /**
  354. * H.263 profile types, each profile indicates support for various
  355. * performance bounds and different annexes.
  356. *
  357. * ENUMS:
  358. * Baseline : Baseline Profile: H.263 (V1), no optional modes
  359. * H320 Coding : H.320 Coding Efficiency Backward Compatibility
  360. * Profile: H.263+ (V2), includes annexes I, J, L.4
  361. * and T
  362. * BackwardCompatible : Backward Compatibility Profile: H.263 (V1),
  363. * includes annex F
  364. * ISWV2 : Interactive Streaming Wireless Profile: H.263+
  365. * (V2), includes annexes I, J, K and T
  366. * ISWV3 : Interactive Streaming Wireless Profile: H.263++
  367. * (V3), includes profile 3 and annexes V and W.6.3.8
  368. * HighCompression : Conversational High Compression Profile: H.263++
  369. * (V3), includes profiles 1 & 2 and annexes D and U
  370. * Internet : Conversational Internet Profile: H.263++ (V3),
  371. * includes profile 5 and annex K
  372. * Interlace : Conversational Interlace Profile: H.263++ (V3),
  373. * includes profile 5 and annex W.6.3.11
  374. * HighLatency : High Latency Profile: H.263++ (V3), includes
  375. * profile 6 and annexes O.1 and P.5
  376. */
  377. typedef enum OMX_VIDEO_H263PROFILETYPE {
  378. OMX_VIDEO_H263ProfileBaseline = 0x01,
  379. OMX_VIDEO_H263ProfileH320Coding = 0x02,
  380. OMX_VIDEO_H263ProfileBackwardCompatible = 0x04,
  381. OMX_VIDEO_H263ProfileISWV2 = 0x08,
  382. OMX_VIDEO_H263ProfileISWV3 = 0x10,
  383. OMX_VIDEO_H263ProfileHighCompression = 0x20,
  384. OMX_VIDEO_H263ProfileInternet = 0x40,
  385. OMX_VIDEO_H263ProfileInterlace = 0x80,
  386. OMX_VIDEO_H263ProfileHighLatency = 0x100,
  387. OMX_VIDEO_H263ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  388. OMX_VIDEO_H263ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  389. OMX_VIDEO_H263ProfileMax = 0x7FFFFFFF
  390. } OMX_VIDEO_H263PROFILETYPE;
  391. /**
  392. * H.263 level types, each level indicates support for various frame sizes,
  393. * bit rates, decoder frame rates.
  394. */
  395. typedef enum OMX_VIDEO_H263LEVELTYPE {
  396. OMX_VIDEO_H263Level10 = 0x01,
  397. OMX_VIDEO_H263Level20 = 0x02,
  398. OMX_VIDEO_H263Level30 = 0x04,
  399. OMX_VIDEO_H263Level40 = 0x08,
  400. OMX_VIDEO_H263Level45 = 0x10,
  401. OMX_VIDEO_H263Level50 = 0x20,
  402. OMX_VIDEO_H263Level60 = 0x40,
  403. OMX_VIDEO_H263Level70 = 0x80,
  404. OMX_VIDEO_H263LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  405. OMX_VIDEO_H263LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  406. OMX_VIDEO_H263LevelMax = 0x7FFFFFFF
  407. } OMX_VIDEO_H263LEVELTYPE;
  408. /**
  409. * Specifies the picture type. These values should be OR'd to signal all
  410. * pictures types which are allowed.
  411. *
  412. * ENUMS:
  413. * Generic Picture Types: I, P and B
  414. * H.263 Specific Picture Types: SI and SP
  415. * H.264 Specific Picture Types: EI and EP
  416. * MPEG-4 Specific Picture Types: S
  417. */
  418. typedef enum OMX_VIDEO_PICTURETYPE {
  419. OMX_VIDEO_PictureTypeI = 0x01,
  420. OMX_VIDEO_PictureTypeP = 0x02,
  421. OMX_VIDEO_PictureTypeB = 0x04,
  422. OMX_VIDEO_PictureTypeSI = 0x08,
  423. OMX_VIDEO_PictureTypeSP = 0x10,
  424. OMX_VIDEO_PictureTypeEI = 0x11,
  425. OMX_VIDEO_PictureTypeEP = 0x12,
  426. OMX_VIDEO_PictureTypeS = 0x14,
  427. OMX_VIDEO_PictureTypeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  428. OMX_VIDEO_PictureTypeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  429. OMX_VIDEO_PictureTypeMax = 0x7FFFFFFF
  430. } OMX_VIDEO_PICTURETYPE;
  431. /**
  432. * H.263 Params
  433. *
  434. * STRUCT MEMBERS:
  435. * nSize : Size of the structure in bytes
  436. * nVersion : OMX specification version information
  437. * nPortIndex : Port that this structure applies to
  438. * nPFrames : Number of P frames between each I frame
  439. * nBFrames : Number of B frames between each I frame
  440. * eProfile : H.263 profile(s) to use
  441. * eLevel : H.263 level(s) to use
  442. * bPLUSPTYPEAllowed : Indicating that it is allowed to use PLUSPTYPE
  443. * (specified in the 1998 version of H.263) to
  444. * indicate custom picture sizes or clock
  445. * frequencies
  446. * nAllowedPictureTypes : Specifies the picture types allowed in the
  447. * bitstream
  448. * bForceRoundingTypeToZero : value of the RTYPE bit (bit 6 of MPPTYPE) is
  449. * not constrained. It is recommended to change
  450. * the value of the RTYPE bit for each reference
  451. * picture in error-free communication
  452. * nPictureHeaderRepetition : Specifies the frequency of picture header
  453. * repetition
  454. * nGOBHeaderInterval : Specifies the interval of non-empty GOB
  455. * headers in units of GOBs
  456. */
  457. typedef struct OMX_VIDEO_PARAM_H263TYPE {
  458. OMX_U32 nSize;
  459. OMX_VERSIONTYPE nVersion;
  460. OMX_U32 nPortIndex;
  461. OMX_U32 nPFrames;
  462. OMX_U32 nBFrames;
  463. OMX_VIDEO_H263PROFILETYPE eProfile;
  464. OMX_VIDEO_H263LEVELTYPE eLevel;
  465. OMX_BOOL bPLUSPTYPEAllowed;
  466. OMX_U32 nAllowedPictureTypes;
  467. OMX_BOOL bForceRoundingTypeToZero;
  468. OMX_U32 nPictureHeaderRepetition;
  469. OMX_U32 nGOBHeaderInterval;
  470. } OMX_VIDEO_PARAM_H263TYPE;
  471. /**
  472. * MPEG-2 profile types, each profile indicates support for various
  473. * performance bounds and different annexes.
  474. */
  475. typedef enum OMX_VIDEO_MPEG2PROFILETYPE {
  476. OMX_VIDEO_MPEG2ProfileSimple = 0, /**< Simple Profile */
  477. OMX_VIDEO_MPEG2ProfileMain, /**< Main Profile */
  478. OMX_VIDEO_MPEG2Profile422, /**< 4:2:2 Profile */
  479. OMX_VIDEO_MPEG2ProfileSNR, /**< SNR Profile */
  480. OMX_VIDEO_MPEG2ProfileSpatial, /**< Spatial Profile */
  481. OMX_VIDEO_MPEG2ProfileHigh, /**< High Profile */
  482. OMX_VIDEO_MPEG2ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  483. OMX_VIDEO_MPEG2ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  484. OMX_VIDEO_MPEG2ProfileMax = 0x7FFFFFFF
  485. } OMX_VIDEO_MPEG2PROFILETYPE;
  486. /**
  487. * MPEG-2 level types, each level indicates support for various frame
  488. * sizes, bit rates, decoder frame rates. No need
  489. */
  490. typedef enum OMX_VIDEO_MPEG2LEVELTYPE {
  491. OMX_VIDEO_MPEG2LevelLL = 0, /**< Low Level */
  492. OMX_VIDEO_MPEG2LevelML, /**< Main Level */
  493. OMX_VIDEO_MPEG2LevelH14, /**< High 1440 */
  494. OMX_VIDEO_MPEG2LevelHL, /**< High Level */
  495. OMX_VIDEO_MPEG2LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  496. OMX_VIDEO_MPEG2LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  497. OMX_VIDEO_MPEG2LevelMax = 0x7FFFFFFF
  498. } OMX_VIDEO_MPEG2LEVELTYPE;
  499. /**
  500. * MPEG-2 params
  501. *
  502. * STRUCT MEMBERS:
  503. * nSize : Size of the structure in bytes
  504. * nVersion : OMX specification version information
  505. * nPortIndex : Port that this structure applies to
  506. * nPFrames : Number of P frames between each I frame
  507. * nBFrames : Number of B frames between each I frame
  508. * eProfile : MPEG-2 profile(s) to use
  509. * eLevel : MPEG-2 levels(s) to use
  510. */
  511. typedef struct OMX_VIDEO_PARAM_MPEG2TYPE {
  512. OMX_U32 nSize;
  513. OMX_VERSIONTYPE nVersion;
  514. OMX_U32 nPortIndex;
  515. OMX_U32 nPFrames;
  516. OMX_U32 nBFrames;
  517. OMX_VIDEO_MPEG2PROFILETYPE eProfile;
  518. OMX_VIDEO_MPEG2LEVELTYPE eLevel;
  519. } OMX_VIDEO_PARAM_MPEG2TYPE;
  520. /**
  521. * MPEG-4 profile types, each profile indicates support for various
  522. * performance bounds and different annexes.
  523. *
  524. * ENUMS:
  525. * - Simple Profile, Levels 1-3
  526. * - Simple Scalable Profile, Levels 1-2
  527. * - Core Profile, Levels 1-2
  528. * - Main Profile, Levels 2-4
  529. * - N-bit Profile, Level 2
  530. * - Scalable Texture Profile, Level 1
  531. * - Simple Face Animation Profile, Levels 1-2
  532. * - Simple Face and Body Animation (FBA) Profile, Levels 1-2
  533. * - Basic Animated Texture Profile, Levels 1-2
  534. * - Hybrid Profile, Levels 1-2
  535. * - Advanced Real Time Simple Profiles, Levels 1-4
  536. * - Core Scalable Profile, Levels 1-3
  537. * - Advanced Coding Efficiency Profile, Levels 1-4
  538. * - Advanced Core Profile, Levels 1-2
  539. * - Advanced Scalable Texture, Levels 2-3
  540. */
  541. typedef enum OMX_VIDEO_MPEG4PROFILETYPE {
  542. OMX_VIDEO_MPEG4ProfileSimple = 0x01,
  543. OMX_VIDEO_MPEG4ProfileSimpleScalable = 0x02,
  544. OMX_VIDEO_MPEG4ProfileCore = 0x04,
  545. OMX_VIDEO_MPEG4ProfileMain = 0x08,
  546. OMX_VIDEO_MPEG4ProfileNbit = 0x10,
  547. OMX_VIDEO_MPEG4ProfileScalableTexture = 0x20,
  548. OMX_VIDEO_MPEG4ProfileSimpleFace = 0x40,
  549. OMX_VIDEO_MPEG4ProfileSimpleFBA = 0x80,
  550. OMX_VIDEO_MPEG4ProfileBasicAnimated = 0x100,
  551. OMX_VIDEO_MPEG4ProfileHybrid = 0x200,
  552. OMX_VIDEO_MPEG4ProfileAdvancedRealTime = 0x400,
  553. OMX_VIDEO_MPEG4ProfileCoreScalable = 0x800,
  554. OMX_VIDEO_MPEG4ProfileAdvancedCoding = 0x1000,
  555. OMX_VIDEO_MPEG4ProfileAdvancedCore = 0x2000,
  556. OMX_VIDEO_MPEG4ProfileAdvancedScalable = 0x4000,
  557. OMX_VIDEO_MPEG4ProfileAdvancedSimple = 0x8000,
  558. OMX_VIDEO_MPEG4ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  559. OMX_VIDEO_MPEG4ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  560. OMX_VIDEO_MPEG4ProfileMax = 0x7FFFFFFF
  561. } OMX_VIDEO_MPEG4PROFILETYPE;
  562. /**
  563. * MPEG-4 level types, each level indicates support for various frame
  564. * sizes, bit rates, decoder frame rates. No need
  565. */
  566. typedef enum OMX_VIDEO_MPEG4LEVELTYPE {
  567. OMX_VIDEO_MPEG4Level0 = 0x01, /**< Level 0 */
  568. OMX_VIDEO_MPEG4Level0b = 0x02, /**< Level 0b */
  569. OMX_VIDEO_MPEG4Level1 = 0x04, /**< Level 1 */
  570. OMX_VIDEO_MPEG4Level2 = 0x08, /**< Level 2 */
  571. OMX_VIDEO_MPEG4Level3 = 0x10, /**< Level 3 */
  572. OMX_VIDEO_MPEG4Level4 = 0x20, /**< Level 4 */
  573. OMX_VIDEO_MPEG4Level4a = 0x40, /**< Level 4a */
  574. OMX_VIDEO_MPEG4Level5 = 0x80, /**< Level 5 */
  575. OMX_VIDEO_MPEG4LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  576. OMX_VIDEO_MPEG4LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  577. OMX_VIDEO_MPEG4LevelMax = 0x7FFFFFFF
  578. } OMX_VIDEO_MPEG4LEVELTYPE;
  579. /**
  580. * MPEG-4 configuration. This structure handles configuration options
  581. * which are specific to MPEG4 algorithms
  582. *
  583. * STRUCT MEMBERS:
  584. * nSize : Size of the structure in bytes
  585. * nVersion : OMX specification version information
  586. * nPortIndex : Port that this structure applies to
  587. * nSliceHeaderSpacing : Number of macroblocks between slice header (H263+
  588. * Annex K). Put zero if not used
  589. * bSVH : Enable Short Video Header mode
  590. * bGov : Flag to enable GOV
  591. * nPFrames : Number of P frames between each I frame (also called
  592. * GOV period)
  593. * nBFrames : Number of B frames between each I frame
  594. * nIDCVLCThreshold : Value of intra DC VLC threshold
  595. * bACPred : Flag to use ac prediction
  596. * nMaxPacketSize : Maximum size of packet in bytes.
  597. * nTimeIncRes : Used to pass VOP time increment resolution for MPEG4.
  598. * Interpreted as described in MPEG4 standard.
  599. * eProfile : MPEG-4 profile(s) to use.
  600. * eLevel : MPEG-4 level(s) to use.
  601. * nAllowedPictureTypes : Specifies the picture types allowed in the bitstream
  602. * nHeaderExtension : Specifies the number of consecutive video packet
  603. * headers within a VOP
  604. * bReversibleVLC : Specifies whether reversible variable length coding
  605. * is in use
  606. */
  607. typedef struct OMX_VIDEO_PARAM_MPEG4TYPE {
  608. OMX_U32 nSize;
  609. OMX_VERSIONTYPE nVersion;
  610. OMX_U32 nPortIndex;
  611. OMX_U32 nSliceHeaderSpacing;
  612. OMX_BOOL bSVH;
  613. OMX_BOOL bGov;
  614. OMX_U32 nPFrames;
  615. OMX_U32 nBFrames;
  616. OMX_U32 nIDCVLCThreshold;
  617. OMX_BOOL bACPred;
  618. OMX_U32 nMaxPacketSize;
  619. OMX_U32 nTimeIncRes;
  620. OMX_VIDEO_MPEG4PROFILETYPE eProfile;
  621. OMX_VIDEO_MPEG4LEVELTYPE eLevel;
  622. OMX_U32 nAllowedPictureTypes;
  623. OMX_U32 nHeaderExtension;
  624. OMX_BOOL bReversibleVLC;
  625. } OMX_VIDEO_PARAM_MPEG4TYPE;
  626. /**
  627. * WMV Versions
  628. */
  629. typedef enum OMX_VIDEO_WMVFORMATTYPE {
  630. OMX_VIDEO_WMVFormatUnused = 0x01, /**< Format unused or unknown */
  631. OMX_VIDEO_WMVFormat7 = 0x02, /**< Windows Media Video format 7 */
  632. OMX_VIDEO_WMVFormat8 = 0x04, /**< Windows Media Video format 8 */
  633. OMX_VIDEO_WMVFormat9 = 0x08, /**< Windows Media Video format 9 */
  634. OMX_VIDEO_WMFFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  635. OMX_VIDEO_WMFFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  636. OMX_VIDEO_WMVFormatMax = 0x7FFFFFFF
  637. } OMX_VIDEO_WMVFORMATTYPE;
  638. /**
  639. * WMV Params
  640. *
  641. * STRUCT MEMBERS:
  642. * nSize : Size of the structure in bytes
  643. * nVersion : OMX specification version information
  644. * nPortIndex : Port that this structure applies to
  645. * eFormat : Version of WMV stream / data
  646. */
  647. typedef struct OMX_VIDEO_PARAM_WMVTYPE {
  648. OMX_U32 nSize;
  649. OMX_VERSIONTYPE nVersion;
  650. OMX_U32 nPortIndex;
  651. OMX_VIDEO_WMVFORMATTYPE eFormat;
  652. } OMX_VIDEO_PARAM_WMVTYPE;
  653. /**
  654. * Real Video Version
  655. */
  656. typedef enum OMX_VIDEO_RVFORMATTYPE {
  657. OMX_VIDEO_RVFormatUnused = 0, /**< Format unused or unknown */
  658. OMX_VIDEO_RVFormat8, /**< Real Video format 8 */
  659. OMX_VIDEO_RVFormat9, /**< Real Video format 9 */
  660. OMX_VIDEO_RVFormatG2, /**< Real Video Format G2 */
  661. OMX_VIDEO_RVFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  662. OMX_VIDEO_RVFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  663. OMX_VIDEO_RVFormatMax = 0x7FFFFFFF
  664. } OMX_VIDEO_RVFORMATTYPE;
  665. /**
  666. * Real Video Params
  667. *
  668. * STUCT MEMBERS:
  669. * nSize : Size of the structure in bytes
  670. * nVersion : OMX specification version information
  671. * nPortIndex : Port that this structure applies to
  672. * eFormat : Version of RV stream / data
  673. * nBitsPerPixel : Bits per pixel coded in the frame
  674. * nPaddedWidth : Padded width in pixel of a video frame
  675. * nPaddedHeight : Padded Height in pixels of a video frame
  676. * nFrameRate : Rate of video in frames per second
  677. * nBitstreamFlags : Flags which internal information about the bitstream
  678. * nBitstreamVersion : Bitstream version
  679. * nMaxEncodeFrameSize: Max encoded frame size
  680. * bEnablePostFilter : Turn on/off post filter
  681. * bEnableTemporalInterpolation : Turn on/off temporal interpolation
  682. * bEnableLatencyMode : When enabled, the decoder does not display a decoded
  683. * frame until it has detected that no enhancement layer
  684. * frames or dependent B frames will be coming. This
  685. * detection usually occurs when a subsequent non-B
  686. * frame is encountered
  687. */
  688. typedef struct OMX_VIDEO_PARAM_RVTYPE {
  689. OMX_U32 nSize;
  690. OMX_VERSIONTYPE nVersion;
  691. OMX_U32 nPortIndex;
  692. OMX_VIDEO_RVFORMATTYPE eFormat;
  693. OMX_U16 nBitsPerPixel;
  694. OMX_U16 nPaddedWidth;
  695. OMX_U16 nPaddedHeight;
  696. OMX_U32 nFrameRate;
  697. OMX_U32 nBitstreamFlags;
  698. OMX_U32 nBitstreamVersion;
  699. OMX_U32 nMaxEncodeFrameSize;
  700. OMX_BOOL bEnablePostFilter;
  701. OMX_BOOL bEnableTemporalInterpolation;
  702. OMX_BOOL bEnableLatencyMode;
  703. } OMX_VIDEO_PARAM_RVTYPE;
  704. /**
  705. * AVC profile types, each profile indicates support for various
  706. * performance bounds and different annexes.
  707. */
  708. typedef enum OMX_VIDEO_AVCPROFILETYPE {
  709. OMX_VIDEO_AVCProfileBaseline = 0x01, /**< Baseline profile */
  710. OMX_VIDEO_AVCProfileMain = 0x02, /**< Main profile */
  711. OMX_VIDEO_AVCProfileExtended = 0x04, /**< Extended profile */
  712. OMX_VIDEO_AVCProfileHigh = 0x08, /**< High profile */
  713. OMX_VIDEO_AVCProfileHigh10 = 0x10, /**< High 10 profile */
  714. OMX_VIDEO_AVCProfileHigh422 = 0x20, /**< High 4:2:2 profile */
  715. OMX_VIDEO_AVCProfileHigh444 = 0x40, /**< High 4:4:4 profile */
  716. OMX_VIDEO_AVCProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  717. OMX_VIDEO_AVCProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  718. OMX_VIDEO_AVCProfileMax = 0x7FFFFFFF
  719. } OMX_VIDEO_AVCPROFILETYPE;
  720. /**
  721. * AVC level types, each level indicates support for various frame sizes,
  722. * bit rates, decoder frame rates. No need
  723. */
  724. typedef enum OMX_VIDEO_AVCLEVELTYPE {
  725. OMX_VIDEO_AVCLevel1 = 0x01, /**< Level 1 */
  726. OMX_VIDEO_AVCLevel1b = 0x02, /**< Level 1b */
  727. OMX_VIDEO_AVCLevel11 = 0x04, /**< Level 1.1 */
  728. OMX_VIDEO_AVCLevel12 = 0x08, /**< Level 1.2 */
  729. OMX_VIDEO_AVCLevel13 = 0x10, /**< Level 1.3 */
  730. OMX_VIDEO_AVCLevel2 = 0x20, /**< Level 2 */
  731. OMX_VIDEO_AVCLevel21 = 0x40, /**< Level 2.1 */
  732. OMX_VIDEO_AVCLevel22 = 0x80, /**< Level 2.2 */
  733. OMX_VIDEO_AVCLevel3 = 0x100, /**< Level 3 */
  734. OMX_VIDEO_AVCLevel31 = 0x200, /**< Level 3.1 */
  735. OMX_VIDEO_AVCLevel32 = 0x400, /**< Level 3.2 */
  736. OMX_VIDEO_AVCLevel4 = 0x800, /**< Level 4 */
  737. OMX_VIDEO_AVCLevel41 = 0x1000, /**< Level 4.1 */
  738. OMX_VIDEO_AVCLevel42 = 0x2000, /**< Level 4.2 */
  739. OMX_VIDEO_AVCLevel5 = 0x4000, /**< Level 5 */
  740. OMX_VIDEO_AVCLevel51 = 0x8000, /**< Level 5.1 */
  741. OMX_VIDEO_AVCLevel52 = 0x10000, /**< Level 5.2 */
  742. OMX_VIDEO_AVCLevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  743. OMX_VIDEO_AVCLevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  744. OMX_VIDEO_AVCLevelMax = 0x7FFFFFFF
  745. } OMX_VIDEO_AVCLEVELTYPE;
  746. /**
  747. * AVC loop filter modes
  748. *
  749. * OMX_VIDEO_AVCLoopFilterEnable : Enable
  750. * OMX_VIDEO_AVCLoopFilterDisable : Disable
  751. * OMX_VIDEO_AVCLoopFilterDisableSliceBoundary : Disabled on slice boundaries
  752. */
  753. typedef enum OMX_VIDEO_AVCLOOPFILTERTYPE {
  754. OMX_VIDEO_AVCLoopFilterEnable = 0,
  755. OMX_VIDEO_AVCLoopFilterDisable,
  756. OMX_VIDEO_AVCLoopFilterDisableSliceBoundary,
  757. OMX_VIDEO_AVCLoopFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  758. OMX_VIDEO_AVCLoopFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  759. OMX_VIDEO_AVCLoopFilterMax = 0x7FFFFFFF
  760. } OMX_VIDEO_AVCLOOPFILTERTYPE;
  761. /**
  762. * AVC params
  763. *
  764. * STRUCT MEMBERS:
  765. * nSize : Size of the structure in bytes
  766. * nVersion : OMX specification version information
  767. * nPortIndex : Port that this structure applies to
  768. * nSliceHeaderSpacing : Number of macroblocks between slice header, put
  769. * zero if not used
  770. * nPFrames : Number of P frames between each I frame
  771. * nBFrames : Number of B frames between each I frame
  772. * bUseHadamard : Enable/disable Hadamard transform
  773. * nRefFrames : Max number of reference frames to use for inter
  774. * motion search (1-16)
  775. * nRefIdxTrailing : Pic param set ref frame index (index into ref
  776. * frame buffer of trailing frames list), B frame
  777. * support
  778. * nRefIdxForward : Pic param set ref frame index (index into ref
  779. * frame buffer of forward frames list), B frame
  780. * support
  781. * bEnableUEP : Enable/disable unequal error protection. This
  782. * is only valid of data partitioning is enabled.
  783. * bEnableFMO : Enable/disable flexible macroblock ordering
  784. * bEnableASO : Enable/disable arbitrary slice ordering
  785. * bEnableRS : Enable/disable sending of redundant slices
  786. * eProfile : AVC profile(s) to use
  787. * eLevel : AVC level(s) to use
  788. * nAllowedPictureTypes : Specifies the picture types allowed in the
  789. * bitstream
  790. * bFrameMBsOnly : specifies that every coded picture of the
  791. * coded video sequence is a coded frame
  792. * containing only frame macroblocks
  793. * bMBAFF : Enable/disable switching between frame and
  794. * field macroblocks within a picture
  795. * bEntropyCodingCABAC : Entropy decoding method to be applied for the
  796. * syntax elements for which two descriptors appear
  797. * in the syntax tables
  798. * bWeightedPPrediction : Enable/disable weighted prediction shall not
  799. * be applied to P and SP slices
  800. * nWeightedBipredicitonMode : Default weighted prediction is applied to B
  801. * slices
  802. * bconstIpred : Enable/disable intra prediction
  803. * bDirect8x8Inference : Specifies the method used in the derivation
  804. * process for luma motion vectors for B_Skip,
  805. * B_Direct_16x16 and B_Direct_8x8 as specified
  806. * in subclause 8.4.1.2 of the AVC spec
  807. * bDirectSpatialTemporal : Flag indicating spatial or temporal direct
  808. * mode used in B slice coding (related to
  809. * bDirect8x8Inference) . Spatial direct mode is
  810. * more common and should be the default.
  811. * nCabacInitIdx : Index used to init CABAC contexts
  812. * eLoopFilterMode : Enable/disable loop filter
  813. */
  814. typedef struct OMX_VIDEO_PARAM_AVCTYPE {
  815. OMX_U32 nSize;
  816. OMX_VERSIONTYPE nVersion;
  817. OMX_U32 nPortIndex;
  818. OMX_U32 nSliceHeaderSpacing;
  819. OMX_U32 nPFrames;
  820. OMX_U32 nBFrames;
  821. OMX_BOOL bUseHadamard;
  822. OMX_U32 nRefFrames;
  823. OMX_U32 nRefIdx10ActiveMinus1;
  824. OMX_U32 nRefIdx11ActiveMinus1;
  825. OMX_BOOL bEnableUEP;
  826. OMX_BOOL bEnableFMO;
  827. OMX_BOOL bEnableASO;
  828. OMX_BOOL bEnableRS;
  829. OMX_VIDEO_AVCPROFILETYPE eProfile;
  830. OMX_VIDEO_AVCLEVELTYPE eLevel;
  831. OMX_U32 nAllowedPictureTypes;
  832. OMX_BOOL bFrameMBsOnly;
  833. OMX_BOOL bMBAFF;
  834. OMX_BOOL bEntropyCodingCABAC;
  835. OMX_BOOL bWeightedPPrediction;
  836. OMX_U32 nWeightedBipredicitonMode;
  837. OMX_BOOL bconstIpred ;
  838. OMX_BOOL bDirect8x8Inference;
  839. OMX_BOOL bDirectSpatialTemporal;
  840. OMX_U32 nCabacInitIdc;
  841. OMX_VIDEO_AVCLOOPFILTERTYPE eLoopFilterMode;
  842. } OMX_VIDEO_PARAM_AVCTYPE;
  843. typedef struct OMX_VIDEO_PARAM_PROFILELEVELTYPE {
  844. OMX_U32 nSize;
  845. OMX_VERSIONTYPE nVersion;
  846. OMX_U32 nPortIndex;
  847. OMX_U32 eProfile; /**< type is OMX_VIDEO_AVCPROFILETYPE, OMX_VIDEO_H263PROFILETYPE,
  848. or OMX_VIDEO_MPEG4PROFILETYPE depending on context */
  849. OMX_U32 eLevel; /**< type is OMX_VIDEO_AVCLEVELTYPE, OMX_VIDEO_H263LEVELTYPE,
  850. or OMX_VIDEO_MPEG4PROFILETYPE depending on context */
  851. OMX_U32 nProfileIndex; /**< Used to query for individual profile support information,
  852. This parameter is valid only for
  853. OMX_IndexParamVideoProfileLevelQuerySupported index,
  854. For all other indices this parameter is to be ignored. */
  855. } OMX_VIDEO_PARAM_PROFILELEVELTYPE;
  856. /**
  857. * Structure for dynamically configuring bitrate mode of a codec.
  858. *
  859. * STRUCT MEMBERS:
  860. * nSize : Size of the struct in bytes
  861. * nVersion : OMX spec version info
  862. * nPortIndex : Port that this struct applies to
  863. * nEncodeBitrate : Target average bitrate to be generated in bps
  864. */
  865. typedef struct OMX_VIDEO_CONFIG_BITRATETYPE {
  866. OMX_U32 nSize;
  867. OMX_VERSIONTYPE nVersion;
  868. OMX_U32 nPortIndex;
  869. OMX_U32 nEncodeBitrate;
  870. } OMX_VIDEO_CONFIG_BITRATETYPE;
  871. /**
  872. * Defines Encoder Frame Rate setting
  873. *
  874. * STRUCT MEMBERS:
  875. * nSize : Size of the structure in bytes
  876. * nVersion : OMX specification version information
  877. * nPortIndex : Port that this structure applies to
  878. * xEncodeFramerate : Encoding framerate represented in Q16 format
  879. */
  880. typedef struct OMX_CONFIG_FRAMERATETYPE {
  881. OMX_U32 nSize;
  882. OMX_VERSIONTYPE nVersion;
  883. OMX_U32 nPortIndex;
  884. OMX_U32 xEncodeFramerate; /* Q16 format */
  885. } OMX_CONFIG_FRAMERATETYPE;
  886. typedef struct OMX_CONFIG_INTRAREFRESHVOPTYPE {
  887. OMX_U32 nSize;
  888. OMX_VERSIONTYPE nVersion;
  889. OMX_U32 nPortIndex;
  890. OMX_BOOL IntraRefreshVOP;
  891. } OMX_CONFIG_INTRAREFRESHVOPTYPE;
  892. typedef struct OMX_CONFIG_MACROBLOCKERRORMAPTYPE {
  893. OMX_U32 nSize;
  894. OMX_VERSIONTYPE nVersion;
  895. OMX_U32 nPortIndex;
  896. OMX_U32 nErrMapSize; /* Size of the Error Map in bytes */
  897. OMX_U8 ErrMap[1]; /* Error map hint */
  898. } OMX_CONFIG_MACROBLOCKERRORMAPTYPE;
  899. typedef struct OMX_CONFIG_MBERRORREPORTINGTYPE {
  900. OMX_U32 nSize;
  901. OMX_VERSIONTYPE nVersion;
  902. OMX_U32 nPortIndex;
  903. OMX_BOOL bEnabled;
  904. } OMX_CONFIG_MBERRORREPORTINGTYPE;
  905. typedef struct OMX_PARAM_MACROBLOCKSTYPE {
  906. OMX_U32 nSize;
  907. OMX_VERSIONTYPE nVersion;
  908. OMX_U32 nPortIndex;
  909. OMX_U32 nMacroblocks;
  910. } OMX_PARAM_MACROBLOCKSTYPE;
  911. #ifdef AVS80
  912. /**
  913. * Aspects of color.
  914. */
  915. // NOTE: this structure is expected to grow in the future if new color aspects are
  916. // added to codec bitstreams. OMX component should not require a specific nSize
  917. // though could verify that nSize is at least the size of the structure at the
  918. // time of implementation. All new fields will be added at the end of the structure
  919. // ensuring backward compatibility.
  920. typedef enum OMX_RANGE {
  921. RangeUnspecified,
  922. RangeFull,
  923. RangeLimited,
  924. RangeOther = 0xff,
  925. } OMX_RANGE;
  926. typedef enum OMX_PRIMARIES {
  927. PrimariesUnspecified,
  928. PrimariesBT709_5, // Rec.ITU-R BT.709-5 or equivalent
  929. PrimariesBT470_6M, // Rec.ITU-R BT.470-6 System M or equivalent
  930. PrimariesBT601_6_625, // Rec.ITU-R BT.601-6 625 or equivalent
  931. PrimariesBT601_6_525, // Rec.ITU-R BT.601-6 525 or equivalent
  932. PrimariesGenericFilm, // Generic Film
  933. PrimariesBT2020, // Rec.ITU-R BT.2020 or equivalent
  934. PrimariesOther = 0xff,
  935. } OMX_PRIMARIES;
  936. typedef enum OMX_TRANSFER {
  937. TransferUnspecified,
  938. TransferLinear, // Linear transfer characteristics
  939. TransferSRGB, // sRGB or equivalent
  940. TransferSMPTE170M, // SMPTE 170M or equivalent (e.g. BT.601/709/2020)
  941. TransferGamma22, // Assumed display gamma 2.2
  942. TransferGamma28, // Assumed display gamma 2.8
  943. TransferST2084, // SMPTE ST 2084 for 10/12/14/16 bit systems
  944. TransferHLG, // ARIB STD-B67 hybrid-log-gamma
  945. // transfers unlikely to be required by Android
  946. TransferSMPTE240M = 0x40, // SMPTE 240M
  947. TransferXvYCC, // IEC 61966-2-4
  948. TransferBT1361, // Rec.ITU-R BT.1361 extended gamut
  949. TransferST428, // SMPTE ST 428-1
  950. TransferOther = 0xff,
  951. } OMX_TRANSFER;
  952. typedef enum OMX_MATRIXCOEFFS {
  953. MatrixUnspecified,
  954. MatrixBT709_5, // Rec.ITU-R BT.709-5 or equivalent
  955. MatrixBT470_6M, // KR=0.30, KB=0.11 or equivalent
  956. MatrixBT601_6, // Rec.ITU-R BT.601-6 625 or equivalent
  957. MatrixSMPTE240M, // SMPTE 240M or equivalent
  958. MatrixBT2020, // Rec.ITU-R BT.2020 non-constant luminance
  959. MatrixBT2020Constant, // Rec.ITU-R BT.2020 constant luminance
  960. MatrixOther = 0xff,
  961. } OMX_MATRIXCOEFFS;
  962. typedef struct OMX_COLORASPECTS {
  963. OMX_RANGE mRange; // IN/OUT
  964. OMX_PRIMARIES mPrimaries; // IN/OUT
  965. OMX_TRANSFER mTransfer; // IN/OUT
  966. OMX_MATRIXCOEFFS mMatrixCoeffs; // IN/OUT
  967. } OMX_COLORASPECTS;
  968. typedef struct OMX_CONFIG_DESCRIBECOLORASPECTSPARAMS {
  969. OMX_U32 nSize; // IN
  970. OMX_VERSIONTYPE nVersion; // IN
  971. OMX_U32 nPortIndex; // IN
  972. OMX_BOOL bRequestingDataSpace; // IN
  973. OMX_BOOL bDataSpaceChanged; // IN
  974. OMX_U32 nPixelFormat; // IN
  975. OMX_U32 nDataSpace; // OUT
  976. OMX_COLORASPECTS sAspects; // IN/OUT
  977. } OMX_CONFIG_DESCRIBECOLORASPECTSPARAMS;
  978. #endif
  979. /**
  980. * AVC Slice Mode modes
  981. *
  982. * OMX_VIDEO_SLICEMODE_AVCDefault : Normal frame encoding, one slice per frame
  983. * OMX_VIDEO_SLICEMODE_AVCMBSlice : NAL mode, number of MBs per frame
  984. * OMX_VIDEO_SLICEMODE_AVCByteSlice : NAL mode, number of bytes per frame
  985. */
  986. typedef enum OMX_VIDEO_AVCSLICEMODETYPE {
  987. OMX_VIDEO_SLICEMODE_AVCDefault = 0,
  988. OMX_VIDEO_SLICEMODE_AVCMBSlice,
  989. OMX_VIDEO_SLICEMODE_AVCByteSlice,
  990. OMX_VIDEO_SLICEMODE_AVCKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  991. OMX_VIDEO_SLICEMODE_AVCVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  992. OMX_VIDEO_SLICEMODE_AVCLevelMax = 0x7FFFFFFF
  993. } OMX_VIDEO_AVCSLICEMODETYPE;
  994. /**
  995. * AVC FMO Slice Mode Params
  996. *
  997. * STRUCT MEMBERS:
  998. * nSize : Size of the structure in bytes
  999. * nVersion : OMX specification version information
  1000. * nPortIndex : Port that this structure applies to
  1001. * nNumSliceGroups : Specifies the number of slice groups
  1002. * nSliceGroupMapType : Specifies the type of slice groups
  1003. * eSliceMode : Specifies the type of slice
  1004. */
  1005. typedef struct OMX_VIDEO_PARAM_AVCSLICEFMO {
  1006. OMX_U32 nSize;
  1007. OMX_VERSIONTYPE nVersion;
  1008. OMX_U32 nPortIndex;
  1009. OMX_U8 nNumSliceGroups;
  1010. OMX_U8 nSliceGroupMapType;
  1011. OMX_VIDEO_AVCSLICEMODETYPE eSliceMode;
  1012. } OMX_VIDEO_PARAM_AVCSLICEFMO;
  1013. /**
  1014. * AVC IDR Period Configs
  1015. *
  1016. * STRUCT MEMBERS:
  1017. * nSize : Size of the structure in bytes
  1018. * nVersion : OMX specification version information
  1019. * nPortIndex : Port that this structure applies to
  1020. * nIDRPeriod : Specifies periodicity of IDR frames
  1021. * nPFrames : Specifies internal of coding Intra frames
  1022. */
  1023. typedef struct OMX_VIDEO_CONFIG_AVCINTRAPERIOD {
  1024. OMX_U32 nSize;
  1025. OMX_VERSIONTYPE nVersion;
  1026. OMX_U32 nPortIndex;
  1027. OMX_U32 nIDRPeriod;
  1028. OMX_U32 nPFrames;
  1029. } OMX_VIDEO_CONFIG_AVCINTRAPERIOD;
  1030. /**
  1031. * AVC NAL Size Configs
  1032. *
  1033. * STRUCT MEMBERS:
  1034. * nSize : Size of the structure in bytes
  1035. * nVersion : OMX specification version information
  1036. * nPortIndex : Port that this structure applies to
  1037. * nNaluBytes : Specifies the NAL unit size
  1038. */
  1039. typedef struct OMX_VIDEO_CONFIG_NALSIZE {
  1040. OMX_U32 nSize;
  1041. OMX_VERSIONTYPE nVersion;
  1042. OMX_U32 nPortIndex;
  1043. OMX_U32 nNaluBytes;
  1044. } OMX_VIDEO_CONFIG_NALSIZE;
  1045. /** @} */
  1046. #ifdef __cplusplus
  1047. }
  1048. #endif /* __cplusplus */
  1049. #endif
  1050. /* File EOF */