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

Side by Side Diff: simd/jsimd_i386.c

Issue 1270213002: Add support for decoding to 565 to libjpeg_turbo (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git@master
Patch Set: Link crbug in the README Created 5 years, 4 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 | « simd/jsimd_arm_neon.S ('k') | simd/jsimd_x86_64.c » ('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 * jsimd_i386.c 2 * jsimd_i386.c
3 * 3 *
4 * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB 4 * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
5 * Copyright 2009-2011 D. R. Commander 5 * Copyright 2009-2011, 2013-2014 D. R. Commander
6 * 6 *
7 * Based on the x86 SIMD extension for IJG JPEG library, 7 * Based on the x86 SIMD extension for IJG JPEG library,
8 * Copyright (C) 1999-2006, MIYASAKA Masaru. 8 * Copyright (C) 1999-2006, MIYASAKA Masaru.
9 * For conditions of distribution and use, see copyright notice in jsimdext.inc 9 * For conditions of distribution and use, see copyright notice in jsimdext.inc
10 * 10 *
11 * This file contains the interface between the "normal" portions 11 * This file contains the interface between the "normal" portions
12 * of the library and the SIMD implementations when running on a 12 * of the library and the SIMD implementations when running on a
13 * 32-bit x86 architecture. 13 * 32-bit x86 architecture.
14 */ 14 */
15 15
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 if ((simd_support & JSIMD_SSE2) && 123 if ((simd_support & JSIMD_SSE2) &&
124 IS_ALIGNED_SSE(jconst_ycc_rgb_convert_sse2)) 124 IS_ALIGNED_SSE(jconst_ycc_rgb_convert_sse2))
125 return 1; 125 return 1;
126 if (simd_support & JSIMD_MMX) 126 if (simd_support & JSIMD_MMX)
127 return 1; 127 return 1;
128 128
129 return 0; 129 return 0;
130 } 130 }
131 131
132 GLOBAL(int)
133 jsimd_can_ycc_rgb565 (void)
134 {
135 return 0;
136 }
137
132 #ifndef JPEG_DECODE_ONLY 138 #ifndef JPEG_DECODE_ONLY
133 GLOBAL(void) 139 GLOBAL(void)
134 jsimd_rgb_ycc_convert (j_compress_ptr cinfo, 140 jsimd_rgb_ycc_convert (j_compress_ptr cinfo,
135 JSAMPARRAY input_buf, JSAMPIMAGE output_buf, 141 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
136 JDIMENSION output_row, int num_rows) 142 JDIMENSION output_row, int num_rows)
137 { 143 {
138 void (*sse2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); 144 void (*sse2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);
139 void (*mmxfct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); 145 void (*mmxfct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);
140 146
141 switch(cinfo->in_color_space) 147 switch(cinfo->in_color_space)
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 IS_ALIGNED_SSE(jconst_rgb_ycc_convert_sse2)) 184 IS_ALIGNED_SSE(jconst_rgb_ycc_convert_sse2))
179 sse2fct(cinfo->image_width, input_buf, 185 sse2fct(cinfo->image_width, input_buf,
180 output_buf, output_row, num_rows); 186 output_buf, output_row, num_rows);
181 else if (simd_support & JSIMD_MMX) 187 else if (simd_support & JSIMD_MMX)
182 mmxfct(cinfo->image_width, input_buf, 188 mmxfct(cinfo->image_width, input_buf,
183 output_buf, output_row, num_rows); 189 output_buf, output_row, num_rows);
184 } 190 }
185 #endif 191 #endif
186 192
187 GLOBAL(void) 193 GLOBAL(void)
194 jsimd_ycc_rgb565_convert (j_decompress_ptr cinfo,
195 JSAMPIMAGE input_buf, JDIMENSION input_row,
196 JSAMPARRAY output_buf, int num_rows)
197 {
198 }
199
200 GLOBAL(void)
188 jsimd_rgb_gray_convert (j_compress_ptr cinfo, 201 jsimd_rgb_gray_convert (j_compress_ptr cinfo,
189 JSAMPARRAY input_buf, JSAMPIMAGE output_buf, 202 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
190 JDIMENSION output_row, int num_rows) 203 JDIMENSION output_row, int num_rows)
191 { 204 {
192 void (*sse2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); 205 void (*sse2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);
193 void (*mmxfct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); 206 void (*mmxfct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);
194 207
195 switch(cinfo->in_color_space) 208 switch(cinfo->in_color_space)
196 { 209 {
197 case JCS_EXT_RGB: 210 case JCS_EXT_RGB:
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_idct_float_sse2)) 1059 if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_idct_float_sse2))
1047 jsimd_idct_float_sse2(compptr->dct_table, coef_block, 1060 jsimd_idct_float_sse2(compptr->dct_table, coef_block,
1048 output_buf, output_col); 1061 output_buf, output_col);
1049 else if ((simd_support & JSIMD_SSE) && IS_ALIGNED_SSE(jconst_idct_float_sse)) 1062 else if ((simd_support & JSIMD_SSE) && IS_ALIGNED_SSE(jconst_idct_float_sse))
1050 jsimd_idct_float_sse(compptr->dct_table, coef_block, 1063 jsimd_idct_float_sse(compptr->dct_table, coef_block,
1051 output_buf, output_col); 1064 output_buf, output_col);
1052 else if (simd_support & JSIMD_3DNOW) 1065 else if (simd_support & JSIMD_3DNOW)
1053 jsimd_idct_float_3dnow(compptr->dct_table, coef_block, 1066 jsimd_idct_float_3dnow(compptr->dct_table, coef_block,
1054 output_buf, output_col); 1067 output_buf, output_col);
1055 } 1068 }
OLDNEW
« no previous file with comments | « simd/jsimd_arm_neon.S ('k') | simd/jsimd_x86_64.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698