jsimd_none.c 7.8 KB

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