AV1: Use Default TX type for encoding

This will further speed up intra frame encoding

Bug: None
Change-Id: I1a105c6d2cdd9dc82f84d0039dbea3f0d090ab93
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212320
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Fyodor Kyslov <kyslov@google.com>
Cr-Commit-Position: refs/heads/master@{#33492}
diff --git a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
index 0edbd74..0f938f9 100644
--- a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
+++ b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
@@ -410,6 +410,13 @@
     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 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);
 }