| 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 the region |
| 101 // outside visible rect repeatly with the last column / row. The required coded |
| 102 // size should be larger than or equal to the visible size, since the visible |
| 103 // region in both frames should be identical. Return false if copy is not |
| 104 // successful. |
| 105 MEDIA_EXPORT bool I420CopyWithPadding(const VideoFrame& src_frame, |
| 106 VideoFrame* dst_frame) WARN_UNUSED_RESULT; |
| 107 |
| 100 } // namespace media | 108 } // namespace media |
| 101 | 109 |
| 102 #endif // MEDIA_BASE_VIDEO_UTIL_H_ | 110 #endif // MEDIA_BASE_VIDEO_UTIL_H_ |
| OLD | NEW |