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.

591 lines
19KB

  1. /*
  2. * VC-1 and WMV3 decoder - DSP functions
  3. * Copyright (c) 2006 Konstantin Shishkov
  4. *
  5. * This file is part of FFmpeg.
  6. *
  7. * FFmpeg is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * FFmpeg is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with FFmpeg; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. /**
  22. * @file libavcodec/vc1dsp.c
  23. * VC-1 and WMV3 decoder
  24. *
  25. */
  26. #include "dsputil.h"
  27. /** Apply overlap transform to horizontal edge
  28. */
  29. static void vc1_v_overlap_c(uint8_t* src, int stride)
  30. {
  31. int i;
  32. int a, b, c, d;
  33. int d1, d2;
  34. int rnd = 1;
  35. for(i = 0; i < 8; i++) {
  36. a = src[-2*stride];
  37. b = src[-stride];
  38. c = src[0];
  39. d = src[stride];
  40. d1 = (a - d + 3 + rnd) >> 3;
  41. d2 = (a - d + b - c + 4 - rnd) >> 3;
  42. src[-2*stride] = a - d1;
  43. src[-stride] = av_clip_uint8(b - d2);
  44. src[0] = av_clip_uint8(c + d2);
  45. src[stride] = d + d1;
  46. src++;
  47. rnd = !rnd;
  48. }
  49. }
  50. /** Apply overlap transform to vertical edge
  51. */
  52. static void vc1_h_overlap_c(uint8_t* src, int stride)
  53. {
  54. int i;
  55. int a, b, c, d;
  56. int d1, d2;
  57. int rnd = 1;
  58. for(i = 0; i < 8; i++) {
  59. a = src[-2];
  60. b = src[-1];
  61. c = src[0];
  62. d = src[1];
  63. d1 = (a - d + 3 + rnd) >> 3;
  64. d2 = (a - d + b - c + 4 - rnd) >> 3;
  65. src[-2] = a - d1;
  66. src[-1] = av_clip_uint8(b - d2);
  67. src[0] = av_clip_uint8(c + d2);
  68. src[1] = d + d1;
  69. src += stride;
  70. rnd = !rnd;
  71. }
  72. }
  73. /**
  74. * VC-1 in-loop deblocking filter for one line
  75. * @param src source block type
  76. * @param stride block stride
  77. * @param pq block quantizer
  78. * @return whether other 3 pairs should be filtered or not
  79. * @see 8.6
  80. */
  81. static av_always_inline int vc1_filter_line(uint8_t* src, int stride, int pq){
  82. uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
  83. int a0 = (2*(src[-2*stride] - src[ 1*stride]) - 5*(src[-1*stride] - src[ 0*stride]) + 4) >> 3;
  84. int a0_sign = a0 >> 31; /* Store sign */
  85. a0 = (a0 ^ a0_sign) - a0_sign; /* a0 = FFABS(a0); */
  86. if(a0 < pq){
  87. int a1 = FFABS((2*(src[-4*stride] - src[-1*stride]) - 5*(src[-3*stride] - src[-2*stride]) + 4) >> 3);
  88. int a2 = FFABS((2*(src[ 0*stride] - src[ 3*stride]) - 5*(src[ 1*stride] - src[ 2*stride]) + 4) >> 3);
  89. if(a1 < a0 || a2 < a0){
  90. int clip = src[-1*stride] - src[ 0*stride];
  91. int clip_sign = clip >> 31;
  92. clip = ((clip ^ clip_sign) - clip_sign)>>1;
  93. if(clip){
  94. int a3 = FFMIN(a1, a2);
  95. int d = 5 * (a3 - a0);
  96. int d_sign = (d >> 31);
  97. d = ((d ^ d_sign) - d_sign) >> 3;
  98. d_sign ^= a0_sign;
  99. if( d_sign ^ clip_sign )
  100. d = 0;
  101. else{
  102. d = FFMIN(d, clip);
  103. d = (d ^ d_sign) - d_sign; /* Restore sign */
  104. src[-1*stride] = cm[src[-1*stride] - d];
  105. src[ 0*stride] = cm[src[ 0*stride] + d];
  106. }
  107. return 1;
  108. }
  109. }
  110. }
  111. return 0;
  112. }
  113. /**
  114. * VC-1 in-loop deblocking filter
  115. * @param src source block type
  116. * @param step distance between horizontally adjacent elements
  117. * @param stride distance between vertically adjacent elements
  118. * @param len edge length to filter (4 or 8 pixels)
  119. * @param pq block quantizer
  120. * @see 8.6
  121. */
  122. static inline void vc1_loop_filter(uint8_t* src, int step, int stride, int len, int pq)
  123. {
  124. int i;
  125. int filt3;
  126. for(i = 0; i < len; i += 4){
  127. filt3 = vc1_filter_line(src + 2*step, stride, pq);
  128. if(filt3){
  129. vc1_filter_line(src + 0*step, stride, pq);
  130. vc1_filter_line(src + 1*step, stride, pq);
  131. vc1_filter_line(src + 3*step, stride, pq);
  132. }
  133. src += step * 4;
  134. }
  135. }
  136. static void vc1_v_loop_filter4_c(uint8_t *src, int stride, int pq)
  137. {
  138. vc1_loop_filter(src, 1, stride, 4, pq);
  139. }
  140. static void vc1_h_loop_filter4_c(uint8_t *src, int stride, int pq)
  141. {
  142. vc1_loop_filter(src, stride, 1, 4, pq);
  143. }
  144. static void vc1_v_loop_filter8_c(uint8_t *src, int stride, int pq)
  145. {
  146. vc1_loop_filter(src, 1, stride, 8, pq);
  147. }
  148. static void vc1_h_loop_filter8_c(uint8_t *src, int stride, int pq)
  149. {
  150. vc1_loop_filter(src, stride, 1, 8, pq);
  151. }
  152. static void vc1_v_loop_filter16_c(uint8_t *src, int stride, int pq)
  153. {
  154. vc1_loop_filter(src, 1, stride, 16, pq);
  155. }
  156. static void vc1_h_loop_filter16_c(uint8_t *src, int stride, int pq)
  157. {
  158. vc1_loop_filter(src, stride, 1, 16, pq);
  159. }
  160. /** Do inverse transform on 8x8 block
  161. */
  162. static void vc1_inv_trans_8x8_c(DCTELEM block[64])
  163. {
  164. int i;
  165. register int t1,t2,t3,t4,t5,t6,t7,t8;
  166. DCTELEM *src, *dst;
  167. src = block;
  168. dst = block;
  169. for(i = 0; i < 8; i++){
  170. t1 = 12 * (src[0] + src[4]) + 4;
  171. t2 = 12 * (src[0] - src[4]) + 4;
  172. t3 = 16 * src[2] + 6 * src[6];
  173. t4 = 6 * src[2] - 16 * src[6];
  174. t5 = t1 + t3;
  175. t6 = t2 + t4;
  176. t7 = t2 - t4;
  177. t8 = t1 - t3;
  178. t1 = 16 * src[1] + 15 * src[3] + 9 * src[5] + 4 * src[7];
  179. t2 = 15 * src[1] - 4 * src[3] - 16 * src[5] - 9 * src[7];
  180. t3 = 9 * src[1] - 16 * src[3] + 4 * src[5] + 15 * src[7];
  181. t4 = 4 * src[1] - 9 * src[3] + 15 * src[5] - 16 * src[7];
  182. dst[0] = (t5 + t1) >> 3;
  183. dst[1] = (t6 + t2) >> 3;
  184. dst[2] = (t7 + t3) >> 3;
  185. dst[3] = (t8 + t4) >> 3;
  186. dst[4] = (t8 - t4) >> 3;
  187. dst[5] = (t7 - t3) >> 3;
  188. dst[6] = (t6 - t2) >> 3;
  189. dst[7] = (t5 - t1) >> 3;
  190. src += 8;
  191. dst += 8;
  192. }
  193. src = block;
  194. dst = block;
  195. for(i = 0; i < 8; i++){
  196. t1 = 12 * (src[ 0] + src[32]) + 64;
  197. t2 = 12 * (src[ 0] - src[32]) + 64;
  198. t3 = 16 * src[16] + 6 * src[48];
  199. t4 = 6 * src[16] - 16 * src[48];
  200. t5 = t1 + t3;
  201. t6 = t2 + t4;
  202. t7 = t2 - t4;
  203. t8 = t1 - t3;
  204. t1 = 16 * src[ 8] + 15 * src[24] + 9 * src[40] + 4 * src[56];
  205. t2 = 15 * src[ 8] - 4 * src[24] - 16 * src[40] - 9 * src[56];
  206. t3 = 9 * src[ 8] - 16 * src[24] + 4 * src[40] + 15 * src[56];
  207. t4 = 4 * src[ 8] - 9 * src[24] + 15 * src[40] - 16 * src[56];
  208. dst[ 0] = (t5 + t1) >> 7;
  209. dst[ 8] = (t6 + t2) >> 7;
  210. dst[16] = (t7 + t3) >> 7;
  211. dst[24] = (t8 + t4) >> 7;
  212. dst[32] = (t8 - t4 + 1) >> 7;
  213. dst[40] = (t7 - t3 + 1) >> 7;
  214. dst[48] = (t6 - t2 + 1) >> 7;
  215. dst[56] = (t5 - t1 + 1) >> 7;
  216. src++;
  217. dst++;
  218. }
  219. }
  220. /** Do inverse transform on 8x4 part of block
  221. */
  222. static void vc1_inv_trans_8x4_c(uint8_t *dest, int linesize, DCTELEM *block)
  223. {
  224. int i;
  225. register int t1,t2,t3,t4,t5,t6,t7,t8;
  226. DCTELEM *src, *dst;
  227. const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
  228. src = block;
  229. dst = block;
  230. for(i = 0; i < 4; i++){
  231. t1 = 12 * (src[0] + src[4]) + 4;
  232. t2 = 12 * (src[0] - src[4]) + 4;
  233. t3 = 16 * src[2] + 6 * src[6];
  234. t4 = 6 * src[2] - 16 * src[6];
  235. t5 = t1 + t3;
  236. t6 = t2 + t4;
  237. t7 = t2 - t4;
  238. t8 = t1 - t3;
  239. t1 = 16 * src[1] + 15 * src[3] + 9 * src[5] + 4 * src[7];
  240. t2 = 15 * src[1] - 4 * src[3] - 16 * src[5] - 9 * src[7];
  241. t3 = 9 * src[1] - 16 * src[3] + 4 * src[5] + 15 * src[7];
  242. t4 = 4 * src[1] - 9 * src[3] + 15 * src[5] - 16 * src[7];
  243. dst[0] = (t5 + t1) >> 3;
  244. dst[1] = (t6 + t2) >> 3;
  245. dst[2] = (t7 + t3) >> 3;
  246. dst[3] = (t8 + t4) >> 3;
  247. dst[4] = (t8 - t4) >> 3;
  248. dst[5] = (t7 - t3) >> 3;
  249. dst[6] = (t6 - t2) >> 3;
  250. dst[7] = (t5 - t1) >> 3;
  251. src += 8;
  252. dst += 8;
  253. }
  254. src = block;
  255. for(i = 0; i < 8; i++){
  256. t1 = 17 * (src[ 0] + src[16]) + 64;
  257. t2 = 17 * (src[ 0] - src[16]) + 64;
  258. t3 = 22 * src[ 8] + 10 * src[24];
  259. t4 = 22 * src[24] - 10 * src[ 8];
  260. dest[0*linesize] = cm[dest[0*linesize] + ((t1 + t3) >> 7)];
  261. dest[1*linesize] = cm[dest[1*linesize] + ((t2 - t4) >> 7)];
  262. dest[2*linesize] = cm[dest[2*linesize] + ((t2 + t4) >> 7)];
  263. dest[3*linesize] = cm[dest[3*linesize] + ((t1 - t3) >> 7)];
  264. src ++;
  265. dest++;
  266. }
  267. }
  268. /** Do inverse transform on 4x8 parts of block
  269. */
  270. static void vc1_inv_trans_4x8_c(uint8_t *dest, int linesize, DCTELEM *block)
  271. {
  272. int i;
  273. register int t1,t2,t3,t4,t5,t6,t7,t8;
  274. DCTELEM *src, *dst;
  275. const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
  276. src = block;
  277. dst = block;
  278. for(i = 0; i < 8; i++){
  279. t1 = 17 * (src[0] + src[2]) + 4;
  280. t2 = 17 * (src[0] - src[2]) + 4;
  281. t3 = 22 * src[1] + 10 * src[3];
  282. t4 = 22 * src[3] - 10 * src[1];
  283. dst[0] = (t1 + t3) >> 3;
  284. dst[1] = (t2 - t4) >> 3;
  285. dst[2] = (t2 + t4) >> 3;
  286. dst[3] = (t1 - t3) >> 3;
  287. src += 8;
  288. dst += 8;
  289. }
  290. src = block;
  291. for(i = 0; i < 4; i++){
  292. t1 = 12 * (src[ 0] + src[32]) + 64;
  293. t2 = 12 * (src[ 0] - src[32]) + 64;
  294. t3 = 16 * src[16] + 6 * src[48];
  295. t4 = 6 * src[16] - 16 * src[48];
  296. t5 = t1 + t3;
  297. t6 = t2 + t4;
  298. t7 = t2 - t4;
  299. t8 = t1 - t3;
  300. t1 = 16 * src[ 8] + 15 * src[24] + 9 * src[40] + 4 * src[56];
  301. t2 = 15 * src[ 8] - 4 * src[24] - 16 * src[40] - 9 * src[56];
  302. t3 = 9 * src[ 8] - 16 * src[24] + 4 * src[40] + 15 * src[56];
  303. t4 = 4 * src[ 8] - 9 * src[24] + 15 * src[40] - 16 * src[56];
  304. dest[0*linesize] = cm[dest[0*linesize] + ((t5 + t1) >> 7)];
  305. dest[1*linesize] = cm[dest[1*linesize] + ((t6 + t2) >> 7)];
  306. dest[2*linesize] = cm[dest[2*linesize] + ((t7 + t3) >> 7)];
  307. dest[3*linesize] = cm[dest[3*linesize] + ((t8 + t4) >> 7)];
  308. dest[4*linesize] = cm[dest[4*linesize] + ((t8 - t4 + 1) >> 7)];
  309. dest[5*linesize] = cm[dest[5*linesize] + ((t7 - t3 + 1) >> 7)];
  310. dest[6*linesize] = cm[dest[6*linesize] + ((t6 - t2 + 1) >> 7)];
  311. dest[7*linesize] = cm[dest[7*linesize] + ((t5 - t1 + 1) >> 7)];
  312. src ++;
  313. dest++;
  314. }
  315. }
  316. /** Do inverse transform on 4x4 part of block
  317. */
  318. static void vc1_inv_trans_4x4_c(uint8_t *dest, int linesize, DCTELEM *block)
  319. {
  320. int i;
  321. register int t1,t2,t3,t4;
  322. DCTELEM *src, *dst;
  323. const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
  324. src = block;
  325. dst = block;
  326. for(i = 0; i < 4; i++){
  327. t1 = 17 * (src[0] + src[2]) + 4;
  328. t2 = 17 * (src[0] - src[2]) + 4;
  329. t3 = 22 * src[1] + 10 * src[3];
  330. t4 = 22 * src[3] - 10 * src[1];
  331. dst[0] = (t1 + t3) >> 3;
  332. dst[1] = (t2 - t4) >> 3;
  333. dst[2] = (t2 + t4) >> 3;
  334. dst[3] = (t1 - t3) >> 3;
  335. src += 8;
  336. dst += 8;
  337. }
  338. src = block;
  339. for(i = 0; i < 4; i++){
  340. t1 = 17 * (src[ 0] + src[16]) + 64;
  341. t2 = 17 * (src[ 0] - src[16]) + 64;
  342. t3 = 22 * src[ 8] + 10 * src[24];
  343. t4 = 22 * src[24] - 10 * src[ 8];
  344. dest[0*linesize] = cm[dest[0*linesize] + ((t1 + t3) >> 7)];
  345. dest[1*linesize] = cm[dest[1*linesize] + ((t2 - t4) >> 7)];
  346. dest[2*linesize] = cm[dest[2*linesize] + ((t2 + t4) >> 7)];
  347. dest[3*linesize] = cm[dest[3*linesize] + ((t1 - t3) >> 7)];
  348. src ++;
  349. dest++;
  350. }
  351. }
  352. /* motion compensation functions */
  353. /** Filter in case of 2 filters */
  354. #define VC1_MSPEL_FILTER_16B(DIR, TYPE) \
  355. static av_always_inline int vc1_mspel_ ## DIR ## _filter_16bits(const TYPE *src, int stride, int mode) \
  356. { \
  357. switch(mode){ \
  358. case 0: /* no shift - should not occur */ \
  359. return 0; \
  360. case 1: /* 1/4 shift */ \
  361. return -4*src[-stride] + 53*src[0] + 18*src[stride] - 3*src[stride*2]; \
  362. case 2: /* 1/2 shift */ \
  363. return -src[-stride] + 9*src[0] + 9*src[stride] - src[stride*2]; \
  364. case 3: /* 3/4 shift */ \
  365. return -3*src[-stride] + 18*src[0] + 53*src[stride] - 4*src[stride*2]; \
  366. } \
  367. return 0; /* should not occur */ \
  368. }
  369. VC1_MSPEL_FILTER_16B(ver, uint8_t);
  370. VC1_MSPEL_FILTER_16B(hor, int16_t);
  371. /** Filter used to interpolate fractional pel values
  372. */
  373. static av_always_inline int vc1_mspel_filter(const uint8_t *src, int stride, int mode, int r)
  374. {
  375. switch(mode){
  376. case 0: //no shift
  377. return src[0];
  378. case 1: // 1/4 shift
  379. return (-4*src[-stride] + 53*src[0] + 18*src[stride] - 3*src[stride*2] + 32 - r) >> 6;
  380. case 2: // 1/2 shift
  381. return (-src[-stride] + 9*src[0] + 9*src[stride] - src[stride*2] + 8 - r) >> 4;
  382. case 3: // 3/4 shift
  383. return (-3*src[-stride] + 18*src[0] + 53*src[stride] - 4*src[stride*2] + 32 - r) >> 6;
  384. }
  385. return 0; //should not occur
  386. }
  387. /** Function used to do motion compensation with bicubic interpolation
  388. */
  389. #define VC1_MSPEL_MC(OP, OPNAME)\
  390. static void OPNAME ## vc1_mspel_mc(uint8_t *dst, const uint8_t *src, int stride, int hmode, int vmode, int rnd)\
  391. {\
  392. int i, j;\
  393. \
  394. if (vmode) { /* Horizontal filter to apply */\
  395. int r;\
  396. \
  397. if (hmode) { /* Vertical filter to apply, output to tmp */\
  398. static const int shift_value[] = { 0, 5, 1, 5 };\
  399. int shift = (shift_value[hmode]+shift_value[vmode])>>1;\
  400. int16_t tmp[11*8], *tptr = tmp;\
  401. \
  402. r = (1<<(shift-1)) + rnd-1;\
  403. \
  404. src -= 1;\
  405. for(j = 0; j < 8; j++) {\
  406. for(i = 0; i < 11; i++)\
  407. tptr[i] = (vc1_mspel_ver_filter_16bits(src + i, stride, vmode)+r)>>shift;\
  408. src += stride;\
  409. tptr += 11;\
  410. }\
  411. \
  412. r = 64-rnd;\
  413. tptr = tmp+1;\
  414. for(j = 0; j < 8; j++) {\
  415. for(i = 0; i < 8; i++)\
  416. OP(dst[i], (vc1_mspel_hor_filter_16bits(tptr + i, 1, hmode)+r)>>7);\
  417. dst += stride;\
  418. tptr += 11;\
  419. }\
  420. \
  421. return;\
  422. }\
  423. else { /* No horizontal filter, output 8 lines to dst */\
  424. r = 1-rnd;\
  425. \
  426. for(j = 0; j < 8; j++) {\
  427. for(i = 0; i < 8; i++)\
  428. OP(dst[i], vc1_mspel_filter(src + i, stride, vmode, r));\
  429. src += stride;\
  430. dst += stride;\
  431. }\
  432. return;\
  433. }\
  434. }\
  435. \
  436. /* Horizontal mode with no vertical mode */\
  437. for(j = 0; j < 8; j++) {\
  438. for(i = 0; i < 8; i++)\
  439. OP(dst[i], vc1_mspel_filter(src + i, 1, hmode, rnd));\
  440. dst += stride;\
  441. src += stride;\
  442. }\
  443. }
  444. #define op_put(a, b) a = av_clip_uint8(b)
  445. #define op_avg(a, b) a = (a + av_clip_uint8(b) + 1) >> 1
  446. VC1_MSPEL_MC(op_put, put_)
  447. VC1_MSPEL_MC(op_avg, avg_)
  448. /* pixel functions - really are entry points to vc1_mspel_mc */
  449. /* this one is defined in dsputil.c */
  450. void ff_put_vc1_mspel_mc00_c(uint8_t *dst, const uint8_t *src, int stride, int rnd);
  451. void ff_avg_vc1_mspel_mc00_c(uint8_t *dst, const uint8_t *src, int stride, int rnd);
  452. #define PUT_VC1_MSPEL(a, b)\
  453. static void put_vc1_mspel_mc ## a ## b ##_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) { \
  454. put_vc1_mspel_mc(dst, src, stride, a, b, rnd); \
  455. }\
  456. static void avg_vc1_mspel_mc ## a ## b ##_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) { \
  457. avg_vc1_mspel_mc(dst, src, stride, a, b, rnd); \
  458. }
  459. PUT_VC1_MSPEL(1, 0)
  460. PUT_VC1_MSPEL(2, 0)
  461. PUT_VC1_MSPEL(3, 0)
  462. PUT_VC1_MSPEL(0, 1)
  463. PUT_VC1_MSPEL(1, 1)
  464. PUT_VC1_MSPEL(2, 1)
  465. PUT_VC1_MSPEL(3, 1)
  466. PUT_VC1_MSPEL(0, 2)
  467. PUT_VC1_MSPEL(1, 2)
  468. PUT_VC1_MSPEL(2, 2)
  469. PUT_VC1_MSPEL(3, 2)
  470. PUT_VC1_MSPEL(0, 3)
  471. PUT_VC1_MSPEL(1, 3)
  472. PUT_VC1_MSPEL(2, 3)
  473. PUT_VC1_MSPEL(3, 3)
  474. void ff_vc1dsp_init(DSPContext* dsp, AVCodecContext *avctx) {
  475. dsp->vc1_inv_trans_8x8 = vc1_inv_trans_8x8_c;
  476. dsp->vc1_inv_trans_4x8 = vc1_inv_trans_4x8_c;
  477. dsp->vc1_inv_trans_8x4 = vc1_inv_trans_8x4_c;
  478. dsp->vc1_inv_trans_4x4 = vc1_inv_trans_4x4_c;
  479. dsp->vc1_h_overlap = vc1_h_overlap_c;
  480. dsp->vc1_v_overlap = vc1_v_overlap_c;
  481. dsp->vc1_v_loop_filter4 = vc1_v_loop_filter4_c;
  482. dsp->vc1_h_loop_filter4 = vc1_h_loop_filter4_c;
  483. dsp->vc1_v_loop_filter8 = vc1_v_loop_filter8_c;
  484. dsp->vc1_h_loop_filter8 = vc1_h_loop_filter8_c;
  485. dsp->vc1_v_loop_filter16 = vc1_v_loop_filter16_c;
  486. dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_c;
  487. dsp->put_vc1_mspel_pixels_tab[ 0] = ff_put_vc1_mspel_mc00_c;
  488. dsp->put_vc1_mspel_pixels_tab[ 1] = put_vc1_mspel_mc10_c;
  489. dsp->put_vc1_mspel_pixels_tab[ 2] = put_vc1_mspel_mc20_c;
  490. dsp->put_vc1_mspel_pixels_tab[ 3] = put_vc1_mspel_mc30_c;
  491. dsp->put_vc1_mspel_pixels_tab[ 4] = put_vc1_mspel_mc01_c;
  492. dsp->put_vc1_mspel_pixels_tab[ 5] = put_vc1_mspel_mc11_c;
  493. dsp->put_vc1_mspel_pixels_tab[ 6] = put_vc1_mspel_mc21_c;
  494. dsp->put_vc1_mspel_pixels_tab[ 7] = put_vc1_mspel_mc31_c;
  495. dsp->put_vc1_mspel_pixels_tab[ 8] = put_vc1_mspel_mc02_c;
  496. dsp->put_vc1_mspel_pixels_tab[ 9] = put_vc1_mspel_mc12_c;
  497. dsp->put_vc1_mspel_pixels_tab[10] = put_vc1_mspel_mc22_c;
  498. dsp->put_vc1_mspel_pixels_tab[11] = put_vc1_mspel_mc32_c;
  499. dsp->put_vc1_mspel_pixels_tab[12] = put_vc1_mspel_mc03_c;
  500. dsp->put_vc1_mspel_pixels_tab[13] = put_vc1_mspel_mc13_c;
  501. dsp->put_vc1_mspel_pixels_tab[14] = put_vc1_mspel_mc23_c;
  502. dsp->put_vc1_mspel_pixels_tab[15] = put_vc1_mspel_mc33_c;
  503. dsp->avg_vc1_mspel_pixels_tab[ 0] = ff_avg_vc1_mspel_mc00_c;
  504. dsp->avg_vc1_mspel_pixels_tab[ 1] = avg_vc1_mspel_mc10_c;
  505. dsp->avg_vc1_mspel_pixels_tab[ 2] = avg_vc1_mspel_mc20_c;
  506. dsp->avg_vc1_mspel_pixels_tab[ 3] = avg_vc1_mspel_mc30_c;
  507. dsp->avg_vc1_mspel_pixels_tab[ 4] = avg_vc1_mspel_mc01_c;
  508. dsp->avg_vc1_mspel_pixels_tab[ 5] = avg_vc1_mspel_mc11_c;
  509. dsp->avg_vc1_mspel_pixels_tab[ 6] = avg_vc1_mspel_mc21_c;
  510. dsp->avg_vc1_mspel_pixels_tab[ 7] = avg_vc1_mspel_mc31_c;
  511. dsp->avg_vc1_mspel_pixels_tab[ 8] = avg_vc1_mspel_mc02_c;
  512. dsp->avg_vc1_mspel_pixels_tab[ 9] = avg_vc1_mspel_mc12_c;
  513. dsp->avg_vc1_mspel_pixels_tab[10] = avg_vc1_mspel_mc22_c;
  514. dsp->avg_vc1_mspel_pixels_tab[11] = avg_vc1_mspel_mc32_c;
  515. dsp->avg_vc1_mspel_pixels_tab[12] = avg_vc1_mspel_mc03_c;
  516. dsp->avg_vc1_mspel_pixels_tab[13] = avg_vc1_mspel_mc13_c;
  517. dsp->avg_vc1_mspel_pixels_tab[14] = avg_vc1_mspel_mc23_c;
  518. dsp->avg_vc1_mspel_pixels_tab[15] = avg_vc1_mspel_mc33_c;
  519. }