AOMedia Codec SDK: aom/aomdx.h Source File

AOMedia Codec SDK

aomdx.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
21 #ifndef AOM_AOM_AOMDX_H_
22 #define AOM_AOM_AOMDX_H_
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 /* Include controls common to both the encoder and decoder */
29 #include "aom/aom.h"
30
36 extern aom_codec_iface_t aom_codec_av1_dx_algo;
37 extern aom_codec_iface_t *aom_codec_av1_dx(void);
42 typedef struct Accounting Accounting;
43
44 #ifndef AOM_INSPECTION_H_
45
47 typedef void (*aom_inspect_cb)(void *decoder, void *ctx);
48
49 #endif
50
56 typedef struct aom_inspect_init {
58 aom_inspect_cb inspect_cb;
59
61 void *inspect_ctx;
62 } aom_inspect_init;
63
70 typedef struct {
72 const unsigned char *buf;
74 int idx;
76 int show_existing;
77 } Av1DecodeReturn;
78
83 typedef struct aom_tile_data {
85 size_t coded_tile_data_size;
87 const void *coded_tile_data;
89 size_t extra_size;
90 } aom_tile_data;
91
96 typedef struct av1_ext_ref_frame {
98 aom_image_t *img;
100 int num;
101 } av1_ext_ref_frame_t;
102
111 enum aom_dec_control_id {
115 AOMD_GET_LAST_REF_UPDATES = AOM_DECODER_CTRL_ID_START,
116
118 AOMD_GET_FRAME_CORRUPTED,
119
123 AOMD_GET_LAST_REF_USED,
124
128 AV1D_GET_FRAME_SIZE,
129
133 AV1D_GET_DISPLAY_SIZE,
134
136 AV1D_GET_BIT_DEPTH,
137
139 AV1D_GET_IMG_FORMAT,
140
142 AV1D_GET_TILE_SIZE,
143
145 AV1D_GET_TILE_COUNT,
146
152 AV1_SET_BYTE_ALIGNMENT,
153
162 AV1_INVERT_TILE_DECODE_ORDER,
163
169 AV1_SET_SKIP_LOOP_FILTER,
170
177 AV1_GET_ACCOUNTING,
178
182 AOMD_GET_LAST_QUANTIZER,
183
190 AV1_SET_DECODE_TILE_ROW,
191 AV1_SET_DECODE_TILE_COL,
196 AV1_SET_TILE_MODE,
200 AV1D_GET_FRAME_HEADER_INFO,
204 AV1D_GET_TILE_DATA,
209 AV1D_SET_EXT_REF_PTR,
213 AV1D_EXT_TILE_DEBUG,
214
219 AV1D_SET_ROW_MT,
220
222 AV1D_SET_IS_ANNEXB,
223
230 AV1D_SET_OPERATING_POINT,
231
241 AV1D_SET_OUTPUT_ALL_LAYERS,
242
247 AV1_SET_INSPECTION_CALLBACK,
248
253 AV1D_SET_SKIP_FILM_GRAIN,
254
255 AOM_DECODER_CTRL_ID_MAX,
256 };
257
266 AOM_CTRL_USE_TYPE(AOMD_GET_LAST_REF_UPDATES, int *)
267 #define AOM_CTRL_AOMD_GET_LAST_REF_UPDATES
268 AOM_CTRL_USE_TYPE(AOMD_GET_FRAME_CORRUPTED, int *)
269 #define AOM_CTRL_AOMD_GET_FRAME_CORRUPTED
270 AOM_CTRL_USE_TYPE(AOMD_GET_LAST_REF_USED, int *)
271 #define AOM_CTRL_AOMD_GET_LAST_REF_USED
272 AOM_CTRL_USE_TYPE(AOMD_GET_LAST_QUANTIZER, int *)
273 #define AOM_CTRL_AOMD_GET_LAST_QUANTIZER
274 AOM_CTRL_USE_TYPE(AV1D_GET_DISPLAY_SIZE, int *)
275 #define AOM_CTRL_AV1D_GET_DISPLAY_SIZE
276 AOM_CTRL_USE_TYPE(AV1D_GET_BIT_DEPTH, unsigned int *)
277 #define AOM_CTRL_AV1D_GET_BIT_DEPTH
278 AOM_CTRL_USE_TYPE(AV1D_GET_IMG_FORMAT, aom_img_fmt_t *)
279 #define AOM_CTRL_AV1D_GET_IMG_FORMAT
280 AOM_CTRL_USE_TYPE(AV1D_GET_TILE_SIZE, unsigned int *)
281 #define AOM_CTRL_AV1D_GET_TILE_SIZE
282 AOM_CTRL_USE_TYPE(AV1D_GET_TILE_COUNT, unsigned int *)
283 #define AOM_CTRL_AV1D_GET_TILE_COUNT
284 AOM_CTRL_USE_TYPE(AV1D_GET_FRAME_SIZE, int *)
285 #define AOM_CTRL_AV1D_GET_FRAME_SIZE
286 AOM_CTRL_USE_TYPE(AV1_INVERT_TILE_DECODE_ORDER, int)
287 #define AOM_CTRL_AV1_INVERT_TILE_DECODE_ORDER
288 AOM_CTRL_USE_TYPE(AV1_GET_ACCOUNTING, Accounting **)
289 #define AOM_CTRL_AV1_GET_ACCOUNTING
290 AOM_CTRL_USE_TYPE(AV1_SET_DECODE_TILE_ROW, int)
291 #define AOM_CTRL_AV1_SET_DECODE_TILE_ROW
292 AOM_CTRL_USE_TYPE(AV1_SET_DECODE_TILE_COL, int)
293 #define AOM_CTRL_AV1_SET_DECODE_TILE_COL
294 AOM_CTRL_USE_TYPE(AV1_SET_TILE_MODE, unsigned int)
295 #define AOM_CTRL_AV1_SET_TILE_MODE
296 AOM_CTRL_USE_TYPE(AV1D_GET_FRAME_HEADER_INFO, aom_tile_data *)
297 #define AOM_CTRL_AV1D_GET_FRAME_HEADER_INFO
298 AOM_CTRL_USE_TYPE(AV1D_GET_TILE_DATA, aom_tile_data *)
299 #define AOM_CTRL_AV1D_GET_TILE_DATA
300 AOM_CTRL_USE_TYPE(AV1D_SET_EXT_REF_PTR, av1_ext_ref_frame_t *)
301 #define AOM_CTRL_AV1D_SET_EXT_REF_PTR
302 AOM_CTRL_USE_TYPE(AV1D_EXT_TILE_DEBUG, unsigned int)
303 #define AOM_CTRL_AV1D_EXT_TILE_DEBUG
304 AOM_CTRL_USE_TYPE(AV1D_SET_ROW_MT, unsigned int)
305 #define AOM_CTRL_AV1D_SET_ROW_MT
306 AOM_CTRL_USE_TYPE(AV1D_SET_SKIP_FILM_GRAIN, int)
307 #define AOM_CTRL_AV1D_SET_SKIP_FILM_GRAIN
308 AOM_CTRL_USE_TYPE(AV1D_SET_IS_ANNEXB, unsigned int)
309 #define AOM_CTRL_AV1D_SET_IS_ANNEXB
310 AOM_CTRL_USE_TYPE(AV1D_SET_OPERATING_POINT, int)
311 #define AOM_CTRL_AV1D_SET_OPERATING_POINT
312 AOM_CTRL_USE_TYPE(AV1D_SET_OUTPUT_ALL_LAYERS, int)
313 #define AOM_CTRL_AV1D_SET_OUTPUT_ALL_LAYERS
314 AOM_CTRL_USE_TYPE(AV1_SET_INSPECTION_CALLBACK, aom_inspect_init *)
315 #define AOM_CTRL_AV1_SET_INSPECTION_CALLBACK
316
319 #ifdef __cplusplus
320 } // extern "C"
321 #endif
322
323 #endif // AOM_AOM_AOMDX_H_
AOMD_GET_FRAME_CORRUPTED
@ AOMD_GET_FRAME_CORRUPTED
Definition: aomdx.h:118
AV1D_SET_OUTPUT_ALL_LAYERS
@ AV1D_SET_OUTPUT_ALL_LAYERS
Definition: aomdx.h:241
aom_tile_data::extra_size
size_t extra_size
Definition: aomdx.h:89
AV1_SET_BYTE_ALIGNMENT
@ AV1_SET_BYTE_ALIGNMENT
Definition: aomdx.h:152
AOMD_GET_LAST_REF_UPDATES
@ AOMD_GET_LAST_REF_UPDATES
Definition: aomdx.h:115
aom.h
Provides controls common to both the AOM encoder and decoder.
av1_ext_ref_frame::img
aom_image_t * img
Definition: aomdx.h:98
Av1DecodeReturn::idx
int idx
Definition: aomdx.h:74
AV1D_GET_BIT_DEPTH
@ AV1D_GET_BIT_DEPTH
Definition: aomdx.h:136
aom_img_fmt_t
enum aom_img_fmt aom_img_fmt_t
List of supported image formats.
aom_tile_data::coded_tile_data_size
size_t coded_tile_data_size
Definition: aomdx.h:85
aom_inspect_init
struct aom_inspect_init aom_inspect_init
Structure to hold inspection callback and context.
AV1_SET_SKIP_LOOP_FILTER
@ AV1_SET_SKIP_LOOP_FILTER
Definition: aomdx.h:169
aom_tile_data::coded_tile_data
const void * coded_tile_data
Definition: aomdx.h:87
AV1_SET_TILE_MODE
@ AV1_SET_TILE_MODE
Definition: aomdx.h:196
aom_codec_iface_t
const struct aom_codec_iface aom_codec_iface_t
Codec interface structure.
Definition: aom_codec.h:188
AOMD_GET_LAST_REF_USED
@ AOMD_GET_LAST_REF_USED
Definition: aomdx.h:123
aom_inspect_init::inspect_ctx
void * inspect_ctx
Definition: aomdx.h:61
Av1DecodeReturn::buf
const unsigned char * buf
Definition: aomdx.h:72
aom_inspect_init::inspect_cb
aom_inspect_cb inspect_cb
Definition: aomdx.h:58
AOMD_GET_LAST_QUANTIZER
@ AOMD_GET_LAST_QUANTIZER
Definition: aomdx.h:182
AOM_CTRL_USE_TYPE
#define AOM_CTRL_USE_TYPE(id, typ)
aom_codec_control type definition macro
Definition: aom_codec.h:436
Accounting
struct Accounting Accounting
Definition: aomdx.h:42
AV1_SET_DECODE_TILE_ROW
@ AV1_SET_DECODE_TILE_ROW
Definition: aomdx.h:190
AV1D_GET_FRAME_HEADER_INFO
@ AV1D_GET_FRAME_HEADER_INFO
Definition: aomdx.h:200
AV1D_SET_OPERATING_POINT
@ AV1D_SET_OPERATING_POINT
Definition: aomdx.h:230
AV1D_GET_TILE_COUNT
@ AV1D_GET_TILE_COUNT
Definition: aomdx.h:145
AV1D_GET_DISPLAY_SIZE
@ AV1D_GET_DISPLAY_SIZE
Definition: aomdx.h:133
av1_ext_ref_frame::num
int num
Definition: aomdx.h:100
aom_dec_control_id
aom_dec_control_id
AOM decoder control functions.
Definition: aomdx.h:111
AV1D_SET_SKIP_FILM_GRAIN
@ AV1D_SET_SKIP_FILM_GRAIN
Definition: aomdx.h:253
av1_ext_ref_frame_t
struct av1_ext_ref_frame av1_ext_ref_frame_t
Structure to hold the external reference frame pointer.
aom_inspect_init
Structure to hold inspection callback and context.
Definition: aomdx.h:56
AV1D_SET_IS_ANNEXB
@ AV1D_SET_IS_ANNEXB
Definition: aomdx.h:222
AV1D_GET_TILE_DATA
@ AV1D_GET_TILE_DATA
Definition: aomdx.h:204
aom_tile_data
struct aom_tile_data aom_tile_data
Structure to hold a tile's start address and size in the bitstream.
AV1_GET_ACCOUNTING
@ AV1_GET_ACCOUNTING
Definition: aomdx.h:177
av1_ext_ref_frame
Structure to hold the external reference frame pointer.
Definition: aomdx.h:96
AV1D_GET_IMG_FORMAT
@ AV1D_GET_IMG_FORMAT
Definition: aomdx.h:139
AV1D_EXT_TILE_DEBUG
@ AV1D_EXT_TILE_DEBUG
Definition: aomdx.h:213
AV1D_SET_EXT_REF_PTR
@ AV1D_SET_EXT_REF_PTR
Definition: aomdx.h:209
AV1D_SET_ROW_MT
@ AV1D_SET_ROW_MT
Definition: aomdx.h:219
AV1D_GET_FRAME_SIZE
@ AV1D_GET_FRAME_SIZE
Definition: aomdx.h:128
AV1_SET_INSPECTION_CALLBACK
@ AV1_SET_INSPECTION_CALLBACK
Definition: aomdx.h:247
Av1DecodeReturn::show_existing
int show_existing
Definition: aomdx.h:76
Av1DecodeReturn
Structure to collect a buffer index when inspecting.
Definition: aomdx.h:70
aom_tile_data
Structure to hold a tile's start address and size in the bitstream.
Definition: aomdx.h:83
aom_image
Image Descriptor.
Definition: aom_image.h:151
AV1_INVERT_TILE_DECODE_ORDER
@ AV1_INVERT_TILE_DECODE_ORDER
Definition: aomdx.h:162
AV1D_GET_TILE_SIZE
@ AV1D_GET_TILE_SIZE
Definition: aomdx.h:142
aom_inspect_cb
void(* aom_inspect_cb)(void *decoder, void *ctx)
Definition: aomdx.h:47