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

Unified Diff: media/base/video_frame.cc

Issue 2337001: pad yuv additional 15 bytes to allow 16 pixels at a time to be processed with... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 7 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: media/base/video_frame.cc
===================================================================
--- media/base/video_frame.cc (revision 48440)
+++ media/base/video_frame.cc (working copy)
@@ -130,6 +130,8 @@
return (NULL != data_[VideoFrame::kRGBPlane]);
}
+static const int kFramePadBytes = 15; // allows faster SIMD YUV convert
+
bool VideoFrame::AllocateYUV() {
DCHECK(format_ == VideoFrame::YV12 ||
format_ == VideoFrame::YV16);
@@ -150,7 +152,7 @@
if (format_ == VideoFrame::YV12) {
uv_bytes /= 2;
}
- uint8* data = new uint8[y_bytes + (uv_bytes * 2)];
+ uint8* data = new uint8[y_bytes + (uv_bytes * 2) + kFramePadBytes];
if (data) {
planes_ = VideoFrame::kNumYUVPlanes;
COMPILE_ASSERT(0 == VideoFrame::kYPlane, y_plane_data_must_be_index_0);
« 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