Chromium Code Reviews| Index: media/base/video_frame.cc |
| diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc |
| index f14e91fa6d3f38c7e5b905eb66aba072db029eaa..6cfd1ad5fce71b5e8f28c1c122670a3529986efa 100644 |
| --- a/media/base/video_frame.cc |
| +++ b/media/base/video_frame.cc |
| @@ -830,6 +830,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapExternalStorage( |
| size_t data_offset) { |
| DCHECK(IsStorageTypeMappable(storage_type)); |
| + // TODO(miu): This function should support any frame format. |
|
mcasas
2015/11/13 19:13:57
nit: bug for this? (It should be accompanied by un
miu
2015/11/14 03:43:48
Done.
|
| if (format != PIXEL_FORMAT_I420) { |
| DLOG(ERROR) << "Only PIXEL_FORMAT_I420 format supported: " |
| << VideoPixelFormatToString(format); |
| @@ -853,6 +854,9 @@ scoped_refptr<VideoFrame> VideoFrame::WrapExternalStorage( |
| natural_size, timestamp); |
| } |
| frame->strides_[kYPlane] = coded_size.width(); |
| + // TODO(miu): This always rounds widths down, whereas VideoFrame::RowBytes() |
| + // always rounds up. This inconsistency must be resolved. Perhaps a |
| + // CommonAlignment() check should be made in IsValidConfig()? |
| frame->strides_[kUPlane] = coded_size.width() / 2; |
| frame->strides_[kVPlane] = coded_size.width() / 2; |
| frame->data_[kYPlane] = data; |