jsimd_none.c 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. /*
  2. * jsimd_none.c
  3. *
  4. * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
  5. * Copyright (C) 2009-2011, 2014, D. R. Commander.
  6. * Copyright (C) 2015-2016, 2018, 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. #define JPEG_INTERNALS
  15. #include "jinclude.h"
  16. #include "jpeglib.h"
  17. #include "jsimd.h"
  18. #include "jdct.h"
  19. #include "jsimddct.h"
  20. GLOBAL(int)
  21. jsimd_can_rgb_ycc(void)
  22. {
  23. return 0;
  24. }
  25. GLOBAL(int)
  26. jsimd_can_rgb_gray(void)
  27. {
  28. return 0;
  29. }
  30. GLOBAL(int)
  31. jsimd_can_ycc_rgb(void)
  32. {
  33. return 0;
  34. }
  35. GLOBAL(int)
  36. jsimd_can_ycc_rgb565(void)
  37. {
  38. return 0;
  39. }
  40. GLOBAL(int)
  41. jsimd_c_can_null_convert(void)
  42. {
  43. return 0;
  44. }
  45. GLOBAL(void)
  46. jsimd_rgb_ycc_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf,
  47. JSAMPIMAGE output_buf, JDIMENSION output_row,
  48. int num_rows)
  49. {
  50. }
  51. GLOBAL(void)
  52. jsimd_rgb_gray_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf,
  53. JSAMPIMAGE output_buf, JDIMENSION output_row,
  54. int num_rows)
  55. {
  56. }
  57. GLOBAL(void)
  58. jsimd_ycc_rgb_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
  59. JDIMENSION input_row, JSAMPARRAY output_buf,
  60. int num_rows)
  61. {
  62. }
  63. GLOBAL(void)
  64. jsimd_ycc_rgb565_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
  65. JDIMENSION input_row, JSAMPARRAY output_buf,
  66. int num_rows)
  67. {
  68. }
  69. GLOBAL(void)
  70. jsimd_c_null_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf,
  71. JSAMPIMAGE output_buf, JDIMENSION output_row,
  72. int num_rows)
  73. {
  74. }
  75. GLOBAL(int)
  76. jsimd_can_h2v2_downsample(void)
  77. {
  78. return 0;
  79. }
  80. GLOBAL(int)
  81. jsimd_can_h2v1_downsample(void)
  82. {
  83. return 0;
  84. }
  85. GLOBAL(int)
  86. jsimd_can_h2v2_smooth_downsample(void)
  87. {
  88. return 0;
  89. }
  90. GLOBAL(void)
  91. jsimd_h2v2_downsample(j_compress_ptr cinfo, jpeg_component_info *compptr,
  92. JSAMPARRAY input_data, JSAMPARRAY output_data)
  93. {
  94. }
  95. GLOBAL(void)
  96. jsimd_h2v2_smooth_downsample(j_compress_ptr cinfo,
  97. jpeg_component_info *compptr,
  98. JSAMPARRAY input_data, JSAMPARRAY output_data)
  99. {
  100. }
  101. GLOBAL(void)
  102. jsimd_h2v1_downsample(j_compress_ptr cinfo, jpeg_component_info *compptr,
  103. JSAMPARRAY input_data, JSAMPARRAY output_data)
  104. {
  105. }
  106. GLOBAL(int)
  107. jsimd_can_h2v2_upsample(void)
  108. {
  109. return 0;
  110. }
  111. GLOBAL(int)
  112. jsimd_can_h2v1_upsample(void)
  113. {
  114. return 0;
  115. }
  116. GLOBAL(int)
  117. jsimd_can_int_upsample(void)
  118. {
  119. return 0;
  120. }
  121. GLOBAL(void)
  122. jsimd_int_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr,
  123. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr)
  124. {
  125. }
  126. GLOBAL(void)
  127. jsimd_h2v2_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr,
  128. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr)
  129. {
  130. }
  131. GLOBAL(void)
  132. jsimd_h2v1_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr,
  133. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr)
  134. {
  135. }
  136. GLOBAL(int)
  137. jsimd_can_h2v2_fancy_upsample(void)
  138. {
  139. return 0;
  140. }
  141. GLOBAL(int)
  142. jsimd_can_h2v1_fancy_upsample(void)
  143. {
  144. return 0;
  145. }
  146. GLOBAL(void)
  147. jsimd_h2v2_fancy_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr,
  148. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr)
  149. {
  150. }
  151. GLOBAL(void)
  152. jsimd_h2v1_fancy_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr,
  153. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr)
  154. {
  155. }
  156. GLOBAL(int)
  157. jsimd_can_h2v2_merged_upsample(void)
  158. {
  159. return 0;
  160. }
  161. GLOBAL(int)
  162. jsimd_can_h2v1_merged_upsample(void)
  163. {
  164. return 0;
  165. }
  166. GLOBAL(void)
  167. jsimd_h2v2_merged_upsample(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
  168. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf)
  169. {
  170. }
  171. GLOBAL(void)
  172. jsimd_h2v1_merged_upsample(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
  173. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf)
  174. {
  175. }
  176. GLOBAL(int)
  177. jsimd_can_convsamp(void)
  178. {
  179. return 0;
  180. }
  181. GLOBAL(int)
  182. jsimd_can_convsamp_float(void)
  183. {
  184. return 0;
  185. }
  186. GLOBAL(void)
  187. jsimd_convsamp(JSAMPARRAY sample_data, JDIMENSION start_col,
  188. DCTELEM *workspace)
  189. {
  190. }
  191. GLOBAL(void)
  192. jsimd_convsamp_float(JSAMPARRAY sample_data, JDIMENSION start_col,
  193. FAST_FLOAT *workspace)
  194. {
  195. }
  196. GLOBAL(int)
  197. jsimd_can_fdct_islow(void)
  198. {
  199. return 0;
  200. }
  201. GLOBAL(int)
  202. jsimd_can_fdct_ifast(void)
  203. {
  204. return 0;
  205. }
  206. GLOBAL(int)
  207. jsimd_can_fdct_float(void)
  208. {
  209. return 0;
  210. }
  211. GLOBAL(void)
  212. jsimd_fdct_islow(DCTELEM *data)
  213. {
  214. }
  215. GLOBAL(void)
  216. jsimd_fdct_ifast(DCTELEM *data)
  217. {
  218. }
  219. GLOBAL(void)
  220. jsimd_fdct_float(FAST_FLOAT *data)
  221. {
  222. }
  223. GLOBAL(int)
  224. jsimd_can_quantize(void)
  225. {
  226. return 0;
  227. }
  228. GLOBAL(int)
  229. jsimd_can_quantize_float(void)
  230. {
  231. return 0;
  232. }
  233. GLOBAL(void)
  234. jsimd_quantize(JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace)
  235. {
  236. }
  237. GLOBAL(void)
  238. jsimd_quantize_float(JCOEFPTR coef_block, FAST_FLOAT *divisors,
  239. FAST_FLOAT *workspace)
  240. {
  241. }
  242. GLOBAL(int)
  243. jsimd_can_idct_2x2(void)
  244. {
  245. return 0;
  246. }
  247. GLOBAL(int)
  248. jsimd_can_idct_4x4(void)
  249. {
  250. return 0;
  251. }
  252. GLOBAL(int)
  253. jsimd_can_idct_6x6(void)
  254. {
  255. return 0;
  256. }
  257. GLOBAL(int)
  258. jsimd_can_idct_12x12(void)
  259. {
  260. return 0;
  261. }
  262. GLOBAL(void)
  263. jsimd_idct_2x2(j_decompress_ptr cinfo, jpeg_component_info *compptr,
  264. JCOEFPTR coef_block, JSAMPARRAY output_buf,
  265. JDIMENSION output_col)
  266. {
  267. }
  268. GLOBAL(void)
  269. jsimd_idct_4x4(j_decompress_ptr cinfo, jpeg_component_info *compptr,
  270. JCOEFPTR coef_block, JSAMPARRAY output_buf,
  271. JDIMENSION output_col)
  272. {
  273. }
  274. GLOBAL(void)
  275. jsimd_idct_6x6(j_decompress_ptr cinfo, jpeg_component_info *compptr,
  276. JCOEFPTR coef_block, JSAMPARRAY output_buf,
  277. JDIMENSION output_col)
  278. {
  279. }
  280. GLOBAL(void)
  281. jsimd_idct_12x12(j_decompress_ptr cinfo, jpeg_component_info *compptr,
  282. JCOEFPTR coef_block, JSAMPARRAY output_buf,
  283. JDIMENSION output_col)
  284. {
  285. }
  286. GLOBAL(int)
  287. jsimd_can_idct_islow(void)
  288. {
  289. return 0;
  290. }
  291. GLOBAL(int)
  292. jsimd_can_idct_ifast(void)
  293. {
  294. return 0;
  295. }
  296. GLOBAL(int)
  297. jsimd_can_idct_float(void)
  298. {
  299. return 0;
  300. }
  301. GLOBAL(void)
  302. jsimd_idct_islow(j_decompress_ptr cinfo, jpeg_component_info *compptr,
  303. JCOEFPTR coef_block, JSAMPARRAY output_buf,
  304. JDIMENSION output_col)
  305. {
  306. }
  307. GLOBAL(void)
  308. jsimd_idct_ifast(j_decompress_ptr cinfo, jpeg_component_info *compptr,
  309. JCOEFPTR coef_block, JSAMPARRAY output_buf,
  310. JDIMENSION output_col)
  311. {
  312. }
  313. GLOBAL(void)
  314. jsimd_idct_float(j_decompress_ptr cinfo, jpeg_component_info *compptr,
  315. JCOEFPTR coef_block, JSAMPARRAY output_buf,
  316. JDIMENSION output_col)
  317. {
  318. }
  319. GLOBAL(int)
  320. jsimd_can_huff_encode_one_block(void)
  321. {
  322. return 0;
  323. }
  324. GLOBAL(JOCTET *)
  325. jsimd_huff_encode_one_block(void *state, JOCTET *buffer, JCOEFPTR block,
  326. int last_dc_val, c_derived_tbl *dctbl,
  327. c_derived_tbl *actbl)
  328. {
  329. return NULL;
  330. }
  331. GLOBAL(int)
  332. jsimd_can_encode_mcu_AC_first_prepare(void)
  333. {
  334. return 0;
  335. }
  336. GLOBAL(void)
  337. jsimd_encode_mcu_AC_first_prepare(const JCOEF *block,
  338. const int *jpeg_natural_order_start, int Sl,
  339. int Al, JCOEF *values, size_t *zerobits)
  340. {
  341. }
  342. GLOBAL(int)
  343. jsimd_can_encode_mcu_AC_refine_prepare(void)
  344. {
  345. return 0;
  346. }
  347. GLOBAL(int)
  348. jsimd_encode_mcu_AC_refine_prepare(const JCOEF *block,
  349. const int *jpeg_natural_order_start, int Sl,
  350. int Al, JCOEF *absvalues, size_t *bits)
  351. {
  352. return 0;
  353. }