| AOMedia AV1 Codec

aom_encoder.h File Reference
Common Algorithm Interface » Encoder Algorithm Interface

Describes the encoder algorithm interface to applications. More...

`#include "aom/aom_codec.h"`
`#include "aom/aom_external_partition.h"`

Go to the source code of this file.

## Data Structures
struct | aom_fixed_buf
| Generic fixed size buffer structure. More...
struct | aom_codec_cx_pkt
| Encoder output packet. More...
struct | aom_rational
| Rational Number. More...
struct | cfg_options
| Encoder Config Options. More...
struct | aom_codec_enc_cfg
| Encoder configuration structure. More...

## Macros
#define | AOM_ENCODER_ABI_VERSION
| Current ABI version number.
#define | AOM_CODEC_CAP_PSNR 0x10000
| Encoder capabilities bitfield.
#define | AOM_CODEC_CAP_HIGHBITDEPTH 0x40000
#define | AOM_CODEC_USE_PSNR 0x10000
| Initialization-time Feature Enabling.
#define | AOM_CODEC_USE_HIGHBITDEPTH 0x40000
#define | AOM_ERROR_RESILIENT_DEFAULT 0x1
| Improve resiliency against losses of whole frames.
#define | AOM_EFLAG_FORCE_KF (1 << 0)
| Force this frame to be a keyframe.
#define | AOM_EFLAG_CALCULATE_PSNR (1 << 1)
| Calculate PSNR for this frame, requires g_lag_in_frames to be 0.
#define | MAX_TILE_WIDTHS 64
| Maximum number of tile widths in tile widths array.
#define | MAX_TILE_HEIGHTS 64
| Maximum number of tile heights in tile heights array.
#define | aom_codec_enc_init(ctx, iface, cfg, flags)
| Convenience macro for aom_codec_enc_init_ver()
#define | AOM_USAGE_GOOD_QUALITY 0u
| usage parameter analogous to AV1 GOOD QUALITY mode.
#define | AOM_USAGE_REALTIME 1u
| usage parameter analogous to AV1 REALTIME mode.
#define | AOM_USAGE_ALL_INTRA 2u
| usage parameter analogous to AV1 all intra mode.

## Typedefs
typedef struct aom_fixed_buf | aom_fixed_buf_t
| Generic fixed size buffer structure.
typedef uint32_t | aom_codec_er_flags_t
| Error Resilient flags.
typedef struct aom_codec_cx_pkt | aom_codec_cx_pkt_t
| Encoder output packet.
typedef struct aom_rational | aom_rational_t
| Rational Number.
typedef struct cfg_options | cfg_options_t
| Encoder Config Options.
typedef long | aom_enc_frame_flags_t
| Encoded Frame Flags.
typedef struct aom_codec_enc_cfg | aom_codec_enc_cfg_t
| Encoder configuration structure.

## Enumerations
enum | aom_codec_cx_pkt_kind { AOM_CODEC_CX_FRAME_PKT , AOM_CODEC_STATS_PKT , AOM_CODEC_FPMB_STATS_PKT , AOM_CODEC_PSNR_PKT , AOM_CODEC_CUSTOM_PKT = 256 }
| Encoder output packet variants. More...
enum | aom_enc_pass { AOM_RC_ONE_PASS = 0 , AOM_RC_FIRST_PASS = 1 , AOM_RC_SECOND_PASS = 2 , AOM_RC_THIRD_PASS = 3 , AOM_RC_LAST_PASS = 2 }
| Multi-pass Encoding Pass. More...
enum | aom_rc_mode { AOM_VBR , AOM_CBR , AOM_CQ , AOM_Q }
| Rate control mode. More...
enum | aom_kf_mode { AOM_KF_FIXED , AOM_KF_AUTO , AOM_KF_DISABLED = 0 }
| Keyframe placement mode. More...
enum | aom_superres_mode { AOM_SUPERRES_NONE , AOM_SUPERRES_FIXED , AOM_SUPERRES_RANDOM , AOM_SUPERRES_QTHRESH , AOM_SUPERRES_AUTO }
| Frame super-resolution mode. More...

## Functions
aom_codec_err_t | aom_codec_enc_init_ver (aom_codec_ctx_t *ctx, aom_codec_iface_t *iface, const aom_codec_enc_cfg_t *cfg, aom_codec_flags_t flags, int ver)
| Initialize an encoder instance.
aom_codec_err_t | aom_codec_enc_config_default (aom_codec_iface_t *iface, aom_codec_enc_cfg_t *cfg, unsigned int usage)
| Get the default configuration for a usage.
aom_codec_err_t | aom_codec_enc_config_set (aom_codec_ctx_t *ctx, const aom_codec_enc_cfg_t *cfg)
| Set or change configuration.
aom_fixed_buf_t * | aom_codec_get_global_headers (aom_codec_ctx_t *ctx)
| Get global stream headers.
aom_codec_err_t | aom_codec_encode (aom_codec_ctx_t *ctx, const aom_image_t *img, aom_codec_pts_t pts, unsigned long duration, aom_enc_frame_flags_t flags)
| Encode a frame.
aom_codec_err_t | aom_codec_set_cx_data_buf (aom_codec_ctx_t *ctx, const aom_fixed_buf_t *buf, unsigned int pad_before, unsigned int pad_after)
| Set compressed data output buffer.
const aom_codec_cx_pkt_t * | aom_codec_get_cx_data (aom_codec_ctx_t *ctx, aom_codec_iter_t *iter)
| Encoded data iterator.
const aom_image_t * | aom_codec_get_preview_frame (aom_codec_ctx_t *ctx)
| Get Preview Frame.

## Detailed Description

Describes the encoder algorithm interface to applications.

This file describes the interface between an application and a video encoder algorithm.

## Macro Definition Documentation

## ◆ MAX_TILE_WIDTHS

#define MAX_TILE_WIDTHS 64

Maximum number of tile widths in tile widths array.

This define gives the maximum number of elements in the tile_widths array.

## ◆ MAX_TILE_HEIGHTS

#define MAX_TILE_HEIGHTS 64

Maximum number of tile heights in tile heights array.

This define gives the maximum number of elements in the tile_heights array.