AV1: Use Default TX type for encoding
This will further speed up intra frame encoding
Bug: None
Change-Id: I3c836502cdcb1037e3128850a085b92acd8fc7ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212821
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Fyodor Kyslov <kyslov@google.com>
Cr-Commit-Position: refs/heads/master@{#33544}
diff --git a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
index 0edbd74..cd52906 100644
--- a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
+++ b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
@@ -410,6 +410,14 @@
return WEBRTC_VIDEO_CODEC_ERROR;
}
+ ret = aom_codec_control(&ctx_, AV1E_SET_INTRA_DEFAULT_TX_ONLY, 1);
+ if (ret != AOM_CODEC_OK) {
+ RTC_LOG(LS_WARNING)
+ << "LibaomAv1Encoder::EncodeInit returned " << ret
+ << " on control AOM_CTRL_AV1E_SET_INTRA_DEFAULT_TX_ONLY.";
+ return WEBRTC_VIDEO_CODEC_ERROR;
+ }
+
return WEBRTC_VIDEO_CODEC_OK;
}
diff --git a/modules/video_coding/codecs/test/videocodec_test_libaom.cc b/modules/video_coding/codecs/test/videocodec_test_libaom.cc
index 9510b0f..c3263e7 100644
--- a/modules/video_coding/codecs/test/videocodec_test_libaom.cc
+++ b/modules/video_coding/codecs/test/videocodec_test_libaom.cc
@@ -89,7 +89,7 @@
std::vector<RateControlThresholds> rc_thresholds = {
{13, 3, 0, 1, 0.3, 0.1, 0, 1}};
- std::vector<QualityThresholds> quality_thresholds = {{36, 31.9, 0.93, 0.87}};
+ std::vector<QualityThresholds> quality_thresholds = {{36, 31.7, 0.93, 0.87}};
fixture->RunTest(rate_profiles, &rc_thresholds, &quality_thresholds, nullptr);
}