aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-26 07:46:45 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-05 03:02:13 +0200
commit333b32af8e1b4c7f21fbb6e73b114d614117b97f (patch)
treedc4a4d440d7076740321bc6c1eacdaf4d42a9773 /libavcodec
parent2c8dc7e953e532752500e8145aa1ceee908bda2f (diff)
downloadffmpeg-333b32af8e1b4c7f21fbb6e73b114d614117b97f.tar.gz
avcodec/h264chroma: Constify src in h264_chroma_mc_func
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aarch64/h264chroma_init_aarch64.c12
-rw-r--r--libavcodec/aarch64/h264cmc_neon.S4
-rw-r--r--libavcodec/aarch64/rv40dsp_init_aarch64.c8
-rw-r--r--libavcodec/aarch64/vc1dsp_init_aarch64.c8
-rw-r--r--libavcodec/arm/h264chroma_init_arm.c12
-rw-r--r--libavcodec/arm/h264cmc_neon.S4
-rw-r--r--libavcodec/arm/rv40dsp_init_arm.c8
-rw-r--r--libavcodec/arm/vc1dsp_init_neon.c8
-rw-r--r--libavcodec/h264chroma.h2
-rw-r--r--libavcodec/h264chroma_template.c16
-rw-r--r--libavcodec/loongarch/h264chroma_lasx.c82
-rw-r--r--libavcodec/loongarch/h264chroma_lasx.h6
-rw-r--r--libavcodec/loongarch/vc1dsp_lasx.c2
-rw-r--r--libavcodec/loongarch/vc1dsp_loongarch.h2
-rw-r--r--libavcodec/mips/h264chroma_mips.h20
-rw-r--r--libavcodec/mips/h264chroma_mmi.c8
-rw-r--r--libavcodec/mips/h264chroma_msa.c142
-rw-r--r--libavcodec/mips/vc1dsp_mips.h8
-rw-r--r--libavcodec/mips/vc1dsp_mmi.c8
-rw-r--r--libavcodec/ppc/h264chroma_template.c4
-rw-r--r--libavcodec/rv40dsp.c4
-rw-r--r--libavcodec/vc1dsp.c8
-rw-r--r--libavcodec/x86/h264_chromamc.asm2
-rw-r--r--libavcodec/x86/h264_chromamc_10bit.asm4
-rw-r--r--libavcodec/x86/h264chroma_init.c24
-rw-r--r--libavcodec/x86/rv40dsp_init.c8
-rw-r--r--libavcodec/x86/vc1dsp_init.c8
27 files changed, 211 insertions, 211 deletions
diff --git a/libavcodec/aarch64/h264chroma_init_aarch64.c b/libavcodec/aarch64/h264chroma_init_aarch64.c
index fa6e0eaf15..00fc7b20f1 100644
--- a/libavcodec/aarch64/h264chroma_init_aarch64.c
+++ b/libavcodec/aarch64/h264chroma_init_aarch64.c
@@ -28,18 +28,18 @@
#include "config.h"
-void ff_put_h264_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_put_h264_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_put_h264_chroma_mc2_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc2_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_avg_h264_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_h264_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_avg_h264_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_h264_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_avg_h264_chroma_mc2_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_h264_chroma_mc2_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
av_cold void ff_h264chroma_init_aarch64(H264ChromaContext *c, int bit_depth)
diff --git a/libavcodec/aarch64/h264cmc_neon.S b/libavcodec/aarch64/h264cmc_neon.S
index f8e9407854..88ccd727d0 100644
--- a/libavcodec/aarch64/h264cmc_neon.S
+++ b/libavcodec/aarch64/h264cmc_neon.S
@@ -23,7 +23,7 @@
#include "libavutil/aarch64/asm.S"
-/* chroma_mc8(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int h, int x, int y) */
+/* chroma_mc8(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y) */
.macro h264_chroma_mc8 type, codec=h264
function ff_\type\()_\codec\()_chroma_mc8_neon, export=1
.ifc \type,avg
@@ -193,7 +193,7 @@ function ff_\type\()_\codec\()_chroma_mc8_neon, export=1
endfunc
.endm
-/* chroma_mc4(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int h, int x, int y) */
+/* chroma_mc4(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y) */
.macro h264_chroma_mc4 type, codec=h264
function ff_\type\()_\codec\()_chroma_mc4_neon, export=1
.ifc \type,avg
diff --git a/libavcodec/aarch64/rv40dsp_init_aarch64.c b/libavcodec/aarch64/rv40dsp_init_aarch64.c
index 142705db98..2b91d6835a 100644
--- a/libavcodec/aarch64/rv40dsp_init_aarch64.c
+++ b/libavcodec/aarch64/rv40dsp_init_aarch64.c
@@ -25,14 +25,14 @@
#include "config.h"
-void ff_put_rv40_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_rv40_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_put_rv40_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_rv40_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_avg_rv40_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_rv40_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_avg_rv40_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_rv40_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
av_cold void ff_rv40dsp_init_aarch64(RV34DSPContext *c)
diff --git a/libavcodec/aarch64/vc1dsp_init_aarch64.c b/libavcodec/aarch64/vc1dsp_init_aarch64.c
index a7976fd596..3bc0bd17ee 100644
--- a/libavcodec/aarch64/vc1dsp_init_aarch64.c
+++ b/libavcodec/aarch64/vc1dsp_init_aarch64.c
@@ -43,13 +43,13 @@ void ff_vc1_h_loop_filter8_neon(uint8_t *src, ptrdiff_t stride, int pq);
void ff_vc1_v_loop_filter16_neon(uint8_t *src, ptrdiff_t stride, int pq);
void ff_vc1_h_loop_filter16_neon(uint8_t *src, ptrdiff_t stride, int pq);
-void ff_put_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_vc1_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_avg_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_vc1_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_put_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_vc1_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
int ff_vc1_unescape_buffer_helper_neon(const uint8_t *src, int size, uint8_t *dst);
diff --git a/libavcodec/arm/h264chroma_init_arm.c b/libavcodec/arm/h264chroma_init_arm.c
index aae804b621..5c7d523186 100644
--- a/libavcodec/arm/h264chroma_init_arm.c
+++ b/libavcodec/arm/h264chroma_init_arm.c
@@ -26,18 +26,18 @@
#include "libavutil/arm/cpu.h"
#include "libavcodec/h264chroma.h"
-void ff_put_h264_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_put_h264_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_put_h264_chroma_mc2_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc2_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_avg_h264_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_h264_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_avg_h264_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_h264_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_avg_h264_chroma_mc2_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_h264_chroma_mc2_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
av_cold void ff_h264chroma_init_arm(H264ChromaContext *c, int bit_depth)
diff --git a/libavcodec/arm/h264cmc_neon.S b/libavcodec/arm/h264cmc_neon.S
index 3687b02ede..7272b571d3 100644
--- a/libavcodec/arm/h264cmc_neon.S
+++ b/libavcodec/arm/h264cmc_neon.S
@@ -22,7 +22,7 @@
#include "libavutil/arm/asm.S"
-/* chroma_mc8(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int h, int x, int y) */
+/* chroma_mc8(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y) */
.macro h264_chroma_mc8 type, codec=h264
function ff_\type\()_\codec\()_chroma_mc8_neon, export=1
push {r4-r7, lr}
@@ -197,7 +197,7 @@ T cmp r7, #0
endfunc
.endm
-/* chroma_mc4(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int h, int x, int y) */
+/* chroma_mc4(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y) */
.macro h264_chroma_mc4 type, codec=h264
function ff_\type\()_\codec\()_chroma_mc4_neon, export=1
push {r4-r7, lr}
diff --git a/libavcodec/arm/rv40dsp_init_arm.c b/libavcodec/arm/rv40dsp_init_arm.c
index c24854d1cd..92d2867e04 100644
--- a/libavcodec/arm/rv40dsp_init_arm.c
+++ b/libavcodec/arm/rv40dsp_init_arm.c
@@ -49,11 +49,11 @@ DECL_QPEL_Y(1);
DECL_QPEL_Y(2);
DECL_QPEL_Y(3);
-void ff_put_rv40_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int);
-void ff_put_rv40_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int);
+void ff_put_rv40_chroma_mc8_neon(uint8_t *, const uint8_t *, int, int, int, int);
+void ff_put_rv40_chroma_mc4_neon(uint8_t *, const uint8_t *, int, int, int, int);
-void ff_avg_rv40_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int);
-void ff_avg_rv40_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int);
+void ff_avg_rv40_chroma_mc8_neon(uint8_t *, const uint8_t *, int, int, int, int);
+void ff_avg_rv40_chroma_mc4_neon(uint8_t *, const uint8_t *, int, int, int, int);
void ff_rv40_weight_func_16_neon(uint8_t *, uint8_t *, uint8_t *, int, int, ptrdiff_t);
void ff_rv40_weight_func_8_neon(uint8_t *, uint8_t *, uint8_t *, int, int, ptrdiff_t);
diff --git a/libavcodec/arm/vc1dsp_init_neon.c b/libavcodec/arm/vc1dsp_init_neon.c
index 48cb816b70..46fd80a837 100644
--- a/libavcodec/arm/vc1dsp_init_neon.c
+++ b/libavcodec/arm/vc1dsp_init_neon.c
@@ -76,13 +76,13 @@ DECL_PUT(3, 1)
DECL_PUT(3, 2)
DECL_PUT(3, 3)
-void ff_put_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_vc1_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_avg_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_vc1_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_put_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_vc1_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
int ff_vc1_unescape_buffer_helper_neon(const uint8_t *src, int size, uint8_t *dst);
diff --git a/libavcodec/h264chroma.h b/libavcodec/h264chroma.h
index 3259b4935f..b8f9c8f4fc 100644
--- a/libavcodec/h264chroma.h
+++ b/libavcodec/h264chroma.h
@@ -22,7 +22,7 @@
#include <stddef.h>
#include <stdint.h>
-typedef void (*h264_chroma_mc_func)(uint8_t *dst /*align 8*/, uint8_t *src /*align 1*/, ptrdiff_t srcStride, int h, int x, int y);
+typedef void (*h264_chroma_mc_func)(uint8_t *dst /*align 8*/, const uint8_t *src /*align 1*/, ptrdiff_t srcStride, int h, int x, int y);
typedef struct H264ChromaContext {
h264_chroma_mc_func put_h264_chroma_pixels_tab[4];
diff --git a/libavcodec/h264chroma_template.c b/libavcodec/h264chroma_template.c
index a3ca07b518..b9d24f5a0c 100644
--- a/libavcodec/h264chroma_template.c
+++ b/libavcodec/h264chroma_template.c
@@ -26,9 +26,9 @@
#include "bit_depth_template.c"
#define H264_CHROMA_MC(OPNAME, OP)\
-static void FUNCC(OPNAME ## h264_chroma_mc1)(uint8_t *_dst /*align 8*/, uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y){\
+static void FUNCC(OPNAME ## h264_chroma_mc1)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y){\
pixel *dst = (pixel*)_dst;\
- pixel *src = (pixel*)_src;\
+ const pixel *src = (const pixel*)_src;\
const int A=(8-x)*(8-y);\
const int B=( x)*(8-y);\
const int C=(8-x)*( y);\
@@ -60,10 +60,10 @@ static void FUNCC(OPNAME ## h264_chroma_mc1)(uint8_t *_dst /*align 8*/, uint8_t
}\
}\
}\
-static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst /*align 8*/, uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\
+static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\
{\
pixel *dst = (pixel*)_dst;\
- pixel *src = (pixel*)_src;\
+ const pixel *src = (const pixel*)_src;\
const int A=(8-x)*(8-y);\
const int B=( x)*(8-y);\
const int C=(8-x)*( y);\
@@ -99,10 +99,10 @@ static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst /*align 8*/, uint8_t
}\
}\
\
-static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst /*align 8*/, uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\
+static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\
{\
pixel *dst = (pixel*)_dst;\
- pixel *src = (pixel*)_src;\
+ const pixel *src = (const pixel*)_src;\
const int A=(8-x)*(8-y);\
const int B=( x)*(8-y);\
const int C=(8-x)*( y);\
@@ -144,10 +144,10 @@ static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst /*align 8*/, uint8_t
}\
}\
\
-static void FUNCC(OPNAME ## h264_chroma_mc8)(uint8_t *_dst /*align 8*/, uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\
+static void FUNCC(OPNAME ## h264_chroma_mc8)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\
{\
pixel *dst = (pixel*)_dst;\
- pixel *src = (pixel*)_src;\
+ const pixel *src = (const pixel*)_src;\
const int A=(8-x)*(8-y);\
const int B=( x)*(8-y);\
const int C=(8-x)*( y);\
diff --git a/libavcodec/loongarch/h264chroma_lasx.c b/libavcodec/loongarch/h264chroma_lasx.c
index 67b5899440..5e611997f4 100644
--- a/libavcodec/loongarch/h264chroma_lasx.c
+++ b/libavcodec/loongarch/h264chroma_lasx.c
@@ -33,7 +33,7 @@ static const uint8_t chroma_mask_arr[64] = {
0, 1, 1, 2, 2, 3, 3, 4, 16, 17, 17, 18, 18, 19, 19, 20
};
-static av_always_inline void avc_chroma_hv_8x4_lasx(uint8_t *src, uint8_t *dst,
+static av_always_inline void avc_chroma_hv_8x4_lasx(const uint8_t *src, uint8_t *dst,
ptrdiff_t stride, uint32_t coef_hor0,
uint32_t coef_hor1, uint32_t coef_ver0,
uint32_t coef_ver1)
@@ -71,7 +71,7 @@ static av_always_inline void avc_chroma_hv_8x4_lasx(uint8_t *src, uint8_t *dst,
__lasx_xvstelm_d(out, dst + stride_3x, 0, 3);
}
-static av_always_inline void avc_chroma_hv_8x8_lasx(uint8_t *src, uint8_t *dst,
+static av_always_inline void avc_chroma_hv_8x8_lasx(const uint8_t *src, uint8_t *dst,
ptrdiff_t stride, uint32_t coef_hor0,
uint32_t coef_hor1, uint32_t coef_ver0,
uint32_t coef_ver1)
@@ -127,7 +127,7 @@ static av_always_inline void avc_chroma_hv_8x8_lasx(uint8_t *src, uint8_t *dst,
__lasx_xvstelm_d(out1, dst + stride_3x, 0, 3);
}
-static av_always_inline void avc_chroma_hz_8x4_lasx(uint8_t *src, uint8_t *dst,
+static av_always_inline void avc_chroma_hz_8x4_lasx(const uint8_t *src, uint8_t *dst,
ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1)
{
ptrdiff_t stride_2x = stride << 1;
@@ -154,7 +154,7 @@ static av_always_inline void avc_chroma_hz_8x4_lasx(uint8_t *src, uint8_t *dst,
}
-static av_always_inline void avc_chroma_hz_8x8_lasx(uint8_t *src, uint8_t *dst,
+static av_always_inline void avc_chroma_hz_8x8_lasx(const uint8_t *src, uint8_t *dst,
ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1)
{
ptrdiff_t stride_2x = stride << 1;
@@ -193,7 +193,7 @@ static av_always_inline void avc_chroma_hz_8x8_lasx(uint8_t *src, uint8_t *dst,
__lasx_xvstelm_d(out1, dst + stride_3x, 0, 3);
}
-static av_always_inline void avc_chroma_hz_nonmult_lasx(uint8_t *src,
+static av_always_inline void avc_chroma_hz_nonmult_lasx(const uint8_t *src,
uint8_t *dst, ptrdiff_t stride, uint32_t coeff0,
uint32_t coeff1, int32_t height)
{
@@ -239,7 +239,7 @@ static av_always_inline void avc_chroma_hz_nonmult_lasx(uint8_t *src,
}
}
-static av_always_inline void avc_chroma_vt_8x4_lasx(uint8_t *src, uint8_t *dst,
+static av_always_inline void avc_chroma_vt_8x4_lasx(const uint8_t *src, uint8_t *dst,
ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1)
{
ptrdiff_t stride_2x = stride << 1;
@@ -266,7 +266,7 @@ static av_always_inline void avc_chroma_vt_8x4_lasx(uint8_t *src, uint8_t *dst,
__lasx_xvstelm_d(out, dst + stride_3x, 0, 3);
}
-static av_always_inline void avc_chroma_vt_8x8_lasx(uint8_t *src, uint8_t *dst,
+static av_always_inline void avc_chroma_vt_8x8_lasx(const uint8_t *src, uint8_t *dst,
ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1)
{
ptrdiff_t stride_2x = stride << 1;
@@ -307,7 +307,7 @@ static av_always_inline void avc_chroma_vt_8x8_lasx(uint8_t *src, uint8_t *dst,
__lasx_xvstelm_d(out1, dst + stride_3x, 0, 3);
}
-static av_always_inline void copy_width8x8_lasx(uint8_t *src, uint8_t *dst,
+static av_always_inline void copy_width8x8_lasx(const uint8_t *src, uint8_t *dst,
ptrdiff_t stride)
{
uint64_t tmp[8];
@@ -347,7 +347,7 @@ static av_always_inline void copy_width8x8_lasx(uint8_t *src, uint8_t *dst,
);
}
-static av_always_inline void copy_width8x4_lasx(uint8_t *src, uint8_t *dst,
+static av_always_inline void copy_width8x4_lasx(const uint8_t *src, uint8_t *dst,
ptrdiff_t stride)
{
uint64_t tmp[4];
@@ -372,7 +372,7 @@ static av_always_inline void copy_width8x4_lasx(uint8_t *src, uint8_t *dst,
);
}
-static void avc_chroma_hv_8w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void avc_chroma_hv_8w_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
uint32_t coef_hor0, uint32_t coef_hor1,
uint32_t coef_ver0, uint32_t coef_ver1,
int32_t height)
@@ -386,7 +386,7 @@ static void avc_chroma_hv_8w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
}
}
-static void avc_chroma_hv_4x2_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void avc_chroma_hv_4x2_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
uint32_t coef_hor0, uint32_t coef_hor1,
uint32_t coef_ver0, uint32_t coef_ver1)
{
@@ -414,7 +414,7 @@ static void avc_chroma_hv_4x2_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
__lasx_xvstelm_w(res_vt, dst + stride, 0, 1);
}
-static void avc_chroma_hv_4x4_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void avc_chroma_hv_4x4_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
uint32_t coef_hor0, uint32_t coef_hor1,
uint32_t coef_ver0, uint32_t coef_ver1)
{
@@ -446,7 +446,7 @@ static void avc_chroma_hv_4x4_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
__lasx_xvstelm_w(res_hz0, dst + stride_3, 0, 5);
}
-static void avc_chroma_hv_4x8_lasx(uint8_t *src, uint8_t * dst, ptrdiff_t stride,
+static void avc_chroma_hv_4x8_lasx(const uint8_t *src, uint8_t * dst, ptrdiff_t stride,
uint32_t coef_hor0, uint32_t coef_hor1,
uint32_t coef_ver0, uint32_t coef_ver1)
{
@@ -492,7 +492,7 @@ static void avc_chroma_hv_4x8_lasx(uint8_t *src, uint8_t * dst, ptrdiff_t stride
__lasx_xvstelm_w(res_hz0, dst + stride_3, 0, 7);
}
-static void avc_chroma_hv_4w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void avc_chroma_hv_4w_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
uint32_t coef_hor0, uint32_t coef_hor1,
uint32_t coef_ver0, uint32_t coef_ver1,
int32_t height)
@@ -509,7 +509,7 @@ static void avc_chroma_hv_4w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
}
}
-static void avc_chroma_hz_4x2_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void avc_chroma_hz_4x2_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
uint32_t coeff0, uint32_t coeff1)
{
__m256i src0, src1;
@@ -528,7 +528,7 @@ static void avc_chroma_hz_4x2_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
__lasx_xvstelm_w(res, dst + stride, 0, 1);
}
-static void avc_chroma_hz_4x4_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void avc_chroma_hz_4x4_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
uint32_t coeff0, uint32_t coeff1)
{
ptrdiff_t stride_2 = stride << 1;
@@ -553,7 +553,7 @@ static void avc_chroma_hz_4x4_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
__lasx_xvstelm_w(res, dst + stride_3, 0, 5);
}
-static void avc_chroma_hz_4x8_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void avc_chroma_hz_4x8_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
uint32_t coeff0, uint32_t coeff1)
{
ptrdiff_t stride_2 = stride << 1;
@@ -588,7 +588,7 @@ static void avc_chroma_hz_4x8_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
__lasx_xvstelm_w(res0, dst + stride_3, 0, 7);
}
-static void avc_chroma_hz_4w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void avc_chroma_hz_4w_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
uint32_t coeff0, uint32_t coeff1,
int32_t height)
{
@@ -601,7 +601,7 @@ static void avc_chroma_hz_4w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
}
}
-static void avc_chroma_hz_8w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void avc_chroma_hz_8w_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
uint32_t coeff0, uint32_t coeff1,
int32_t height)
{
@@ -614,7 +614,7 @@ static void avc_chroma_hz_8w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
}
}
-static void avc_chroma_vt_4x2_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void avc_chroma_vt_4x2_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
uint32_t coeff0, uint32_t coeff1)
{
__m256i src0, src1, src2;
@@ -635,7 +635,7 @@ static void avc_chroma_vt_4x2_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
__lasx_xvstelm_w(res, dst + stride, 0, 1);
}
-static void avc_chroma_vt_4x4_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void avc_chroma_vt_4x4_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
uint32_t coeff0, uint32_t coeff1)
{
ptrdiff_t stride_2 = stride << 1;
@@ -664,7 +664,7 @@ static void avc_chroma_vt_4x4_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
__lasx_xvstelm_w(res, dst + stride_3, 0, 5);
}
-static void avc_chroma_vt_4x8_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void avc_chroma_vt_4x8_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
uint32_t coeff0, uint32_t coeff1)
{
ptrdiff_t stride_2 = stride << 1;
@@ -705,7 +705,7 @@ static void avc_chroma_vt_4x8_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
__lasx_xvstelm_w(res0, dst + stride_3, 0, 7);
}
-static void avc_chroma_vt_4w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void avc_chroma_vt_4w_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
uint32_t coeff0, uint32_t coeff1,
int32_t height)
{
@@ -718,7 +718,7 @@ static void avc_chroma_vt_4w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
}
}
-static void avc_chroma_vt_8w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void avc_chroma_vt_8w_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
uint32_t coeff0, uint32_t coeff1,
int32_t height)
{
@@ -729,7 +729,7 @@ static void avc_chroma_vt_8w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
}
}
-static void copy_width4_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void copy_width4_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
int32_t height)
{
uint32_t tp0, tp1, tp2, tp3, tp4, tp5, tp6, tp7;
@@ -799,7 +799,7 @@ static void copy_width4_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
}
}
-static void copy_width8_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void copy_width8_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
int32_t height)
{
if (8 == height) {
@@ -809,7 +809,7 @@ static void copy_width8_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
}
}
-void ff_put_h264_chroma_mc4_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc4_lasx(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int height, int x, int y)
{
av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0);
@@ -825,7 +825,7 @@ void ff_put_h264_chroma_mc4_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
}
}
-void ff_put_h264_chroma_mc8_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc8_lasx(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int height, int x, int y)
{
av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0);
@@ -841,7 +841,7 @@ void ff_put_h264_chroma_mc8_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
}
}
-static av_always_inline void avc_chroma_hv_and_aver_dst_8x4_lasx(uint8_t *src,
+static av_always_inline void avc_chroma_hv_and_aver_dst_8x4_lasx(const uint8_t *src,
uint8_t *dst, ptrdiff_t stride, uint32_t coef_hor0,
uint32_t coef_hor1, uint32_t coef_ver0,
uint32_t coef_ver1)
@@ -885,7 +885,7 @@ static av_always_inline void avc_chroma_hv_and_aver_dst_8x4_lasx(uint8_t *src,
__lasx_xvstelm_d(out, dst + stride_3x, 0, 3);
}
-static av_always_inline void avc_chroma_hv_and_aver_dst_8x8_lasx(uint8_t *src,
+static av_always_inline void avc_chroma_hv_and_aver_dst_8x8_lasx(const uint8_t *src,
uint8_t *dst, ptrdiff_t stride, uint32_t coef_hor0,
uint32_t coef_hor1, uint32_t coef_ver0,
uint32_t coef_ver1)
@@ -957,7 +957,7 @@ static av_always_inline void avc_chroma_hv_and_aver_dst_8x8_lasx(uint8_t *src,
__lasx_xvstelm_d(out1, dst + stride_3x, 0, 3);
}
-static av_always_inline void avc_chroma_hz_and_aver_dst_8x4_lasx(uint8_t *src,
+static av_always_inline void avc_chroma_hz_and_aver_dst_8x4_lasx(const uint8_t *src,
uint8_t *dst, ptrdiff_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -990,7 +990,7 @@ static av_always_inline void avc_chroma_hz_and_aver_dst_8x4_lasx(uint8_t *src,
__lasx_xvstelm_d(out, dst + stride_3x, 0, 3);
}
-static av_always_inline void avc_chroma_hz_and_aver_dst_8x8_lasx(uint8_t *src,
+static av_always_inline void avc_chroma_hz_and_aver_dst_8x8_lasx(const uint8_t *src,
uint8_t *dst, ptrdiff_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -1043,7 +1043,7 @@ static av_always_inline void avc_chroma_hz_and_aver_dst_8x8_lasx(uint8_t *src,
__lasx_xvstelm_d(out1, dst + stride_3x, 0, 3);
}
-static av_always_inline void avc_chroma_vt_and_aver_dst_8x4_lasx(uint8_t *src,
+static av_always_inline void avc_chroma_vt_and_aver_dst_8x4_lasx(const uint8_t *src,
uint8_t *dst, ptrdiff_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -1077,7 +1077,7 @@ static av_always_inline void avc_chroma_vt_and_aver_dst_8x4_lasx(uint8_t *src,
__lasx_xvstelm_d(out, dst + stride_3x, 0, 3);
}
-static av_always_inline void avc_chroma_vt_and_aver_dst_8x8_lasx(uint8_t *src,
+static av_always_inline void avc_chroma_vt_and_aver_dst_8x8_lasx(const uint8_t *src,
uint8_t *dst, ptrdiff_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -1132,7 +1132,7 @@ static av_always_inline void avc_chroma_vt_and_aver_dst_8x8_lasx(uint8_t *src,
__lasx_xvstelm_d(out1, dst + stride_3x, 0, 3);
}
-static av_always_inline void avg_width8x8_lasx(uint8_t *src, uint8_t *dst,
+static av_always_inline void avg_width8x8_lasx(const uint8_t *src, uint8_t *dst,
ptrdiff_t stride)
{
__m256i src0, src1, src2, src3;
@@ -1184,7 +1184,7 @@ static av_always_inline void avg_width8x8_lasx(uint8_t *src, uint8_t *dst,
__lasx_xvstelm_d(dst0, dst + stride_3x, 0, 3);
}
-static av_always_inline void avg_width8x4_lasx(uint8_t *src, uint8_t *dst,
+static av_always_inline void avg_width8x4_lasx(const uint8_t *src, uint8_t *dst,
ptrdiff_t stride)
{
__m256i src0, src1, src2, src3;
@@ -1213,7 +1213,7 @@ static av_always_inline void avg_width8x4_lasx(uint8_t *src, uint8_t *dst,
__lasx_xvstelm_d(dst0, dst + stride_3x, 0, 3);
}
-static void avc_chroma_hv_and_aver_dst_8w_lasx(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hv_and_aver_dst_8w_lasx(const uint8_t *src, uint8_t *dst,
ptrdiff_t stride,
uint32_t coef_hor0,
uint32_t coef_hor1,
@@ -1230,7 +1230,7 @@ static void avc_chroma_hv_and_aver_dst_8w_lasx(uint8_t *src, uint8_t *dst,
}
}
-static void avc_chroma_hz_and_aver_dst_8w_lasx(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hz_and_aver_dst_8w_lasx(const uint8_t *src, uint8_t *dst,
ptrdiff_t stride, uint32_t coeff0,
uint32_t coeff1, int32_t height)
{
@@ -1241,7 +1241,7 @@ static void avc_chroma_hz_and_aver_dst_8w_lasx(uint8_t *src, uint8_t *dst,
}
}
-static void avc_chroma_vt_and_aver_dst_8w_lasx(uint8_t *src, uint8_t *dst,
+static void avc_chroma_vt_and_aver_dst_8w_lasx(const uint8_t *src, uint8_t *dst,
ptrdiff_t stride, uint32_t coeff0,
uint32_t coeff1, int32_t height)
{
@@ -1252,7 +1252,7 @@ static void avc_chroma_vt_and_aver_dst_8w_lasx(uint8_t *src, uint8_t *dst,
}
}
-static void avg_width8_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+static void avg_width8_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
int32_t height)
{
if (8 == height) {
@@ -1262,7 +1262,7 @@ static void avg_width8_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
}
}
-void ff_avg_h264_chroma_mc8_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_h264_chroma_mc8_lasx(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int height, int x, int y)
{
av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0);
diff --git a/libavcodec/loongarch/h264chroma_lasx.h b/libavcodec/loongarch/h264chroma_lasx.h
index 4aac8db8cb..633752035e 100644
--- a/libavcodec/loongarch/h264chroma_lasx.h
+++ b/libavcodec/loongarch/h264chroma_lasx.h
@@ -26,11 +26,11 @@
#include <stddef.h>
#include "libavcodec/h264.h"
-void ff_put_h264_chroma_mc4_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc4_lasx(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_put_h264_chroma_mc8_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc8_lasx(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_avg_h264_chroma_mc8_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_h264_chroma_mc8_lasx(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
#endif /* AVCODEC_LOONGARCH_H264CHROMA_LASX_H */
diff --git a/libavcodec/loongarch/vc1dsp_lasx.c b/libavcodec/loongarch/vc1dsp_lasx.c
index 9f01abcff4..12f68ee028 100644
--- a/libavcodec/loongarch/vc1dsp_lasx.c
+++ b/libavcodec/loongarch/vc1dsp_lasx.c
@@ -698,7 +698,7 @@ PUT_VC1_MSPEL_MC_LASX(3, 2);
PUT_VC1_MSPEL_MC_LASX(3, 3);
void ff_put_no_rnd_vc1_chroma_mc8_lasx(uint8_t *dst /* align 8 */,
- uint8_t *src /* align 1 */,
+ const uint8_t *src /* align 1 */,
ptrdiff_t stride, int h, int x, int y)
{
const int intA = (8 - x) * (8 - y);
diff --git a/libavcodec/loongarch/vc1dsp_loongarch.h b/libavcodec/loongarch/vc1dsp_loongarch.h
index 398631aecc..e5ccbcb768 100644
--- a/libavcodec/loongarch/vc1dsp_loongarch.h
+++ b/libavcodec/loongarch/vc1dsp_loongarch.h
@@ -73,7 +73,7 @@ FF_PUT_VC1_MSPEL_MC_H_LASX(2);
FF_PUT_VC1_MSPEL_MC_H_LASX(3);
void ff_put_no_rnd_vc1_chroma_mc8_lasx(uint8_t *dst /* align 8 */,
- uint8_t *src /* align 1 */,
+ const uint8_t *src /* align 1 */,
ptrdiff_t stride, int h, int x, int y);
#endif /* AVCODEC_LOONGARCH_VC1DSP_LOONGARCH_H */
diff --git a/libavcodec/mips/h264chroma_mips.h b/libavcodec/mips/h264chroma_mips.h
index 996384d005..c694e34b3f 100644
--- a/libavcodec/mips/h264chroma_mips.h
+++ b/libavcodec/mips/h264chroma_mips.h
@@ -22,26 +22,26 @@
#define AVCODEC_MIPS_H264CHROMA_MIPS_H
#include "libavcodec/h264dec.h"
-void ff_put_h264_chroma_mc8_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc8_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int height, int x, int y);
-void ff_put_h264_chroma_mc4_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc4_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int height, int x, int y);
-void ff_put_h264_chroma_mc2_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc2_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int height, int x, int y);
-void ff_avg_h264_chroma_mc8_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_h264_chroma_mc8_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int height, int x, int y);
-void ff_avg_h264_chroma_mc4_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_h264_chroma_mc4_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int height, int x, int y);
-void ff_avg_h264_chroma_mc2_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_h264_chroma_mc2_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int height, int x, int y);
-void ff_put_h264_chroma_mc8_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc8_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_avg_h264_chroma_mc8_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_h264_chroma_mc8_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_put_h264_chroma_mc4_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc4_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_avg_h264_chroma_mc4_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_h264_chroma_mc4_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
#endif /* AVCODEC_MIPS_H264CHROMA_MIPS_H */
diff --git a/libavcodec/mips/h264chroma_mmi.c b/libavcodec/mips/h264chroma_mmi.c
index ec35c5a72e..fe05ccd671 100644
--- a/libavcodec/mips/h264chroma_mmi.c
+++ b/libavcodec/mips/h264chroma_mmi.c
@@ -26,7 +26,7 @@
#include "constants.h"
#include "libavutil/mips/mmiutils.h"
-void ff_put_h264_chroma_mc8_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc8_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y)
{
double ftmp[12];
@@ -289,7 +289,7 @@ void ff_put_h264_chroma_mc8_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
}
}
-void ff_avg_h264_chroma_mc8_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_h264_chroma_mc8_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y)
{
double ftmp[10];
@@ -497,7 +497,7 @@ void ff_avg_h264_chroma_mc8_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
}
}
-void ff_put_h264_chroma_mc4_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_put_h264_chroma_mc4_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y)
{
double ftmp[8];
@@ -618,7 +618,7 @@ void ff_put_h264_chroma_mc4_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
}
}
-void ff_avg_h264_chroma_mc4_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
+void ff_avg_h264_chroma_mc4_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y)
{
double ftmp[8];
diff --git a/libavcodec/mips/h264chroma_msa.c b/libavcodec/mips/h264chroma_msa.c
index 4a68d9e134..141f52c2be 100644
--- a/libavcodec/mips/h264chroma_msa.c
+++ b/libavcodec/mips/h264chroma_msa.c
@@ -29,7 +29,7 @@ static const uint8_t chroma_mask_arr[16 * 5] = {
0, 1, 1, 2, 16, 17, 17, 18, 16, 17, 17, 18, 18, 19, 19, 20
};
-static void avc_chroma_hz_2x2_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hz_2x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1)
{
uint16_t out0, out1;
@@ -60,7 +60,7 @@ static void avc_chroma_hz_2x2_msa(uint8_t *src, uint8_t *dst, int32_t stride,
SH(out1, dst);
}
-static void avc_chroma_hz_2x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hz_2x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1)
{
v16u8 src0, src1, src2, src3;
@@ -88,7 +88,7 @@ static void avc_chroma_hz_2x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_H4(res, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_hz_2w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hz_2w_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1,
int32_t height)
{
@@ -99,7 +99,7 @@ static void avc_chroma_hz_2w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
}
}
-static void avc_chroma_hz_4x2_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hz_4x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1)
{
v16i8 src0, src1;
@@ -124,7 +124,7 @@ static void avc_chroma_hz_4x2_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_W2(res, 0, 1, dst, stride);
}
-static void avc_chroma_hz_4x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hz_4x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1)
{
v16u8 src0, src1, src2, src3, out;
@@ -147,7 +147,7 @@ static void avc_chroma_hz_4x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_W4(out, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_hz_4x8_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hz_4x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1)
{
v16u8 src0, src1, src2, src3, src4, src5, src6, src7, out0, out1;
@@ -171,7 +171,7 @@ static void avc_chroma_hz_4x8_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_W8(out0, out1, 0, 1, 2, 3, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_hz_4w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hz_4w_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1,
int32_t height)
{
@@ -184,7 +184,7 @@ static void avc_chroma_hz_4w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
}
}
-static void avc_chroma_hz_8x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hz_8x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1)
{
v16u8 src0, src1, src2, src3, out0, out1;
@@ -207,7 +207,7 @@ static void avc_chroma_hz_8x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_D4(out0, out1, 0, 1, 0, 1, dst, stride);
}
-static void avc_chroma_hz_8x8_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hz_8x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1)
{
v16u8 src0, src1, src2, src3, src4, src5, src6, src7;
@@ -240,7 +240,7 @@ static void avc_chroma_hz_8x8_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_D8(out0, out1, out2, out3, 0, 1, 0, 1, 0, 1, 0, 1, dst, stride);
}
-static void avc_chroma_hz_nonmult_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hz_nonmult_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1, int32_t height)
{
@@ -289,7 +289,7 @@ static void avc_chroma_hz_nonmult_msa(uint8_t *src, uint8_t *dst,
}
}
-static void avc_chroma_hz_8w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hz_8w_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1,
int32_t height)
{
@@ -302,7 +302,7 @@ static void avc_chroma_hz_8w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
}
}
-static void avc_chroma_vt_2x2_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_vt_2x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1)
{
uint16_t out0, out1;
@@ -334,7 +334,7 @@ static void avc_chroma_vt_2x2_msa(uint8_t *src, uint8_t *dst, int32_t stride,
SH(out1, dst);
}
-static void avc_chroma_vt_2x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_vt_2x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1)
{
v16u8 src0, src1, src2, src3, src4;
@@ -362,7 +362,7 @@ static void avc_chroma_vt_2x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_H4(res, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_vt_2w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_vt_2w_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1,
int32_t height)
{
@@ -373,7 +373,7 @@ static void avc_chroma_vt_2w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
}
}
-static void avc_chroma_vt_4x2_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_vt_4x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1)
{
v16u8 src0, src1, src2;
@@ -397,7 +397,7 @@ static void avc_chroma_vt_4x2_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_W2(res, 0, 1, dst, stride);
}
-static void avc_chroma_vt_4x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_vt_4x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1)
{
v16u8 src0, src1, src2, src3, src4;
@@ -421,7 +421,7 @@ static void avc_chroma_vt_4x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_W4(out, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_vt_4x8_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_vt_4x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1)
{
v16u8 src0, src1, src2, src3, src4, src5, src6, src7, src8;
@@ -449,7 +449,7 @@ static void avc_chroma_vt_4x8_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_W8(out0, out1, 0, 1, 2, 3, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_vt_4w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_vt_4w_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1,
int32_t height)
{
@@ -462,7 +462,7 @@ static void avc_chroma_vt_4w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
}
}
-static void avc_chroma_vt_8x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_vt_8x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1)
{
v16u8 src0, src1, src2, src3, src4, out0, out1;
@@ -483,7 +483,7 @@ static void avc_chroma_vt_8x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_D4(out0, out1, 0, 1, 0, 1, dst, stride);
}
-static void avc_chroma_vt_8x8_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_vt_8x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1)
{
v16u8 src0, src1, src2, src3, src4, src5, src6, src7, src8;
@@ -515,7 +515,7 @@ static void avc_chroma_vt_8x8_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_D8(out0, out1, out2, out3, 0, 1, 0, 1, 0, 1, 0, 1, dst, stride);
}
-static void avc_chroma_vt_8w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_vt_8w_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coeff0, uint32_t coeff1,
int32_t height)
{
@@ -526,7 +526,7 @@ static void avc_chroma_vt_8w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
}
}
-static void avc_chroma_hv_2x2_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hv_2x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coef_hor0, uint32_t coef_hor1,
uint32_t coef_ver0, uint32_t coef_ver1)
{
@@ -561,7 +561,7 @@ static void avc_chroma_hv_2x2_msa(uint8_t *src, uint8_t *dst, int32_t stride,
SH(out1, dst);
}
-static void avc_chroma_hv_2x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hv_2x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coef_hor0, uint32_t coef_hor1,
uint32_t coef_ver0, uint32_t coef_ver1)
{
@@ -595,7 +595,7 @@ static void avc_chroma_hv_2x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_H4(res, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_hv_2w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hv_2w_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coef_hor0, uint32_t coef_hor1,
uint32_t coef_ver0, uint32_t coef_ver1,
int32_t height)
@@ -609,7 +609,7 @@ static void avc_chroma_hv_2w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
}
}
-static void avc_chroma_hv_4x2_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hv_4x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coef_hor0, uint32_t coef_hor1,
uint32_t coef_ver0, uint32_t coef_ver1)
{
@@ -637,7 +637,7 @@ static void avc_chroma_hv_4x2_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_W2(res, 0, 1, dst, stride);
}
-static void avc_chroma_hv_4x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hv_4x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coef_hor0, uint32_t coef_hor1,
uint32_t coef_ver0, uint32_t coef_ver1)
{
@@ -670,7 +670,7 @@ static void avc_chroma_hv_4x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_W2(res1, 0, 1, dst + 2 * stride, stride);
}
-static void avc_chroma_hv_4x8_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hv_4x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coef_hor0, uint32_t coef_hor1,
uint32_t coef_ver0, uint32_t coef_ver1)
{
@@ -710,7 +710,7 @@ static void avc_chroma_hv_4x8_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_W8(res0, res1, 0, 1, 2, 3, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_hv_4w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hv_4w_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coef_hor0, uint32_t coef_hor1,
uint32_t coef_ver0, uint32_t coef_ver1,
int32_t height)
@@ -727,7 +727,7 @@ static void avc_chroma_hv_4w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
}
}
-static void avc_chroma_hv_8x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hv_8x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coef_hor0, uint32_t coef_hor1,
uint32_t coef_ver0, uint32_t coef_ver1)
{
@@ -770,7 +770,7 @@ static void avc_chroma_hv_8x4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_D4(out0, out1, 0, 1, 0, 1, dst, stride);
}
-static void avc_chroma_hv_8x8_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hv_8x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coef_hor0, uint32_t coef_hor1,
uint32_t coef_ver0, uint32_t coef_ver1)
{
@@ -826,7 +826,7 @@ static void avc_chroma_hv_8x8_msa(uint8_t *src, uint8_t *dst, int32_t stride,
ST_D8(out0, out1, out2, out3, 0, 1, 0, 1, 0, 1, 0, 1, dst, stride);
}
-static void avc_chroma_hv_8w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avc_chroma_hv_8w_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
uint32_t coef_hor0, uint32_t coef_hor1,
uint32_t coef_ver0, uint32_t coef_ver1,
int32_t height)
@@ -840,7 +840,7 @@ static void avc_chroma_hv_8w_msa(uint8_t *src, uint8_t *dst, int32_t stride,
}
}
-static void avc_chroma_hz_and_aver_dst_2x2_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hz_and_aver_dst_2x2_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -882,7 +882,7 @@ static void avc_chroma_hz_and_aver_dst_2x2_msa(uint8_t *src, uint8_t *dst,
SH(out1, dst);
}
-static void avc_chroma_hz_and_aver_dst_2x4_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hz_and_aver_dst_2x4_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -922,7 +922,7 @@ static void avc_chroma_hz_and_aver_dst_2x4_msa(uint8_t *src, uint8_t *dst,
ST_H4(dst0, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_hz_and_aver_dst_2w_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hz_and_aver_dst_2w_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1, int32_t height)
{
@@ -933,7 +933,7 @@ static void avc_chroma_hz_and_aver_dst_2w_msa(uint8_t *src, uint8_t *dst,
}
}
-static void avc_chroma_hz_and_aver_dst_4x2_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hz_and_aver_dst_4x2_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -966,7 +966,7 @@ static void avc_chroma_hz_and_aver_dst_4x2_msa(uint8_t *src, uint8_t *dst,
ST_W2(dst_data, 0, 1, dst, stride);
}
-static void avc_chroma_hz_and_aver_dst_4x4_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hz_and_aver_dst_4x4_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -995,7 +995,7 @@ static void avc_chroma_hz_and_aver_dst_4x4_msa(uint8_t *src, uint8_t *dst,
ST_W4(out, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_hz_and_aver_dst_4x8_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hz_and_aver_dst_4x8_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -1027,7 +1027,7 @@ static void avc_chroma_hz_and_aver_dst_4x8_msa(uint8_t *src, uint8_t *dst,
ST_W8(out0, out1, 0, 1, 2, 3, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_hz_and_aver_dst_4w_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hz_and_aver_dst_4w_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1, int32_t height)
{
@@ -1040,7 +1040,7 @@ static void avc_chroma_hz_and_aver_dst_4w_msa(uint8_t *src, uint8_t *dst,
}
}
-static void avc_chroma_hz_and_aver_dst_8x4_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hz_and_aver_dst_8x4_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -1070,7 +1070,7 @@ static void avc_chroma_hz_and_aver_dst_8x4_msa(uint8_t *src, uint8_t *dst,
ST_D4(dst0, dst1, 0, 1, 0, 1, dst, stride);
}
-static void avc_chroma_hz_and_aver_dst_8x8_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hz_and_aver_dst_8x8_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -1114,7 +1114,7 @@ static void avc_chroma_hz_and_aver_dst_8x8_msa(uint8_t *src, uint8_t *dst,
ST_D8(out0, out1, out2, out3, 0, 1, 0, 1, 0, 1, 0, 1, dst, stride);
}
-static void avc_chroma_hz_and_aver_dst_8w_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hz_and_aver_dst_8w_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1, int32_t height)
{
@@ -1125,7 +1125,7 @@ static void avc_chroma_hz_and_aver_dst_8w_msa(uint8_t *src, uint8_t *dst,
}
}
-static void avc_chroma_vt_and_aver_dst_2x2_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_vt_and_aver_dst_2x2_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -1162,7 +1162,7 @@ static void avc_chroma_vt_and_aver_dst_2x2_msa(uint8_t *src, uint8_t *dst,
SH(out1, dst);
}
-static void avc_chroma_vt_and_aver_dst_2x4_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_vt_and_aver_dst_2x4_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -1204,7 +1204,7 @@ static void avc_chroma_vt_and_aver_dst_2x4_msa(uint8_t *src, uint8_t *dst,
ST_H4(res, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_vt_and_aver_dst_2w_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_vt_and_aver_dst_2w_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1, int32_t height)
{
@@ -1215,7 +1215,7 @@ static void avc_chroma_vt_and_aver_dst_2w_msa(uint8_t *src, uint8_t *dst,
}
}
-static void avc_chroma_vt_and_aver_dst_4x2_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_vt_and_aver_dst_4x2_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -1247,7 +1247,7 @@ static void avc_chroma_vt_and_aver_dst_4x2_msa(uint8_t *src, uint8_t *dst,
ST_W2(res, 0, 1, dst, stride);
}
-static void avc_chroma_vt_and_aver_dst_4x4_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_vt_and_aver_dst_4x4_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -1277,7 +1277,7 @@ static void avc_chroma_vt_and_aver_dst_4x4_msa(uint8_t *src, uint8_t *dst,
ST_W4(out, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_vt_and_aver_dst_4x8_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_vt_and_aver_dst_4x8_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -1313,7 +1313,7 @@ static void avc_chroma_vt_and_aver_dst_4x8_msa(uint8_t *src, uint8_t *dst,
ST_W8(out0, out1, 0, 1, 2, 3, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_vt_and_aver_dst_4w_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_vt_and_aver_dst_4w_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1, int32_t height)
{
@@ -1326,7 +1326,7 @@ static void avc_chroma_vt_and_aver_dst_4w_msa(uint8_t *src, uint8_t *dst,
}
}
-static void avc_chroma_vt_and_aver_dst_8x4_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_vt_and_aver_dst_8x4_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -1355,7 +1355,7 @@ static void avc_chroma_vt_and_aver_dst_8x4_msa(uint8_t *src, uint8_t *dst,
ST_D4(out0, out1, 0, 1, 0, 1, dst, stride);
}
-static void avc_chroma_vt_and_aver_dst_8x8_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_vt_and_aver_dst_8x8_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1)
{
@@ -1398,7 +1398,7 @@ static void avc_chroma_vt_and_aver_dst_8x8_msa(uint8_t *src, uint8_t *dst,
ST_D8(out0, out1, out2, out3, 0, 1, 0, 1, 0, 1, 0, 1, dst, stride);
}
-static void avc_chroma_vt_and_aver_dst_8w_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_vt_and_aver_dst_8w_msa(const uint8_t *src, uint8_t *dst,
int32_t stride, uint32_t coeff0,
uint32_t coeff1, int32_t height)
{
@@ -1409,7 +1409,7 @@ static void avc_chroma_vt_and_aver_dst_8w_msa(uint8_t *src, uint8_t *dst,
}
}
-static void avc_chroma_hv_and_aver_dst_2x2_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hv_and_aver_dst_2x2_msa(const uint8_t *src, uint8_t *dst,
int32_t stride,
uint32_t coef_hor0,
uint32_t coef_hor1,
@@ -1451,7 +1451,7 @@ static void avc_chroma_hv_and_aver_dst_2x2_msa(uint8_t *src, uint8_t *dst,
SH(out1, dst);
}
-static void avc_chroma_hv_and_aver_dst_2x4_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hv_and_aver_dst_2x4_msa(const uint8_t *src, uint8_t *dst,
int32_t stride,
uint32_t coef_hor0,
uint32_t coef_hor1,
@@ -1496,7 +1496,7 @@ static void avc_chroma_hv_and_aver_dst_2x4_msa(uint8_t *src, uint8_t *dst,
ST_H4(dst0, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_hv_and_aver_dst_2w_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hv_and_aver_dst_2w_msa(const uint8_t *src, uint8_t *dst,
int32_t stride,
uint32_t coef_hor0,
uint32_t coef_hor1,
@@ -1513,7 +1513,7 @@ static void avc_chroma_hv_and_aver_dst_2w_msa(uint8_t *src, uint8_t *dst,
}
}
-static void avc_chroma_hv_and_aver_dst_4x2_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hv_and_aver_dst_4x2_msa(const uint8_t *src, uint8_t *dst,
int32_t stride,
uint32_t coef_hor0,
uint32_t coef_hor1,
@@ -1549,7 +1549,7 @@ static void avc_chroma_hv_and_aver_dst_4x2_msa(uint8_t *src, uint8_t *dst,
ST_W2(dst0, 0, 1, dst, stride);
}
-static void avc_chroma_hv_and_aver_dst_4x4_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hv_and_aver_dst_4x4_msa(const uint8_t *src, uint8_t *dst,
int32_t stride,
uint32_t coef_hor0,
uint32_t coef_hor1,
@@ -1588,7 +1588,7 @@ static void avc_chroma_hv_and_aver_dst_4x4_msa(uint8_t *src, uint8_t *dst,
ST_W4(out, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_hv_and_aver_dst_4x8_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hv_and_aver_dst_4x8_msa(const uint8_t *src, uint8_t *dst,
int32_t stride,
uint32_t coef_hor0,
uint32_t coef_hor1,
@@ -1637,7 +1637,7 @@ static void avc_chroma_hv_and_aver_dst_4x8_msa(uint8_t *src, uint8_t *dst,
ST_W8(res0, res1, 0, 1, 2, 3, 0, 1, 2, 3, dst, stride);
}
-static void avc_chroma_hv_and_aver_dst_4w_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hv_and_aver_dst_4w_msa(const uint8_t *src, uint8_t *dst,
int32_t stride,
uint32_t coef_hor0,
uint32_t coef_hor1,
@@ -1657,7 +1657,7 @@ static void avc_chroma_hv_and_aver_dst_4w_msa(uint8_t *src, uint8_t *dst,
}
}
-static void avc_chroma_hv_and_aver_dst_8x4_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hv_and_aver_dst_8x4_msa(const uint8_t *src, uint8_t *dst,
int32_t stride,
uint32_t coef_hor0,
uint32_t coef_hor1,
@@ -1705,7 +1705,7 @@ static void avc_chroma_hv_and_aver_dst_8x4_msa(uint8_t *src, uint8_t *dst,
ST_D4(out0, out1, 0, 1, 0, 1, dst, stride);
}
-static void avc_chroma_hv_and_aver_dst_8x8_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hv_and_aver_dst_8x8_msa(const uint8_t *src, uint8_t *dst,
int32_t stride,
uint32_t coef_hor0,
uint32_t coef_hor1,
@@ -1774,7 +1774,7 @@ static void avc_chroma_hv_and_aver_dst_8x8_msa(uint8_t *src, uint8_t *dst,
ST_D8(out0, out1, out2, out3, 0, 1, 0, 1, 0, 1, 0, 1, dst, stride);
}
-static void avc_chroma_hv_and_aver_dst_8w_msa(uint8_t *src, uint8_t *dst,
+static void avc_chroma_hv_and_aver_dst_8w_msa(const uint8_t *src, uint8_t *dst,
int32_t stride,
uint32_t coef_hor0,
uint32_t coef_hor1,
@@ -1791,7 +1791,7 @@ static void avc_chroma_hv_and_aver_dst_8w_msa(uint8_t *src, uint8_t *dst,
}
}
-static void copy_width4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void copy_width4_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
int32_t height)
{
uint32_t tp0, tp1, tp2, tp3, tp4, tp5, tp6, tp7;
@@ -1814,7 +1814,7 @@ static void copy_width4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
}
}
-static void copy_width8_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void copy_width8_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
int32_t height)
{
uint64_t src0, src1, src2, src3, src4, src5, src6, src7;
@@ -1832,7 +1832,7 @@ static void copy_width8_msa(uint8_t *src, uint8_t *dst, int32_t stride,
}
}
-static void avg_width4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avg_width4_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
int32_t height)
{
uint32_t tp0, tp1, tp2, tp3;
@@ -1867,7 +1867,7 @@ static void avg_width4_msa(uint8_t *src, uint8_t *dst, int32_t stride,
}
}
-static void avg_width8_msa(uint8_t *src, uint8_t *dst, int32_t stride,
+static void avg_width8_msa(const uint8_t *src, uint8_t *dst, int32_t stride,
int32_t height)
{
uint64_t tp0, tp1, tp2, tp3, tp4, tp5, tp6, tp7;
@@ -1903,7 +1903,7 @@ static void avg_width8_msa(uint8_t *src, uint8_t *dst, int32_t stride,
}
}
-void ff_put_h264_chroma_mc8_msa(uint8_t *dst, uint8_t *src,
+void ff_put_h264_chroma_mc8_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int height, int x, int y)
{
av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0);
@@ -1919,7 +1919,7 @@ void ff_put_h264_chroma_mc8_msa(uint8_t *dst, uint8_t *src,
}
}
-void ff_put_h264_chroma_mc4_msa(uint8_t *dst, uint8_t *src,
+void ff_put_h264_chroma_mc4_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int height, int x, int y)
{
av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0);
@@ -1935,7 +1935,7 @@ void ff_put_h264_chroma_mc4_msa(uint8_t *dst, uint8_t *src,
}
}
-void ff_put_h264_chroma_mc2_msa(uint8_t *dst, uint8_t *src,
+void ff_put_h264_chroma_mc2_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int height, int x, int y)
{
int32_t cnt;
@@ -1958,7 +1958,7 @@ void ff_put_h264_chroma_mc2_msa(uint8_t *dst, uint8_t *src,
}
}
-void ff_avg_h264_chroma_mc8_msa(uint8_t *dst, uint8_t *src,
+void ff_avg_h264_chroma_mc8_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int height, int x, int y)
{
av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0);
@@ -1976,7 +1976,7 @@ void ff_avg_h264_chroma_mc8_msa(uint8_t *dst, uint8_t *src,
}
}
-void ff_avg_h264_chroma_mc4_msa(uint8_t *dst, uint8_t *src,
+void ff_avg_h264_chroma_mc4_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int height, int x, int y)
{
av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0);
@@ -1993,7 +1993,7 @@ void ff_avg_h264_chroma_mc4_msa(uint8_t *dst, uint8_t *src,
}
}
-void ff_avg_h264_chroma_mc2_msa(uint8_t *dst, uint8_t *src,
+void ff_avg_h264_chroma_mc2_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int height, int x, int y)
{
int32_t cnt;
diff --git a/libavcodec/mips/vc1dsp_mips.h b/libavcodec/mips/vc1dsp_mips.h
index 356153cab6..8fcff26b14 100644
--- a/libavcodec/mips/vc1dsp_mips.h
+++ b/libavcodec/mips/vc1dsp_mips.h
@@ -179,16 +179,16 @@ void ff_vc1_v_loop_filter16_mmi(uint8_t *src, ptrdiff_t stride, int pq);
void ff_vc1_h_loop_filter16_mmi(uint8_t *src, ptrdiff_t stride, int pq);
void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
- uint8_t *src /* align 1 */,
+ const uint8_t *src /* align 1 */,
ptrdiff_t stride, int h, int x, int y);
void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
- uint8_t *src /* align 1 */,
+ const uint8_t *src /* align 1 */,
ptrdiff_t stride, int h, int x, int y);
void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
- uint8_t *src /* align 1 */,
+ const uint8_t *src /* align 1 */,
ptrdiff_t stride, int h, int x, int y);
void ff_avg_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
- uint8_t *src /* align 1 */,
+ const uint8_t *src /* align 1 */,
ptrdiff_t stride, int h, int x, int y);
void ff_vc1_inv_trans_8x8_msa(int16_t block[64]);
diff --git a/libavcodec/mips/vc1dsp_mmi.c b/libavcodec/mips/vc1dsp_mmi.c
index 278aa566bc..290b47d697 100644
--- a/libavcodec/mips/vc1dsp_mmi.c
+++ b/libavcodec/mips/vc1dsp_mmi.c
@@ -2235,7 +2235,7 @@ DECLARE_FUNCTION(3, 3)
void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
- uint8_t *src /* align 1 */,
+ const uint8_t *src /* align 1 */,
ptrdiff_t stride, int h, int x, int y)
{
union mmi_intfloat64 A, B, C, D;
@@ -2291,7 +2291,7 @@ void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
}
void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
- uint8_t *src /* align 1 */,
+ const uint8_t *src /* align 1 */,
ptrdiff_t stride, int h, int x, int y)
{
union mmi_intfloat64 A, B, C, D;
@@ -2345,7 +2345,7 @@ void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
}
void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
- uint8_t *src /* align 1 */,
+ const uint8_t *src /* align 1 */,
ptrdiff_t stride, int h, int x, int y)
{
union mmi_intfloat64 A, B, C, D;
@@ -2404,7 +2404,7 @@ void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
}
void ff_avg_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
- uint8_t *src /* align 1 */,
+ const uint8_t *src /* align 1 */,
ptrdiff_t stride, int h, int x, int y)
{
union mmi_intfloat64 A, B, C, D;
diff --git a/libavcodec/ppc/h264chroma_template.c b/libavcodec/ppc/h264chroma_template.c
index eda98c67ec..c64856bb14 100644
--- a/libavcodec/ppc/h264chroma_template.c
+++ b/libavcodec/ppc/h264chroma_template.c
@@ -109,7 +109,7 @@
#endif /* HAVE_BIGENDIAN */
#ifdef PREFIX_h264_chroma_mc8_altivec
-static void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, uint8_t * src,
+static void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, const uint8_t * src,
ptrdiff_t stride, int h,
int x, int y)
{
@@ -184,7 +184,7 @@ static void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, uint8_t * src,
/* this code assume that stride % 16 == 0 */
#ifdef PREFIX_no_rnd_vc1_chroma_mc8_altivec
-static void PREFIX_no_rnd_vc1_chroma_mc8_altivec(uint8_t *dst, uint8_t *src,
+static void PREFIX_no_rnd_vc1_chroma_mc8_altivec(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h,
int x, int y)
{
diff --git a/libavcodec/rv40dsp.c b/libavcodec/rv40dsp.c
index a09179ae85..f0208b16ea 100644
--- a/libavcodec/rv40dsp.c
+++ b/libavcodec/rv40dsp.c
@@ -292,7 +292,7 @@ static const int rv40_bias[4][4] = {
#define RV40_CHROMA_MC(OPNAME, OP)\
static void OPNAME ## rv40_chroma_mc4_c(uint8_t *dst /*align 8*/,\
- uint8_t *src /*align 1*/,\
+ const uint8_t *src /*align 1*/,\
ptrdiff_t stride, int h, int x, int y)\
{\
const int A = (8-x) * (8-y);\
@@ -328,7 +328,7 @@ static void OPNAME ## rv40_chroma_mc4_c(uint8_t *dst /*align 8*/,\
}\
\
static void OPNAME ## rv40_chroma_mc8_c(uint8_t *dst/*align 8*/,\
- uint8_t *src/*align 1*/,\
+ const uint8_t *src/*align 1*/,\
ptrdiff_t stride, int h, int x, int y)\
{\
const int A = (8-x) * (8-y);\
diff --git a/libavcodec/vc1dsp.c b/libavcodec/vc1dsp.c
index 62c553bc01..62c8eb21fa 100644
--- a/libavcodec/vc1dsp.c
+++ b/libavcodec/vc1dsp.c
@@ -787,7 +787,7 @@ PUT_VC1_MSPEL(3, 3)
((A * src[a] + B * src[a + 1] + \
C * src[stride + a] + D * src[stride + a + 1] + 32 - 4) >> 6)
static void put_no_rnd_vc1_chroma_mc8_c(uint8_t *dst /* align 8 */,
- uint8_t *src /* align 1 */,
+ const uint8_t *src /* align 1 */,
ptrdiff_t stride, int h, int x, int y)
{
const int A = (8 - x) * (8 - y);
@@ -812,7 +812,7 @@ static void put_no_rnd_vc1_chroma_mc8_c(uint8_t *dst /* align 8 */,
}
}
-static void put_no_rnd_vc1_chroma_mc4_c(uint8_t *dst, uint8_t *src,
+static void put_no_rnd_vc1_chroma_mc4_c(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y)
{
const int A = (8 - x) * (8 - y);
@@ -835,7 +835,7 @@ static void put_no_rnd_vc1_chroma_mc4_c(uint8_t *dst, uint8_t *src,
#define avg2(a, b) (((a) + (b) + 1) >> 1)
static void avg_no_rnd_vc1_chroma_mc8_c(uint8_t *dst /* align 8 */,
- uint8_t *src /* align 1 */,
+ const uint8_t *src /* align 1 */,
ptrdiff_t stride, int h, int x, int y)
{
const int A = (8 - x) * (8 - y);
@@ -861,7 +861,7 @@ static void avg_no_rnd_vc1_chroma_mc8_c(uint8_t *dst /* align 8 */,
}
static void avg_no_rnd_vc1_chroma_mc4_c(uint8_t *dst /* align 8 */,
- uint8_t *src /* align 1 */,
+ const uint8_t *src /* align 1 */,
ptrdiff_t stride, int h, int x, int y)
{
const int A = (8 - x) * (8 - y);
diff --git a/libavcodec/x86/h264_chromamc.asm b/libavcodec/x86/h264_chromamc.asm
index e562efd69d..a5c53034a2 100644
--- a/libavcodec/x86/h264_chromamc.asm
+++ b/libavcodec/x86/h264_chromamc.asm
@@ -104,7 +104,7 @@ SECTION .text
%define extra_regs 0
%endif ; rv40
; void ff_put/avg_h264_chroma_mc8_*(uint8_t *dst /* align 8 */,
-; uint8_t *src /* align 1 */,
+; const uint8_t *src /* align 1 */,
; ptrdiff_t stride, int h, int mx, int my)
cglobal %1_%2_chroma_mc8%3, 6, 7 + extra_regs, 0
mov r6d, r5d
diff --git a/libavcodec/x86/h264_chromamc_10bit.asm b/libavcodec/x86/h264_chromamc_10bit.asm
index 34bc41969b..fdc4f407c7 100644
--- a/libavcodec/x86/h264_chromamc_10bit.asm
+++ b/libavcodec/x86/h264_chromamc_10bit.asm
@@ -57,7 +57,7 @@ SECTION .text
%endmacro
;-----------------------------------------------------------------------------
-; void ff_put/avg_h264_chroma_mc8(pixel *dst, pixel *src, ptrdiff_t stride,
+; void ff_put/avg_h264_chroma_mc8(pixel *dst, const pixel *src, ptrdiff_t stride,
; int h, int mx, int my)
;-----------------------------------------------------------------------------
%macro CHROMA_MC8 1
@@ -198,7 +198,7 @@ cglobal %1_h264_chroma_mc4_10, 6,6,7
%endmacro
;-----------------------------------------------------------------------------
-; void ff_put/avg_h264_chroma_mc2(pixel *dst, pixel *src, ptrdiff_t stride,
+; void ff_put/avg_h264_chroma_mc2(pixel *dst, const pixel *src, ptrdiff_t stride,
; int h, int mx, int my)
;-----------------------------------------------------------------------------
%macro CHROMA_MC2 1
diff --git a/libavcodec/x86/h264chroma_init.c b/libavcodec/x86/h264chroma_init.c
index 7c0f492178..34934b6ad0 100644
--- a/libavcodec/x86/h264chroma_init.c
+++ b/libavcodec/x86/h264chroma_init.c
@@ -24,35 +24,35 @@
#include "libavutil/x86/cpu.h"
#include "libavcodec/h264chroma.h"
-void ff_put_h264_chroma_mc8_rnd_mmx (uint8_t *dst, uint8_t *src,
+void ff_put_h264_chroma_mc8_rnd_mmx (uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
-void ff_avg_h264_chroma_mc8_rnd_mmxext(uint8_t *dst, uint8_t *src,
+void ff_avg_h264_chroma_mc8_rnd_mmxext(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
-void ff_put_h264_chroma_mc4_mmx (uint8_t *dst, uint8_t *src,
+void ff_put_h264_chroma_mc4_mmx (uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
-void ff_avg_h264_chroma_mc4_mmxext (uint8_t *dst, uint8_t *src,
+void ff_avg_h264_chroma_mc4_mmxext (uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
-void ff_put_h264_chroma_mc2_mmxext (uint8_t *dst, uint8_t *src,
+void ff_put_h264_chroma_mc2_mmxext (uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
-void ff_avg_h264_chroma_mc2_mmxext (uint8_t *dst, uint8_t *src,
+void ff_avg_h264_chroma_mc2_mmxext (uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
-void ff_put_h264_chroma_mc8_rnd_ssse3(uint8_t *dst, uint8_t *src,
+void ff_put_h264_chroma_mc8_rnd_ssse3(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
-void ff_put_h264_chroma_mc4_ssse3 (uint8_t *dst, uint8_t *src,
+void ff_put_h264_chroma_mc4_ssse3 (uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
-void ff_avg_h264_chroma_mc8_rnd_ssse3(uint8_t *dst, uint8_t *src,
+void ff_avg_h264_chroma_mc8_rnd_ssse3(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
-void ff_avg_h264_chroma_mc4_ssse3 (uint8_t *dst, uint8_t *src,
+void ff_avg_h264_chroma_mc4_ssse3 (uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
#define CHROMA_MC(OP, NUM, DEPTH, OPT) \
void ff_ ## OP ## _h264_chroma_mc ## NUM ## _ ## DEPTH ## _ ## OPT \
- (uint8_t *dst, uint8_t *src, \
- ptrdiff_t stride, int h, int x, int y);
+ (uint8_t *dst, const uint8_t *src, \
+ ptrdiff_t stride, int h, int x, int y);
CHROMA_MC(put, 2, 10, mmxext)
CHROMA_MC(avg, 2, 10, mmxext)
diff --git a/libavcodec/x86/rv40dsp_init.c b/libavcodec/x86/rv40dsp_init.c
index a04c5a5449..ab9e644c60 100644
--- a/libavcodec/x86/rv40dsp_init.c
+++ b/libavcodec/x86/rv40dsp_init.c
@@ -40,14 +40,14 @@ static void op##_rv40_qpel##size##_mc33_##insn(uint8_t *dst, const uint8_t *src,
}
#if HAVE_X86ASM
-void ff_put_rv40_chroma_mc8_mmx (uint8_t *dst, uint8_t *src,
+void ff_put_rv40_chroma_mc8_mmx (uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
-void ff_avg_rv40_chroma_mc8_mmxext(uint8_t *dst, uint8_t *src,
+void ff_avg_rv40_chroma_mc8_mmxext(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
-void ff_put_rv40_chroma_mc4_mmx (uint8_t *dst, uint8_t *src,
+void ff_put_rv40_chroma_mc4_mmx (uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
-void ff_avg_rv40_chroma_mc4_mmxext(uint8_t *dst, uint8_t *src,
+void ff_avg_rv40_chroma_mc4_mmxext(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
#define DECLARE_WEIGHT(opt) \
diff --git a/libavcodec/x86/vc1dsp_init.c b/libavcodec/x86/vc1dsp_init.c
index b1f68b098c..90b2f3624e 100644
--- a/libavcodec/x86/vc1dsp_init.c
+++ b/libavcodec/x86/vc1dsp_init.c
@@ -80,13 +80,13 @@ DECLARE_FUNCTION(avg_, 16, _sse2)
#endif /* HAVE_X86ASM */
-void ff_put_vc1_chroma_mc8_nornd_mmx (uint8_t *dst, uint8_t *src,
+void ff_put_vc1_chroma_mc8_nornd_mmx (uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
-void ff_avg_vc1_chroma_mc8_nornd_mmxext(uint8_t *dst, uint8_t *src,
+void ff_avg_vc1_chroma_mc8_nornd_mmxext(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
-void ff_put_vc1_chroma_mc8_nornd_ssse3(uint8_t *dst, uint8_t *src,
+void ff_put_vc1_chroma_mc8_nornd_ssse3(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
-void ff_avg_vc1_chroma_mc8_nornd_ssse3(uint8_t *dst, uint8_t *src,
+void ff_avg_vc1_chroma_mc8_nornd_ssse3(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
void ff_vc1_inv_trans_4x4_dc_mmxext(uint8_t *dest, ptrdiff_t linesize,
int16_t *block);