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

Unified Diff: media/base/video_util.h

Issue 1913503002: Memory copy the VideoFrame to match the requirement for HW encoders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 years, 7 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_util.h
diff --git a/media/base/video_util.h b/media/base/video_util.h
index 2dec7e9371013ff3bf0442cb798cef0c90104659..dbef16e3e046348c2bec9a20f7bd15552cfece0f 100644
--- a/media/base/video_util.h
+++ b/media/base/video_util.h
@@ -97,6 +97,14 @@ MEDIA_EXPORT void CopyRGBToVideoFrame(const uint8_t* source,
MEDIA_EXPORT scoped_refptr<VideoFrame> WrapAsI420VideoFrame(
const scoped_refptr<VideoFrame>& frame);
+// Copy I420 video frame to match the required coded size and pad the region
+// outside visible rect repeatly with the last column / row. The required coded
xhwang 2016/05/04 21:08:29 Could you please summarize why we want to convert
xjz 2016/05/05 01:15:56 Done.
+// size should be larger than or equal to the visible size, since the visible
+// region in both frames should be identical. Return false if copy is not
+// successful.
xhwang 2016/05/04 21:08:29 Also mention that this function could be expensive
xjz 2016/05/05 01:15:56 Done.
+MEDIA_EXPORT bool I420CopyWithPadding(const VideoFrame& src_frame,
+ VideoFrame* dst_frame) WARN_UNUSED_RESULT;
xhwang 2016/05/04 21:08:29 Could you please add some unittests?
xjz 2016/05/05 01:15:56 Done.
+
} // namespace media
#endif // MEDIA_BASE_VIDEO_UTIL_H_
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/video_util.cc » ('j') | media/base/video_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698