AOMedia AV1 Codec
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 
45 
50 typedef struct Accounting Accounting;
51 
52 #ifndef AOM_INSPECTION_H_
55 typedef void (*aom_inspect_cb)(void *decoder, void *ctx);
56 
57 #endif
58 
64 typedef struct aom_inspect_init {
67 
69  void *inspect_ctx;
71 
78 typedef struct {
80  const unsigned char *buf;
82  int idx;
86 
91 typedef struct aom_tile_data {
95  const void *coded_tile_data;
97  size_t extra_size;
99 
107 #define AOM_MAX_TILE_COLS 64
115 #define AOM_MAX_TILE_ROWS 64
116 
123 typedef struct aom_tile_info {
135 
141 typedef struct aom_still_picture_info {
147 
153 typedef struct aom_s_frame_info {
159 
174 
179 typedef struct av1_ext_ref_frame {
183  int num;
185 
200 
205 
210 
218 
226 
231 
236 
241 
246 
255 
267 
276 
288 
295 
305  AV1_SET_DECODE_TILE_COL,
306 
314 
319 
324 
332 
337 
345 
350 
360 
372 
380 
388 
393 
400 
405 
412 
421 
426 
434 
439 
444 
448 
453 
458 
466 };
467 
481 #define AOM_CTRL_AOMD_GET_LAST_REF_UPDATES
482 
484 #define AOM_CTRL_AOMD_GET_FRAME_CORRUPTED
485 
487 #define AOM_CTRL_AOMD_GET_LAST_REF_USED
488 
490 #define AOM_CTRL_AV1D_GET_FRAME_SIZE
491 
493 #define AOM_CTRL_AV1D_GET_DISPLAY_SIZE
494 
495 AOM_CTRL_USE_TYPE(AV1D_GET_BIT_DEPTH, unsigned int *)
496 #define AOM_CTRL_AV1D_GET_BIT_DEPTH
497 
499 #define AOM_CTRL_AV1D_GET_IMG_FORMAT
500 
501 AOM_CTRL_USE_TYPE(AV1D_GET_TILE_SIZE, unsigned int *)
502 #define AOM_CTRL_AV1D_GET_TILE_SIZE
503 
504 AOM_CTRL_USE_TYPE(AV1D_GET_TILE_COUNT, unsigned int *)
505 #define AOM_CTRL_AV1D_GET_TILE_COUNT
506 
508 #define AOM_CTRL_AV1_INVERT_TILE_DECODE_ORDER
509 
511 #define AOM_CTRL_AV1_SET_SKIP_LOOP_FILTER
512 
514 #define AOM_CTRL_AV1_GET_ACCOUNTING
515 
517 #define AOM_CTRL_AOMD_GET_LAST_QUANTIZER
518 
520 #define AOM_CTRL_AV1_SET_DECODE_TILE_ROW
521 
522 AOM_CTRL_USE_TYPE(AV1_SET_DECODE_TILE_COL, int)
523 #define AOM_CTRL_AV1_SET_DECODE_TILE_COL
524 
526 #define AOM_CTRL_AV1_SET_TILE_MODE
527 
529 #define AOM_CTRL_AV1D_GET_FRAME_HEADER_INFO
530 
532 #define AOM_CTRL_AV1D_GET_TILE_DATA
533 
535 #define AOM_CTRL_AV1D_SET_EXT_REF_PTR
536 
538 #define AOM_CTRL_AV1D_EXT_TILE_DEBUG
539 
540 AOM_CTRL_USE_TYPE(AV1D_SET_ROW_MT, unsigned int)
541 #define AOM_CTRL_AV1D_SET_ROW_MT
542 
544 #define AOM_CTRL_AV1D_SET_IS_ANNEXB
545 
547 #define AOM_CTRL_AV1D_SET_OPERATING_POINT
548 
550 #define AOM_CTRL_AV1D_SET_OUTPUT_ALL_LAYERS
551 
553 #define AOM_CTRL_AV1_SET_INSPECTION_CALLBACK
554 
556 #define AOM_CTRL_AV1D_SET_SKIP_FILM_GRAIN
557 
559 #define AOM_CTRL_AOMD_GET_FWD_KF_PRESENT
560 
562 #define AOM_CTRL_AOMD_GET_FRAME_FLAGS
563 
565 #define AOM_CTRL_AOMD_GET_ALTREF_PRESENT
566 
568 #define AOM_CTRL_AOMD_GET_TILE_INFO
569 
572 #define AOM_CTRL_AOMD_GET_SCREEN_CONTENT_TOOLS_INFO
573 
575 #define AOM_CTRL_AOMD_GET_STILL_PICTURE
576 
578 #define AOMD_CTRL_AOMD_GET_SB_SIZE
579 
581 #define AOMD_CTRL_AOMD_GET_SHOW_EXISTING_FRAME_FLAG
582 
584 #define AOMD_CTRL_AOMD_GET_S_FRAME_INFO
585 
587 #define AOM_CTRL_AOMD_GET_SHOW_FRAME_FLAG
588 
590 #define AOM_CTRL_AOMD_GET_BASE_Q_IDX
591 
592 AOM_CTRL_USE_TYPE(AOMD_GET_ORDER_HINT, unsigned int *)
593 #define AOM_CTRL_AOMD_GET_ORDER_HINT
594 
595 // The AOM_CTRL_USE_TYPE macro can't be used with AV1D_GET_MI_INFO because
596 // AV1D_GET_MI_INFO takes more than one parameter.
597 #define AOM_CTRL_AV1D_GET_MI_INFO
600 #ifdef __cplusplus
601 } // extern "C"
602 #endif
603 
604 #endif // AOM_AOM_AOMDX_H_
Provides controls common to both the AOM encoder and decoder.
enum aom_img_fmt aom_img_fmt_t
List of supported image formats.
struct aom_screen_content_tools_info aom_screen_content_tools_info
Structure to hold information about screen content tools.
void(* aom_inspect_cb)(void *decoder, void *ctx)
Definition: aomdx.h:55
aom_codec_iface_t aom_codec_av1_dx_algo
A single instance of the AV1 decoder.
aom_dec_control_id
AOM decoder control functions.
Definition: aomdx.h:195
struct Accounting Accounting
Definition: aomdx.h:50
struct aom_still_picture_info aom_still_picture_info
Structure to hold information about still image coding.
#define AOM_MAX_TILE_ROWS
Max number of tile rows.
Definition: aomdx.h:115
#define AOM_MAX_TILE_COLS
Max number of tile columns.
Definition: aomdx.h:107
struct aom_s_frame_info aom_s_frame_info
Structure to hold information about S_FRAME.
aom_codec_iface_t * aom_codec_av1_dx(void)
The interface to the AV1 decoder.
struct aom_tile_info aom_tile_info
Structure to hold information about tiles in a frame.
struct aom_inspect_init aom_inspect_init
Structure to hold inspection callback and context.
struct av1_ext_ref_frame av1_ext_ref_frame_t
Structure to hold the external reference frame pointer.
struct aom_tile_data aom_tile_data
Structure to hold a tile's start address and size in the bitstream.
@ AOMD_GET_LAST_REF_USED
Codec control function to get info on which reference frames were used by the last decode,...
Definition: aomdx.h:209
@ AV1_SET_TILE_MODE
Codec control function to set the tile coding mode, unsigned int parameter.
Definition: aomdx.h:313
@ AOMD_GET_FRAME_CORRUPTED
Codec control function to check if the indicated frame is corrupted, int* parameter.
Definition: aomdx.h:204
@ AV1D_GET_FRAME_SIZE
Codec control function to get the dimensions that the current frame is decoded at,...
Definition: aomdx.h:217
@ AV1D_SET_SKIP_FILM_GRAIN
Codec control function to set the skip film grain flag, int parameter.
Definition: aomdx.h:387
@ AOMD_GET_TILE_INFO
Codec control function to get tile information of the previous frame decoded, aom_tile_info* paramete...
Definition: aomdx.h:411
@ AV1D_SET_IS_ANNEXB
Codec control function to indicate whether bitstream is in Annex-B format, unsigned int parameter.
Definition: aomdx.h:349
@ AV1D_GET_TILE_COUNT
Codec control function to get the tile count in a tile list, unsigned int* parameter.
Definition: aomdx.h:245
@ AOMD_GET_BASE_Q_IDX
Codec control function to get the base q index of a frame, int* parameter.
Definition: aomdx.h:452
@ AOMD_GET_SB_SIZE
Codec control function to get superblock size, aom_superblock_size_t* parameter.
Definition: aomdx.h:433
@ AOMD_GET_SHOW_EXISTING_FRAME_FLAG
Codec control function to check if the previous frame decoded has show existing frame flag set,...
Definition: aomdx.h:438
@ AOMD_GET_ORDER_HINT
Codec control function to get the order hint of a frame, unsigned int* parameter.
Definition: aomdx.h:457
@ AOMD_GET_ALTREF_PRESENT
Codec control function to check the presence of altref frames, int* parameter.
Definition: aomdx.h:404
@ AOMD_GET_SHOW_FRAME_FLAG
Codec control function to get the show frame flag, int* parameter.
Definition: aomdx.h:447
@ AV1_SET_SKIP_LOOP_FILTER
Codec control function to set the skip loop filter flag, int parameter.
Definition: aomdx.h:275
@ AV1D_SET_ROW_MT
Codec control function to enable the row based multi-threading of decoding, unsigned int parameter.
Definition: aomdx.h:344
@ AV1D_GET_TILE_SIZE
Codec control function to get the size of the tile, unsigned int* parameter.
Definition: aomdx.h:240
@ AV1D_GET_DISPLAY_SIZE
Codec control function to get the current frame's intended display dimensions (as specified in the wr...
Definition: aomdx.h:225
@ AV1D_SET_OUTPUT_ALL_LAYERS
Codec control function to indicate whether to output one frame per temporal unit (the default),...
Definition: aomdx.h:371
@ AOMD_GET_SCREEN_CONTENT_TOOLS_INFO
Codec control function to get screen content tools information, aom_screen_content_tools_info* parame...
Definition: aomdx.h:420
@ AV1D_SET_OPERATING_POINT
Codec control function to indicate which operating point to use, int parameter.
Definition: aomdx.h:359
@ AOMD_GET_LAST_QUANTIZER
Codec control function to get last decoded frame quantizer, int* parameter.
Definition: aomdx.h:294
@ AV1D_GET_MI_INFO
Codec control function to get the info of a 4x4 block. Parameters: int mi_row, int mi_col,...
Definition: aomdx.h:465
@ AOMD_GET_FRAME_FLAGS
Codec control function to get the frame flags of the previous frame decoded, int* parameter.
Definition: aomdx.h:399
@ AV1_GET_ACCOUNTING
Codec control function to retrieve a pointer to the Accounting struct, takes Accounting** as paramete...
Definition: aomdx.h:287
@ AOMD_GET_LAST_REF_UPDATES
Codec control function to get info on which reference frames were updated by the last decode,...
Definition: aomdx.h:199
@ AV1_SET_BYTE_ALIGNMENT
Codec control function to set the byte alignment of the planes in the reference buffers,...
Definition: aomdx.h:254
@ AV1_SET_DECODE_TILE_ROW
Codec control function to set the range of tile decoding, int parameter.
Definition: aomdx.h:304
@ AV1_INVERT_TILE_DECODE_ORDER
Codec control function to invert the decoding order to from right to left, int parameter.
Definition: aomdx.h:266
@ AOMD_GET_STILL_PICTURE
Codec control function to get the still picture coding information, aom_still_picture_info* parameter...
Definition: aomdx.h:425
@ AV1D_GET_IMG_FORMAT
Codec control function to get the image format of the stream, aom_img_fmt_t* parameter.
Definition: aomdx.h:235
@ AV1D_GET_BIT_DEPTH
Codec control function to get the bit depth of the stream, unsigned int* parameter.
Definition: aomdx.h:230
@ AOMD_GET_FWD_KF_PRESENT
Codec control function to check the presence of forward key frames, int* parameter.
Definition: aomdx.h:392
@ AOMD_GET_S_FRAME_INFO
Codec control function to get the S_FRAME coding information, aom_s_frame_info* parameter.
Definition: aomdx.h:443
@ AV1D_GET_TILE_DATA
Codec control function to get the start address and size of a tile in the coded bitstream,...
Definition: aomdx.h:323
@ 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:331
@ 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:379
@ AV1D_GET_FRAME_HEADER_INFO
Codec control function to get the frame header information of an encoded frame, aom_tile_data* parame...
Definition: aomdx.h:318
@ AV1D_EXT_TILE_DEBUG
Codec control function to enable the ext-tile software debug and testing code in the decoder,...
Definition: aomdx.h:336
@ AOM_DECODER_CTRL_ID_START
Start point of control IDs for aom_dec_control_id. Any new common control IDs should be added above.
Definition: aom.h:81
#define AOM_CTRL_USE_TYPE(id, typ)
Creates typechecking mechanisms for aom_codec_control.
Definition: aom_codec.h:531
const struct aom_codec_iface aom_codec_iface_t
Codec interface structure.
Definition: aom_codec.h:254
enum aom_superblock_size aom_superblock_size_t
Superblock size selection.
Structure to collect a buffer index when inspecting.
Definition: aomdx.h:78
const unsigned char * buf
Definition: aomdx.h:80
int show_existing
Definition: aomdx.h:84
int idx
Definition: aomdx.h:82
Image Descriptor.
Definition: aom_image.h:180
Structure to hold inspection callback and context.
Definition: aomdx.h:64
void * inspect_ctx
Definition: aomdx.h:69
aom_inspect_cb inspect_cb
Definition: aomdx.h:66
Structure to hold information about S_FRAME.
Definition: aomdx.h:153
int is_s_frame_at_altref
Definition: aomdx.h:157
int is_s_frame
Definition: aomdx.h:155
Structure to hold information about screen content tools.
Definition: aomdx.h:166
int force_integer_mv
Definition: aomdx.h:172
int allow_intrabc
Definition: aomdx.h:170
int allow_screen_content_tools
Definition: aomdx.h:168
Structure to hold information about still image coding.
Definition: aomdx.h:141
int is_reduced_still_picture_hdr
Definition: aomdx.h:145
int is_still_picture
Definition: aomdx.h:143
Structure to hold a tile's start address and size in the bitstream.
Definition: aomdx.h:91
const void * coded_tile_data
Definition: aomdx.h:95
size_t coded_tile_data_size
Definition: aomdx.h:93
size_t extra_size
Definition: aomdx.h:97
Structure to hold information about tiles in a frame.
Definition: aomdx.h:123
int tile_heights[64]
Definition: aomdx.h:131
int tile_rows
Definition: aomdx.h:127
int tile_columns
Definition: aomdx.h:125
int num_tile_groups
Definition: aomdx.h:133
int tile_widths[64]
Definition: aomdx.h:129
Structure to hold the external reference frame pointer.
Definition: aomdx.h:179
int num
Definition: aomdx.h:183
aom_image_t * img
Definition: aomdx.h:181