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

Side by Side Diff: simd/jsimd_x86_64.c

Issue 9232002: Update libjpeg-turbo to 1.2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libjpeg_turbo/
Patch Set: '' Created 8 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « simd/jsimd_i386.c ('k') | simd/jsimdext.inc » ('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 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 *
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 JDIMENSION output_row, int num_rows) 86 JDIMENSION output_row, int num_rows)
87 { 87 {
88 void (*sse2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); 88 void (*sse2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);
89 89
90 switch(cinfo->in_color_space) 90 switch(cinfo->in_color_space)
91 { 91 {
92 case JCS_EXT_RGB: 92 case JCS_EXT_RGB:
93 sse2fct=jsimd_extrgb_ycc_convert_sse2; 93 sse2fct=jsimd_extrgb_ycc_convert_sse2;
94 break; 94 break;
95 case JCS_EXT_RGBX: 95 case JCS_EXT_RGBX:
96 case JCS_EXT_RGBA:
96 sse2fct=jsimd_extrgbx_ycc_convert_sse2; 97 sse2fct=jsimd_extrgbx_ycc_convert_sse2;
97 break; 98 break;
98 case JCS_EXT_BGR: 99 case JCS_EXT_BGR:
99 sse2fct=jsimd_extbgr_ycc_convert_sse2; 100 sse2fct=jsimd_extbgr_ycc_convert_sse2;
100 break; 101 break;
101 case JCS_EXT_BGRX: 102 case JCS_EXT_BGRX:
103 case JCS_EXT_BGRA:
102 sse2fct=jsimd_extbgrx_ycc_convert_sse2; 104 sse2fct=jsimd_extbgrx_ycc_convert_sse2;
103 break; 105 break;
104 case JCS_EXT_XBGR: 106 case JCS_EXT_XBGR:
107 case JCS_EXT_ABGR:
105 sse2fct=jsimd_extxbgr_ycc_convert_sse2; 108 sse2fct=jsimd_extxbgr_ycc_convert_sse2;
106 break; 109 break;
107 case JCS_EXT_XRGB: 110 case JCS_EXT_XRGB:
111 case JCS_EXT_ARGB:
108 sse2fct=jsimd_extxrgb_ycc_convert_sse2; 112 sse2fct=jsimd_extxrgb_ycc_convert_sse2;
109 break; 113 break;
110 default: 114 default:
111 sse2fct=jsimd_rgb_ycc_convert_sse2; 115 sse2fct=jsimd_rgb_ycc_convert_sse2;
112 break; 116 break;
113 } 117 }
114 118
115 sse2fct(cinfo->image_width, input_buf, output_buf, output_row, num_rows); 119 sse2fct(cinfo->image_width, input_buf, output_buf, output_row, num_rows);
116 } 120 }
117 121
118 GLOBAL(void) 122 GLOBAL(void)
119 jsimd_rgb_gray_convert (j_compress_ptr cinfo, 123 jsimd_rgb_gray_convert (j_compress_ptr cinfo,
120 JSAMPARRAY input_buf, JSAMPIMAGE output_buf, 124 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
121 JDIMENSION output_row, int num_rows) 125 JDIMENSION output_row, int num_rows)
122 { 126 {
123 void (*sse2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); 127 void (*sse2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);
124 128
125 switch(cinfo->in_color_space) 129 switch(cinfo->in_color_space)
126 { 130 {
127 case JCS_EXT_RGB: 131 case JCS_EXT_RGB:
128 sse2fct=jsimd_extrgb_gray_convert_sse2; 132 sse2fct=jsimd_extrgb_gray_convert_sse2;
129 break; 133 break;
130 case JCS_EXT_RGBX: 134 case JCS_EXT_RGBX:
135 case JCS_EXT_RGBA:
131 sse2fct=jsimd_extrgbx_gray_convert_sse2; 136 sse2fct=jsimd_extrgbx_gray_convert_sse2;
132 break; 137 break;
133 case JCS_EXT_BGR: 138 case JCS_EXT_BGR:
134 sse2fct=jsimd_extbgr_gray_convert_sse2; 139 sse2fct=jsimd_extbgr_gray_convert_sse2;
135 break; 140 break;
136 case JCS_EXT_BGRX: 141 case JCS_EXT_BGRX:
142 case JCS_EXT_BGRA:
137 sse2fct=jsimd_extbgrx_gray_convert_sse2; 143 sse2fct=jsimd_extbgrx_gray_convert_sse2;
138 break; 144 break;
139 case JCS_EXT_XBGR: 145 case JCS_EXT_XBGR:
146 case JCS_EXT_ABGR:
140 sse2fct=jsimd_extxbgr_gray_convert_sse2; 147 sse2fct=jsimd_extxbgr_gray_convert_sse2;
141 break; 148 break;
142 case JCS_EXT_XRGB: 149 case JCS_EXT_XRGB:
150 case JCS_EXT_ARGB:
143 sse2fct=jsimd_extxrgb_gray_convert_sse2; 151 sse2fct=jsimd_extxrgb_gray_convert_sse2;
144 break; 152 break;
145 default: 153 default:
146 sse2fct=jsimd_rgb_gray_convert_sse2; 154 sse2fct=jsimd_rgb_gray_convert_sse2;
147 break; 155 break;
148 } 156 }
149 157
150 sse2fct(cinfo->image_width, input_buf, output_buf, output_row, num_rows); 158 sse2fct(cinfo->image_width, input_buf, output_buf, output_row, num_rows);
151 } 159 }
152 160
153 GLOBAL(void) 161 GLOBAL(void)
154 jsimd_ycc_rgb_convert (j_decompress_ptr cinfo, 162 jsimd_ycc_rgb_convert (j_decompress_ptr cinfo,
155 JSAMPIMAGE input_buf, JDIMENSION input_row, 163 JSAMPIMAGE input_buf, JDIMENSION input_row,
156 JSAMPARRAY output_buf, int num_rows) 164 JSAMPARRAY output_buf, int num_rows)
157 { 165 {
158 void (*sse2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int); 166 void (*sse2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int);
159 167
160 switch(cinfo->out_color_space) 168 switch(cinfo->out_color_space)
161 { 169 {
162 case JCS_EXT_RGB: 170 case JCS_EXT_RGB:
163 sse2fct=jsimd_ycc_extrgb_convert_sse2; 171 sse2fct=jsimd_ycc_extrgb_convert_sse2;
164 break; 172 break;
165 case JCS_EXT_RGBX: 173 case JCS_EXT_RGBX:
174 case JCS_EXT_RGBA:
166 sse2fct=jsimd_ycc_extrgbx_convert_sse2; 175 sse2fct=jsimd_ycc_extrgbx_convert_sse2;
167 break; 176 break;
168 case JCS_EXT_BGR: 177 case JCS_EXT_BGR:
169 sse2fct=jsimd_ycc_extbgr_convert_sse2; 178 sse2fct=jsimd_ycc_extbgr_convert_sse2;
170 break; 179 break;
171 case JCS_EXT_BGRX: 180 case JCS_EXT_BGRX:
181 case JCS_EXT_BGRA:
172 sse2fct=jsimd_ycc_extbgrx_convert_sse2; 182 sse2fct=jsimd_ycc_extbgrx_convert_sse2;
173 break; 183 break;
174 case JCS_EXT_XBGR: 184 case JCS_EXT_XBGR:
185 case JCS_EXT_ABGR:
175 sse2fct=jsimd_ycc_extxbgr_convert_sse2; 186 sse2fct=jsimd_ycc_extxbgr_convert_sse2;
176 break; 187 break;
177 case JCS_EXT_XRGB: 188 case JCS_EXT_XRGB:
189 case JCS_EXT_ARGB:
178 sse2fct=jsimd_ycc_extxrgb_convert_sse2; 190 sse2fct=jsimd_ycc_extxrgb_convert_sse2;
179 break; 191 break;
180 default: 192 default:
181 sse2fct=jsimd_ycc_rgb_convert_sse2; 193 sse2fct=jsimd_ycc_rgb_convert_sse2;
182 break; 194 break;
183 } 195 }
184 196
185 sse2fct(cinfo->output_width, input_buf, input_row, output_buf, num_rows); 197 sse2fct(cinfo->output_width, input_buf, input_row, output_buf, num_rows);
186 } 198 }
187 199
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 JSAMPARRAY output_buf) 378 JSAMPARRAY output_buf)
367 { 379 {
368 void (*sse2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY); 380 void (*sse2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY);
369 381
370 switch(cinfo->out_color_space) 382 switch(cinfo->out_color_space)
371 { 383 {
372 case JCS_EXT_RGB: 384 case JCS_EXT_RGB:
373 sse2fct=jsimd_h2v2_extrgb_merged_upsample_sse2; 385 sse2fct=jsimd_h2v2_extrgb_merged_upsample_sse2;
374 break; 386 break;
375 case JCS_EXT_RGBX: 387 case JCS_EXT_RGBX:
388 case JCS_EXT_RGBA:
376 sse2fct=jsimd_h2v2_extrgbx_merged_upsample_sse2; 389 sse2fct=jsimd_h2v2_extrgbx_merged_upsample_sse2;
377 break; 390 break;
378 case JCS_EXT_BGR: 391 case JCS_EXT_BGR:
379 sse2fct=jsimd_h2v2_extbgr_merged_upsample_sse2; 392 sse2fct=jsimd_h2v2_extbgr_merged_upsample_sse2;
380 break; 393 break;
381 case JCS_EXT_BGRX: 394 case JCS_EXT_BGRX:
395 case JCS_EXT_BGRA:
382 sse2fct=jsimd_h2v2_extbgrx_merged_upsample_sse2; 396 sse2fct=jsimd_h2v2_extbgrx_merged_upsample_sse2;
383 break; 397 break;
384 case JCS_EXT_XBGR: 398 case JCS_EXT_XBGR:
399 case JCS_EXT_ABGR:
385 sse2fct=jsimd_h2v2_extxbgr_merged_upsample_sse2; 400 sse2fct=jsimd_h2v2_extxbgr_merged_upsample_sse2;
386 break; 401 break;
387 case JCS_EXT_XRGB: 402 case JCS_EXT_XRGB:
403 case JCS_EXT_ARGB:
388 sse2fct=jsimd_h2v2_extxrgb_merged_upsample_sse2; 404 sse2fct=jsimd_h2v2_extxrgb_merged_upsample_sse2;
389 break; 405 break;
390 default: 406 default:
391 sse2fct=jsimd_h2v2_merged_upsample_sse2; 407 sse2fct=jsimd_h2v2_merged_upsample_sse2;
392 break; 408 break;
393 } 409 }
394 410
395 sse2fct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf); 411 sse2fct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf);
396 } 412 }
397 413
398 GLOBAL(void) 414 GLOBAL(void)
399 jsimd_h2v1_merged_upsample (j_decompress_ptr cinfo, 415 jsimd_h2v1_merged_upsample (j_decompress_ptr cinfo,
400 JSAMPIMAGE input_buf, 416 JSAMPIMAGE input_buf,
401 JDIMENSION in_row_group_ctr, 417 JDIMENSION in_row_group_ctr,
402 JSAMPARRAY output_buf) 418 JSAMPARRAY output_buf)
403 { 419 {
404 void (*sse2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY); 420 void (*sse2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY);
405 421
406 switch(cinfo->out_color_space) 422 switch(cinfo->out_color_space)
407 { 423 {
408 case JCS_EXT_RGB: 424 case JCS_EXT_RGB:
409 sse2fct=jsimd_h2v1_extrgb_merged_upsample_sse2; 425 sse2fct=jsimd_h2v1_extrgb_merged_upsample_sse2;
410 break; 426 break;
411 case JCS_EXT_RGBX: 427 case JCS_EXT_RGBX:
428 case JCS_EXT_RGBA:
412 sse2fct=jsimd_h2v1_extrgbx_merged_upsample_sse2; 429 sse2fct=jsimd_h2v1_extrgbx_merged_upsample_sse2;
413 break; 430 break;
414 case JCS_EXT_BGR: 431 case JCS_EXT_BGR:
415 sse2fct=jsimd_h2v1_extbgr_merged_upsample_sse2; 432 sse2fct=jsimd_h2v1_extbgr_merged_upsample_sse2;
416 break; 433 break;
417 case JCS_EXT_BGRX: 434 case JCS_EXT_BGRX:
435 case JCS_EXT_BGRA:
418 sse2fct=jsimd_h2v1_extbgrx_merged_upsample_sse2; 436 sse2fct=jsimd_h2v1_extbgrx_merged_upsample_sse2;
419 break; 437 break;
420 case JCS_EXT_XBGR: 438 case JCS_EXT_XBGR:
439 case JCS_EXT_ABGR:
421 sse2fct=jsimd_h2v1_extxbgr_merged_upsample_sse2; 440 sse2fct=jsimd_h2v1_extxbgr_merged_upsample_sse2;
422 break; 441 break;
423 case JCS_EXT_XRGB: 442 case JCS_EXT_XRGB:
443 case JCS_EXT_ARGB:
424 sse2fct=jsimd_h2v1_extxrgb_merged_upsample_sse2; 444 sse2fct=jsimd_h2v1_extxrgb_merged_upsample_sse2;
425 break; 445 break;
426 default: 446 default:
427 sse2fct=jsimd_h2v1_merged_upsample_sse2; 447 sse2fct=jsimd_h2v1_merged_upsample_sse2;
428 break; 448 break;
429 } 449 }
430 450
431 sse2fct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf); 451 sse2fct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf);
432 } 452 }
433 453
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 744
725 GLOBAL(void) 745 GLOBAL(void)
726 jsimd_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr, 746 jsimd_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,
727 JCOEFPTR coef_block, JSAMPARRAY output_buf, 747 JCOEFPTR coef_block, JSAMPARRAY output_buf,
728 JDIMENSION output_col) 748 JDIMENSION output_col)
729 { 749 {
730 jsimd_idct_float_sse2(compptr->dct_table, coef_block, 750 jsimd_idct_float_sse2(compptr->dct_table, coef_block,
731 output_buf, output_col); 751 output_buf, output_col);
732 } 752 }
733 753
OLDNEW
« no previous file with comments | « simd/jsimd_i386.c ('k') | simd/jsimdext.inc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698