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

Side by Side Diff: source/row_common.cc

Issue 1419103007: Raw 24 bit RGB to RGB24 (bgr) (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: st3 for neon 24 bit stores Created 5 years, 1 month 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 uint8 b = src_raw[2]; 93 uint8 b = src_raw[2];
94 dst_argb[0] = b; 94 dst_argb[0] = b;
95 dst_argb[1] = g; 95 dst_argb[1] = g;
96 dst_argb[2] = r; 96 dst_argb[2] = r;
97 dst_argb[3] = 255u; 97 dst_argb[3] = 255u;
98 dst_argb += 4; 98 dst_argb += 4;
99 src_raw += 3; 99 src_raw += 3;
100 } 100 }
101 } 101 }
102 102
103 void RAWToRGB24Row_C(const uint8* src_raw, uint8* dst_rgb24, int width) {
104 int x;
105 for (x = 0; x < width; ++x) {
106 uint8 r = src_raw[0];
107 uint8 g = src_raw[1];
108 uint8 b = src_raw[2];
109 dst_rgb24[0] = b;
110 dst_rgb24[1] = g;
111 dst_rgb24[2] = r;
112 dst_rgb24 += 3;
113 src_raw += 3;
114 }
115 }
116
103 void RGB565ToARGBRow_C(const uint8* src_rgb565, uint8* dst_argb, int width) { 117 void RGB565ToARGBRow_C(const uint8* src_rgb565, uint8* dst_argb, int width) {
104 int x; 118 int x;
105 for (x = 0; x < width; ++x) { 119 for (x = 0; x < width; ++x) {
106 uint8 b = src_rgb565[0] & 0x1f; 120 uint8 b = src_rgb565[0] & 0x1f;
107 uint8 g = (src_rgb565[0] >> 5) | ((src_rgb565[1] & 0x07) << 3); 121 uint8 g = (src_rgb565[0] >> 5) | ((src_rgb565[1] & 0x07) << 3);
108 uint8 r = src_rgb565[1] >> 3; 122 uint8 r = src_rgb565[1] >> 3;
109 dst_argb[0] = (b << 3) | (b >> 2); 123 dst_argb[0] = (b << 3) | (b >> 2);
110 dst_argb[1] = (g << 2) | (g >> 4); 124 dst_argb[1] = (g << 2) | (g >> 4);
111 dst_argb[2] = (r << 3) | (r >> 2); 125 dst_argb[2] = (r << 3) | (r >> 2);
112 dst_argb[3] = 255u; 126 dst_argb[3] = 255u;
(...skipping 2484 matching lines...) Expand 10 before | Expand all | Expand 10 after
2597 dst_rgb565 += twidth * 2; 2611 dst_rgb565 += twidth * 2;
2598 width -= twidth; 2612 width -= twidth;
2599 } 2613 }
2600 } 2614 }
2601 #endif 2615 #endif
2602 2616
2603 #ifdef __cplusplus 2617 #ifdef __cplusplus
2604 } // extern "C" 2618 } // extern "C"
2605 } // namespace libyuv 2619 } // namespace libyuv
2606 #endif 2620 #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