AOMedia AV1 Codec
aom_decoder.h
Go to the documentation of this file.
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#ifndef AOM_AOM_AOM_DECODER_H_
12#define AOM_AOM_AOM_DECODER_H_
13
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include "aom/aom_codec.h" // IWYU pragma: export
35
44#define AOM_DECODER_ABI_VERSION \
45 (6 + AOM_CODEC_ABI_VERSION)
56#define AOM_CODEC_CAP_EXTERNAL_FRAME_BUFFER 0x200000
57
71typedef struct aom_codec_stream_info {
72 unsigned int w;
73 unsigned int h;
74 unsigned int is_kf;
75 unsigned int number_spatial_layers;
77 unsigned int is_annexb;
79
80/* REQUIRED FUNCTIONS
81 *
82 * The following functions are required to be implemented for all decoders.
83 * They represent the base case functionality expected of all decoders.
84 */
85
91typedef struct aom_codec_dec_cfg {
92 unsigned int threads;
93 unsigned int w;
94 unsigned int h;
95 unsigned int allow_lowbitdepth;
121 aom_codec_iface_t *iface,
122 const aom_codec_dec_cfg_t *cfg,
123 aom_codec_flags_t flags, int ver);
124
129#define aom_codec_dec_init(ctx, iface, cfg, flags) \
130 aom_codec_dec_init_ver(ctx, iface, cfg, flags, AOM_DECODER_ABI_VERSION)
131
154 const uint8_t *data, size_t data_sz,
156
173
192 size_t data_sz, void *user_priv);
193
211
249 aom_release_frame_buffer_cb_fn_t cb_release, void *cb_priv);
250
254#ifdef __cplusplus
255}
256#endif
257#endif // AOM_AOM_AOM_DECODER_H_
Describes the codec algorithm interface to applications.
Describes the decoder external frame buffer interface.
int(* aom_get_frame_buffer_cb_fn_t)(void *priv, size_t min_size, aom_codec_frame_buffer_t *fb)
get frame buffer callback prototype
Definition aom_frame_buffer.h:64
int(* aom_release_frame_buffer_cb_fn_t)(void *priv, aom_codec_frame_buffer_t *fb)
release frame buffer callback prototype
Definition aom_frame_buffer.h:77
aom_codec_err_t aom_codec_set_frame_buffer_functions(aom_codec_ctx_t *ctx, aom_get_frame_buffer_cb_fn_t cb_get, aom_release_frame_buffer_cb_fn_t cb_release, void *cb_priv)
Pass in external frame buffers for the decoder to use.
long aom_codec_flags_t
Initialization-time Feature Enabling.
Definition aom_codec.h:228
const struct aom_codec_iface aom_codec_iface_t
Codec interface structure.
Definition aom_codec.h:254
aom_codec_err_t
Algorithm return codes.
Definition aom_codec.h:155
const void * aom_codec_iter_t
Iterator.
Definition aom_codec.h:288
aom_codec_err_t aom_codec_peek_stream_info(aom_codec_iface_t *iface, const uint8_t *data, size_t data_sz, aom_codec_stream_info_t *si)
Parse stream info from a buffer.
aom_codec_err_t aom_codec_get_stream_info(aom_codec_ctx_t *ctx, aom_codec_stream_info_t *si)
Return information about the current stream.
struct aom_codec_stream_info aom_codec_stream_info_t
Initialization-time Feature Enabling.
aom_image_t * aom_codec_get_frame(aom_codec_ctx_t *ctx, aom_codec_iter_t *iter)
Decoded frames iterator.
aom_codec_err_t aom_codec_decode(aom_codec_ctx_t *ctx, const uint8_t *data, size_t data_sz, void *user_priv)
Decode data.
aom_codec_err_t aom_codec_dec_init_ver(aom_codec_ctx_t *ctx, aom_codec_iface_t *iface, const aom_codec_dec_cfg_t *cfg, aom_codec_flags_t flags, int ver)
Initialize a decoder instance.
struct aom_codec_dec_cfg aom_codec_dec_cfg_t
Initialization Configurations.
Codec context structure.
Definition aom_codec.h:298
Initialization Configurations.
Definition aom_decoder.h:91
unsigned int w
Definition aom_decoder.h:93
unsigned int h
Definition aom_decoder.h:94
unsigned int threads
Definition aom_decoder.h:92
unsigned int allow_lowbitdepth
Definition aom_decoder.h:95
Initialization-time Feature Enabling.
Definition aom_decoder.h:71
unsigned int is_kf
Definition aom_decoder.h:74
unsigned int is_annexb
Definition aom_decoder.h:77
unsigned int h
Definition aom_decoder.h:73
unsigned int number_temporal_layers
Definition aom_decoder.h:76
unsigned int w
Definition aom_decoder.h:72
unsigned int number_spatial_layers
Definition aom_decoder.h:75
Image Descriptor.
Definition aom_image.h:182