diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
| commit | f7813a5324be39d13ab536c245d15dfc602a7849 (patch) | |
| tree | fad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavcodec/vp8dsp.c | |
| parent | b7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff) | |
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/vp8dsp.c')
| -rw-r--r-- | ffmpeg/libavcodec/vp8dsp.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/ffmpeg/libavcodec/vp8dsp.c b/ffmpeg/libavcodec/vp8dsp.c index 017278e..ba267fd 100644 --- a/ffmpeg/libavcodec/vp8dsp.c +++ b/ffmpeg/libavcodec/vp8dsp.c @@ -160,7 +160,7 @@ static av_always_inline void filter_common(uint8_t *p, ptrdiff_t stride, int is4 { LOAD_PIXELS int a, f1, f2; - uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; + const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; a = 3*(q0 - p0); @@ -215,7 +215,7 @@ static av_always_inline int hev(uint8_t *p, ptrdiff_t stride, int thresh) static av_always_inline void filter_mbedge(uint8_t *p, ptrdiff_t stride) { int a0, a1, a2, w; - uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; + const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; LOAD_PIXELS @@ -337,7 +337,7 @@ PUT_PIXELS(4) static void put_vp8_epel ## SIZE ## _h ## TAPS ## _c(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my) \ { \ const uint8_t *filter = subpel_filters[mx-1]; \ - uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; \ + const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; \ int x, y; \ \ for (y = 0; y < h; y++) { \ @@ -351,7 +351,7 @@ static void put_vp8_epel ## SIZE ## _h ## TAPS ## _c(uint8_t *dst, ptrdiff_t dst static void put_vp8_epel ## SIZE ## _v ## TAPS ## _c(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my) \ { \ const uint8_t *filter = subpel_filters[my-1]; \ - uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; \ + const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; \ int x, y; \ \ for (y = 0; y < h; y++) { \ @@ -365,7 +365,7 @@ static void put_vp8_epel ## SIZE ## _v ## TAPS ## _c(uint8_t *dst, ptrdiff_t dst static void put_vp8_epel ## SIZE ## _h ## HTAPS ## v ## VTAPS ## _c(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my) \ { \ const uint8_t *filter = subpel_filters[mx-1]; \ - uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; \ + const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; \ int x, y; \ uint8_t tmp_array[(2*SIZE+VTAPS-1)*SIZE]; \ uint8_t *tmp = tmp_array; \ @@ -415,7 +415,7 @@ VP8_EPEL_HV(8, 6, 6) VP8_EPEL_HV(4, 6, 6) #define VP8_BILINEAR(SIZE) \ -static void put_vp8_bilinear ## SIZE ## _h_c(uint8_t *dst, ptrdiff_t stride, uint8_t *src, ptrdiff_t s2, int h, int mx, int my) \ +static void put_vp8_bilinear ## SIZE ## _h_c(uint8_t *dst, ptrdiff_t dstride, uint8_t *src, ptrdiff_t sstride, int h, int mx, int my) \ { \ int a = 8-mx, b = mx; \ int x, y; \ @@ -423,24 +423,24 @@ static void put_vp8_bilinear ## SIZE ## _h_c(uint8_t *dst, ptrdiff_t stride, uin for (y = 0; y < h; y++) { \ for (x = 0; x < SIZE; x++) \ dst[x] = (a*src[x] + b*src[x+1] + 4) >> 3; \ - dst += stride; \ - src += stride; \ + dst += dstride; \ + src += sstride; \ } \ } \ -static void put_vp8_bilinear ## SIZE ## _v_c(uint8_t *dst, ptrdiff_t stride, uint8_t *src, ptrdiff_t s2, int h, int mx, int my) \ +static void put_vp8_bilinear ## SIZE ## _v_c(uint8_t *dst, ptrdiff_t dstride, uint8_t *src, ptrdiff_t sstride, int h, int mx, int my) \ { \ int c = 8-my, d = my; \ int x, y; \ \ for (y = 0; y < h; y++) { \ for (x = 0; x < SIZE; x++) \ - dst[x] = (c*src[x] + d*src[x+stride] + 4) >> 3; \ - dst += stride; \ - src += stride; \ + dst[x] = (c*src[x] + d*src[x+sstride] + 4) >> 3; \ + dst += dstride; \ + src += sstride; \ } \ } \ \ -static void put_vp8_bilinear ## SIZE ## _hv_c(uint8_t *dst, ptrdiff_t stride, uint8_t *src, ptrdiff_t s2, int h, int mx, int my) \ +static void put_vp8_bilinear ## SIZE ## _hv_c(uint8_t *dst, ptrdiff_t dstride, uint8_t *src, ptrdiff_t sstride, int h, int mx, int my) \ { \ int a = 8-mx, b = mx; \ int c = 8-my, d = my; \ @@ -452,7 +452,7 @@ static void put_vp8_bilinear ## SIZE ## _hv_c(uint8_t *dst, ptrdiff_t stride, ui for (x = 0; x < SIZE; x++) \ tmp[x] = (a*src[x] + b*src[x+1] + 4) >> 3; \ tmp += SIZE; \ - src += stride; \ + src += sstride; \ } \ \ tmp = tmp_array; \ @@ -460,7 +460,7 @@ static void put_vp8_bilinear ## SIZE ## _hv_c(uint8_t *dst, ptrdiff_t stride, ui for (y = 0; y < h; y++) { \ for (x = 0; x < SIZE; x++) \ dst[x] = (c*tmp[x] + d*tmp[x+SIZE] + 4) >> 3; \ - dst += stride; \ + dst += dstride; \ tmp += SIZE; \ } \ } @@ -521,10 +521,10 @@ av_cold void ff_vp8dsp_init(VP8DSPContext *dsp) VP8_BILINEAR_MC_FUNC(1, 8); VP8_BILINEAR_MC_FUNC(2, 4); - if (ARCH_X86) - ff_vp8dsp_init_x86(dsp); - if (HAVE_ALTIVEC) - ff_vp8dsp_init_altivec(dsp); if (ARCH_ARM) ff_vp8dsp_init_arm(dsp); + if (ARCH_PPC) + ff_vp8dsp_init_ppc(dsp); + if (ARCH_X86) + ff_vp8dsp_init_x86(dsp); } |
