| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2012 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 |
| (...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1034 uint8* dst_rgb565, int dst_stride_rgb565, | 1034 uint8* dst_rgb565, int dst_stride_rgb565, |
| 1035 const uint8* dither4x4, int width, int height) { | 1035 const uint8* dither4x4, int width, int height) { |
| 1036 int y; | 1036 int y; |
| 1037 void (*I422ToARGBRow)(const uint8* y_buf, | 1037 void (*I422ToARGBRow)(const uint8* y_buf, |
| 1038 const uint8* u_buf, | 1038 const uint8* u_buf, |
| 1039 const uint8* v_buf, | 1039 const uint8* v_buf, |
| 1040 uint8* rgb_buf, | 1040 uint8* rgb_buf, |
| 1041 const struct YuvConstants* yuvconstants, | 1041 const struct YuvConstants* yuvconstants, |
| 1042 int width) = I422ToARGBRow_C; | 1042 int width) = I422ToARGBRow_C; |
| 1043 void (*ARGBToRGB565DitherRow)(const uint8* src_argb, uint8* dst_rgb, | 1043 void (*ARGBToRGB565DitherRow)(const uint8* src_argb, uint8* dst_rgb, |
| 1044 const uint32 dither4, int pix) = ARGBToRGB565DitherRow_C; | 1044 const uint32 dither4, int width) = ARGBToRGB565DitherRow_C; |
| 1045 if (!src_y || !src_u || !src_v || !dst_rgb565 || | 1045 if (!src_y || !src_u || !src_v || !dst_rgb565 || |
| 1046 width <= 0 || height == 0) { | 1046 width <= 0 || height == 0) { |
| 1047 return -1; | 1047 return -1; |
| 1048 } | 1048 } |
| 1049 // Negative height means invert the image. | 1049 // Negative height means invert the image. |
| 1050 if (height < 0) { | 1050 if (height < 0) { |
| 1051 height = -height; | 1051 height = -height; |
| 1052 dst_rgb565 = dst_rgb565 + (height - 1) * dst_stride_rgb565; | 1052 dst_rgb565 = dst_rgb565 + (height - 1) * dst_stride_rgb565; |
| 1053 dst_stride_rgb565 = -dst_stride_rgb565; | 1053 dst_stride_rgb565 = -dst_stride_rgb565; |
| 1054 } | 1054 } |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1349 default: | 1349 default: |
| 1350 return -1; // unknown fourcc - return failure code. | 1350 return -1; // unknown fourcc - return failure code. |
| 1351 } | 1351 } |
| 1352 return r; | 1352 return r; |
| 1353 } | 1353 } |
| 1354 | 1354 |
| 1355 #ifdef __cplusplus | 1355 #ifdef __cplusplus |
| 1356 } // extern "C" | 1356 } // extern "C" |
| 1357 } // namespace libyuv | 1357 } // namespace libyuv |
| 1358 #endif | 1358 #endif |
| OLD | NEW |