Skip to content

Commit

Permalink
aom encoder: improve performance by ~2x using new 'all intra' mode
Browse files Browse the repository at this point in the history
Available from aom v3.1.0, this usage mode is considered the
default setting for still images.

It uses a single pass and removes all keyframe logic, resulting
in significantly fewer memory allocations and halves CPU time.

libavif has already adopted this as the default.
  • Loading branch information
lovell committed May 7, 2021
1 parent f5a3d8e commit 47a2326
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libheif/heif_encoder_aom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,10 @@ struct heif_error aom_encode_image(void* encoder_raw, const struct heif_image* i


unsigned int aomUsage = 0;
#if defined(AOM_USAGE_REALTIME)
#if defined(AOM_USAGE_ALL_INTRA)
// aom 3.1.0
aomUsage = (encoder->realtime_mode ? AOM_USAGE_REALTIME : AOM_USAGE_ALL_INTRA);
#elif defined(AOM_USAGE_REALTIME)
// aom 2.0
aomUsage = (encoder->realtime_mode ? AOM_USAGE_REALTIME : AOM_USAGE_GOOD_QUALITY);
#endif
Expand Down

0 comments on commit 47a2326

Please sign in to comment.