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

Side by Side Diff: source/convert.cc

Issue 2406123002: Remove I411 support, update doc and switch to side by side test (Closed)
Patch Set: bump version, disable a few lint warnings Created 4 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 | « include/libyuv/video_common.h ('k') | source/convert_argb.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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 return I4xxToI420(src_y, src_stride_y, 130 return I4xxToI420(src_y, src_stride_y,
131 src_u, src_stride_u, 131 src_u, src_stride_u,
132 src_v, src_stride_v, 132 src_v, src_stride_v,
133 dst_y, dst_stride_y, 133 dst_y, dst_stride_y,
134 dst_u, dst_stride_u, 134 dst_u, dst_stride_u,
135 dst_v, dst_stride_v, 135 dst_v, dst_stride_v,
136 width, height, 136 width, height,
137 width, height); 137 width, height);
138 } 138 }
139 139
140 // 411 chroma is 1/4 width, 1x height
141 // 420 chroma is 1/2 width, 1/2 height
142 LIBYUV_API
143 int I411ToI420(const uint8* src_y, int src_stride_y,
144 const uint8* src_u, int src_stride_u,
145 const uint8* src_v, int src_stride_v,
146 uint8* dst_y, int dst_stride_y,
147 uint8* dst_u, int dst_stride_u,
148 uint8* dst_v, int dst_stride_v,
149 int width, int height) {
150 const int src_uv_width = SUBSAMPLE(width, 3, 2);
151 return I4xxToI420(src_y, src_stride_y,
152 src_u, src_stride_u,
153 src_v, src_stride_v,
154 dst_y, dst_stride_y,
155 dst_u, dst_stride_u,
156 dst_v, dst_stride_v,
157 width, height,
158 src_uv_width, height);
159 }
160
161 // I400 is greyscale typically used in MJPG 140 // I400 is greyscale typically used in MJPG
162 LIBYUV_API 141 LIBYUV_API
163 int I400ToI420(const uint8* src_y, int src_stride_y, 142 int I400ToI420(const uint8* src_y, int src_stride_y,
164 uint8* dst_y, int dst_stride_y, 143 uint8* dst_y, int dst_stride_y,
165 uint8* dst_u, int dst_stride_u, 144 uint8* dst_u, int dst_stride_u,
166 uint8* dst_v, int dst_stride_v, 145 uint8* dst_v, int dst_stride_v,
167 int width, int height) { 146 int width, int height) {
168 int halfwidth = (width + 1) >> 1; 147 int halfwidth = (width + 1) >> 1;
169 int halfheight = (height + 1) >> 1; 148 int halfheight = (height + 1) >> 1;
170 if (!dst_u || !dst_v || 149 if (!dst_u || !dst_v ||
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1438 dst_u += dst_stride_u; 1417 dst_u += dst_stride_u;
1439 dst_v += dst_stride_v; 1418 dst_v += dst_stride_v;
1440 } 1419 }
1441 return 0; 1420 return 0;
1442 } 1421 }
1443 1422
1444 #ifdef __cplusplus 1423 #ifdef __cplusplus
1445 } // extern "C" 1424 } // extern "C"
1446 } // namespace libyuv 1425 } // namespace libyuv
1447 #endif 1426 #endif
OLDNEW
« no previous file with comments | « include/libyuv/video_common.h ('k') | source/convert_argb.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698