Skip to content

Commit

Permalink
Disable key frame filtering when encoding images
Browse files Browse the repository at this point in the history
Disable key frame filtering when encoding still images.
  • Loading branch information
wantehchang committed Mar 2, 2021
1 parent 4f40299 commit 04e5341
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/codec_aom.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,11 @@ static avifResult aomCodecEncodeImage(avifCodec * codec,
if (aomCpuUsed != -1) {
aom_codec_control(&codec->internal->encoder, AOME_SET_CPUUSED, aomCpuUsed);
}
if (addImageFlags & AVIF_ADD_IMAGE_FLAG_SINGLE) {
// Disable temporal filtering on key frames, otherwise we will lose a good amount of compression
// performance.
aom_codec_control(&codec->internal->encoder, AV1E_SET_ENABLE_KEYFRAME_FILTERING, 0);
}
if (!avifProcessAOMOptionsPostInit(codec)) {
return AVIF_RESULT_INVALID_CODEC_SPECIFIC_OPTION;
}
Expand Down

0 comments on commit 04e5341

Please sign in to comment.