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

Unified Diff: webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h

Issue 2280593002: Significantly increased max_num_buffers_ of Vp9FrameBufferPool. (Closed)
Patch Set: Updated comment and max num buffers Created 4 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h
diff --git a/webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h b/webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h
index 8551689548abeeb8f9a4988d310a1ef3410b53ea..af91c8c0d2b73a6b1cad044c42d883e8ff1ea03c 100644
--- a/webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h
+++ b/webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h
@@ -107,9 +107,16 @@ class Vp9FrameBufferPool {
// All buffers, in use or ready to be recycled.
std::vector<rtc::scoped_refptr<Vp9FrameBuffer>> allocated_buffers_
GUARDED_BY(buffers_lock_);
- // If more buffers than this are allocated we print warnings, and crash if
- // in debug mode.
- static const size_t max_num_buffers_ = 10;
+ // If more buffers than this are allocated we print warnings and crash if in
+ // debug mode. VP9 is defined to have 8 reference buffers, of which 3 can be
+ // referenced by any frame, see
+ // https://tools.ietf.org/html/draft-grange-vp9-bitstream-00#section-2.2.2.
+ // Assuming VP9 holds on to at most 8 buffers, any more buffers than that
+ // would have to be by application code. Decoded frames should not be
+ // referenced for longer than necessary. If we allow ~60 additional buffers
+ // then the application has ~1 second to e.g. render each frame of a 60 fps
+ // video.
+ static const size_t max_num_buffers_ = 68;
};
} // namespace webrtc
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698