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

Unified Diff: media/base/video_frame.cc

Issue 1439533004: Remove dead code paths around PIXEL_STORAGE_TEXTURE in capture pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mcasas's second round comments REBASE Created 5 years, 1 month 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 | « media/base/video_capture_types.cc ('k') | media/capture/content/screen_capture_device_core.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame.cc
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
index c0ed3ca2aa5268f59ec8bd9fbe09ed2840dba5b6..3be20dad900a5f160d00735709c589673b419234 100644
--- a/media/base/video_frame.cc
+++ b/media/base/video_frame.cc
@@ -829,6 +829,8 @@ scoped_refptr<VideoFrame> VideoFrame::WrapExternalStorage(
size_t data_offset) {
DCHECK(IsStorageTypeMappable(storage_type));
+ // TODO(miu): This function should support any pixel format.
+ // http://crbug.com/555909
if (format != PIXEL_FORMAT_I420) {
DLOG(ERROR) << "Only PIXEL_FORMAT_I420 format supported: "
<< VideoPixelFormatToString(format);
@@ -852,6 +854,10 @@ 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()?
+ // http://crbug.com/555909
frame->strides_[kUPlane] = coded_size.width() / 2;
frame->strides_[kVPlane] = coded_size.width() / 2;
frame->data_[kYPlane] = data;
« no previous file with comments | « media/base/video_capture_types.cc ('k') | media/capture/content/screen_capture_device_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698