OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 // Return value: 0 if OK, < 0 otherwise. | 95 // Return value: 0 if OK, < 0 otherwise. |
96 | 96 |
97 int ConvertToI420(VideoType src_video_type, | 97 int ConvertToI420(VideoType src_video_type, |
98 const uint8_t* src_frame, | 98 const uint8_t* src_frame, |
99 int crop_x, | 99 int crop_x, |
100 int crop_y, | 100 int crop_y, |
101 int src_width, | 101 int src_width, |
102 int src_height, | 102 int src_height, |
103 size_t sample_size, | 103 size_t sample_size, |
104 VideoRotation rotation, | 104 VideoRotation rotation, |
105 VideoFrame* dst_frame); | 105 const rtc::scoped_refptr<I420Buffer>& dst_buffer); |
magjed_webrtc
2016/08/25 11:12:56
If dst_buffer is an output argument, you need to u
nisse-webrtc
2016/08/25 11:31:35
I think the const is ok here; the scoped_refptr it
magjed_webrtc
2016/08/25 11:49:08
Yes, using const here will compile, but according
nisse-webrtc
2016/08/25 12:38:40
I'll do that then. That makes sense in some way. B
| |
106 | 106 |
107 // Convert From I420 | 107 // Convert From I420 |
108 // Input: | 108 // Input: |
109 // - src_frame : Reference to a source frame. | 109 // - src_frame : Reference to a source frame. |
110 // - dst_video_type : Type of output video. | 110 // - dst_video_type : Type of output video. |
111 // - dst_sample_size : Required only for the parsing of MJPG. | 111 // - dst_sample_size : Required only for the parsing of MJPG. |
112 // - dst_frame : Pointer to a destination frame. | 112 // - dst_frame : Pointer to a destination frame. |
113 // Return value: 0 if OK, < 0 otherwise. | 113 // Return value: 0 if OK, < 0 otherwise. |
114 // It is assumed that source and destination have equal height. | 114 // It is assumed that source and destination have equal height. |
115 int ConvertFromI420(const VideoFrame& src_frame, | 115 int ConvertFromI420(const VideoFrame& src_frame, |
116 VideoType dst_video_type, | 116 VideoType dst_video_type, |
117 int dst_sample_size, | 117 int dst_sample_size, |
118 uint8_t* dst_frame); | 118 uint8_t* dst_frame); |
119 | 119 |
120 // Compute PSNR for an I420 frame (all planes). | 120 // Compute PSNR for an I420 frame (all planes). |
121 // Returns the PSNR in decibel, to a maximum of kInfinitePSNR. | 121 // Returns the PSNR in decibel, to a maximum of kInfinitePSNR. |
122 double I420PSNR(const VideoFrame* ref_frame, const VideoFrame* test_frame); | 122 double I420PSNR(const VideoFrame* ref_frame, const VideoFrame* test_frame); |
123 double I420PSNR(const rtc::scoped_refptr<VideoFrameBuffer>& ref_buffer, | |
124 const rtc::scoped_refptr<VideoFrameBuffer>& test_buffer); | |
123 // Compute SSIM for an I420 frame (all planes). | 125 // Compute SSIM for an I420 frame (all planes). |
124 double I420SSIM(const VideoFrame* ref_frame, const VideoFrame* test_frame); | 126 double I420SSIM(const VideoFrame* ref_frame, const VideoFrame* test_frame); |
127 double I420SSIM(const rtc::scoped_refptr<VideoFrameBuffer>& ref_buffer, | |
128 const rtc::scoped_refptr<VideoFrameBuffer>& test_buffer); | |
125 | 129 |
126 } // namespace webrtc | 130 } // namespace webrtc |
127 | 131 |
128 #endif // WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_WEBRTC_LIBYUV_H_ | 132 #endif // WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_WEBRTC_LIBYUV_H_ |
OLD | NEW |