diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-09-10 00:44:22 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-09-11 20:57:51 +0200 |
commit | a54e53a1c428299b19c7b4e2b66d01c0482c41dd (patch) | |
tree | 23754af6600f04796b519a6c9d353de451d0aeb7 | |
parent | 4130789f4f20e67ef44f8c721955c5e3bcbc1b09 (diff) | |
download | ffmpeg-a54e53a1c428299b19c7b4e2b66d01c0482c41dd.tar.gz |
avcodec/vp8dsp: Constify src in vp8_mc_func
Reviewed-by: Peter Ross <pross@xvid.org>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/aarch64/vp8dsp.h | 2 | ||||
-rw-r--r-- | libavcodec/arm/vp8dsp.h | 2 | ||||
-rw-r--r-- | libavcodec/arm/vp8dsp_armv6.S | 6 | ||||
-rw-r--r-- | libavcodec/loongarch/vp8_mc_lsx.c | 31 | ||||
-rw-r--r-- | libavcodec/loongarch/vp8dsp_loongarch.h | 28 | ||||
-rw-r--r-- | libavcodec/mips/vp8_mc_msa.c | 110 | ||||
-rw-r--r-- | libavcodec/mips/vp8dsp_mips.h | 144 | ||||
-rw-r--r-- | libavcodec/ppc/vp8dsp_altivec.c | 12 | ||||
-rw-r--r-- | libavcodec/vp8dsp.c | 14 | ||||
-rw-r--r-- | libavcodec/vp8dsp.h | 2 | ||||
-rw-r--r-- | libavcodec/x86/vp8dsp.asm | 2 | ||||
-rw-r--r-- | libavcodec/x86/vp8dsp_init.c | 58 |
12 files changed, 206 insertions, 205 deletions
diff --git a/libavcodec/aarch64/vp8dsp.h b/libavcodec/aarch64/vp8dsp.h index 871fed7a95..4e59de28b1 100644 --- a/libavcodec/aarch64/vp8dsp.h +++ b/libavcodec/aarch64/vp8dsp.h @@ -53,7 +53,7 @@ #define VP8_MC(n, opt) \ void ff_put_vp8_##n##_##opt(uint8_t *dst, ptrdiff_t dststride, \ - uint8_t *src, ptrdiff_t srcstride, \ + const uint8_t *src, ptrdiff_t srcstride,\ int h, int x, int y) #define VP8_EPEL(w, opt) \ diff --git a/libavcodec/arm/vp8dsp.h b/libavcodec/arm/vp8dsp.h index 7281d0bfb1..11dcc78d7a 100644 --- a/libavcodec/arm/vp8dsp.h +++ b/libavcodec/arm/vp8dsp.h @@ -58,7 +58,7 @@ void ff_vp8dsp_init_neon(VP8DSPContext *dsp); #define VP8_MC(n, opt) \ void ff_put_vp8_##n##_##opt(uint8_t *dst, ptrdiff_t dststride, \ - uint8_t *src, ptrdiff_t srcstride, \ + const uint8_t *src, ptrdiff_t srcstride,\ int h, int x, int y) #define VP8_EPEL(w, opt) \ diff --git a/libavcodec/arm/vp8dsp_armv6.S b/libavcodec/arm/vp8dsp_armv6.S index 2320bf4d23..395debe866 100644 --- a/libavcodec/arm/vp8dsp_armv6.S +++ b/libavcodec/arm/vp8dsp_armv6.S @@ -1113,7 +1113,7 @@ endfunc @ MC -@ void put_vp8_pixels16(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +@ void put_vp8_pixels16(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, @ ptrdiff_t srcstride, int h, int mx, int my) function ff_put_vp8_pixels16_armv6, export=1 push {r4-r11} @@ -1137,7 +1137,7 @@ function ff_put_vp8_pixels16_armv6, export=1 bx lr endfunc -@ void put_vp8_pixels8(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +@ void put_vp8_pixels8(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, @ ptrdiff_t srcstride, int h, int mx, int my) function ff_put_vp8_pixels8_armv6, export=1 push {r4-r11} @@ -1161,7 +1161,7 @@ function ff_put_vp8_pixels8_armv6, export=1 bx lr endfunc -@ void put_vp8_pixels4(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +@ void put_vp8_pixels4(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, @ ptrdiff_t srcstride, int h, int mx, int my) function ff_put_vp8_pixels4_armv6, export=1 ldr r12, [sp, #0] @ h diff --git a/libavcodec/loongarch/vp8_mc_lsx.c b/libavcodec/loongarch/vp8_mc_lsx.c index 80c4f87e80..034d84cc5d 100644 --- a/libavcodec/loongarch/vp8_mc_lsx.c +++ b/libavcodec/loongarch/vp8_mc_lsx.c @@ -122,7 +122,7 @@ static const int8_t subpel_filters_lsx[7][8] = { } ) void ff_put_vp8_epel8_h6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -187,7 +187,7 @@ void ff_put_vp8_epel8_h6_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -241,7 +241,7 @@ void ff_put_vp8_epel16_h6_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -308,7 +308,7 @@ void ff_put_vp8_epel8_v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -389,7 +389,7 @@ void ff_put_vp8_epel16_v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h6v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -491,7 +491,7 @@ void ff_put_vp8_epel8_h6v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h6v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t multiple8_cnt; @@ -504,7 +504,7 @@ void ff_put_vp8_epel16_h6v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -561,7 +561,7 @@ void ff_put_vp8_epel8_v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -631,7 +631,7 @@ void ff_put_vp8_epel16_v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h6v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -714,7 +714,7 @@ void ff_put_vp8_epel8_h6v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h6v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t multiple8_cnt; @@ -728,7 +728,7 @@ void ff_put_vp8_epel16_h6v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h4v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -818,7 +818,7 @@ void ff_put_vp8_epel8_h4v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h4v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t multiple8_cnt; @@ -832,7 +832,7 @@ void ff_put_vp8_epel16_h4v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_pixels8_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t cnt; @@ -889,12 +889,13 @@ void ff_put_vp8_pixels8_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_pixels16_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t width = 16; int32_t cnt, loop_cnt; - uint8_t *src_tmp, *dst_tmp; + const uint8_t *src_tmp; + uint8_t *dst_tmp; __m128i src0, src1, src2, src3, src4, src5, src6, src7; ptrdiff_t src_stride2 = src_stride << 1; diff --git a/libavcodec/loongarch/vp8dsp_loongarch.h b/libavcodec/loongarch/vp8dsp_loongarch.h index 87e9509db9..09c7e1f91d 100644 --- a/libavcodec/loongarch/vp8dsp_loongarch.h +++ b/libavcodec/loongarch/vp8dsp_loongarch.h @@ -25,49 +25,49 @@ #include "libavcodec/vp8dsp.h" void ff_put_vp8_pixels8_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int x, int y); void ff_put_vp8_pixels16_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int x, int y); void ff_put_vp8_epel16_h6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel16_v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel16_v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel16_h6v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel16_h4v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel16_h6v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel8_v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel8_v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel8_h6v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel8_h4v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel8_h6v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel8_h6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); /* loop filter */ diff --git a/libavcodec/mips/vp8_mc_msa.c b/libavcodec/mips/vp8_mc_msa.c index a61320625a..be1997f7dd 100644 --- a/libavcodec/mips/vp8_mc_msa.c +++ b/libavcodec/mips/vp8_mc_msa.c @@ -156,7 +156,7 @@ static const int8_t bilinear_filters_msa[7][2] = { out0, out1, out2, out3); \ } -static void common_hz_6t_4x4_msa(uint8_t *src, int32_t src_stride, +static void common_hz_6t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -184,7 +184,7 @@ static void common_hz_6t_4x4_msa(uint8_t *src, int32_t src_stride, ST_W4(out, 0, 1, 2, 3, dst, dst_stride); } -static void common_hz_6t_4x8_msa(uint8_t *src, int32_t src_stride, +static void common_hz_6t_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -220,7 +220,7 @@ static void common_hz_6t_4x8_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_epel4_h6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { const int8_t *filter = subpel_filters_msa[mx - 1]; @@ -233,7 +233,7 @@ void ff_put_vp8_epel4_h6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -281,7 +281,7 @@ void ff_put_vp8_epel8_h6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -330,7 +330,7 @@ void ff_put_vp8_epel16_h6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel4_v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -377,7 +377,7 @@ void ff_put_vp8_epel4_v6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -427,7 +427,7 @@ void ff_put_vp8_epel8_v6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -501,7 +501,7 @@ void ff_put_vp8_epel16_v6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel4_h6v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -576,7 +576,7 @@ void ff_put_vp8_epel4_h6v6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h6v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -663,7 +663,7 @@ void ff_put_vp8_epel8_h6v6_msa(uint8_t *dst, ptrdiff_t dst_stride, void ff_put_vp8_epel16_h6v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t multiple8_cnt; @@ -677,7 +677,7 @@ void ff_put_vp8_epel16_h6v6_msa(uint8_t *dst, ptrdiff_t dst_stride, } } -static void common_hz_4t_4x4_msa(uint8_t *src, int32_t src_stride, +static void common_hz_4t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -704,7 +704,7 @@ static void common_hz_4t_4x4_msa(uint8_t *src, int32_t src_stride, ST_W4(out, 0, 1, 2, 3, dst, dst_stride); } -static void common_hz_4t_4x8_msa(uint8_t *src, int32_t src_stride, +static void common_hz_4t_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -739,7 +739,7 @@ static void common_hz_4t_4x8_msa(uint8_t *src, int32_t src_stride, ST_W4(out, 0, 1, 2, 3, dst + 4 * dst_stride, dst_stride); } -static void common_hz_4t_4x16_msa(uint8_t *src, int32_t src_stride, +static void common_hz_4t_4x16_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -790,7 +790,7 @@ static void common_hz_4t_4x16_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_epel4_h4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { const int8_t *filter = subpel_filters_msa[mx - 1]; @@ -805,7 +805,7 @@ void ff_put_vp8_epel4_h4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -840,7 +840,7 @@ void ff_put_vp8_epel8_h4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -889,7 +889,7 @@ void ff_put_vp8_epel16_h4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel4_v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -936,7 +936,7 @@ void ff_put_vp8_epel4_v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -982,7 +982,7 @@ void ff_put_vp8_epel8_v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1041,7 +1041,7 @@ void ff_put_vp8_epel16_v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel4_h4v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1100,7 +1100,7 @@ void ff_put_vp8_epel4_h4v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h4v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1167,7 +1167,7 @@ void ff_put_vp8_epel8_h4v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h4v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t multiple8_cnt; @@ -1182,7 +1182,7 @@ void ff_put_vp8_epel16_h4v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel4_h6v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1248,7 +1248,7 @@ void ff_put_vp8_epel4_h6v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h6v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1321,7 +1321,7 @@ void ff_put_vp8_epel8_h6v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h6v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t multiple8_cnt; @@ -1336,7 +1336,7 @@ void ff_put_vp8_epel16_h6v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel4_h4v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1400,7 +1400,7 @@ void ff_put_vp8_epel4_h4v6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h4v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1475,7 +1475,7 @@ void ff_put_vp8_epel8_h4v6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h4v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t multiple8_cnt; @@ -1489,7 +1489,7 @@ void ff_put_vp8_epel16_h4v6_msa(uint8_t *dst, ptrdiff_t dst_stride, } } -static void common_hz_2t_4x4_msa(uint8_t *src, int32_t src_stride, +static void common_hz_2t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -1512,7 +1512,7 @@ static void common_hz_2t_4x4_msa(uint8_t *src, int32_t src_stride, ST_W2(res1, 0, 1, dst + 2 * dst_stride, dst_stride); } -static void common_hz_2t_4x8_msa(uint8_t *src, int32_t src_stride, +static void common_hz_2t_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -1542,7 +1542,7 @@ static void common_hz_2t_4x8_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_bilinear4_h_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { const int8_t *filter = bilinear_filters_msa[mx - 1]; @@ -1554,7 +1554,7 @@ void ff_put_vp8_bilinear4_h_msa(uint8_t *dst, ptrdiff_t dst_stride, } } -static void common_hz_2t_8x4_msa(uint8_t *src, int32_t src_stride, +static void common_hz_2t_8x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -1578,7 +1578,7 @@ static void common_hz_2t_8x4_msa(uint8_t *src, int32_t src_stride, ST_D4(src0, src1, 0, 1, 0, 1, dst, dst_stride); } -static void common_hz_2t_8x8mult_msa(uint8_t *src, int32_t src_stride, +static void common_hz_2t_8x8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1642,7 +1642,7 @@ static void common_hz_2t_8x8mult_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_bilinear8_h_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { const int8_t *filter = bilinear_filters_msa[mx - 1]; @@ -1656,7 +1656,7 @@ void ff_put_vp8_bilinear8_h_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_bilinear16_h_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1722,7 +1722,7 @@ void ff_put_vp8_bilinear16_h_msa(uint8_t *dst, ptrdiff_t dst_stride, } } -static void common_vt_2t_4x4_msa(uint8_t *src, int32_t src_stride, +static void common_vt_2t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -1748,7 +1748,7 @@ static void common_vt_2t_4x4_msa(uint8_t *src, int32_t src_stride, ST_W4(src2110, 0, 1, 2, 3, dst, dst_stride); } -static void common_vt_2t_4x8_msa(uint8_t *src, int32_t src_stride, +static void common_vt_2t_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -1783,7 +1783,7 @@ static void common_vt_2t_4x8_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_bilinear4_v_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { const int8_t *filter = bilinear_filters_msa[my - 1]; @@ -1795,7 +1795,7 @@ void ff_put_vp8_bilinear4_v_msa(uint8_t *dst, ptrdiff_t dst_stride, } } -static void common_vt_2t_8x4_msa(uint8_t *src, int32_t src_stride, +static void common_vt_2t_8x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -1819,7 +1819,7 @@ static void common_vt_2t_8x4_msa(uint8_t *src, int32_t src_stride, ST_D4(out0, out1, 0, 1, 0, 1, dst, dst_stride); } -static void common_vt_2t_8x8mult_msa(uint8_t *src, int32_t src_stride, +static void common_vt_2t_8x8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1865,7 +1865,7 @@ static void common_vt_2t_8x8mult_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_bilinear8_v_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { const int8_t *filter = bilinear_filters_msa[my - 1]; @@ -1879,7 +1879,7 @@ void ff_put_vp8_bilinear8_v_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_bilinear16_v_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1932,7 +1932,7 @@ void ff_put_vp8_bilinear16_v_msa(uint8_t *dst, ptrdiff_t dst_stride, } } -static void common_hv_2ht_2vt_4x4_msa(uint8_t *src, int32_t src_stride, +static void common_hv_2ht_2vt_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert) @@ -1966,7 +1966,7 @@ static void common_hv_2ht_2vt_4x4_msa(uint8_t *src, int32_t src_stride, ST_W2(res1, 0, 1, dst + 2 * dst_stride, dst_stride); } -static void common_hv_2ht_2vt_4x8_msa(uint8_t *src, int32_t src_stride, +static void common_hv_2ht_2vt_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert) @@ -2014,7 +2014,7 @@ static void common_hv_2ht_2vt_4x8_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_bilinear4_hv_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { const int8_t *filter_horiz = bilinear_filters_msa[mx - 1]; @@ -2029,7 +2029,7 @@ void ff_put_vp8_bilinear4_hv_msa(uint8_t *dst, ptrdiff_t dst_stride, } } -static void common_hv_2ht_2vt_8x4_msa(uint8_t *src, int32_t src_stride, +static void common_hv_2ht_2vt_8x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert) @@ -2073,7 +2073,7 @@ static void common_hv_2ht_2vt_8x4_msa(uint8_t *src, int32_t src_stride, ST_D4(out0, out1, 0, 1, 0, 1, dst, dst_stride); } -static void common_hv_2ht_2vt_8x8mult_msa(uint8_t *src, int32_t src_stride, +static void common_hv_2ht_2vt_8x8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert, @@ -2154,7 +2154,7 @@ static void common_hv_2ht_2vt_8x8mult_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_bilinear8_hv_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { const int8_t *filter_horiz = bilinear_filters_msa[mx - 1]; @@ -2170,7 +2170,7 @@ void ff_put_vp8_bilinear8_hv_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_bilinear16_hv_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -2241,7 +2241,7 @@ void ff_put_vp8_bilinear16_hv_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_pixels8_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t cnt; @@ -2283,16 +2283,16 @@ void ff_put_vp8_pixels8_msa(uint8_t *dst, ptrdiff_t dst_stride, } } -static void copy_16multx8mult_msa(uint8_t *src, int32_t src_stride, +static void copy_16multx8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height, int32_t width) { int32_t cnt, loop_cnt; - uint8_t *src_tmp, *dst_tmp; + uint8_t *dst_tmp; v16u8 src0, src1, src2, src3, src4, src5, src6, src7; for (cnt = (width >> 4); cnt--;) { - src_tmp = src; + const uint8_t *src_tmp = src; dst_tmp = dst; for (loop_cnt = (height >> 3); loop_cnt--;) { @@ -2311,7 +2311,7 @@ static void copy_16multx8mult_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_pixels16_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t cnt; diff --git a/libavcodec/mips/vp8dsp_mips.h b/libavcodec/mips/vp8dsp_mips.h index 07666ab7a0..3d88db897a 100644 --- a/libavcodec/mips/vp8dsp_mips.h +++ b/libavcodec/mips/vp8dsp_mips.h @@ -28,118 +28,118 @@ #include "constants.h" void ff_put_vp8_pixels4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int x, int y); void ff_put_vp8_pixels8_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int x, int y); void ff_put_vp8_pixels16_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int x, int y); void ff_put_vp8_epel16_h4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h4v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h6v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h4v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h6v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h4v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h6v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h4v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h6v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h4v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h6v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h4v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h6v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear16_h_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear16_v_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear16_hv_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear8_h_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear8_v_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear8_hv_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear4_h_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear4_v_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear4_hv_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); /* loop filter */ @@ -184,84 +184,84 @@ void ff_vp8_idct_dc_add4y_mmi(uint8_t *dst, int16_t block[4][16], void ff_vp8_idct_dc_add4uv_mmi(uint8_t *dst, int16_t block[4][16], ptrdiff_t stride); -void ff_put_vp8_pixels4_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +void ff_put_vp8_pixels4_mmi(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int h, int x, int y); -void ff_put_vp8_pixels8_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +void ff_put_vp8_pixels8_mmi(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int h, int x, int y); -void ff_put_vp8_pixels16_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +void ff_put_vp8_pixels16_mmi(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int h, int x, int y); -void ff_put_vp8_epel16_h4_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +void ff_put_vp8_epel16_h4_mmi(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); -void ff_put_vp8_epel16_h6_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +void ff_put_vp8_epel16_h6_mmi(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); -void ff_put_vp8_epel16_v4_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +void ff_put_vp8_epel16_v4_mmi(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); -void ff_put_vp8_epel16_v6_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +void ff_put_vp8_epel16_v6_mmi(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h4v4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h6v4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h4v6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h6v6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_v4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_v6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h4v4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h6v4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h4v6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h6v6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_v4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_v6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h4v4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h6v4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h4v6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h6v6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear16_h_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear16_v_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear16_hv_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear8_h_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear8_v_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear8_hv_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear4_h_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear4_v_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear4_hv_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); // loop filter applied to edges between macroblocks void ff_vp8_v_loop_filter16_mmi(uint8_t *dst, ptrdiff_t stride, int flim_E, diff --git a/libavcodec/ppc/vp8dsp_altivec.c b/libavcodec/ppc/vp8dsp_altivec.c index 273de84778..12dac8b0a8 100644 --- a/libavcodec/ppc/vp8dsp_altivec.c +++ b/libavcodec/ppc/vp8dsp_altivec.c @@ -96,7 +96,7 @@ static const vec_s8 h_subpel_filters_outer[3] = static av_always_inline void put_vp8_epel_h_altivec_core(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int w, int is6tap) { LOAD_H_SUBPEL_FILTER(mx-1); @@ -193,7 +193,7 @@ static const vec_u8 v_subpel_filters[7] = static av_always_inline void put_vp8_epel_v_altivec_core(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int my, int w, int is6tap) { LOAD_V_SUBPEL_FILTER(my-1); @@ -259,19 +259,19 @@ void put_vp8_epel_v_altivec_core(uint8_t *dst, ptrdiff_t dst_stride, #define EPEL_FUNCS(WIDTH, TAPS) \ static av_noinline \ -void put_vp8_epel ## WIDTH ## _h ## TAPS ## _altivec(uint8_t *dst, ptrdiff_t dst_stride, uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) \ +void put_vp8_epel ## WIDTH ## _h ## TAPS ## _altivec(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) \ { \ put_vp8_epel_h_altivec_core(dst, dst_stride, src, src_stride, h, mx, WIDTH, TAPS == 6); \ } \ \ static av_noinline \ -void put_vp8_epel ## WIDTH ## _v ## TAPS ## _altivec(uint8_t *dst, ptrdiff_t dst_stride, uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) \ +void put_vp8_epel ## WIDTH ## _v ## TAPS ## _altivec(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) \ { \ put_vp8_epel_v_altivec_core(dst, dst_stride, src, src_stride, h, my, WIDTH, TAPS == 6); \ } #define EPEL_HV(WIDTH, HTAPS, VTAPS) \ -static void put_vp8_epel ## WIDTH ## _h ## HTAPS ## v ## VTAPS ## _altivec(uint8_t *dst, ptrdiff_t dstride, uint8_t *src, ptrdiff_t sstride, int h, int mx, int my) \ +static void put_vp8_epel ## WIDTH ## _h ## HTAPS ## v ## VTAPS ## _altivec(uint8_t *dst, ptrdiff_t dstride, const uint8_t *src, ptrdiff_t sstride, int h, int mx, int my) \ { \ DECLARE_ALIGNED(16, uint8_t, tmp)[(2*WIDTH+5)*16]; \ if (VTAPS == 6) { \ @@ -299,7 +299,7 @@ EPEL_HV(4, 4,6) EPEL_HV(4, 6,4) EPEL_HV(4, 4,4) -static void put_vp8_pixels16_altivec(uint8_t *dst, ptrdiff_t dstride, uint8_t *src, ptrdiff_t sstride, int h, int mx, int my) +static void put_vp8_pixels16_altivec(uint8_t *dst, ptrdiff_t dstride, const uint8_t *src, ptrdiff_t sstride, int h, int mx, int my) { register vector unsigned char perm; int i; diff --git a/libavcodec/vp8dsp.c b/libavcodec/vp8dsp.c index a92774ed5e..7a85e9f4ca 100644 --- a/libavcodec/vp8dsp.c +++ b/libavcodec/vp8dsp.c @@ -468,7 +468,7 @@ static const uint8_t subpel_filters[7][6] = { #define PUT_PIXELS(WIDTH) \ static void put_vp8_pixels ## WIDTH ## _c(uint8_t *dst, ptrdiff_t dststride, \ - uint8_t *src, ptrdiff_t srcstride, \ + const uint8_t *src, ptrdiff_t srcstride, \ int h, int x, int y) \ { \ int i; \ @@ -492,7 +492,7 @@ PUT_PIXELS(4) #define VP8_EPEL_H(SIZE, TAPS) \ static void put_vp8_epel ## SIZE ## _h ## TAPS ## _c(uint8_t *dst, \ ptrdiff_t dststride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t srcstride, \ int h, int mx, int my) \ { \ @@ -510,7 +510,7 @@ static void put_vp8_epel ## SIZE ## _h ## TAPS ## _c(uint8_t *dst, \ #define VP8_EPEL_V(SIZE, TAPS) \ static void put_vp8_epel ## SIZE ## _v ## TAPS ## _c(uint8_t *dst, \ ptrdiff_t dststride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t srcstride, \ int h, int mx, int my) \ { \ @@ -529,7 +529,7 @@ static void put_vp8_epel ## SIZE ## _v ## TAPS ## _c(uint8_t *dst, \ static void \ put_vp8_epel ## SIZE ## _h ## HTAPS ## v ## VTAPS ## _c(uint8_t *dst, \ ptrdiff_t dststride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t srcstride, \ int h, int mx, \ int my) \ @@ -586,7 +586,7 @@ VP8_EPEL_HV(4, 6, 6) #define VP8_BILINEAR(SIZE) \ static void put_vp8_bilinear ## SIZE ## _h_c(uint8_t *dst, ptrdiff_t dstride, \ - uint8_t *src, ptrdiff_t sstride, \ + const uint8_t *src, ptrdiff_t sstride, \ int h, int mx, int my) \ { \ int a = 8 - mx, b = mx; \ @@ -600,7 +600,7 @@ static void put_vp8_bilinear ## SIZE ## _h_c(uint8_t *dst, ptrdiff_t dstride, \ } \ \ static void put_vp8_bilinear ## SIZE ## _v_c(uint8_t *dst, ptrdiff_t dstride, \ - uint8_t *src, ptrdiff_t sstride, \ + const uint8_t *src, ptrdiff_t sstride, \ int h, int mx, int my) \ { \ int c = 8 - my, d = my; \ @@ -615,7 +615,7 @@ static void put_vp8_bilinear ## SIZE ## _v_c(uint8_t *dst, ptrdiff_t dstride, \ \ static void put_vp8_bilinear ## SIZE ## _hv_c(uint8_t *dst, \ ptrdiff_t dstride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t sstride, \ int h, int mx, int my) \ { \ diff --git a/libavcodec/vp8dsp.h b/libavcodec/vp8dsp.h index bbd7f60a4f..16b5e9c35b 100644 --- a/libavcodec/vp8dsp.h +++ b/libavcodec/vp8dsp.h @@ -31,7 +31,7 @@ #include <stdint.h> typedef void (*vp8_mc_func)(uint8_t *dst /* align 8 */, ptrdiff_t dstStride, - uint8_t *src /* align 1 */, ptrdiff_t srcStride, + const uint8_t *src /* align 1 */, ptrdiff_t srcStride, int h, int x, int y); typedef struct VP8DSPContext { diff --git a/libavcodec/x86/vp8dsp.asm b/libavcodec/x86/vp8dsp.asm index 1c59e884ed..33d488bf6f 100644 --- a/libavcodec/x86/vp8dsp.asm +++ b/libavcodec/x86/vp8dsp.asm @@ -157,7 +157,7 @@ SECTION .text ; subpel MC functions: ; ; void ff_put_vp8_epel<size>_h<htap>v<vtap>_<opt>(uint8_t *dst, ptrdiff_t deststride, -; uint8_t *src, ptrdiff_t srcstride, +; const uint8_t *src, ptrdiff_t srcstride, ; int height, int mx, int my); ;------------------------------------------------------------------------------- diff --git a/libavcodec/x86/vp8dsp_init.c b/libavcodec/x86/vp8dsp_init.c index cceb346ced..bd20da1fc9 100644 --- a/libavcodec/x86/vp8dsp_init.c +++ b/libavcodec/x86/vp8dsp_init.c @@ -32,93 +32,93 @@ * MC functions */ void ff_put_vp8_epel4_h4_mmxext(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel4_h6_mmxext(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel4_v4_mmxext(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel4_v6_mmxext(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel8_h4_sse2 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel8_h6_sse2 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel8_v4_sse2 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel8_v6_sse2 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel4_h4_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel4_h6_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel4_v4_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel4_v6_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel8_h4_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel8_h6_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel8_v4_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel8_v6_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_bilinear4_h_mmxext(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_bilinear8_h_sse2 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_bilinear4_h_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_bilinear8_h_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_bilinear4_v_mmxext(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_bilinear8_v_sse2 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_bilinear4_v_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_bilinear8_v_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_pixels8_mmx (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_pixels16_sse(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); #define TAP_W16(OPT, FILTERTYPE, TAPTYPE) \ static void ff_put_vp8_ ## FILTERTYPE ## 16_ ## TAPTYPE ## _ ## OPT( \ - uint8_t *dst, ptrdiff_t dststride, uint8_t *src, \ + uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, \ ptrdiff_t srcstride, int height, int mx, int my) \ { \ ff_put_vp8_ ## FILTERTYPE ## 8_ ## TAPTYPE ## _ ## OPT( \ @@ -149,7 +149,7 @@ TAP_W16(ssse3, bilinear, v) #define HVTAP(OPT, ALIGN, TAPNUMX, TAPNUMY, SIZE, MAXHEIGHT) \ static void ff_put_vp8_epel ## SIZE ## _h ## TAPNUMX ## v ## TAPNUMY ## _ ## OPT( \ - uint8_t *dst, ptrdiff_t dststride, uint8_t *src, \ + uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, \ ptrdiff_t srcstride, int height, int mx, int my) \ { \ LOCAL_ALIGNED(ALIGN, uint8_t, tmp, [SIZE * (MAXHEIGHT + TAPNUMY - 1)]); \ @@ -186,7 +186,7 @@ HVTAP(ssse3, 16, 6, 6, 4, 8) #define HVBILIN(OPT, ALIGN, SIZE, MAXHEIGHT) \ static void ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT( \ - uint8_t *dst, ptrdiff_t dststride, uint8_t *src, \ + uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, \ ptrdiff_t srcstride, int height, int mx, int my) \ { \ LOCAL_ALIGNED(ALIGN, uint8_t, tmp, [SIZE * (MAXHEIGHT + 2)]); \ |