Index: media/base/video_util.cc |
diff --git a/media/base/video_util.cc b/media/base/video_util.cc |
index 4476e6d0693e3934ec99f75392fcf610eba15ea1..15416b9b0924701c2a2dd209ed99d7c37283f8e0 100644 |
--- a/media/base/video_util.cc |
+++ b/media/base/video_util.cc |
@@ -9,34 +9,37 @@ |
namespace media { |
-static void CopyPlane(size_t plane, const uint8* source, int stride, int rows, |
- VideoFrame* frame) { |
+static void CopyPlane(size_t plane, const uint8* source, size_t stride, |
+ size_t rows, VideoFrame* frame) { |
Ami GONE FROM CHROMIUM
2012/03/21 04:33:44
Are you worried about an image w/ over 2 billion i
DaleCurtis
2012/03/22 01:24:43
I just flipped these to make them consistent with
|
uint8* dest = frame->data(plane); |
- int dest_stride = frame->stride(plane); |
+ size_t dest_stride = frame->stride(plane); |
// Clamp in case source frame has smaller stride. |
- int bytes_to_copy_per_row = std::min(frame->row_bytes(plane), stride); |
+ size_t bytes_to_copy_per_row = std::min(frame->row_bytes(plane), stride); |
// Clamp in case source frame has smaller height. |
- int rows_to_copy = std::min(frame->rows(plane), rows); |
+ size_t rows_to_copy = std::min(frame->rows(plane), rows); |
// Copy! |
- for (int row = 0; row < rows_to_copy; ++row) { |
+ for (size_t row = 0; row < rows_to_copy; ++row) { |
memcpy(dest, source, bytes_to_copy_per_row); |
source += stride; |
dest += dest_stride; |
} |
} |
-void CopyYPlane(const uint8* source, int stride, int rows, VideoFrame* frame) { |
+void CopyYPlane(const uint8* source, size_t stride, size_t rows, |
+ VideoFrame* frame) { |
CopyPlane(VideoFrame::kYPlane, source, stride, rows, frame); |
} |
-void CopyUPlane(const uint8* source, int stride, int rows, VideoFrame* frame) { |
+void CopyUPlane(const uint8* source, size_t stride, size_t rows, |
+ VideoFrame* frame) { |
CopyPlane(VideoFrame::kUPlane, source, stride, rows, frame); |
} |
-void CopyVPlane(const uint8* source, int stride, int rows, VideoFrame* frame) { |
+void CopyVPlane(const uint8* source, size_t stride, size_t rows, |
+ VideoFrame* frame) { |
CopyPlane(VideoFrame::kVPlane, source, stride, rows, frame); |
} |