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

Unified Diff: media/base/video_frame.cc

Issue 430583005: Make VEA test support videos with different coded size and visible size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address wucheng's review comments Created 6 years, 4 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
Index: media/base/video_frame.cc
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
index 6b3427db1aa936c1707b507f13e1070ed33710b0..b8774dcc85c16ba324a8b52bbdc1256bec92ebf5 100644
--- a/media/base/video_frame.cc
+++ b/media/base/video_frame.cc
@@ -764,10 +764,10 @@ int VideoFrame::row_bytes(size_t plane) const {
return RowBytes(plane, format_, coded_size_.width());
}
-int VideoFrame::rows(size_t plane) const {
- DCHECK(IsValidPlane(plane, format_));
- int height = coded_size_.height();
- switch (format_) {
+// static
+int VideoFrame::Rows(size_t plane, VideoFrame::Format format, int height) {
+ DCHECK(IsValidPlane(plane, format));
+ switch (format) {
case VideoFrame::YV24:
case VideoFrame::YV16:
switch (plane) {
@@ -821,11 +821,15 @@ int VideoFrame::rows(size_t plane) const {
case VideoFrame::NATIVE_TEXTURE:
break;
}
- NOTREACHED() << "Unsupported video frame format/plane: "
- << format_ << "/" << plane;
+ NOTREACHED() << "Unsupported video frame format/plane: " << format << "/"
+ << plane;
return 0;
}
+int VideoFrame::rows(size_t plane) const {
+ return Rows(plane, format_, coded_size_.height());
+}
+
uint8* VideoFrame::data(size_t plane) const {
DCHECK(IsValidPlane(plane, format_));
return data_[plane];
« content/common/gpu/media/video_encode_accelerator_unittest.cc ('K') | « media/base/video_frame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698