jsimd.h 56 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258
  1. /*
  2. * simd/jsimd.h
  3. *
  4. * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
  5. * Copyright (C) 2011, 2014-2016, 2018, 2020, D. R. Commander.
  6. * Copyright (C) 2013-2014, MIPS Technologies, Inc., California.
  7. * Copyright (C) 2014, Linaro Limited.
  8. * Copyright (C) 2015-2016, 2018, Matthieu Darbois.
  9. * Copyright (C) 2016-2018, Loongson Technology Corporation Limited, BeiJing.
  10. * Copyright (C) 2020, Arm Limited.
  11. *
  12. * Based on the x86 SIMD extension for IJG JPEG library,
  13. * Copyright (C) 1999-2006, MIYASAKA Masaru.
  14. * For conditions of distribution and use, see copyright notice in jsimdext.inc
  15. *
  16. */
  17. /* Bitmask for supported acceleration methods */
  18. #define JSIMD_NONE 0x00
  19. #define JSIMD_MMX 0x01
  20. #define JSIMD_3DNOW 0x02
  21. #define JSIMD_SSE 0x04
  22. #define JSIMD_SSE2 0x08
  23. #define JSIMD_NEON 0x10
  24. #define JSIMD_DSPR2 0x20
  25. #define JSIMD_ALTIVEC 0x40
  26. #define JSIMD_AVX2 0x80
  27. #define JSIMD_MMI 0x100
  28. /* SIMD Ext: retrieve SIMD/CPU information */
  29. EXTERN(unsigned int) jpeg_simd_cpu_support(void);
  30. /* RGB & extended RGB --> YCC Colorspace Conversion */
  31. EXTERN(void) jsimd_rgb_ycc_convert_mmx
  32. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  33. JDIMENSION output_row, int num_rows);
  34. EXTERN(void) jsimd_extrgb_ycc_convert_mmx
  35. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  36. JDIMENSION output_row, int num_rows);
  37. EXTERN(void) jsimd_extrgbx_ycc_convert_mmx
  38. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  39. JDIMENSION output_row, int num_rows);
  40. EXTERN(void) jsimd_extbgr_ycc_convert_mmx
  41. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  42. JDIMENSION output_row, int num_rows);
  43. EXTERN(void) jsimd_extbgrx_ycc_convert_mmx
  44. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  45. JDIMENSION output_row, int num_rows);
  46. EXTERN(void) jsimd_extxbgr_ycc_convert_mmx
  47. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  48. JDIMENSION output_row, int num_rows);
  49. EXTERN(void) jsimd_extxrgb_ycc_convert_mmx
  50. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  51. JDIMENSION output_row, int num_rows);
  52. extern const int jconst_rgb_ycc_convert_sse2[];
  53. EXTERN(void) jsimd_rgb_ycc_convert_sse2
  54. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  55. JDIMENSION output_row, int num_rows);
  56. EXTERN(void) jsimd_extrgb_ycc_convert_sse2
  57. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  58. JDIMENSION output_row, int num_rows);
  59. EXTERN(void) jsimd_extrgbx_ycc_convert_sse2
  60. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  61. JDIMENSION output_row, int num_rows);
  62. EXTERN(void) jsimd_extbgr_ycc_convert_sse2
  63. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  64. JDIMENSION output_row, int num_rows);
  65. EXTERN(void) jsimd_extbgrx_ycc_convert_sse2
  66. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  67. JDIMENSION output_row, int num_rows);
  68. EXTERN(void) jsimd_extxbgr_ycc_convert_sse2
  69. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  70. JDIMENSION output_row, int num_rows);
  71. EXTERN(void) jsimd_extxrgb_ycc_convert_sse2
  72. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  73. JDIMENSION output_row, int num_rows);
  74. extern const int jconst_rgb_ycc_convert_avx2[];
  75. EXTERN(void) jsimd_rgb_ycc_convert_avx2
  76. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  77. JDIMENSION output_row, int num_rows);
  78. EXTERN(void) jsimd_extrgb_ycc_convert_avx2
  79. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  80. JDIMENSION output_row, int num_rows);
  81. EXTERN(void) jsimd_extrgbx_ycc_convert_avx2
  82. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  83. JDIMENSION output_row, int num_rows);
  84. EXTERN(void) jsimd_extbgr_ycc_convert_avx2
  85. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  86. JDIMENSION output_row, int num_rows);
  87. EXTERN(void) jsimd_extbgrx_ycc_convert_avx2
  88. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  89. JDIMENSION output_row, int num_rows);
  90. EXTERN(void) jsimd_extxbgr_ycc_convert_avx2
  91. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  92. JDIMENSION output_row, int num_rows);
  93. EXTERN(void) jsimd_extxrgb_ycc_convert_avx2
  94. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  95. JDIMENSION output_row, int num_rows);
  96. EXTERN(void) jsimd_rgb_ycc_convert_neon
  97. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  98. JDIMENSION output_row, int num_rows);
  99. EXTERN(void) jsimd_extrgb_ycc_convert_neon
  100. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  101. JDIMENSION output_row, int num_rows);
  102. EXTERN(void) jsimd_extrgbx_ycc_convert_neon
  103. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  104. JDIMENSION output_row, int num_rows);
  105. EXTERN(void) jsimd_extbgr_ycc_convert_neon
  106. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  107. JDIMENSION output_row, int num_rows);
  108. EXTERN(void) jsimd_extbgrx_ycc_convert_neon
  109. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  110. JDIMENSION output_row, int num_rows);
  111. EXTERN(void) jsimd_extxbgr_ycc_convert_neon
  112. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  113. JDIMENSION output_row, int num_rows);
  114. EXTERN(void) jsimd_extxrgb_ycc_convert_neon
  115. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  116. JDIMENSION output_row, int num_rows);
  117. #ifndef NEON_INTRINSICS
  118. EXTERN(void) jsimd_extrgb_ycc_convert_neon_slowld3
  119. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  120. JDIMENSION output_row, int num_rows);
  121. EXTERN(void) jsimd_extbgr_ycc_convert_neon_slowld3
  122. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  123. JDIMENSION output_row, int num_rows);
  124. #endif
  125. EXTERN(void) jsimd_rgb_ycc_convert_dspr2
  126. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  127. JDIMENSION output_row, int num_rows);
  128. EXTERN(void) jsimd_extrgb_ycc_convert_dspr2
  129. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  130. JDIMENSION output_row, int num_rows);
  131. EXTERN(void) jsimd_extrgbx_ycc_convert_dspr2
  132. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  133. JDIMENSION output_row, int num_rows);
  134. EXTERN(void) jsimd_extbgr_ycc_convert_dspr2
  135. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  136. JDIMENSION output_row, int num_rows);
  137. EXTERN(void) jsimd_extbgrx_ycc_convert_dspr2
  138. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  139. JDIMENSION output_row, int num_rows);
  140. EXTERN(void) jsimd_extxbgr_ycc_convert_dspr2
  141. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  142. JDIMENSION output_row, int num_rows);
  143. EXTERN(void) jsimd_extxrgb_ycc_convert_dspr2
  144. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  145. JDIMENSION output_row, int num_rows);
  146. EXTERN(void) jsimd_rgb_ycc_convert_mmi
  147. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  148. JDIMENSION output_row, int num_rows);
  149. EXTERN(void) jsimd_extrgb_ycc_convert_mmi
  150. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  151. JDIMENSION output_row, int num_rows);
  152. EXTERN(void) jsimd_extrgbx_ycc_convert_mmi
  153. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  154. JDIMENSION output_row, int num_rows);
  155. EXTERN(void) jsimd_extbgr_ycc_convert_mmi
  156. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  157. JDIMENSION output_row, int num_rows);
  158. EXTERN(void) jsimd_extbgrx_ycc_convert_mmi
  159. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  160. JDIMENSION output_row, int num_rows);
  161. EXTERN(void) jsimd_extxbgr_ycc_convert_mmi
  162. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  163. JDIMENSION output_row, int num_rows);
  164. EXTERN(void) jsimd_extxrgb_ycc_convert_mmi
  165. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  166. JDIMENSION output_row, int num_rows);
  167. EXTERN(void) jsimd_rgb_ycc_convert_altivec
  168. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  169. JDIMENSION output_row, int num_rows);
  170. EXTERN(void) jsimd_extrgb_ycc_convert_altivec
  171. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  172. JDIMENSION output_row, int num_rows);
  173. EXTERN(void) jsimd_extrgbx_ycc_convert_altivec
  174. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  175. JDIMENSION output_row, int num_rows);
  176. EXTERN(void) jsimd_extbgr_ycc_convert_altivec
  177. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  178. JDIMENSION output_row, int num_rows);
  179. EXTERN(void) jsimd_extbgrx_ycc_convert_altivec
  180. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  181. JDIMENSION output_row, int num_rows);
  182. EXTERN(void) jsimd_extxbgr_ycc_convert_altivec
  183. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  184. JDIMENSION output_row, int num_rows);
  185. EXTERN(void) jsimd_extxrgb_ycc_convert_altivec
  186. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  187. JDIMENSION output_row, int num_rows);
  188. /* RGB & extended RGB --> Grayscale Colorspace Conversion */
  189. EXTERN(void) jsimd_rgb_gray_convert_mmx
  190. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  191. JDIMENSION output_row, int num_rows);
  192. EXTERN(void) jsimd_extrgb_gray_convert_mmx
  193. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  194. JDIMENSION output_row, int num_rows);
  195. EXTERN(void) jsimd_extrgbx_gray_convert_mmx
  196. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  197. JDIMENSION output_row, int num_rows);
  198. EXTERN(void) jsimd_extbgr_gray_convert_mmx
  199. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  200. JDIMENSION output_row, int num_rows);
  201. EXTERN(void) jsimd_extbgrx_gray_convert_mmx
  202. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  203. JDIMENSION output_row, int num_rows);
  204. EXTERN(void) jsimd_extxbgr_gray_convert_mmx
  205. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  206. JDIMENSION output_row, int num_rows);
  207. EXTERN(void) jsimd_extxrgb_gray_convert_mmx
  208. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  209. JDIMENSION output_row, int num_rows);
  210. extern const int jconst_rgb_gray_convert_sse2[];
  211. EXTERN(void) jsimd_rgb_gray_convert_sse2
  212. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  213. JDIMENSION output_row, int num_rows);
  214. EXTERN(void) jsimd_extrgb_gray_convert_sse2
  215. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  216. JDIMENSION output_row, int num_rows);
  217. EXTERN(void) jsimd_extrgbx_gray_convert_sse2
  218. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  219. JDIMENSION output_row, int num_rows);
  220. EXTERN(void) jsimd_extbgr_gray_convert_sse2
  221. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  222. JDIMENSION output_row, int num_rows);
  223. EXTERN(void) jsimd_extbgrx_gray_convert_sse2
  224. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  225. JDIMENSION output_row, int num_rows);
  226. EXTERN(void) jsimd_extxbgr_gray_convert_sse2
  227. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  228. JDIMENSION output_row, int num_rows);
  229. EXTERN(void) jsimd_extxrgb_gray_convert_sse2
  230. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  231. JDIMENSION output_row, int num_rows);
  232. extern const int jconst_rgb_gray_convert_avx2[];
  233. EXTERN(void) jsimd_rgb_gray_convert_avx2
  234. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  235. JDIMENSION output_row, int num_rows);
  236. EXTERN(void) jsimd_extrgb_gray_convert_avx2
  237. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  238. JDIMENSION output_row, int num_rows);
  239. EXTERN(void) jsimd_extrgbx_gray_convert_avx2
  240. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  241. JDIMENSION output_row, int num_rows);
  242. EXTERN(void) jsimd_extbgr_gray_convert_avx2
  243. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  244. JDIMENSION output_row, int num_rows);
  245. EXTERN(void) jsimd_extbgrx_gray_convert_avx2
  246. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  247. JDIMENSION output_row, int num_rows);
  248. EXTERN(void) jsimd_extxbgr_gray_convert_avx2
  249. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  250. JDIMENSION output_row, int num_rows);
  251. EXTERN(void) jsimd_extxrgb_gray_convert_avx2
  252. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  253. JDIMENSION output_row, int num_rows);
  254. EXTERN(void) jsimd_rgb_gray_convert_neon
  255. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  256. JDIMENSION output_row, int num_rows);
  257. EXTERN(void) jsimd_extrgb_gray_convert_neon
  258. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  259. JDIMENSION output_row, int num_rows);
  260. EXTERN(void) jsimd_extrgbx_gray_convert_neon
  261. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  262. JDIMENSION output_row, int num_rows);
  263. EXTERN(void) jsimd_extbgr_gray_convert_neon
  264. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  265. JDIMENSION output_row, int num_rows);
  266. EXTERN(void) jsimd_extbgrx_gray_convert_neon
  267. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  268. JDIMENSION output_row, int num_rows);
  269. EXTERN(void) jsimd_extxbgr_gray_convert_neon
  270. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  271. JDIMENSION output_row, int num_rows);
  272. EXTERN(void) jsimd_extxrgb_gray_convert_neon
  273. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  274. JDIMENSION output_row, int num_rows);
  275. EXTERN(void) jsimd_rgb_gray_convert_dspr2
  276. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  277. JDIMENSION output_row, int num_rows);
  278. EXTERN(void) jsimd_extrgb_gray_convert_dspr2
  279. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  280. JDIMENSION output_row, int num_rows);
  281. EXTERN(void) jsimd_extrgbx_gray_convert_dspr2
  282. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  283. JDIMENSION output_row, int num_rows);
  284. EXTERN(void) jsimd_extbgr_gray_convert_dspr2
  285. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  286. JDIMENSION output_row, int num_rows);
  287. EXTERN(void) jsimd_extbgrx_gray_convert_dspr2
  288. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  289. JDIMENSION output_row, int num_rows);
  290. EXTERN(void) jsimd_extxbgr_gray_convert_dspr2
  291. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  292. JDIMENSION output_row, int num_rows);
  293. EXTERN(void) jsimd_extxrgb_gray_convert_dspr2
  294. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  295. JDIMENSION output_row, int num_rows);
  296. EXTERN(void) jsimd_rgb_gray_convert_mmi
  297. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  298. JDIMENSION output_row, int num_rows);
  299. EXTERN(void) jsimd_extrgb_gray_convert_mmi
  300. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  301. JDIMENSION output_row, int num_rows);
  302. EXTERN(void) jsimd_extrgbx_gray_convert_mmi
  303. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  304. JDIMENSION output_row, int num_rows);
  305. EXTERN(void) jsimd_extbgr_gray_convert_mmi
  306. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  307. JDIMENSION output_row, int num_rows);
  308. EXTERN(void) jsimd_extbgrx_gray_convert_mmi
  309. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  310. JDIMENSION output_row, int num_rows);
  311. EXTERN(void) jsimd_extxbgr_gray_convert_mmi
  312. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  313. JDIMENSION output_row, int num_rows);
  314. EXTERN(void) jsimd_extxrgb_gray_convert_mmi
  315. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  316. JDIMENSION output_row, int num_rows);
  317. EXTERN(void) jsimd_rgb_gray_convert_altivec
  318. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  319. JDIMENSION output_row, int num_rows);
  320. EXTERN(void) jsimd_extrgb_gray_convert_altivec
  321. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  322. JDIMENSION output_row, int num_rows);
  323. EXTERN(void) jsimd_extrgbx_gray_convert_altivec
  324. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  325. JDIMENSION output_row, int num_rows);
  326. EXTERN(void) jsimd_extbgr_gray_convert_altivec
  327. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  328. JDIMENSION output_row, int num_rows);
  329. EXTERN(void) jsimd_extbgrx_gray_convert_altivec
  330. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  331. JDIMENSION output_row, int num_rows);
  332. EXTERN(void) jsimd_extxbgr_gray_convert_altivec
  333. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  334. JDIMENSION output_row, int num_rows);
  335. EXTERN(void) jsimd_extxrgb_gray_convert_altivec
  336. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  337. JDIMENSION output_row, int num_rows);
  338. /* YCC --> RGB & extended RGB Colorspace Conversion */
  339. EXTERN(void) jsimd_ycc_rgb_convert_mmx
  340. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  341. JSAMPARRAY output_buf, int num_rows);
  342. EXTERN(void) jsimd_ycc_extrgb_convert_mmx
  343. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  344. JSAMPARRAY output_buf, int num_rows);
  345. EXTERN(void) jsimd_ycc_extrgbx_convert_mmx
  346. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  347. JSAMPARRAY output_buf, int num_rows);
  348. EXTERN(void) jsimd_ycc_extbgr_convert_mmx
  349. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  350. JSAMPARRAY output_buf, int num_rows);
  351. EXTERN(void) jsimd_ycc_extbgrx_convert_mmx
  352. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  353. JSAMPARRAY output_buf, int num_rows);
  354. EXTERN(void) jsimd_ycc_extxbgr_convert_mmx
  355. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  356. JSAMPARRAY output_buf, int num_rows);
  357. EXTERN(void) jsimd_ycc_extxrgb_convert_mmx
  358. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  359. JSAMPARRAY output_buf, int num_rows);
  360. extern const int jconst_ycc_rgb_convert_sse2[];
  361. EXTERN(void) jsimd_ycc_rgb_convert_sse2
  362. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  363. JSAMPARRAY output_buf, int num_rows);
  364. EXTERN(void) jsimd_ycc_extrgb_convert_sse2
  365. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  366. JSAMPARRAY output_buf, int num_rows);
  367. EXTERN(void) jsimd_ycc_extrgbx_convert_sse2
  368. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  369. JSAMPARRAY output_buf, int num_rows);
  370. EXTERN(void) jsimd_ycc_extbgr_convert_sse2
  371. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  372. JSAMPARRAY output_buf, int num_rows);
  373. EXTERN(void) jsimd_ycc_extbgrx_convert_sse2
  374. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  375. JSAMPARRAY output_buf, int num_rows);
  376. EXTERN(void) jsimd_ycc_extxbgr_convert_sse2
  377. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  378. JSAMPARRAY output_buf, int num_rows);
  379. EXTERN(void) jsimd_ycc_extxrgb_convert_sse2
  380. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  381. JSAMPARRAY output_buf, int num_rows);
  382. extern const int jconst_ycc_rgb_convert_avx2[];
  383. EXTERN(void) jsimd_ycc_rgb_convert_avx2
  384. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  385. JSAMPARRAY output_buf, int num_rows);
  386. EXTERN(void) jsimd_ycc_extrgb_convert_avx2
  387. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  388. JSAMPARRAY output_buf, int num_rows);
  389. EXTERN(void) jsimd_ycc_extrgbx_convert_avx2
  390. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  391. JSAMPARRAY output_buf, int num_rows);
  392. EXTERN(void) jsimd_ycc_extbgr_convert_avx2
  393. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  394. JSAMPARRAY output_buf, int num_rows);
  395. EXTERN(void) jsimd_ycc_extbgrx_convert_avx2
  396. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  397. JSAMPARRAY output_buf, int num_rows);
  398. EXTERN(void) jsimd_ycc_extxbgr_convert_avx2
  399. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  400. JSAMPARRAY output_buf, int num_rows);
  401. EXTERN(void) jsimd_ycc_extxrgb_convert_avx2
  402. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  403. JSAMPARRAY output_buf, int num_rows);
  404. EXTERN(void) jsimd_ycc_rgb_convert_neon
  405. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  406. JSAMPARRAY output_buf, int num_rows);
  407. EXTERN(void) jsimd_ycc_extrgb_convert_neon
  408. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  409. JSAMPARRAY output_buf, int num_rows);
  410. EXTERN(void) jsimd_ycc_extrgbx_convert_neon
  411. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  412. JSAMPARRAY output_buf, int num_rows);
  413. EXTERN(void) jsimd_ycc_extbgr_convert_neon
  414. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  415. JSAMPARRAY output_buf, int num_rows);
  416. EXTERN(void) jsimd_ycc_extbgrx_convert_neon
  417. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  418. JSAMPARRAY output_buf, int num_rows);
  419. EXTERN(void) jsimd_ycc_extxbgr_convert_neon
  420. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  421. JSAMPARRAY output_buf, int num_rows);
  422. EXTERN(void) jsimd_ycc_extxrgb_convert_neon
  423. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  424. JSAMPARRAY output_buf, int num_rows);
  425. EXTERN(void) jsimd_ycc_rgb565_convert_neon
  426. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  427. JSAMPARRAY output_buf, int num_rows);
  428. #ifndef NEON_INTRINSICS
  429. EXTERN(void) jsimd_ycc_extrgb_convert_neon_slowst3
  430. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  431. JSAMPARRAY output_buf, int num_rows);
  432. EXTERN(void) jsimd_ycc_extbgr_convert_neon_slowst3
  433. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  434. JSAMPARRAY output_buf, int num_rows);
  435. #endif
  436. EXTERN(void) jsimd_ycc_rgb_convert_dspr2
  437. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  438. JSAMPARRAY output_buf, int num_rows);
  439. EXTERN(void) jsimd_ycc_extrgb_convert_dspr2
  440. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  441. JSAMPARRAY output_buf, int num_rows);
  442. EXTERN(void) jsimd_ycc_extrgbx_convert_dspr2
  443. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  444. JSAMPARRAY output_buf, int num_rows);
  445. EXTERN(void) jsimd_ycc_extbgr_convert_dspr2
  446. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  447. JSAMPARRAY output_buf, int num_rows);
  448. EXTERN(void) jsimd_ycc_extbgrx_convert_dspr2
  449. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  450. JSAMPARRAY output_buf, int num_rows);
  451. EXTERN(void) jsimd_ycc_extxbgr_convert_dspr2
  452. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  453. JSAMPARRAY output_buf, int num_rows);
  454. EXTERN(void) jsimd_ycc_extxrgb_convert_dspr2
  455. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  456. JSAMPARRAY output_buf, int num_rows);
  457. EXTERN(void) jsimd_ycc_rgb_convert_mmi
  458. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  459. JSAMPARRAY output_buf, int num_rows);
  460. EXTERN(void) jsimd_ycc_extrgb_convert_mmi
  461. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  462. JSAMPARRAY output_buf, int num_rows);
  463. EXTERN(void) jsimd_ycc_extrgbx_convert_mmi
  464. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  465. JSAMPARRAY output_buf, int num_rows);
  466. EXTERN(void) jsimd_ycc_extbgr_convert_mmi
  467. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  468. JSAMPARRAY output_buf, int num_rows);
  469. EXTERN(void) jsimd_ycc_extbgrx_convert_mmi
  470. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  471. JSAMPARRAY output_buf, int num_rows);
  472. EXTERN(void) jsimd_ycc_extxbgr_convert_mmi
  473. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  474. JSAMPARRAY output_buf, int num_rows);
  475. EXTERN(void) jsimd_ycc_extxrgb_convert_mmi
  476. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  477. JSAMPARRAY output_buf, int num_rows);
  478. EXTERN(void) jsimd_ycc_rgb_convert_altivec
  479. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  480. JSAMPARRAY output_buf, int num_rows);
  481. EXTERN(void) jsimd_ycc_extrgb_convert_altivec
  482. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  483. JSAMPARRAY output_buf, int num_rows);
  484. EXTERN(void) jsimd_ycc_extrgbx_convert_altivec
  485. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  486. JSAMPARRAY output_buf, int num_rows);
  487. EXTERN(void) jsimd_ycc_extbgr_convert_altivec
  488. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  489. JSAMPARRAY output_buf, int num_rows);
  490. EXTERN(void) jsimd_ycc_extbgrx_convert_altivec
  491. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  492. JSAMPARRAY output_buf, int num_rows);
  493. EXTERN(void) jsimd_ycc_extxbgr_convert_altivec
  494. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  495. JSAMPARRAY output_buf, int num_rows);
  496. EXTERN(void) jsimd_ycc_extxrgb_convert_altivec
  497. (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
  498. JSAMPARRAY output_buf, int num_rows);
  499. /* NULL Colorspace Conversion */
  500. EXTERN(void) jsimd_c_null_convert_dspr2
  501. (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  502. JDIMENSION output_row, int num_rows, int num_components);
  503. /* h2v1 Downsampling */
  504. EXTERN(void) jsimd_h2v1_downsample_mmx
  505. (JDIMENSION image_width, int max_v_samp_factor, JDIMENSION v_samp_factor,
  506. JDIMENSION width_in_blocks, JSAMPARRAY input_data, JSAMPARRAY output_data);
  507. EXTERN(void) jsimd_h2v1_downsample_sse2
  508. (JDIMENSION image_width, int max_v_samp_factor, JDIMENSION v_samp_factor,
  509. JDIMENSION width_in_blocks, JSAMPARRAY input_data, JSAMPARRAY output_data);
  510. EXTERN(void) jsimd_h2v1_downsample_avx2
  511. (JDIMENSION image_width, int max_v_samp_factor, JDIMENSION v_samp_factor,
  512. JDIMENSION width_in_blocks, JSAMPARRAY input_data, JSAMPARRAY output_data);
  513. EXTERN(void) jsimd_h2v1_downsample_neon
  514. (JDIMENSION image_width, int max_v_samp_factor, JDIMENSION v_samp_factor,
  515. JDIMENSION width_in_blocks, JSAMPARRAY input_data, JSAMPARRAY output_data);
  516. EXTERN(void) jsimd_h2v1_downsample_dspr2
  517. (JDIMENSION image_width, int max_v_samp_factor, JDIMENSION v_samp_factor,
  518. JDIMENSION width_in_blocks, JSAMPARRAY input_data, JSAMPARRAY output_data);
  519. EXTERN(void) jsimd_h2v1_downsample_altivec
  520. (JDIMENSION image_width, int max_v_samp_factor, JDIMENSION v_samp_factor,
  521. JDIMENSION width_in_blocks, JSAMPARRAY input_data, JSAMPARRAY output_data);
  522. /* h2v2 Downsampling */
  523. EXTERN(void) jsimd_h2v2_downsample_mmx
  524. (JDIMENSION image_width, int max_v_samp_factor, JDIMENSION v_samp_factor,
  525. JDIMENSION width_in_blocks, JSAMPARRAY input_data, JSAMPARRAY output_data);
  526. EXTERN(void) jsimd_h2v2_downsample_sse2
  527. (JDIMENSION image_width, int max_v_samp_factor, JDIMENSION v_samp_factor,
  528. JDIMENSION width_in_blocks, JSAMPARRAY input_data, JSAMPARRAY output_data);
  529. EXTERN(void) jsimd_h2v2_downsample_avx2
  530. (JDIMENSION image_width, int max_v_samp_factor, JDIMENSION v_samp_factor,
  531. JDIMENSION width_in_blocks, JSAMPARRAY input_data, JSAMPARRAY output_data);
  532. EXTERN(void) jsimd_h2v2_downsample_neon
  533. (JDIMENSION image_width, int max_v_samp_factor, JDIMENSION v_samp_factor,
  534. JDIMENSION width_in_blocks, JSAMPARRAY input_data, JSAMPARRAY output_data);
  535. EXTERN(void) jsimd_h2v2_downsample_dspr2
  536. (JDIMENSION image_width, int max_v_samp_factor, JDIMENSION v_samp_factor,
  537. JDIMENSION width_in_blocks, JSAMPARRAY input_data, JSAMPARRAY output_data);
  538. EXTERN(void) jsimd_h2v2_downsample_mmi
  539. (JDIMENSION image_width, int max_v_samp_factor, JDIMENSION v_samp_factor,
  540. JDIMENSION width_in_blocks, JSAMPARRAY input_data, JSAMPARRAY output_data);
  541. EXTERN(void) jsimd_h2v2_downsample_altivec
  542. (JDIMENSION image_width, int max_v_samp_factor, JDIMENSION v_samp_factor,
  543. JDIMENSION width_in_blocks, JSAMPARRAY input_data, JSAMPARRAY output_data);
  544. /* h2v2 Smooth Downsampling */
  545. EXTERN(void) jsimd_h2v2_smooth_downsample_dspr2
  546. (JSAMPARRAY input_data, JSAMPARRAY output_data, JDIMENSION v_samp_factor,
  547. int max_v_samp_factor, int smoothing_factor, JDIMENSION width_in_blocks,
  548. JDIMENSION image_width);
  549. /* Upsampling */
  550. EXTERN(void) jsimd_h2v1_upsample_mmx
  551. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  552. JSAMPARRAY *output_data_ptr);
  553. EXTERN(void) jsimd_h2v2_upsample_mmx
  554. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  555. JSAMPARRAY *output_data_ptr);
  556. EXTERN(void) jsimd_h2v1_upsample_sse2
  557. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  558. JSAMPARRAY *output_data_ptr);
  559. EXTERN(void) jsimd_h2v2_upsample_sse2
  560. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  561. JSAMPARRAY *output_data_ptr);
  562. EXTERN(void) jsimd_h2v1_upsample_avx2
  563. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  564. JSAMPARRAY *output_data_ptr);
  565. EXTERN(void) jsimd_h2v2_upsample_avx2
  566. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  567. JSAMPARRAY *output_data_ptr);
  568. EXTERN(void) jsimd_h2v1_upsample_neon
  569. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  570. JSAMPARRAY *output_data_ptr);
  571. EXTERN(void) jsimd_h2v2_upsample_neon
  572. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  573. JSAMPARRAY *output_data_ptr);
  574. EXTERN(void) jsimd_h2v1_upsample_dspr2
  575. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  576. JSAMPARRAY *output_data_ptr);
  577. EXTERN(void) jsimd_h2v2_upsample_dspr2
  578. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  579. JSAMPARRAY *output_data_ptr);
  580. EXTERN(void) jsimd_int_upsample_dspr2
  581. (UINT8 h_expand, UINT8 v_expand, JSAMPARRAY input_data,
  582. JSAMPARRAY *output_data_ptr, JDIMENSION output_width,
  583. int max_v_samp_factor);
  584. EXTERN(void) jsimd_h2v1_upsample_altivec
  585. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  586. JSAMPARRAY *output_data_ptr);
  587. EXTERN(void) jsimd_h2v2_upsample_altivec
  588. (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
  589. JSAMPARRAY *output_data_ptr);
  590. /* Fancy Upsampling */
  591. EXTERN(void) jsimd_h2v1_fancy_upsample_mmx
  592. (int max_v_samp_factor, JDIMENSION downsampled_width, JSAMPARRAY input_data,
  593. JSAMPARRAY *output_data_ptr);
  594. EXTERN(void) jsimd_h2v2_fancy_upsample_mmx
  595. (int max_v_samp_factor, JDIMENSION downsampled_width, JSAMPARRAY input_data,
  596. JSAMPARRAY *output_data_ptr);
  597. extern const int jconst_fancy_upsample_sse2[];
  598. EXTERN(void) jsimd_h2v1_fancy_upsample_sse2
  599. (int max_v_samp_factor, JDIMENSION downsampled_width, JSAMPARRAY input_data,
  600. JSAMPARRAY *output_data_ptr);
  601. EXTERN(void) jsimd_h2v2_fancy_upsample_sse2
  602. (int max_v_samp_factor, JDIMENSION downsampled_width, JSAMPARRAY input_data,
  603. JSAMPARRAY *output_data_ptr);
  604. extern const int jconst_fancy_upsample_avx2[];
  605. EXTERN(void) jsimd_h2v1_fancy_upsample_avx2
  606. (int max_v_samp_factor, JDIMENSION downsampled_width, JSAMPARRAY input_data,
  607. JSAMPARRAY *output_data_ptr);
  608. EXTERN(void) jsimd_h2v2_fancy_upsample_avx2
  609. (int max_v_samp_factor, JDIMENSION downsampled_width, JSAMPARRAY input_data,
  610. JSAMPARRAY *output_data_ptr);
  611. EXTERN(void) jsimd_h2v1_fancy_upsample_neon
  612. (int max_v_samp_factor, JDIMENSION downsampled_width, JSAMPARRAY input_data,
  613. JSAMPARRAY *output_data_ptr);
  614. EXTERN(void) jsimd_h2v2_fancy_upsample_neon
  615. (int max_v_samp_factor, JDIMENSION downsampled_width, JSAMPARRAY input_data,
  616. JSAMPARRAY *output_data_ptr);
  617. EXTERN(void) jsimd_h1v2_fancy_upsample_neon
  618. (int max_v_samp_factor, JDIMENSION downsampled_width, JSAMPARRAY input_data,
  619. JSAMPARRAY *output_data_ptr);
  620. EXTERN(void) jsimd_h2v1_fancy_upsample_dspr2
  621. (int max_v_samp_factor, JDIMENSION downsampled_width, JSAMPARRAY input_data,
  622. JSAMPARRAY *output_data_ptr);
  623. EXTERN(void) jsimd_h2v2_fancy_upsample_dspr2
  624. (int max_v_samp_factor, JDIMENSION downsampled_width, JSAMPARRAY input_data,
  625. JSAMPARRAY *output_data_ptr);
  626. EXTERN(void) jsimd_h2v1_fancy_upsample_mmi
  627. (int max_v_samp_factor, JDIMENSION downsampled_width, JSAMPARRAY input_data,
  628. JSAMPARRAY *output_data_ptr);
  629. EXTERN(void) jsimd_h2v2_fancy_upsample_mmi
  630. (int max_v_samp_factor, JDIMENSION downsampled_width, JSAMPARRAY input_data,
  631. JSAMPARRAY *output_data_ptr);
  632. EXTERN(void) jsimd_h2v1_fancy_upsample_altivec
  633. (int max_v_samp_factor, JDIMENSION downsampled_width, JSAMPARRAY input_data,
  634. JSAMPARRAY *output_data_ptr);
  635. EXTERN(void) jsimd_h2v2_fancy_upsample_altivec
  636. (int max_v_samp_factor, JDIMENSION downsampled_width, JSAMPARRAY input_data,
  637. JSAMPARRAY *output_data_ptr);
  638. /* Merged Upsampling */
  639. EXTERN(void) jsimd_h2v1_merged_upsample_mmx
  640. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  641. JSAMPARRAY output_buf);
  642. EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_mmx
  643. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  644. JSAMPARRAY output_buf);
  645. EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_mmx
  646. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  647. JSAMPARRAY output_buf);
  648. EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_mmx
  649. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  650. JSAMPARRAY output_buf);
  651. EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_mmx
  652. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  653. JSAMPARRAY output_buf);
  654. EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_mmx
  655. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  656. JSAMPARRAY output_buf);
  657. EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_mmx
  658. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  659. JSAMPARRAY output_buf);
  660. EXTERN(void) jsimd_h2v2_merged_upsample_mmx
  661. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  662. JSAMPARRAY output_buf);
  663. EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_mmx
  664. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  665. JSAMPARRAY output_buf);
  666. EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_mmx
  667. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  668. JSAMPARRAY output_buf);
  669. EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_mmx
  670. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  671. JSAMPARRAY output_buf);
  672. EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_mmx
  673. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  674. JSAMPARRAY output_buf);
  675. EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_mmx
  676. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  677. JSAMPARRAY output_buf);
  678. EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_mmx
  679. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  680. JSAMPARRAY output_buf);
  681. extern const int jconst_merged_upsample_sse2[];
  682. EXTERN(void) jsimd_h2v1_merged_upsample_sse2
  683. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  684. JSAMPARRAY output_buf);
  685. EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_sse2
  686. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  687. JSAMPARRAY output_buf);
  688. EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_sse2
  689. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  690. JSAMPARRAY output_buf);
  691. EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_sse2
  692. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  693. JSAMPARRAY output_buf);
  694. EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_sse2
  695. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  696. JSAMPARRAY output_buf);
  697. EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_sse2
  698. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  699. JSAMPARRAY output_buf);
  700. EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_sse2
  701. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  702. JSAMPARRAY output_buf);
  703. EXTERN(void) jsimd_h2v2_merged_upsample_sse2
  704. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  705. JSAMPARRAY output_buf);
  706. EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_sse2
  707. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  708. JSAMPARRAY output_buf);
  709. EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_sse2
  710. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  711. JSAMPARRAY output_buf);
  712. EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_sse2
  713. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  714. JSAMPARRAY output_buf);
  715. EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_sse2
  716. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  717. JSAMPARRAY output_buf);
  718. EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_sse2
  719. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  720. JSAMPARRAY output_buf);
  721. EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_sse2
  722. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  723. JSAMPARRAY output_buf);
  724. extern const int jconst_merged_upsample_avx2[];
  725. EXTERN(void) jsimd_h2v1_merged_upsample_avx2
  726. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  727. JSAMPARRAY output_buf);
  728. EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_avx2
  729. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  730. JSAMPARRAY output_buf);
  731. EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_avx2
  732. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  733. JSAMPARRAY output_buf);
  734. EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_avx2
  735. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  736. JSAMPARRAY output_buf);
  737. EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_avx2
  738. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  739. JSAMPARRAY output_buf);
  740. EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_avx2
  741. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  742. JSAMPARRAY output_buf);
  743. EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_avx2
  744. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  745. JSAMPARRAY output_buf);
  746. EXTERN(void) jsimd_h2v2_merged_upsample_avx2
  747. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  748. JSAMPARRAY output_buf);
  749. EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_avx2
  750. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  751. JSAMPARRAY output_buf);
  752. EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_avx2
  753. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  754. JSAMPARRAY output_buf);
  755. EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_avx2
  756. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  757. JSAMPARRAY output_buf);
  758. EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_avx2
  759. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  760. JSAMPARRAY output_buf);
  761. EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_avx2
  762. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  763. JSAMPARRAY output_buf);
  764. EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_avx2
  765. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  766. JSAMPARRAY output_buf);
  767. EXTERN(void) jsimd_h2v1_merged_upsample_neon
  768. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  769. JSAMPARRAY output_buf);
  770. EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_neon
  771. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  772. JSAMPARRAY output_buf);
  773. EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_neon
  774. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  775. JSAMPARRAY output_buf);
  776. EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_neon
  777. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  778. JSAMPARRAY output_buf);
  779. EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_neon
  780. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  781. JSAMPARRAY output_buf);
  782. EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_neon
  783. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  784. JSAMPARRAY output_buf);
  785. EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_neon
  786. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  787. JSAMPARRAY output_buf);
  788. EXTERN(void) jsimd_h2v2_merged_upsample_neon
  789. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  790. JSAMPARRAY output_buf);
  791. EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_neon
  792. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  793. JSAMPARRAY output_buf);
  794. EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_neon
  795. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  796. JSAMPARRAY output_buf);
  797. EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_neon
  798. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  799. JSAMPARRAY output_buf);
  800. EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_neon
  801. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  802. JSAMPARRAY output_buf);
  803. EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_neon
  804. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  805. JSAMPARRAY output_buf);
  806. EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_neon
  807. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  808. JSAMPARRAY output_buf);
  809. EXTERN(void) jsimd_h2v1_merged_upsample_dspr2
  810. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  811. JSAMPARRAY output_buf, JSAMPLE *range);
  812. EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_dspr2
  813. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  814. JSAMPARRAY output_buf, JSAMPLE *range);
  815. EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_dspr2
  816. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  817. JSAMPARRAY output_buf, JSAMPLE *range);
  818. EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_dspr2
  819. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  820. JSAMPARRAY output_buf, JSAMPLE *range);
  821. EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_dspr2
  822. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  823. JSAMPARRAY output_buf, JSAMPLE *range);
  824. EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_dspr2
  825. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  826. JSAMPARRAY output_buf, JSAMPLE *range);
  827. EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_dspr2
  828. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  829. JSAMPARRAY output_buf, JSAMPLE *range);
  830. EXTERN(void) jsimd_h2v2_merged_upsample_dspr2
  831. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  832. JSAMPARRAY output_buf, JSAMPLE *range);
  833. EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_dspr2
  834. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  835. JSAMPARRAY output_buf, JSAMPLE *range);
  836. EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_dspr2
  837. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  838. JSAMPARRAY output_buf, JSAMPLE *range);
  839. EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_dspr2
  840. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  841. JSAMPARRAY output_buf, JSAMPLE *range);
  842. EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_dspr2
  843. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  844. JSAMPARRAY output_buf, JSAMPLE *range);
  845. EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_dspr2
  846. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  847. JSAMPARRAY output_buf, JSAMPLE *range);
  848. EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_dspr2
  849. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  850. JSAMPARRAY output_buf, JSAMPLE *range);
  851. EXTERN(void) jsimd_h2v1_merged_upsample_mmi
  852. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  853. JSAMPARRAY output_buf);
  854. EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_mmi
  855. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  856. JSAMPARRAY output_buf);
  857. EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_mmi
  858. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  859. JSAMPARRAY output_buf);
  860. EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_mmi
  861. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  862. JSAMPARRAY output_buf);
  863. EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_mmi
  864. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  865. JSAMPARRAY output_buf);
  866. EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_mmi
  867. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  868. JSAMPARRAY output_buf);
  869. EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_mmi
  870. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  871. JSAMPARRAY output_buf);
  872. EXTERN(void) jsimd_h2v2_merged_upsample_mmi
  873. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  874. JSAMPARRAY output_buf);
  875. EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_mmi
  876. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  877. JSAMPARRAY output_buf);
  878. EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_mmi
  879. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  880. JSAMPARRAY output_buf);
  881. EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_mmi
  882. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  883. JSAMPARRAY output_buf);
  884. EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_mmi
  885. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  886. JSAMPARRAY output_buf);
  887. EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_mmi
  888. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  889. JSAMPARRAY output_buf);
  890. EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_mmi
  891. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  892. JSAMPARRAY output_buf);
  893. EXTERN(void) jsimd_h2v1_merged_upsample_altivec
  894. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  895. JSAMPARRAY output_buf);
  896. EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_altivec
  897. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  898. JSAMPARRAY output_buf);
  899. EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_altivec
  900. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  901. JSAMPARRAY output_buf);
  902. EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_altivec
  903. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  904. JSAMPARRAY output_buf);
  905. EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_altivec
  906. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  907. JSAMPARRAY output_buf);
  908. EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_altivec
  909. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  910. JSAMPARRAY output_buf);
  911. EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_altivec
  912. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  913. JSAMPARRAY output_buf);
  914. EXTERN(void) jsimd_h2v2_merged_upsample_altivec
  915. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  916. JSAMPARRAY output_buf);
  917. EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_altivec
  918. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  919. JSAMPARRAY output_buf);
  920. EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_altivec
  921. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  922. JSAMPARRAY output_buf);
  923. EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_altivec
  924. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  925. JSAMPARRAY output_buf);
  926. EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_altivec
  927. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  928. JSAMPARRAY output_buf);
  929. EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_altivec
  930. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  931. JSAMPARRAY output_buf);
  932. EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_altivec
  933. (JDIMENSION output_width, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
  934. JSAMPARRAY output_buf);
  935. /* Sample Conversion */
  936. EXTERN(void) jsimd_convsamp_mmx
  937. (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
  938. EXTERN(void) jsimd_convsamp_sse2
  939. (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
  940. EXTERN(void) jsimd_convsamp_avx2
  941. (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
  942. EXTERN(void) jsimd_convsamp_neon
  943. (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
  944. EXTERN(void) jsimd_convsamp_dspr2
  945. (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
  946. EXTERN(void) jsimd_convsamp_altivec
  947. (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
  948. /* Floating Point Sample Conversion */
  949. EXTERN(void) jsimd_convsamp_float_3dnow
  950. (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace);
  951. EXTERN(void) jsimd_convsamp_float_sse
  952. (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace);
  953. EXTERN(void) jsimd_convsamp_float_sse2
  954. (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace);
  955. EXTERN(void) jsimd_convsamp_float_dspr2
  956. (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace);
  957. /* Accurate Integer Forward DCT */
  958. EXTERN(void) jsimd_fdct_islow_mmx(DCTELEM *data);
  959. extern const int jconst_fdct_islow_sse2[];
  960. EXTERN(void) jsimd_fdct_islow_sse2(DCTELEM *data);
  961. extern const int jconst_fdct_islow_avx2[];
  962. EXTERN(void) jsimd_fdct_islow_avx2(DCTELEM *data);
  963. EXTERN(void) jsimd_fdct_islow_neon(DCTELEM *data);
  964. EXTERN(void) jsimd_fdct_islow_dspr2(DCTELEM *data);
  965. EXTERN(void) jsimd_fdct_islow_mmi(DCTELEM *data);
  966. EXTERN(void) jsimd_fdct_islow_altivec(DCTELEM *data);
  967. /* Fast Integer Forward DCT */
  968. EXTERN(void) jsimd_fdct_ifast_mmx(DCTELEM *data);
  969. extern const int jconst_fdct_ifast_sse2[];
  970. EXTERN(void) jsimd_fdct_ifast_sse2(DCTELEM *data);
  971. EXTERN(void) jsimd_fdct_ifast_neon(DCTELEM *data);
  972. EXTERN(void) jsimd_fdct_ifast_dspr2(DCTELEM *data);
  973. EXTERN(void) jsimd_fdct_ifast_mmi(DCTELEM *data);
  974. EXTERN(void) jsimd_fdct_ifast_altivec(DCTELEM *data);
  975. /* Floating Point Forward DCT */
  976. EXTERN(void) jsimd_fdct_float_3dnow(FAST_FLOAT *data);
  977. extern const int jconst_fdct_float_sse[];
  978. EXTERN(void) jsimd_fdct_float_sse(FAST_FLOAT *data);
  979. /* Quantization */
  980. EXTERN(void) jsimd_quantize_mmx
  981. (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
  982. EXTERN(void) jsimd_quantize_sse2
  983. (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
  984. EXTERN(void) jsimd_quantize_avx2
  985. (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
  986. EXTERN(void) jsimd_quantize_neon
  987. (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
  988. EXTERN(void) jsimd_quantize_dspr2
  989. (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
  990. EXTERN(void) jsimd_quantize_mmi
  991. (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
  992. EXTERN(void) jsimd_quantize_altivec
  993. (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
  994. /* Floating Point Quantization */
  995. EXTERN(void) jsimd_quantize_float_3dnow
  996. (JCOEFPTR coef_block, FAST_FLOAT *divisors, FAST_FLOAT *workspace);
  997. EXTERN(void) jsimd_quantize_float_sse
  998. (JCOEFPTR coef_block, FAST_FLOAT *divisors, FAST_FLOAT *workspace);
  999. EXTERN(void) jsimd_quantize_float_sse2
  1000. (JCOEFPTR coef_block, FAST_FLOAT *divisors, FAST_FLOAT *workspace);
  1001. EXTERN(void) jsimd_quantize_float_dspr2
  1002. (JCOEFPTR coef_block, FAST_FLOAT *divisors, FAST_FLOAT *workspace);
  1003. /* Scaled Inverse DCT */
  1004. EXTERN(void) jsimd_idct_2x2_mmx
  1005. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1006. JDIMENSION output_col);
  1007. EXTERN(void) jsimd_idct_4x4_mmx
  1008. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1009. JDIMENSION output_col);
  1010. extern const int jconst_idct_red_sse2[];
  1011. EXTERN(void) jsimd_idct_2x2_sse2
  1012. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1013. JDIMENSION output_col);
  1014. EXTERN(void) jsimd_idct_4x4_sse2
  1015. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1016. JDIMENSION output_col);
  1017. EXTERN(void) jsimd_idct_2x2_neon
  1018. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1019. JDIMENSION output_col);
  1020. EXTERN(void) jsimd_idct_4x4_neon
  1021. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1022. JDIMENSION output_col);
  1023. EXTERN(void) jsimd_idct_2x2_dspr2
  1024. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1025. JDIMENSION output_col);
  1026. EXTERN(void) jsimd_idct_4x4_dspr2
  1027. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1028. JDIMENSION output_col, int *workspace);
  1029. EXTERN(void) jsimd_idct_6x6_dspr2
  1030. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1031. JDIMENSION output_col);
  1032. EXTERN(void) jsimd_idct_12x12_pass1_dspr2
  1033. (JCOEFPTR coef_block, void *dct_table, int *workspace);
  1034. EXTERN(void) jsimd_idct_12x12_pass2_dspr2
  1035. (int *workspace, int *output);
  1036. /* Accurate Integer Inverse DCT */
  1037. EXTERN(void) jsimd_idct_islow_mmx
  1038. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1039. JDIMENSION output_col);
  1040. extern const int jconst_idct_islow_sse2[];
  1041. EXTERN(void) jsimd_idct_islow_sse2
  1042. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1043. JDIMENSION output_col);
  1044. extern const int jconst_idct_islow_avx2[];
  1045. EXTERN(void) jsimd_idct_islow_avx2
  1046. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1047. JDIMENSION output_col);
  1048. EXTERN(void) jsimd_idct_islow_neon
  1049. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1050. JDIMENSION output_col);
  1051. EXTERN(void) jsimd_idct_islow_dspr2
  1052. (void *dct_table, JCOEFPTR coef_block, int *output_buf, JSAMPLE *output_col);
  1053. EXTERN(void) jsimd_idct_islow_mmi
  1054. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1055. JDIMENSION output_col);
  1056. EXTERN(void) jsimd_idct_islow_altivec
  1057. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1058. JDIMENSION output_col);
  1059. /* Fast Integer Inverse DCT */
  1060. EXTERN(void) jsimd_idct_ifast_mmx
  1061. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1062. JDIMENSION output_col);
  1063. extern const int jconst_idct_ifast_sse2[];
  1064. EXTERN(void) jsimd_idct_ifast_sse2
  1065. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1066. JDIMENSION output_col);
  1067. EXTERN(void) jsimd_idct_ifast_neon
  1068. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1069. JDIMENSION output_col);
  1070. EXTERN(void) jsimd_idct_ifast_cols_dspr2
  1071. (JCOEF *inptr, IFAST_MULT_TYPE *quantptr, DCTELEM *wsptr,
  1072. const int *idct_coefs);
  1073. EXTERN(void) jsimd_idct_ifast_rows_dspr2
  1074. (DCTELEM *wsptr, JSAMPARRAY output_buf, JDIMENSION output_col,
  1075. const int *idct_coefs);
  1076. EXTERN(void) jsimd_idct_ifast_mmi
  1077. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1078. JDIMENSION output_col);
  1079. EXTERN(void) jsimd_idct_ifast_altivec
  1080. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1081. JDIMENSION output_col);
  1082. /* Floating Point Inverse DCT */
  1083. EXTERN(void) jsimd_idct_float_3dnow
  1084. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1085. JDIMENSION output_col);
  1086. extern const int jconst_idct_float_sse[];
  1087. EXTERN(void) jsimd_idct_float_sse
  1088. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1089. JDIMENSION output_col);
  1090. extern const int jconst_idct_float_sse2[];
  1091. EXTERN(void) jsimd_idct_float_sse2
  1092. (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
  1093. JDIMENSION output_col);
  1094. /* Huffman coding */
  1095. extern const int jconst_huff_encode_one_block[];
  1096. EXTERN(JOCTET *) jsimd_huff_encode_one_block_sse2
  1097. (void *state, JOCTET *buffer, JCOEFPTR block, int last_dc_val,
  1098. c_derived_tbl *dctbl, c_derived_tbl *actbl);
  1099. EXTERN(JOCTET *) jsimd_huff_encode_one_block_neon
  1100. (void *state, JOCTET *buffer, JCOEFPTR block, int last_dc_val,
  1101. c_derived_tbl *dctbl, c_derived_tbl *actbl);
  1102. #ifndef NEON_INTRINSICS
  1103. EXTERN(JOCTET *) jsimd_huff_encode_one_block_neon_slowtbl
  1104. (void *state, JOCTET *buffer, JCOEFPTR block, int last_dc_val,
  1105. c_derived_tbl *dctbl, c_derived_tbl *actbl);
  1106. #endif
  1107. /* Progressive Huffman encoding */
  1108. EXTERN(void) jsimd_encode_mcu_AC_first_prepare_sse2
  1109. (const JCOEF *block, const int *jpeg_natural_order_start, int Sl, int Al,
  1110. JCOEF *values, size_t *zerobits);
  1111. EXTERN(void) jsimd_encode_mcu_AC_first_prepare_neon
  1112. (const JCOEF *block, const int *jpeg_natural_order_start, int Sl, int Al,
  1113. JCOEF *values, size_t *zerobits);
  1114. EXTERN(int) jsimd_encode_mcu_AC_refine_prepare_sse2
  1115. (const JCOEF *block, const int *jpeg_natural_order_start, int Sl, int Al,
  1116. JCOEF *absvalues, size_t *bits);
  1117. EXTERN(int) jsimd_encode_mcu_AC_refine_prepare_neon
  1118. (const JCOEF *block, const int *jpeg_natural_order_start, int Sl, int Al,
  1119. JCOEF *absvalues, size_t *bits);