Removed unused H264 specific code from RtpFrameReferenceFinder.
Bug: webrtc:12221 Change-Id: I238ad9c0cb53720a91e0722d61d1704586b56398 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195005 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Philip Eliasson <philipel@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32684}
This commit is contained in:
@ -710,68 +710,5 @@ void RtpFrameReferenceFinder::UnwrapPictureIds(RtpFrameObject* frame) {
|
||||
frame->id.picture_id = unwrapper_.Unwrap(frame->id.picture_id);
|
||||
}
|
||||
|
||||
void RtpFrameReferenceFinder::UpdateLastPictureIdWithPaddingH264() {
|
||||
auto seq_num_it = last_seq_num_gop_.begin();
|
||||
|
||||
// Check if next sequence number is in a stashed padding packet.
|
||||
uint16_t next_padded_seq_num = seq_num_it->second.second + 1;
|
||||
auto padding_seq_num_it = stashed_padding_.lower_bound(next_padded_seq_num);
|
||||
|
||||
// Check for more consecutive padding packets to increment
|
||||
// the "last-picture-id-with-padding" and remove the stashed packets.
|
||||
while (padding_seq_num_it != stashed_padding_.end() &&
|
||||
*padding_seq_num_it == next_padded_seq_num) {
|
||||
seq_num_it->second.second = next_padded_seq_num;
|
||||
++next_padded_seq_num;
|
||||
padding_seq_num_it = stashed_padding_.erase(padding_seq_num_it);
|
||||
}
|
||||
}
|
||||
|
||||
void RtpFrameReferenceFinder::UpdateLayerInfoH264(RtpFrameObject* frame,
|
||||
int64_t unwrapped_tl0,
|
||||
uint8_t temporal_idx) {
|
||||
auto layer_info_it = layer_info_.find(unwrapped_tl0);
|
||||
|
||||
// Update this layer info and newer.
|
||||
while (layer_info_it != layer_info_.end()) {
|
||||
if (layer_info_it->second[temporal_idx] != -1 &&
|
||||
AheadOf<uint16_t>(layer_info_it->second[temporal_idx],
|
||||
frame->id.picture_id)) {
|
||||
// Not a newer frame. No subsequent layer info needs update.
|
||||
break;
|
||||
}
|
||||
|
||||
layer_info_it->second[temporal_idx] = frame->id.picture_id;
|
||||
++unwrapped_tl0;
|
||||
layer_info_it = layer_info_.find(unwrapped_tl0);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < frame->num_references; ++i)
|
||||
frame->references[i] = rtp_seq_num_unwrapper_.Unwrap(frame->references[i]);
|
||||
frame->id.picture_id = rtp_seq_num_unwrapper_.Unwrap(frame->id.picture_id);
|
||||
}
|
||||
|
||||
void RtpFrameReferenceFinder::UpdateDataH264(RtpFrameObject* frame,
|
||||
int64_t unwrapped_tl0,
|
||||
uint8_t temporal_idx) {
|
||||
// Update last_seq_num_gop_ entry for last picture id.
|
||||
auto seq_num_it = last_seq_num_gop_.begin();
|
||||
uint16_t last_pic_id = seq_num_it->second.first;
|
||||
if (AheadOf<uint16_t>(frame->id.picture_id, last_pic_id)) {
|
||||
seq_num_it->second.first = frame->id.picture_id;
|
||||
seq_num_it->second.second = frame->id.picture_id;
|
||||
}
|
||||
UpdateLastPictureIdWithPaddingH264();
|
||||
|
||||
UpdateLayerInfoH264(frame, unwrapped_tl0, temporal_idx);
|
||||
|
||||
// Remove any current packets from |not_yet_received_seq_num_|.
|
||||
uint16_t last_seq_num_padded = seq_num_it->second.second;
|
||||
for (uint16_t n = frame->first_seq_num(); AheadOrAt(last_seq_num_padded, n);
|
||||
++n) {
|
||||
not_yet_received_seq_num_.erase(n);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace video_coding
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user