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}
This commit is contained in:
emircan
2017-08-17 18:20:40 -07:00
committed by Commit Bot
parent 2238441654
commit 7b532db9ad
2 changed files with 12 additions and 121 deletions

View File

@ -22,15 +22,6 @@
#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,
@ -130,8 +121,12 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
*video_codec.VP8() = VideoEncoder::GetDefaultVp8Settings();
video_codec.VP8()->numberOfTemporalLayers = static_cast<unsigned char>(
streams.back().temporal_layer_thresholds_bps.size() + 1);
if (nack_enabled && !TemporalLayersConfigured(streams)) {
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) {
LOG(LS_INFO) << "No temporal layers and nack enabled -> resilience off";
video_codec.VP8()->resilience = kResilienceOff;
}
@ -149,13 +144,6 @@ 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: {