av1: turn off a few tools that are not used for rtc

Explicitly turn off obmc, warped motion, global motion and ref frame mv.

Bug: chromium:1095763, chromium:1170346
Change-Id: I19bc4fceef4cd5e35ea6699e6af883af244f8954
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203900
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Commit-Queue: Jerome Jiang <jianj@google.com>
Cr-Commit-Position: refs/heads/master@{#33075}
This commit is contained in:
Jerome Jiang
2021-01-25 16:42:51 -08:00
committed by Commit Bot
parent cc8a1f8450
commit 103876f379

View File

@ -316,6 +316,34 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings,
return WEBRTC_VIDEO_CODEC_ERROR;
}
ret = aom_codec_control(&ctx_, AV1E_SET_ENABLE_OBMC, 0);
if (ret != AOM_CODEC_OK) {
RTC_LOG(LS_WARNING) << "LibaomAv1Encoder::EncodeInit returned " << ret
<< " on control AV1E_SET_ENABLE_OBMC.";
return WEBRTC_VIDEO_CODEC_ERROR;
}
ret = aom_codec_control(&ctx_, AV1E_SET_ENABLE_WARPED_MOTION, 0);
if (ret != AOM_CODEC_OK) {
RTC_LOG(LS_WARNING) << "LibaomAv1Encoder::EncodeInit returned " << ret
<< " on control AV1E_SET_ENABLE_WARPED_MOTION.";
return WEBRTC_VIDEO_CODEC_ERROR;
}
ret = aom_codec_control(&ctx_, AV1E_SET_ENABLE_GLOBAL_MOTION, 0);
if (ret != AOM_CODEC_OK) {
RTC_LOG(LS_WARNING) << "LibaomAv1Encoder::EncodeInit returned " << ret
<< " on control AV1E_SET_ENABLE_GLOBAL_MOTION.";
return WEBRTC_VIDEO_CODEC_ERROR;
}
ret = aom_codec_control(&ctx_, AV1E_SET_ENABLE_REF_FRAME_MVS, 0);
if (ret != AOM_CODEC_OK) {
RTC_LOG(LS_WARNING) << "LibaomAv1Encoder::EncodeInit returned " << ret
<< " on control AV1E_SET_ENABLE_REF_FRAME_MVS.";
return WEBRTC_VIDEO_CODEC_ERROR;
}
return WEBRTC_VIDEO_CODEC_OK;
}