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) |
| 106 | jsimd_h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, |
| 107 | JSAMPARRAY input_data, JSAMPARRAY output_data) |
| 108 | { |
| 109 | } |
| 110 | |
| 111 | GLOBAL(void) |
DRC | 6a61c1e | 2014-05-14 15:00:10 +0000 | [diff] [blame] | 112 | jsimd_h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, |
| 113 | JSAMPARRAY input_data, JSAMPARRAY output_data) |
| 114 | { |
| 115 | } |
| 116 | |
| 117 | GLOBAL(void) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 118 | jsimd_h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, |
| 119 | JSAMPARRAY input_data, JSAMPARRAY output_data) |
| 120 | { |
| 121 | } |
| 122 | |
| 123 | GLOBAL(int) |
| 124 | jsimd_can_h2v2_upsample (void) |
| 125 | { |
| 126 | return 0; |
| 127 | } |
| 128 | |
| 129 | GLOBAL(int) |
| 130 | jsimd_can_h2v1_upsample (void) |
| 131 | { |
| 132 | return 0; |
| 133 | } |
| 134 | |
DRC | 5ef4630 | 2014-05-18 20:04:47 +0000 | [diff] [blame] | 135 | GLOBAL(int) |
| 136 | jsimd_can_int_upsample (void) |
| 137 | { |
| 138 | return 0; |
| 139 | } |
| 140 | |
| 141 | GLOBAL(void) |
| 142 | jsimd_int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 143 | JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) |
| 144 | { |
| 145 | } |
| 146 | |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 147 | GLOBAL(void) |
| 148 | jsimd_h2v2_upsample (j_decompress_ptr cinfo, |
DRC | 1a45b81 | 2014-05-09 18:06:58 +0000 | [diff] [blame] | 149 | jpeg_component_info * compptr, |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 150 | JSAMPARRAY input_data, |
| 151 | JSAMPARRAY * output_data_ptr) |
| 152 | { |
| 153 | } |
| 154 | |
| 155 | GLOBAL(void) |
| 156 | jsimd_h2v1_upsample (j_decompress_ptr cinfo, |
DRC | 1a45b81 | 2014-05-09 18:06:58 +0000 | [diff] [blame] | 157 | jpeg_component_info * compptr, |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 158 | JSAMPARRAY input_data, |
| 159 | JSAMPARRAY * output_data_ptr) |
| 160 | { |
| 161 | } |
| 162 | |
| 163 | GLOBAL(int) |
| 164 | jsimd_can_h2v2_fancy_upsample (void) |
| 165 | { |
| 166 | return 0; |
| 167 | } |
| 168 | |
| 169 | GLOBAL(int) |
| 170 | jsimd_can_h2v1_fancy_upsample (void) |
| 171 | { |
| 172 | return 0; |
| 173 | } |
| 174 | |
| 175 | GLOBAL(void) |
| 176 | jsimd_h2v2_fancy_upsample (j_decompress_ptr cinfo, |
DRC | 1a45b81 | 2014-05-09 18:06:58 +0000 | [diff] [blame] | 177 | jpeg_component_info * compptr, |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 178 | JSAMPARRAY input_data, |
| 179 | JSAMPARRAY * output_data_ptr) |
| 180 | { |
| 181 | } |
| 182 | |
| 183 | GLOBAL(void) |
| 184 | jsimd_h2v1_fancy_upsample (j_decompress_ptr cinfo, |
DRC | 1a45b81 | 2014-05-09 18:06:58 +0000 | [diff] [blame] | 185 | jpeg_component_info * compptr, |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 186 | JSAMPARRAY input_data, |
| 187 | JSAMPARRAY * output_data_ptr) |
| 188 | { |
| 189 | } |
| 190 | |
| 191 | GLOBAL(int) |
| 192 | jsimd_can_h2v2_merged_upsample (void) |
| 193 | { |
| 194 | return 0; |
| 195 | } |
| 196 | |
| 197 | GLOBAL(int) |
| 198 | jsimd_can_h2v1_merged_upsample (void) |
| 199 | { |
| 200 | return 0; |
| 201 | } |
| 202 | |
| 203 | GLOBAL(void) |
| 204 | jsimd_h2v2_merged_upsample (j_decompress_ptr cinfo, |
| 205 | JSAMPIMAGE input_buf, |
| 206 | JDIMENSION in_row_group_ctr, |
| 207 | JSAMPARRAY output_buf) |
| 208 | { |
| 209 | } |
| 210 | |
| 211 | GLOBAL(void) |
| 212 | jsimd_h2v1_merged_upsample (j_decompress_ptr cinfo, |
| 213 | JSAMPIMAGE input_buf, |
| 214 | JDIMENSION in_row_group_ctr, |
| 215 | JSAMPARRAY output_buf) |
| 216 | { |
| 217 | } |
| 218 | |
| 219 | GLOBAL(int) |
| 220 | jsimd_can_convsamp (void) |
| 221 | { |
| 222 | return 0; |
| 223 | } |
| 224 | |
| 225 | GLOBAL(int) |
| 226 | jsimd_can_convsamp_float (void) |
| 227 | { |
| 228 | return 0; |
| 229 | } |
| 230 | |
| 231 | GLOBAL(void) |
| 232 | jsimd_convsamp (JSAMPARRAY sample_data, JDIMENSION start_col, |
| 233 | DCTELEM * workspace) |
| 234 | { |
| 235 | } |
| 236 | |
| 237 | GLOBAL(void) |
| 238 | jsimd_convsamp_float (JSAMPARRAY sample_data, JDIMENSION start_col, |
| 239 | FAST_FLOAT * workspace) |
| 240 | { |
| 241 | } |
| 242 | |
| 243 | GLOBAL(int) |
| 244 | jsimd_can_fdct_islow (void) |
| 245 | { |
| 246 | return 0; |
| 247 | } |
| 248 | |
| 249 | GLOBAL(int) |
| 250 | jsimd_can_fdct_ifast (void) |
| 251 | { |
| 252 | return 0; |
| 253 | } |
| 254 | |
| 255 | GLOBAL(int) |
| 256 | jsimd_can_fdct_float (void) |
| 257 | { |
| 258 | return 0; |
| 259 | } |
| 260 | |
| 261 | GLOBAL(void) |
| 262 | jsimd_fdct_islow (DCTELEM * data) |
| 263 | { |
| 264 | } |
| 265 | |
| 266 | GLOBAL(void) |
| 267 | jsimd_fdct_ifast (DCTELEM * data) |
| 268 | { |
| 269 | } |
| 270 | |
| 271 | GLOBAL(void) |
| 272 | jsimd_fdct_float (FAST_FLOAT * data) |
| 273 | { |
| 274 | } |
| 275 | |
| 276 | GLOBAL(int) |
| 277 | jsimd_can_quantize (void) |
| 278 | { |
| 279 | return 0; |
| 280 | } |
| 281 | |
| 282 | GLOBAL(int) |
| 283 | jsimd_can_quantize_float (void) |
| 284 | { |
| 285 | return 0; |
| 286 | } |
| 287 | |
| 288 | GLOBAL(void) |
| 289 | jsimd_quantize (JCOEFPTR coef_block, DCTELEM * divisors, |
| 290 | DCTELEM * workspace) |
| 291 | { |
| 292 | } |
| 293 | |
| 294 | GLOBAL(void) |
| 295 | jsimd_quantize_float (JCOEFPTR coef_block, FAST_FLOAT * divisors, |
| 296 | FAST_FLOAT * workspace) |
| 297 | { |
| 298 | } |
| 299 | |
| 300 | GLOBAL(int) |
| 301 | jsimd_can_idct_2x2 (void) |
| 302 | { |
| 303 | return 0; |
| 304 | } |
| 305 | |
| 306 | GLOBAL(int) |
| 307 | jsimd_can_idct_4x4 (void) |
| 308 | { |
| 309 | return 0; |
| 310 | } |
| 311 | |
DRC | e500591 | 2013-09-27 17:51:08 +0000 | [diff] [blame] | 312 | GLOBAL(int) |
| 313 | jsimd_can_idct_6x6 (void) |
| 314 | { |
| 315 | return 0; |
| 316 | } |
| 317 | |
| 318 | GLOBAL(int) |
| 319 | jsimd_can_idct_12x12 (void) |
| 320 | { |
| 321 | return 0; |
| 322 | } |
| 323 | |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 324 | GLOBAL(void) |
| 325 | jsimd_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 326 | JCOEFPTR coef_block, JSAMPARRAY output_buf, |
| 327 | JDIMENSION output_col) |
| 328 | { |
| 329 | } |
| 330 | |
| 331 | GLOBAL(void) |
| 332 | jsimd_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 333 | JCOEFPTR coef_block, JSAMPARRAY output_buf, |
| 334 | JDIMENSION output_col) |
| 335 | { |
| 336 | } |
| 337 | |
DRC | e500591 | 2013-09-27 17:51:08 +0000 | [diff] [blame] | 338 | GLOBAL(void) |
| 339 | jsimd_idct_6x6 (j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 340 | JCOEFPTR coef_block, JSAMPARRAY output_buf, |
| 341 | JDIMENSION output_col) |
| 342 | { |
| 343 | } |
| 344 | |
| 345 | GLOBAL(void) |
| 346 | jsimd_idct_12x12 (j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 347 | JCOEFPTR coef_block, JSAMPARRAY output_buf, |
| 348 | JDIMENSION output_col) |
| 349 | { |
| 350 | } |
| 351 | |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 352 | GLOBAL(int) |
| 353 | jsimd_can_idct_islow (void) |
| 354 | { |
| 355 | return 0; |
| 356 | } |
| 357 | |
| 358 | GLOBAL(int) |
| 359 | jsimd_can_idct_ifast (void) |
| 360 | { |
| 361 | return 0; |
| 362 | } |
| 363 | |
| 364 | GLOBAL(int) |
| 365 | jsimd_can_idct_float (void) |
| 366 | { |
| 367 | return 0; |
| 368 | } |
| 369 | |
| 370 | GLOBAL(void) |
| 371 | jsimd_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr, |
DRC | 1419852 | 2014-05-15 19:45:11 +0000 | [diff] [blame] | 372 | JCOEFPTR coef_block, JSAMPARRAY output_buf, |
| 373 | JDIMENSION output_col) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 374 | { |
| 375 | } |
| 376 | |
| 377 | GLOBAL(void) |
| 378 | jsimd_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr, |
DRC | 1419852 | 2014-05-15 19:45:11 +0000 | [diff] [blame] | 379 | JCOEFPTR coef_block, JSAMPARRAY output_buf, |
| 380 | JDIMENSION output_col) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 381 | { |
| 382 | } |
| 383 | |
| 384 | GLOBAL(void) |
| 385 | jsimd_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr, |
DRC | 1419852 | 2014-05-15 19:45:11 +0000 | [diff] [blame] | 386 | JCOEFPTR coef_block, JSAMPARRAY output_buf, |
| 387 | JDIMENSION output_col) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 388 | { |
| 389 | } |
| 390 | |
DRC | f3a8684 | 2016-01-07 00:19:43 -0600 | [diff] [blame^] | 391 | GLOBAL(int) |
| 392 | jsimd_can_huff_encode_one_block (void) |
| 393 | { |
| 394 | return 0; |
| 395 | } |
| 396 | |
| 397 | GLOBAL(JOCTET*) |
| 398 | jsimd_huff_encode_one_block (void * state, JOCTET *buffer, JCOEFPTR block, |
| 399 | int last_dc_val, c_derived_tbl *dctbl, |
| 400 | c_derived_tbl *actbl) |
| 401 | { |
| 402 | return NULL; |
| 403 | } |