Index: media/base/video_frame.cc |
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc |
index fc977364417280706f5dadd95ad58d47b299408e..9d154d04c990a4eced29c065ac7e57a0d56f2adf 100644 |
--- a/media/base/video_frame.cc |
+++ b/media/base/video_frame.cc |
@@ -198,21 +198,29 @@ bool VideoFrame::IsValidPlane(size_t plane) const { |
return false; |
} |
-int VideoFrame::stride(size_t plane) const { |
+size_t VideoFrame::stride(size_t plane) const { |
DCHECK(IsValidPlane(plane)); |
return strides_[plane]; |
} |
-int VideoFrame::row_bytes(size_t plane) const { |
+size_t VideoFrame::row_bytes(size_t plane) const { |
DCHECK(IsValidPlane(plane)); |
switch (format_) { |
+ // 16bpp. |
case RGB555: |
case RGB565: |
+ return width_ * 2; |
Ami GONE FROM CHROMIUM
2012/03/21 04:33:44
FTR, nothing uses these, right?
(i.e. this a rake-
DaleCurtis
2012/03/22 01:24:43
None that I could find. I like the rake in the gra
Ami GONE FROM CHROMIUM
2012/03/22 10:53:25
Oh, sad panda.
scherkus (not reviewing)
2012/03/22 10:57:54
I believe all usage of these additional formats ar
DaleCurtis
2012/03/22 17:30:36
To be precise, I took my notes from the previous s
|
+ |
+ // 24bpp. |
case RGB24: |
+ return width_ * 3; |
+ |
+ // 32bpp. |
case RGB32: |
case RGBA: |
- return width_; |
+ return width_ * 4; |
+ // Planar, 8bpp. |
case YV12: |
case YV16: |
if (plane == kYPlane) |
@@ -228,7 +236,7 @@ int VideoFrame::row_bytes(size_t plane) const { |
return 0; |
} |
-int VideoFrame::rows(size_t plane) const { |
+size_t VideoFrame::rows(size_t plane) const { |
DCHECK(IsValidPlane(plane)); |
switch (format_) { |
case RGB555: |