AOMedia AV1 Codec: AOMedia AOM/AV1 Decoder

| AOMedia AV1 Codec

AOMedia AOM/AV1 Decoder
Supported Codecs » AOM

## Files
file | aomdx.h
| Provides definitions for using AOM or AV1 within the aom Decoder interface.

## Data Structures
struct | aom_inspect_init
| Structure to hold inspection callback and context. More...
struct | Av1DecodeReturn
| Structure to collect a buffer index when inspecting. More...
struct | aom_tile_data
| Structure to hold a tile's start address and size in the bitstream. More...
struct | aom_tile_info
| Structure to hold information about tiles in a frame. More...
struct | aom_still_picture_info
| Structure to hold information about still image coding. More...
struct | aom_s_frame_info
| Structure to hold information about S_FRAME. More...
struct | aom_screen_content_tools_info
| Structure to hold information about screen content tools. More...
struct | av1_ext_ref_frame
| Structure to hold the external reference frame pointer. More...

## Macros
#define | AOM_MAX_TILE_COLS 64
| Max number of tile columns.
#define | AOM_MAX_TILE_ROWS 64
| Max number of tile rows.

## Typedefs
typedef struct Accounting | Accounting
typedef void(* | aom_inspect_cb) (void *decoder, void *ctx)
typedef struct aom_inspect_init | aom_inspect_init
| Structure to hold inspection callback and context.
typedef struct aom_tile_data | aom_tile_data
| Structure to hold a tile's start address and size in the bitstream.
typedef struct aom_tile_info | aom_tile_info
| Structure to hold information about tiles in a frame.
typedef struct aom_still_picture_info | aom_still_picture_info
| Structure to hold information about still image coding.
typedef struct aom_s_frame_info | aom_s_frame_info
| Structure to hold information about S_FRAME.
typedef struct aom_screen_content_tools_info | aom_screen_content_tools_info
| Structure to hold information about screen content tools.
typedef struct av1_ext_ref_frame | av1_ext_ref_frame_t
| Structure to hold the external reference frame pointer.

## Enumerations
enum | aom_dec_control_id { AOMD_GET_LAST_REF_UPDATES = AOM_DECODER_CTRL_ID_START , AOMD_GET_FRAME_CORRUPTED , AOMD_GET_LAST_REF_USED , AV1D_GET_FRAME_SIZE , AV1D_GET_DISPLAY_SIZE , AV1D_GET_BIT_DEPTH , AV1D_GET_IMG_FORMAT , AV1D_GET_TILE_SIZE , AV1D_GET_TILE_COUNT , AV1_SET_BYTE_ALIGNMENT , AV1_INVERT_TILE_DECODE_ORDER , AV1_SET_SKIP_LOOP_FILTER , AV1_GET_ACCOUNTING , AOMD_GET_LAST_QUANTIZER , AV1_SET_DECODE_TILE_ROW , AV1_SET_DECODE_TILE_COL , AV1_SET_TILE_MODE , AV1D_GET_FRAME_HEADER_INFO , AV1D_GET_TILE_DATA , AV1D_SET_EXT_REF_PTR , AV1D_EXT_TILE_DEBUG , AV1D_SET_ROW_MT , AV1D_SET_IS_ANNEXB , AV1D_SET_OPERATING_POINT , AV1D_SET_OUTPUT_ALL_LAYERS , AV1_SET_INSPECTION_CALLBACK , AV1D_SET_SKIP_FILM_GRAIN , AOMD_GET_FWD_KF_PRESENT , AOMD_GET_FRAME_FLAGS , AOMD_GET_ALTREF_PRESENT , AOMD_GET_TILE_INFO , AOMD_GET_SCREEN_CONTENT_TOOLS_INFO , AOMD_GET_STILL_PICTURE , AOMD_GET_SB_SIZE , AOMD_GET_SHOW_EXISTING_FRAME_FLAG , AOMD_GET_S_FRAME_INFO , AOMD_GET_SHOW_FRAME_FLAG , AOMD_GET_BASE_Q_IDX , AOMD_GET_ORDER_HINT , AV1D_GET_MI_INFO }
| AOM decoder control functions. More...

## Algorithm interface for AV1
This interface provides the capability to decode AV1 streams.
aom_codec_iface_t | aom_codec_av1_dx_algo
| A single instance of the AV1 decoder.
aom_codec_iface_t * | aom_codec_av1_dx (void)
| The interface to the AV1 decoder.

## Detailed Description

## Macro Definition Documentation

## ◆ AOM_MAX_TILE_COLS

#define AOM_MAX_TILE_COLS 64

Max number of tile columns.

This is the limit of number of tile columns allowed within a frame.

Currently same as "MAX_TILE_COLS" in AV1, the maximum that AV1 supports.

## ◆ AOM_MAX_TILE_ROWS

#define AOM_MAX_TILE_ROWS 64

Max number of tile rows.

This is the limit of number of tile rows allowed within a frame.

Currently same as "MAX_TILE_ROWS" in AV1, the maximum that AV1 supports.

