| 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 |
| (...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 src_v += 1; | 1406 src_v += 1; |
| 1407 rgb_buf += 8; // Advance 2 pixels. | 1407 rgb_buf += 8; // Advance 2 pixels. |
| 1408 } | 1408 } |
| 1409 if (width & 1) { | 1409 if (width & 1) { |
| 1410 YuvPixel(src_y[0], src_u[0], src_v[0], | 1410 YuvPixel(src_y[0], src_u[0], src_v[0], |
| 1411 rgb_buf + 2, rgb_buf + 1, rgb_buf + 0, yuvconstants); | 1411 rgb_buf + 2, rgb_buf + 1, rgb_buf + 0, yuvconstants); |
| 1412 rgb_buf[3] = 255; | 1412 rgb_buf[3] = 255; |
| 1413 } | 1413 } |
| 1414 } | 1414 } |
| 1415 | 1415 |
| 1416 void I422AlphaToABGRRow_C(const uint8* src_y, | |
| 1417 const uint8* src_u, | |
| 1418 const uint8* src_v, | |
| 1419 const uint8* src_a, | |
| 1420 uint8* rgb_buf, | |
| 1421 const struct YuvConstants* yuvconstants, | |
| 1422 int width) { | |
| 1423 int x; | |
| 1424 for (x = 0; x < width - 1; x += 2) { | |
| 1425 YuvPixel(src_y[0], src_u[0], src_v[0], | |
| 1426 rgb_buf + 2, rgb_buf + 1, rgb_buf + 0, yuvconstants); | |
| 1427 rgb_buf[3] = src_a[0]; | |
| 1428 YuvPixel(src_y[1], src_u[0], src_v[0], | |
| 1429 rgb_buf + 6, rgb_buf + 5, rgb_buf + 4, yuvconstants); | |
| 1430 rgb_buf[7] = src_a[1]; | |
| 1431 src_y += 2; | |
| 1432 src_u += 1; | |
| 1433 src_v += 1; | |
| 1434 src_a += 2; | |
| 1435 rgb_buf += 8; // Advance 2 pixels. | |
| 1436 } | |
| 1437 if (width & 1) { | |
| 1438 YuvPixel(src_y[0], src_u[0], src_v[0], | |
| 1439 rgb_buf + 2, rgb_buf + 1, rgb_buf + 0, yuvconstants); | |
| 1440 rgb_buf[3] = src_a[0]; | |
| 1441 } | |
| 1442 } | |
| 1443 | |
| 1444 void I422ToRGB24Row_C(const uint8* src_y, | 1416 void I422ToRGB24Row_C(const uint8* src_y, |
| 1445 const uint8* src_u, | 1417 const uint8* src_u, |
| 1446 const uint8* src_v, | 1418 const uint8* src_v, |
| 1447 uint8* rgb_buf, | 1419 uint8* rgb_buf, |
| 1448 const struct YuvConstants* yuvconstants, | 1420 const struct YuvConstants* yuvconstants, |
| 1449 int width) { | 1421 int width) { |
| 1450 int x; | 1422 int x; |
| 1451 for (x = 0; x < width - 1; x += 2) { | 1423 for (x = 0; x < width - 1; x += 2) { |
| 1452 YuvPixel(src_y[0], src_u[0], src_v[0], | 1424 YuvPixel(src_y[0], src_u[0], src_v[0], |
| 1453 rgb_buf + 0, rgb_buf + 1, rgb_buf + 2, yuvconstants); | 1425 rgb_buf + 0, rgb_buf + 1, rgb_buf + 2, yuvconstants); |
| (...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2690 dst_rgb565 += twidth * 2; | 2662 dst_rgb565 += twidth * 2; |
| 2691 width -= twidth; | 2663 width -= twidth; |
| 2692 } | 2664 } |
| 2693 } | 2665 } |
| 2694 #endif | 2666 #endif |
| 2695 | 2667 |
| 2696 #ifdef __cplusplus | 2668 #ifdef __cplusplus |
| 2697 } // extern "C" | 2669 } // extern "C" |
| 2698 } // namespace libyuv | 2670 } // namespace libyuv |
| 2699 #endif | 2671 #endif |
| OLD | NEW |