jdmrgext-mmx.asm 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. ;
  2. ; jdmrgext.asm - merged upsampling/color conversion (MMX)
  3. ;
  4. ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
  5. ;
  6. ; Based on the x86 SIMD extension for IJG JPEG library
  7. ; Copyright (C) 1999-2006, MIYASAKA Masaru.
  8. ; For conditions of distribution and use, see copyright notice in jsimdext.inc
  9. ;
  10. ; This file should be assembled with NASM (Netwide Assembler),
  11. ; can *not* be assembled with Microsoft's MASM or any compatible
  12. ; assembler (including Borland's Turbo Assembler).
  13. ; NASM is available from http://nasm.sourceforge.net/ or
  14. ; http://sourceforge.net/project/showfiles.php?group_id=6208
  15. ;
  16. ; [TAB8]
  17. %include "jcolsamp.inc"
  18. ; --------------------------------------------------------------------------
  19. ;
  20. ; Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical.
  21. ;
  22. ; GLOBAL(void)
  23. ; jsimd_h2v1_merged_upsample_mmx (JDIMENSION output_width,
  24. ; JSAMPIMAGE input_buf,
  25. ; JDIMENSION in_row_group_ctr,
  26. ; JSAMPARRAY output_buf);
  27. ;
  28. %define output_width(b) (b)+8 ; JDIMENSION output_width
  29. %define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf
  30. %define in_row_group_ctr(b) (b)+16 ; JDIMENSION in_row_group_ctr
  31. %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
  32. %define original_ebp ebp+0
  33. %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM]
  34. %define WK_NUM 3
  35. %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr
  36. align 16
  37. global EXTN(jsimd_h2v1_merged_upsample_mmx)
  38. EXTN(jsimd_h2v1_merged_upsample_mmx):
  39. push ebp
  40. mov eax,esp ; eax = original ebp
  41. sub esp, byte 4
  42. and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits
  43. mov [esp],eax
  44. mov ebp,esp ; ebp = aligned ebp
  45. lea esp, [wk(0)]
  46. pushpic eax ; make a room for GOT address
  47. push ebx
  48. ; push ecx ; need not be preserved
  49. ; push edx ; need not be preserved
  50. push esi
  51. push edi
  52. get_GOT ebx ; get GOT address
  53. movpic POINTER [gotptr], ebx ; save GOT address
  54. mov ecx, JDIMENSION [output_width(eax)] ; col
  55. test ecx,ecx
  56. jz near .return
  57. push ecx
  58. mov edi, JSAMPIMAGE [input_buf(eax)]
  59. mov ecx, JDIMENSION [in_row_group_ctr(eax)]
  60. mov esi, JSAMPARRAY [edi+0*SIZEOF_JSAMPARRAY]
  61. mov ebx, JSAMPARRAY [edi+1*SIZEOF_JSAMPARRAY]
  62. mov edx, JSAMPARRAY [edi+2*SIZEOF_JSAMPARRAY]
  63. mov edi, JSAMPARRAY [output_buf(eax)]
  64. mov esi, JSAMPROW [esi+ecx*SIZEOF_JSAMPROW] ; inptr0
  65. mov ebx, JSAMPROW [ebx+ecx*SIZEOF_JSAMPROW] ; inptr1
  66. mov edx, JSAMPROW [edx+ecx*SIZEOF_JSAMPROW] ; inptr2
  67. mov edi, JSAMPROW [edi] ; outptr
  68. pop ecx ; col
  69. alignx 16,7
  70. .columnloop:
  71. movpic eax, POINTER [gotptr] ; load GOT address (eax)
  72. movq mm6, MMWORD [ebx] ; mm6=Cb(01234567)
  73. movq mm7, MMWORD [edx] ; mm7=Cr(01234567)
  74. pxor mm1,mm1 ; mm1=(all 0's)
  75. pcmpeqw mm3,mm3
  76. psllw mm3,7 ; mm3={0xFF80 0xFF80 0xFF80 0xFF80}
  77. movq mm4,mm6
  78. punpckhbw mm6,mm1 ; mm6=Cb(4567)=CbH
  79. punpcklbw mm4,mm1 ; mm4=Cb(0123)=CbL
  80. movq mm0,mm7
  81. punpckhbw mm7,mm1 ; mm7=Cr(4567)=CrH
  82. punpcklbw mm0,mm1 ; mm0=Cr(0123)=CrL
  83. paddw mm6,mm3
  84. paddw mm4,mm3
  85. paddw mm7,mm3
  86. paddw mm0,mm3
  87. ; (Original)
  88. ; R = Y + 1.40200 * Cr
  89. ; G = Y - 0.34414 * Cb - 0.71414 * Cr
  90. ; B = Y + 1.77200 * Cb
  91. ;
  92. ; (This implementation)
  93. ; R = Y + 0.40200 * Cr + Cr
  94. ; G = Y - 0.34414 * Cb + 0.28586 * Cr - Cr
  95. ; B = Y - 0.22800 * Cb + Cb + Cb
  96. movq mm5,mm6 ; mm5=CbH
  97. movq mm2,mm4 ; mm2=CbL
  98. paddw mm6,mm6 ; mm6=2*CbH
  99. paddw mm4,mm4 ; mm4=2*CbL
  100. movq mm1,mm7 ; mm1=CrH
  101. movq mm3,mm0 ; mm3=CrL
  102. paddw mm7,mm7 ; mm7=2*CrH
  103. paddw mm0,mm0 ; mm0=2*CrL
  104. pmulhw mm6,[GOTOFF(eax,PW_MF0228)] ; mm6=(2*CbH * -FIX(0.22800))
  105. pmulhw mm4,[GOTOFF(eax,PW_MF0228)] ; mm4=(2*CbL * -FIX(0.22800))
  106. pmulhw mm7,[GOTOFF(eax,PW_F0402)] ; mm7=(2*CrH * FIX(0.40200))
  107. pmulhw mm0,[GOTOFF(eax,PW_F0402)] ; mm0=(2*CrL * FIX(0.40200))
  108. paddw mm6,[GOTOFF(eax,PW_ONE)]
  109. paddw mm4,[GOTOFF(eax,PW_ONE)]
  110. psraw mm6,1 ; mm6=(CbH * -FIX(0.22800))
  111. psraw mm4,1 ; mm4=(CbL * -FIX(0.22800))
  112. paddw mm7,[GOTOFF(eax,PW_ONE)]
  113. paddw mm0,[GOTOFF(eax,PW_ONE)]
  114. psraw mm7,1 ; mm7=(CrH * FIX(0.40200))
  115. psraw mm0,1 ; mm0=(CrL * FIX(0.40200))
  116. paddw mm6,mm5
  117. paddw mm4,mm2
  118. paddw mm6,mm5 ; mm6=(CbH * FIX(1.77200))=(B-Y)H
  119. paddw mm4,mm2 ; mm4=(CbL * FIX(1.77200))=(B-Y)L
  120. paddw mm7,mm1 ; mm7=(CrH * FIX(1.40200))=(R-Y)H
  121. paddw mm0,mm3 ; mm0=(CrL * FIX(1.40200))=(R-Y)L
  122. movq MMWORD [wk(0)], mm6 ; wk(0)=(B-Y)H
  123. movq MMWORD [wk(1)], mm7 ; wk(1)=(R-Y)H
  124. movq mm6,mm5
  125. movq mm7,mm2
  126. punpcklwd mm5,mm1
  127. punpckhwd mm6,mm1
  128. pmaddwd mm5,[GOTOFF(eax,PW_MF0344_F0285)]
  129. pmaddwd mm6,[GOTOFF(eax,PW_MF0344_F0285)]
  130. punpcklwd mm2,mm3
  131. punpckhwd mm7,mm3
  132. pmaddwd mm2,[GOTOFF(eax,PW_MF0344_F0285)]
  133. pmaddwd mm7,[GOTOFF(eax,PW_MF0344_F0285)]
  134. paddd mm5,[GOTOFF(eax,PD_ONEHALF)]
  135. paddd mm6,[GOTOFF(eax,PD_ONEHALF)]
  136. psrad mm5,SCALEBITS
  137. psrad mm6,SCALEBITS
  138. paddd mm2,[GOTOFF(eax,PD_ONEHALF)]
  139. paddd mm7,[GOTOFF(eax,PD_ONEHALF)]
  140. psrad mm2,SCALEBITS
  141. psrad mm7,SCALEBITS
  142. packssdw mm5,mm6 ; mm5=CbH*-FIX(0.344)+CrH*FIX(0.285)
  143. packssdw mm2,mm7 ; mm2=CbL*-FIX(0.344)+CrL*FIX(0.285)
  144. psubw mm5,mm1 ; mm5=CbH*-FIX(0.344)+CrH*-FIX(0.714)=(G-Y)H
  145. psubw mm2,mm3 ; mm2=CbL*-FIX(0.344)+CrL*-FIX(0.714)=(G-Y)L
  146. movq MMWORD [wk(2)], mm5 ; wk(2)=(G-Y)H
  147. mov al,2 ; Yctr
  148. jmp short .Yloop_1st
  149. alignx 16,7
  150. .Yloop_2nd:
  151. movq mm0, MMWORD [wk(1)] ; mm0=(R-Y)H
  152. movq mm2, MMWORD [wk(2)] ; mm2=(G-Y)H
  153. movq mm4, MMWORD [wk(0)] ; mm4=(B-Y)H
  154. alignx 16,7
  155. .Yloop_1st:
  156. movq mm7, MMWORD [esi] ; mm7=Y(01234567)
  157. pcmpeqw mm6,mm6
  158. psrlw mm6,BYTE_BIT ; mm6={0xFF 0x00 0xFF 0x00 ..}
  159. pand mm6,mm7 ; mm6=Y(0246)=YE
  160. psrlw mm7,BYTE_BIT ; mm7=Y(1357)=YO
  161. movq mm1,mm0 ; mm1=mm0=(R-Y)(L/H)
  162. movq mm3,mm2 ; mm3=mm2=(G-Y)(L/H)
  163. movq mm5,mm4 ; mm5=mm4=(B-Y)(L/H)
  164. paddw mm0,mm6 ; mm0=((R-Y)+YE)=RE=(R0 R2 R4 R6)
  165. paddw mm1,mm7 ; mm1=((R-Y)+YO)=RO=(R1 R3 R5 R7)
  166. packuswb mm0,mm0 ; mm0=(R0 R2 R4 R6 ** ** ** **)
  167. packuswb mm1,mm1 ; mm1=(R1 R3 R5 R7 ** ** ** **)
  168. paddw mm2,mm6 ; mm2=((G-Y)+YE)=GE=(G0 G2 G4 G6)
  169. paddw mm3,mm7 ; mm3=((G-Y)+YO)=GO=(G1 G3 G5 G7)
  170. packuswb mm2,mm2 ; mm2=(G0 G2 G4 G6 ** ** ** **)
  171. packuswb mm3,mm3 ; mm3=(G1 G3 G5 G7 ** ** ** **)
  172. paddw mm4,mm6 ; mm4=((B-Y)+YE)=BE=(B0 B2 B4 B6)
  173. paddw mm5,mm7 ; mm5=((B-Y)+YO)=BO=(B1 B3 B5 B7)
  174. packuswb mm4,mm4 ; mm4=(B0 B2 B4 B6 ** ** ** **)
  175. packuswb mm5,mm5 ; mm5=(B1 B3 B5 B7 ** ** ** **)
  176. %if RGB_PIXELSIZE == 3 ; ---------------
  177. ; mmA=(00 02 04 06 ** ** ** **), mmB=(01 03 05 07 ** ** ** **)
  178. ; mmC=(10 12 14 16 ** ** ** **), mmD=(11 13 15 17 ** ** ** **)
  179. ; mmE=(20 22 24 26 ** ** ** **), mmF=(21 23 25 27 ** ** ** **)
  180. ; mmG=(** ** ** ** ** ** ** **), mmH=(** ** ** ** ** ** ** **)
  181. punpcklbw mmA,mmC ; mmA=(00 10 02 12 04 14 06 16)
  182. punpcklbw mmE,mmB ; mmE=(20 01 22 03 24 05 26 07)
  183. punpcklbw mmD,mmF ; mmD=(11 21 13 23 15 25 17 27)
  184. movq mmG,mmA
  185. movq mmH,mmA
  186. punpcklwd mmA,mmE ; mmA=(00 10 20 01 02 12 22 03)
  187. punpckhwd mmG,mmE ; mmG=(04 14 24 05 06 16 26 07)
  188. psrlq mmH,2*BYTE_BIT ; mmH=(02 12 04 14 06 16 -- --)
  189. psrlq mmE,2*BYTE_BIT ; mmE=(22 03 24 05 26 07 -- --)
  190. movq mmC,mmD
  191. movq mmB,mmD
  192. punpcklwd mmD,mmH ; mmD=(11 21 02 12 13 23 04 14)
  193. punpckhwd mmC,mmH ; mmC=(15 25 06 16 17 27 -- --)
  194. psrlq mmB,2*BYTE_BIT ; mmB=(13 23 15 25 17 27 -- --)
  195. movq mmF,mmE
  196. punpcklwd mmE,mmB ; mmE=(22 03 13 23 24 05 15 25)
  197. punpckhwd mmF,mmB ; mmF=(26 07 17 27 -- -- -- --)
  198. punpckldq mmA,mmD ; mmA=(00 10 20 01 11 21 02 12)
  199. punpckldq mmE,mmG ; mmE=(22 03 13 23 04 14 24 05)
  200. punpckldq mmC,mmF ; mmC=(15 25 06 16 26 07 17 27)
  201. cmp ecx, byte SIZEOF_MMWORD
  202. jb short .column_st16
  203. movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
  204. movq MMWORD [edi+1*SIZEOF_MMWORD], mmE
  205. movq MMWORD [edi+2*SIZEOF_MMWORD], mmC
  206. sub ecx, byte SIZEOF_MMWORD
  207. jz near .endcolumn
  208. add edi, byte RGB_PIXELSIZE*SIZEOF_MMWORD ; outptr
  209. add esi, byte SIZEOF_MMWORD ; inptr0
  210. dec al ; Yctr
  211. jnz near .Yloop_2nd
  212. add ebx, byte SIZEOF_MMWORD ; inptr1
  213. add edx, byte SIZEOF_MMWORD ; inptr2
  214. jmp near .columnloop
  215. alignx 16,7
  216. .column_st16:
  217. lea ecx, [ecx+ecx*2] ; imul ecx, RGB_PIXELSIZE
  218. cmp ecx, byte 2*SIZEOF_MMWORD
  219. jb short .column_st8
  220. movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
  221. movq MMWORD [edi+1*SIZEOF_MMWORD], mmE
  222. movq mmA,mmC
  223. sub ecx, byte 2*SIZEOF_MMWORD
  224. add edi, byte 2*SIZEOF_MMWORD
  225. jmp short .column_st4
  226. .column_st8:
  227. cmp ecx, byte SIZEOF_MMWORD
  228. jb short .column_st4
  229. movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
  230. movq mmA,mmE
  231. sub ecx, byte SIZEOF_MMWORD
  232. add edi, byte SIZEOF_MMWORD
  233. .column_st4:
  234. movd eax,mmA
  235. cmp ecx, byte SIZEOF_DWORD
  236. jb short .column_st2
  237. mov DWORD [edi+0*SIZEOF_DWORD], eax
  238. psrlq mmA,DWORD_BIT
  239. movd eax,mmA
  240. sub ecx, byte SIZEOF_DWORD
  241. add edi, byte SIZEOF_DWORD
  242. .column_st2:
  243. cmp ecx, byte SIZEOF_WORD
  244. jb short .column_st1
  245. mov WORD [edi+0*SIZEOF_WORD], ax
  246. shr eax,WORD_BIT
  247. sub ecx, byte SIZEOF_WORD
  248. add edi, byte SIZEOF_WORD
  249. .column_st1:
  250. cmp ecx, byte SIZEOF_BYTE
  251. jb short .endcolumn
  252. mov BYTE [edi+0*SIZEOF_BYTE], al
  253. %else ; RGB_PIXELSIZE == 4 ; -----------
  254. %ifdef RGBX_FILLER_0XFF
  255. pcmpeqb mm6,mm6 ; mm6=(X0 X2 X4 X6 ** ** ** **)
  256. pcmpeqb mm7,mm7 ; mm7=(X1 X3 X5 X7 ** ** ** **)
  257. %else
  258. pxor mm6,mm6 ; mm6=(X0 X2 X4 X6 ** ** ** **)
  259. pxor mm7,mm7 ; mm7=(X1 X3 X5 X7 ** ** ** **)
  260. %endif
  261. ; mmA=(00 02 04 06 ** ** ** **), mmB=(01 03 05 07 ** ** ** **)
  262. ; mmC=(10 12 14 16 ** ** ** **), mmD=(11 13 15 17 ** ** ** **)
  263. ; mmE=(20 22 24 26 ** ** ** **), mmF=(21 23 25 27 ** ** ** **)
  264. ; mmG=(30 32 34 36 ** ** ** **), mmH=(31 33 35 37 ** ** ** **)
  265. punpcklbw mmA,mmC ; mmA=(00 10 02 12 04 14 06 16)
  266. punpcklbw mmE,mmG ; mmE=(20 30 22 32 24 34 26 36)
  267. punpcklbw mmB,mmD ; mmB=(01 11 03 13 05 15 07 17)
  268. punpcklbw mmF,mmH ; mmF=(21 31 23 33 25 35 27 37)
  269. movq mmC,mmA
  270. punpcklwd mmA,mmE ; mmA=(00 10 20 30 02 12 22 32)
  271. punpckhwd mmC,mmE ; mmC=(04 14 24 34 06 16 26 36)
  272. movq mmG,mmB
  273. punpcklwd mmB,mmF ; mmB=(01 11 21 31 03 13 23 33)
  274. punpckhwd mmG,mmF ; mmG=(05 15 25 35 07 17 27 37)
  275. movq mmD,mmA
  276. punpckldq mmA,mmB ; mmA=(00 10 20 30 01 11 21 31)
  277. punpckhdq mmD,mmB ; mmD=(02 12 22 32 03 13 23 33)
  278. movq mmH,mmC
  279. punpckldq mmC,mmG ; mmC=(04 14 24 34 05 15 25 35)
  280. punpckhdq mmH,mmG ; mmH=(06 16 26 36 07 17 27 37)
  281. cmp ecx, byte SIZEOF_MMWORD
  282. jb short .column_st16
  283. movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
  284. movq MMWORD [edi+1*SIZEOF_MMWORD], mmD
  285. movq MMWORD [edi+2*SIZEOF_MMWORD], mmC
  286. movq MMWORD [edi+3*SIZEOF_MMWORD], mmH
  287. sub ecx, byte SIZEOF_MMWORD
  288. jz short .endcolumn
  289. add edi, byte RGB_PIXELSIZE*SIZEOF_MMWORD ; outptr
  290. add esi, byte SIZEOF_MMWORD ; inptr0
  291. dec al ; Yctr
  292. jnz near .Yloop_2nd
  293. add ebx, byte SIZEOF_MMWORD ; inptr1
  294. add edx, byte SIZEOF_MMWORD ; inptr2
  295. jmp near .columnloop
  296. alignx 16,7
  297. .column_st16:
  298. cmp ecx, byte SIZEOF_MMWORD/2
  299. jb short .column_st8
  300. movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
  301. movq MMWORD [edi+1*SIZEOF_MMWORD], mmD
  302. movq mmA,mmC
  303. movq mmD,mmH
  304. sub ecx, byte SIZEOF_MMWORD/2
  305. add edi, byte 2*SIZEOF_MMWORD
  306. .column_st8:
  307. cmp ecx, byte SIZEOF_MMWORD/4
  308. jb short .column_st4
  309. movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
  310. movq mmA,mmD
  311. sub ecx, byte SIZEOF_MMWORD/4
  312. add edi, byte 1*SIZEOF_MMWORD
  313. .column_st4:
  314. cmp ecx, byte SIZEOF_MMWORD/8
  315. jb short .endcolumn
  316. movd DWORD [edi+0*SIZEOF_DWORD], mmA
  317. %endif ; RGB_PIXELSIZE ; ---------------
  318. .endcolumn:
  319. emms ; empty MMX state
  320. .return:
  321. pop edi
  322. pop esi
  323. ; pop edx ; need not be preserved
  324. ; pop ecx ; need not be preserved
  325. pop ebx
  326. mov esp,ebp ; esp <- aligned ebp
  327. pop esp ; esp <- original ebp
  328. pop ebp
  329. ret
  330. ; --------------------------------------------------------------------------
  331. ;
  332. ; Upsample and color convert for the case of 2:1 horizontal and 2:1 vertical.
  333. ;
  334. ; GLOBAL(void)
  335. ; jsimd_h2v2_merged_upsample_mmx (JDIMENSION output_width,
  336. ; JSAMPIMAGE input_buf,
  337. ; JDIMENSION in_row_group_ctr,
  338. ; JSAMPARRAY output_buf);
  339. ;
  340. %define output_width(b) (b)+8 ; JDIMENSION output_width
  341. %define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf
  342. %define in_row_group_ctr(b) (b)+16 ; JDIMENSION in_row_group_ctr
  343. %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
  344. align 16
  345. global EXTN(jsimd_h2v2_merged_upsample_mmx)
  346. EXTN(jsimd_h2v2_merged_upsample_mmx):
  347. push ebp
  348. mov ebp,esp
  349. push ebx
  350. ; push ecx ; need not be preserved
  351. ; push edx ; need not be preserved
  352. push esi
  353. push edi
  354. mov eax, JDIMENSION [output_width(ebp)]
  355. mov edi, JSAMPIMAGE [input_buf(ebp)]
  356. mov ecx, JDIMENSION [in_row_group_ctr(ebp)]
  357. mov esi, JSAMPARRAY [edi+0*SIZEOF_JSAMPARRAY]
  358. mov ebx, JSAMPARRAY [edi+1*SIZEOF_JSAMPARRAY]
  359. mov edx, JSAMPARRAY [edi+2*SIZEOF_JSAMPARRAY]
  360. mov edi, JSAMPARRAY [output_buf(ebp)]
  361. lea esi, [esi+ecx*SIZEOF_JSAMPROW]
  362. push edx ; inptr2
  363. push ebx ; inptr1
  364. push esi ; inptr00
  365. mov ebx,esp
  366. push edi ; output_buf (outptr0)
  367. push ecx ; in_row_group_ctr
  368. push ebx ; input_buf
  369. push eax ; output_width
  370. call near EXTN(jsimd_h2v1_merged_upsample_mmx)
  371. add esi, byte SIZEOF_JSAMPROW ; inptr01
  372. add edi, byte SIZEOF_JSAMPROW ; outptr1
  373. mov POINTER [ebx+0*SIZEOF_POINTER], esi
  374. mov POINTER [ebx-1*SIZEOF_POINTER], edi
  375. call near EXTN(jsimd_h2v1_merged_upsample_mmx)
  376. add esp, byte 7*SIZEOF_DWORD
  377. pop edi
  378. pop esi
  379. ; pop edx ; need not be preserved
  380. ; pop ecx ; need not be preserved
  381. pop ebx
  382. pop ebp
  383. ret
  384. ; For some reason, the OS X linker does not honor the request to align the
  385. ; segment unless we do this.
  386. align 16