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

Unified Diff: webrtc/common_video/video_frame_buffer.cc

Issue 1645543003: H264: Improve FFmpeg decoder performance by using I420BufferPool. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added comments about why we zero-initialize Created 4 years, 11 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
Index: webrtc/common_video/video_frame_buffer.cc
diff --git a/webrtc/common_video/video_frame_buffer.cc b/webrtc/common_video/video_frame_buffer.cc
index 492bc495876a6a21b080252686991c89a2f5840b..3f23def4720d23cb51b855e85714650b43dd73b4 100644
--- a/webrtc/common_video/video_frame_buffer.cc
+++ b/webrtc/common_video/video_frame_buffer.cc
@@ -81,6 +81,10 @@ uint8_t* I420Buffer::MutableData(PlaneType type) {
static_cast<const VideoFrameBuffer*>(this)->data(type));
}
+size_t I420Buffer::DataSize() const {
+ return stride_y_ * height_ + (stride_u_ + stride_v_) * ((height_ + 1) / 2);
stefan-webrtc 2016/02/01 14:02:09 Shouldn't this be the fully allocated size if you
hbos 2016/02/02 16:13:03 This is the size used fir AlignedMalloc and for me
+}
+
int I420Buffer::stride(PlaneType type) const {
switch (type) {
case kYPlane:

Powered by Google App Engine
This is Rietveld 408576698