Add fuzzer to validate libvpx vp9 encoder wrapper
Fix simulcast svc controller to reuse dropped frame configuration,
same as full svc and k-svc controllers do.
This fuzzer reminded the issue was still there.
This is a reland of https://webrtc-review.googlesource.com/c/src/+/212281
Bug: webrtc:11999
Change-Id: Id3b2cd6c7e0923adfffb4e04c35ed2d6faca6704
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215921
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33802}
diff --git a/modules/video_coding/svc/scalability_structure_simulcast.cc b/modules/video_coding/svc/scalability_structure_simulcast.cc
index 13751da..c236066 100644
--- a/modules/video_coding/svc/scalability_structure_simulcast.cc
+++ b/modules/video_coding/svc/scalability_structure_simulcast.cc
@@ -137,7 +137,7 @@
}
configs.emplace_back();
ScalableVideoController::LayerFrameConfig& config = configs.back();
- config.S(sid).T(0);
+ config.Id(current_pattern).S(sid).T(0);
if (can_reference_t0_frame_for_spatial_id_[sid]) {
config.ReferenceAndUpdate(BufferIndex(sid, /*tid=*/0));
@@ -155,7 +155,10 @@
}
configs.emplace_back();
ScalableVideoController::LayerFrameConfig& config = configs.back();
- config.S(sid).T(1).Reference(BufferIndex(sid, /*tid=*/0));
+ config.Id(current_pattern)
+ .S(sid)
+ .T(1)
+ .Reference(BufferIndex(sid, /*tid=*/0));
// Save frame only if there is a higher temporal layer that may need it.
if (num_temporal_layers_ > 2) {
config.Update(BufferIndex(sid, /*tid=*/1));
@@ -171,7 +174,7 @@
}
configs.emplace_back();
ScalableVideoController::LayerFrameConfig& config = configs.back();
- config.S(sid).T(2);
+ config.Id(current_pattern).S(sid).T(2);
if (can_reference_t1_frame_for_spatial_id_[sid]) {
config.Reference(BufferIndex(sid, /*tid=*/1));
} else {
@@ -184,12 +187,12 @@
break;
}
- last_pattern_ = current_pattern;
return configs;
}
GenericFrameInfo ScalabilityStructureSimulcast::OnEncodeDone(
const LayerFrameConfig& config) {
+ last_pattern_ = static_cast<FramePattern>(config.Id());
if (config.TemporalId() == 1) {
can_reference_t1_frame_for_spatial_id_.set(config.SpatialId());
}