This SDK includes a number of sample applications. Each sample documents a feature of the SDK in both prose and the associated C code. The following samples are included:
In addition, the SDK contains a number of utilities. Since these utilities are built upon the concepts described in the sample code listed above, they are not documented in pieces like the samples are. Their source is included here for reference. The following utilities are included:
Codec control function to get last quantizer chosen by the encoder.
Definition: aomcx.h:211
Definition: aom_image.h:45
aom_img_fmt_t fmt
Definition: aom_image.h:142
Definition: aom_image.h:92
Definition: aom_image.h:43
Definition: aom_image.h:96
Definition: aom_image.h:69
Definition: aom_image.h:71
unsigned char * active_map
specify an on (1) or off (0) each 16x16 region within a frame
Definition: aomcx.h:905
size_t extra_size
Definition: aomdx.h:73
aom_codec_err_t aom_codec_decode(aom_codec_ctx_t *ctx, const uint8_t *data, size_t data_sz, void *user_priv)
Decode data.
#define AOM_EFLAG_NO_UPD_ENTROPY
Disable entropy update.
Definition: aomcx.h:120
Encoder configuration structure.
Definition: aom_encoder.h:237
#define MAX_TILE_WIDTHS
Maximum number of tile widths in tile widths array.
Definition: aom_encoder.h:715
Codec control function to set encoder internal speed settings.
Definition: aomcx.h:182
int monochrome
Definition: aom_image.h:146
#define AOM_EFLAG_NO_REF_BWD
Don't reference the bwd reference frame.
Definition: aomcx.h:86
Definition: aom_image.h:87
Definition: aom_codec.h:239
#define AOM_PLANE_Y
Definition: aom_image.h:169
union aom_codec_cx_pkt::@1 data
Definition: aom_image.h:65
Definition: aom_image.h:81
Codec control function to pass an Active map to encoder.
Definition: aomcx.h:164
Definition: aom_image.h:50
size_t coded_tile_data_size
Definition: aomdx.h:69
Codec control function to set adaptive quantization mode.
Definition: aomcx.h:369
Codec control function to set minimum interval between GF/ARF frames.
Definition: aomcx.h:493
unsigned int w
Definition: aom_decoder.h:84
Generic fixed size buffer structure.
Definition: aom_encoder.h:84
unsigned int g_lag_in_frames
Allow lagged encoding.
Definition: aom_encoder.h:363
Definition: aom_codec.h:225
unsigned int d_h
Definition: aom_image.h:157
Boost percentage for Golden Frame in CBR mode.
Definition: aomcx.h:274
#define MAX_TILE_HEIGHTS
Maximum number of tile heights in tile heights array.
Definition: aom_encoder.h:728
#define AOM_PLANE_U
Definition: aom_image.h:170
const void * coded_tile_data
Definition: aomdx.h:71
int use_external_ref
Definition: aom.h:110
Codec control function to set encoder spatial layer id.
Definition: aomcx.h:172
unsigned int threads
Definition: aom_decoder.h:104
#define AOM_EFLAG_NO_REF_LAST3
Don't reference the last3 frame.
Definition: aomcx.h:64
Codec context structure.
Definition: aom_codec.h:204
AV1 specific reference frame data struct.
Definition: aom.h:108
Definition: aom_image.h:121
Definition: aom_image.h:64
Rational Number.
Definition: aom_encoder.h:187
const typedef void * aom_codec_iter_t
Iterator.
Definition: aom_codec.h:194
Definition: aom_encoder.h:137
Codec control function to set the threshold for MBs treated static.
Definition: aomcx.h:198
Definition: aom_encoder.h:203
int stride[4]
Definition: aom_image.h:174
Definition: aom_image.h:133
Provides definitions for using AOM or AV1 encoder algorithm within the aom Codec Interface.
Operation completed without error.
Definition: aom_codec.h:103
Definition: aom_image.h:117
const char * aom_codec_err_to_string(aom_codec_err_t err)
Convert error number to printable string.
#define AOM_CODEC_USE_HIGHBITDEPTH
Definition: aom_encoder.h:78
Definition: aom_image.h:60
#define AOM_EFLAG_FORCE_KF
Definition: aom_encoder.h:229
Definition: aom_image.h:66
Definition: aom_image.h:49
unsigned int rc_target_bitrate
Target data rate.
Definition: aom_encoder.h:491
Codec control function to set the delta q mode.
Definition: aomcx.h:822
Definition: aom_encoder.h:195
Codec control function to set color space info.
Definition: aomcx.h:424
Definition: aom_image.h:114
Codec control function to set content type.
Definition: aomcx.h:395
void aom_img_free(aom_image_t *img)
Close an image descriptor.
Definition: aom_encoder.h:138
Codec control function to set the max quant matrix flatness.
Definition: aomcx.h:611
aom_codec_err_t aom_codec_control_(aom_codec_ctx_t *ctx, int ctrl_id,...)
Control algorithm.
#define AOM_CODEC_USE_POSTPROC
Definition: aom_decoder.h:73
Codec control function to set the filter strength for the arf.
Definition: aomcx.h:219
Stream properties.
Definition: aom_decoder.h:83
Definition: aom_encoder.h:202
unsigned int y_chroma_shift
Definition: aom_image.h:165
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.
struct aom_codec_cx_pkt::@1::@2 frame
Codec control function to enable automatic set and use alf frames.
Definition: aomcx.h:190
aom_image_t img
Definition: aom.h:111
const char * aom_codec_iface_name(aom_codec_iface_t *iface)
Return the name for a given interface.
aom_codec_err_t err
Definition: aom_codec.h:207
int den
Definition: aom_encoder.h:189
External frame buffer.
Definition: aom_frame_buffer.h:40
aom_codec_err_t aom_codec_destroy(aom_codec_ctx_t *ctx)
Destroy a codec instance.
Definition: aom_image.h:89
Codec control function to set transfer function info.
Definition: aomcx.h:450
Codec control function to set the single tile decoding mode to 0 or 1.
Definition: aomcx.h:832
Definition: aom_image.h:72
aom_codec_err_t aom_codec_peek_stream_info(aom_codec_iface_t *iface, const uint8_t *data, size_t data_sz, aom_codec_stream_info_t *si)
Parse stream info from a buffer.
aom_image_t * aom_img_alloc_with_border(aom_image_t *img, aom_img_fmt_t fmt, unsigned int d_w, unsigned int d_h, unsigned int align, unsigned int size_align, unsigned int border)
Open a descriptor, allocating storage for the underlying image with a border.
Definition: aom_encoder.h:196
aom_image_t * aom_img_alloc(aom_image_t *img, aom_img_fmt_t fmt, unsigned int d_w, unsigned int d_h, unsigned int align)
Open a descriptor, allocating storage for the underlying image.
#define aom_codec_control(ctx, id, data)
aom_codec_control wrapper macro
Definition: aom_codec.h:423
int aom_img_plane_width(const aom_image_t *img, int plane)
Get the width of a plane.
Codec control function to turn on / off frame superresolution.
Definition: aomcx.h:781
aom_fixed_buf_t twopass_stats
Definition: aom_encoder.h:165
Codec control function to signal picture timing info in the bitstream.
Definition: aomcx.h:845
Definition: aom_image.h:110
Definition: aom_image.h:53
Codec control function to set number of tile rows.
Definition: aomcx.h:326
Initialization Configurations.
Definition: aom_decoder.h:103
Definition: aom_image.h:54
Definition: aom_image.h:98
enum aom_kf_mode kf_mode
Keyframe placement mode.
Definition: aom_encoder.h:621
Definition: aom_image.h:111
Definition: aom_image.h:70
Definition: aom_image.h:88
Codec control function to enable/disable periodic Q boost.
Definition: aomcx.h:382
unsigned int cols
Definition: aomcx.h:907
Definition: aom_codec.h:237
uint8_t * data
Definition: aom_frame_buffer.h:41
Codec control function to set a maximum number of tile groups.
Definition: aomcx.h:674
Codec control function to set the max no of frames to create arf.
Definition: aomcx.h:215
Definition: aom_image.h:93
#define AOM_EFLAG_NO_UPD_LAST
Don't update the last frame.
Definition: aomcx.h:100
Definition: aom_image.h:134
Codec control function to enable frame parallel decoding feature.
Definition: aomcx.h:338
enum aom_rc_mode rc_end_usage
Rate control algorithm to use.
Definition: aom_encoder.h:471
enum aom_enc_pass g_pass
Multi-pass Encoding Mode.
Definition: aom_encoder.h:349
int64_t aom_codec_pts_t
Time Stamp Type.
Definition: aom_encoder.h:94
Definition: aom_image.h:107
Codec control function to set an MTU size for a tile group.
Definition: aomcx.h:686
aom_fixed_buf_t firstpass_mb_stats
Definition: aom_encoder.h:166
long aom_enc_frame_flags_t
Encoded Frame Flags.
Definition: aom_encoder.h:228
unsigned int g_w
Width of the frame.
Definition: aom_encoder.h:276
Definition: aom_image.h:113
void * priv
Definition: aom_frame_buffer.h:43
Codec control function to set CDF update mode.
Definition: aomcx.h:402
Definition: aom_image.h:136
Definition: aom_codec.h:227
aom_codec_err_t aom_codec_set_frame_buffer_functions(aom_codec_ctx_t *ctx, aom_get_frame_buffer_cb_fn_t cb_get, aom_release_frame_buffer_cb_fn_t cb_release, void *cb_priv)
Pass in external frame buffers for the decoder to use.
Definition: aom_codec.h:238
Definition: aom_encoder.h:201
aom_codec_er_flags_t g_error_resilient
Enable error resilient modes.
Definition: aom_encoder.h:342
Codec control function to set noise sensitivity.
Definition: aomcx.h:388
Definition: aom_image.h:95
#define AOM_EFLAG_NO_UPD_GF
Don't update the golden frame.
Definition: aomcx.h:107
aom_fixed_buf_t raw
Definition: aom_encoder.h:172
Definition: aom_image.h:74
Definition: aom_image.h:90
Codec control function to set intended superblock size.
Definition: aomcx.h:530
aom_fixed_buf_t rc_twopass_stats_in
Two-pass stats buffer.
Definition: aom_encoder.h:478
Codec control function to set chroma 4:2:0 sample position info.
Definition: aomcx.h:481
aom_codec_err_t
Algorithm return codes.
Definition: aom_codec.h:101
Describes the decoder algorithm interface to applications.
#define AOM_EFLAG_NO_REF_GF
Don't reference the golden frame.
Definition: aomcx.h:71
Definition: aom_encoder.h:194
unsigned int x_chroma_shift
Definition: aom_image.h:164
Describes the encoder algorithm interface to applications.
Codec control function to encode without trellis quantization.
Definition: aomcx.h:570
Definition: aom_image.h:99
const aom_codec_cx_pkt_t * aom_codec_get_cx_data(aom_codec_ctx_t *ctx, aom_codec_iter_t *iter)
Encoded data iterator.
Definition: aom_image.h:116
int idx
Definition: aom.h:109
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.
#define aom_codec_dec_init(ctx, iface, cfg, flags)
Convenience macro for aom_codec_dec_init_ver()
Definition: aom_decoder.h:142
cfg_options_t cfg
Options defined per config file.
Definition: aom_encoder.h:740
Codec control function to set the min quant matrix flatness.
Definition: aomcx.h:598
Codec control function to set minimum interval between GF/ARF frames.
Definition: aomcx.h:487
const char * name
Definition: aom_codec.h:205
Structure to hold the external reference frame pointer.
Definition: aomdx.h:80
aom active region map
Definition: aomcx.h:903
Definition: aom_image.h:52
Codec control function to set Max data rate for Intra frames.
Definition: aomcx.h:244
uint32_t aom_codec_er_flags_t
Error Resilient flags.
Definition: aom_encoder.h:119
Definition: aom_codec.h:226
Codec control function to set transfer function info.
Definition: aomcx.h:472
Definition: aom_image.h:109
Definition: aom_encoder.h:204
Codec control function to encode with CDEF.
Definition: aomcx.h:549
Codec control function to set the path to the film grain parameters.
Definition: aomcx.h:856
Definition: aom_image.h:105
Codec control function to add film grain parameters (one of several preset types) info in the bitstre...
Definition: aomcx.h:852
unsigned int bit_depth
Definition: aom_image.h:153
Codec control function to set max data rate for Inter frames.
Definition: aomcx.h:261
Definition: aom_encoder.h:218
unsigned int rows
Definition: aomcx.h:906
#define AOM_FRAME_IS_FRAGMENT
this is a fragment of the encoded frame
Definition: aom_encoder.h:111
aom_image_t * aom_codec_get_frame(aom_codec_ctx_t *ctx, aom_codec_iter_t *iter)
Decoded frames iterator.
Definition: aom_image.h:63
Encoder output packet.
Definition: aom_encoder.h:147
Codec control function to turn on / off frame order hint for a few tools:
Definition: aomcx.h:730
Definition: aom_image.h:120
size_t size
Definition: aom_frame_buffer.h:42
unsigned int d_w
Definition: aom_image.h:156
#define AOM_EFLAG_NO_UPD_ARF
Don't update the alternate reference frame.
Definition: aomcx.h:114
const char * aom_codec_error(aom_codec_ctx_t *ctx)
Retrieve error synopsis for codec context.
Codec control function to set number of tile columns.
Definition: aomcx.h:308
#define AOM_CODEC_USE_OUTPUT_PARTITION
Make the encoder output one partition at a time.
Definition: aom_encoder.h:77
Definition: aom_image.h:118
Definition: aom_image.h:97
unsigned char * planes[4]
Definition: aom_image.h:173
#define AOM_PLANE_V
Definition: aom_image.h:171
Codec control function to encode with quantisation matrices.
Definition: aomcx.h:584
#define AOM_EFLAG_NO_REF_LAST2
Don't reference the last2 frame.
Definition: aomcx.h:57
Definition: aom_image.h:84
Definition: aom_encoder.h:136
Codec control function to encode with dist_8x8.
Definition: aomcx.h:665
Codec control function to set sharpness.
Definition: aomcx.h:194
unsigned int g_h
Height of the frame.
Definition: aom_encoder.h:285
Definition: aom_image.h:94
Provides definitions for using AOM or AV1 within the aom Decoder interface.
Definition: aom_encoder.h:135
unsigned int save_as_annexb
Bitstream syntax mode.
Definition: aom_encoder.h:693
#define AOM_EFLAG_NO_REF_ARF2
Don't reference the alt2 reference frame.
Definition: aomcx.h:93
Definition: aom_image.h:106
size_t sz
Definition: aom_image.h:175
#define aom_codec_enc_init(ctx, iface, cfg, flags)
Convenience macro for aom_codec_enc_init_ver()
Definition: aom_encoder.h:774
Codec control function to set constrained quality level.
Definition: aomcx.h:231
double psnr[4]
Definition: aom_encoder.h:170
Structure to hold a tile's start address and size in the bitstream.
Definition: aomdx.h:67
Image Descriptor.
Definition: aom_image.h:141
Codec control function to set lossless encoding mode.
Definition: aomcx.h:287
size_t sz
Definition: aom_encoder.h:86
Definition: aom_image.h:86
enum aom_codec_cx_pkt_kind kind
Definition: aom_encoder.h:148
struct aom_rational g_timebase
Stream timebase units.
Definition: aom_encoder.h:334
#define AOM_CODEC_USE_PSNR
Initialization-time Feature Enabling.
Definition: aom_encoder.h:75
Speed features for codec development.
Definition: aomcx.h:186
enum aom_img_fmt aom_img_fmt_t
List of supported image formats.
Definition: aom_image.h:85
Codec control function to enable error_resilient_mode.
Definition: aomcx.h:348
Codec control function to turn on / off dual filter enabling/disabling.
Definition: aomcx.h:718
Codec control function to encode with Loop Restoration Filter.
Definition: aomcx.h:559
int aom_img_plane_height(const aom_image_t *img, int plane)
Get the height of a plane.
const char * aom_codec_error_detail(aom_codec_ctx_t *ctx)
Retrieve detailed error information for codec context.
Codec control function to set visual tuning.
Definition: aomcx.h:223
Definition: aom_image.h:67
aom_bit_depth_t g_bit_depth
Bit-depth of the codec.
Definition: aom_encoder.h:312
#define AOM_FRAME_IS_KEY
Definition: aom_encoder.h:104
unsigned int large_scale_tile
Tile coding mode.
Definition: aom_encoder.h:669
#define AOM_IMG_FMT_HIGHBITDEPTH
Definition: aom_image.h:38
void * buf
Definition: aom_encoder.h:85
#define AOM_EFLAG_NO_REF_ARF
Don't reference the alternate reference frame.
Definition: aomcx.h:79
Codec control function to set number of spatial layers.
Definition: aomcx.h:248
Codec control function to turn on / off joint compound mode at sequence level.
Definition: aomcx.h:739
aom_codec_err_t aom_codec_enc_config_default(aom_codec_iface_t *iface, aom_codec_enc_cfg_t *cfg, unsigned int reserved)
Get a default configuration.
unsigned char * img_data
Definition: aom_image.h:188
int num
Definition: aom_encoder.h:188
Codec control function to turn on / off ref frame mvs (mfmv) usage at sequence level.
Definition: aomcx.h:748
Definition: aom_image.h:61
unsigned int h
Definition: aom_decoder.h:85