From 1528e2b3a77bca1a16a2bcabf88fc05ce526ba20 Mon Sep 17 00:00:00 2001 From: Sergio Garcia Murillo Date: Thu, 14 Jan 2021 12:55:32 +0100 Subject: [PATCH] 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 Reviewed-by: Danil Chapovalov Reviewed-by: Marco Paniconi Cr-Commit-Position: refs/heads/master@{#32997} --- modules/video_coding/codecs/av1/libaom_av1_encoder.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc index a99c642f07..e7288374db 100644 --- a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc +++ b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc @@ -512,6 +512,15 @@ int32_t LibaomAv1Encoder::Encode( if (SvcEnabled()) { SetSvcLayerId(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.