You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

563 lines
15KB

  1. /*
  2. * MMX optimized forward DCT
  3. * The gcc porting is Copyright (c) 2001 Fabrice Bellard.
  4. * cleanup/optimizations are Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
  5. * SSE2 optimization is Copyright (c) 2004 Denes Balatoni.
  6. *
  7. * from fdctam32.c - AP922 MMX(3D-Now) forward-DCT
  8. *
  9. * Intel Application Note AP-922 - fast, precise implementation of DCT
  10. * http://developer.intel.com/vtune/cbts/appnotes.htm
  11. *
  12. * Also of inspiration:
  13. * a page about fdct at http://www.geocities.com/ssavekar/dct.htm
  14. * Skal's fdct at http://skal.planet-d.net/coding/dct.html
  15. */
  16. #include "common.h"
  17. #include "../dsputil.h"
  18. #include "mmx.h"
  19. #define ATTR_ALIGN(align) __attribute__ ((__aligned__ (align)))
  20. //////////////////////////////////////////////////////////////////////
  21. //
  22. // constants for the forward DCT
  23. // -----------------------------
  24. //
  25. // Be sure to check that your compiler is aligning all constants to QWORD
  26. // (8-byte) memory boundaries! Otherwise the unaligned memory access will
  27. // severely stall MMX execution.
  28. //
  29. //////////////////////////////////////////////////////////////////////
  30. #define BITS_FRW_ACC 3 //; 2 or 3 for accuracy
  31. #define SHIFT_FRW_COL BITS_FRW_ACC
  32. #define SHIFT_FRW_ROW (BITS_FRW_ACC + 17 - 3)
  33. #define RND_FRW_ROW (1 << (SHIFT_FRW_ROW-1))
  34. //#define RND_FRW_COL (1 << (SHIFT_FRW_COL-1))
  35. //concatenated table, for forward DCT transformation
  36. static const int16_t fdct_tg_all_16[] ATTR_ALIGN(8) = {
  37. 13036, 13036, 13036, 13036, // tg * (2<<16) + 0.5
  38. 27146, 27146, 27146, 27146, // tg * (2<<16) + 0.5
  39. -21746, -21746, -21746, -21746, // tg * (2<<16) + 0.5
  40. };
  41. static const int16_t ocos_4_16[4] ATTR_ALIGN(8) = {
  42. 23170, 23170, 23170, 23170, //cos * (2<<15) + 0.5
  43. };
  44. static const int64_t fdct_one_corr ATTR_ALIGN(8) = 0x0001000100010001LL;
  45. static const int32_t fdct_r_row[2] ATTR_ALIGN(8) = {RND_FRW_ROW, RND_FRW_ROW };
  46. struct
  47. {
  48. const int32_t fdct_r_row_sse2[4] ATTR_ALIGN(16);
  49. } fdct_r_row_sse2 ATTR_ALIGN(16)=
  50. {{
  51. RND_FRW_ROW, RND_FRW_ROW, RND_FRW_ROW, RND_FRW_ROW
  52. }};
  53. //static const long fdct_r_row_sse2[4] ATTR_ALIGN(16) = {RND_FRW_ROW, RND_FRW_ROW, RND_FRW_ROW, RND_FRW_ROW};
  54. static const int16_t tab_frw_01234567[] ATTR_ALIGN(8) = { // forward_dct coeff table
  55. 16384, 16384, 22725, 19266,
  56. 16384, 16384, 12873, 4520,
  57. 21407, 8867, 19266, -4520,
  58. -8867, -21407, -22725, -12873,
  59. 16384, -16384, 12873, -22725,
  60. -16384, 16384, 4520, 19266,
  61. 8867, -21407, 4520, -12873,
  62. 21407, -8867, 19266, -22725,
  63. 22725, 22725, 31521, 26722,
  64. 22725, 22725, 17855, 6270,
  65. 29692, 12299, 26722, -6270,
  66. -12299, -29692, -31521, -17855,
  67. 22725, -22725, 17855, -31521,
  68. -22725, 22725, 6270, 26722,
  69. 12299, -29692, 6270, -17855,
  70. 29692, -12299, 26722, -31521,
  71. 21407, 21407, 29692, 25172,
  72. 21407, 21407, 16819, 5906,
  73. 27969, 11585, 25172, -5906,
  74. -11585, -27969, -29692, -16819,
  75. 21407, -21407, 16819, -29692,
  76. -21407, 21407, 5906, 25172,
  77. 11585, -27969, 5906, -16819,
  78. 27969, -11585, 25172, -29692,
  79. 19266, 19266, 26722, 22654,
  80. 19266, 19266, 15137, 5315,
  81. 25172, 10426, 22654, -5315,
  82. -10426, -25172, -26722, -15137,
  83. 19266, -19266, 15137, -26722,
  84. -19266, 19266, 5315, 22654,
  85. 10426, -25172, 5315, -15137,
  86. 25172, -10426, 22654, -26722,
  87. 16384, 16384, 22725, 19266,
  88. 16384, 16384, 12873, 4520,
  89. 21407, 8867, 19266, -4520,
  90. -8867, -21407, -22725, -12873,
  91. 16384, -16384, 12873, -22725,
  92. -16384, 16384, 4520, 19266,
  93. 8867, -21407, 4520, -12873,
  94. 21407, -8867, 19266, -22725,
  95. 19266, 19266, 26722, 22654,
  96. 19266, 19266, 15137, 5315,
  97. 25172, 10426, 22654, -5315,
  98. -10426, -25172, -26722, -15137,
  99. 19266, -19266, 15137, -26722,
  100. -19266, 19266, 5315, 22654,
  101. 10426, -25172, 5315, -15137,
  102. 25172, -10426, 22654, -26722,
  103. 21407, 21407, 29692, 25172,
  104. 21407, 21407, 16819, 5906,
  105. 27969, 11585, 25172, -5906,
  106. -11585, -27969, -29692, -16819,
  107. 21407, -21407, 16819, -29692,
  108. -21407, 21407, 5906, 25172,
  109. 11585, -27969, 5906, -16819,
  110. 27969, -11585, 25172, -29692,
  111. 22725, 22725, 31521, 26722,
  112. 22725, 22725, 17855, 6270,
  113. 29692, 12299, 26722, -6270,
  114. -12299, -29692, -31521, -17855,
  115. 22725, -22725, 17855, -31521,
  116. -22725, 22725, 6270, 26722,
  117. 12299, -29692, 6270, -17855,
  118. 29692, -12299, 26722, -31521,
  119. };
  120. struct
  121. {
  122. const int16_t tab_frw_01234567_sse2[256] ATTR_ALIGN(16);
  123. } tab_frw_01234567_sse2 ATTR_ALIGN(16) =
  124. {{
  125. //static const int16_t tab_frw_01234567_sse2[] ATTR_ALIGN(16) = { // forward_dct coeff table
  126. #define TABLE_SSE2 C4, C4, C1, C3, -C6, -C2, -C1, -C5, \
  127. C4, C4, C5, C7, C2, C6, C3, -C7, \
  128. -C4, C4, C7, C3, C6, -C2, C7, -C5, \
  129. C4, -C4, C5, -C1, C2, -C6, C3, -C1,
  130. // c1..c7 * cos(pi/4) * 2^15
  131. #define C1 22725
  132. #define C2 21407
  133. #define C3 19266
  134. #define C4 16384
  135. #define C5 12873
  136. #define C6 8867
  137. #define C7 4520
  138. TABLE_SSE2
  139. #undef C1
  140. #undef C2
  141. #undef C3
  142. #undef C4
  143. #undef C5
  144. #undef C6
  145. #undef C7
  146. #define C1 31521
  147. #define C2 29692
  148. #define C3 26722
  149. #define C4 22725
  150. #define C5 17855
  151. #define C6 12299
  152. #define C7 6270
  153. TABLE_SSE2
  154. #undef C1
  155. #undef C2
  156. #undef C3
  157. #undef C4
  158. #undef C5
  159. #undef C6
  160. #undef C7
  161. #define C1 29692
  162. #define C2 27969
  163. #define C3 25172
  164. #define C4 21407
  165. #define C5 16819
  166. #define C6 11585
  167. #define C7 5906
  168. TABLE_SSE2
  169. #undef C1
  170. #undef C2
  171. #undef C3
  172. #undef C4
  173. #undef C5
  174. #undef C6
  175. #undef C7
  176. #define C1 26722
  177. #define C2 25172
  178. #define C3 22654
  179. #define C4 19266
  180. #define C5 15137
  181. #define C6 10426
  182. #define C7 5315
  183. TABLE_SSE2
  184. #undef C1
  185. #undef C2
  186. #undef C3
  187. #undef C4
  188. #undef C5
  189. #undef C6
  190. #undef C7
  191. #define C1 22725
  192. #define C2 21407
  193. #define C3 19266
  194. #define C4 16384
  195. #define C5 12873
  196. #define C6 8867
  197. #define C7 4520
  198. TABLE_SSE2
  199. #undef C1
  200. #undef C2
  201. #undef C3
  202. #undef C4
  203. #undef C5
  204. #undef C6
  205. #undef C7
  206. #define C1 26722
  207. #define C2 25172
  208. #define C3 22654
  209. #define C4 19266
  210. #define C5 15137
  211. #define C6 10426
  212. #define C7 5315
  213. TABLE_SSE2
  214. #undef C1
  215. #undef C2
  216. #undef C3
  217. #undef C4
  218. #undef C5
  219. #undef C6
  220. #undef C7
  221. #define C1 29692
  222. #define C2 27969
  223. #define C3 25172
  224. #define C4 21407
  225. #define C5 16819
  226. #define C6 11585
  227. #define C7 5906
  228. TABLE_SSE2
  229. #undef C1
  230. #undef C2
  231. #undef C3
  232. #undef C4
  233. #undef C5
  234. #undef C6
  235. #undef C7
  236. #define C1 31521
  237. #define C2 29692
  238. #define C3 26722
  239. #define C4 22725
  240. #define C5 17855
  241. #define C6 12299
  242. #define C7 6270
  243. TABLE_SSE2
  244. }};
  245. static always_inline void fdct_col(const int16_t *in, int16_t *out, int offset)
  246. {
  247. movq_m2r(*(in + offset + 1 * 8), mm0);
  248. movq_m2r(*(in + offset + 6 * 8), mm1);
  249. movq_r2r(mm0, mm2);
  250. movq_m2r(*(in + offset + 2 * 8), mm3);
  251. paddsw_r2r(mm1, mm0);
  252. movq_m2r(*(in + offset + 5 * 8), mm4);
  253. psllw_i2r(SHIFT_FRW_COL, mm0);
  254. movq_m2r(*(in + offset + 0 * 8), mm5);
  255. paddsw_r2r(mm3, mm4);
  256. paddsw_m2r(*(in + offset + 7 * 8), mm5);
  257. psllw_i2r(SHIFT_FRW_COL, mm4);
  258. movq_r2r(mm0, mm6);
  259. psubsw_r2r(mm1, mm2);
  260. movq_m2r(*(fdct_tg_all_16 + 4), mm1);
  261. psubsw_r2r(mm4, mm0);
  262. movq_m2r(*(in + offset + 3 * 8), mm7);
  263. pmulhw_r2r(mm0, mm1);
  264. paddsw_m2r(*(in + offset + 4 * 8), mm7);
  265. psllw_i2r(SHIFT_FRW_COL, mm5);
  266. paddsw_r2r(mm4, mm6);
  267. psllw_i2r(SHIFT_FRW_COL, mm7);
  268. movq_r2r(mm5, mm4);
  269. psubsw_r2r(mm7, mm5);
  270. paddsw_r2r(mm5, mm1);
  271. paddsw_r2r(mm7, mm4);
  272. por_m2r(fdct_one_corr, mm1);
  273. psllw_i2r(SHIFT_FRW_COL + 1, mm2);
  274. pmulhw_m2r(*(fdct_tg_all_16 + 4), mm5);
  275. movq_r2r(mm4, mm7);
  276. psubsw_m2r(*(in + offset + 5 * 8), mm3);
  277. psubsw_r2r(mm6, mm4);
  278. movq_r2m(mm1, *(out + offset + 2 * 8));
  279. paddsw_r2r(mm6, mm7);
  280. movq_m2r(*(in + offset + 3 * 8), mm1);
  281. psllw_i2r(SHIFT_FRW_COL + 1, mm3);
  282. psubsw_m2r(*(in + offset + 4 * 8), mm1);
  283. movq_r2r(mm2, mm6);
  284. movq_r2m(mm4, *(out + offset + 4 * 8));
  285. paddsw_r2r(mm3, mm2);
  286. pmulhw_m2r(*ocos_4_16, mm2);
  287. psubsw_r2r(mm3, mm6);
  288. pmulhw_m2r(*ocos_4_16, mm6);
  289. psubsw_r2r(mm0, mm5);
  290. por_m2r(fdct_one_corr, mm5);
  291. psllw_i2r(SHIFT_FRW_COL, mm1);
  292. por_m2r(fdct_one_corr, mm2);
  293. movq_r2r(mm1, mm4);
  294. movq_m2r(*(in + offset + 0 * 8), mm3);
  295. paddsw_r2r(mm6, mm1);
  296. psubsw_m2r(*(in + offset + 7 * 8), mm3);
  297. psubsw_r2r(mm6, mm4);
  298. movq_m2r(*(fdct_tg_all_16 + 0), mm0);
  299. psllw_i2r(SHIFT_FRW_COL, mm3);
  300. movq_m2r(*(fdct_tg_all_16 + 8), mm6);
  301. pmulhw_r2r(mm1, mm0);
  302. movq_r2m(mm7, *(out + offset + 0 * 8));
  303. pmulhw_r2r(mm4, mm6);
  304. movq_r2m(mm5, *(out + offset + 6 * 8));
  305. movq_r2r(mm3, mm7);
  306. movq_m2r(*(fdct_tg_all_16 + 8), mm5);
  307. psubsw_r2r(mm2, mm7);
  308. paddsw_r2r(mm2, mm3);
  309. pmulhw_r2r(mm7, mm5);
  310. paddsw_r2r(mm3, mm0);
  311. paddsw_r2r(mm4, mm6);
  312. pmulhw_m2r(*(fdct_tg_all_16 + 0), mm3);
  313. por_m2r(fdct_one_corr, mm0);
  314. paddsw_r2r(mm7, mm5);
  315. psubsw_r2r(mm6, mm7);
  316. movq_r2m(mm0, *(out + offset + 1 * 8));
  317. paddsw_r2r(mm4, mm5);
  318. movq_r2m(mm7, *(out + offset + 3 * 8));
  319. psubsw_r2r(mm1, mm3);
  320. movq_r2m(mm5, *(out + offset + 5 * 8));
  321. movq_r2m(mm3, *(out + offset + 7 * 8));
  322. }
  323. static always_inline void fdct_row_sse2(const int16_t *in, int16_t *out)
  324. {
  325. asm volatile(
  326. ".macro FDCT_ROW_SSE2_H1 i t \n\t"
  327. "movq \\i(%0), %%xmm2 \n\t"
  328. "movq \\i+8(%0), %%xmm0 \n\t"
  329. "movdqa \\t+32(%1), %%xmm3 \n\t"
  330. "movdqa \\t+48(%1), %%xmm7 \n\t"
  331. "movdqa \\t(%1), %%xmm4 \n\t"
  332. "movdqa \\t+16(%1), %%xmm5 \n\t"
  333. ".endm \n\t"
  334. ".macro FDCT_ROW_SSE2_H2 i t \n\t"
  335. "movq \\i(%0), %%xmm2 \n\t"
  336. "movq \\i+8(%0), %%xmm0 \n\t"
  337. "movdqa \\t+32(%1), %%xmm3 \n\t"
  338. "movdqa \\t+48(%1), %%xmm7 \n\t"
  339. ".endm \n\t"
  340. ".macro FDCT_ROW_SSE2 i \n\t"
  341. "movq %%xmm2, %%xmm1 \n\t"
  342. "pshuflw $27, %%xmm0, %%xmm0 \n\t"
  343. "paddsw %%xmm0, %%xmm1 \n\t"
  344. "psubsw %%xmm0, %%xmm2 \n\t"
  345. "punpckldq %%xmm2, %%xmm1 \n\t"
  346. "pshufd $78, %%xmm1, %%xmm2 \n\t"
  347. "pmaddwd %%xmm2, %%xmm3 \n\t"
  348. "pmaddwd %%xmm1, %%xmm7 \n\t"
  349. "pmaddwd %%xmm5, %%xmm2 \n\t"
  350. "pmaddwd %%xmm4, %%xmm1 \n\t"
  351. "paddd %%xmm7, %%xmm3 \n\t"
  352. "paddd %%xmm2, %%xmm1 \n\t"
  353. "paddd %%xmm6, %%xmm3 \n\t"
  354. "paddd %%xmm6, %%xmm1 \n\t"
  355. "psrad %3, %%xmm3 \n\t"
  356. "psrad %3, %%xmm1 \n\t"
  357. "packssdw %%xmm3, %%xmm1 \n\t"
  358. "movdqa %%xmm1, \\i(%4) \n\t"
  359. ".endm \n\t"
  360. "movdqa (%2), %%xmm6 \n\t"
  361. "FDCT_ROW_SSE2_H1 0 0 \n\t"
  362. "FDCT_ROW_SSE2 0 \n\t"
  363. "FDCT_ROW_SSE2_H2 64 0 \n\t"
  364. "FDCT_ROW_SSE2 64 \n\t"
  365. "FDCT_ROW_SSE2_H1 16 64 \n\t"
  366. "FDCT_ROW_SSE2 16 \n\t"
  367. "FDCT_ROW_SSE2_H2 112 64 \n\t"
  368. "FDCT_ROW_SSE2 112 \n\t"
  369. "FDCT_ROW_SSE2_H1 32 128 \n\t"
  370. "FDCT_ROW_SSE2 32 \n\t"
  371. "FDCT_ROW_SSE2_H2 96 128 \n\t"
  372. "FDCT_ROW_SSE2 96 \n\t"
  373. "FDCT_ROW_SSE2_H1 48 192 \n\t"
  374. "FDCT_ROW_SSE2 48 \n\t"
  375. "FDCT_ROW_SSE2_H2 80 192 \n\t"
  376. "FDCT_ROW_SSE2 80 \n\t"
  377. :
  378. : "r" (in), "r" (tab_frw_01234567_sse2.tab_frw_01234567_sse2), "r" (fdct_r_row_sse2.fdct_r_row_sse2), "i" (SHIFT_FRW_ROW), "r" (out)
  379. );
  380. }
  381. static always_inline void fdct_row_mmx2(const int16_t *in, int16_t *out, const int16_t *table)
  382. {
  383. pshufw_m2r(*(in + 4), mm5, 0x1B);
  384. movq_m2r(*(in + 0), mm0);
  385. movq_r2r(mm0, mm1);
  386. paddsw_r2r(mm5, mm0);
  387. psubsw_r2r(mm5, mm1);
  388. movq_r2r(mm0, mm2);
  389. punpckldq_r2r(mm1, mm0);
  390. punpckhdq_r2r(mm1, mm2);
  391. movq_m2r(*(table + 0), mm1);
  392. movq_m2r(*(table + 4), mm3);
  393. movq_m2r(*(table + 8), mm4);
  394. movq_m2r(*(table + 12), mm5);
  395. movq_m2r(*(table + 16), mm6);
  396. movq_m2r(*(table + 20), mm7);
  397. pmaddwd_r2r(mm0, mm1);
  398. pmaddwd_r2r(mm2, mm3);
  399. pmaddwd_r2r(mm0, mm4);
  400. pmaddwd_r2r(mm2, mm5);
  401. pmaddwd_r2r(mm0, mm6);
  402. pmaddwd_r2r(mm2, mm7);
  403. pmaddwd_m2r(*(table + 24), mm0);
  404. pmaddwd_m2r(*(table + 28), mm2);
  405. paddd_r2r(mm1, mm3);
  406. paddd_r2r(mm4, mm5);
  407. paddd_r2r(mm6, mm7);
  408. paddd_r2r(mm0, mm2);
  409. movq_m2r(*fdct_r_row, mm0);
  410. paddd_r2r(mm0, mm3);
  411. paddd_r2r(mm0, mm5);
  412. paddd_r2r(mm0, mm7);
  413. paddd_r2r(mm0, mm2);
  414. psrad_i2r(SHIFT_FRW_ROW, mm3);
  415. psrad_i2r(SHIFT_FRW_ROW, mm5);
  416. psrad_i2r(SHIFT_FRW_ROW, mm7);
  417. psrad_i2r(SHIFT_FRW_ROW, mm2);
  418. packssdw_r2r(mm5, mm3);
  419. packssdw_r2r(mm2, mm7);
  420. movq_r2m(mm3, *(out + 0));
  421. movq_r2m(mm7, *(out + 4));
  422. }
  423. static always_inline void fdct_row_mmx(const int16_t *in, int16_t *out, const int16_t *table)
  424. {
  425. //FIXME reorder (i dont have a old mmx only cpu here to benchmark ...)
  426. movd_m2r(*(in + 6), mm1);
  427. punpcklwd_m2r(*(in + 4), mm1);
  428. movq_r2r(mm1, mm2);
  429. psrlq_i2r(0x20, mm1);
  430. movq_m2r(*(in + 0), mm0);
  431. punpcklwd_r2r(mm2, mm1);
  432. movq_r2r(mm0, mm5);
  433. paddsw_r2r(mm1, mm0);
  434. psubsw_r2r(mm1, mm5);
  435. movq_r2r(mm0, mm2);
  436. punpckldq_r2r(mm5, mm0);
  437. punpckhdq_r2r(mm5, mm2);
  438. movq_m2r(*(table + 0), mm1);
  439. movq_m2r(*(table + 4), mm3);
  440. movq_m2r(*(table + 8), mm4);
  441. movq_m2r(*(table + 12), mm5);
  442. movq_m2r(*(table + 16), mm6);
  443. movq_m2r(*(table + 20), mm7);
  444. pmaddwd_r2r(mm0, mm1);
  445. pmaddwd_r2r(mm2, mm3);
  446. pmaddwd_r2r(mm0, mm4);
  447. pmaddwd_r2r(mm2, mm5);
  448. pmaddwd_r2r(mm0, mm6);
  449. pmaddwd_r2r(mm2, mm7);
  450. pmaddwd_m2r(*(table + 24), mm0);
  451. pmaddwd_m2r(*(table + 28), mm2);
  452. paddd_r2r(mm1, mm3);
  453. paddd_r2r(mm4, mm5);
  454. paddd_r2r(mm6, mm7);
  455. paddd_r2r(mm0, mm2);
  456. movq_m2r(*fdct_r_row, mm0);
  457. paddd_r2r(mm0, mm3);
  458. paddd_r2r(mm0, mm5);
  459. paddd_r2r(mm0, mm7);
  460. paddd_r2r(mm0, mm2);
  461. psrad_i2r(SHIFT_FRW_ROW, mm3);
  462. psrad_i2r(SHIFT_FRW_ROW, mm5);
  463. psrad_i2r(SHIFT_FRW_ROW, mm7);
  464. psrad_i2r(SHIFT_FRW_ROW, mm2);
  465. packssdw_r2r(mm5, mm3);
  466. packssdw_r2r(mm2, mm7);
  467. movq_r2m(mm3, *(out + 0));
  468. movq_r2m(mm7, *(out + 4));
  469. }
  470. void ff_fdct_mmx(int16_t *block)
  471. {
  472. int64_t align_tmp[16] ATTR_ALIGN(8);
  473. int16_t * const block_tmp= (int16_t*)align_tmp;
  474. int16_t *block1, *out;
  475. const int16_t *table;
  476. int i;
  477. block1 = block_tmp;
  478. fdct_col(block, block1, 0);
  479. fdct_col(block, block1, 4);
  480. block1 = block_tmp;
  481. table = tab_frw_01234567;
  482. out = block;
  483. for(i=8;i>0;i--) {
  484. fdct_row_mmx(block1, out, table);
  485. block1 += 8;
  486. table += 32;
  487. out += 8;
  488. }
  489. }
  490. void ff_fdct_mmx2(int16_t *block)
  491. {
  492. int64_t align_tmp[16] ATTR_ALIGN(8);
  493. int16_t * const block_tmp= (int16_t*)align_tmp;
  494. int16_t *block1, *out;
  495. const int16_t *table;
  496. int i;
  497. block1 = block_tmp;
  498. fdct_col(block, block1, 0);
  499. fdct_col(block, block1, 4);
  500. block1 = block_tmp;
  501. table = tab_frw_01234567;
  502. out = block;
  503. for(i=8;i>0;i--) {
  504. fdct_row_mmx2(block1, out, table);
  505. block1 += 8;
  506. table += 32;
  507. out += 8;
  508. }
  509. }
  510. void ff_fdct_sse2(int16_t *block)
  511. {
  512. int64_t align_tmp[16] ATTR_ALIGN(8);
  513. int16_t * const block_tmp= (int16_t*)align_tmp;
  514. int16_t *block1;
  515. block1 = block_tmp;
  516. fdct_col(block, block1, 0);
  517. fdct_col(block, block1, 4);
  518. fdct_row_sse2(block1, block);
  519. }