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.

424 lines
24KB

  1. /*
  2. * Loongson SIMD optimized simple idct
  3. *
  4. * Copyright (c) 2015 Loongson Technology Corporation Limited
  5. * Copyright (c) 2015 Zhou Xiaoyong <zhouxiaoyong@loongson.cn>
  6. * Zhang Shuangshuang <zhangshuangshuang@ict.ac.cn>
  7. *
  8. * This file is part of FFmpeg.
  9. *
  10. * FFmpeg is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU Lesser General Public
  12. * License as published by the Free Software Foundation; either
  13. * version 2.1 of the License, or (at your option) any later version.
  14. *
  15. * FFmpeg is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * Lesser General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Lesser General Public
  21. * License along with FFmpeg; if not, write to the Free Software
  22. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  23. */
  24. #include "idctdsp_mips.h"
  25. #include "constants.h"
  26. #include "libavutil/mips/asmdefs.h"
  27. #include "libavutil/mips/mmiutils.h"
  28. #define W1 22725 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
  29. #define W2 21407 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
  30. #define W3 19266 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
  31. #define W4 16383 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
  32. #define W5 12873 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
  33. #define W6 8867 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
  34. #define W7 4520 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
  35. #define ROW_SHIFT 11
  36. #define COL_SHIFT 20
  37. #define DC_SHIFT 3
  38. DECLARE_ALIGNED(16, const int16_t, W_arr)[46] = {
  39. W4, W2, W4, W6,
  40. W1, W3, W5, W7,
  41. W4, W6, -W4, -W2,
  42. W3, -W7, -W1, -W5,
  43. W4, -W6, -W4, W2,
  44. W5, -W1, W7, W3,
  45. W4, -W2, W4, -W6,
  46. W7, -W5, W3, -W1,
  47. 1024, 0, 1024, 0, //ff_p32_1024 = 0x0000040000000400ULL
  48. 0, -1, -1, -1, //mask = 0xffffffffffff0000ULL
  49. 32, 32, 32, 32 //ff_p16_32 = 0x0020002000200020ULL
  50. };
  51. void ff_simple_idct_8_mmi(int16_t *block)
  52. {
  53. BACKUP_REG
  54. __asm__ volatile (
  55. #define IDCT_ROW_COND_DC(src1, src2) \
  56. "dmfc1 $11, "#src1" \n\t" \
  57. "dmfc1 $12, "#src2" \n\t" \
  58. "and $11, $11, $9 \n\t" \
  59. "or $10, $11, $12 \n\t" \
  60. "beqz $10, 1f \n\t" \
  61. \
  62. "punpcklhw $f30, "#src1", "#src2" \n\t" \
  63. "punpckhhw $f31, "#src1", "#src2" \n\t" \
  64. /* s6, s4, s2, s0 */ \
  65. "punpcklhw "#src1", $f30, $f31 \n\t" \
  66. /* s7, s5, s3, s1 */ \
  67. "punpckhhw "#src2", $f30, $f31 \n\t" \
  68. \
  69. "pmaddhw $f30, "#src1", $f18 \n\t" \
  70. "pmaddhw $f31, "#src2", $f19 \n\t" \
  71. "paddw $f28, $f30, $f31 \n\t" \
  72. "psubw $f29, $f30, $f31 \n\t" \
  73. "punpcklwd $f30, $f28, $f29 \n\t" \
  74. "punpckhwd $f31, $f28, $f29 \n\t" \
  75. "paddw $f26, $f30, $f31 \n\t" \
  76. "paddw $f26, $f26, $f16 \n\t" \
  77. /* $f26: src[7], src[0] */ \
  78. "psraw $f26, $f26, $f17 \n\t" \
  79. \
  80. "pmaddhw $f30, "#src1", $f20 \n\t" \
  81. "pmaddhw $f31, "#src2", $f21 \n\t" \
  82. "paddw $f28, $f30, $f31 \n\t" \
  83. "psubw $f29, $f30, $f31 \n\t" \
  84. "punpcklwd $f30, $f28, $f29 \n\t" \
  85. "punpckhwd $f31, $f28, $f29 \n\t" \
  86. "paddw $f27, $f30, $f31 \n\t" \
  87. "paddw $f27, $f27, $f16 \n\t" \
  88. /* $f27: src[6], src[1] */ \
  89. "psraw $f27, $f27, $f17 \n\t" \
  90. \
  91. "pmaddhw $f30, "#src1", $f22 \n\t" \
  92. "pmaddhw $f31, "#src2", $f23 \n\t" \
  93. "paddw $f28, $f30, $f31 \n\t" \
  94. "psubw $f29, $f30, $f31 \n\t" \
  95. "punpcklwd $f30, $f28, $f29 \n\t" \
  96. "punpckhwd $f31, $f28, $f29 \n\t" \
  97. "paddw $f28, $f30, $f31 \n\t" \
  98. "paddw $f28, $f28, $f16 \n\t" \
  99. /* $f28: src[5], src[2] */ \
  100. "psraw $f28, $f28, $f17 \n\t" \
  101. \
  102. "pmaddhw $f30, "#src1", $f24 \n\t" \
  103. "pmaddhw $f31, "#src2", $f25 \n\t" \
  104. "paddw "#src1", $f30, $f31 \n\t" \
  105. "psubw "#src2", $f30, $f31 \n\t" \
  106. "punpcklwd $f30, "#src1", "#src2" \n\t" \
  107. "punpckhwd $f31, "#src1", "#src2" \n\t" \
  108. "paddw $f29, $f30, $f31 \n\t" \
  109. "paddw $f29, $f29, $f16 \n\t" \
  110. /* $f29: src[4], src[3] */ \
  111. "psraw $f29, $f29, $f17 \n\t" \
  112. \
  113. "punpcklhw "#src1", $f26, $f27 \n\t" \
  114. "punpckhhw $f30, $f27, $f26 \n\t" \
  115. "punpcklhw $f31, $f28, $f29 \n\t" \
  116. "punpckhhw "#src2", $f29, $f28 \n\t" \
  117. /* src[3], src[2], src[1], src[0] */ \
  118. "punpcklwd "#src1", "#src1", $f31 \n\t" \
  119. /* src[7], src[6], src[5], src[4] */ \
  120. "punpcklwd "#src2", "#src2", $f30 \n\t" \
  121. "j 2f \n\t" \
  122. \
  123. "1: \n\t" \
  124. "li $10, 3 \n\t" \
  125. "dmtc1 $10, $f30 \n\t" \
  126. "psllh $f28, "#src1", $f30 \n\t" \
  127. "dmtc1 $9, $f31 \n\t" \
  128. "punpcklhw $f29, $f28, $f28 \n\t" \
  129. "and $f29, $f29, $f31 \n\t" \
  130. "paddw $f28, $f28, $f29 \n\t" \
  131. "punpcklwd "#src1", $f28, $f28 \n\t" \
  132. "punpcklwd "#src2", $f28, $f28 \n\t" \
  133. "2: \n\t" \
  134. /* idctRowCondDC row0~8 */
  135. /* load W */
  136. "gslqc1 $f19, $f18, 0x00(%[w_arr]) \n\t"
  137. "gslqc1 $f21, $f20, 0x10(%[w_arr]) \n\t"
  138. "gslqc1 $f23, $f22, 0x20(%[w_arr]) \n\t"
  139. "gslqc1 $f25, $f24, 0x30(%[w_arr]) \n\t"
  140. "gslqc1 $f17, $f16, 0x40(%[w_arr]) \n\t"
  141. /* load source in block */
  142. "gslqc1 $f1, $f0, 0x00(%[block]) \n\t"
  143. "gslqc1 $f3, $f2, 0x10(%[block]) \n\t"
  144. "gslqc1 $f5, $f4, 0x20(%[block]) \n\t"
  145. "gslqc1 $f7, $f6, 0x30(%[block]) \n\t"
  146. "gslqc1 $f9, $f8, 0x40(%[block]) \n\t"
  147. "gslqc1 $f11, $f10, 0x50(%[block]) \n\t"
  148. "gslqc1 $f13, $f12, 0x60(%[block]) \n\t"
  149. "gslqc1 $f15, $f14, 0x70(%[block]) \n\t"
  150. /* $9: mask ; $f17: ROW_SHIFT */
  151. "dmfc1 $9, $f17 \n\t"
  152. "li $10, 11 \n\t"
  153. "mtc1 $10, $f17 \n\t"
  154. IDCT_ROW_COND_DC($f0,$f1)
  155. IDCT_ROW_COND_DC($f2,$f3)
  156. IDCT_ROW_COND_DC($f4,$f5)
  157. IDCT_ROW_COND_DC($f6,$f7)
  158. IDCT_ROW_COND_DC($f8,$f9)
  159. IDCT_ROW_COND_DC($f10,$f11)
  160. IDCT_ROW_COND_DC($f12,$f13)
  161. IDCT_ROW_COND_DC($f14,$f15)
  162. #define IDCT_COL_CASE1(src, out1, out2) \
  163. "pmaddhw $f26, "#src", $f18 \n\t" \
  164. "pmaddhw $f27, "#src", $f20 \n\t" \
  165. "pmaddhw $f28, "#src", $f22 \n\t" \
  166. "pmaddhw $f29, "#src", $f24 \n\t" \
  167. \
  168. "punpcklwd $f30, $f26, $f26 \n\t" \
  169. "punpckhwd $f31, $f26, $f26 \n\t" \
  170. /* $f26: src[0], src[56] */ \
  171. "paddw $f26, $f30, $f31 \n\t" \
  172. "punpcklwd $f30, $f27, $f27 \n\t" \
  173. "punpckhwd $f31, $f27, $f27 \n\t" \
  174. /* $f27: src[8], src[48] */ \
  175. "paddw $f27, $f30, $f31 \n\t" \
  176. "punpcklwd $f30, $f28, $f28 \n\t" \
  177. "punpckhwd $f31, $f28, $f28 \n\t" \
  178. /* $f28: src[16], src[40] */ \
  179. "paddw $f28, $f30, $f31 \n\t" \
  180. "punpcklwd $f30, $f29, $f29 \n\t" \
  181. "punpckhwd $f31, $f29, $f29 \n\t" \
  182. /* $f29: src[24], src[32] */ \
  183. "paddw $f29, $f30, $f31 \n\t" \
  184. \
  185. /* out1: src[24], src[16], src[8], src[0] */ \
  186. /* out2: src[56], src[48], src[40], src[32] */ \
  187. "punpcklhw $f30, $f26, $f27 \n\t" \
  188. "punpcklhw $f31, $f28, $f29 \n\t" \
  189. "punpckhwd "#out1", $f30, $f31 \n\t" \
  190. "psrah "#out1", "#out1", $f16 \n\t" \
  191. "punpcklhw $f30, $f27, $f26 \n\t" \
  192. "punpcklhw $f31, $f29, $f28 \n\t" \
  193. "punpckhwd "#out2", $f31, $f30 \n\t" \
  194. "psrah "#out2", "#out2", $f16 \n\t"
  195. #define IDCT_COL_CASE2(src1, src2, out1, out2) \
  196. "pmaddhw $f28, "#src1", $f18 \n\t" \
  197. "pmaddhw $f29, "#src2", $f19 \n\t" \
  198. "paddw $f30, $f28, $f29 \n\t" \
  199. "psubw $f31, $f28, $f29 \n\t" \
  200. "punpcklwd $f28, $f30, $f31 \n\t" \
  201. "punpckhwd $f29, $f30, $f31 \n\t" \
  202. "pmaddhw $f30, "#src1", $f20 \n\t" \
  203. "pmaddhw $f31, "#src2", $f21 \n\t" \
  204. /* $f26: src[0], src[56] */ \
  205. "paddw $f26, $f28, $f29 \n\t" \
  206. "paddw $f28, $f30, $f31 \n\t" \
  207. "psubw $f29, $f30, $f31 \n\t" \
  208. "punpcklwd $f30, $f28, $f29 \n\t" \
  209. "punpckhwd $f31, $f28, $f29 \n\t" \
  210. "pmaddhw $f28, "#src1", $f22 \n\t" \
  211. "pmaddhw $f29, "#src2", $f23 \n\t" \
  212. /* $f27: src[8], src[48] */ \
  213. "paddw $f27, $f30, $f31 \n\t" \
  214. "paddw $f30, $f28, $f29 \n\t" \
  215. "psubw $f31, $f28, $f29 \n\t" \
  216. "punpcklwd $f28, $f30, $f31 \n\t" \
  217. "punpckhwd $f29, $f30, $f31 \n\t" \
  218. "pmaddhw $f30, "#src1", $f24 \n\t" \
  219. "pmaddhw $f31, "#src2", $f25 \n\t" \
  220. /* $f28: src[16], src[40] */ \
  221. "paddw $f28, $f28, $f29 \n\t" \
  222. "paddw "#out1", $f30, $f31 \n\t" \
  223. "psubw "#out2", $f30, $f31 \n\t" \
  224. "punpcklwd $f30, "#out1", "#out2" \n\t" \
  225. "punpckhwd $f31, "#out1", "#out2" \n\t" \
  226. /* $f29: src[24], src[32] */ \
  227. "paddw $f29, $f30, $f31 \n\t" \
  228. \
  229. /* out1: src[24], src[16], src[8], src[0] */ \
  230. /* out2: src[56], src[48], src[40], src[32] */ \
  231. "punpcklhw "#out1", $f26, $f27 \n\t" \
  232. "punpckhhw "#out2", $f27, $f26 \n\t" \
  233. "punpcklhw $f30, $f28, $f29 \n\t" \
  234. "punpckhhw $f31, $f29, $f28 \n\t" \
  235. "punpckhwd "#out1", "#out1", $f30 \n\t" \
  236. "punpckhwd "#out2", $f31, "#out2" \n\t" \
  237. "psrah "#out1", "#out1", $f16 \n\t" \
  238. "psrah "#out2", "#out2", $f16 \n\t"
  239. /* idctSparseCol col0~3 */
  240. /* $f17: ff_p16_32; $f16: COL_SHIFT-16 */
  241. "gsldlc1 $f17, 0x57(%[w_arr]) \n\t"
  242. "gsldrc1 $f17, 0x50(%[w_arr]) \n\t"
  243. "li $10, 4 \n\t"
  244. "dmtc1 $10, $f16 \n\t"
  245. "paddh $f0, $f0, $f17 \n\t"
  246. /* Transpose row[0,2,4,6] */
  247. "punpcklhw $f26, $f0, $f4 \n\t"
  248. "punpckhhw $f27, $f0, $f4 \n\t"
  249. "punpcklhw $f28, $f8, $f12 \n\t"
  250. "punpckhhw $f29, $f8, $f12 \n\t"
  251. "punpcklwd $f0, $f26, $f28 \n\t"
  252. "punpckhwd $f4, $f26, $f28 \n\t"
  253. "punpcklwd $f8, $f27, $f29 \n\t"
  254. "punpckhwd $f12, $f27, $f29 \n\t"
  255. "or $f26, $f2, $f6 \n\t"
  256. "or $f26, $f26, $f10 \n\t"
  257. "or $f26, $f26, $f14 \n\t"
  258. "dmfc1 $10, $f26 \n\t"
  259. "bnez $10, 1f \n\t"
  260. /* case1: In this case, row[1,3,5,7] are all zero */
  261. /* col0: $f0: col[24,16,8,0]; $f2: col[56,48,40,32] */
  262. IDCT_COL_CASE1($f0, $f0, $f2)
  263. /* col1: $f4: col[25,17,9,1]; $f6: col[57,49,41,33] */
  264. IDCT_COL_CASE1($f4, $f4, $f6)
  265. /* col2: $f8: col[26,18,10,2]; $f10: col[58,50,42,34] */
  266. IDCT_COL_CASE1($f8, $f8, $f10)
  267. /* col3: $f12: col[27,19,11,3]; $f14: col[59,51,43,35] */
  268. IDCT_COL_CASE1($f12, $f12, $f14)
  269. "j 2f \n\t"
  270. "1: \n\t"
  271. /* case2: row[1,3,5,7] are not all zero */
  272. /* Transpose */
  273. "punpcklhw $f26, $f2, $f6 \n\t"
  274. "punpckhhw $f27, $f2, $f6 \n\t"
  275. "punpcklhw $f28, $f10, $f14 \n\t"
  276. "punpckhhw $f29, $f10, $f14 \n\t"
  277. "punpcklwd $f2, $f26, $f28 \n\t"
  278. "punpckhwd $f6, $f26, $f28 \n\t"
  279. "punpcklwd $f10, $f27, $f29 \n\t"
  280. "punpckhwd $f14, $f27, $f29 \n\t"
  281. /* col0: $f0: col[24,16,8,0]; $f2: col[56,48,40,32] */
  282. IDCT_COL_CASE2($f0, $f2, $f0, $f2)
  283. /* col1: $f4: col[25,17,9,1]; $f6: col[57,49,41,33] */
  284. IDCT_COL_CASE2($f4, $f6, $f4, $f6)
  285. /* col2: $f8: col[26,18,10,2]; $f10: col[58,50,42,34] */
  286. IDCT_COL_CASE2($f8, $f10, $f8, $f10)
  287. /* col3: $f12: col[27,19,11,3]; $f14: col[59,51,43,35] */
  288. IDCT_COL_CASE2($f12, $f14, $f12, $f14)
  289. "2: \n\t"
  290. /* Transpose */
  291. "punpcklhw $f26, $f0, $f4 \n\t"
  292. "punpckhhw $f27, $f0, $f4 \n\t"
  293. "punpcklhw $f28, $f8, $f12 \n\t"
  294. "punpckhhw $f29, $f8, $f12 \n\t"
  295. "punpcklwd $f0, $f26, $f28 \n\t"
  296. "punpckhwd $f4, $f26, $f28 \n\t"
  297. "punpcklwd $f8, $f27, $f29 \n\t"
  298. "punpckhwd $f12, $f27, $f29 \n\t"
  299. /* Transpose */
  300. "punpcklhw $f26, $f2, $f6 \n\t"
  301. "punpckhhw $f27, $f2, $f6 \n\t"
  302. "punpcklhw $f28, $f10, $f14 \n\t"
  303. "punpckhhw $f29, $f10, $f14 \n\t"
  304. "punpcklwd $f2, $f26, $f28 \n\t"
  305. "punpckhwd $f6, $f26, $f28 \n\t"
  306. "punpcklwd $f10, $f27, $f29 \n\t"
  307. "punpckhwd $f14, $f27, $f29 \n\t"
  308. /* idctSparseCol col4~7 */
  309. "paddh $f1, $f1, $f17 \n\t"
  310. /* Transpose */
  311. "punpcklhw $f26, $f1, $f5 \n\t"
  312. "punpckhhw $f27, $f1, $f5 \n\t"
  313. "punpcklhw $f28, $f9, $f13 \n\t"
  314. "punpckhhw $f29, $f9, $f13 \n\t"
  315. "punpcklwd $f1, $f26, $f28 \n\t"
  316. "punpckhwd $f5, $f26, $f28 \n\t"
  317. "punpcklwd $f9, $f27, $f29 \n\t"
  318. "punpckhwd $f13, $f27, $f29 \n\t"
  319. "or $f26, $f3, $f7 \n\t"
  320. "or $f26, $f26, $f11 \n\t"
  321. "or $f26, $f26, $f15 \n\t"
  322. "dmfc1 $10, $f26 \n\t"
  323. "bnez $10, 1f \n\t"
  324. /* case1: In this case, row[1,3,5,7] are all zero */
  325. /* col4: $f1: col[24,16,8,0]; $f3: col[56,48,40,32] */
  326. IDCT_COL_CASE1($f1, $f1, $f3)
  327. /* col5: $f5: col[25,17,9,1]; $f7: col[57,49,41,33] */
  328. IDCT_COL_CASE1($f5, $f5, $f7)
  329. /* col6: $f9: col[26,18,10,2]; $f11: col[58,50,42,34] */
  330. IDCT_COL_CASE1($f9, $f9, $f11)
  331. /* col7: $f13: col[27,19,11,3]; $f15: col[59,51,43,35] */
  332. IDCT_COL_CASE1($f13, $f13, $f15)
  333. "j 2f \n\t"
  334. "1: \n\t"
  335. /* case2: row[1,3,5,7] are not all zero */
  336. /* Transpose */
  337. "punpcklhw $f26, $f3, $f7 \n\t"
  338. "punpckhhw $f27, $f3, $f7 \n\t"
  339. "punpcklhw $f28, $f11, $f15 \n\t"
  340. "punpckhhw $f29, $f11, $f15 \n\t"
  341. "punpcklwd $f3, $f26, $f28 \n\t"
  342. "punpckhwd $f7, $f26, $f28 \n\t"
  343. "punpcklwd $f11, $f27, $f29 \n\t"
  344. "punpckhwd $f15, $f27, $f29 \n\t"
  345. /* col4: $f1: col[24,16,8,0]; $f3: col[56,48,40,32] */
  346. IDCT_COL_CASE2($f1, $f3, $f1, $f3)
  347. /* col5: $f5: col[25,17,9,1]; $f7: col[57,49,41,33] */
  348. IDCT_COL_CASE2($f5, $f7, $f5, $f7)
  349. /* col6: $f9: col[26,18,10,2]; $f11: col[58,50,42,34] */
  350. IDCT_COL_CASE2($f9, $f11, $f9, $f11)
  351. /* col7: $f13: col[27,19,11,3]; $f15: col[59,51,43,35] */
  352. IDCT_COL_CASE2($f13, $f15, $f13, $f15)
  353. "2: \n\t"
  354. /* Transpose */
  355. "punpcklhw $f26, $f1, $f5 \n\t"
  356. "punpckhhw $f27, $f1, $f5 \n\t"
  357. "punpcklhw $f28, $f9, $f13 \n\t"
  358. "punpckhhw $f29, $f9, $f13 \n\t"
  359. "punpcklwd $f1, $f26, $f28 \n\t"
  360. "punpckhwd $f5, $f26, $f28 \n\t"
  361. "punpcklwd $f9, $f27, $f29 \n\t"
  362. "punpckhwd $f13, $f27, $f29 \n\t"
  363. /* Transpose */
  364. "punpcklhw $f26, $f3, $f7 \n\t"
  365. "punpckhhw $f27, $f3, $f7 \n\t"
  366. "punpcklhw $f28, $f11, $f15 \n\t"
  367. "punpckhhw $f29, $f11, $f15 \n\t"
  368. "punpcklwd $f3, $f26, $f28 \n\t"
  369. "punpckhwd $f7, $f26, $f28 \n\t"
  370. "punpcklwd $f11, $f27, $f29 \n\t"
  371. "punpckhwd $f15, $f27, $f29 \n\t"
  372. /* Store */
  373. "gssqc1 $f1, $f0, 0x00(%[block]) \n\t"
  374. "gssqc1 $f5, $f4, 0x10(%[block]) \n\t"
  375. "gssqc1 $f9, $f8, 0x20(%[block]) \n\t"
  376. "gssqc1 $f13, $f12, 0x30(%[block]) \n\t"
  377. "gssqc1 $f3, $f2, 0x40(%[block]) \n\t"
  378. "gssqc1 $f7, $f6, 0x50(%[block]) \n\t"
  379. "gssqc1 $f11, $f10, 0x60(%[block]) \n\t"
  380. "gssqc1 $f15, $f14, 0x70(%[block]) \n\t"
  381. : [block]"+&r"(block)
  382. : [w_arr]"r"(W_arr)
  383. : "memory"
  384. );
  385. RECOVER_REG
  386. }
  387. void ff_simple_idct_put_8_mmi(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
  388. {
  389. ff_simple_idct_8_mmi(block);
  390. ff_put_pixels_clamped_mmi(block, dest, line_size);
  391. }
  392. void ff_simple_idct_add_8_mmi(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
  393. {
  394. ff_simple_idct_8_mmi(block);
  395. ff_add_pixels_clamped_mmi(block, dest, line_size);
  396. }