codec_aom/avm.c: Add comments about useAllIntra
diff --git a/src/codec_aom.c b/src/codec_aom.c index 65ae15e..f7bd620 100644 --- a/src/codec_aom.c +++ b/src/codec_aom.c
@@ -44,6 +44,7 @@ #endif // Speeds 7-9 were added to all intra mode in https://aomedia-review.googlesource.com/c/aom/+/140624. +// They first appeared in the libaom v3.2.0 release. #if AOM_ENCODER_ABI_VERSION >= (10 + AOM_CODEC_ABI_VERSION + /*AOM_EXT_PART_ABI_VERSION=*/1) #define ALL_INTRA_HAS_SPEEDS_7_TO_9 1 #endif @@ -664,6 +665,9 @@ codec->internal->qualityFirstLayer = quality; } + // Determine whether the encoder should be configured to use intra frames only, either by setting aomUsage to AOM_USAGE_ALL_INTRA, + // or by manually configuring the encoder so all frames will be key frames (if AOM_USAGE_ALL_INTRA isn't available). + // All-intra encoding is beneficial when encoding a two-layer image item and the quality of the first layer is very low. // Switching to all-intra encoding comes with the following benefits: // - The first layer will be smaller than the second layer (which is often not the case with inter encoding)
diff --git a/src/codec_avm.c b/src/codec_avm.c index 0be97be..2f7ad73 100644 --- a/src/codec_avm.c +++ b/src/codec_avm.c
@@ -551,6 +551,9 @@ cfg->g_limit = 1; } + // Determine whether the encoder should be configured to use intra frames only, by manually configuring the encoder so all + // frames will be key frames. + // All-intra encoding is beneficial when encoding a two-layer image item and the quality of the first layer is very low. // Switching to all-intra encoding comes with the following benefits: // - The first layer will be smaller than the second layer (which is often not the case with inter encoding) @@ -560,8 +563,8 @@ avifBool useAllIntra = (addImageFlags & AVIF_ADD_IMAGE_FLAG_SINGLE) || useAllIntraForLayered; if (useAllIntra) { - // Use the default settings of the new AVM_USAGE_ALL_INTRA (added in - // https://crbug.com/aomedia/2959). + // Use the default settings of libaom's AOM_USAGE_ALL_INTRA (added + // in https://crbug.com/aomedia/2959). // // Set g_lag_in_frames to 0 to reduce the number of frame buffers // (from 20 to 2) in libavm's lookahead structure. This reduces