Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: source/row_common.cc

Issue 1388273002: Reimplement NV21ToARGB to allow different color matrix. (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: include scale_row.h for scaling macros Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/row_any.cc ('k') | source/row_gcc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 src_uv += 2; 1656 src_uv += 2;
1657 rgb_buf += 8; // Advance 2 pixels. 1657 rgb_buf += 8; // Advance 2 pixels.
1658 } 1658 }
1659 if (width & 1) { 1659 if (width & 1) {
1660 YuvPixel(src_y[0], src_uv[0], src_uv[1], 1660 YuvPixel(src_y[0], src_uv[0], src_uv[1],
1661 rgb_buf + 0, rgb_buf + 1, rgb_buf + 2, yuvconstants); 1661 rgb_buf + 0, rgb_buf + 1, rgb_buf + 2, yuvconstants);
1662 rgb_buf[3] = 255; 1662 rgb_buf[3] = 255;
1663 } 1663 }
1664 } 1664 }
1665 1665
1666 void NV21ToARGBRow_C(const uint8* src_y,
1667 const uint8* src_vu,
1668 uint8* rgb_buf,
1669 struct YuvConstants* yuvconstants,
1670 int width) {
1671 int x;
1672 for (x = 0; x < width - 1; x += 2) {
1673 YuvPixel(src_y[0], src_vu[1], src_vu[0],
1674 rgb_buf + 0, rgb_buf + 1, rgb_buf + 2, yuvconstants);
1675 rgb_buf[3] = 255;
1676 YuvPixel(src_y[1], src_vu[1], src_vu[0],
1677 rgb_buf + 4, rgb_buf + 5, rgb_buf + 6, yuvconstants);
1678 rgb_buf[7] = 255;
1679 src_y += 2;
1680 src_vu += 2;
1681 rgb_buf += 8; // Advance 2 pixels.
1682 }
1683 if (width & 1) {
1684 YuvPixel(src_y[0], src_vu[1], src_vu[0],
1685 rgb_buf + 0, rgb_buf + 1, rgb_buf + 2, yuvconstants);
1686 rgb_buf[3] = 255;
1687 }
1688 }
1689
1666 void NV12ToRGB565Row_C(const uint8* src_y, 1690 void NV12ToRGB565Row_C(const uint8* src_y,
1667 const uint8* src_uv, 1691 const uint8* src_uv,
1668 uint8* dst_rgb565, 1692 uint8* dst_rgb565,
1669 struct YuvConstants* yuvconstants, 1693 struct YuvConstants* yuvconstants,
1670 int width) { 1694 int width) {
1671 uint8 b0; 1695 uint8 b0;
1672 uint8 g0; 1696 uint8 g0;
1673 uint8 r0; 1697 uint8 r0;
1674 uint8 b1; 1698 uint8 b1;
1675 uint8 g1; 1699 uint8 g1;
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
2660 dst_rgb565 += twidth * 2; 2684 dst_rgb565 += twidth * 2;
2661 width -= twidth; 2685 width -= twidth;
2662 } 2686 }
2663 } 2687 }
2664 #endif 2688 #endif
2665 2689
2666 #ifdef __cplusplus 2690 #ifdef __cplusplus
2667 } // extern "C" 2691 } // extern "C"
2668 } // namespace libyuv 2692 } // namespace libyuv
2669 #endif 2693 #endif
OLDNEW
« no previous file with comments | « source/row_any.cc ('k') | source/row_gcc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698