Remove use of inter_layer_predicted in FrameBuffer2.
Now that RtpVp9RefFinder sets an additional reference on the frame instead of marking it as inter_layer_predicted it is no longer used. Bug: webrtc:12206 Change-Id: I10e0930336eafc32dc86feb2f690cb131e55be2c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196740 Commit-Queue: Philip Eliasson <philipel@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32814}
This commit is contained in:
@ -171,23 +171,19 @@ int64_t FrameBuffer::FindNextFrame(int64_t now_ms) {
|
||||
}
|
||||
|
||||
if (next_frame_it->second.num_missing_decodable > 0) {
|
||||
// For now VP9 uses the inter_layer_predicted to signal a dependency
|
||||
// instead of adding it as a reference.
|
||||
// TODO(webrtc:12206): Stop using inter_layer_predicted for VP9.
|
||||
bool has_inter_layer_dependency =
|
||||
next_frame_it->second.frame->inter_layer_predicted;
|
||||
for (size_t i = 0; !has_inter_layer_dependency &&
|
||||
i < EncodedFrame::kMaxFrameReferences &&
|
||||
bool has_inter_layer_dependency = false;
|
||||
for (size_t i = 0; i < EncodedFrame::kMaxFrameReferences &&
|
||||
i < next_frame_it->second.frame->num_references;
|
||||
++i) {
|
||||
if (next_frame_it->second.frame->references[i] >=
|
||||
frame_it->first.picture_id) {
|
||||
has_inter_layer_dependency = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// If the frame has an undecoded dependency that is not within the same
|
||||
// temporal unit then this frame is not ready to be decoded yet. If it
|
||||
// temporal unit then this frame is not yet ready to be decoded. If it
|
||||
// is within the same temporal unit then the not yet decoded dependency
|
||||
// is just a lower spatial frame, which is ok.
|
||||
if (!has_inter_layer_dependency ||
|
||||
@ -380,9 +376,6 @@ bool FrameBuffer::ValidReferences(const EncodedFrame& frame) const {
|
||||
}
|
||||
}
|
||||
|
||||
if (frame.inter_layer_predicted && frame.id.spatial_layer == 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -607,23 +600,6 @@ bool FrameBuffer::UpdateFrameInfoWithIncomingFrame(const EncodedFrame& frame,
|
||||
}
|
||||
}
|
||||
|
||||
// Does |frame| depend on the lower spatial layer?
|
||||
if (frame.inter_layer_predicted) {
|
||||
VideoLayerFrameId ref_key(frame.id.picture_id, frame.id.spatial_layer - 1);
|
||||
auto ref_info = frames_.find(ref_key);
|
||||
|
||||
bool lower_layer_decoded =
|
||||
last_decoded_frame && *last_decoded_frame == ref_key;
|
||||
bool lower_layer_continuous =
|
||||
lower_layer_decoded ||
|
||||
(ref_info != frames_.end() && ref_info->second.continuous);
|
||||
|
||||
if (!lower_layer_continuous || !lower_layer_decoded) {
|
||||
not_yet_fulfilled_dependencies.push_back(
|
||||
{ref_key, lower_layer_continuous});
|
||||
}
|
||||
}
|
||||
|
||||
info->second.num_missing_continuous = not_yet_fulfilled_dependencies.size();
|
||||
info->second.num_missing_decodable = not_yet_fulfilled_dependencies.size();
|
||||
|
||||
|
Reference in New Issue
Block a user