Home | History | Annotate | Download | only in libjpeg-turbo
      1 /*
      2  * jsimd_none.c
      3  *
      4  * Copyright 2009 Pierre Ossman <ossman (at) cendio.se> for Cendio AB
      5  * Copyright (C) 2009-2011, 2014, D. R. Commander.
      6  * Copyright (C) 2015, Matthieu Darbois.
      7  *
      8  * Based on the x86 SIMD extension for IJG JPEG library,
      9  * Copyright (C) 1999-2006, MIYASAKA Masaru.
     10  * For conditions of distribution and use, see copyright notice in jsimdext.inc
     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)
     29 jsimd_can_rgb_gray (void)
     30 {
     31   return 0;
     32 }
     33 
     34 GLOBAL(int)
     35 jsimd_can_ycc_rgb (void)
     36 {
     37   return 0;
     38 }
     39 
     40 GLOBAL(int)
     41 jsimd_can_ycc_rgb565 (void)
     42 {
     43   return 0;
     44 }
     45 
     46 GLOBAL(int)
     47 jsimd_c_can_null_convert (void)
     48 {
     49   return 0;
     50 }
     51 
     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)
     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)
     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 
     73 GLOBAL(void)
     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)
     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 
     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 
     99 GLOBAL(int)
    100 jsimd_can_h2v2_smooth_downsample (void)
    101 {
    102   return 0;
    103 }
    104 
    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)
    112 jsimd_h2v2_smooth_downsample (j_compress_ptr cinfo,
    113                               jpeg_component_info *compptr,
    114                               JSAMPARRAY input_data, JSAMPARRAY output_data)
    115 {
    116 }
    117 
    118 GLOBAL(void)
    119 jsimd_h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr,
    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 
    136 GLOBAL(int)
    137 jsimd_can_int_upsample (void)
    138 {
    139   return 0;
    140 }
    141 
    142 GLOBAL(void)
    143 jsimd_int_upsample (j_decompress_ptr cinfo, jpeg_component_info *compptr,
    144                       JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr)
    145 {
    146 }
    147 
    148 GLOBAL(void)
    149 jsimd_h2v2_upsample (j_decompress_ptr cinfo,
    150                      jpeg_component_info *compptr,
    151                      JSAMPARRAY input_data,
    152                      JSAMPARRAY *output_data_ptr)
    153 {
    154 }
    155 
    156 GLOBAL(void)
    157 jsimd_h2v1_upsample (j_decompress_ptr cinfo,
    158                      jpeg_component_info *compptr,
    159                      JSAMPARRAY input_data,
    160                      JSAMPARRAY *output_data_ptr)
    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,
    178                            jpeg_component_info *compptr,
    179                            JSAMPARRAY input_data,
    180                            JSAMPARRAY *output_data_ptr)
    181 {
    182 }
    183 
    184 GLOBAL(void)
    185 jsimd_h2v1_fancy_upsample (j_decompress_ptr cinfo,
    186                            jpeg_component_info *compptr,
    187                            JSAMPARRAY input_data,
    188                            JSAMPARRAY *output_data_ptr)
    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,
    234                 DCTELEM *workspace)
    235 {
    236 }
    237 
    238 GLOBAL(void)
    239 jsimd_convsamp_float (JSAMPARRAY sample_data, JDIMENSION start_col,
    240                       FAST_FLOAT *workspace)
    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)
    263 jsimd_fdct_islow (DCTELEM *data)
    264 {
    265 }
    266 
    267 GLOBAL(void)
    268 jsimd_fdct_ifast (DCTELEM *data)
    269 {
    270 }
    271 
    272 GLOBAL(void)
    273 jsimd_fdct_float (FAST_FLOAT *data)
    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)
    290 jsimd_quantize (JCOEFPTR coef_block, DCTELEM *divisors,
    291                 DCTELEM *workspace)
    292 {
    293 }
    294 
    295 GLOBAL(void)
    296 jsimd_quantize_float (JCOEFPTR coef_block, FAST_FLOAT *divisors,
    297                       FAST_FLOAT *workspace)
    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 
    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 
    325 GLOBAL(void)
    326 jsimd_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info *compptr,
    327                 JCOEFPTR coef_block, JSAMPARRAY output_buf,
    328                 JDIMENSION output_col)
    329 {
    330 }
    331 
    332 GLOBAL(void)
    333 jsimd_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info *compptr,
    334                 JCOEFPTR coef_block, JSAMPARRAY output_buf,
    335                 JDIMENSION output_col)
    336 {
    337 }
    338 
    339 GLOBAL(void)
    340 jsimd_idct_6x6 (j_decompress_ptr cinfo, jpeg_component_info *compptr,
    341                 JCOEFPTR coef_block, JSAMPARRAY output_buf,
    342                 JDIMENSION output_col)
    343 {
    344 }
    345 
    346 GLOBAL(void)
    347 jsimd_idct_12x12 (j_decompress_ptr cinfo, jpeg_component_info *compptr,
    348                   JCOEFPTR coef_block, JSAMPARRAY output_buf,
    349                   JDIMENSION output_col)
    350 {
    351 }
    352 
    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)
    372 jsimd_idct_islow (j_decompress_ptr cinfo, jpeg_component_info *compptr,
    373                   JCOEFPTR coef_block, JSAMPARRAY output_buf,
    374                   JDIMENSION output_col)
    375 {
    376 }
    377 
    378 GLOBAL(void)
    379 jsimd_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info *compptr,
    380                   JCOEFPTR coef_block, JSAMPARRAY output_buf,
    381                   JDIMENSION output_col)
    382 {
    383 }
    384 
    385 GLOBAL(void)
    386 jsimd_idct_float (j_decompress_ptr cinfo, jpeg_component_info *compptr,
    387                   JCOEFPTR coef_block, JSAMPARRAY output_buf,
    388                   JDIMENSION output_col)
    389 {
    390 }
    391 
    392 GLOBAL(int)
    393 jsimd_can_huff_encode_one_block (void)
    394 {
    395   return 0;
    396 }
    397 
    398 GLOBAL(JOCTET*)
    399 jsimd_huff_encode_one_block (void *state, JOCTET *buffer, JCOEFPTR block,
    400                              int last_dc_val, c_derived_tbl *dctbl,
    401                              c_derived_tbl *actbl)
    402 {
    403   return NULL;
    404 }
    405