aom_codec.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  1. /*
  2. * Copyright (c) 2016, Alliance for Open Media. All rights reserved.
  3. *
  4. * This source code is subject to the terms of the BSD 2 Clause License and
  5. * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
  6. * was not distributed with this source code in the LICENSE file, you can
  7. * obtain it at www.aomedia.org/license/software. If the Alliance for Open
  8. * Media Patent License 1.0 was not distributed with this source code in the
  9. * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  10. */
  11. ///////////////////////////////////////////////////////////////////////////////
  12. // Internal implementation details
  13. ///////////////////////////////////////////////////////////////////////////////
  14. //
  15. // There are two levels of interfaces used to access the AOM codec: the
  16. // aom_codec_iface and the aom_codec_ctx.
  17. //
  18. // 1. aom_codec_iface_t
  19. // (Related files: aom/aom_codec.h, aom/src/aom_codec.c,
  20. // aom/internal/aom_codec_internal.h, av1/av1_cx_iface.c,
  21. // av1/av1_dx_iface.c)
  22. //
  23. // Used to initialize the codec context, which contains the configuration for
  24. // for modifying the encoder/decoder during run-time. See the other
  25. // documentation in this header file for more details. For the most part,
  26. // users will call helper functions, such as aom_codec_iface_name,
  27. // aom_codec_get_caps, etc., to interact with it.
  28. //
  29. // The main purpose of the aom_codec_iface_t is to provide a way to generate
  30. // a default codec config, find out what capabilities the implementation has,
  31. // and create an aom_codec_ctx_t (which is actually used to interact with the
  32. // codec).
  33. //
  34. // Note that the implementations for the AV1 algorithm are located in
  35. // av1/av1_cx_iface.c and av1/av1_dx_iface.c
  36. //
  37. //
  38. // 2. aom_codec_ctx_t
  39. // (Related files: aom/aom_codec.h, av1/av1_cx_iface.c, av1/av1_dx_iface.c,
  40. // aom/aomcx.h, aom/aomdx.h, aom/src/aom_encoder.c, aom/src/aom_decoder.c)
  41. //
  42. // The actual interface between user code and the codec. It stores the name
  43. // of the codec, a pointer back to the aom_codec_iface_t that initialized it,
  44. // initialization flags, a config for either encoder or the decoder, and a
  45. // pointer to internal data.
  46. //
  47. // The codec is configured / queried through calls to aom_codec_control,
  48. // which takes a control ID (listed in aomcx.h and aomdx.h) and a parameter.
  49. // In the case of "getter" control IDs, the parameter is modified to have
  50. // the requested value; in the case of "setter" control IDs, the codec's
  51. // configuration is changed based on the parameter. Note that a aom_codec_err_t
  52. // is returned, which indicates if the operation was successful or not.
  53. //
  54. // Note that for the encoder, the aom_codec_alg_priv_t points to the
  55. // the aom_codec_alg_priv structure in av1/av1_cx_iface.c, and for the decoder,
  56. // the struct in av1/av1_dx_iface.c. Variables such as AV1_COMP cpi are stored
  57. // here and also used in the core algorithm.
  58. //
  59. // At the end, aom_codec_destroy should be called for each initialized
  60. // aom_codec_ctx_t.
  61. /*!\defgroup codec Common Algorithm Interface
  62. * This abstraction allows applications to easily support multiple video
  63. * formats with minimal code duplication. This section describes the interface
  64. * common to all codecs (both encoders and decoders).
  65. * @{
  66. */
  67. /*!\file
  68. * \brief Describes the codec algorithm interface to applications.
  69. *
  70. * This file describes the interface between an application and a
  71. * video codec algorithm.
  72. *
  73. * An application instantiates a specific codec instance by using
  74. * aom_codec_dec_init() or aom_codec_enc_init() and a pointer to the
  75. * algorithm's interface structure:
  76. * <pre>
  77. * my_app.c:
  78. * extern aom_codec_iface_t my_codec;
  79. * {
  80. * aom_codec_ctx_t algo;
  81. * int threads = 4;
  82. * aom_codec_dec_cfg_t cfg = { threads, 0, 0, 1 };
  83. * res = aom_codec_dec_init(&algo, &my_codec, &cfg, 0);
  84. * }
  85. * </pre>
  86. *
  87. * Once initialized, the instance is managed using other functions from
  88. * the aom_codec_* family.
  89. */
  90. #ifndef AOM_AOM_AOM_CODEC_H_
  91. #define AOM_AOM_AOM_CODEC_H_
  92. #ifdef __cplusplus
  93. extern "C" {
  94. #endif
  95. #include "aom/aom_image.h"
  96. #include "aom/aom_integer.h"
  97. /*!\brief Decorator indicating a function is deprecated */
  98. #ifndef AOM_DEPRECATED
  99. #if defined(__GNUC__)
  100. #define AOM_DEPRECATED __attribute__((deprecated))
  101. #elif defined(_MSC_VER)
  102. #define AOM_DEPRECATED
  103. #else
  104. #define AOM_DEPRECATED
  105. #endif
  106. #endif /* AOM_DEPRECATED */
  107. #ifndef AOM_DECLSPEC_DEPRECATED
  108. #if defined(__GNUC__)
  109. #define AOM_DECLSPEC_DEPRECATED /**< \copydoc #AOM_DEPRECATED */
  110. #elif defined(_MSC_VER)
  111. /*!\brief \copydoc #AOM_DEPRECATED */
  112. #define AOM_DECLSPEC_DEPRECATED __declspec(deprecated)
  113. #else
  114. #define AOM_DECLSPEC_DEPRECATED /**< \copydoc #AOM_DEPRECATED */
  115. #endif
  116. #endif /* AOM_DECLSPEC_DEPRECATED */
  117. /*!\brief Decorator indicating a function is potentially unused */
  118. #ifdef AOM_UNUSED
  119. #elif defined(__GNUC__) || defined(__clang__)
  120. #define AOM_UNUSED __attribute__((unused))
  121. #else
  122. #define AOM_UNUSED
  123. #endif
  124. /*!\brief Decorator indicating that given struct/union/enum is packed */
  125. #ifndef ATTRIBUTE_PACKED
  126. #if defined(__GNUC__)
  127. #define ATTRIBUTE_PACKED __attribute__((packed))
  128. #elif defined(_MSC_VER)
  129. #define ATTRIBUTE_PACKED
  130. #else
  131. #define ATTRIBUTE_PACKED
  132. #endif
  133. #endif /* ATTRIBUTE_PACKED */
  134. /*!\brief Current ABI version number
  135. *
  136. * \internal
  137. * If this file is altered in any way that changes the ABI, this value
  138. * must be bumped. Examples include, but are not limited to, changing
  139. * types, removing or reassigning enums, adding/removing/rearranging
  140. * fields to structures
  141. */
  142. #define AOM_CODEC_ABI_VERSION (7 + AOM_IMAGE_ABI_VERSION) /**<\hideinitializer*/
  143. /*!\brief Algorithm return codes */
  144. typedef enum {
  145. /*!\brief Operation completed without error */
  146. AOM_CODEC_OK,
  147. /*!\brief Unspecified error */
  148. AOM_CODEC_ERROR,
  149. /*!\brief Memory operation failed */
  150. AOM_CODEC_MEM_ERROR,
  151. /*!\brief ABI version mismatch */
  152. AOM_CODEC_ABI_MISMATCH,
  153. /*!\brief Algorithm does not have required capability */
  154. AOM_CODEC_INCAPABLE,
  155. /*!\brief The given bitstream is not supported.
  156. *
  157. * The bitstream was unable to be parsed at the highest level. The decoder
  158. * is unable to proceed. This error \ref SHOULD be treated as fatal to the
  159. * stream. */
  160. AOM_CODEC_UNSUP_BITSTREAM,
  161. /*!\brief Encoded bitstream uses an unsupported feature
  162. *
  163. * The decoder does not implement a feature required by the encoder. This
  164. * return code should only be used for features that prevent future
  165. * pictures from being properly decoded. This error \ref MAY be treated as
  166. * fatal to the stream or \ref MAY be treated as fatal to the current GOP.
  167. */
  168. AOM_CODEC_UNSUP_FEATURE,
  169. /*!\brief The coded data for this stream is corrupt or incomplete
  170. *
  171. * There was a problem decoding the current frame. This return code
  172. * should only be used for failures that prevent future pictures from
  173. * being properly decoded. This error \ref MAY be treated as fatal to the
  174. * stream or \ref MAY be treated as fatal to the current GOP. If decoding
  175. * is continued for the current GOP, artifacts may be present.
  176. */
  177. AOM_CODEC_CORRUPT_FRAME,
  178. /*!\brief An application-supplied parameter is not valid.
  179. *
  180. */
  181. AOM_CODEC_INVALID_PARAM,
  182. /*!\brief An iterator reached the end of list.
  183. *
  184. */
  185. AOM_CODEC_LIST_END
  186. } aom_codec_err_t;
  187. /*! \brief Codec capabilities bitfield
  188. *
  189. * Each codec advertises the capabilities it supports as part of its
  190. * ::aom_codec_iface_t interface structure. Capabilities are extra interfaces
  191. * or functionality, and are not required to be supported.
  192. *
  193. * The available flags are specified by AOM_CODEC_CAP_* defines.
  194. */
  195. typedef long aom_codec_caps_t;
  196. #define AOM_CODEC_CAP_DECODER 0x1 /**< Is a decoder */
  197. #define AOM_CODEC_CAP_ENCODER 0x2 /**< Is an encoder */
  198. /*! \brief Initialization-time Feature Enabling
  199. *
  200. * Certain codec features must be known at initialization time, to allow for
  201. * proper memory allocation.
  202. *
  203. * The available flags are specified by AOM_CODEC_USE_* defines.
  204. */
  205. typedef long aom_codec_flags_t;
  206. /*!\brief Time Stamp Type
  207. *
  208. * An integer, which when multiplied by the stream's time base, provides
  209. * the absolute time of a sample.
  210. */
  211. typedef int64_t aom_codec_pts_t;
  212. /*!\brief Codec interface structure.
  213. *
  214. * Contains function pointers and other data private to the codec
  215. * implementation. This structure is opaque to the application. Common
  216. * functions used with this structure:
  217. * - aom_codec_iface_name(aom_codec_iface_t *iface): get the
  218. * name of the codec
  219. * - aom_codec_get_caps(aom_codec_iface_t *iface): returns
  220. * the capabilities of the codec
  221. * - aom_codec_enc_config_default: generate the default config for
  222. * initializing the encoder (see documentation in aom_encoder.h)
  223. * - aom_codec_dec_init, aom_codec_enc_init: initialize the codec context
  224. * structure (see documentation on aom_codec_ctx).
  225. *
  226. * To get access to the AV1 encoder and decoder, use aom_codec_av1_cx() and
  227. * aom_codec_av1_dx().
  228. */
  229. typedef const struct aom_codec_iface aom_codec_iface_t;
  230. /*!\brief Codec private data structure.
  231. *
  232. * Contains data private to the codec implementation. This structure is opaque
  233. * to the application.
  234. */
  235. typedef struct aom_codec_priv aom_codec_priv_t;
  236. /*!\brief Compressed Frame Flags
  237. *
  238. * This type represents a bitfield containing information about a compressed
  239. * frame that may be useful to an application. The most significant 16 bits
  240. * can be used by an algorithm to provide additional detail, for example to
  241. * support frame types that are codec specific (MPEG-1 D-frames for example)
  242. */
  243. typedef uint32_t aom_codec_frame_flags_t;
  244. #define AOM_FRAME_IS_KEY 0x1u /**< frame is the start of a GOP */
  245. /*!\brief frame can be dropped without affecting the stream (no future frame
  246. * depends on this one) */
  247. #define AOM_FRAME_IS_DROPPABLE 0x2u
  248. /*!\brief this is an INTRA_ONLY frame */
  249. #define AOM_FRAME_IS_INTRAONLY 0x10u
  250. /*!\brief this is an S-frame */
  251. #define AOM_FRAME_IS_SWITCH 0x20u
  252. /*!\brief this is an error-resilient frame */
  253. #define AOM_FRAME_IS_ERROR_RESILIENT 0x40u
  254. /*!\brief this is a key-frame dependent recovery-point frame */
  255. #define AOM_FRAME_IS_DELAYED_RANDOM_ACCESS_POINT 0x80u
  256. /*!\brief Iterator
  257. *
  258. * Opaque storage used for iterating over lists.
  259. */
  260. typedef const void *aom_codec_iter_t;
  261. /*!\brief Codec context structure
  262. *
  263. * All codecs \ref MUST support this context structure fully. In general,
  264. * this data should be considered private to the codec algorithm, and
  265. * not be manipulated or examined by the calling application. Applications
  266. * may reference the 'name' member to get a printable description of the
  267. * algorithm.
  268. */
  269. typedef struct aom_codec_ctx {
  270. const char *name; /**< Printable interface name */
  271. aom_codec_iface_t *iface; /**< Interface pointers */
  272. aom_codec_err_t err; /**< Last returned error */
  273. const char *err_detail; /**< Detailed info, if available */
  274. aom_codec_flags_t init_flags; /**< Flags passed at init time */
  275. union {
  276. /**< Decoder Configuration Pointer */
  277. const struct aom_codec_dec_cfg *dec;
  278. /**< Encoder Configuration Pointer */
  279. const struct aom_codec_enc_cfg *enc;
  280. const void *raw;
  281. } config; /**< Configuration pointer aliasing union */
  282. aom_codec_priv_t *priv; /**< Algorithm private storage */
  283. } aom_codec_ctx_t;
  284. /*!\brief Bit depth for codec
  285. * *
  286. * This enumeration determines the bit depth of the codec.
  287. */
  288. typedef enum aom_bit_depth {
  289. AOM_BITS_8 = 8, /**< 8 bits */
  290. AOM_BITS_10 = 10, /**< 10 bits */
  291. AOM_BITS_12 = 12, /**< 12 bits */
  292. } aom_bit_depth_t;
  293. /*!\brief Superblock size selection.
  294. *
  295. * Defines the superblock size used for encoding. The superblock size can
  296. * either be fixed at 64x64 or 128x128 pixels, or it can be dynamically
  297. * selected by the encoder for each frame.
  298. */
  299. typedef enum aom_superblock_size {
  300. AOM_SUPERBLOCK_SIZE_64X64, /**< Always use 64x64 superblocks. */
  301. AOM_SUPERBLOCK_SIZE_128X128, /**< Always use 128x128 superblocks. */
  302. AOM_SUPERBLOCK_SIZE_DYNAMIC /**< Select superblock size dynamically. */
  303. } aom_superblock_size_t;
  304. /*
  305. * Library Version Number Interface
  306. *
  307. * For example, see the following sample return values:
  308. * aom_codec_version() (1<<16 | 2<<8 | 3)
  309. * aom_codec_version_str() "v1.2.3-rc1-16-gec6a1ba"
  310. * aom_codec_version_extra_str() "rc1-16-gec6a1ba"
  311. */
  312. /*!\brief Return the version information (as an integer)
  313. *
  314. * Returns a packed encoding of the library version number. This will only
  315. * include the major.minor.patch component of the version number. Note that this
  316. * encoded value should be accessed through the macros provided, as the encoding
  317. * may change in the future.
  318. *
  319. */
  320. int aom_codec_version(void);
  321. /*!\brief Return the major version number */
  322. #define aom_codec_version_major() ((aom_codec_version() >> 16) & 0xff)
  323. /*!\brief Return the minor version number */
  324. #define aom_codec_version_minor() ((aom_codec_version() >> 8) & 0xff)
  325. /*!\brief Return the patch version number */
  326. #define aom_codec_version_patch() ((aom_codec_version() >> 0) & 0xff)
  327. /*!\brief Return the version information (as a string)
  328. *
  329. * Returns a printable string containing the full library version number. This
  330. * may contain additional text following the three digit version number, as to
  331. * indicate release candidates, pre-release versions, etc.
  332. *
  333. */
  334. const char *aom_codec_version_str(void);
  335. /*!\brief Return the version information (as a string)
  336. *
  337. * Returns a printable "extra string". This is the component of the string
  338. * returned by aom_codec_version_str() following the three digit version number.
  339. *
  340. */
  341. const char *aom_codec_version_extra_str(void);
  342. /*!\brief Return the build configuration
  343. *
  344. * Returns a printable string containing an encoded version of the build
  345. * configuration. This may be useful to aom support.
  346. *
  347. */
  348. const char *aom_codec_build_config(void);
  349. /*!\brief Return the name for a given interface
  350. *
  351. * Returns a human readable string for name of the given codec interface.
  352. *
  353. * \param[in] iface Interface pointer
  354. *
  355. */
  356. const char *aom_codec_iface_name(aom_codec_iface_t *iface);
  357. /*!\brief Convert error number to printable string
  358. *
  359. * Returns a human readable string for the last error returned by the
  360. * algorithm. The returned error will be one line and will not contain
  361. * any newline characters.
  362. *
  363. *
  364. * \param[in] err Error number.
  365. *
  366. */
  367. const char *aom_codec_err_to_string(aom_codec_err_t err);
  368. /*!\brief Retrieve error synopsis for codec context
  369. *
  370. * Returns a human readable string for the last error returned by the
  371. * algorithm. The returned error will be one line and will not contain
  372. * any newline characters.
  373. *
  374. *
  375. * \param[in] ctx Pointer to this instance's context.
  376. *
  377. */
  378. const char *aom_codec_error(const aom_codec_ctx_t *ctx);
  379. /*!\brief Retrieve detailed error information for codec context
  380. *
  381. * Returns a human readable string providing detailed information about
  382. * the last error. The returned string is only valid until the next
  383. * aom_codec_* function call (except aom_codec_error and
  384. * aom_codec_error_detail) on the codec context.
  385. *
  386. * \param[in] ctx Pointer to this instance's context.
  387. *
  388. * \retval NULL
  389. * No detailed information is available.
  390. */
  391. const char *aom_codec_error_detail(const aom_codec_ctx_t *ctx);
  392. /* REQUIRED FUNCTIONS
  393. *
  394. * The following functions are required to be implemented for all codecs.
  395. * They represent the base case functionality expected of all codecs.
  396. */
  397. /*!\brief Destroy a codec instance
  398. *
  399. * Destroys a codec context, freeing any associated memory buffers.
  400. *
  401. * \param[in] ctx Pointer to this instance's context
  402. *
  403. * \retval #AOM_CODEC_OK
  404. * The codec instance has been destroyed.
  405. * \retval #AOM_CODEC_INVALID_PARAM
  406. * ctx is a null pointer.
  407. * \retval #AOM_CODEC_ERROR
  408. * Codec context not initialized.
  409. */
  410. aom_codec_err_t aom_codec_destroy(aom_codec_ctx_t *ctx);
  411. /*!\brief Get the capabilities of an algorithm.
  412. *
  413. * Retrieves the capabilities bitfield from the algorithm's interface.
  414. *
  415. * \param[in] iface Pointer to the algorithm interface
  416. *
  417. */
  418. aom_codec_caps_t aom_codec_get_caps(aom_codec_iface_t *iface);
  419. /*!\name Codec Control
  420. *
  421. * The aom_codec_control function exchanges algorithm specific data with the
  422. * codec instance. Additionally, the macro AOM_CODEC_CONTROL_TYPECHECKED is
  423. * provided, which will type-check the parameter against the control ID before
  424. * calling aom_codec_control - note that this macro requires the control ID
  425. * to be directly encoded in it, e.g.,
  426. * AOM_CODEC_CONTROL_TYPECHECKED(&ctx, AOME_SET_CPUUSED, 8).
  427. *
  428. * The codec control IDs can be found in aom.h, aomcx.h, and aomdx.h
  429. * (defined as aom_com_control_id, aome_enc_control_id, and aom_dec_control_id).
  430. * @{
  431. */
  432. /*!\brief Algorithm Control
  433. *
  434. * aom_codec_control takes a context, a control ID, and a third parameter
  435. * (with varying type). If the context is non-null and an error occurs,
  436. * ctx->err will be set to the same value as the return value.
  437. *
  438. * \param[in] ctx Pointer to this instance's context
  439. * \param[in] ctrl_id Algorithm specific control identifier.
  440. * Must be nonzero.
  441. *
  442. * \retval #AOM_CODEC_OK
  443. * The control request was processed.
  444. * \retval #AOM_CODEC_ERROR
  445. * The control request was not processed.
  446. * \retval #AOM_CODEC_INVALID_PARAM
  447. * The control ID was zero, or the data was not valid.
  448. */
  449. aom_codec_err_t aom_codec_control(aom_codec_ctx_t *ctx, int ctrl_id, ...);
  450. /*!\brief Key & Value API
  451. *
  452. * aom_codec_set_option() takes a context, a key (option name) and a value. If
  453. * the context is non-null and an error occurs, ctx->err will be set to the same
  454. * value as the return value.
  455. *
  456. * \param[in] ctx Pointer to this instance's context
  457. * \param[in] name The name of the option (key)
  458. * \param[in] value The value of the option
  459. *
  460. * \retval #AOM_CODEC_OK
  461. * The value of the option was set.
  462. * \retval #AOM_CODEC_INVALID_PARAM
  463. * The data was not valid.
  464. * \retval #AOM_CODEC_ERROR
  465. * The option was not successfully set.
  466. */
  467. aom_codec_err_t aom_codec_set_option(aom_codec_ctx_t *ctx, const char *name,
  468. const char *value);
  469. /*!\brief aom_codec_control wrapper macro (adds type-checking, less flexible)
  470. *
  471. * This macro allows for type safe conversions across the variadic parameter
  472. * to aom_codec_control(). However, it requires the explicit control ID
  473. * be passed in (it cannot be passed in via a variable) -- otherwise a compiler
  474. * error will occur. After the type checking, it calls aom_codec_control.
  475. */
  476. #define AOM_CODEC_CONTROL_TYPECHECKED(ctx, id, data) \
  477. aom_codec_control_typechecked_##id(ctx, id, data) /**<\hideinitializer*/
  478. /*!\brief Creates type checking mechanisms for aom_codec_control
  479. *
  480. * It defines a static function with the correctly typed arguments as a wrapper
  481. * to the type-unsafe aom_codec_control function. It also creates a typedef
  482. * for each type.
  483. */
  484. #define AOM_CTRL_USE_TYPE(id, typ) \
  485. static aom_codec_err_t aom_codec_control_typechecked_##id( \
  486. aom_codec_ctx_t *, int, typ) AOM_UNUSED; \
  487. static aom_codec_err_t aom_codec_control_typechecked_##id( \
  488. aom_codec_ctx_t *ctx, int ctrl, typ data) { \
  489. return aom_codec_control(ctx, ctrl, data); \
  490. } /**<\hideinitializer*/ \
  491. typedef typ aom_codec_control_type_##id;
  492. /*!@} end Codec Control group */
  493. /*!\brief OBU types. */
  494. typedef enum ATTRIBUTE_PACKED {
  495. OBU_SEQUENCE_HEADER = 1,
  496. OBU_TEMPORAL_DELIMITER = 2,
  497. OBU_FRAME_HEADER = 3,
  498. OBU_TILE_GROUP = 4,
  499. OBU_METADATA = 5,
  500. OBU_FRAME = 6,
  501. OBU_REDUNDANT_FRAME_HEADER = 7,
  502. OBU_TILE_LIST = 8,
  503. OBU_PADDING = 15,
  504. } OBU_TYPE;
  505. /*!\brief OBU metadata types. */
  506. typedef enum {
  507. OBU_METADATA_TYPE_AOM_RESERVED_0 = 0,
  508. OBU_METADATA_TYPE_HDR_CLL = 1,
  509. OBU_METADATA_TYPE_HDR_MDCV = 2,
  510. OBU_METADATA_TYPE_SCALABILITY = 3,
  511. OBU_METADATA_TYPE_ITUT_T35 = 4,
  512. OBU_METADATA_TYPE_TIMECODE = 5,
  513. } OBU_METADATA_TYPE;
  514. /*!\brief Returns string representation of OBU_TYPE.
  515. *
  516. * \param[in] type The OBU_TYPE to convert to string.
  517. */
  518. const char *aom_obu_type_to_string(OBU_TYPE type);
  519. /*!@} - end defgroup codec*/
  520. #ifdef __cplusplus
  521. }
  522. #endif
  523. #endif // AOM_AOM_AOM_CODEC_H_