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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // Compute SSIM for an I420 frame (all planes). | 123 // Compute SSIM for an I420 frame (all planes). |
124 double I420SSIM(const VideoFrame* ref_frame, const VideoFrame* test_frame); | 124 double I420SSIM(const VideoFrame* ref_frame, const VideoFrame* test_frame); |
125 | 125 |
| 126 // Helper function for directly converting and scaling NV12 to I420. The |
| 127 // |tmp_data| argument will be used for intermediary splitting the UV plane into |
| 128 // separate U and V planes, so the size of that memory region must be at least |
| 129 // 2 * ((src_width + 1) / 2) * ((src_height + 1) / 2). |
| 130 void NV12ToI420Scale(uint8_t* tmp_data, |
| 131 const uint8_t* src_y, int src_stride_y, |
| 132 const uint8_t* src_uv, int src_stride_uv, |
| 133 int src_width, int src_height, |
| 134 uint8_t* dst_y, int dst_stride_y, |
| 135 uint8_t* dst_u, int dst_stride_u, |
| 136 uint8_t* dst_v, int dst_stride_v, |
| 137 int dst_width, int dst_height); |
| 138 |
126 } // namespace webrtc | 139 } // namespace webrtc |
127 | 140 |
128 #endif // WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_WEBRTC_LIBYUV_H_ | 141 #endif // WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_WEBRTC_LIBYUV_H_ |
OLD | NEW |