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

Unified Diff: media/video/gpu_memory_buffer_video_frame_pool.cc

Issue 1400923003: media: Use libyuv::CopyPlane instead of memcpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/video/gpu_memory_buffer_video_frame_pool.cc
diff --git a/media/video/gpu_memory_buffer_video_frame_pool.cc b/media/video/gpu_memory_buffer_video_frame_pool.cc
index f1965d109b9ee7df0e7132c0eff3897dc22b2c48..c0ab7a9fb1f48681b58f6031760cbf396cf394af 100644
--- a/media/video/gpu_memory_buffer_video_frame_pool.cc
+++ b/media/video/gpu_memory_buffer_video_frame_pool.cc
@@ -237,10 +237,10 @@ void CopyRowsToI420Buffer(int first_row,
DCHECK_NE(dest_stride, 0);
DCHECK_LE(bytes_per_row, std::abs(dest_stride));
DCHECK_LE(bytes_per_row, source_stride);
- for (int row = first_row; row < first_row + rows; ++row) {
- memcpy(output + dest_stride * row, source + source_stride * row,
- bytes_per_row);
- }
+
+ libyuv::CopyPlane(source + source_stride * first_row, source_stride,
+ output + dest_stride * first_row, dest_stride,
+ bytes_per_row, rows);
}
done.Run();
}
« 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