Reland of Turn off error resilience for VP9 if no spatial or temporal layers are configured and NACK is enabl… (patchset #1 id:1 of https://codereview.webrtc.org/2995173002/ )
Reason for revert: Speculative revert didn't help, see for the actual reason https://bugs.chromium.org/p/chromium/issues/detail?id=756741. Original issue's description: > Revert of Turn off error resilience for VP9 if no spatial or temporal layers are configured and NACK is enabl… (patchset #2 id:20001 of https://codereview.webrtc.org/2925253002/ ) > > Reason for revert: > Failing WebRtcVideoQualityBrowserTest.MANUAL_TestVideoQualityVp* tests. > > Mac #19383-19392 > https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Tester/builds/42197 > Win8 #19383-19385 > https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win8%20Tester/builds/1496 > Win7 #19383-19385 > https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win7%20Tester/builds/9807 > Win10 #19383-19385 > https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/8452 > > Original issue's description: > > Turn off error resilience for VP9 if no spatial or temporal layers are configured and NACK is enabled. > > > > Error resilience is currently always enabled for VP9 which reduces quality. > > > > Reland of https://codereview.webrtc.org/2532053002 > > > > BUG=webrtc:6783 > > > > Review-Url: https://codereview.webrtc.org/2925253002 > > Cr-Commit-Position: refs/heads/master@{#19385} > > Committed:6b463faccb> > TBR=brandtr@webrtc.org,asapersson@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:6783 > > Review-Url: https://codereview.webrtc.org/2995173002 > Cr-Commit-Position: refs/heads/master@{#19399} > Committed:7b532db9adTBR=brandtr@webrtc.org,asapersson@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:6783 Review-Url: https://codereview.webrtc.org/3002933002 Cr-Commit-Position: refs/heads/master@{#19402}
This commit is contained in:
@ -22,6 +22,15 @@
|
||||
#include "webrtc/system_wrappers/include/clock.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace {
|
||||
bool TemporalLayersConfigured(const std::vector<VideoStream>& streams) {
|
||||
for (const VideoStream& stream : streams) {
|
||||
if (stream.temporal_layer_thresholds_bps.size() > 0)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
bool VideoCodecInitializer::SetupCodec(
|
||||
const VideoEncoderConfig& config,
|
||||
@ -121,12 +130,8 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
|
||||
*video_codec.VP8() = VideoEncoder::GetDefaultVp8Settings();
|
||||
video_codec.VP8()->numberOfTemporalLayers = static_cast<unsigned char>(
|
||||
streams.back().temporal_layer_thresholds_bps.size() + 1);
|
||||
bool temporal_layers_configured = false;
|
||||
for (const VideoStream& stream : streams) {
|
||||
if (stream.temporal_layer_thresholds_bps.size() > 0)
|
||||
temporal_layers_configured = true;
|
||||
}
|
||||
if (nack_enabled && !temporal_layers_configured) {
|
||||
|
||||
if (nack_enabled && !TemporalLayersConfigured(streams)) {
|
||||
LOG(LS_INFO) << "No temporal layers and nack enabled -> resilience off";
|
||||
video_codec.VP8()->resilience = kResilienceOff;
|
||||
}
|
||||
@ -144,6 +149,13 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
|
||||
}
|
||||
video_codec.VP9()->numberOfTemporalLayers = static_cast<unsigned char>(
|
||||
streams.back().temporal_layer_thresholds_bps.size() + 1);
|
||||
|
||||
if (nack_enabled && !TemporalLayersConfigured(streams) &&
|
||||
video_codec.VP9()->numberOfSpatialLayers == 1) {
|
||||
LOG(LS_INFO) << "No temporal or spatial layers and nack enabled -> "
|
||||
<< "resilience off";
|
||||
video_codec.VP9()->resilienceOn = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case kVideoCodecH264: {
|
||||
|
||||
Reference in New Issue
Block a user