## Typedef Documentation

## ◆ Accounting

typedef struct Accounting Accounting

Data structure that stores bit accounting for debug

## ◆ aom_inspect_cb

typedef void(* aom_inspect_cb) (void *decoder, void *ctx)

Callback that inspects decoder frame data.

## ◆ aom_inspect_init

typedef struct aom_inspect_init aom_inspect_init

Structure to hold inspection callback and context.

Defines a structure to hold the inspection callback function and calling context.

## ◆ aom_tile_data

typedef struct aom_tile_data aom_tile_data

Structure to hold a tile's start address and size in the bitstream.

Defines a structure to hold a tile's start address and size in the bitstream.

## ◆ aom_tile_info

typedef struct aom_tile_info aom_tile_info

Structure to hold information about tiles in a frame.

Defines a structure to hold a frame's tile information, namely number of tile columns, number of tile_rows, and the width and height of each tile.

## ◆ aom_still_picture_info

typedef struct aom_still_picture_info aom_still_picture_info

Structure to hold information about still image coding.

Defines a structure to hold a information regarding still picture and its header type.

## ◆ aom_s_frame_info

typedef struct aom_s_frame_info aom_s_frame_info

Structure to hold information about S_FRAME.

Defines a structure to hold a information regarding S_FRAME and its position.

## ◆ aom_screen_content_tools_info

typedef struct aom_screen_content_tools_info aom_screen_content_tools_info

Structure to hold information about screen content tools.

Defines a structure to hold information about screen content tools, namely: allow_screen_content_tools, allow_intrabc, and force_integer_mv.

## ◆ av1_ext_ref_frame_t

typedef struct av1_ext_ref_frame av1_ext_ref_frame_t

Structure to hold the external reference frame pointer.

Define a structure to hold the external reference frame pointer.

## Enumeration Type Documentation

## ◆ aom_dec_control_id

enum aom_dec_control_id

AOM decoder control functions.

This set of macros define the control functions available for the AOM decoder interface. The range for decoder control ID is >= 256.

See also
  aom_codec_control(aom_codec_ctx_t *ctx, int ctrl_id, ...)

