39 #ifndef AOM_AOM_CODEC_H_
40 #define AOM_AOM_CODEC_H_
47 #include "aom/aom_integer.h"
50 #ifndef AOM_DEPRECATED
51 #if defined(__GNUC__) && __GNUC__
52 #define AOM_DEPRECATED __attribute__((deprecated))
53 #elif defined(_MSC_VER)
54 #define AOM_DEPRECATED
56 #define AOM_DEPRECATED
60 #ifndef AOM_DECLSPEC_DEPRECATED
61 #if defined(__GNUC__) && __GNUC__
62 #define AOM_DECLSPEC_DEPRECATED
63 #elif defined(_MSC_VER)
65 #define AOM_DECLSPEC_DEPRECATED __declspec(deprecated)
67 #define AOM_DECLSPEC_DEPRECATED
73 #elif defined(__GNUC__) || defined(__clang__)
74 #define AOM_UNUSED __attribute__((unused))
80 #ifndef ATTRIBUTE_PACKED
81 #if defined(__GNUC__) && __GNUC__
82 #define ATTRIBUTE_PACKED __attribute__((packed))
83 #elif defined(_MSC_VER)
84 #define ATTRIBUTE_PACKED
86 #define ATTRIBUTE_PACKED
98 #define AOM_CODEC_ABI_VERSION (3 + AOM_IMAGE_ABI_VERSION)
164 #define AOM_CODEC_CAP_DECODER 0x1
165 #define AOM_CODEC_CAP_ENCODER 0x2
174 typedef long aom_codec_flags_t;
262 #define AOM_VERSION_MAJOR(v) \
264 #define AOM_VERSION_MINOR(v) \
266 #define AOM_VERSION_PATCH(v) \
270 #define aom_codec_version_major() ((aom_codec_version() >> 16) & 0xff)
273 #define aom_codec_version_minor() ((aom_codec_version() >> 8) & 0xff)
276 #define aom_codec_version_patch() ((aom_codec_version() >> 0) & 0xff)
404 #if defined(AOM_DISABLE_CTRL_TYPECHECKS) && AOM_DISABLE_CTRL_TYPECHECKS
405 #define aom_codec_control(ctx, id, data) aom_codec_control_(ctx, id, data)
406 #define AOM_CTRL_USE_TYPE(id, typ)
407 #define AOM_CTRL_USE_TYPE_DEPRECATED(id, typ)
408 #define AOM_CTRL_VOID(id, typ)
420 #define aom_codec_control(ctx, id, data) \
421 aom_codec_control_##id(ctx, id, data)
434 #define AOM_CTRL_USE_TYPE(id, typ) \
435 static aom_codec_err_t aom_codec_control_##id(aom_codec_ctx_t *, int, typ) \
438 static aom_codec_err_t aom_codec_control_##id(aom_codec_ctx_t *ctx, \
439 int ctrl_id, typ data) { \
440 return aom_codec_control_(ctx, ctrl_id, data); \
453 #define AOM_CTRL_USE_TYPE_DEPRECATED(id, typ) \
454 AOM_DECLSPEC_DEPRECATED static aom_codec_err_t aom_codec_control_##id( \
455 aom_codec_ctx_t *, int, typ) AOM_DEPRECATED AOM_UNUSED; \
457 AOM_DECLSPEC_DEPRECATED static aom_codec_err_t aom_codec_control_##id( \
458 aom_codec_ctx_t *ctx, int ctrl_id, typ data) { \
459 return aom_codec_control_(ctx, ctrl_id, data); \
472 #define AOM_CTRL_VOID(id) \
473 static aom_codec_err_t aom_codec_control_##id(aom_codec_ctx_t *, int) \
476 static aom_codec_err_t aom_codec_control_##id(aom_codec_ctx_t *ctx, \
478 return aom_codec_control_(ctx, ctrl_id); \
485 OBU_SEQUENCE_HEADER = 1,
486 OBU_TEMPORAL_DELIMITER = 2,
487 OBU_FRAME_HEADER = 3,
491 OBU_REDUNDANT_FRAME_HEADER = 7,
498 OBU_METADATA_TYPE_AOM_RESERVED_0 = 0,
499 OBU_METADATA_TYPE_HDR_CLL = 1,
500 OBU_METADATA_TYPE_HDR_MDCV = 2,
501 OBU_METADATA_TYPE_SCALABILITY = 3,
502 OBU_METADATA_TYPE_ITUT_T35 = 4,
503 OBU_METADATA_TYPE_TIMECODE = 5,
529 #endif // AOM_AOM_CODEC_H_