enc_mips32.c 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776
  1. // Copyright 2014 Google Inc. All Rights Reserved.
  2. //
  3. // Use of this source code is governed by a BSD-style license
  4. // that can be found in the COPYING file in the root of the source
  5. // tree. An additional intellectual property rights grant can be found
  6. // in the file PATENTS. All contributing project authors may
  7. // be found in the AUTHORS file in the root of the source tree.
  8. // -----------------------------------------------------------------------------
  9. //
  10. // MIPS version of speed-critical encoding functions.
  11. //
  12. // Author(s): Djordje Pesut (djordje.pesut@imgtec.com)
  13. // Jovan Zelincevic (jovan.zelincevic@imgtec.com)
  14. // Slobodan Prijic (slobodan.prijic@imgtec.com)
  15. #include "./dsp.h"
  16. #if defined(WEBP_USE_MIPS32)
  17. #include "../enc/vp8enci.h"
  18. #include "../enc/cost.h"
  19. #if defined(__GNUC__) && defined(__ANDROID__) && LOCAL_GCC_VERSION == 0x409
  20. #define WORK_AROUND_GCC
  21. #endif
  22. static const int kC1 = 20091 + (1 << 16);
  23. static const int kC2 = 35468;
  24. // macro for one vertical pass in ITransformOne
  25. // MUL macro inlined
  26. // temp0..temp15 holds tmp[0]..tmp[15]
  27. // A..D - offsets in bytes to load from in buffer
  28. // TEMP0..TEMP3 - registers for corresponding tmp elements
  29. // TEMP4..TEMP5 - temporary registers
  30. #define VERTICAL_PASS(A, B, C, D, TEMP4, TEMP0, TEMP1, TEMP2, TEMP3) \
  31. "lh %[temp16], "#A"(%[temp20]) \n\t" \
  32. "lh %[temp18], "#B"(%[temp20]) \n\t" \
  33. "lh %[temp17], "#C"(%[temp20]) \n\t" \
  34. "lh %[temp19], "#D"(%[temp20]) \n\t" \
  35. "addu %["#TEMP4"], %[temp16], %[temp18] \n\t" \
  36. "subu %[temp16], %[temp16], %[temp18] \n\t" \
  37. "mul %["#TEMP0"], %[temp17], %[kC2] \n\t" \
  38. "mul %[temp18], %[temp19], %[kC1] \n\t" \
  39. "mul %[temp17], %[temp17], %[kC1] \n\t" \
  40. "mul %[temp19], %[temp19], %[kC2] \n\t" \
  41. "sra %["#TEMP0"], %["#TEMP0"], 16 \n\n" \
  42. "sra %[temp18], %[temp18], 16 \n\n" \
  43. "sra %[temp17], %[temp17], 16 \n\n" \
  44. "sra %[temp19], %[temp19], 16 \n\n" \
  45. "subu %["#TEMP2"], %["#TEMP0"], %[temp18] \n\t" \
  46. "addu %["#TEMP3"], %[temp17], %[temp19] \n\t" \
  47. "addu %["#TEMP0"], %["#TEMP4"], %["#TEMP3"] \n\t" \
  48. "addu %["#TEMP1"], %[temp16], %["#TEMP2"] \n\t" \
  49. "subu %["#TEMP2"], %[temp16], %["#TEMP2"] \n\t" \
  50. "subu %["#TEMP3"], %["#TEMP4"], %["#TEMP3"] \n\t"
  51. // macro for one horizontal pass in ITransformOne
  52. // MUL and STORE macros inlined
  53. // a = clip_8b(a) is replaced with: a = max(a, 0); a = min(a, 255)
  54. // temp0..temp15 holds tmp[0]..tmp[15]
  55. // A..D - offsets in bytes to load from ref and store to dst buffer
  56. // TEMP0, TEMP4, TEMP8 and TEMP12 - registers for corresponding tmp elements
  57. #define HORIZONTAL_PASS(A, B, C, D, TEMP0, TEMP4, TEMP8, TEMP12) \
  58. "addiu %["#TEMP0"], %["#TEMP0"], 4 \n\t" \
  59. "addu %[temp16], %["#TEMP0"], %["#TEMP8"] \n\t" \
  60. "subu %[temp17], %["#TEMP0"], %["#TEMP8"] \n\t" \
  61. "mul %["#TEMP0"], %["#TEMP4"], %[kC2] \n\t" \
  62. "mul %["#TEMP8"], %["#TEMP12"], %[kC1] \n\t" \
  63. "mul %["#TEMP4"], %["#TEMP4"], %[kC1] \n\t" \
  64. "mul %["#TEMP12"], %["#TEMP12"], %[kC2] \n\t" \
  65. "sra %["#TEMP0"], %["#TEMP0"], 16 \n\t" \
  66. "sra %["#TEMP8"], %["#TEMP8"], 16 \n\t" \
  67. "sra %["#TEMP4"], %["#TEMP4"], 16 \n\t" \
  68. "sra %["#TEMP12"], %["#TEMP12"], 16 \n\t" \
  69. "subu %[temp18], %["#TEMP0"], %["#TEMP8"] \n\t" \
  70. "addu %[temp19], %["#TEMP4"], %["#TEMP12"] \n\t" \
  71. "addu %["#TEMP0"], %[temp16], %[temp19] \n\t" \
  72. "addu %["#TEMP4"], %[temp17], %[temp18] \n\t" \
  73. "subu %["#TEMP8"], %[temp17], %[temp18] \n\t" \
  74. "subu %["#TEMP12"], %[temp16], %[temp19] \n\t" \
  75. "lw %[temp20], 0(%[args]) \n\t" \
  76. "sra %["#TEMP0"], %["#TEMP0"], 3 \n\t" \
  77. "sra %["#TEMP4"], %["#TEMP4"], 3 \n\t" \
  78. "sra %["#TEMP8"], %["#TEMP8"], 3 \n\t" \
  79. "sra %["#TEMP12"], %["#TEMP12"], 3 \n\t" \
  80. "lbu %[temp16], "#A"(%[temp20]) \n\t" \
  81. "lbu %[temp17], "#B"(%[temp20]) \n\t" \
  82. "lbu %[temp18], "#C"(%[temp20]) \n\t" \
  83. "lbu %[temp19], "#D"(%[temp20]) \n\t" \
  84. "addu %["#TEMP0"], %[temp16], %["#TEMP0"] \n\t" \
  85. "addu %["#TEMP4"], %[temp17], %["#TEMP4"] \n\t" \
  86. "addu %["#TEMP8"], %[temp18], %["#TEMP8"] \n\t" \
  87. "addu %["#TEMP12"], %[temp19], %["#TEMP12"] \n\t" \
  88. "slt %[temp16], %["#TEMP0"], $zero \n\t" \
  89. "slt %[temp17], %["#TEMP4"], $zero \n\t" \
  90. "slt %[temp18], %["#TEMP8"], $zero \n\t" \
  91. "slt %[temp19], %["#TEMP12"], $zero \n\t" \
  92. "movn %["#TEMP0"], $zero, %[temp16] \n\t" \
  93. "movn %["#TEMP4"], $zero, %[temp17] \n\t" \
  94. "movn %["#TEMP8"], $zero, %[temp18] \n\t" \
  95. "movn %["#TEMP12"], $zero, %[temp19] \n\t" \
  96. "addiu %[temp20], $zero, 255 \n\t" \
  97. "slt %[temp16], %["#TEMP0"], %[temp20] \n\t" \
  98. "slt %[temp17], %["#TEMP4"], %[temp20] \n\t" \
  99. "slt %[temp18], %["#TEMP8"], %[temp20] \n\t" \
  100. "slt %[temp19], %["#TEMP12"], %[temp20] \n\t" \
  101. "movz %["#TEMP0"], %[temp20], %[temp16] \n\t" \
  102. "movz %["#TEMP4"], %[temp20], %[temp17] \n\t" \
  103. "lw %[temp16], 8(%[args]) \n\t" \
  104. "movz %["#TEMP8"], %[temp20], %[temp18] \n\t" \
  105. "movz %["#TEMP12"], %[temp20], %[temp19] \n\t" \
  106. "sb %["#TEMP0"], "#A"(%[temp16]) \n\t" \
  107. "sb %["#TEMP4"], "#B"(%[temp16]) \n\t" \
  108. "sb %["#TEMP8"], "#C"(%[temp16]) \n\t" \
  109. "sb %["#TEMP12"], "#D"(%[temp16]) \n\t"
  110. // Does one or two inverse transforms.
  111. static WEBP_INLINE void ITransformOne(const uint8_t* ref, const int16_t* in,
  112. uint8_t* dst) {
  113. int temp0, temp1, temp2, temp3, temp4, temp5, temp6;
  114. int temp7, temp8, temp9, temp10, temp11, temp12, temp13;
  115. int temp14, temp15, temp16, temp17, temp18, temp19, temp20;
  116. const int* args[3] = {(const int*)ref, (const int*)in, (const int*)dst};
  117. __asm__ volatile(
  118. "lw %[temp20], 4(%[args]) \n\t"
  119. VERTICAL_PASS(0, 16, 8, 24, temp4, temp0, temp1, temp2, temp3)
  120. VERTICAL_PASS(2, 18, 10, 26, temp8, temp4, temp5, temp6, temp7)
  121. VERTICAL_PASS(4, 20, 12, 28, temp12, temp8, temp9, temp10, temp11)
  122. VERTICAL_PASS(6, 22, 14, 30, temp20, temp12, temp13, temp14, temp15)
  123. HORIZONTAL_PASS( 0, 1, 2, 3, temp0, temp4, temp8, temp12)
  124. HORIZONTAL_PASS(16, 17, 18, 19, temp1, temp5, temp9, temp13)
  125. HORIZONTAL_PASS(32, 33, 34, 35, temp2, temp6, temp10, temp14)
  126. HORIZONTAL_PASS(48, 49, 50, 51, temp3, temp7, temp11, temp15)
  127. : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2),
  128. [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5),
  129. [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8),
  130. [temp9]"=&r"(temp9), [temp10]"=&r"(temp10), [temp11]"=&r"(temp11),
  131. [temp12]"=&r"(temp12), [temp13]"=&r"(temp13), [temp14]"=&r"(temp14),
  132. [temp15]"=&r"(temp15), [temp16]"=&r"(temp16), [temp17]"=&r"(temp17),
  133. [temp18]"=&r"(temp18), [temp19]"=&r"(temp19), [temp20]"=&r"(temp20)
  134. : [args]"r"(args), [kC1]"r"(kC1), [kC2]"r"(kC2)
  135. : "memory", "hi", "lo"
  136. );
  137. }
  138. static void ITransform(const uint8_t* ref, const int16_t* in,
  139. uint8_t* dst, int do_two) {
  140. ITransformOne(ref, in, dst);
  141. if (do_two) {
  142. ITransformOne(ref + 4, in + 16, dst + 4);
  143. }
  144. }
  145. #undef VERTICAL_PASS
  146. #undef HORIZONTAL_PASS
  147. // macro for one pass through for loop in QuantizeBlock
  148. // QUANTDIV macro inlined
  149. // J - offset in bytes (kZigzag[n] * 2)
  150. // K - offset in bytes (kZigzag[n] * 4)
  151. // N - offset in bytes (n * 2)
  152. #define QUANTIZE_ONE(J, K, N) \
  153. "lh %[temp0], "#J"(%[ppin]) \n\t" \
  154. "lhu %[temp1], "#J"(%[ppsharpen]) \n\t" \
  155. "lw %[temp2], "#K"(%[ppzthresh]) \n\t" \
  156. "sra %[sign], %[temp0], 15 \n\t" \
  157. "xor %[coeff], %[temp0], %[sign] \n\t" \
  158. "subu %[coeff], %[coeff], %[sign] \n\t" \
  159. "addu %[coeff], %[coeff], %[temp1] \n\t" \
  160. "slt %[temp4], %[temp2], %[coeff] \n\t" \
  161. "addiu %[temp5], $zero, 0 \n\t" \
  162. "addiu %[level], $zero, 0 \n\t" \
  163. "beqz %[temp4], 2f \n\t" \
  164. "lhu %[temp1], "#J"(%[ppiq]) \n\t" \
  165. "lw %[temp2], "#K"(%[ppbias]) \n\t" \
  166. "lhu %[temp3], "#J"(%[ppq]) \n\t" \
  167. "mul %[level], %[coeff], %[temp1] \n\t" \
  168. "addu %[level], %[level], %[temp2] \n\t" \
  169. "sra %[level], %[level], 17 \n\t" \
  170. "slt %[temp4], %[max_level], %[level] \n\t" \
  171. "movn %[level], %[max_level], %[temp4] \n\t" \
  172. "xor %[level], %[level], %[sign] \n\t" \
  173. "subu %[level], %[level], %[sign] \n\t" \
  174. "mul %[temp5], %[level], %[temp3] \n\t" \
  175. "2: \n\t" \
  176. "sh %[temp5], "#J"(%[ppin]) \n\t" \
  177. "sh %[level], "#N"(%[pout]) \n\t"
  178. static int QuantizeBlock(int16_t in[16], int16_t out[16],
  179. const VP8Matrix* const mtx) {
  180. int temp0, temp1, temp2, temp3, temp4, temp5;
  181. int sign, coeff, level, i;
  182. int max_level = MAX_LEVEL;
  183. int16_t* ppin = &in[0];
  184. int16_t* pout = &out[0];
  185. const uint16_t* ppsharpen = &mtx->sharpen_[0];
  186. const uint32_t* ppzthresh = &mtx->zthresh_[0];
  187. const uint16_t* ppq = &mtx->q_[0];
  188. const uint16_t* ppiq = &mtx->iq_[0];
  189. const uint32_t* ppbias = &mtx->bias_[0];
  190. __asm__ volatile(
  191. QUANTIZE_ONE( 0, 0, 0)
  192. QUANTIZE_ONE( 2, 4, 2)
  193. QUANTIZE_ONE( 8, 16, 4)
  194. QUANTIZE_ONE(16, 32, 6)
  195. QUANTIZE_ONE(10, 20, 8)
  196. QUANTIZE_ONE( 4, 8, 10)
  197. QUANTIZE_ONE( 6, 12, 12)
  198. QUANTIZE_ONE(12, 24, 14)
  199. QUANTIZE_ONE(18, 36, 16)
  200. QUANTIZE_ONE(24, 48, 18)
  201. QUANTIZE_ONE(26, 52, 20)
  202. QUANTIZE_ONE(20, 40, 22)
  203. QUANTIZE_ONE(14, 28, 24)
  204. QUANTIZE_ONE(22, 44, 26)
  205. QUANTIZE_ONE(28, 56, 28)
  206. QUANTIZE_ONE(30, 60, 30)
  207. : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1),
  208. [temp2]"=&r"(temp2), [temp3]"=&r"(temp3),
  209. [temp4]"=&r"(temp4), [temp5]"=&r"(temp5),
  210. [sign]"=&r"(sign), [coeff]"=&r"(coeff),
  211. [level]"=&r"(level)
  212. : [pout]"r"(pout), [ppin]"r"(ppin),
  213. [ppiq]"r"(ppiq), [max_level]"r"(max_level),
  214. [ppbias]"r"(ppbias), [ppzthresh]"r"(ppzthresh),
  215. [ppsharpen]"r"(ppsharpen), [ppq]"r"(ppq)
  216. : "memory", "hi", "lo"
  217. );
  218. // moved out from macro to increase possibility for earlier breaking
  219. for (i = 15; i >= 0; i--) {
  220. if (out[i]) return 1;
  221. }
  222. return 0;
  223. }
  224. #undef QUANTIZE_ONE
  225. // macro for one horizontal pass in Disto4x4 (TTransform)
  226. // two calls of function TTransform are merged into single one
  227. // A..D - offsets in bytes to load from a and b buffers
  228. // E..H - offsets in bytes to store first results to tmp buffer
  229. // E1..H1 - offsets in bytes to store second results to tmp buffer
  230. #define HORIZONTAL_PASS(A, B, C, D, E, F, G, H, E1, F1, G1, H1) \
  231. "lbu %[temp0], "#A"(%[a]) \n\t" \
  232. "lbu %[temp1], "#B"(%[a]) \n\t" \
  233. "lbu %[temp2], "#C"(%[a]) \n\t" \
  234. "lbu %[temp3], "#D"(%[a]) \n\t" \
  235. "lbu %[temp4], "#A"(%[b]) \n\t" \
  236. "lbu %[temp5], "#B"(%[b]) \n\t" \
  237. "lbu %[temp6], "#C"(%[b]) \n\t" \
  238. "lbu %[temp7], "#D"(%[b]) \n\t" \
  239. "addu %[temp8], %[temp0], %[temp2] \n\t" \
  240. "subu %[temp0], %[temp0], %[temp2] \n\t" \
  241. "addu %[temp2], %[temp1], %[temp3] \n\t" \
  242. "subu %[temp1], %[temp1], %[temp3] \n\t" \
  243. "addu %[temp3], %[temp4], %[temp6] \n\t" \
  244. "subu %[temp4], %[temp4], %[temp6] \n\t" \
  245. "addu %[temp6], %[temp5], %[temp7] \n\t" \
  246. "subu %[temp5], %[temp5], %[temp7] \n\t" \
  247. "addu %[temp7], %[temp8], %[temp2] \n\t" \
  248. "subu %[temp2], %[temp8], %[temp2] \n\t" \
  249. "addu %[temp8], %[temp0], %[temp1] \n\t" \
  250. "subu %[temp0], %[temp0], %[temp1] \n\t" \
  251. "addu %[temp1], %[temp3], %[temp6] \n\t" \
  252. "subu %[temp3], %[temp3], %[temp6] \n\t" \
  253. "addu %[temp6], %[temp4], %[temp5] \n\t" \
  254. "subu %[temp4], %[temp4], %[temp5] \n\t" \
  255. "sw %[temp7], "#E"(%[tmp]) \n\t" \
  256. "sw %[temp2], "#H"(%[tmp]) \n\t" \
  257. "sw %[temp8], "#F"(%[tmp]) \n\t" \
  258. "sw %[temp0], "#G"(%[tmp]) \n\t" \
  259. "sw %[temp1], "#E1"(%[tmp]) \n\t" \
  260. "sw %[temp3], "#H1"(%[tmp]) \n\t" \
  261. "sw %[temp6], "#F1"(%[tmp]) \n\t" \
  262. "sw %[temp4], "#G1"(%[tmp]) \n\t"
  263. // macro for one vertical pass in Disto4x4 (TTransform)
  264. // two calls of function TTransform are merged into single one
  265. // since only one accu is available in mips32r1 instruction set
  266. // first is done second call of function TTransform and after
  267. // that first one.
  268. // const int sum1 = TTransform(a, w);
  269. // const int sum2 = TTransform(b, w);
  270. // return abs(sum2 - sum1) >> 5;
  271. // (sum2 - sum1) is calculated with madds (sub2) and msubs (sub1)
  272. // A..D - offsets in bytes to load first results from tmp buffer
  273. // A1..D1 - offsets in bytes to load second results from tmp buffer
  274. // E..H - offsets in bytes to load from w buffer
  275. #define VERTICAL_PASS(A, B, C, D, A1, B1, C1, D1, E, F, G, H) \
  276. "lw %[temp0], "#A1"(%[tmp]) \n\t" \
  277. "lw %[temp1], "#C1"(%[tmp]) \n\t" \
  278. "lw %[temp2], "#B1"(%[tmp]) \n\t" \
  279. "lw %[temp3], "#D1"(%[tmp]) \n\t" \
  280. "addu %[temp8], %[temp0], %[temp1] \n\t" \
  281. "subu %[temp0], %[temp0], %[temp1] \n\t" \
  282. "addu %[temp1], %[temp2], %[temp3] \n\t" \
  283. "subu %[temp2], %[temp2], %[temp3] \n\t" \
  284. "addu %[temp3], %[temp8], %[temp1] \n\t" \
  285. "subu %[temp8], %[temp8], %[temp1] \n\t" \
  286. "addu %[temp1], %[temp0], %[temp2] \n\t" \
  287. "subu %[temp0], %[temp0], %[temp2] \n\t" \
  288. "sra %[temp4], %[temp3], 31 \n\t" \
  289. "sra %[temp5], %[temp1], 31 \n\t" \
  290. "sra %[temp6], %[temp0], 31 \n\t" \
  291. "sra %[temp7], %[temp8], 31 \n\t" \
  292. "xor %[temp3], %[temp3], %[temp4] \n\t" \
  293. "xor %[temp1], %[temp1], %[temp5] \n\t" \
  294. "xor %[temp0], %[temp0], %[temp6] \n\t" \
  295. "xor %[temp8], %[temp8], %[temp7] \n\t" \
  296. "subu %[temp3], %[temp3], %[temp4] \n\t" \
  297. "subu %[temp1], %[temp1], %[temp5] \n\t" \
  298. "subu %[temp0], %[temp0], %[temp6] \n\t" \
  299. "subu %[temp8], %[temp8], %[temp7] \n\t" \
  300. "lhu %[temp4], "#E"(%[w]) \n\t" \
  301. "lhu %[temp5], "#F"(%[w]) \n\t" \
  302. "lhu %[temp6], "#G"(%[w]) \n\t" \
  303. "lhu %[temp7], "#H"(%[w]) \n\t" \
  304. "madd %[temp4], %[temp3] \n\t" \
  305. "madd %[temp5], %[temp1] \n\t" \
  306. "madd %[temp6], %[temp0] \n\t" \
  307. "madd %[temp7], %[temp8] \n\t" \
  308. "lw %[temp0], "#A"(%[tmp]) \n\t" \
  309. "lw %[temp1], "#C"(%[tmp]) \n\t" \
  310. "lw %[temp2], "#B"(%[tmp]) \n\t" \
  311. "lw %[temp3], "#D"(%[tmp]) \n\t" \
  312. "addu %[temp8], %[temp0], %[temp1] \n\t" \
  313. "subu %[temp0], %[temp0], %[temp1] \n\t" \
  314. "addu %[temp1], %[temp2], %[temp3] \n\t" \
  315. "subu %[temp2], %[temp2], %[temp3] \n\t" \
  316. "addu %[temp3], %[temp8], %[temp1] \n\t" \
  317. "subu %[temp1], %[temp8], %[temp1] \n\t" \
  318. "addu %[temp8], %[temp0], %[temp2] \n\t" \
  319. "subu %[temp0], %[temp0], %[temp2] \n\t" \
  320. "sra %[temp2], %[temp3], 31 \n\t" \
  321. "xor %[temp3], %[temp3], %[temp2] \n\t" \
  322. "subu %[temp3], %[temp3], %[temp2] \n\t" \
  323. "msub %[temp4], %[temp3] \n\t" \
  324. "sra %[temp2], %[temp8], 31 \n\t" \
  325. "sra %[temp3], %[temp0], 31 \n\t" \
  326. "sra %[temp4], %[temp1], 31 \n\t" \
  327. "xor %[temp8], %[temp8], %[temp2] \n\t" \
  328. "xor %[temp0], %[temp0], %[temp3] \n\t" \
  329. "xor %[temp1], %[temp1], %[temp4] \n\t" \
  330. "subu %[temp8], %[temp8], %[temp2] \n\t" \
  331. "subu %[temp0], %[temp0], %[temp3] \n\t" \
  332. "subu %[temp1], %[temp1], %[temp4] \n\t" \
  333. "msub %[temp5], %[temp8] \n\t" \
  334. "msub %[temp6], %[temp0] \n\t" \
  335. "msub %[temp7], %[temp1] \n\t"
  336. static int Disto4x4(const uint8_t* const a, const uint8_t* const b,
  337. const uint16_t* const w) {
  338. int tmp[32];
  339. int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8;
  340. __asm__ volatile(
  341. HORIZONTAL_PASS( 0, 1, 2, 3, 0, 4, 8, 12, 64, 68, 72, 76)
  342. HORIZONTAL_PASS(16, 17, 18, 19, 16, 20, 24, 28, 80, 84, 88, 92)
  343. HORIZONTAL_PASS(32, 33, 34, 35, 32, 36, 40, 44, 96, 100, 104, 108)
  344. HORIZONTAL_PASS(48, 49, 50, 51, 48, 52, 56, 60, 112, 116, 120, 124)
  345. "mthi $zero \n\t"
  346. "mtlo $zero \n\t"
  347. VERTICAL_PASS( 0, 16, 32, 48, 64, 80, 96, 112, 0, 8, 16, 24)
  348. VERTICAL_PASS( 4, 20, 36, 52, 68, 84, 100, 116, 2, 10, 18, 26)
  349. VERTICAL_PASS( 8, 24, 40, 56, 72, 88, 104, 120, 4, 12, 20, 28)
  350. VERTICAL_PASS(12, 28, 44, 60, 76, 92, 108, 124, 6, 14, 22, 30)
  351. "mflo %[temp0] \n\t"
  352. "sra %[temp1], %[temp0], 31 \n\t"
  353. "xor %[temp0], %[temp0], %[temp1] \n\t"
  354. "subu %[temp0], %[temp0], %[temp1] \n\t"
  355. "sra %[temp0], %[temp0], 5 \n\t"
  356. : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2),
  357. [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5),
  358. [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8)
  359. : [a]"r"(a), [b]"r"(b), [w]"r"(w), [tmp]"r"(tmp)
  360. : "memory", "hi", "lo"
  361. );
  362. return temp0;
  363. }
  364. #undef VERTICAL_PASS
  365. #undef HORIZONTAL_PASS
  366. static int Disto16x16(const uint8_t* const a, const uint8_t* const b,
  367. const uint16_t* const w) {
  368. int D = 0;
  369. int x, y;
  370. for (y = 0; y < 16 * BPS; y += 4 * BPS) {
  371. for (x = 0; x < 16; x += 4) {
  372. D += Disto4x4(a + x + y, b + x + y, w);
  373. }
  374. }
  375. return D;
  376. }
  377. // macro for one horizontal pass in FTransform
  378. // temp0..temp15 holds tmp[0]..tmp[15]
  379. // A..D - offsets in bytes to load from src and ref buffers
  380. // TEMP0..TEMP3 - registers for corresponding tmp elements
  381. #define HORIZONTAL_PASS(A, B, C, D, TEMP0, TEMP1, TEMP2, TEMP3) \
  382. "lw %["#TEMP1"], 0(%[args]) \n\t" \
  383. "lw %["#TEMP2"], 4(%[args]) \n\t" \
  384. "lbu %[temp16], "#A"(%["#TEMP1"]) \n\t" \
  385. "lbu %[temp17], "#A"(%["#TEMP2"]) \n\t" \
  386. "lbu %[temp18], "#B"(%["#TEMP1"]) \n\t" \
  387. "lbu %[temp19], "#B"(%["#TEMP2"]) \n\t" \
  388. "subu %[temp20], %[temp16], %[temp17] \n\t" \
  389. "lbu %[temp16], "#C"(%["#TEMP1"]) \n\t" \
  390. "lbu %[temp17], "#C"(%["#TEMP2"]) \n\t" \
  391. "subu %["#TEMP0"], %[temp18], %[temp19] \n\t" \
  392. "lbu %[temp18], "#D"(%["#TEMP1"]) \n\t" \
  393. "lbu %[temp19], "#D"(%["#TEMP2"]) \n\t" \
  394. "subu %["#TEMP1"], %[temp16], %[temp17] \n\t" \
  395. "subu %["#TEMP2"], %[temp18], %[temp19] \n\t" \
  396. "addu %["#TEMP3"], %[temp20], %["#TEMP2"] \n\t" \
  397. "subu %["#TEMP2"], %[temp20], %["#TEMP2"] \n\t" \
  398. "addu %[temp20], %["#TEMP0"], %["#TEMP1"] \n\t" \
  399. "subu %["#TEMP0"], %["#TEMP0"], %["#TEMP1"] \n\t" \
  400. "mul %[temp16], %["#TEMP2"], %[c5352] \n\t" \
  401. "mul %[temp17], %["#TEMP2"], %[c2217] \n\t" \
  402. "mul %[temp18], %["#TEMP0"], %[c5352] \n\t" \
  403. "mul %[temp19], %["#TEMP0"], %[c2217] \n\t" \
  404. "addu %["#TEMP1"], %["#TEMP3"], %[temp20] \n\t" \
  405. "subu %[temp20], %["#TEMP3"], %[temp20] \n\t" \
  406. "sll %["#TEMP0"], %["#TEMP1"], 3 \n\t" \
  407. "sll %["#TEMP2"], %[temp20], 3 \n\t" \
  408. "addiu %[temp16], %[temp16], 1812 \n\t" \
  409. "addiu %[temp17], %[temp17], 937 \n\t" \
  410. "addu %[temp16], %[temp16], %[temp19] \n\t" \
  411. "subu %[temp17], %[temp17], %[temp18] \n\t" \
  412. "sra %["#TEMP1"], %[temp16], 9 \n\t" \
  413. "sra %["#TEMP3"], %[temp17], 9 \n\t"
  414. // macro for one vertical pass in FTransform
  415. // temp0..temp15 holds tmp[0]..tmp[15]
  416. // A..D - offsets in bytes to store to out buffer
  417. // TEMP0, TEMP4, TEMP8 and TEMP12 - registers for corresponding tmp elements
  418. #define VERTICAL_PASS(A, B, C, D, TEMP0, TEMP4, TEMP8, TEMP12) \
  419. "addu %[temp16], %["#TEMP0"], %["#TEMP12"] \n\t" \
  420. "subu %[temp19], %["#TEMP0"], %["#TEMP12"] \n\t" \
  421. "addu %[temp17], %["#TEMP4"], %["#TEMP8"] \n\t" \
  422. "subu %[temp18], %["#TEMP4"], %["#TEMP8"] \n\t" \
  423. "mul %["#TEMP8"], %[temp19], %[c2217] \n\t" \
  424. "mul %["#TEMP12"], %[temp18], %[c2217] \n\t" \
  425. "mul %["#TEMP4"], %[temp19], %[c5352] \n\t" \
  426. "mul %[temp18], %[temp18], %[c5352] \n\t" \
  427. "addiu %[temp16], %[temp16], 7 \n\t" \
  428. "addu %["#TEMP0"], %[temp16], %[temp17] \n\t" \
  429. "sra %["#TEMP0"], %["#TEMP0"], 4 \n\t" \
  430. "addu %["#TEMP12"], %["#TEMP12"], %["#TEMP4"] \n\t" \
  431. "subu %["#TEMP4"], %[temp16], %[temp17] \n\t" \
  432. "sra %["#TEMP4"], %["#TEMP4"], 4 \n\t" \
  433. "addiu %["#TEMP8"], %["#TEMP8"], 30000 \n\t" \
  434. "addiu %["#TEMP12"], %["#TEMP12"], 12000 \n\t" \
  435. "addiu %["#TEMP8"], %["#TEMP8"], 21000 \n\t" \
  436. "subu %["#TEMP8"], %["#TEMP8"], %[temp18] \n\t" \
  437. "sra %["#TEMP12"], %["#TEMP12"], 16 \n\t" \
  438. "sra %["#TEMP8"], %["#TEMP8"], 16 \n\t" \
  439. "addiu %[temp16], %["#TEMP12"], 1 \n\t" \
  440. "movn %["#TEMP12"], %[temp16], %[temp19] \n\t" \
  441. "sh %["#TEMP0"], "#A"(%[temp20]) \n\t" \
  442. "sh %["#TEMP4"], "#C"(%[temp20]) \n\t" \
  443. "sh %["#TEMP8"], "#D"(%[temp20]) \n\t" \
  444. "sh %["#TEMP12"], "#B"(%[temp20]) \n\t"
  445. static void FTransform(const uint8_t* src, const uint8_t* ref, int16_t* out) {
  446. int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8;
  447. int temp9, temp10, temp11, temp12, temp13, temp14, temp15, temp16;
  448. int temp17, temp18, temp19, temp20;
  449. const int c2217 = 2217;
  450. const int c5352 = 5352;
  451. const int* const args[3] =
  452. { (const int*)src, (const int*)ref, (const int*)out };
  453. __asm__ volatile(
  454. HORIZONTAL_PASS( 0, 1, 2, 3, temp0, temp1, temp2, temp3)
  455. HORIZONTAL_PASS(16, 17, 18, 19, temp4, temp5, temp6, temp7)
  456. HORIZONTAL_PASS(32, 33, 34, 35, temp8, temp9, temp10, temp11)
  457. HORIZONTAL_PASS(48, 49, 50, 51, temp12, temp13, temp14, temp15)
  458. "lw %[temp20], 8(%[args]) \n\t"
  459. VERTICAL_PASS(0, 8, 16, 24, temp0, temp4, temp8, temp12)
  460. VERTICAL_PASS(2, 10, 18, 26, temp1, temp5, temp9, temp13)
  461. VERTICAL_PASS(4, 12, 20, 28, temp2, temp6, temp10, temp14)
  462. VERTICAL_PASS(6, 14, 22, 30, temp3, temp7, temp11, temp15)
  463. : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2),
  464. [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5),
  465. [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8),
  466. [temp9]"=&r"(temp9), [temp10]"=&r"(temp10), [temp11]"=&r"(temp11),
  467. [temp12]"=&r"(temp12), [temp13]"=&r"(temp13), [temp14]"=&r"(temp14),
  468. [temp15]"=&r"(temp15), [temp16]"=&r"(temp16), [temp17]"=&r"(temp17),
  469. [temp18]"=&r"(temp18), [temp19]"=&r"(temp19), [temp20]"=&r"(temp20)
  470. : [args]"r"(args), [c2217]"r"(c2217), [c5352]"r"(c5352)
  471. : "memory", "hi", "lo"
  472. );
  473. }
  474. #undef VERTICAL_PASS
  475. #undef HORIZONTAL_PASS
  476. // Forward declaration.
  477. extern int VP8GetResidualCostMIPS32(int ctx0, const VP8Residual* const res);
  478. int VP8GetResidualCostMIPS32(int ctx0, const VP8Residual* const res) {
  479. int n = res->first;
  480. // should be prob[VP8EncBands[n]], but it's equivalent for n=0 or 1
  481. int p0 = res->prob[n][ctx0][0];
  482. const uint16_t* t = res->cost[n][ctx0];
  483. int cost;
  484. const int const_2 = 2;
  485. const int const_255 = 255;
  486. const int const_max_level = MAX_VARIABLE_LEVEL;
  487. int res_cost;
  488. int res_prob;
  489. int res_coeffs;
  490. int res_last;
  491. int v_reg;
  492. int b_reg;
  493. int ctx_reg;
  494. int cost_add, temp_1, temp_2, temp_3;
  495. if (res->last < 0) {
  496. return VP8BitCost(0, p0);
  497. }
  498. cost = (ctx0 == 0) ? VP8BitCost(1, p0) : 0;
  499. res_cost = (int)res->cost;
  500. res_prob = (int)res->prob;
  501. res_coeffs = (int)res->coeffs;
  502. res_last = (int)res->last;
  503. __asm__ volatile(
  504. ".set push \n\t"
  505. ".set noreorder \n\t"
  506. "sll %[temp_1], %[n], 1 \n\t"
  507. "addu %[res_coeffs], %[res_coeffs], %[temp_1] \n\t"
  508. "slt %[temp_2], %[n], %[res_last] \n\t"
  509. "bnez %[temp_2], 1f \n\t"
  510. " li %[cost_add], 0 \n\t"
  511. "b 2f \n\t"
  512. " nop \n\t"
  513. "1: \n\t"
  514. "lh %[v_reg], 0(%[res_coeffs]) \n\t"
  515. "addu %[b_reg], %[n], %[VP8EncBands] \n\t"
  516. "move %[temp_1], %[const_max_level] \n\t"
  517. "addu %[cost], %[cost], %[cost_add] \n\t"
  518. "negu %[temp_2], %[v_reg] \n\t"
  519. "slti %[temp_3], %[v_reg], 0 \n\t"
  520. "movn %[v_reg], %[temp_2], %[temp_3] \n\t"
  521. "lbu %[b_reg], 1(%[b_reg]) \n\t"
  522. "li %[cost_add], 0 \n\t"
  523. "sltiu %[temp_3], %[v_reg], 2 \n\t"
  524. "move %[ctx_reg], %[v_reg] \n\t"
  525. "movz %[ctx_reg], %[const_2], %[temp_3] \n\t"
  526. // cost += VP8LevelCost(t, v);
  527. "slt %[temp_3], %[v_reg], %[const_max_level] \n\t"
  528. "movn %[temp_1], %[v_reg], %[temp_3] \n\t"
  529. "sll %[temp_2], %[v_reg], 1 \n\t"
  530. "addu %[temp_2], %[temp_2], %[VP8LevelFixedCosts] \n\t"
  531. "lhu %[temp_2], 0(%[temp_2]) \n\t"
  532. "sll %[temp_1], %[temp_1], 1 \n\t"
  533. "addu %[temp_1], %[temp_1], %[t] \n\t"
  534. "lhu %[temp_3], 0(%[temp_1]) \n\t"
  535. "addu %[cost], %[cost], %[temp_2] \n\t"
  536. // t = res->cost[b][ctx];
  537. "sll %[temp_1], %[ctx_reg], 7 \n\t"
  538. "sll %[temp_2], %[ctx_reg], 3 \n\t"
  539. "addu %[cost], %[cost], %[temp_3] \n\t"
  540. "addu %[temp_1], %[temp_1], %[temp_2] \n\t"
  541. "sll %[temp_2], %[b_reg], 3 \n\t"
  542. "sll %[temp_3], %[b_reg], 5 \n\t"
  543. "sub %[temp_2], %[temp_3], %[temp_2] \n\t"
  544. "sll %[temp_3], %[temp_2], 4 \n\t"
  545. "addu %[temp_1], %[temp_1], %[temp_3] \n\t"
  546. "addu %[temp_2], %[temp_2], %[res_cost] \n\t"
  547. "addiu %[n], %[n], 1 \n\t"
  548. "addu %[t], %[temp_1], %[temp_2] \n\t"
  549. "slt %[temp_1], %[n], %[res_last] \n\t"
  550. "bnez %[temp_1], 1b \n\t"
  551. " addiu %[res_coeffs], %[res_coeffs], 2 \n\t"
  552. "2: \n\t"
  553. ".set pop \n\t"
  554. : [cost]"+r"(cost), [t]"+r"(t), [n]"+r"(n), [v_reg]"=&r"(v_reg),
  555. [ctx_reg]"=&r"(ctx_reg), [b_reg]"=&r"(b_reg), [cost_add]"=&r"(cost_add),
  556. [temp_1]"=&r"(temp_1), [temp_2]"=&r"(temp_2), [temp_3]"=&r"(temp_3)
  557. : [const_2]"r"(const_2), [const_255]"r"(const_255), [res_last]"r"(res_last),
  558. [VP8EntropyCost]"r"(VP8EntropyCost), [VP8EncBands]"r"(VP8EncBands),
  559. [const_max_level]"r"(const_max_level), [res_prob]"r"(res_prob),
  560. [VP8LevelFixedCosts]"r"(VP8LevelFixedCosts), [res_coeffs]"r"(res_coeffs),
  561. [res_cost]"r"(res_cost)
  562. : "memory"
  563. );
  564. // Last coefficient is always non-zero
  565. {
  566. const int v = abs(res->coeffs[n]);
  567. assert(v != 0);
  568. cost += VP8LevelCost(t, v);
  569. if (n < 15) {
  570. const int b = VP8EncBands[n + 1];
  571. const int ctx = (v == 1) ? 1 : 2;
  572. const int last_p0 = res->prob[b][ctx][0];
  573. cost += VP8BitCost(0, last_p0);
  574. }
  575. }
  576. return cost;
  577. }
  578. #define GET_SSE_INNER(A, B, C, D) \
  579. "lbu %[temp0], "#A"(%[a]) \n\t" \
  580. "lbu %[temp1], "#A"(%[b]) \n\t" \
  581. "lbu %[temp2], "#B"(%[a]) \n\t" \
  582. "lbu %[temp3], "#B"(%[b]) \n\t" \
  583. "lbu %[temp4], "#C"(%[a]) \n\t" \
  584. "lbu %[temp5], "#C"(%[b]) \n\t" \
  585. "lbu %[temp6], "#D"(%[a]) \n\t" \
  586. "lbu %[temp7], "#D"(%[b]) \n\t" \
  587. "subu %[temp0], %[temp0], %[temp1] \n\t" \
  588. "subu %[temp2], %[temp2], %[temp3] \n\t" \
  589. "subu %[temp4], %[temp4], %[temp5] \n\t" \
  590. "subu %[temp6], %[temp6], %[temp7] \n\t" \
  591. "madd %[temp0], %[temp0] \n\t" \
  592. "madd %[temp2], %[temp2] \n\t" \
  593. "madd %[temp4], %[temp4] \n\t" \
  594. "madd %[temp6], %[temp6] \n\t"
  595. #define GET_SSE(A, B, C, D) \
  596. GET_SSE_INNER(A, A + 1, A + 2, A + 3) \
  597. GET_SSE_INNER(B, B + 1, B + 2, B + 3) \
  598. GET_SSE_INNER(C, C + 1, C + 2, C + 3) \
  599. GET_SSE_INNER(D, D + 1, D + 2, D + 3)
  600. #if !defined(WORK_AROUND_GCC)
  601. static int SSE16x16(const uint8_t* a, const uint8_t* b) {
  602. int count;
  603. int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
  604. __asm__ volatile(
  605. "mult $zero, $zero \n\t"
  606. GET_SSE( 0, 4, 8, 12)
  607. GET_SSE( 16, 20, 24, 28)
  608. GET_SSE( 32, 36, 40, 44)
  609. GET_SSE( 48, 52, 56, 60)
  610. GET_SSE( 64, 68, 72, 76)
  611. GET_SSE( 80, 84, 88, 92)
  612. GET_SSE( 96, 100, 104, 108)
  613. GET_SSE(112, 116, 120, 124)
  614. GET_SSE(128, 132, 136, 140)
  615. GET_SSE(144, 148, 152, 156)
  616. GET_SSE(160, 164, 168, 172)
  617. GET_SSE(176, 180, 184, 188)
  618. GET_SSE(192, 196, 200, 204)
  619. GET_SSE(208, 212, 216, 220)
  620. GET_SSE(224, 228, 232, 236)
  621. GET_SSE(240, 244, 248, 252)
  622. "mflo %[count] \n\t"
  623. : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2),
  624. [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5),
  625. [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [count]"=&r"(count)
  626. : [a]"r"(a), [b]"r"(b)
  627. : "memory", "hi" , "lo"
  628. );
  629. return count;
  630. }
  631. static int SSE16x8(const uint8_t* a, const uint8_t* b) {
  632. int count;
  633. int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
  634. __asm__ volatile(
  635. "mult $zero, $zero \n\t"
  636. GET_SSE( 0, 4, 8, 12)
  637. GET_SSE( 16, 20, 24, 28)
  638. GET_SSE( 32, 36, 40, 44)
  639. GET_SSE( 48, 52, 56, 60)
  640. GET_SSE( 64, 68, 72, 76)
  641. GET_SSE( 80, 84, 88, 92)
  642. GET_SSE( 96, 100, 104, 108)
  643. GET_SSE(112, 116, 120, 124)
  644. "mflo %[count] \n\t"
  645. : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2),
  646. [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5),
  647. [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [count]"=&r"(count)
  648. : [a]"r"(a), [b]"r"(b)
  649. : "memory", "hi" , "lo"
  650. );
  651. return count;
  652. }
  653. static int SSE8x8(const uint8_t* a, const uint8_t* b) {
  654. int count;
  655. int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
  656. __asm__ volatile(
  657. "mult $zero, $zero \n\t"
  658. GET_SSE( 0, 4, 16, 20)
  659. GET_SSE(32, 36, 48, 52)
  660. GET_SSE(64, 68, 80, 84)
  661. GET_SSE(96, 100, 112, 116)
  662. "mflo %[count] \n\t"
  663. : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2),
  664. [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5),
  665. [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [count]"=&r"(count)
  666. : [a]"r"(a), [b]"r"(b)
  667. : "memory", "hi" , "lo"
  668. );
  669. return count;
  670. }
  671. static int SSE4x4(const uint8_t* a, const uint8_t* b) {
  672. int count;
  673. int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
  674. __asm__ volatile(
  675. "mult $zero, $zero \n\t"
  676. GET_SSE(0, 16, 32, 48)
  677. "mflo %[count] \n\t"
  678. : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2),
  679. [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5),
  680. [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [count]"=&r"(count)
  681. : [a]"r"(a), [b]"r"(b)
  682. : "memory", "hi" , "lo"
  683. );
  684. return count;
  685. }
  686. #endif // WORK_AROUND_GCC
  687. #undef GET_SSE_MIPS32
  688. #undef GET_SSE_MIPS32_INNER
  689. #endif // WEBP_USE_MIPS32
  690. //------------------------------------------------------------------------------
  691. // Entry point
  692. extern void VP8EncDspInitMIPS32(void);
  693. void VP8EncDspInitMIPS32(void) {
  694. #if defined(WEBP_USE_MIPS32)
  695. VP8ITransform = ITransform;
  696. VP8EncQuantizeBlock = QuantizeBlock;
  697. VP8TDisto4x4 = Disto4x4;
  698. VP8TDisto16x16 = Disto16x16;
  699. VP8FTransform = FTransform;
  700. #if !defined(WORK_AROUND_GCC)
  701. VP8SSE16x16 = SSE16x16;
  702. VP8SSE8x8 = SSE8x8;
  703. VP8SSE16x8 = SSE16x8;
  704. VP8SSE4x4 = SSE4x4;
  705. #endif
  706. #endif // WEBP_USE_MIPS32
  707. }