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

Side by Side Diff: simd/jsimd_x86_64.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_i386.c ('k') | wrbmp.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_x86_64.c 2 * jsimd_x86_64.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, 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 * x86_64 architecture. 13 * x86_64 architecture.
14 */ 14 */
15 15
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 return 0; 75 return 0;
76 if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4)) 76 if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4))
77 return 0; 77 return 0;
78 78
79 if (!IS_ALIGNED_SSE(jconst_ycc_rgb_convert_sse2)) 79 if (!IS_ALIGNED_SSE(jconst_ycc_rgb_convert_sse2))
80 return 0; 80 return 0;
81 81
82 return 1; 82 return 1;
83 } 83 }
84 84
85 GLOBAL(int)
86 jsimd_can_ycc_rgb565 (void)
87 {
88 return 0;
89 }
90
85 #ifndef JPEG_DECODE_ONLY 91 #ifndef JPEG_DECODE_ONLY
86 GLOBAL(void) 92 GLOBAL(void)
87 jsimd_rgb_ycc_convert (j_compress_ptr cinfo, 93 jsimd_rgb_ycc_convert (j_compress_ptr cinfo,
88 JSAMPARRAY input_buf, JSAMPIMAGE output_buf, 94 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
89 JDIMENSION output_row, int num_rows) 95 JDIMENSION output_row, int num_rows)
90 { 96 {
91 void (*sse2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); 97 void (*sse2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);
92 98
93 switch(cinfo->in_color_space) 99 switch(cinfo->in_color_space)
94 { 100 {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 sse2fct=jsimd_ycc_extxrgb_convert_sse2; 200 sse2fct=jsimd_ycc_extxrgb_convert_sse2;
195 break; 201 break;
196 default: 202 default:
197 sse2fct=jsimd_ycc_rgb_convert_sse2; 203 sse2fct=jsimd_ycc_rgb_convert_sse2;
198 break; 204 break;
199 } 205 }
200 206
201 sse2fct(cinfo->output_width, input_buf, input_row, output_buf, num_rows); 207 sse2fct(cinfo->output_width, input_buf, input_row, output_buf, num_rows);
202 } 208 }
203 209
210 GLOBAL(void)
211 jsimd_ycc_rgb565_convert (j_decompress_ptr cinfo,
212 JSAMPIMAGE input_buf, JDIMENSION input_row,
213 JSAMPARRAY output_buf, int num_rows)
214 {
215 }
216
204 #ifndef JPEG_DECODE_ONLY 217 #ifndef JPEG_DECODE_ONLY
205 GLOBAL(int) 218 GLOBAL(int)
206 jsimd_can_h2v2_downsample (void) 219 jsimd_can_h2v2_downsample (void)
207 { 220 {
208 /* The code is optimised for these values only */ 221 /* The code is optimised for these values only */
209 if (BITS_IN_JSAMPLE != 8) 222 if (BITS_IN_JSAMPLE != 8)
210 return 0; 223 return 0;
211 if (sizeof(JDIMENSION) != 4) 224 if (sizeof(JDIMENSION) != 4)
212 return 0; 225 return 0;
213 226
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 } 764 }
752 765
753 GLOBAL(void) 766 GLOBAL(void)
754 jsimd_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr, 767 jsimd_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,
755 JCOEFPTR coef_block, JSAMPARRAY output_buf, 768 JCOEFPTR coef_block, JSAMPARRAY output_buf,
756 JDIMENSION output_col) 769 JDIMENSION output_col)
757 { 770 {
758 jsimd_idct_float_sse2(compptr->dct_table, coef_block, 771 jsimd_idct_float_sse2(compptr->dct_table, coef_block,
759 output_buf, output_col); 772 output_buf, output_col);
760 } 773 }
OLDNEW
« no previous file with comments | « simd/jsimd_i386.c ('k') | wrbmp.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698