Go to the documentation of this file.
39 #ifndef AOM_AOM_AOM_CODEC_H_
40 #define AOM_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;
264 #define aom_codec_version_major() ((aom_codec_version() >> 16) & 0xff)
267 #define aom_codec_version_minor() ((aom_codec_version() >> 8) & 0xff)
270 #define aom_codec_version_patch() ((aom_codec_version() >> 0) & 0xff)
398 #if defined(AOM_DISABLE_CTRL_TYPECHECKS) && AOM_DISABLE_CTRL_TYPECHECKS
399 #define aom_codec_control(ctx, id, data) aom_codec_control_(ctx, id, data)
400 #define AOM_CTRL_USE_TYPE(id, typ)
401 #define AOM_CTRL_USE_TYPE_DEPRECATED(id, typ)
402 #define AOM_CTRL_VOID(id, typ)
414 #define aom_codec_control(ctx, id, data) \
415 aom_codec_control_##id(ctx, id, data)
428 #define AOM_CTRL_USE_TYPE(id, typ) \
429 static aom_codec_err_t aom_codec_control_##id(aom_codec_ctx_t *, int, typ) \
432 static aom_codec_err_t aom_codec_control_##id(aom_codec_ctx_t *ctx, \
433 int ctrl_id, typ data) { \
434 return aom_codec_control_(ctx, ctrl_id, data); \
447 #define AOM_CTRL_USE_TYPE_DEPRECATED(id, typ) \
448 AOM_DECLSPEC_DEPRECATED static aom_codec_err_t aom_codec_control_##id( \
449 aom_codec_ctx_t *, int, typ) AOM_DEPRECATED AOM_UNUSED; \
451 AOM_DECLSPEC_DEPRECATED static aom_codec_err_t aom_codec_control_##id( \
452 aom_codec_ctx_t *ctx, int ctrl_id, typ data) { \
453 return aom_codec_control_(ctx, ctrl_id, data); \
466 #define AOM_CTRL_VOID(id) \
467 static aom_codec_err_t aom_codec_control_##id(aom_codec_ctx_t *, int) \
470 static aom_codec_err_t aom_codec_control_##id(aom_codec_ctx_t *ctx, \
472 return aom_codec_control_(ctx, ctrl_id); \
479 OBU_SEQUENCE_HEADER = 1,
480 OBU_TEMPORAL_DELIMITER = 2,
481 OBU_FRAME_HEADER = 3,
485 OBU_REDUNDANT_FRAME_HEADER = 7,
492 OBU_METADATA_TYPE_AOM_RESERVED_0 = 0,
493 OBU_METADATA_TYPE_HDR_CLL = 1,
494 OBU_METADATA_TYPE_HDR_MDCV = 2,
495 OBU_METADATA_TYPE_SCALABILITY = 3,
496 OBU_METADATA_TYPE_ITUT_T35 = 4,
497 OBU_METADATA_TYPE_TIMECODE = 5,
523 #endif // AOM_AOM_AOM_CODEC_H_
@ AOM_CODEC_INVALID_PARAM
An application-supplied parameter is not valid.
Definition: aom_codec.h:146
Encoder configuration structure.
Definition: aom_encoder.h:228
aom_bit_depth
Bit depth for codecThis enumeration determines the bit depth of the codec.
Definition: aom_codec.h:224
@ AOM_SUPERBLOCK_SIZE_DYNAMIC
Definition: aom_codec.h:239
@ AOM_BITS_8
Definition: aom_codec.h:225
aom_codec_caps_t aom_codec_get_caps(aom_codec_iface_t *iface)
Get the capabilities of an algorithm.
@ AOM_CODEC_INCAPABLE
Algorithm does not have required capability.
Definition: aom_codec.h:115
Codec context structure.
Definition: aom_codec.h:204
OBU_METADATA_TYPE
OBU metadata types.
Definition: aom_codec.h:513
const struct aom_codec_iface aom_codec_iface_t
Codec interface structure.
Definition: aom_codec.h:181
const typedef void * aom_codec_iter_t
Iterator.
Definition: aom_codec.h:194
@ AOM_CODEC_OK
Operation completed without error.
Definition: aom_codec.h:103
const char * aom_codec_err_to_string(aom_codec_err_t err)
Convert error number to printable string.
union aom_codec_ctx::@0 config
@ AOM_CODEC_ERROR
Unspecified error.
Definition: aom_codec.h:106
aom_codec_err_t aom_codec_control_(aom_codec_ctx_t *ctx, int ctrl_id,...)
Control algorithm.
const char * aom_codec_iface_name(aom_codec_iface_t *iface)
Return the name for a given interface.
aom_codec_err_t err
Definition: aom_codec.h:207
aom_codec_err_t aom_codec_destroy(aom_codec_ctx_t *ctx)
Destroy a codec instance.
unsigned int ext_partition
Reflects if ext_partition should be enabled.
Definition: aom_codec.h:538
OBU_TYPE
OBU types.
Definition: aom_codec.h:500
Initialization Configurations.
Definition: aom_decoder.h:96
@ AOM_SUPERBLOCK_SIZE_64X64
Definition: aom_codec.h:237
enum aom_superblock_size aom_superblock_size_t
Superblock size selection.
aom_superblock_size
Superblock size selection.
Definition: aom_codec.h:236
const char * err_detail
Definition: aom_codec.h:208
int aom_codec_version(void)
Return the version information (as an integer)
aom_codec_flags_t init_flags
Definition: aom_codec.h:209
@ AOM_CODEC_MEM_ERROR
Memory operation failed.
Definition: aom_codec.h:109
const char * aom_codec_build_config(void)
Return the build configuration.
const char * aom_obu_type_to_string(OBU_TYPE type)
Returns string representation of OBU_TYPE.
@ AOM_BITS_12
Definition: aom_codec.h:227
@ AOM_SUPERBLOCK_SIZE_128X128
Definition: aom_codec.h:238
const char * aom_codec_version_str(void)
Return the version information (as a string)
aom_codec_err_t
Algorithm return codes.
Definition: aom_codec.h:101
@ AOM_CODEC_ABI_MISMATCH
ABI version mismatch.
Definition: aom_codec.h:112
@ AOM_CODEC_LIST_END
An iterator reached the end of list.
Definition: aom_codec.h:151
struct aom_codec_ctx aom_codec_ctx_t
Codec context structure.
const char * name
Definition: aom_codec.h:205
@ AOM_BITS_10
Definition: aom_codec.h:226
struct aom_codec_priv aom_codec_priv_t
Codec private data structure.
Definition: aom_codec.h:188
@ AOM_CODEC_UNSUP_BITSTREAM
The given bitstream is not supported.
Definition: aom_codec.h:122
const char * aom_codec_error(aom_codec_ctx_t *ctx)
Retrieve error synopsis for codec context.
struct cfg_options cfg_options_t
Config Options.
#define ATTRIBUTE_PACKED
Decorator indicating that given struct/union/enum is packed.
Definition: aom_codec.h:86
const struct aom_codec_dec_cfg * dec
Definition: aom_codec.h:212
Describes the aom image descriptor and associated operations.
aom_codec_iface_t * iface
Definition: aom_codec.h:206
const char * aom_codec_version_extra_str(void)
Return the version information (as a string)
long aom_codec_flags_t
Initialization-time Feature Enabling.
Definition: aom_codec.h:174
@ AOM_CODEC_UNSUP_FEATURE
Encoded bitstream uses an unsupported feature.
Definition: aom_codec.h:131
long aom_codec_caps_t
Codec capabilities bitfield.
Definition: aom_codec.h:163
@ AOM_CODEC_CORRUPT_FRAME
The coded data for this stream is corrupt or incomplete.
Definition: aom_codec.h:141
Config Options.
Definition: aom_codec.h:533
enum aom_bit_depth aom_bit_depth_t
Bit depth for codecThis enumeration determines the bit depth of the codec.
const char * aom_codec_error_detail(aom_codec_ctx_t *ctx)
Retrieve detailed error information for codec context.
aom_codec_priv_t * priv
Definition: aom_codec.h:217