OMX_IVCommon.h 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922
  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_IVCommon.h - OpenMax IL version 1.1.2
  25. * The structures needed by Video and Image components to exchange
  26. * parameters and configuration data with the components.
  27. */
  28. #ifndef OMX_IVCommon_h
  29. #define OMX_IVCommon_h
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif /* __cplusplus */
  33. /**
  34. * Each OMX header must include all required header files to allow the header
  35. * to compile without errors. The includes below are required for this header
  36. * file to compile successfully
  37. */
  38. #include <OMX_Core.h>
  39. /** @defgroup iv OpenMAX IL Imaging and Video Domain
  40. * Common structures for OpenMAX IL Imaging and Video domains
  41. * @{
  42. */
  43. /**
  44. * Enumeration defining possible uncompressed image/video formats.
  45. *
  46. * ENUMS:
  47. * Unused : Placeholder value when format is N/A
  48. * Monochrome : black and white
  49. * 8bitRGB332 : Red 7:5, Green 4:2, Blue 1:0
  50. * 12bitRGB444 : Red 11:8, Green 7:4, Blue 3:0
  51. * 16bitARGB4444 : Alpha 15:12, Red 11:8, Green 7:4, Blue 3:0
  52. * 16bitARGB1555 : Alpha 15, Red 14:10, Green 9:5, Blue 4:0
  53. * 16bitRGB565 : Red 15:11, Green 10:5, Blue 4:0
  54. * 16bitBGR565 : Blue 15:11, Green 10:5, Red 4:0
  55. * 18bitRGB666 : Red 17:12, Green 11:6, Blue 5:0
  56. * 18bitARGB1665 : Alpha 17, Red 16:11, Green 10:5, Blue 4:0
  57. * 19bitARGB1666 : Alpha 18, Red 17:12, Green 11:6, Blue 5:0
  58. * 24bitRGB888 : Red 24:16, Green 15:8, Blue 7:0
  59. * 24bitBGR888 : Blue 24:16, Green 15:8, Red 7:0
  60. * 24bitARGB1887 : Alpha 23, Red 22:15, Green 14:7, Blue 6:0
  61. * 25bitARGB1888 : Alpha 24, Red 23:16, Green 15:8, Blue 7:0
  62. * 32bitBGRA8888 : Blue 31:24, Green 23:16, Red 15:8, Alpha 7:0
  63. * 32bitARGB8888 : Alpha 31:24, Red 23:16, Green 15:8, Blue 7:0
  64. * YUV411Planar : U,Y are subsampled by a factor of 4 horizontally
  65. * YUV411PackedPlanar : packed per payload in planar slices
  66. * YUV420Planar : Three arrays Y,U,V.
  67. * YUV420PackedPlanar : packed per payload in planar slices
  68. * YUV420SemiPlanar : Two arrays, one is all Y, the other is U and V
  69. * YUV422Planar : Three arrays Y,U,V.
  70. * YUV422PackedPlanar : packed per payload in planar slices
  71. * YUV422SemiPlanar : Two arrays, one is all Y, the other is U and V
  72. * YCbYCr : Organized as 16bit YUYV (i.e. YCbYCr)
  73. * YCrYCb : Organized as 16bit YVYU (i.e. YCrYCb)
  74. * CbYCrY : Organized as 16bit UYVY (i.e. CbYCrY)
  75. * CrYCbY : Organized as 16bit VYUY (i.e. CrYCbY)
  76. * YUV444Interleaved : Each pixel contains equal parts YUV
  77. * RawBayer8bit : SMIA camera output format
  78. * RawBayer10bit : SMIA camera output format
  79. * RawBayer8bitcompressed : SMIA camera output format
  80. */
  81. typedef enum OMX_COLOR_FORMATTYPE {
  82. OMX_COLOR_FormatUnused,
  83. OMX_COLOR_FormatMonochrome,
  84. OMX_COLOR_Format8bitRGB332,
  85. OMX_COLOR_Format12bitRGB444,
  86. OMX_COLOR_Format16bitARGB4444,
  87. OMX_COLOR_Format16bitARGB1555,
  88. OMX_COLOR_Format16bitRGB565,
  89. OMX_COLOR_Format16bitBGR565,
  90. OMX_COLOR_Format18bitRGB666,
  91. OMX_COLOR_Format18bitARGB1665,
  92. OMX_COLOR_Format19bitARGB1666,
  93. OMX_COLOR_Format24bitRGB888,
  94. OMX_COLOR_Format24bitBGR888,
  95. OMX_COLOR_Format24bitARGB1887,
  96. OMX_COLOR_Format25bitARGB1888,
  97. OMX_COLOR_Format32bitBGRA8888,
  98. OMX_COLOR_Format32bitARGB8888,
  99. OMX_COLOR_FormatYUV411Planar,
  100. OMX_COLOR_FormatYUV411PackedPlanar,
  101. OMX_COLOR_FormatYUV420Planar,
  102. OMX_COLOR_FormatYUV420PackedPlanar,
  103. OMX_COLOR_FormatYUV420SemiPlanar,
  104. OMX_COLOR_FormatYUV422Planar,
  105. OMX_COLOR_FormatYUV422PackedPlanar,
  106. OMX_COLOR_FormatYUV422SemiPlanar,
  107. OMX_COLOR_FormatYCbYCr,
  108. OMX_COLOR_FormatYCrYCb,
  109. OMX_COLOR_FormatCbYCrY,
  110. OMX_COLOR_FormatCrYCbY,
  111. OMX_COLOR_FormatYUV444Interleaved,
  112. OMX_COLOR_FormatRawBayer8bit,
  113. OMX_COLOR_FormatRawBayer10bit,
  114. OMX_COLOR_FormatRawBayer8bitcompressed,
  115. OMX_COLOR_FormatL2,
  116. OMX_COLOR_FormatL4,
  117. OMX_COLOR_FormatL8,
  118. OMX_COLOR_FormatL16,
  119. OMX_COLOR_FormatL24,
  120. OMX_COLOR_FormatL32,
  121. OMX_COLOR_FormatYUV420PackedSemiPlanar,
  122. OMX_COLOR_FormatYUV422PackedSemiPlanar,
  123. OMX_COLOR_Format18BitBGR666,
  124. OMX_COLOR_Format24BitARGB6666,
  125. OMX_COLOR_Format24BitABGR6666,
  126. OMX_COLOR_FormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  127. OMX_COLOR_FormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  128. OMX_COLOR_FormatYVU420PackedPlanar,
  129. OMX_COLOR_FormatYVU420PackedSemiPlanar,
  130. OMX_COLOR_FormatMax = 0x7FFFFFFF
  131. } OMX_COLOR_FORMATTYPE;
  132. /**
  133. * Defines the matrix for conversion from RGB to YUV or vice versa.
  134. * iColorMatrix should be initialized with the fixed point values
  135. * used in converting between formats.
  136. */
  137. typedef struct OMX_CONFIG_COLORCONVERSIONTYPE {
  138. OMX_U32 nSize; /**< Size of the structure in bytes */
  139. OMX_VERSIONTYPE nVersion; /**< OMX specification version info */
  140. OMX_U32 nPortIndex; /**< Port that this struct applies to */
  141. OMX_S32 xColorMatrix[3][3]; /**< Stored in signed Q16 format */
  142. OMX_S32 xColorOffset[4]; /**< Stored in signed Q16 format */
  143. } OMX_CONFIG_COLORCONVERSIONTYPE;
  144. /**
  145. * Structure defining percent to scale each frame dimension. For example:
  146. * To make the width 50% larger, use fWidth = 1.5 and to make the width
  147. * 1/2 the original size, use fWidth = 0.5
  148. */
  149. typedef struct OMX_CONFIG_SCALEFACTORTYPE {
  150. OMX_U32 nSize; /**< Size of the structure in bytes */
  151. OMX_VERSIONTYPE nVersion; /**< OMX specification version info */
  152. OMX_U32 nPortIndex; /**< Port that this struct applies to */
  153. OMX_S32 xWidth; /**< Fixed point value stored as Q16 */
  154. OMX_S32 xHeight; /**< Fixed point value stored as Q16 */
  155. } OMX_CONFIG_SCALEFACTORTYPE;
  156. /**
  157. * Enumeration of possible image filter types
  158. */
  159. typedef enum OMX_IMAGEFILTERTYPE {
  160. OMX_ImageFilterNone,
  161. OMX_ImageFilterNoise,
  162. OMX_ImageFilterEmboss,
  163. OMX_ImageFilterNegative,
  164. OMX_ImageFilterSketch,
  165. OMX_ImageFilterOilPaint,
  166. OMX_ImageFilterHatch,
  167. OMX_ImageFilterGpen,
  168. OMX_ImageFilterAntialias,
  169. OMX_ImageFilterDeRing,
  170. OMX_ImageFilterSolarize,
  171. OMX_ImageFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  172. OMX_ImageFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  173. OMX_ImageFilterMax = 0x7FFFFFFF
  174. } OMX_IMAGEFILTERTYPE;
  175. /**
  176. * Image filter configuration
  177. *
  178. * STRUCT MEMBERS:
  179. * nSize : Size of the structure in bytes
  180. * nVersion : OMX specification version information
  181. * nPortIndex : Port that this structure applies to
  182. * eImageFilter : Image filter type enumeration
  183. */
  184. typedef struct OMX_CONFIG_IMAGEFILTERTYPE {
  185. OMX_U32 nSize;
  186. OMX_VERSIONTYPE nVersion;
  187. OMX_U32 nPortIndex;
  188. OMX_IMAGEFILTERTYPE eImageFilter;
  189. } OMX_CONFIG_IMAGEFILTERTYPE;
  190. /**
  191. * Customized U and V for color enhancement
  192. *
  193. * STRUCT MEMBERS:
  194. * nSize : Size of the structure in bytes
  195. * nVersion : OMX specification version information
  196. * nPortIndex : Port that this structure applies to
  197. * bColorEnhancement : Enable/disable color enhancement
  198. * nCustomizedU : Practical values: 16-240, range: 0-255, value set for
  199. * U component
  200. * nCustomizedV : Practical values: 16-240, range: 0-255, value set for
  201. * V component
  202. */
  203. typedef struct OMX_CONFIG_COLORENHANCEMENTTYPE {
  204. OMX_U32 nSize;
  205. OMX_VERSIONTYPE nVersion;
  206. OMX_U32 nPortIndex;
  207. OMX_BOOL bColorEnhancement;
  208. OMX_U8 nCustomizedU;
  209. OMX_U8 nCustomizedV;
  210. } OMX_CONFIG_COLORENHANCEMENTTYPE;
  211. /**
  212. * Define color key and color key mask
  213. *
  214. * STRUCT MEMBERS:
  215. * nSize : Size of the structure in bytes
  216. * nVersion : OMX specification version information
  217. * nPortIndex : Port that this structure applies to
  218. * nARGBColor : 32bit Alpha, Red, Green, Blue Color
  219. * nARGBMask : 32bit Mask for Alpha, Red, Green, Blue channels
  220. */
  221. typedef struct OMX_CONFIG_COLORKEYTYPE {
  222. OMX_U32 nSize;
  223. OMX_VERSIONTYPE nVersion;
  224. OMX_U32 nPortIndex;
  225. OMX_U32 nARGBColor;
  226. OMX_U32 nARGBMask;
  227. } OMX_CONFIG_COLORKEYTYPE;
  228. /**
  229. * List of color blend types for pre/post processing
  230. *
  231. * ENUMS:
  232. * None : No color blending present
  233. * AlphaConstant : Function is (alpha_constant * src) +
  234. * (1 - alpha_constant) * dst)
  235. * AlphaPerPixel : Function is (alpha * src) + (1 - alpha) * dst)
  236. * Alternate : Function is alternating pixels from src and dst
  237. * And : Function is (src & dst)
  238. * Or : Function is (src | dst)
  239. * Invert : Function is ~src
  240. */
  241. typedef enum OMX_COLORBLENDTYPE {
  242. OMX_ColorBlendNone,
  243. OMX_ColorBlendAlphaConstant,
  244. OMX_ColorBlendAlphaPerPixel,
  245. OMX_ColorBlendAlternate,
  246. OMX_ColorBlendAnd,
  247. OMX_ColorBlendOr,
  248. OMX_ColorBlendInvert,
  249. OMX_ColorBlendKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  250. OMX_ColorBlendVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  251. OMX_ColorBlendMax = 0x7FFFFFFF
  252. } OMX_COLORBLENDTYPE;
  253. /**
  254. * Color blend configuration
  255. *
  256. * STRUCT MEMBERS:
  257. * nSize : Size of the structure in bytes
  258. * nVersion : OMX specification version information
  259. * nPortIndex : Port that this structure applies to
  260. * nRGBAlphaConstant : Constant global alpha values when global alpha is used
  261. * eColorBlend : Color blend type enumeration
  262. */
  263. typedef struct OMX_CONFIG_COLORBLENDTYPE {
  264. OMX_U32 nSize;
  265. OMX_VERSIONTYPE nVersion;
  266. OMX_U32 nPortIndex;
  267. OMX_U32 nRGBAlphaConstant;
  268. OMX_COLORBLENDTYPE eColorBlend;
  269. } OMX_CONFIG_COLORBLENDTYPE;
  270. /**
  271. * Hold frame dimension
  272. *
  273. * STRUCT MEMBERS:
  274. * nSize : Size of the structure in bytes
  275. * nVersion : OMX specification version information
  276. * nPortIndex : Port that this structure applies to
  277. * nWidth : Frame width in pixels
  278. * nHeight : Frame height in pixels
  279. */
  280. typedef struct OMX_FRAMESIZETYPE {
  281. OMX_U32 nSize;
  282. OMX_VERSIONTYPE nVersion;
  283. OMX_U32 nPortIndex;
  284. OMX_U32 nWidth;
  285. OMX_U32 nHeight;
  286. } OMX_FRAMESIZETYPE;
  287. /**
  288. * Rotation configuration
  289. *
  290. * STRUCT MEMBERS:
  291. * nSize : Size of the structure in bytes
  292. * nVersion : OMX specification version information
  293. * nPortIndex : Port that this structure applies to
  294. * nRotation : +/- integer rotation value
  295. */
  296. typedef struct OMX_CONFIG_ROTATIONTYPE {
  297. OMX_U32 nSize;
  298. OMX_VERSIONTYPE nVersion;
  299. OMX_U32 nPortIndex;
  300. OMX_S32 nRotation;
  301. } OMX_CONFIG_ROTATIONTYPE;
  302. /**
  303. * Possible mirroring directions for pre/post processing
  304. *
  305. * ENUMS:
  306. * None : No mirroring
  307. * Vertical : Vertical mirroring, flip on X axis
  308. * Horizontal : Horizontal mirroring, flip on Y axis
  309. * Both : Both vertical and horizontal mirroring
  310. */
  311. typedef enum OMX_MIRRORTYPE {
  312. OMX_MirrorNone = 0,
  313. OMX_MirrorVertical,
  314. OMX_MirrorHorizontal,
  315. OMX_MirrorBoth,
  316. OMX_MirrorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  317. OMX_MirrorVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  318. OMX_MirrorMax = 0x7FFFFFFF
  319. } OMX_MIRRORTYPE;
  320. /**
  321. * Mirroring configuration
  322. *
  323. * STRUCT MEMBERS:
  324. * nSize : Size of the structure in bytes
  325. * nVersion : OMX specification version information
  326. * nPortIndex : Port that this structure applies to
  327. * eMirror : Mirror type enumeration
  328. */
  329. typedef struct OMX_CONFIG_MIRRORTYPE {
  330. OMX_U32 nSize;
  331. OMX_VERSIONTYPE nVersion;
  332. OMX_U32 nPortIndex;
  333. OMX_MIRRORTYPE eMirror;
  334. } OMX_CONFIG_MIRRORTYPE;
  335. /**
  336. * Position information only
  337. *
  338. * STRUCT MEMBERS:
  339. * nSize : Size of the structure in bytes
  340. * nVersion : OMX specification version information
  341. * nPortIndex : Port that this structure applies to
  342. * nX : X coordinate for the point
  343. * nY : Y coordinate for the point
  344. */
  345. typedef struct OMX_CONFIG_POINTTYPE {
  346. OMX_U32 nSize;
  347. OMX_VERSIONTYPE nVersion;
  348. OMX_U32 nPortIndex;
  349. OMX_S32 nX;
  350. OMX_S32 nY;
  351. } OMX_CONFIG_POINTTYPE;
  352. /**
  353. * Frame size plus position
  354. *
  355. * STRUCT MEMBERS:
  356. * nSize : Size of the structure in bytes
  357. * nVersion : OMX specification version information
  358. * nPortIndex : Port that this structure applies to
  359. * nLeft : X Coordinate of the top left corner of the rectangle
  360. * nTop : Y Coordinate of the top left corner of the rectangle
  361. * nWidth : Width of the rectangle
  362. * nHeight : Height of the rectangle
  363. */
  364. typedef struct OMX_CONFIG_RECTTYPE {
  365. OMX_U32 nSize;
  366. OMX_VERSIONTYPE nVersion;
  367. OMX_U32 nPortIndex;
  368. OMX_S32 nLeft;
  369. OMX_S32 nTop;
  370. OMX_U32 nWidth;
  371. OMX_U32 nHeight;
  372. } OMX_CONFIG_RECTTYPE;
  373. /**
  374. * Deblocking state; it is required to be set up before starting the codec
  375. *
  376. * STRUCT MEMBERS:
  377. * nSize : Size of the structure in bytes
  378. * nVersion : OMX specification version information
  379. * nPortIndex : Port that this structure applies to
  380. * bDeblocking : Enable/disable deblocking mode
  381. */
  382. typedef struct OMX_PARAM_DEBLOCKINGTYPE {
  383. OMX_U32 nSize;
  384. OMX_VERSIONTYPE nVersion;
  385. OMX_U32 nPortIndex;
  386. OMX_BOOL bDeblocking;
  387. } OMX_PARAM_DEBLOCKINGTYPE;
  388. /**
  389. * Stabilization state
  390. *
  391. * STRUCT MEMBERS:
  392. * nSize : Size of the structure in bytes
  393. * nVersion : OMX specification version information
  394. * nPortIndex : Port that this structure applies to
  395. * bStab : Enable/disable frame stabilization state
  396. */
  397. typedef struct OMX_CONFIG_FRAMESTABTYPE {
  398. OMX_U32 nSize;
  399. OMX_VERSIONTYPE nVersion;
  400. OMX_U32 nPortIndex;
  401. OMX_BOOL bStab;
  402. } OMX_CONFIG_FRAMESTABTYPE;
  403. /**
  404. * White Balance control type
  405. *
  406. * STRUCT MEMBERS:
  407. * SunLight : Referenced in JSR-234
  408. * Flash : Optimal for device's integrated flash
  409. */
  410. typedef enum OMX_WHITEBALCONTROLTYPE {
  411. OMX_WhiteBalControlOff = 0,
  412. OMX_WhiteBalControlAuto,
  413. OMX_WhiteBalControlSunLight,
  414. OMX_WhiteBalControlCloudy,
  415. OMX_WhiteBalControlShade,
  416. OMX_WhiteBalControlTungsten,
  417. OMX_WhiteBalControlFluorescent,
  418. OMX_WhiteBalControlIncandescent,
  419. OMX_WhiteBalControlFlash,
  420. OMX_WhiteBalControlHorizon,
  421. OMX_WhiteBalControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  422. OMX_WhiteBalControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  423. OMX_WhiteBalControlMax = 0x7FFFFFFF
  424. } OMX_WHITEBALCONTROLTYPE;
  425. /**
  426. * White Balance control configuration
  427. *
  428. * STRUCT MEMBERS:
  429. * nSize : Size of the structure in bytes
  430. * nVersion : OMX specification version information
  431. * nPortIndex : Port that this structure applies to
  432. * eWhiteBalControl : White balance enumeration
  433. */
  434. typedef struct OMX_CONFIG_WHITEBALCONTROLTYPE {
  435. OMX_U32 nSize;
  436. OMX_VERSIONTYPE nVersion;
  437. OMX_U32 nPortIndex;
  438. OMX_WHITEBALCONTROLTYPE eWhiteBalControl;
  439. } OMX_CONFIG_WHITEBALCONTROLTYPE;
  440. /**
  441. * Exposure control type
  442. */
  443. typedef enum OMX_EXPOSURECONTROLTYPE {
  444. OMX_ExposureControlOff = 0,
  445. OMX_ExposureControlAuto,
  446. OMX_ExposureControlNight,
  447. OMX_ExposureControlBackLight,
  448. OMX_ExposureControlSpotLight,
  449. OMX_ExposureControlSports,
  450. OMX_ExposureControlSnow,
  451. OMX_ExposureControlBeach,
  452. OMX_ExposureControlLargeAperture,
  453. OMX_ExposureControlSmallApperture,
  454. OMX_ExposureControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  455. OMX_ExposureControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  456. OMX_ExposureControlMax = 0x7FFFFFFF
  457. } OMX_EXPOSURECONTROLTYPE;
  458. /**
  459. * White Balance control configuration
  460. *
  461. * STRUCT MEMBERS:
  462. * nSize : Size of the structure in bytes
  463. * nVersion : OMX specification version information
  464. * nPortIndex : Port that this structure applies to
  465. * eExposureControl : Exposure control enumeration
  466. */
  467. typedef struct OMX_CONFIG_EXPOSURECONTROLTYPE {
  468. OMX_U32 nSize;
  469. OMX_VERSIONTYPE nVersion;
  470. OMX_U32 nPortIndex;
  471. OMX_EXPOSURECONTROLTYPE eExposureControl;
  472. } OMX_CONFIG_EXPOSURECONTROLTYPE;
  473. /**
  474. * Defines sensor supported mode.
  475. *
  476. * STRUCT MEMBERS:
  477. * nSize : Size of the structure in bytes
  478. * nVersion : OMX specification version information
  479. * nPortIndex : Port that this structure applies to
  480. * nFrameRate : Single shot mode is indicated by a 0
  481. * bOneShot : Enable for single shot, disable for streaming
  482. * sFrameSize : Framesize
  483. */
  484. typedef struct OMX_PARAM_SENSORMODETYPE {
  485. OMX_U32 nSize;
  486. OMX_VERSIONTYPE nVersion;
  487. OMX_U32 nPortIndex;
  488. OMX_U32 nFrameRate;
  489. OMX_BOOL bOneShot;
  490. OMX_FRAMESIZETYPE sFrameSize;
  491. } OMX_PARAM_SENSORMODETYPE;
  492. /**
  493. * Defines contrast level
  494. *
  495. * STRUCT MEMBERS:
  496. * nSize : Size of the structure in bytes
  497. * nVersion : OMX specification version information
  498. * nPortIndex : Port that this structure applies to
  499. * nContrast : Values allowed for contrast -100 to 100, zero means no change
  500. */
  501. typedef struct OMX_CONFIG_CONTRASTTYPE {
  502. OMX_U32 nSize;
  503. OMX_VERSIONTYPE nVersion;
  504. OMX_U32 nPortIndex;
  505. OMX_S32 nContrast;
  506. } OMX_CONFIG_CONTRASTTYPE;
  507. /**
  508. * Defines brightness level
  509. *
  510. * STRUCT MEMBERS:
  511. * nSize : Size of the structure in bytes
  512. * nVersion : OMX specification version information
  513. * nPortIndex : Port that this structure applies to
  514. * nBrightness : 0-100%
  515. */
  516. typedef struct OMX_CONFIG_BRIGHTNESSTYPE {
  517. OMX_U32 nSize;
  518. OMX_VERSIONTYPE nVersion;
  519. OMX_U32 nPortIndex;
  520. OMX_U32 nBrightness;
  521. } OMX_CONFIG_BRIGHTNESSTYPE;
  522. /**
  523. * Defines backlight level configuration for a video sink, e.g. LCD panel
  524. *
  525. * STRUCT MEMBERS:
  526. * nSize : Size of the structure in bytes
  527. * nVersion : OMX specification version information
  528. * nPortIndex : Port that this structure applies to
  529. * nBacklight : Values allowed for backlight 0-100%
  530. * nTimeout : Number of milliseconds before backlight automatically turns
  531. * off. A value of 0x0 disables backight timeout
  532. */
  533. typedef struct OMX_CONFIG_BACKLIGHTTYPE {
  534. OMX_U32 nSize;
  535. OMX_VERSIONTYPE nVersion;
  536. OMX_U32 nPortIndex;
  537. OMX_U32 nBacklight;
  538. OMX_U32 nTimeout;
  539. } OMX_CONFIG_BACKLIGHTTYPE;
  540. /**
  541. * Defines setting for Gamma
  542. *
  543. * STRUCT MEMBERS:
  544. * nSize : Size of the structure in bytes
  545. * nVersion : OMX specification version information
  546. * nPortIndex : Port that this structure applies to
  547. * nGamma : Values allowed for gamma -100 to 100, zero means no change
  548. */
  549. typedef struct OMX_CONFIG_GAMMATYPE {
  550. OMX_U32 nSize;
  551. OMX_VERSIONTYPE nVersion;
  552. OMX_U32 nPortIndex;
  553. OMX_S32 nGamma;
  554. } OMX_CONFIG_GAMMATYPE;
  555. /**
  556. * Define for setting saturation
  557. *
  558. * STRUCT MEMBERS:
  559. * nSize : Size of the structure in bytes
  560. * nVersion : OMX specification version information
  561. * nPortIndex : Port that this structure applies to
  562. * nSaturation : Values allowed for saturation -100 to 100, zero means
  563. * no change
  564. */
  565. typedef struct OMX_CONFIG_SATURATIONTYPE {
  566. OMX_U32 nSize;
  567. OMX_VERSIONTYPE nVersion;
  568. OMX_U32 nPortIndex;
  569. OMX_S32 nSaturation;
  570. } OMX_CONFIG_SATURATIONTYPE;
  571. /**
  572. * Define for setting Lightness
  573. *
  574. * STRUCT MEMBERS:
  575. * nSize : Size of the structure in bytes
  576. * nVersion : OMX specification version information
  577. * nPortIndex : Port that this structure applies to
  578. * nLightness : Values allowed for lightness -100 to 100, zero means no
  579. * change
  580. */
  581. typedef struct OMX_CONFIG_LIGHTNESSTYPE {
  582. OMX_U32 nSize;
  583. OMX_VERSIONTYPE nVersion;
  584. OMX_U32 nPortIndex;
  585. OMX_S32 nLightness;
  586. } OMX_CONFIG_LIGHTNESSTYPE;
  587. /**
  588. * Plane blend configuration
  589. *
  590. * STRUCT MEMBERS:
  591. * nSize : Size of the structure in bytes
  592. * nVersion : OMX specification version information
  593. * nPortIndex : Index of input port associated with the plane.
  594. * nDepth : Depth of the plane in relation to the screen. Higher
  595. * numbered depths are "behind" lower number depths.
  596. * This number defaults to the Port Index number.
  597. * nAlpha : Transparency blending component for the entire plane.
  598. * See blending modes for more detail.
  599. */
  600. typedef struct OMX_CONFIG_PLANEBLENDTYPE {
  601. OMX_U32 nSize;
  602. OMX_VERSIONTYPE nVersion;
  603. OMX_U32 nPortIndex;
  604. OMX_U32 nDepth;
  605. OMX_U32 nAlpha;
  606. } OMX_CONFIG_PLANEBLENDTYPE;
  607. /**
  608. * Define interlace type
  609. *
  610. * STRUCT MEMBERS:
  611. * nSize : Size of the structure in bytes
  612. * nVersion : OMX specification version information
  613. * nPortIndex : Port that this structure applies to
  614. * bEnable : Enable control variable for this functionality
  615. * (see below)
  616. * nInterleavePortIndex : Index of input or output port associated with
  617. * the interleaved plane.
  618. * pPlanarPortIndexes[4] : Index of input or output planar ports.
  619. */
  620. typedef struct OMX_PARAM_INTERLEAVETYPE {
  621. OMX_U32 nSize;
  622. OMX_VERSIONTYPE nVersion;
  623. OMX_U32 nPortIndex;
  624. OMX_BOOL bEnable;
  625. OMX_U32 nInterleavePortIndex;
  626. } OMX_PARAM_INTERLEAVETYPE;
  627. /**
  628. * Defines the picture effect used for an input picture
  629. */
  630. typedef enum OMX_TRANSITIONEFFECTTYPE {
  631. OMX_EffectNone,
  632. OMX_EffectFadeFromBlack,
  633. OMX_EffectFadeToBlack,
  634. OMX_EffectUnspecifiedThroughConstantColor,
  635. OMX_EffectDissolve,
  636. OMX_EffectWipe,
  637. OMX_EffectUnspecifiedMixOfTwoScenes,
  638. OMX_EffectKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  639. OMX_EffectVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  640. OMX_EffectMax = 0x7FFFFFFF
  641. } OMX_TRANSITIONEFFECTTYPE;
  642. /**
  643. * Structure used to configure current transition effect
  644. *
  645. * STRUCT MEMBERS:
  646. * nSize : Size of the structure in bytes
  647. * nVersion : OMX specification version information
  648. * nPortIndex : Port that this structure applies to
  649. * eEffect : Effect to enable
  650. */
  651. typedef struct OMX_CONFIG_TRANSITIONEFFECTTYPE {
  652. OMX_U32 nSize;
  653. OMX_VERSIONTYPE nVersion;
  654. OMX_U32 nPortIndex;
  655. OMX_TRANSITIONEFFECTTYPE eEffect;
  656. } OMX_CONFIG_TRANSITIONEFFECTTYPE;
  657. /**
  658. * Defines possible data unit types for encoded video data. The data unit
  659. * types are used both for encoded video input for playback as well as
  660. * encoded video output from recording.
  661. */
  662. typedef enum OMX_DATAUNITTYPE {
  663. OMX_DataUnitCodedPicture,
  664. OMX_DataUnitVideoSegment,
  665. OMX_DataUnitSeveralSegments,
  666. OMX_DataUnitArbitraryStreamSection,
  667. OMX_DataUnitKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  668. OMX_DataUnitVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  669. OMX_DataUnitMax = 0x7FFFFFFF
  670. } OMX_DATAUNITTYPE;
  671. /**
  672. * Defines possible encapsulation types for coded video data unit. The
  673. * encapsulation information is used both for encoded video input for
  674. * playback as well as encoded video output from recording.
  675. */
  676. typedef enum OMX_DATAUNITENCAPSULATIONTYPE {
  677. OMX_DataEncapsulationElementaryStream,
  678. OMX_DataEncapsulationGenericPayload,
  679. OMX_DataEncapsulationRtpPayload,
  680. OMX_DataEncapsulationKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  681. OMX_DataEncapsulationVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  682. OMX_DataEncapsulationMax = 0x7FFFFFFF
  683. } OMX_DATAUNITENCAPSULATIONTYPE;
  684. /**
  685. * Structure used to configure the type of being decoded/encoded
  686. */
  687. typedef struct OMX_PARAM_DATAUNITTYPE {
  688. OMX_U32 nSize; /**< Size of the structure in bytes */
  689. OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
  690. OMX_U32 nPortIndex; /**< Port that this structure applies to */
  691. OMX_DATAUNITTYPE eUnitType;
  692. OMX_DATAUNITENCAPSULATIONTYPE eEncapsulationType;
  693. } OMX_PARAM_DATAUNITTYPE;
  694. /**
  695. * Defines dither types
  696. */
  697. typedef enum OMX_DITHERTYPE {
  698. OMX_DitherNone,
  699. OMX_DitherOrdered,
  700. OMX_DitherErrorDiffusion,
  701. OMX_DitherOther,
  702. OMX_DitherKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  703. OMX_DitherVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  704. OMX_DitherMax = 0x7FFFFFFF
  705. } OMX_DITHERTYPE;
  706. /**
  707. * Structure used to configure current type of dithering
  708. */
  709. typedef struct OMX_CONFIG_DITHERTYPE {
  710. OMX_U32 nSize; /**< Size of the structure in bytes */
  711. OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
  712. OMX_U32 nPortIndex; /**< Port that this structure applies to */
  713. OMX_DITHERTYPE eDither; /**< Type of dithering to use */
  714. } OMX_CONFIG_DITHERTYPE;
  715. typedef struct OMX_CONFIG_CAPTUREMODETYPE {
  716. OMX_U32 nSize;
  717. OMX_VERSIONTYPE nVersion;
  718. OMX_U32 nPortIndex; /**< Port that this structure applies to */
  719. OMX_BOOL bContinuous; /**< If true then ignore frame rate and emit capture
  720. * data as fast as possible (otherwise obey port's frame rate). */
  721. OMX_BOOL bFrameLimited; /**< If true then terminate capture after the port emits the
  722. * specified number of frames (otherwise the port does not
  723. * terminate the capture until instructed to do so by the client).
  724. * Even if set, the client may manually terminate the capture prior
  725. * to reaching the limit. */
  726. OMX_U32 nFrameLimit; /**< Limit on number of frames emitted during a capture (only
  727. * valid if bFrameLimited is set). */
  728. } OMX_CONFIG_CAPTUREMODETYPE;
  729. typedef enum OMX_METERINGTYPE {
  730. OMX_MeteringModeAverage, /**< Center-weighted average metering. */
  731. OMX_MeteringModeSpot, /**< Spot (partial) metering. */
  732. OMX_MeteringModeMatrix, /**< Matrix or evaluative metering. */
  733. OMX_MeteringKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  734. OMX_MeteringVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  735. OMX_EVModeMax = 0x7fffffff
  736. } OMX_METERINGTYPE;
  737. typedef struct OMX_CONFIG_EXPOSUREVALUETYPE {
  738. OMX_U32 nSize;
  739. OMX_VERSIONTYPE nVersion;
  740. OMX_U32 nPortIndex;
  741. OMX_METERINGTYPE eMetering;
  742. OMX_S32 xEVCompensation; /**< Fixed point value stored as Q16 */
  743. OMX_U32 nApertureFNumber; /**< e.g. nApertureFNumber = 2 implies "f/2" - Q16 format */
  744. OMX_BOOL bAutoAperture; /**< Whether aperture number is defined automatically */
  745. OMX_U32 nShutterSpeedMsec; /**< Shutterspeed in milliseconds */
  746. OMX_BOOL bAutoShutterSpeed; /**< Whether shutter speed is defined automatically */
  747. OMX_U32 nSensitivity; /**< e.g. nSensitivity = 100 implies "ISO 100" */
  748. OMX_BOOL bAutoSensitivity; /**< Whether sensitivity is defined automatically */
  749. } OMX_CONFIG_EXPOSUREVALUETYPE;
  750. /**
  751. * Focus region configuration
  752. *
  753. * STRUCT MEMBERS:
  754. * nSize : Size of the structure in bytes
  755. * nVersion : OMX specification version information
  756. * nPortIndex : Port that this structure applies to
  757. * bCenter : Use center region as focus region of interest
  758. * bLeft : Use left region as focus region of interest
  759. * bRight : Use right region as focus region of interest
  760. * bTop : Use top region as focus region of interest
  761. * bBottom : Use bottom region as focus region of interest
  762. * bTopLeft : Use top left region as focus region of interest
  763. * bTopRight : Use top right region as focus region of interest
  764. * bBottomLeft : Use bottom left region as focus region of interest
  765. * bBottomRight : Use bottom right region as focus region of interest
  766. */
  767. typedef struct OMX_CONFIG_FOCUSREGIONTYPE {
  768. OMX_U32 nSize;
  769. OMX_VERSIONTYPE nVersion;
  770. OMX_U32 nPortIndex;
  771. OMX_BOOL bCenter;
  772. OMX_BOOL bLeft;
  773. OMX_BOOL bRight;
  774. OMX_BOOL bTop;
  775. OMX_BOOL bBottom;
  776. OMX_BOOL bTopLeft;
  777. OMX_BOOL bTopRight;
  778. OMX_BOOL bBottomLeft;
  779. OMX_BOOL bBottomRight;
  780. } OMX_CONFIG_FOCUSREGIONTYPE;
  781. /**
  782. * Focus Status type
  783. */
  784. typedef enum OMX_FOCUSSTATUSTYPE {
  785. OMX_FocusStatusOff = 0,
  786. OMX_FocusStatusRequest,
  787. OMX_FocusStatusReached,
  788. OMX_FocusStatusUnableToReach,
  789. OMX_FocusStatusLost,
  790. OMX_FocusStatusKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  791. OMX_FocusStatusVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  792. OMX_FocusStatusMax = 0x7FFFFFFF
  793. } OMX_FOCUSSTATUSTYPE;
  794. /**
  795. * Focus status configuration
  796. *
  797. * STRUCT MEMBERS:
  798. * nSize : Size of the structure in bytes
  799. * nVersion : OMX specification version information
  800. * nPortIndex : Port that this structure applies to
  801. * eFocusStatus : Specifies the focus status
  802. * bCenterStatus : Use center region as focus region of interest
  803. * bLeftStatus : Use left region as focus region of interest
  804. * bRightStatus : Use right region as focus region of interest
  805. * bTopStatus : Use top region as focus region of interest
  806. * bBottomStatus : Use bottom region as focus region of interest
  807. * bTopLeftStatus : Use top left region as focus region of interest
  808. * bTopRightStatus : Use top right region as focus region of interest
  809. * bBottomLeftStatus : Use bottom left region as focus region of interest
  810. * bBottomRightStatus : Use bottom right region as focus region of interest
  811. */
  812. typedef struct OMX_PARAM_FOCUSSTATUSTYPE {
  813. OMX_U32 nSize;
  814. OMX_VERSIONTYPE nVersion;
  815. OMX_U32 nPortIndex;
  816. OMX_FOCUSSTATUSTYPE eFocusStatus;
  817. OMX_BOOL bCenterStatus;
  818. OMX_BOOL bLeftStatus;
  819. OMX_BOOL bRightStatus;
  820. OMX_BOOL bTopStatus;
  821. OMX_BOOL bBottomStatus;
  822. OMX_BOOL bTopLeftStatus;
  823. OMX_BOOL bTopRightStatus;
  824. OMX_BOOL bBottomLeftStatus;
  825. OMX_BOOL bBottomRightStatus;
  826. } OMX_PARAM_FOCUSSTATUSTYPE;
  827. /** @} */
  828. #ifdef __cplusplus
  829. }
  830. #endif /* __cplusplus */
  831. #endif
  832. /* File EOF */