Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 1 | /* |
| 2 | * jsimd_none.c |
| 3 | * |
| 4 | * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB |
DRC | d729f4d | 2014-08-23 15:47:51 +0000 | [diff] [blame] | 5 | * Copyright 2009-2011, 2014 D. R. Commander |
DRC | f3a8684 | 2016-01-07 00:19:43 -0600 | [diff] [blame] | 6 | * Copyright 2015 Matthieu Darbois |
DRC | 1a45b81 | 2014-05-09 18:06:58 +0000 | [diff] [blame] | 7 | * |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 8 | * Based on the x86 SIMD extension for IJG JPEG library, |
| 9 | * Copyright (C) 1999-2006, MIYASAKA Masaru. |
DRC | af1ca9b | 2011-02-02 05:42:37 +0000 | [diff] [blame] | 10 | * For conditions of distribution and use, see copyright notice in jsimdext.inc |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 11 | * |
| 12 | * This file contains stubs for when there is no SIMD support available. |
| 13 | */ |
| 14 | |
| 15 | #define JPEG_INTERNALS |
| 16 | #include "jinclude.h" |
| 17 | #include "jpeglib.h" |
| 18 | #include "jsimd.h" |
| 19 | #include "jdct.h" |
| 20 | #include "jsimddct.h" |
| 21 | |
| 22 | GLOBAL(int) |
| 23 | jsimd_can_rgb_ycc (void) |
| 24 | { |
| 25 | return 0; |
| 26 | } |
| 27 | |
| 28 | GLOBAL(int) |
DRC | c866633 | 2011-02-18 11:23:45 +0000 | [diff] [blame] | 29 | jsimd_can_rgb_gray (void) |
| 30 | { |
| 31 | return 0; |
| 32 | } |
| 33 | |
| 34 | GLOBAL(int) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 35 | jsimd_can_ycc_rgb (void) |
| 36 | { |
| 37 | return 0; |
| 38 | } |
| 39 | |
DRC | 1b3fd7e | 2014-05-15 18:26:01 +0000 | [diff] [blame] | 40 | GLOBAL(int) |
DRC | d729f4d | 2014-08-23 15:47:51 +0000 | [diff] [blame] | 41 | jsimd_can_ycc_rgb565 (void) |
| 42 | { |
| 43 | return 0; |
| 44 | } |
| 45 | |
| 46 | GLOBAL(int) |
DRC | 1b3fd7e | 2014-05-15 18:26:01 +0000 | [diff] [blame] | 47 | jsimd_c_can_null_convert (void) |
| 48 | { |
| 49 | return 0; |
| 50 | } |
| 51 | |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 52 | GLOBAL(void) |
| 53 | jsimd_rgb_ycc_convert (j_compress_ptr cinfo, |
| 54 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 55 | JDIMENSION output_row, int num_rows) |
| 56 | { |
| 57 | } |
| 58 | |
| 59 | GLOBAL(void) |
DRC | c866633 | 2011-02-18 11:23:45 +0000 | [diff] [blame] | 60 | jsimd_rgb_gray_convert (j_compress_ptr cinfo, |
| 61 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 62 | JDIMENSION output_row, int num_rows) |
| 63 | { |
| 64 | } |
| 65 | |
| 66 | GLOBAL(void) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 67 | jsimd_ycc_rgb_convert (j_decompress_ptr cinfo, |
| 68 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
| 69 | JSAMPARRAY output_buf, int num_rows) |
| 70 | { |
| 71 | } |
| 72 | |
DRC | 1b3fd7e | 2014-05-15 18:26:01 +0000 | [diff] [blame] | 73 | GLOBAL(void) |
DRC | d729f4d | 2014-08-23 15:47:51 +0000 | [diff] [blame] | 74 | jsimd_ycc_rgb565_convert (j_decompress_ptr cinfo, |
| 75 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
| 76 | JSAMPARRAY output_buf, int num_rows) |
| 77 | { |
| 78 | } |
| 79 | |
| 80 | GLOBAL(void) |
DRC | 1b3fd7e | 2014-05-15 18:26:01 +0000 | [diff] [blame] | 81 | jsimd_c_null_convert (j_compress_ptr cinfo, |
| 82 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 83 | JDIMENSION output_row, int num_rows) |
| 84 | { |
| 85 | } |
| 86 | |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 87 | GLOBAL(int) |
| 88 | jsimd_can_h2v2_downsample (void) |
| 89 | { |
| 90 | return 0; |
| 91 | } |
| 92 | |
| 93 | GLOBAL(int) |
| 94 | jsimd_can_h2v1_downsample (void) |
| 95 | { |
| 96 | return 0; |
| 97 | } |
| 98 | |
DRC | 6a61c1e | 2014-05-14 15:00:10 +0000 | [diff] [blame] | 99 | GLOBAL(int) |
| 100 | jsimd_can_h2v2_smooth_downsample (void) |
| 101 | { |
| 102 | return 0; |
| 103 | } |
| 104 | |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 105 | GLOBAL(void) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 106 | jsimd_h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr, |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 107 | JSAMPARRAY input_data, JSAMPARRAY output_data) |
| 108 | { |
| 109 | } |
| 110 | |
| 111 | GLOBAL(void) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 112 | jsimd_h2v2_smooth_downsample (j_compress_ptr cinfo, |
| 113 | jpeg_component_info *compptr, |
| 114 | JSAMPARRAY input_data, JSAMPARRAY output_data) |
DRC | 6a61c1e | 2014-05-14 15:00:10 +0000 | [diff] [blame] | 115 | { |
| 116 | } |
| 117 | |
| 118 | GLOBAL(void) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 119 | jsimd_h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr, |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 120 | JSAMPARRAY input_data, JSAMPARRAY output_data) |
| 121 | { |
| 122 | } |
| 123 | |
| 124 | GLOBAL(int) |
| 125 | jsimd_can_h2v2_upsample (void) |
| 126 | { |
| 127 | return 0; |
| 128 | } |
| 129 | |
| 130 | GLOBAL(int) |
| 131 | jsimd_can_h2v1_upsample (void) |
| 132 | { |
| 133 | return 0; |
| 134 | } |
| 135 | |
DRC | 5ef4630 | 2014-05-18 20:04:47 +0000 | [diff] [blame] | 136 | GLOBAL(int) |
| 137 | jsimd_can_int_upsample (void) |
| 138 | { |
| 139 | return 0; |
| 140 | } |
| 141 | |
| 142 | GLOBAL(void) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 143 | jsimd_int_upsample (j_decompress_ptr cinfo, jpeg_component_info *compptr, |
| 144 | JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr) |
DRC | 5ef4630 | 2014-05-18 20:04:47 +0000 | [diff] [blame] | 145 | { |
| 146 | } |
| 147 | |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 148 | GLOBAL(void) |
| 149 | jsimd_h2v2_upsample (j_decompress_ptr cinfo, |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 150 | jpeg_component_info *compptr, |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 151 | JSAMPARRAY input_data, |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 152 | JSAMPARRAY *output_data_ptr) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 153 | { |
| 154 | } |
| 155 | |
| 156 | GLOBAL(void) |
| 157 | jsimd_h2v1_upsample (j_decompress_ptr cinfo, |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 158 | jpeg_component_info *compptr, |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 159 | JSAMPARRAY input_data, |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 160 | JSAMPARRAY *output_data_ptr) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 161 | { |
| 162 | } |
| 163 | |
| 164 | GLOBAL(int) |
| 165 | jsimd_can_h2v2_fancy_upsample (void) |
| 166 | { |
| 167 | return 0; |
| 168 | } |
| 169 | |
| 170 | GLOBAL(int) |
| 171 | jsimd_can_h2v1_fancy_upsample (void) |
| 172 | { |
| 173 | return 0; |
| 174 | } |
| 175 | |
| 176 | GLOBAL(void) |
| 177 | jsimd_h2v2_fancy_upsample (j_decompress_ptr cinfo, |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 178 | jpeg_component_info *compptr, |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 179 | JSAMPARRAY input_data, |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 180 | JSAMPARRAY *output_data_ptr) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 181 | { |
| 182 | } |
| 183 | |
| 184 | GLOBAL(void) |
| 185 | jsimd_h2v1_fancy_upsample (j_decompress_ptr cinfo, |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 186 | jpeg_component_info *compptr, |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 187 | JSAMPARRAY input_data, |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 188 | JSAMPARRAY *output_data_ptr) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 189 | { |
| 190 | } |
| 191 | |
| 192 | GLOBAL(int) |
| 193 | jsimd_can_h2v2_merged_upsample (void) |
| 194 | { |
| 195 | return 0; |
| 196 | } |
| 197 | |
| 198 | GLOBAL(int) |
| 199 | jsimd_can_h2v1_merged_upsample (void) |
| 200 | { |
| 201 | return 0; |
| 202 | } |
| 203 | |
| 204 | GLOBAL(void) |
| 205 | jsimd_h2v2_merged_upsample (j_decompress_ptr cinfo, |
| 206 | JSAMPIMAGE input_buf, |
| 207 | JDIMENSION in_row_group_ctr, |
| 208 | JSAMPARRAY output_buf) |
| 209 | { |
| 210 | } |
| 211 | |
| 212 | GLOBAL(void) |
| 213 | jsimd_h2v1_merged_upsample (j_decompress_ptr cinfo, |
| 214 | JSAMPIMAGE input_buf, |
| 215 | JDIMENSION in_row_group_ctr, |
| 216 | JSAMPARRAY output_buf) |
| 217 | { |
| 218 | } |
| 219 | |
| 220 | GLOBAL(int) |
| 221 | jsimd_can_convsamp (void) |
| 222 | { |
| 223 | return 0; |
| 224 | } |
| 225 | |
| 226 | GLOBAL(int) |
| 227 | jsimd_can_convsamp_float (void) |
| 228 | { |
| 229 | return 0; |
| 230 | } |
| 231 | |
| 232 | GLOBAL(void) |
| 233 | jsimd_convsamp (JSAMPARRAY sample_data, JDIMENSION start_col, |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 234 | DCTELEM *workspace) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 235 | { |
| 236 | } |
| 237 | |
| 238 | GLOBAL(void) |
| 239 | jsimd_convsamp_float (JSAMPARRAY sample_data, JDIMENSION start_col, |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 240 | FAST_FLOAT *workspace) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 241 | { |
| 242 | } |
| 243 | |
| 244 | GLOBAL(int) |
| 245 | jsimd_can_fdct_islow (void) |
| 246 | { |
| 247 | return 0; |
| 248 | } |
| 249 | |
| 250 | GLOBAL(int) |
| 251 | jsimd_can_fdct_ifast (void) |
| 252 | { |
| 253 | return 0; |
| 254 | } |
| 255 | |
| 256 | GLOBAL(int) |
| 257 | jsimd_can_fdct_float (void) |
| 258 | { |
| 259 | return 0; |
| 260 | } |
| 261 | |
| 262 | GLOBAL(void) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 263 | jsimd_fdct_islow (DCTELEM *data) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 264 | { |
| 265 | } |
| 266 | |
| 267 | GLOBAL(void) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 268 | jsimd_fdct_ifast (DCTELEM *data) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 269 | { |
| 270 | } |
| 271 | |
| 272 | GLOBAL(void) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 273 | jsimd_fdct_float (FAST_FLOAT *data) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 274 | { |
| 275 | } |
| 276 | |
| 277 | GLOBAL(int) |
| 278 | jsimd_can_quantize (void) |
| 279 | { |
| 280 | return 0; |
| 281 | } |
| 282 | |
| 283 | GLOBAL(int) |
| 284 | jsimd_can_quantize_float (void) |
| 285 | { |
| 286 | return 0; |
| 287 | } |
| 288 | |
| 289 | GLOBAL(void) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 290 | jsimd_quantize (JCOEFPTR coef_block, DCTELEM *divisors, |
| 291 | DCTELEM *workspace) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 292 | { |
| 293 | } |
| 294 | |
| 295 | GLOBAL(void) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 296 | jsimd_quantize_float (JCOEFPTR coef_block, FAST_FLOAT *divisors, |
| 297 | FAST_FLOAT *workspace) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 298 | { |
| 299 | } |
| 300 | |
| 301 | GLOBAL(int) |
| 302 | jsimd_can_idct_2x2 (void) |
| 303 | { |
| 304 | return 0; |
| 305 | } |
| 306 | |
| 307 | GLOBAL(int) |
| 308 | jsimd_can_idct_4x4 (void) |
| 309 | { |
| 310 | return 0; |
| 311 | } |
| 312 | |
DRC | e500591 | 2013-09-27 17:51:08 +0000 | [diff] [blame] | 313 | GLOBAL(int) |
| 314 | jsimd_can_idct_6x6 (void) |
| 315 | { |
| 316 | return 0; |
| 317 | } |
| 318 | |
| 319 | GLOBAL(int) |
| 320 | jsimd_can_idct_12x12 (void) |
| 321 | { |
| 322 | return 0; |
| 323 | } |
| 324 | |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 325 | GLOBAL(void) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 326 | jsimd_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info *compptr, |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 327 | JCOEFPTR coef_block, JSAMPARRAY output_buf, |
| 328 | JDIMENSION output_col) |
| 329 | { |
| 330 | } |
| 331 | |
| 332 | GLOBAL(void) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 333 | jsimd_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info *compptr, |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 334 | JCOEFPTR coef_block, JSAMPARRAY output_buf, |
| 335 | JDIMENSION output_col) |
| 336 | { |
| 337 | } |
| 338 | |
DRC | e500591 | 2013-09-27 17:51:08 +0000 | [diff] [blame] | 339 | GLOBAL(void) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 340 | jsimd_idct_6x6 (j_decompress_ptr cinfo, jpeg_component_info *compptr, |
DRC | e500591 | 2013-09-27 17:51:08 +0000 | [diff] [blame] | 341 | JCOEFPTR coef_block, JSAMPARRAY output_buf, |
| 342 | JDIMENSION output_col) |
| 343 | { |
| 344 | } |
| 345 | |
| 346 | GLOBAL(void) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 347 | jsimd_idct_12x12 (j_decompress_ptr cinfo, jpeg_component_info *compptr, |
DRC | e500591 | 2013-09-27 17:51:08 +0000 | [diff] [blame] | 348 | JCOEFPTR coef_block, JSAMPARRAY output_buf, |
| 349 | JDIMENSION output_col) |
| 350 | { |
| 351 | } |
| 352 | |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 353 | GLOBAL(int) |
| 354 | jsimd_can_idct_islow (void) |
| 355 | { |
| 356 | return 0; |
| 357 | } |
| 358 | |
| 359 | GLOBAL(int) |
| 360 | jsimd_can_idct_ifast (void) |
| 361 | { |
| 362 | return 0; |
| 363 | } |
| 364 | |
| 365 | GLOBAL(int) |
| 366 | jsimd_can_idct_float (void) |
| 367 | { |
| 368 | return 0; |
| 369 | } |
| 370 | |
| 371 | GLOBAL(void) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 372 | jsimd_idct_islow (j_decompress_ptr cinfo, jpeg_component_info *compptr, |
DRC | 1419852 | 2014-05-15 19:45:11 +0000 | [diff] [blame] | 373 | JCOEFPTR coef_block, JSAMPARRAY output_buf, |
| 374 | JDIMENSION output_col) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 375 | { |
| 376 | } |
| 377 | |
| 378 | GLOBAL(void) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 379 | jsimd_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info *compptr, |
DRC | 1419852 | 2014-05-15 19:45:11 +0000 | [diff] [blame] | 380 | JCOEFPTR coef_block, JSAMPARRAY output_buf, |
| 381 | JDIMENSION output_col) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 382 | { |
| 383 | } |
| 384 | |
| 385 | GLOBAL(void) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 386 | jsimd_idct_float (j_decompress_ptr cinfo, jpeg_component_info *compptr, |
DRC | 1419852 | 2014-05-15 19:45:11 +0000 | [diff] [blame] | 387 | JCOEFPTR coef_block, JSAMPARRAY output_buf, |
| 388 | JDIMENSION output_col) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 389 | { |
| 390 | } |
| 391 | |
DRC | f3a8684 | 2016-01-07 00:19:43 -0600 | [diff] [blame] | 392 | GLOBAL(int) |
| 393 | jsimd_can_huff_encode_one_block (void) |
| 394 | { |
| 395 | return 0; |
| 396 | } |
| 397 | |
| 398 | GLOBAL(JOCTET*) |
DRC | bd49803 | 2016-02-19 08:53:33 -0600 | [diff] [blame^] | 399 | jsimd_huff_encode_one_block (void *state, JOCTET *buffer, JCOEFPTR block, |
DRC | f3a8684 | 2016-01-07 00:19:43 -0600 | [diff] [blame] | 400 | int last_dc_val, c_derived_tbl *dctbl, |
| 401 | c_derived_tbl *actbl) |
| 402 | { |
| 403 | return NULL; |
| 404 | } |