• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

libavcodec/vp8dsp.c

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2010 David Conrad
00003  * Copyright (C) 2010 Ronald S. Bultje
00004  *
00005  * This file is part of FFmpeg.
00006  *
00007  * FFmpeg is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * FFmpeg is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with FFmpeg; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00020  */
00021 
00027 #include "dsputil.h"
00028 #include "vp8dsp.h"
00029 
00030 // TODO: Maybe add dequant
00031 static void vp8_luma_dc_wht_c(DCTELEM block[4][4][16], DCTELEM dc[16])
00032 {
00033     int i, t0, t1, t2, t3;
00034 
00035     for (i = 0; i < 4; i++) {
00036         t0 = dc[0*4+i] + dc[3*4+i];
00037         t1 = dc[1*4+i] + dc[2*4+i];
00038         t2 = dc[1*4+i] - dc[2*4+i];
00039         t3 = dc[0*4+i] - dc[3*4+i];
00040 
00041         dc[0*4+i] = t0 + t1;
00042         dc[1*4+i] = t3 + t2;
00043         dc[2*4+i] = t0 - t1;
00044         dc[3*4+i] = t3 - t2;
00045     }
00046 
00047     for (i = 0; i < 4; i++) {
00048         t0 = dc[i*4+0] + dc[i*4+3] + 3; // rounding
00049         t1 = dc[i*4+1] + dc[i*4+2];
00050         t2 = dc[i*4+1] - dc[i*4+2];
00051         t3 = dc[i*4+0] - dc[i*4+3] + 3; // rounding
00052         dc[i*4+0] = 0;
00053         dc[i*4+1] = 0;
00054         dc[i*4+2] = 0;
00055         dc[i*4+3] = 0;
00056 
00057         block[i][0][0] = (t0 + t1) >> 3;
00058         block[i][1][0] = (t3 + t2) >> 3;
00059         block[i][2][0] = (t0 - t1) >> 3;
00060         block[i][3][0] = (t3 - t2) >> 3;
00061     }
00062 }
00063 
00064 static void vp8_luma_dc_wht_dc_c(DCTELEM block[4][4][16], DCTELEM dc[16])
00065 {
00066     int i, val = (dc[0] + 3) >> 3;
00067     dc[0] = 0;
00068 
00069     for (i = 0; i < 4; i++) {
00070         block[i][0][0] = val;
00071         block[i][1][0] = val;
00072         block[i][2][0] = val;
00073         block[i][3][0] = val;
00074     }
00075 }
00076 
00077 #define MUL_20091(a) ((((a)*20091) >> 16) + (a))
00078 #define MUL_35468(a)  (((a)*35468) >> 16)
00079 
00080 static void vp8_idct_add_c(uint8_t *dst, DCTELEM block[16], int stride)
00081 {
00082     int i, t0, t1, t2, t3;
00083     DCTELEM tmp[16];
00084 
00085     for (i = 0; i < 4; i++) {
00086         t0 = block[0*4+i] + block[2*4+i];
00087         t1 = block[0*4+i] - block[2*4+i];
00088         t2 = MUL_35468(block[1*4+i]) - MUL_20091(block[3*4+i]);
00089         t3 = MUL_20091(block[1*4+i]) + MUL_35468(block[3*4+i]);
00090         block[0*4+i] = 0;
00091         block[1*4+i] = 0;
00092         block[2*4+i] = 0;
00093         block[3*4+i] = 0;
00094 
00095         tmp[i*4+0] = t0 + t3;
00096         tmp[i*4+1] = t1 + t2;
00097         tmp[i*4+2] = t1 - t2;
00098         tmp[i*4+3] = t0 - t3;
00099     }
00100 
00101     for (i = 0; i < 4; i++) {
00102         t0 = tmp[0*4+i] + tmp[2*4+i];
00103         t1 = tmp[0*4+i] - tmp[2*4+i];
00104         t2 = MUL_35468(tmp[1*4+i]) - MUL_20091(tmp[3*4+i]);
00105         t3 = MUL_20091(tmp[1*4+i]) + MUL_35468(tmp[3*4+i]);
00106 
00107         dst[0] = av_clip_uint8(dst[0] + ((t0 + t3 + 4) >> 3));
00108         dst[1] = av_clip_uint8(dst[1] + ((t1 + t2 + 4) >> 3));
00109         dst[2] = av_clip_uint8(dst[2] + ((t1 - t2 + 4) >> 3));
00110         dst[3] = av_clip_uint8(dst[3] + ((t0 - t3 + 4) >> 3));
00111         dst += stride;
00112     }
00113 }
00114 
00115 static void vp8_idct_dc_add_c(uint8_t *dst, DCTELEM block[16], int stride)
00116 {
00117     int i, dc = (block[0] + 4) >> 3;
00118     block[0] = 0;
00119 
00120     for (i = 0; i < 4; i++) {
00121         dst[0] = av_clip_uint8(dst[0] + dc);
00122         dst[1] = av_clip_uint8(dst[1] + dc);
00123         dst[2] = av_clip_uint8(dst[2] + dc);
00124         dst[3] = av_clip_uint8(dst[3] + dc);
00125         dst += stride;
00126     }
00127 }
00128 
00129 static void vp8_idct_dc_add4uv_c(uint8_t *dst, DCTELEM block[4][16], int stride)
00130 {
00131     vp8_idct_dc_add_c(dst+stride*0+0, block[0], stride);
00132     vp8_idct_dc_add_c(dst+stride*0+4, block[1], stride);
00133     vp8_idct_dc_add_c(dst+stride*4+0, block[2], stride);
00134     vp8_idct_dc_add_c(dst+stride*4+4, block[3], stride);
00135 }
00136 
00137 static void vp8_idct_dc_add4y_c(uint8_t *dst, DCTELEM block[4][16], int stride)
00138 {
00139     vp8_idct_dc_add_c(dst+ 0, block[0], stride);
00140     vp8_idct_dc_add_c(dst+ 4, block[1], stride);
00141     vp8_idct_dc_add_c(dst+ 8, block[2], stride);
00142     vp8_idct_dc_add_c(dst+12, block[3], stride);
00143 }
00144 
00145 // because I like only having two parameters to pass functions...
00146 #define LOAD_PIXELS\
00147     int av_unused p3 = p[-4*stride];\
00148     int av_unused p2 = p[-3*stride];\
00149     int av_unused p1 = p[-2*stride];\
00150     int av_unused p0 = p[-1*stride];\
00151     int av_unused q0 = p[ 0*stride];\
00152     int av_unused q1 = p[ 1*stride];\
00153     int av_unused q2 = p[ 2*stride];\
00154     int av_unused q3 = p[ 3*stride];
00155 
00156 #define clip_int8(n) (cm[n+0x80]-0x80)
00157 
00158 static av_always_inline void filter_common(uint8_t *p, int stride, int is4tap)
00159 {
00160     LOAD_PIXELS
00161     int a, f1, f2;
00162     uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
00163 
00164     a = 3*(q0 - p0);
00165 
00166     if (is4tap)
00167         a += clip_int8(p1 - q1);
00168 
00169     a = clip_int8(a);
00170 
00171     // We deviate from the spec here with c(a+3) >> 3
00172     // since that's what libvpx does.
00173     f1 = FFMIN(a+4, 127) >> 3;
00174     f2 = FFMIN(a+3, 127) >> 3;
00175 
00176     // Despite what the spec says, we do need to clamp here to
00177     // be bitexact with libvpx.
00178     p[-1*stride] = cm[p0 + f2];
00179     p[ 0*stride] = cm[q0 - f1];
00180 
00181     // only used for _inner on blocks without high edge variance
00182     if (!is4tap) {
00183         a = (f1+1)>>1;
00184         p[-2*stride] = cm[p1 + a];
00185         p[ 1*stride] = cm[q1 - a];
00186     }
00187 }
00188 
00189 static av_always_inline int simple_limit(uint8_t *p, int stride, int flim)
00190 {
00191     LOAD_PIXELS
00192     return 2*FFABS(p0-q0) + (FFABS(p1-q1) >> 1) <= flim;
00193 }
00194 
00199 static av_always_inline int normal_limit(uint8_t *p, int stride, int E, int I)
00200 {
00201     LOAD_PIXELS
00202     return simple_limit(p, stride, E)
00203         && FFABS(p3-p2) <= I && FFABS(p2-p1) <= I && FFABS(p1-p0) <= I
00204         && FFABS(q3-q2) <= I && FFABS(q2-q1) <= I && FFABS(q1-q0) <= I;
00205 }
00206 
00207 // high edge variance
00208 static av_always_inline int hev(uint8_t *p, int stride, int thresh)
00209 {
00210     LOAD_PIXELS
00211     return FFABS(p1-p0) > thresh || FFABS(q1-q0) > thresh;
00212 }
00213 
00214 static av_always_inline void filter_mbedge(uint8_t *p, int stride)
00215 {
00216     int a0, a1, a2, w;
00217     uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
00218 
00219     LOAD_PIXELS
00220 
00221     w = clip_int8(p1-q1);
00222     w = clip_int8(w + 3*(q0-p0));
00223 
00224     a0 = (27*w + 63) >> 7;
00225     a1 = (18*w + 63) >> 7;
00226     a2 = ( 9*w + 63) >> 7;
00227 
00228     p[-3*stride] = cm[p2 + a2];
00229     p[-2*stride] = cm[p1 + a1];
00230     p[-1*stride] = cm[p0 + a0];
00231     p[ 0*stride] = cm[q0 - a0];
00232     p[ 1*stride] = cm[q1 - a1];
00233     p[ 2*stride] = cm[q2 - a2];
00234 }
00235 
00236 #define LOOP_FILTER(dir, size, stridea, strideb, maybe_inline) \
00237 static maybe_inline void vp8_ ## dir ## _loop_filter ## size ## _c(uint8_t *dst, int stride,\
00238                                      int flim_E, int flim_I, int hev_thresh)\
00239 {\
00240     int i;\
00241 \
00242     for (i = 0; i < size; i++)\
00243         if (normal_limit(dst+i*stridea, strideb, flim_E, flim_I)) {\
00244             if (hev(dst+i*stridea, strideb, hev_thresh))\
00245                 filter_common(dst+i*stridea, strideb, 1);\
00246             else\
00247                 filter_mbedge(dst+i*stridea, strideb);\
00248         }\
00249 }\
00250 \
00251 static maybe_inline void vp8_ ## dir ## _loop_filter ## size ## _inner_c(uint8_t *dst, int stride,\
00252                                       int flim_E, int flim_I, int hev_thresh)\
00253 {\
00254     int i;\
00255 \
00256     for (i = 0; i < size; i++)\
00257         if (normal_limit(dst+i*stridea, strideb, flim_E, flim_I)) {\
00258             int hv = hev(dst+i*stridea, strideb, hev_thresh);\
00259             if (hv) \
00260                 filter_common(dst+i*stridea, strideb, 1);\
00261             else \
00262                 filter_common(dst+i*stridea, strideb, 0);\
00263         }\
00264 }
00265 
00266 LOOP_FILTER(v, 16, 1, stride,)
00267 LOOP_FILTER(h, 16, stride, 1,)
00268 
00269 #define UV_LOOP_FILTER(dir, stridea, strideb) \
00270 LOOP_FILTER(dir, 8, stridea, strideb, av_always_inline) \
00271 static void vp8_ ## dir ## _loop_filter8uv_c(uint8_t *dstU, uint8_t *dstV, int stride,\
00272                                       int fE, int fI, int hev_thresh)\
00273 {\
00274   vp8_ ## dir ## _loop_filter8_c(dstU, stride, fE, fI, hev_thresh);\
00275   vp8_ ## dir ## _loop_filter8_c(dstV, stride, fE, fI, hev_thresh);\
00276 }\
00277 static void vp8_ ## dir ## _loop_filter8uv_inner_c(uint8_t *dstU, uint8_t *dstV, int stride,\
00278                                       int fE, int fI, int hev_thresh)\
00279 {\
00280   vp8_ ## dir ## _loop_filter8_inner_c(dstU, stride, fE, fI, hev_thresh);\
00281   vp8_ ## dir ## _loop_filter8_inner_c(dstV, stride, fE, fI, hev_thresh);\
00282 }
00283 
00284 UV_LOOP_FILTER(v, 1, stride)
00285 UV_LOOP_FILTER(h, stride, 1)
00286 
00287 static void vp8_v_loop_filter_simple_c(uint8_t *dst, int stride, int flim)
00288 {
00289     int i;
00290 
00291     for (i = 0; i < 16; i++)
00292         if (simple_limit(dst+i, stride, flim))
00293             filter_common(dst+i, stride, 1);
00294 }
00295 
00296 static void vp8_h_loop_filter_simple_c(uint8_t *dst, int stride, int flim)
00297 {
00298     int i;
00299 
00300     for (i = 0; i < 16; i++)
00301         if (simple_limit(dst+i*stride, 1, flim))
00302             filter_common(dst+i*stride, 1, 1);
00303 }
00304 
00305 static const uint8_t subpel_filters[7][6] = {
00306     { 0,   6, 123,  12,   1,   0 },
00307     { 2,  11, 108,  36,   8,   1 },
00308     { 0,   9,  93,  50,   6,   0 },
00309     { 3,  16,  77,  77,  16,   3 },
00310     { 0,   6,  50,  93,   9,   0 },
00311     { 1,   8,  36, 108,  11,   2 },
00312     { 0,   1,  12, 123,   6,   0 },
00313 };
00314 
00315 #define PUT_PIXELS(WIDTH) \
00316 static void put_vp8_pixels ## WIDTH ##_c(uint8_t *dst, int dststride, uint8_t *src, int srcstride, int h, int x, int y) { \
00317     int i; \
00318     for (i = 0; i < h; i++, dst+= dststride, src+= srcstride) { \
00319         memcpy(dst, src, WIDTH); \
00320     } \
00321 }
00322 
00323 PUT_PIXELS(16)
00324 PUT_PIXELS(8)
00325 PUT_PIXELS(4)
00326 
00327 #define FILTER_6TAP(src, F, stride) \
00328     cm[(F[2]*src[x+0*stride] - F[1]*src[x-1*stride] + F[0]*src[x-2*stride] + \
00329         F[3]*src[x+1*stride] - F[4]*src[x+2*stride] + F[5]*src[x+3*stride] + 64) >> 7]
00330 
00331 #define FILTER_4TAP(src, F, stride) \
00332     cm[(F[2]*src[x+0*stride] - F[1]*src[x-1*stride] + \
00333         F[3]*src[x+1*stride] - F[4]*src[x+2*stride] + 64) >> 7]
00334 
00335 #define VP8_EPEL_H(SIZE, TAPS) \
00336 static void put_vp8_epel ## SIZE ## _h ## TAPS ## _c(uint8_t *dst, int dststride, uint8_t *src, int srcstride, int h, int mx, int my) \
00337 { \
00338     const uint8_t *filter = subpel_filters[mx-1]; \
00339     uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; \
00340     int x, y; \
00341 \
00342     for (y = 0; y < h; y++) { \
00343         for (x = 0; x < SIZE; x++) \
00344             dst[x] = FILTER_ ## TAPS ## TAP(src, filter, 1); \
00345         dst += dststride; \
00346         src += srcstride; \
00347     } \
00348 }
00349 #define VP8_EPEL_V(SIZE, TAPS) \
00350 static void put_vp8_epel ## SIZE ## _v ## TAPS ## _c(uint8_t *dst, int dststride, uint8_t *src, int srcstride, int h, int mx, int my) \
00351 { \
00352     const uint8_t *filter = subpel_filters[my-1]; \
00353     uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; \
00354     int x, y; \
00355 \
00356     for (y = 0; y < h; y++) { \
00357         for (x = 0; x < SIZE; x++) \
00358             dst[x] = FILTER_ ## TAPS ## TAP(src, filter, srcstride); \
00359         dst += dststride; \
00360         src += srcstride; \
00361     } \
00362 }
00363 #define VP8_EPEL_HV(SIZE, HTAPS, VTAPS) \
00364 static void put_vp8_epel ## SIZE ## _h ## HTAPS ## v ## VTAPS ## _c(uint8_t *dst, int dststride, uint8_t *src, int srcstride, int h, int mx, int my) \
00365 { \
00366     const uint8_t *filter = subpel_filters[mx-1]; \
00367     uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; \
00368     int x, y; \
00369     uint8_t tmp_array[(2*SIZE+VTAPS-1)*SIZE]; \
00370     uint8_t *tmp = tmp_array; \
00371     src -= (2-(VTAPS==4))*srcstride; \
00372 \
00373     for (y = 0; y < h+VTAPS-1; y++) { \
00374         for (x = 0; x < SIZE; x++) \
00375             tmp[x] = FILTER_ ## HTAPS ## TAP(src, filter, 1); \
00376         tmp += SIZE; \
00377         src += srcstride; \
00378     } \
00379 \
00380     tmp = tmp_array + (2-(VTAPS==4))*SIZE; \
00381     filter = subpel_filters[my-1]; \
00382 \
00383     for (y = 0; y < h; y++) { \
00384         for (x = 0; x < SIZE; x++) \
00385             dst[x] = FILTER_ ## VTAPS ## TAP(tmp, filter, SIZE); \
00386         dst += dststride; \
00387         tmp += SIZE; \
00388     } \
00389 }
00390 
00391 VP8_EPEL_H(16, 4)
00392 VP8_EPEL_H(8,  4)
00393 VP8_EPEL_H(4,  4)
00394 VP8_EPEL_H(16, 6)
00395 VP8_EPEL_H(8,  6)
00396 VP8_EPEL_H(4,  6)
00397 VP8_EPEL_V(16, 4)
00398 VP8_EPEL_V(8,  4)
00399 VP8_EPEL_V(4,  4)
00400 VP8_EPEL_V(16, 6)
00401 VP8_EPEL_V(8,  6)
00402 VP8_EPEL_V(4,  6)
00403 VP8_EPEL_HV(16, 4, 4)
00404 VP8_EPEL_HV(8,  4, 4)
00405 VP8_EPEL_HV(4,  4, 4)
00406 VP8_EPEL_HV(16, 4, 6)
00407 VP8_EPEL_HV(8,  4, 6)
00408 VP8_EPEL_HV(4,  4, 6)
00409 VP8_EPEL_HV(16, 6, 4)
00410 VP8_EPEL_HV(8,  6, 4)
00411 VP8_EPEL_HV(4,  6, 4)
00412 VP8_EPEL_HV(16, 6, 6)
00413 VP8_EPEL_HV(8,  6, 6)
00414 VP8_EPEL_HV(4,  6, 6)
00415 
00416 #define VP8_BILINEAR(SIZE) \
00417 static void put_vp8_bilinear ## SIZE ## _h_c(uint8_t *dst, int stride, uint8_t *src, int s2, int h, int mx, int my) \
00418 { \
00419     int a = 8-mx, b = mx; \
00420     int x, y; \
00421 \
00422     for (y = 0; y < h; y++) { \
00423         for (x = 0; x < SIZE; x++) \
00424             dst[x] = (a*src[x] + b*src[x+1] + 4) >> 3; \
00425         dst += stride; \
00426         src += stride; \
00427     } \
00428 } \
00429 static void put_vp8_bilinear ## SIZE ## _v_c(uint8_t *dst, int stride, uint8_t *src, int s2, int h, int mx, int my) \
00430 { \
00431     int c = 8-my, d = my; \
00432     int x, y; \
00433 \
00434     for (y = 0; y < h; y++) { \
00435         for (x = 0; x < SIZE; x++) \
00436             dst[x] = (c*src[x] + d*src[x+stride] + 4) >> 3; \
00437         dst += stride; \
00438         src += stride; \
00439     } \
00440 } \
00441 \
00442 static void put_vp8_bilinear ## SIZE ## _hv_c(uint8_t *dst, int stride, uint8_t *src, int s2, int h, int mx, int my) \
00443 { \
00444     int a = 8-mx, b = mx; \
00445     int c = 8-my, d = my; \
00446     int x, y; \
00447     uint8_t tmp_array[(2*SIZE+1)*SIZE]; \
00448     uint8_t *tmp = tmp_array; \
00449 \
00450     for (y = 0; y < h+1; y++) { \
00451         for (x = 0; x < SIZE; x++) \
00452             tmp[x] = (a*src[x] + b*src[x+1] + 4) >> 3; \
00453         tmp += SIZE; \
00454         src += stride; \
00455     } \
00456 \
00457     tmp = tmp_array; \
00458 \
00459     for (y = 0; y < h; y++) { \
00460         for (x = 0; x < SIZE; x++) \
00461             dst[x] = (c*tmp[x] + d*tmp[x+SIZE] + 4) >> 3; \
00462         dst += stride; \
00463         tmp += SIZE; \
00464     } \
00465 }
00466 
00467 VP8_BILINEAR(16)
00468 VP8_BILINEAR(8)
00469 VP8_BILINEAR(4)
00470 
00471 #define VP8_MC_FUNC(IDX, SIZE) \
00472     dsp->put_vp8_epel_pixels_tab[IDX][0][0] = put_vp8_pixels ## SIZE ## _c; \
00473     dsp->put_vp8_epel_pixels_tab[IDX][0][1] = put_vp8_epel ## SIZE ## _h4_c; \
00474     dsp->put_vp8_epel_pixels_tab[IDX][0][2] = put_vp8_epel ## SIZE ## _h6_c; \
00475     dsp->put_vp8_epel_pixels_tab[IDX][1][0] = put_vp8_epel ## SIZE ## _v4_c; \
00476     dsp->put_vp8_epel_pixels_tab[IDX][1][1] = put_vp8_epel ## SIZE ## _h4v4_c; \
00477     dsp->put_vp8_epel_pixels_tab[IDX][1][2] = put_vp8_epel ## SIZE ## _h6v4_c; \
00478     dsp->put_vp8_epel_pixels_tab[IDX][2][0] = put_vp8_epel ## SIZE ## _v6_c; \
00479     dsp->put_vp8_epel_pixels_tab[IDX][2][1] = put_vp8_epel ## SIZE ## _h4v6_c; \
00480     dsp->put_vp8_epel_pixels_tab[IDX][2][2] = put_vp8_epel ## SIZE ## _h6v6_c
00481 
00482 #define VP8_BILINEAR_MC_FUNC(IDX, SIZE) \
00483     dsp->put_vp8_bilinear_pixels_tab[IDX][0][0] = put_vp8_pixels ## SIZE ## _c; \
00484     dsp->put_vp8_bilinear_pixels_tab[IDX][0][1] = put_vp8_bilinear ## SIZE ## _h_c; \
00485     dsp->put_vp8_bilinear_pixels_tab[IDX][0][2] = put_vp8_bilinear ## SIZE ## _h_c; \
00486     dsp->put_vp8_bilinear_pixels_tab[IDX][1][0] = put_vp8_bilinear ## SIZE ## _v_c; \
00487     dsp->put_vp8_bilinear_pixels_tab[IDX][1][1] = put_vp8_bilinear ## SIZE ## _hv_c; \
00488     dsp->put_vp8_bilinear_pixels_tab[IDX][1][2] = put_vp8_bilinear ## SIZE ## _hv_c; \
00489     dsp->put_vp8_bilinear_pixels_tab[IDX][2][0] = put_vp8_bilinear ## SIZE ## _v_c; \
00490     dsp->put_vp8_bilinear_pixels_tab[IDX][2][1] = put_vp8_bilinear ## SIZE ## _hv_c; \
00491     dsp->put_vp8_bilinear_pixels_tab[IDX][2][2] = put_vp8_bilinear ## SIZE ## _hv_c
00492 
00493 av_cold void ff_vp8dsp_init(VP8DSPContext *dsp)
00494 {
00495     dsp->vp8_luma_dc_wht    = vp8_luma_dc_wht_c;
00496     dsp->vp8_luma_dc_wht_dc = vp8_luma_dc_wht_dc_c;
00497     dsp->vp8_idct_add       = vp8_idct_add_c;
00498     dsp->vp8_idct_dc_add    = vp8_idct_dc_add_c;
00499     dsp->vp8_idct_dc_add4y  = vp8_idct_dc_add4y_c;
00500     dsp->vp8_idct_dc_add4uv = vp8_idct_dc_add4uv_c;
00501 
00502     dsp->vp8_v_loop_filter16y = vp8_v_loop_filter16_c;
00503     dsp->vp8_h_loop_filter16y = vp8_h_loop_filter16_c;
00504     dsp->vp8_v_loop_filter8uv = vp8_v_loop_filter8uv_c;
00505     dsp->vp8_h_loop_filter8uv = vp8_h_loop_filter8uv_c;
00506 
00507     dsp->vp8_v_loop_filter16y_inner = vp8_v_loop_filter16_inner_c;
00508     dsp->vp8_h_loop_filter16y_inner = vp8_h_loop_filter16_inner_c;
00509     dsp->vp8_v_loop_filter8uv_inner = vp8_v_loop_filter8uv_inner_c;
00510     dsp->vp8_h_loop_filter8uv_inner = vp8_h_loop_filter8uv_inner_c;
00511 
00512     dsp->vp8_v_loop_filter_simple = vp8_v_loop_filter_simple_c;
00513     dsp->vp8_h_loop_filter_simple = vp8_h_loop_filter_simple_c;
00514 
00515     VP8_MC_FUNC(0, 16);
00516     VP8_MC_FUNC(1, 8);
00517     VP8_MC_FUNC(2, 4);
00518 
00519     VP8_BILINEAR_MC_FUNC(0, 16);
00520     VP8_BILINEAR_MC_FUNC(1, 8);
00521     VP8_BILINEAR_MC_FUNC(2, 4);
00522 
00523     if (HAVE_MMX)
00524         ff_vp8dsp_init_x86(dsp);
00525     if (HAVE_ALTIVEC)
00526         ff_vp8dsp_init_altivec(dsp);
00527     if (ARCH_ARM)
00528         ff_vp8dsp_init_arm(dsp);
00529 }
Generated on Fri Feb 1 2013 14:34:46 for FFmpeg by doxygen 1.7.1