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

Side by Side 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: Used shared memory for encoder input buffer. 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/base/video_util.cc » ('j') | media/base/video_util.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_VIDEO_UTIL_H_ 5 #ifndef MEDIA_BASE_VIDEO_UTIL_H_
6 #define MEDIA_BASE_VIDEO_UTIL_H_ 6 #define MEDIA_BASE_VIDEO_UTIL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // Fills the regions outside |region_in_frame| with black. 90 // Fills the regions outside |region_in_frame| with black.
91 MEDIA_EXPORT void CopyRGBToVideoFrame(const uint8_t* source, 91 MEDIA_EXPORT void CopyRGBToVideoFrame(const uint8_t* source,
92 int stride, 92 int stride,
93 const gfx::Rect& region_in_frame, 93 const gfx::Rect& region_in_frame,
94 VideoFrame* frame); 94 VideoFrame* frame);
95 95
96 // Converts a frame with YV12A format into I420 by dropping alpha channel. 96 // Converts a frame with YV12A format into I420 by dropping alpha channel.
97 MEDIA_EXPORT scoped_refptr<VideoFrame> WrapAsI420VideoFrame( 97 MEDIA_EXPORT scoped_refptr<VideoFrame> WrapAsI420VideoFrame(
98 const scoped_refptr<VideoFrame>& frame); 98 const scoped_refptr<VideoFrame>& frame);
99 99
100 // Copy I420 video frame to match the required coded size and pad it repeatly
101 // with the last column / row.
miu 2016/04/30 00:41:14 Comment should also mention: 1) The visible region
xjz 2016/05/03 01:17:58 Done.
102 MEDIA_EXPORT bool I420CopyWithPadding(const scoped_refptr<VideoFrame> src_frame,
miu 2016/04/30 00:41:14 Type of the args should be: const VideoFrame& src
xjz 2016/05/03 01:17:58 Done.
103 scoped_refptr<VideoFrame> dst_frame);
miu 2016/04/30 00:41:14 Consider adding WARN_UNUSED_RESULT in the function
xjz 2016/05/03 01:17:59 Done.
104
100 } // namespace media 105 } // namespace media
101 106
102 #endif // MEDIA_BASE_VIDEO_UTIL_H_ 107 #endif // MEDIA_BASE_VIDEO_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/video_util.cc » ('j') | media/base/video_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698