Move RtpFrameObject and EncodedFrame out of video_coding namespace.

Bug: webrtc:12579
Change-Id: Ib7ecd624eb5c54abb77fe08440a014aa1e963865
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212860
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33542}
This commit is contained in:
philipel
2021-03-23 12:00:49 +01:00
committed by Commit Bot
parent 93ee168671
commit ca18809ee5
44 changed files with 195 additions and 276 deletions

View File

@ -18,7 +18,7 @@
namespace webrtc {
RtpFrameReferenceFinder::ReturnVector RtpVp9RefFinder::ManageFrame(
std::unique_ptr<video_coding::RtpFrameObject> frame) {
std::unique_ptr<RtpFrameObject> frame) {
FrameDecision decision = ManageFrameInternal(frame.get());
RtpFrameReferenceFinder::ReturnVector res;
@ -40,7 +40,7 @@ RtpFrameReferenceFinder::ReturnVector RtpVp9RefFinder::ManageFrame(
}
RtpVp9RefFinder::FrameDecision RtpVp9RefFinder::ManageFrameInternal(
video_coding::RtpFrameObject* frame) {
RtpFrameObject* frame) {
const RTPVideoHeader& video_header = frame->GetRtpVideoHeader();
const RTPVideoHeaderVP9& codec_header =
absl::get<RTPVideoHeaderVP9>(video_header.video_type_header);
@ -57,8 +57,7 @@ RtpVp9RefFinder::FrameDecision RtpVp9RefFinder::ManageFrameInternal(
last_picture_id_ = frame->Id();
if (codec_header.flexible_mode) {
if (codec_header.num_ref_pics >
video_coding::EncodedFrame::kMaxFrameReferences) {
if (codec_header.num_ref_pics > EncodedFrame::kMaxFrameReferences) {
return kDrop;
}
frame->num_references = codec_header.num_ref_pics;
@ -179,8 +178,7 @@ RtpVp9RefFinder::FrameDecision RtpVp9RefFinder::ManageFrameInternal(
ForwardDiff<uint16_t, kFrameIdLength>(info->gof->pid_start, frame->Id());
size_t gof_idx = diff % info->gof->num_frames_in_gof;
if (info->gof->num_ref_pics[gof_idx] >
video_coding::EncodedFrame::kMaxFrameReferences) {
if (info->gof->num_ref_pics[gof_idx] > EncodedFrame::kMaxFrameReferences) {
return kDrop;
}
// Populate references according to the scalability structure.
@ -324,7 +322,7 @@ void RtpVp9RefFinder::RetryStashedFrames(
} while (complete_frame);
}
void RtpVp9RefFinder::FlattenFrameIdAndRefs(video_coding::RtpFrameObject* frame,
void RtpVp9RefFinder::FlattenFrameIdAndRefs(RtpFrameObject* frame,
bool inter_layer_predicted) {
for (size_t i = 0; i < frame->num_references; ++i) {
frame->references[i] =
@ -335,8 +333,7 @@ void RtpVp9RefFinder::FlattenFrameIdAndRefs(video_coding::RtpFrameObject* frame,
*frame->SpatialIndex());
if (inter_layer_predicted &&
frame->num_references + 1 <=
video_coding::EncodedFrame::kMaxFrameReferences) {
frame->num_references + 1 <= EncodedFrame::kMaxFrameReferences) {
frame->references[frame->num_references] = frame->Id() - 1;
++frame->num_references;
}