Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: webrtc/modules/video_coding/rtp_frame_reference_finder.h

Issue 2127073002: Bugfix for Vp9 GOF and missing frames. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Better unittest describing the bug fixed. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/video_coding/rtp_frame_reference_finder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/rtp_frame_reference_finder.h
diff --git a/webrtc/modules/video_coding/rtp_frame_reference_finder.h b/webrtc/modules/video_coding/rtp_frame_reference_finder.h
index 23c36c061d9a52f16b0eb8692a5ec7b9ffd9f49d..a12d6d8fcaaa1354c75b1180b351b3b922dd66b4 100644
--- a/webrtc/modules/video_coding/rtp_frame_reference_finder.h
+++ b/webrtc/modules/video_coding/rtp_frame_reference_finder.h
@@ -44,6 +44,14 @@ class RtpFrameReferenceFinder {
static const int kMaxGofSaved = 15;
static const int kMaxPaddingAge = 100;
+
+ struct GofInfo {
+ GofInfo(GofInfoVP9* gof, uint16_t last_picture_id)
+ : gof(gof), last_picture_id(last_picture_id) {}
+ GofInfoVP9* gof;
+ uint16_t last_picture_id;
+ };
+
rtc::CriticalSection crit_;
// Find the relevant group of pictures and update its "last-picture-id-with
@@ -82,13 +90,13 @@ class RtpFrameReferenceFinder {
// Check if we are missing a frame necessary to determine the references
// for this frame.
- bool MissingRequiredFrameVp9(uint16_t picture_id, const GofInfoVP9& gof)
+ bool MissingRequiredFrameVp9(uint16_t picture_id, const GofInfo& info)
EXCLUSIVE_LOCKS_REQUIRED(crit_);
// Updates which frames that have been received. If there is a gap,
// missing frames will be added to |missing_frames_for_layer_| or
// if this is an already missing frame then it will be removed.
- void FrameReceivedVp9(uint16_t picture_id, const GofInfoVP9& gof)
+ void FrameReceivedVp9(uint16_t picture_id, GofInfo* info)
EXCLUSIVE_LOCKS_REQUIRED(crit_);
// Check if there is a frame with the up-switch flag set in the interval
@@ -147,15 +155,14 @@ class RtpFrameReferenceFinder {
std::array<GofInfoVP9, kMaxGofSaved> scalability_structures_
GUARDED_BY(crit_);
- // Holds the picture id and the Gof information for a given TL0 picture index.
- std::map<uint8_t,
- std::pair<uint16_t, GofInfoVP9*>,
- DescendingSeqNumComp<uint8_t>>
- gof_info_ GUARDED_BY(crit_);
+ // Holds the the Gof information for a given TL0 picture index.
+ std::map<uint8_t, GofInfo, DescendingSeqNumComp<uint8_t>> gof_info_
+ GUARDED_BY(crit_);
// Keep track of which picture id and which temporal layer that had the
// up switch flag set.
- std::map<uint16_t, uint8_t> up_switch_ GUARDED_BY(crit_);
+ std::map<uint16_t, uint8_t, DescendingSeqNumComp<uint16_t, kPicIdLength>>
+ up_switch_ GUARDED_BY(crit_);
// For every temporal layer, keep a set of which frames that are missing.
std::array<std::set<uint16_t, DescendingSeqNumComp<uint16_t, kPicIdLength>>,
« no previous file with comments | « no previous file | webrtc/modules/video_coding/rtp_frame_reference_finder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698