Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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_ |
| OLD | NEW |