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

libavcodec/vp6dsp.c

Go to the documentation of this file.
00001 
00024 #include "libavutil/common.h"
00025 #include "dsputil.h"
00026 
00027 
00028 void ff_vp6_filter_diag4_c(uint8_t *dst, uint8_t *src, int stride,
00029                            const int16_t *h_weights, const int16_t *v_weights)
00030 {
00031     int x, y;
00032     int tmp[8*11];
00033     int *t = tmp;
00034 
00035     src -= stride;
00036 
00037     for (y=0; y<11; y++) {
00038         for (x=0; x<8; x++) {
00039             t[x] = av_clip_uint8((  src[x-1] * h_weights[0]
00040                                + src[x  ] * h_weights[1]
00041                                + src[x+1] * h_weights[2]
00042                                + src[x+2] * h_weights[3] + 64) >> 7);
00043         }
00044         src += stride;
00045         t += 8;
00046     }
00047 
00048     t = tmp + 8;
00049     for (y=0; y<8; y++) {
00050         for (x=0; x<8; x++) {
00051             dst[x] = av_clip_uint8((  t[x-8 ] * v_weights[0]
00052                                  + t[x   ] * v_weights[1]
00053                                  + t[x+8 ] * v_weights[2]
00054                                  + t[x+16] * v_weights[3] + 64) >> 7);
00055         }
00056         dst += stride;
00057         t += 8;
00058     }
00059 }

Generated on Fri Sep 16 2011 17:17:46 for FFmpeg by  doxygen 1.7.1