Enumerator
AOMD_GET_LAST_REF_UPDATES | Codec control function to get info on which reference frames were updated by the last decode, int* parameter.
AOMD_GET_FRAME_CORRUPTED | Codec control function to check if the indicated frame is corrupted, int* parameter.
AOMD_GET_LAST_REF_USED | Codec control function to get info on which reference frames were used by the last decode, int* parameter.
AV1D_GET_FRAME_SIZE | Codec control function to get the dimensions that the current frame is decoded at, int* parameter. This may be different to the intended display size for the frame as specified in the wrapper or frame header (see AV1D_GET_DISPLAY_SIZE).
AV1D_GET_DISPLAY_SIZE | Codec control function to get the current frame's intended display dimensions (as specified in the wrapper or frame header), int* parameter. This may be different to the decoded dimensions of this frame (see AV1D_GET_FRAME_SIZE).
AV1D_GET_BIT_DEPTH | Codec control function to get the bit depth of the stream, unsigned int* parameter.
AV1D_GET_IMG_FORMAT | Codec control function to get the image format of the stream, aom_img_fmt_t* parameter.
AV1D_GET_TILE_SIZE | Codec control function to get the width and height (in pixels) of the tiles in a tile list, unsigned int* parameter. Tile width is in the high 16 bits of the output value, and tile height is in the low 16 bits of the output value.
AV1D_GET_TILE_COUNT | Codec control function to get the tile count in a tile list, unsigned int* parameter.
AV1_SET_BYTE_ALIGNMENT | Codec control function to set the byte alignment of the planes in the reference buffers, int parameter. Valid values are power of 2, from 32 to 1024. A value of 0 sets legacy alignment. I.e. Y plane is aligned to 32 bytes, U plane directly follows Y plane, and V plane directly follows U plane. Default value is 0.
AV1_INVERT_TILE_DECODE_ORDER | Codec control function to invert the decoding order to from right to left, int parameter. The function is used in a test to confirm the decoding independence of tile columns. The function may be used in application where this order of decoding is desired. int parameter TODO(yaowu): Rework the unit test that uses this control, and in a future release, this test-only control shall be removed.
AV1_SET_SKIP_LOOP_FILTER | Codec control function to set the skip loop filter flag, int parameter. Valid values are integers. The decoder will skip the loop filter when its value is set to nonzero. If the loop filter is skipped the decoder may accumulate decode artifacts. The default value is 0.
AV1_GET_ACCOUNTING | Codec control function to retrieve a pointer to the Accounting struct, takes Accounting** as parameter. If called before a frame has been decoded, this returns AOM_CODEC_ERROR. The caller should ensure that AOM_CODEC_OK is returned before attempting to dereference the Accounting pointer. Attention When configured with -DCONFIG_ACCOUNTING=0, the default, this returns AOM_CODEC_INCAPABLE.
AOMD_GET_LAST_QUANTIZER | Codec control function to get last decoded frame quantizer, int* parameter. Returned value uses internal quantizer scale defined by the codec.
AV1_SET_DECODE_TILE_ROW | Codec control function to set the range of tile decoding, int parameter. A value that is greater and equal to zero indicates only the specific row/column is decoded. A value that is -1 indicates the whole row/column is decoded. A special case is both values are -1 that means the whole frame is decoded.
AV1_SET_TILE_MODE | Codec control function to set the tile coding mode, unsigned int parameter. 0 = tiles are coded in normal tile mode 1 = tiles are coded in large-scale tile mode
AV1D_GET_FRAME_HEADER_INFO | Codec control function to get the frame header information of an encoded frame, aom_tile_data* parameter.
AV1D_GET_TILE_DATA | Codec control function to get the start address and size of a tile in the coded bitstream, aom_tile_data* parameter.
AV1D_SET_EXT_REF_PTR | Codec control function to set the external references' pointers in the decoder, av1_ext_ref_frame_t* parameter. This is used while decoding the tile list OBU in large-scale tile coding mode.
AV1D_EXT_TILE_DEBUG | Codec control function to enable the ext-tile software debug and testing code in the decoder, unsigned int parameter.
AV1D_SET_ROW_MT | Codec control function to enable the row based multi-threading of decoding, unsigned int parameter. 0 = disabled 1 = enabled (default)
AV1D_SET_IS_ANNEXB | Codec control function to indicate whether bitstream is in Annex-B format, unsigned int parameter.
AV1D_SET_OPERATING_POINT | Codec control function to indicate which operating point to use, int parameter. A scalable stream may define multiple operating points, each of which defines a set of temporal and spatial layers to be processed. The operating point index may take a value between 0 and operating_points_cnt_minus_1 (which is at most 31).
AV1D_SET_OUTPUT_ALL_LAYERS | Codec control function to indicate whether to output one frame per temporal unit (the default), or one frame per spatial layer, int parameter. In a scalable stream, each temporal unit corresponds to a single "frame" of video, and within a temporal unit there may be multiple spatial layers with different versions of that frame. For video playback, only the highest-quality version (within the selected operating point) is needed, but for some use cases it is useful to have access to multiple versions of a frame when they are available.
AV1_SET_INSPECTION_CALLBACK | Codec control function to set an aom_inspect_cb callback that is invoked each time a frame is decoded, aom_inspect_init* parameter. Attention When configured with -DCONFIG_INSPECTION=0, the default, this returns AOM_CODEC_INCAPABLE.
AV1D_SET_SKIP_FILM_GRAIN | Codec control function to set the skip film grain flag, int parameter. Valid values are integers. The decoder will skip the film grain when its value is set to nonzero. The default value is 0.
AOMD_GET_FWD_KF_PRESENT | Codec control function to check the presence of forward key frames, int* parameter.
AOMD_GET_FRAME_FLAGS | Codec control function to get the frame flags of the previous frame decoded, int* parameter. This will return a flag of type aom_codec_frame_flags_t.
AOMD_GET_ALTREF_PRESENT | Codec control function to check the presence of altref frames, int* parameter.
AOMD_GET_TILE_INFO | Codec control function to get tile information of the previous frame decoded, aom_tile_info* parameter. This will return a struct of type aom_tile_info.
AOMD_GET_SCREEN_CONTENT_TOOLS_INFO | Codec control function to get screen content tools information, aom_screen_content_tools_info* parameter. It returns a struct of type aom_screen_content_tools_info, which contains the header flags allow_screen_content_tools, allow_intrabc, and force_integer_mv.
AOMD_GET_STILL_PICTURE | Codec control function to get the still picture coding information, aom_still_picture_info* parameter.
AOMD_GET_SB_SIZE | Codec control function to get superblock size, aom_superblock_size_t* parameter. It returns an enum, indicating the superblock size read from the sequence header(0 for BLOCK_64X64 and 1 for BLOCK_128X128)
AOMD_GET_SHOW_EXISTING_FRAME_FLAG | Codec control function to check if the previous frame decoded has show existing frame flag set, int* parameter.
AOMD_GET_S_FRAME_INFO | Codec control function to get the S_FRAME coding information, aom_s_frame_info* parameter.
AOMD_GET_SHOW_FRAME_FLAG | Codec control function to get the show frame flag, int* parameter.
AOMD_GET_BASE_Q_IDX | Codec control function to get the base q index of a frame, int* parameter.
AOMD_GET_ORDER_HINT | Codec control function to get the order hint of a frame, unsigned int* parameter.
AV1D_GET_MI_INFO | Codec control function to get the info of a 4x4 block. Parameters: int mi_row, int mi_col, and MB_MODE_INFO*. Note This only returns a shallow copy, so all pointer members should not be used.

## Variable Documentation

## ◆ aom_codec_av1_dx_algo

aom_codec_iface_t aom_codec_av1_dx_algo
| extern

A single instance of the AV1 decoder.

Deprecated
  This access mechanism is provided for backwards compatibility; prefer aom_codec_av1_dx().