| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright 2011 The LibYuv Project Authors. All rights reserved. | 2  *  Copyright 2011 The LibYuv 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 | 
| 11 #ifndef INCLUDE_LIBYUV_CONVERT_H_  // NOLINT | 11 #ifndef INCLUDE_LIBYUV_CONVERT_H_  // NOLINT | 
| 12 #define INCLUDE_LIBYUV_CONVERT_H_ | 12 #define INCLUDE_LIBYUV_CONVERT_H_ | 
| 13 | 13 | 
| 14 #include "libyuv/basic_types.h" | 14 #include "libyuv/basic_types.h" | 
| 15 | 15 | 
| 16 #include "libyuv/rotate.h"  // For enum RotationMode. | 16 #include "libyuv/rotate.h"  // For enum RotationMode. | 
| 17 | 17 | 
|  | 18 // TODO(fbarchard): fix WebRTC source to include following libyuv headers: | 
|  | 19 #include "libyuv/convert_argb.h"  // For WebRTC I420ToARGB. b/620 | 
|  | 20 #include "libyuv/convert_from.h"  // For WebRTC ConvertFromI420. b/620 | 
|  | 21 #include "libyuv/planar_functions.h"  // For WebRTC I420Rect, CopyPlane. b/618 | 
|  | 22 | 
| 18 #ifdef __cplusplus | 23 #ifdef __cplusplus | 
| 19 namespace libyuv { | 24 namespace libyuv { | 
| 20 extern "C" { | 25 extern "C" { | 
| 21 #endif | 26 #endif | 
| 22 | 27 | 
| 23 // Convert I444 to I420. | 28 // Convert I444 to I420. | 
| 24 LIBYUV_API | 29 LIBYUV_API | 
| 25 int I444ToI420(const uint8* src_y, int src_stride_y, | 30 int I444ToI420(const uint8* src_y, int src_stride_y, | 
| 26                const uint8* src_u, int src_stride_u, | 31                const uint8* src_u, int src_stride_u, | 
| 27                const uint8* src_v, int src_stride_v, | 32                const uint8* src_v, int src_stride_v, | 
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 178                    int width, int height); | 183                    int width, int height); | 
| 179 | 184 | 
| 180 // RGB12 (R444 fourcc) little endian to I420. | 185 // RGB12 (R444 fourcc) little endian to I420. | 
| 181 LIBYUV_API | 186 LIBYUV_API | 
| 182 int ARGB4444ToI420(const uint8* src_frame, int src_stride_frame, | 187 int ARGB4444ToI420(const uint8* src_frame, int src_stride_frame, | 
| 183                    uint8* dst_y, int dst_stride_y, | 188                    uint8* dst_y, int dst_stride_y, | 
| 184                    uint8* dst_u, int dst_stride_u, | 189                    uint8* dst_u, int dst_stride_u, | 
| 185                    uint8* dst_v, int dst_stride_v, | 190                    uint8* dst_v, int dst_stride_v, | 
| 186                    int width, int height); | 191                    int width, int height); | 
| 187 | 192 | 
| 188 // Draw a rectangle into I420. |  | 
| 189 // TODO(fbarchard): add planar_functions.h to webrtc includes |  | 
| 190 // https://bugs.chromium.org/p/libyuv/issues/detail?id=618 |  | 
| 191 LIBYUV_API |  | 
| 192 int I420Rect(uint8* dst_y, int dst_stride_y, |  | 
| 193              uint8* dst_u, int dst_stride_u, |  | 
| 194              uint8* dst_v, int dst_stride_v, |  | 
| 195              int x, int y, int width, int height, |  | 
| 196              int value_y, int value_u, int value_v); |  | 
| 197 |  | 
| 198 #ifdef HAVE_JPEG | 193 #ifdef HAVE_JPEG | 
| 199 // src_width/height provided by capture. | 194 // src_width/height provided by capture. | 
| 200 // dst_width/height for clipping determine final size. | 195 // dst_width/height for clipping determine final size. | 
| 201 LIBYUV_API | 196 LIBYUV_API | 
| 202 int MJPGToI420(const uint8* sample, size_t sample_size, | 197 int MJPGToI420(const uint8* sample, size_t sample_size, | 
| 203                uint8* dst_y, int dst_stride_y, | 198                uint8* dst_y, int dst_stride_y, | 
| 204                uint8* dst_u, int dst_stride_u, | 199                uint8* dst_u, int dst_stride_u, | 
| 205                uint8* dst_v, int dst_stride_v, | 200                uint8* dst_v, int dst_stride_v, | 
| 206                int src_width, int src_height, | 201                int src_width, int src_height, | 
| 207                int dst_width, int dst_height); | 202                int dst_width, int dst_height); | 
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 244                   int crop_width, int crop_height, | 239                   int crop_width, int crop_height, | 
| 245                   enum RotationMode rotation, | 240                   enum RotationMode rotation, | 
| 246                   uint32 format); | 241                   uint32 format); | 
| 247 | 242 | 
| 248 #ifdef __cplusplus | 243 #ifdef __cplusplus | 
| 249 }  // extern "C" | 244 }  // extern "C" | 
| 250 }  // namespace libyuv | 245 }  // namespace libyuv | 
| 251 #endif | 246 #endif | 
| 252 | 247 | 
| 253 #endif  // INCLUDE_LIBYUV_CONVERT_H_  NOLINT | 248 #endif  // INCLUDE_LIBYUV_CONVERT_H_  NOLINT | 
| OLD | NEW | 
|---|