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
120 AOMD_GET_FRAME_CORRUPTED,
121
125 AOMD_GET_LAST_REF_USED,
126
132 AV1D_GET_FRAME_SIZE,
133
139 AV1D_GET_DISPLAY_SIZE,
140
144 AV1D_GET_BIT_DEPTH,
145
149 AV1D_GET_IMG_FORMAT,
150
153 AV1D_GET_TILE_SIZE,
154
158 AV1D_GET_TILE_COUNT,
159
167 AV1_SET_BYTE_ALIGNMENT,
168
179 AV1_INVERT_TILE_DECODE_ORDER,
180
188 AV1_SET_SKIP_LOOP_FILTER,
189
200 AV1_GET_ACCOUNTING,
201
207 AOMD_GET_LAST_QUANTIZER,
208
217 AV1_SET_DECODE_TILE_ROW,
218 AV1_SET_DECODE_TILE_COL,
219
225 AV1_SET_TILE_MODE,
226
230 AV1D_GET_FRAME_HEADER_INFO,
231
235 AV1D_GET_TILE_DATA,
236
243 AV1D_SET_EXT_REF_PTR,
244
248 AV1D_EXT_TILE_DEBUG,
249
256 AV1D_SET_ROW_MT,
257
261 AV1D_SET_IS_ANNEXB,
262
271 AV1D_SET_OPERATING_POINT,
272
283 AV1D_SET_OUTPUT_ALL_LAYERS,
284
291 AV1_SET_INSPECTION_CALLBACK,
292
299 AV1D_SET_SKIP_FILM_GRAIN,
300
301 AOM_DECODER_CTRL_ID_MAX,
302 };
303
316 AOM_CTRL_USE_TYPE(AOMD_GET_LAST_REF_UPDATES, int *)
317 #define AOM_CTRL_AOMD_GET_LAST_REF_UPDATES
318
319 AOM_CTRL_USE_TYPE(AOMD_GET_FRAME_CORRUPTED, int *)
320 #define AOM_CTRL_AOMD_GET_FRAME_CORRUPTED
321
322 AOM_CTRL_USE_TYPE(AOMD_GET_LAST_REF_USED, int *)
323 #define AOM_CTRL_AOMD_GET_LAST_REF_USED
324
325 AOM_CTRL_USE_TYPE(AOMD_GET_LAST_QUANTIZER, int *)
326 #define AOM_CTRL_AOMD_GET_LAST_QUANTIZER
327
328 AOM_CTRL_USE_TYPE(AV1D_GET_DISPLAY_SIZE, int *)
329 #define AOM_CTRL_AV1D_GET_DISPLAY_SIZE
330
331 AOM_CTRL_USE_TYPE(AV1D_GET_BIT_DEPTH, unsigned int *)
332 #define AOM_CTRL_AV1D_GET_BIT_DEPTH
333
334 AOM_CTRL_USE_TYPE(AV1D_GET_IMG_FORMAT, aom_img_fmt_t *)
335 #define AOM_CTRL_AV1D_GET_IMG_FORMAT
336
337 AOM_CTRL_USE_TYPE(AV1D_GET_TILE_SIZE, unsigned int *)
338 #define AOM_CTRL_AV1D_GET_TILE_SIZE
339
340 AOM_CTRL_USE_TYPE(AV1D_GET_TILE_COUNT, unsigned int *)
341 #define AOM_CTRL_AV1D_GET_TILE_COUNT
342
343 AOM_CTRL_USE_TYPE(AV1D_GET_FRAME_SIZE, int *)
344 #define AOM_CTRL_AV1D_GET_FRAME_SIZE
345
346 AOM_CTRL_USE_TYPE(AV1_INVERT_TILE_DECODE_ORDER, int)
347 #define AOM_CTRL_AV1_INVERT_TILE_DECODE_ORDER
348
349 AOM_CTRL_USE_TYPE(AV1_GET_ACCOUNTING, Accounting **)
350 #define AOM_CTRL_AV1_GET_ACCOUNTING
351
352 AOM_CTRL_USE_TYPE(AV1_SET_DECODE_TILE_ROW, int)
353 #define AOM_CTRL_AV1_SET_DECODE_TILE_ROW
354
355 AOM_CTRL_USE_TYPE(AV1_SET_DECODE_TILE_COL, int)
356 #define AOM_CTRL_AV1_SET_DECODE_TILE_COL
357
358 AOM_CTRL_USE_TYPE(AV1_SET_TILE_MODE, unsigned int)
359 #define AOM_CTRL_AV1_SET_TILE_MODE
360
361 AOM_CTRL_USE_TYPE(AV1D_GET_FRAME_HEADER_INFO, aom_tile_data *)
362 #define AOM_CTRL_AV1D_GET_FRAME_HEADER_INFO
363
364 AOM_CTRL_USE_TYPE(AV1D_GET_TILE_DATA, aom_tile_data *)
365 #define AOM_CTRL_AV1D_GET_TILE_DATA
366
367 AOM_CTRL_USE_TYPE(AV1D_SET_EXT_REF_PTR, av1_ext_ref_frame_t *)
368 #define AOM_CTRL_AV1D_SET_EXT_REF_PTR
369
370 AOM_CTRL_USE_TYPE(AV1D_EXT_TILE_DEBUG, unsigned int)
371 #define AOM_CTRL_AV1D_EXT_TILE_DEBUG
372
373 AOM_CTRL_USE_TYPE(AV1D_SET_ROW_MT, unsigned int)
374 #define AOM_CTRL_AV1D_SET_ROW_MT
375
376 AOM_CTRL_USE_TYPE(AV1D_SET_SKIP_FILM_GRAIN, int)
377 #define AOM_CTRL_AV1D_SET_SKIP_FILM_GRAIN
378
379 AOM_CTRL_USE_TYPE(AV1D_SET_IS_ANNEXB, unsigned int)
380 #define AOM_CTRL_AV1D_SET_IS_ANNEXB
381
382 AOM_CTRL_USE_TYPE(AV1D_SET_OPERATING_POINT, int)
383 #define AOM_CTRL_AV1D_SET_OPERATING_POINT
384
385 AOM_CTRL_USE_TYPE(AV1D_SET_OUTPUT_ALL_LAYERS, int)
386 #define AOM_CTRL_AV1D_SET_OUTPUT_ALL_LAYERS
387
388 AOM_CTRL_USE_TYPE(AV1_SET_INSPECTION_CALLBACK, aom_inspect_init *)
389 #define AOM_CTRL_AV1_SET_INSPECTION_CALLBACK
390
393 #ifdef __cplusplus
394 } // extern "C"
395 #endif
396
397 #endif // AOM_AOM_AOMDX_H_
AOMD_GET_FRAME_CORRUPTED
@ AOMD_GET_FRAME_CORRUPTED
Codec control function to check if the indicated frame is corrupted, int* parameter.
Definition: aomdx.h:120
AV1D_SET_OUTPUT_ALL_LAYERS
@ AV1D_SET_OUTPUT_ALL_LAYERS
Codec control function to indicate whether to output one frame per temporal unit (the default),...
Definition: aomdx.h:283
aom_tile_data::extra_size
size_t extra_size
Definition: aomdx.h:89
AV1_SET_BYTE_ALIGNMENT
@ AV1_SET_BYTE_ALIGNMENT
Codec control function to set the byte alignment of the planes in the reference buffers,...
Definition: aomdx.h:167
AOMD_GET_LAST_REF_UPDATES
@ AOMD_GET_LAST_REF_UPDATES
Codec control function to get info on which reference frames were updated by the last decode,...
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
Codec control function to get the bit depth of the stream, unsigned int* parameter.
Definition: aomdx.h:144
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
Codec control function to set the skip loop filter flag, int parameter.
Definition: aomdx.h:188
aom_tile_data::coded_tile_data
const void * coded_tile_data
Definition: aomdx.h:87
AV1_SET_TILE_MODE
@ AV1_SET_TILE_MODE
Codec control function to set the tile coding mode, int parameter.
Definition: aomdx.h:225
aom_codec_iface_t
const struct aom_codec_iface aom_codec_iface_t
Codec interface structure.
Definition: aom_codec.h:196
AOMD_GET_LAST_REF_USED
@ AOMD_GET_LAST_REF_USED
Codec control function to get info on which reference frames were used by the last decode,...
Definition: aomdx.h:125
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
Codec control function to get last decoded frame quantizer, int* parameter.
Definition: aomdx.h:207
AOM_CTRL_USE_TYPE
#define AOM_CTRL_USE_TYPE(id, typ)
Creates typechecking mechanisms for aom_codec_control.
Definition: aom_codec.h:436
Accounting
struct Accounting Accounting
Definition: aomdx.h:42
AV1_SET_DECODE_TILE_ROW
@ AV1_SET_DECODE_TILE_ROW
Codec control function to set the range of tile decoding, int parameter.
Definition: aomdx.h:217
AV1D_GET_FRAME_HEADER_INFO
@ AV1D_GET_FRAME_HEADER_INFO
Codec control function to get the frame header information of an encoded frame, unsigned int* paramet...
Definition: aomdx.h:230
AV1D_SET_OPERATING_POINT
@ AV1D_SET_OPERATING_POINT
Codec control function to indicate which operating point to use, int parameter.
Definition: aomdx.h:271
AV1D_GET_TILE_COUNT
@ AV1D_GET_TILE_COUNT
Codec control function to get the tile count in a tile list, int* parameter.
Definition: aomdx.h:158
AV1D_GET_DISPLAY_SIZE
@ AV1D_GET_DISPLAY_SIZE
Codec control function to get the current frame's intended display dimensions (as specified in the wr...
Definition: aomdx.h:139
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
Codec control function to set the skip film grain flag, int parameter.
Definition: aomdx.h:299
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
Codec control function to indicate whether bitstream is in Annex-B format, unsigned int parameter.
Definition: aomdx.h:261
AV1D_GET_TILE_DATA
@ AV1D_GET_TILE_DATA
Codec control function to get the start address and size of a tile in the coded bitstream,...
Definition: aomdx.h:235
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
Codec control function to retrieve a pointer to the Accounting struct, takes Accounting** as paramete...
Definition: aomdx.h:200
av1_ext_ref_frame
Structure to hold the external reference frame pointer.
Definition: aomdx.h:96
AV1D_GET_IMG_FORMAT
@ AV1D_GET_IMG_FORMAT
Codec control function to get the image format of the stream, aom_img_fmt_t* parameter.
Definition: aomdx.h:149
AV1D_EXT_TILE_DEBUG
@ AV1D_EXT_TILE_DEBUG
Codec control function to enable the ext-tile software debug and testing code in the decoder,...
Definition: aomdx.h:248
AV1D_SET_EXT_REF_PTR
@ AV1D_SET_EXT_REF_PTR
Codec control function to set the external references' pointers in the decoder, av1_ext_ref_frame_t* ...
Definition: aomdx.h:243
AV1D_SET_ROW_MT
@ AV1D_SET_ROW_MT
Codec control function to enable the row based multi-threading of decoding, unsigned int parameter.
Definition: aomdx.h:256
AV1D_GET_FRAME_SIZE
@ AV1D_GET_FRAME_SIZE
Codec control function to get the dimensions that the current frame is decoded at,...
Definition: aomdx.h:132
AV1_SET_INSPECTION_CALLBACK
@ AV1_SET_INSPECTION_CALLBACK
Codec control function to set an aom_inspect_cb callback that is invoked each time a frame is decoded...
Definition: aomdx.h:291
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:171
AV1_INVERT_TILE_DECODE_ORDER
@ AV1_INVERT_TILE_DECODE_ORDER
Codec control function to invert the decoding order to from right to left, int parameter.
Definition: aomdx.h:179
AV1D_GET_TILE_SIZE
@ AV1D_GET_TILE_SIZE
Codec control function to get the size of the tile, unsigned int parameter.
Definition: aomdx.h:153
aom_inspect_cb
void(* aom_inspect_cb)(void *decoder, void *ctx)
Definition: aomdx.h:47