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

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: MemoryMappedFile starting address checking Created 6 years, 3 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 70649543578433b607021c48a395d69a26185bfc..a7fe1a83144e983bd2ef37fc4c1a51fc5246c651 100644
--- a/media/base/video_frame.cc
+++ b/media/base/video_frame.cc
@@ -745,7 +745,8 @@ int VideoFrame::stride(size_t plane) const {
}
// static
-int VideoFrame::RowBytes(size_t plane, VideoFrame::Format format, int width) {
+size_t VideoFrame::RowBytes(size_t plane, VideoFrame::Format format,
+ int width) {
DCHECK(IsValidPlane(plane, format));
switch (format) {
case VideoFrame::YV24:
@@ -809,10 +810,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
+size_t VideoFrame::Rows(size_t plane, VideoFrame::Format format, int height) {
+ DCHECK(IsValidPlane(plane, format));
+ switch (format) {
case VideoFrame::YV24:
case VideoFrame::YV16:
switch (plane) {
@@ -866,11 +867,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