jsimd.h 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872
  1. /*
  2. * simd/jsimd.h
  3. *
  4. * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
  5. * Copyright (C) 2011, 2014-2016, D. R. Commander.
  6. * Copyright (C) 2013-2014, MIPS Technologies, Inc., California.
  7. * Copyright (C) 2014, Linaro Limited.
  8. * Copyright (C) 2015-2016, Matthieu Darbois.
  9. *
  10. * Based on the x86 SIMD extension for IJG JPEG library,
  11. * Copyright (C) 1999-2006, MIYASAKA Masaru.
  12. * For conditions of distribution and use, see copyright notice in jsimdext.inc
  13. *
  14. */
  15. /* Bitmask for supported acceleration methods */
  16. #define JSIMD_NONE 0x00
  17. #define JSIMD_MMX 0x01
  18. #define JSIMD_3DNOW 0x02
  19. #define JSIMD_SSE 0x04
  20. #define JSIMD_SSE2 0x08
  21. #define JSIMD_ARM_NEON 0x10
  22. #define JSIMD_MIPS_DSPR2 0x20
  23. #define JSIMD_ALTIVEC 0x40
  24. /* SIMD Ext: retrieve SIMD/CPU information */
  25. EXTERN(unsigned int) jpeg_simd_cpu_support (void);
  26. /* RGB & extended RGB --> YCC Colorspace Conversion */
  27. EXTERN(void) jsimd_rgb_ycc_convert_mmx
  28. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  29. JDIMENSION output_row, int num_rows);
  30. EXTERN(void) jsimd_extrgb_ycc_convert_mmx
  31. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  32. JDIMENSION output_row, int num_rows);
  33. EXTERN(void) jsimd_extrgbx_ycc_convert_mmx
  34. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  35. JDIMENSION output_row, int num_rows);
  36. EXTERN(void) jsimd_extbgr_ycc_convert_mmx
  37. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  38. JDIMENSION output_row, int num_rows);
  39. EXTERN(void) jsimd_extbgrx_ycc_convert_mmx
  40. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  41. JDIMENSION output_row, int num_rows);
  42. EXTERN(void) jsimd_extxbgr_ycc_convert_mmx
  43. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  44. JDIMENSION output_row, int num_rows);
  45. EXTERN(void) jsimd_extxrgb_ycc_convert_mmx
  46. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  47. JDIMENSION output_row, int num_rows);
  48. extern const int jconst_rgb_ycc_convert_sse2[];
  49. EXTERN(void) jsimd_rgb_ycc_convert_sse2
  50. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  51. JDIMENSION output_row, int num_rows);
  52. EXTERN(void) jsimd_extrgb_ycc_convert_sse2
  53. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  54. JDIMENSION output_row, int num_rows);
  55. EXTERN(void) jsimd_extrgbx_ycc_convert_sse2
  56. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  57. JDIMENSION output_row, int num_rows);
  58. EXTERN(void) jsimd_extbgr_ycc_convert_sse2
  59. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  60. JDIMENSION output_row, int num_rows);
  61. EXTERN(void) jsimd_extbgrx_ycc_convert_sse2
  62. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  63. JDIMENSION output_row, int num_rows);
  64. EXTERN(void) jsimd_extxbgr_ycc_convert_sse2
  65. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  66. JDIMENSION output_row, int num_rows);
  67. EXTERN(void) jsimd_extxrgb_ycc_convert_sse2
  68. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  69. JDIMENSION output_row, int num_rows);
  70. EXTERN(void) jsimd_rgb_ycc_convert_neon
  71. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  72. JDIMENSION output_row, int num_rows);
  73. EXTERN(void) jsimd_extrgb_ycc_convert_neon
  74. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  75. JDIMENSION output_row, int num_rows);
  76. EXTERN(void) jsimd_extrgbx_ycc_convert_neon
  77. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  78. JDIMENSION output_row, int num_rows);
  79. EXTERN(void) jsimd_extbgr_ycc_convert_neon
  80. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  81. JDIMENSION output_row, int num_rows);
  82. EXTERN(void) jsimd_extbgrx_ycc_convert_neon
  83. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  84. JDIMENSION output_row, int num_rows);
  85. EXTERN(void) jsimd_extxbgr_ycc_convert_neon
  86. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  87. JDIMENSION output_row, int num_rows);
  88. EXTERN(void) jsimd_extxrgb_ycc_convert_neon
  89. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  90. JDIMENSION output_row, int num_rows);
  91. EXTERN(void) jsimd_extrgb_ycc_convert_neon_slowld3
  92. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  93. JDIMENSION output_row, int num_rows);
  94. EXTERN(void) jsimd_extbgr_ycc_convert_neon_slowld3
  95. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  96. JDIMENSION output_row, int num_rows);
  97. EXTERN(void) jsimd_rgb_ycc_convert_mips_dspr2
  98. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  99. JDIMENSION output_row, int num_rows);
  100. EXTERN(void) jsimd_extrgb_ycc_convert_mips_dspr2
  101. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  102. JDIMENSION output_row, int num_rows);
  103. EXTERN(void) jsimd_extrgbx_ycc_convert_mips_dspr2
  104. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  105. JDIMENSION output_row, int num_rows);
  106. EXTERN(void) jsimd_extbgr_ycc_convert_mips_dspr2
  107. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  108. JDIMENSION output_row, int num_rows);
  109. EXTERN(void) jsimd_extbgrx_ycc_convert_mips_dspr2
  110. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  111. JDIMENSION output_row, int num_rows);
  112. EXTERN(void) jsimd_extxbgr_ycc_convert_mips_dspr2
  113. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  114. JDIMENSION output_row, int num_rows);
  115. EXTERN(void) jsimd_extxrgb_ycc_convert_mips_dspr2
  116. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  117. JDIMENSION output_row, int num_rows);
  118. EXTERN(void) jsimd_rgb_ycc_convert_altivec
  119. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  120. JDIMENSION output_row, int num_rows);
  121. EXTERN(void) jsimd_extrgb_ycc_convert_altivec
  122. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  123. JDIMENSION output_row, int num_rows);
  124. EXTERN(void) jsimd_extrgbx_ycc_convert_altivec
  125. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  126. JDIMENSION output_row, int num_rows);
  127. EXTERN(void) jsimd_extbgr_ycc_convert_altivec
  128. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  129. JDIMENSION output_row, int num_rows);
  130. EXTERN(void) jsimd_extbgrx_ycc_convert_altivec
  131. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  132. JDIMENSION output_row, int num_rows);
  133. EXTERN(void) jsimd_extxbgr_ycc_convert_altivec
  134. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  135. JDIMENSION output_row, int num_rows);
  136. EXTERN(void) jsimd_extxrgb_ycc_convert_altivec
  137. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  138. JDIMENSION output_row, int num_rows);
  139. /* RGB & extended RGB --> Grayscale Colorspace Conversion */
  140. EXTERN(void) jsimd_rgb_gray_convert_mmx
  141. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  142. JDIMENSION output_row, int num_rows);
  143. EXTERN(void) jsimd_extrgb_gray_convert_mmx
  144. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  145. JDIMENSION output_row, int num_rows);
  146. EXTERN(void) jsimd_extrgbx_gray_convert_mmx
  147. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  148. JDIMENSION output_row, int num_rows);
  149. EXTERN(void) jsimd_extbgr_gray_convert_mmx
  150. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  151. JDIMENSION output_row, int num_rows);
  152. EXTERN(void) jsimd_extbgrx_gray_convert_mmx
  153. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  154. JDIMENSION output_row, int num_rows);
  155. EXTERN(void) jsimd_extxbgr_gray_convert_mmx
  156. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  157. JDIMENSION output_row, int num_rows);
  158. EXTERN(void) jsimd_extxrgb_gray_convert_mmx
  159. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  160. JDIMENSION output_row, int num_rows);
  161. extern const int jconst_rgb_gray_convert_sse2[];
  162. EXTERN(void) jsimd_rgb_gray_convert_sse2
  163. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  164. JDIMENSION output_row, int num_rows);
  165. EXTERN(void) jsimd_extrgb_gray_convert_sse2
  166. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  167. JDIMENSION output_row, int num_rows);
  168. EXTERN(void) jsimd_extrgbx_gray_convert_sse2
  169. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  170. JDIMENSION output_row, int num_rows);
  171. EXTERN(void) jsimd_extbgr_gray_convert_sse2
  172. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  173. JDIMENSION output_row, int num_rows);
  174. EXTERN(void) jsimd_extbgrx_gray_convert_sse2
  175. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  176. JDIMENSION output_row, int num_rows);
  177. EXTERN(void) jsimd_extxbgr_gray_convert_sse2
  178. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  179. JDIMENSION output_row, int num_rows);
  180. EXTERN(void) jsimd_extxrgb_gray_convert_sse2
  181. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  182. JDIMENSION output_row, int num_rows);
  183. EXTERN(void) jsimd_rgb_gray_convert_mips_dspr2
  184. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  185. JDIMENSION output_row, int num_rows);
  186. EXTERN(void) jsimd_extrgb_gray_convert_mips_dspr2
  187. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  188. JDIMENSION output_row, int num_rows);
  189. EXTERN(void) jsimd_extrgbx_gray_convert_mips_dspr2
  190. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  191. JDIMENSION output_row, int num_rows);
  192. EXTERN(void) jsimd_extbgr_gray_convert_mips_dspr2
  193. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  194. JDIMENSION output_row, int num_rows);
  195. EXTERN(void) jsimd_extbgrx_gray_convert_mips_dspr2
  196. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  197. JDIMENSION output_row, int num_rows);
  198. EXTERN(void) jsimd_extxbgr_gray_convert_mips_dspr2
  199. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  200. JDIMENSION output_row, int num_rows);
  201. EXTERN(void) jsimd_extxrgb_gray_convert_mips_dspr2
  202. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  203. JDIMENSION output_row, int num_rows);
  204. EXTERN(void) jsimd_rgb_gray_convert_altivec
  205. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  206. JDIMENSION output_row, int num_rows);
  207. EXTERN(void) jsimd_extrgb_gray_convert_altivec
  208. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  209. JDIMENSION output_row, int num_rows);
  210. EXTERN(void) jsimd_extrgbx_gray_convert_altivec
  211. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  212. JDIMENSION output_row, int num_rows);
  213. EXTERN(void) jsimd_extbgr_gray_convert_altivec
  214. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  215. JDIMENSION output_row, int num_rows);
  216. EXTERN(void) jsimd_extbgrx_gray_convert_altivec
  217. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  218. JDIMENSION output_row, int num_rows);
  219. EXTERN(void) jsimd_extxbgr_gray_convert_altivec
  220. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  221. JDIMENSION output_row, int num_rows);
  222. EXTERN(void) jsimd_extxrgb_gray_convert_altivec
  223. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  224. JDIMENSION output_row, int num_rows);
  225. /* YCC --> RGB & extended RGB Colorspace Conversion */
  226. EXTERN(void) jsimd_ycc_rgb_convert_mmx
  227. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  228. JSAMPARRAY output_buf, int num_rows);
  229. EXTERN(void) jsimd_ycc_extrgb_convert_mmx
  230. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  231. JSAMPARRAY output_buf, int num_rows);
  232. EXTERN(void) jsimd_ycc_extrgbx_convert_mmx
  233. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  234. JSAMPARRAY output_buf, int num_rows);
  235. EXTERN(void) jsimd_ycc_extbgr_convert_mmx
  236. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  237. JSAMPARRAY output_buf, int num_rows);
  238. EXTERN(void) jsimd_ycc_extbgrx_convert_mmx
  239. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  240. JSAMPARRAY output_buf, int num_rows);
  241. EXTERN(void) jsimd_ycc_extxbgr_convert_mmx
  242. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  243. JSAMPARRAY output_buf, int num_rows);
  244. EXTERN(void) jsimd_ycc_extxrgb_convert_mmx
  245. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  246. JSAMPARRAY output_buf, int num_rows);
  247. extern const int jconst_ycc_rgb_convert_sse2[];
  248. EXTERN(void) jsimd_ycc_rgb_convert_sse2
  249. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  250. JSAMPARRAY output_buf, int num_rows);
  251. EXTERN(void) jsimd_ycc_extrgb_convert_sse2
  252. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  253. JSAMPARRAY output_buf, int num_rows);
  254. EXTERN(void) jsimd_ycc_extrgbx_convert_sse2
  255. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  256. JSAMPARRAY output_buf, int num_rows);
  257. EXTERN(void) jsimd_ycc_extbgr_convert_sse2
  258. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  259. JSAMPARRAY output_buf, int num_rows);
  260. EXTERN(void) jsimd_ycc_extbgrx_convert_sse2
  261. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  262. JSAMPARRAY output_buf, int num_rows);
  263. EXTERN(void) jsimd_ycc_extxbgr_convert_sse2
  264. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  265. JSAMPARRAY output_buf, int num_rows);
  266. EXTERN(void) jsimd_ycc_extxrgb_convert_sse2
  267. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  268. JSAMPARRAY output_buf, int num_rows);
  269. EXTERN(void) jsimd_ycc_rgb_convert_neon
  270. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  271. JSAMPARRAY output_buf, int num_rows);
  272. EXTERN(void) jsimd_ycc_extrgb_convert_neon
  273. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  274. JSAMPARRAY output_buf, int num_rows);
  275. EXTERN(void) jsimd_ycc_extrgbx_convert_neon
  276. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  277. JSAMPARRAY output_buf, int num_rows);
  278. EXTERN(void) jsimd_ycc_extbgr_convert_neon
  279. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  280. JSAMPARRAY output_buf, int num_rows);
  281. EXTERN(void) jsimd_ycc_extbgrx_convert_neon
  282. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  283. JSAMPARRAY output_buf, int num_rows);
  284. EXTERN(void) jsimd_ycc_extxbgr_convert_neon
  285. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  286. JSAMPARRAY output_buf, int num_rows);
  287. EXTERN(void) jsimd_ycc_extxrgb_convert_neon
  288. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  289. JSAMPARRAY output_buf, int num_rows);
  290. EXTERN(void) jsimd_ycc_rgb565_convert_neon
  291. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  292. JSAMPARRAY output_buf, int num_rows);
  293. EXTERN(void) jsimd_ycc_extrgb_convert_neon_slowst3
  294. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  295. JSAMPARRAY output_buf, int num_rows);
  296. EXTERN(void) jsimd_ycc_extbgr_convert_neon_slowst3
  297. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  298. JSAMPARRAY output_buf, int num_rows);
  299. EXTERN(void) jsimd_ycc_rgb_convert_mips_dspr2
  300. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  301. JSAMPARRAY output_buf, int num_rows);
  302. EXTERN(void) jsimd_ycc_extrgb_convert_mips_dspr2
  303. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  304. JSAMPARRAY output_buf, int num_rows);
  305. EXTERN(void) jsimd_ycc_extrgbx_convert_mips_dspr2
  306. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  307. JSAMPARRAY output_buf, int num_rows);
  308. EXTERN(void) jsimd_ycc_extbgr_convert_mips_dspr2
  309. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  310. JSAMPARRAY output_buf, int num_rows);
  311. EXTERN(void) jsimd_ycc_extbgrx_convert_mips_dspr2
  312. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  313. JSAMPARRAY output_buf, int num_rows);
  314. EXTERN(void) jsimd_ycc_extxbgr_convert_mips_dspr2
  315. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  316. JSAMPARRAY output_buf, int num_rows);
  317. EXTERN(void) jsimd_ycc_extxrgb_convert_mips_dspr2
  318. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  319. JSAMPARRAY output_buf, int num_rows);
  320. EXTERN(void) jsimd_ycc_rgb_convert_altivec
  321. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  322. JSAMPARRAY output_buf, int num_rows);
  323. EXTERN(void) jsimd_ycc_extrgb_convert_altivec
  324. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  325. JSAMPARRAY output_buf, int num_rows);
  326. EXTERN(void) jsimd_ycc_extrgbx_convert_altivec
  327. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  328. JSAMPARRAY output_buf, int num_rows);
  329. EXTERN(void) jsimd_ycc_extbgr_convert_altivec
  330. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  331. JSAMPARRAY output_buf, int num_rows);
  332. EXTERN(void) jsimd_ycc_extbgrx_convert_altivec
  333. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  334. JSAMPARRAY output_buf, int num_rows);
  335. EXTERN(void) jsimd_ycc_extxbgr_convert_altivec
  336. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  337. JSAMPARRAY output_buf, int num_rows);
  338. EXTERN(void) jsimd_ycc_extxrgb_convert_altivec
  339. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  340. JSAMPARRAY output_buf, int num_rows);
  341. /* NULL Colorspace Conversion */
  342. EXTERN(void) jsimd_c_null_convert_mips_dspr2
  343. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  344. JDIMENSION output_row, int num_rows, int num_components);
  345. /* h2v1 Downsampling */
  346. EXTERN(void) jsimd_h2v1_downsample_mmx
  347. (JDIMENSION image_width, int max_v_samp_factor,
  348. JDIMENSION v_samp_factor, JDIMENSION width_blocks,
  349. JSAMPARRAY input_data, JSAMPARRAY output_data);
  350. EXTERN(void) jsimd_h2v1_downsample_sse2
  351. (JDIMENSION image_width, int max_v_samp_factor,
  352. JDIMENSION v_samp_factor, JDIMENSION width_blocks,
  353. JSAMPARRAY input_data, JSAMPARRAY output_data);
  354. EXTERN(void) jsimd_h2v1_downsample_neon
  355. (JDIMENSION image_width, int max_v_samp_factor,
  356. JDIMENSION v_samp_factor, JDIMENSION width_blocks,
  357. JSAMPARRAY input_data, JSAMPARRAY output_data);
  358. EXTERN(void) jsimd_h2v1_downsample_mips_dspr2
  359. (JDIMENSION image_width, int max_v_samp_factor,
  360. JDIMENSION v_samp_factor, JDIMENSION width_blocks,
  361. JSAMPARRAY input_data, JSAMPARRAY output_data);
  362. EXTERN(void) jsimd_h2v1_downsample_altivec
  363. (JDIMENSION image_width, int max_v_samp_factor,
  364. JDIMENSION v_samp_factor, JDIMENSION width_blocks,
  365. JSAMPARRAY input_data, JSAMPARRAY output_data);
  366. /* h2v2 Downsampling */
  367. EXTERN(void) jsimd_h2v2_downsample_mmx
  368. (JDIMENSION image_width, int max_v_samp_factor,
  369. JDIMENSION v_samp_factor, JDIMENSION width_blocks,
  370. JSAMPARRAY input_data, JSAMPARRAY output_data);
  371. EXTERN(void) jsimd_h2v2_downsample_sse2
  372. (JDIMENSION image_width, int max_v_samp_factor,
  373. JDIMENSION v_samp_factor, JDIMENSION width_blocks,
  374. JSAMPARRAY input_data, JSAMPARRAY output_data);
  375. EXTERN(void) jsimd_h2v2_downsample_neon
  376. (JDIMENSION image_width, int max_v_samp_factor,
  377. JDIMENSION v_samp_factor, JDIMENSION width_blocks,
  378. JSAMPARRAY input_data, JSAMPARRAY output_data);
  379. EXTERN(void) jsimd_h2v2_downsample_mips_dspr2
  380. (JDIMENSION image_width, int max_v_samp_factor,
  381. JDIMENSION v_samp_factor, JDIMENSION width_blocks,
  382. JSAMPARRAY input_data, JSAMPARRAY output_data);
  383. EXTERN(void) jsimd_h2v2_downsample_altivec
  384. (JDIMENSION image_width, int max_v_samp_factor,
  385. JDIMENSION v_samp_factor, JDIMENSION width_blocks,
  386. JSAMPARRAY input_data, JSAMPARRAY output_data);
  387. /* h2v2 Smooth Downsampling */
  388. EXTERN(void) jsimd_h2v2_smooth_downsample_mips_dspr2
  389. (JSAMPARRAY input_data, JSAMPARRAY output_data,
  390. JDIMENSION v_samp_factor, int max_v_samp_factor,
  391. int smoothing_factor, JDIMENSION width_blocks,
  392. JDIMENSION image_width);
  393. /* Upsampling */
  394. EXTERN(void) jsimd_h2v1_upsample_mmx
  395. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  396. JSAMPARRAY *output_data_ptr);
  397. EXTERN(void) jsimd_h2v2_upsample_mmx
  398. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  399. JSAMPARRAY *output_data_ptr);
  400. EXTERN(void) jsimd_h2v1_upsample_sse2
  401. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  402. JSAMPARRAY *output_data_ptr);
  403. EXTERN(void) jsimd_h2v2_upsample_sse2
  404. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  405. JSAMPARRAY *output_data_ptr);
  406. EXTERN(void) jsimd_h2v1_upsample_mips_dspr2
  407. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  408. JSAMPARRAY *output_data_ptr);
  409. EXTERN(void) jsimd_h2v2_upsample_mips_dspr2
  410. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  411. JSAMPARRAY *output_data_ptr);
  412. EXTERN(void) jsimd_int_upsample_mips_dspr2
  413. (UINT8 h_expand, UINT8 v_expand, JSAMPARRAY input_data,
  414. JSAMPARRAY *output_data_ptr, JDIMENSION output_width,
  415. int max_v_samp_factor);
  416. EXTERN(void) jsimd_h2v1_upsample_altivec
  417. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  418. JSAMPARRAY *output_data_ptr);
  419. EXTERN(void) jsimd_h2v2_upsample_altivec
  420. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  421. JSAMPARRAY *output_data_ptr);
  422. /* Fancy Upsampling */
  423. EXTERN(void) jsimd_h2v1_fancy_upsample_mmx
  424. (int max_v_samp_factor, JDIMENSION downsampled_width,
  425. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
  426. EXTERN(void) jsimd_h2v2_fancy_upsample_mmx
  427. (int max_v_samp_factor, JDIMENSION downsampled_width,
  428. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
  429. extern const int jconst_fancy_upsample_sse2[];
  430. EXTERN(void) jsimd_h2v1_fancy_upsample_sse2
  431. (int max_v_samp_factor, JDIMENSION downsampled_width,
  432. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
  433. EXTERN(void) jsimd_h2v2_fancy_upsample_sse2
  434. (int max_v_samp_factor, JDIMENSION downsampled_width,
  435. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
  436. EXTERN(void) jsimd_h2v1_fancy_upsample_neon
  437. (int max_v_samp_factor, JDIMENSION downsampled_width,
  438. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
  439. EXTERN(void) jsimd_h2v1_fancy_upsample_mips_dspr2
  440. (int max_v_samp_factor, JDIMENSION downsampled_width,
  441. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
  442. EXTERN(void) jsimd_h2v2_fancy_upsample_mips_dspr2
  443. (int max_v_samp_factor, JDIMENSION downsampled_width,
  444. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
  445. EXTERN(void) jsimd_h2v1_fancy_upsample_altivec
  446. (int max_v_samp_factor, JDIMENSION downsampled_width,
  447. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
  448. EXTERN(void) jsimd_h2v2_fancy_upsample_altivec
  449. (int max_v_samp_factor, JDIMENSION downsampled_width,
  450. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
  451. /* Merged Upsampling */
  452. EXTERN(void) jsimd_h2v1_merged_upsample_mmx
  453. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  454. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  455. EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_mmx
  456. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  457. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  458. EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_mmx
  459. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  460. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  461. EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_mmx
  462. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  463. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  464. EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_mmx
  465. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  466. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  467. EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_mmx
  468. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  469. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  470. EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_mmx
  471. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  472. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  473. EXTERN(void) jsimd_h2v2_merged_upsample_mmx
  474. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  475. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  476. EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_mmx
  477. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  478. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  479. EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_mmx
  480. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  481. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  482. EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_mmx
  483. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  484. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  485. EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_mmx
  486. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  487. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  488. EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_mmx
  489. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  490. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  491. EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_mmx
  492. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  493. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  494. extern const int jconst_merged_upsample_sse2[];
  495. EXTERN(void) jsimd_h2v1_merged_upsample_sse2
  496. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  497. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  498. EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_sse2
  499. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  500. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  501. EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_sse2
  502. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  503. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  504. EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_sse2
  505. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  506. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  507. EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_sse2
  508. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  509. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  510. EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_sse2
  511. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  512. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  513. EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_sse2
  514. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  515. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  516. EXTERN(void) jsimd_h2v2_merged_upsample_sse2
  517. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  518. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  519. EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_sse2
  520. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  521. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  522. EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_sse2
  523. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  524. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  525. EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_sse2
  526. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  527. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  528. EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_sse2
  529. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  530. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  531. EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_sse2
  532. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  533. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  534. EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_sse2
  535. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  536. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  537. EXTERN(void) jsimd_h2v1_merged_upsample_mips_dspr2
  538. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  539. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
  540. EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_mips_dspr2
  541. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  542. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
  543. EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_mips_dspr2
  544. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  545. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
  546. EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_mips_dspr2
  547. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  548. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
  549. EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_mips_dspr2
  550. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  551. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
  552. EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_mips_dspr2
  553. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  554. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
  555. EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_mips_dspr2
  556. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  557. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
  558. EXTERN(void) jsimd_h2v2_merged_upsample_mips_dspr2
  559. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  560. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
  561. EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_mips_dspr2
  562. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  563. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
  564. EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_mips_dspr2
  565. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  566. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
  567. EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_mips_dspr2
  568. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  569. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
  570. EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_mips_dspr2
  571. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  572. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
  573. EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_mips_dspr2
  574. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  575. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
  576. EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_mips_dspr2
  577. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  578. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
  579. EXTERN(void) jsimd_h2v1_merged_upsample_altivec
  580. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  581. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  582. EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_altivec
  583. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  584. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  585. EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_altivec
  586. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  587. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  588. EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_altivec
  589. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  590. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  591. EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_altivec
  592. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  593. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  594. EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_altivec
  595. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  596. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  597. EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_altivec
  598. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  599. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  600. EXTERN(void) jsimd_h2v2_merged_upsample_altivec
  601. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  602. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  603. EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_altivec
  604. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  605. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  606. EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_altivec
  607. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  608. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  609. EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_altivec
  610. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  611. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  612. EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_altivec
  613. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  614. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  615. EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_altivec
  616. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  617. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  618. EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_altivec
  619. (JDIMENSION output_width, JSAMPIMAGE input_buf,
  620. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  621. /* Sample Conversion */
  622. EXTERN(void) jsimd_convsamp_mmx
  623. (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
  624. EXTERN(void) jsimd_convsamp_sse2
  625. (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
  626. EXTERN(void) jsimd_convsamp_neon
  627. (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
  628. EXTERN(void) jsimd_convsamp_mips_dspr2
  629. (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
  630. EXTERN(void) jsimd_convsamp_altivec
  631. (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
  632. /* Floating Point Sample Conversion */
  633. EXTERN(void) jsimd_convsamp_float_3dnow
  634. (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace);
  635. EXTERN(void) jsimd_convsamp_float_sse
  636. (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace);
  637. EXTERN(void) jsimd_convsamp_float_sse2
  638. (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace);
  639. EXTERN(void) jsimd_convsamp_float_mips_dspr2
  640. (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace);
  641. /* Slow Integer Forward DCT */
  642. EXTERN(void) jsimd_fdct_islow_mmx (DCTELEM *data);
  643. extern const int jconst_fdct_islow_sse2[];
  644. EXTERN(void) jsimd_fdct_islow_sse2 (DCTELEM *data);
  645. EXTERN(void) jsimd_fdct_islow_neon (DCTELEM *data);
  646. EXTERN(void) jsimd_fdct_islow_mips_dspr2 (DCTELEM *data);
  647. EXTERN(void) jsimd_fdct_islow_altivec (DCTELEM *data);
  648. /* Fast Integer Forward DCT */
  649. EXTERN(void) jsimd_fdct_ifast_mmx (DCTELEM *data);
  650. extern const int jconst_fdct_ifast_sse2[];
  651. EXTERN(void) jsimd_fdct_ifast_sse2 (DCTELEM *data);
  652. EXTERN(void) jsimd_fdct_ifast_neon (DCTELEM *data);
  653. EXTERN(void) jsimd_fdct_ifast_mips_dspr2 (DCTELEM *data);
  654. EXTERN(void) jsimd_fdct_ifast_altivec (DCTELEM *data);
  655. /* Floating Point Forward DCT */
  656. EXTERN(void) jsimd_fdct_float_3dnow (FAST_FLOAT *data);
  657. extern const int jconst_fdct_float_sse[];
  658. EXTERN(void) jsimd_fdct_float_sse (FAST_FLOAT *data);
  659. /* Quantization */
  660. EXTERN(void) jsimd_quantize_mmx
  661. (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
  662. EXTERN(void) jsimd_quantize_sse2
  663. (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
  664. EXTERN(void) jsimd_quantize_neon
  665. (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
  666. EXTERN(void) jsimd_quantize_mips_dspr2
  667. (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
  668. EXTERN(void) jsimd_quantize_altivec
  669. (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
  670. /* Floating Point Quantization */
  671. EXTERN(void) jsimd_quantize_float_3dnow
  672. (JCOEFPTR coef_block, FAST_FLOAT *divisors, FAST_FLOAT *workspace);
  673. EXTERN(void) jsimd_quantize_float_sse
  674. (JCOEFPTR coef_block, FAST_FLOAT *divisors, FAST_FLOAT *workspace);
  675. EXTERN(void) jsimd_quantize_float_sse2
  676. (JCOEFPTR coef_block, FAST_FLOAT *divisors, FAST_FLOAT *workspace);
  677. EXTERN(void) jsimd_quantize_float_mips_dspr2
  678. (JCOEFPTR coef_block, FAST_FLOAT *divisors, FAST_FLOAT *workspace);
  679. /* Scaled Inverse DCT */
  680. EXTERN(void) jsimd_idct_2x2_mmx
  681. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  682. JDIMENSION output_col);
  683. EXTERN(void) jsimd_idct_4x4_mmx
  684. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  685. JDIMENSION output_col);
  686. extern const int jconst_idct_red_sse2[];
  687. EXTERN(void) jsimd_idct_2x2_sse2
  688. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  689. JDIMENSION output_col);
  690. EXTERN(void) jsimd_idct_4x4_sse2
  691. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  692. JDIMENSION output_col);
  693. EXTERN(void) jsimd_idct_2x2_neon
  694. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  695. JDIMENSION output_col);
  696. EXTERN(void) jsimd_idct_4x4_neon
  697. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  698. JDIMENSION output_col);
  699. EXTERN(void) jsimd_idct_2x2_mips_dspr2
  700. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  701. JDIMENSION output_col);
  702. EXTERN(void) jsimd_idct_4x4_mips_dspr2
  703. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  704. JDIMENSION output_col, int *workspace);
  705. EXTERN(void) jsimd_idct_6x6_mips_dspr2
  706. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  707. JDIMENSION output_col);
  708. EXTERN(void) jsimd_idct_12x12_pass1_mips_dspr2
  709. (JCOEFPTR coef_block, void *dct_table, int *workspace);
  710. EXTERN(void) jsimd_idct_12x12_pass2_mips_dspr2
  711. (int *workspace, int *output);
  712. /* Slow Integer Inverse DCT */
  713. EXTERN(void) jsimd_idct_islow_mmx
  714. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  715. JDIMENSION output_col);
  716. extern const int jconst_idct_islow_sse2[];
  717. EXTERN(void) jsimd_idct_islow_sse2
  718. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  719. JDIMENSION output_col);
  720. EXTERN(void) jsimd_idct_islow_neon
  721. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  722. JDIMENSION output_col);
  723. EXTERN(void) jsimd_idct_islow_mips_dspr2
  724. (void *dct_table, JCOEFPTR coef_block, int *output_buf,
  725. JSAMPLE *output_col);
  726. EXTERN(void) jsimd_idct_islow_altivec
  727. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  728. JDIMENSION output_col);
  729. /* Fast Integer Inverse DCT */
  730. EXTERN(void) jsimd_idct_ifast_mmx
  731. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  732. JDIMENSION output_col);
  733. extern const int jconst_idct_ifast_sse2[];
  734. EXTERN(void) jsimd_idct_ifast_sse2
  735. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  736. JDIMENSION output_col);
  737. EXTERN(void) jsimd_idct_ifast_neon
  738. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  739. JDIMENSION output_col);
  740. EXTERN(void) jsimd_idct_ifast_cols_mips_dspr2
  741. (JCOEF *inptr, IFAST_MULT_TYPE *quantptr, DCTELEM *wsptr,
  742. const int *idct_coefs);
  743. EXTERN(void) jsimd_idct_ifast_rows_mips_dspr2
  744. (DCTELEM *wsptr, JSAMPARRAY output_buf, JDIMENSION output_col,
  745. const int *idct_coefs);
  746. EXTERN(void) jsimd_idct_ifast_altivec
  747. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  748. JDIMENSION output_col);
  749. /* Floating Point Inverse DCT */
  750. EXTERN(void) jsimd_idct_float_3dnow
  751. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  752. JDIMENSION output_col);
  753. extern const int jconst_idct_float_sse[];
  754. EXTERN(void) jsimd_idct_float_sse
  755. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  756. JDIMENSION output_col);
  757. extern const int jconst_idct_float_sse2[];
  758. EXTERN(void) jsimd_idct_float_sse2
  759. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  760. JDIMENSION output_col);
  761. /* Huffman coding */
  762. extern const int jconst_huff_encode_one_block[];
  763. EXTERN(JOCTET*) jsimd_huff_encode_one_block_sse2
  764. (void *state, JOCTET *buffer, JCOEFPTR block, int last_dc_val,
  765. c_derived_tbl *dctbl, c_derived_tbl *actbl);
  766. EXTERN(JOCTET*) jsimd_huff_encode_one_block_neon
  767. (void *state, JOCTET *buffer, JCOEFPTR block, int last_dc_val,
  768. c_derived_tbl *dctbl, c_derived_tbl *actbl);
  769. EXTERN(JOCTET*) jsimd_huff_encode_one_block_neon_slowtbl
  770. (void *state, JOCTET *buffer, JCOEFPTR block, int last_dc_val,
  771. c_derived_tbl *dctbl, c_derived_tbl *actbl);