Set AV1E_SET_ERROR_RESILIENT_MODE on T1 and T2 enhanced layers

TBR=marpan@webrtc.org

Bug: webrtc:11404
Change-Id: I21c97861d6df06a0e50641a9fdf26d56e50c2030
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201627
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Cr-Commit-Position: refs/heads/master@{#32997}
This commit is contained in:
Sergio Garcia Murillo 2021-01-14 12:55:32 +01:00 committed by Commit Bot
parent 809a261631
commit 1528e2b3a7

View file

@ -512,6 +512,15 @@ int32_t LibaomAv1Encoder::Encode(
if (SvcEnabled()) { if (SvcEnabled()) {
SetSvcLayerId(layer_frame); SetSvcLayerId(layer_frame);
SetSvcRefFrameConfig(layer_frame); SetSvcRefFrameConfig(layer_frame);
aom_codec_err_t ret =
aom_codec_control(&ctx_, AV1E_SET_ERROR_RESILIENT_MODE,
layer_frame.TemporalId() > 0 ? 1 : 0);
if (ret != AOM_CODEC_OK) {
RTC_LOG(LS_WARNING) << "LibaomAv1Encoder::Encode returned " << ret
<< " on control AV1E_SET_ERROR_RESILIENT_MODE.";
return WEBRTC_VIDEO_CODEC_ERROR;
}
} }
// Encode a frame. // Encode a frame.