diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-22 06:10:59 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-05 02:54:04 +0200 |
commit | b3bbbb14d0685c8c1fbcf8455e59c7f444290c7c (patch) | |
tree | 5f31eef567eff06cc4cc7a8a2b58c84fe6d75ffd /libavcodec/mips | |
parent | 6c9a60ada4256cf5c388d8dc48860e24c15396c0 (diff) | |
download | ffmpeg-b3bbbb14d0685c8c1fbcf8455e59c7f444290c7c.tar.gz |
avcodec/hevcdsp: Constify src pointers
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mips')
-rw-r--r-- | libavcodec/mips/hevc_idct_msa.c | 16 | ||||
-rw-r--r-- | libavcodec/mips/hevc_lpf_sao_msa.c | 118 | ||||
-rw-r--r-- | libavcodec/mips/hevc_mc_bi_msa.c | 336 | ||||
-rw-r--r-- | libavcodec/mips/hevc_mc_biw_msa.c | 338 | ||||
-rw-r--r-- | libavcodec/mips/hevc_mc_uni_msa.c | 168 | ||||
-rw-r--r-- | libavcodec/mips/hevc_mc_uniw_msa.c | 174 | ||||
-rw-r--r-- | libavcodec/mips/hevcdsp_mips.h | 54 | ||||
-rw-r--r-- | libavcodec/mips/hevcdsp_mmi.c | 28 | ||||
-rw-r--r-- | libavcodec/mips/hevcdsp_msa.c | 166 |
9 files changed, 704 insertions, 694 deletions
diff --git a/libavcodec/mips/hevc_idct_msa.c b/libavcodec/mips/hevc_idct_msa.c index 5ab6acd1df..5f34fd8fa7 100644 --- a/libavcodec/mips/hevc_idct_msa.c +++ b/libavcodec/mips/hevc_idct_msa.c @@ -713,7 +713,7 @@ static void hevc_idct_dc_32x32_msa(int16_t *coeffs) } } -static void hevc_addblk_4x4_msa(int16_t *coeffs, uint8_t *dst, int32_t stride) +static void hevc_addblk_4x4_msa(const int16_t *coeffs, uint8_t *dst, int32_t stride) { uint32_t dst0, dst1, dst2, dst3; v8i16 dst_r0, dst_l0, in0, in1; @@ -730,7 +730,7 @@ static void hevc_addblk_4x4_msa(int16_t *coeffs, uint8_t *dst, int32_t stride) ST_W4(dst_vec, 0, 1, 2, 3, dst, stride); } -static void hevc_addblk_8x8_msa(int16_t *coeffs, uint8_t *dst, int32_t stride) +static void hevc_addblk_8x8_msa(const int16_t *coeffs, uint8_t *dst, int32_t stride) { uint8_t *temp_dst = dst; uint64_t dst0, dst1, dst2, dst3; @@ -766,7 +766,7 @@ static void hevc_addblk_8x8_msa(int16_t *coeffs, uint8_t *dst, int32_t stride) ST_D4(dst_r0, dst_r1, 0, 1, 0, 1, dst + 4 * stride, stride); } -static void hevc_addblk_16x16_msa(int16_t *coeffs, uint8_t *dst, int32_t stride) +static void hevc_addblk_16x16_msa(const int16_t *coeffs, uint8_t *dst, int32_t stride) { uint8_t loop_cnt; uint8_t *temp_dst = dst; @@ -833,7 +833,7 @@ static void hevc_addblk_16x16_msa(int16_t *coeffs, uint8_t *dst, int32_t stride) ST_UB4(dst0, dst1, dst2, dst3, dst, stride); } -static void hevc_addblk_32x32_msa(int16_t *coeffs, uint8_t *dst, int32_t stride) +static void hevc_addblk_32x32_msa(const int16_t *coeffs, uint8_t *dst, int32_t stride) { uint8_t loop_cnt; uint8_t *temp_dst = dst; @@ -980,22 +980,22 @@ void ff_hevc_idct_32x32_msa(int16_t *coeffs, int col_limit) hevc_idct_32x32_msa(coeffs); } -void ff_hevc_addblk_4x4_msa(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride) +void ff_hevc_addblk_4x4_msa(uint8_t *dst, const int16_t *coeffs, ptrdiff_t stride) { hevc_addblk_4x4_msa(coeffs, dst, stride); } -void ff_hevc_addblk_8x8_msa(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride) +void ff_hevc_addblk_8x8_msa(uint8_t *dst, const int16_t *coeffs, ptrdiff_t stride) { hevc_addblk_8x8_msa(coeffs, dst, stride); } -void ff_hevc_addblk_16x16_msa(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride) +void ff_hevc_addblk_16x16_msa(uint8_t *dst, const int16_t *coeffs, ptrdiff_t stride) { hevc_addblk_16x16_msa(coeffs, dst, stride); } -void ff_hevc_addblk_32x32_msa(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride) +void ff_hevc_addblk_32x32_msa(uint8_t *dst, const int16_t *coeffs, ptrdiff_t stride) { hevc_addblk_32x32_msa(coeffs, dst, stride); } diff --git a/libavcodec/mips/hevc_lpf_sao_msa.c b/libavcodec/mips/hevc_lpf_sao_msa.c index 26663dd89b..cd94460f97 100644 --- a/libavcodec/mips/hevc_lpf_sao_msa.c +++ b/libavcodec/mips/hevc_lpf_sao_msa.c @@ -22,8 +22,8 @@ #include "libavcodec/mips/hevcdsp_mips.h" static void hevc_loopfilter_luma_hor_msa(uint8_t *src, int32_t stride, - int32_t beta, int32_t *tc, - uint8_t *p_is_pcm, uint8_t *q_is_pcm) + int32_t beta, const int32_t *tc, + const uint8_t *p_is_pcm, const uint8_t *q_is_pcm) { uint8_t *p3 = src - (stride << 2); uint8_t *p2 = src - ((stride << 1) + stride); @@ -448,8 +448,8 @@ static void hevc_loopfilter_luma_hor_msa(uint8_t *src, int32_t stride, } static void hevc_loopfilter_luma_ver_msa(uint8_t *src, int32_t stride, - int32_t beta, int32_t *tc, - uint8_t *p_is_pcm, uint8_t *q_is_pcm) + int32_t beta, const int32_t *tc, + const uint8_t *p_is_pcm, const uint8_t *q_is_pcm) { uint8_t *p3 = src; uint8_t *p2 = src + 3 * stride; @@ -914,8 +914,8 @@ static void hevc_loopfilter_luma_ver_msa(uint8_t *src, int32_t stride, } static void hevc_loopfilter_chroma_hor_msa(uint8_t *src, int32_t stride, - int32_t *tc, uint8_t *p_is_pcm, - uint8_t *q_is_pcm) + const int32_t *tc, const uint8_t *p_is_pcm, + const uint8_t *q_is_pcm) { uint8_t *p1_ptr = src - (stride << 1); uint8_t *p0_ptr = src - stride; @@ -977,8 +977,8 @@ static void hevc_loopfilter_chroma_hor_msa(uint8_t *src, int32_t stride, } static void hevc_loopfilter_chroma_ver_msa(uint8_t *src, int32_t stride, - int32_t *tc, uint8_t *p_is_pcm, - uint8_t *q_is_pcm) + const int32_t *tc, const uint8_t *p_is_pcm, + const uint8_t *q_is_pcm) { v2i64 cmp0, cmp1, p_is_pcm_vec, q_is_pcm_vec; v16u8 src0, src1, src2, src3, src4, src5, src6, src7; @@ -1038,9 +1038,9 @@ static void hevc_loopfilter_chroma_ver_msa(uint8_t *src, int32_t stride, } static void hevc_sao_band_filter_4width_msa(uint8_t *dst, int32_t dst_stride, - uint8_t *src, int32_t src_stride, + const uint8_t *src, int32_t src_stride, int32_t sao_left_class, - int16_t *sao_offset_val, + const int16_t *sao_offset_val, int32_t height) { v16u8 src0, src1, src2, src3; @@ -1100,9 +1100,9 @@ static void hevc_sao_band_filter_4width_msa(uint8_t *dst, int32_t dst_stride, } static void hevc_sao_band_filter_8width_msa(uint8_t *dst, int32_t dst_stride, - uint8_t *src, int32_t src_stride, + const uint8_t *src, int32_t src_stride, int32_t sao_left_class, - int16_t *sao_offset_val, + const int16_t *sao_offset_val, int32_t height) { v16u8 src0, src1, src2, src3; @@ -1172,10 +1172,10 @@ static void hevc_sao_band_filter_8width_msa(uint8_t *dst, int32_t dst_stride, static void hevc_sao_band_filter_16multiple_msa(uint8_t *dst, int32_t dst_stride, - uint8_t *src, + const uint8_t *src, int32_t src_stride, int32_t sao_left_class, - int16_t *sao_offset_val, + const int16_t *sao_offset_val, int32_t width, int32_t height) { int32_t w_cnt; @@ -1254,9 +1254,9 @@ static void hevc_sao_band_filter_16multiple_msa(uint8_t *dst, static void hevc_sao_edge_filter_0degree_4width_msa(uint8_t *dst, int32_t dst_stride, - uint8_t *src, + const uint8_t *src, int32_t src_stride, - int16_t *sao_offset_val, + const int16_t *sao_offset_val, int32_t height) { uint32_t dst_val0, dst_val1; @@ -1346,9 +1346,9 @@ static void hevc_sao_edge_filter_0degree_4width_msa(uint8_t *dst, static void hevc_sao_edge_filter_0degree_8width_msa(uint8_t *dst, int32_t dst_stride, - uint8_t *src, + const uint8_t *src, int32_t src_stride, - int16_t *sao_offset_val, + const int16_t *sao_offset_val, int32_t height) { uint64_t dst_val0, dst_val1; @@ -1440,13 +1440,14 @@ static void hevc_sao_edge_filter_0degree_8width_msa(uint8_t *dst, static void hevc_sao_edge_filter_0degree_16multiple_msa(uint8_t *dst, int32_t dst_stride, - uint8_t *src, + const uint8_t *src, int32_t src_stride, - int16_t *sao_offset_val, + const int16_t *sao_offset_val, int32_t width, int32_t height) { - uint8_t *dst_ptr, *src_minus1; + const uint8_t *src_minus1; + uint8_t *dst_ptr; int32_t v_cnt; v16i8 edge_idx = { 1, 2, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; v16u8 const1 = (v16u8) __msa_ldi_b(1); @@ -1556,9 +1557,9 @@ static void hevc_sao_edge_filter_0degree_16multiple_msa(uint8_t *dst, static void hevc_sao_edge_filter_90degree_4width_msa(uint8_t *dst, int32_t dst_stride, - uint8_t *src, + const uint8_t *src, int32_t src_stride, - int16_t *sao_offset_val, + const int16_t *sao_offset_val, int32_t height) { uint32_t dst_val0, dst_val1; @@ -1661,9 +1662,9 @@ static void hevc_sao_edge_filter_90degree_4width_msa(uint8_t *dst, static void hevc_sao_edge_filter_90degree_8width_msa(uint8_t *dst, int32_t dst_stride, - uint8_t *src, + const uint8_t *src, int32_t src_stride, - int16_t *sao_offset_val, + const int16_t *sao_offset_val, int32_t height) { uint64_t dst_val0, dst_val1; @@ -1763,14 +1764,14 @@ static void hevc_sao_edge_filter_90degree_8width_msa(uint8_t *dst, static void hevc_sao_edge_filter_90degree_16multiple_msa(uint8_t *dst, int32_t dst_stride, - uint8_t *src, + const uint8_t *src, int32_t src_stride, - int16_t * + const int16_t * sao_offset_val, int32_t width, int32_t height) { - uint8_t *src_orig = src; + const uint8_t *src_orig = src; uint8_t *dst_orig = dst; int32_t h_cnt, v_cnt; v16i8 edge_idx = { 1, 2, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -1865,12 +1866,12 @@ static void hevc_sao_edge_filter_90degree_16multiple_msa(uint8_t *dst, static void hevc_sao_edge_filter_45degree_4width_msa(uint8_t *dst, int32_t dst_stride, - uint8_t *src, + const uint8_t *src, int32_t src_stride, - int16_t *sao_offset_val, + const int16_t *sao_offset_val, int32_t height) { - uint8_t *src_orig; + const uint8_t *src_orig; uint32_t dst_val0, dst_val1; v16i8 edge_idx = { 1, 2, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; v16u8 const1 = (v16u8) __msa_ldi_b(1); @@ -1978,12 +1979,12 @@ static void hevc_sao_edge_filter_45degree_4width_msa(uint8_t *dst, static void hevc_sao_edge_filter_45degree_8width_msa(uint8_t *dst, int32_t dst_stride, - uint8_t *src, + const uint8_t *src, int32_t src_stride, - int16_t *sao_offset_val, + const int16_t *sao_offset_val, int32_t height) { - uint8_t *src_orig; + const uint8_t *src_orig; uint64_t dst_val0, dst_val1; v16i8 edge_idx = { 1, 2, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; v16u8 const1 = (v16u8) __msa_ldi_b(1); @@ -2094,14 +2095,14 @@ static void hevc_sao_edge_filter_45degree_8width_msa(uint8_t *dst, static void hevc_sao_edge_filter_45degree_16multiple_msa(uint8_t *dst, int32_t dst_stride, - uint8_t *src, + const uint8_t *src, int32_t src_stride, - int16_t * + const int16_t * sao_offset_val, int32_t width, int32_t height) { - uint8_t *src_orig = src; + const uint8_t *src_orig = src; uint8_t *dst_orig = dst; int32_t v_cnt; v16i8 edge_idx = { 1, 2, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -2214,12 +2215,12 @@ static void hevc_sao_edge_filter_45degree_16multiple_msa(uint8_t *dst, static void hevc_sao_edge_filter_135degree_4width_msa(uint8_t *dst, int32_t dst_stride, - uint8_t *src, + const uint8_t *src, int32_t src_stride, - int16_t *sao_offset_val, + const int16_t *sao_offset_val, int32_t height) { - uint8_t *src_orig; + const uint8_t *src_orig; uint32_t dst_val0, dst_val1; v16i8 edge_idx = { 1, 2, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; v16u8 const1 = (v16u8) __msa_ldi_b(1); @@ -2329,12 +2330,12 @@ static void hevc_sao_edge_filter_135degree_4width_msa(uint8_t *dst, static void hevc_sao_edge_filter_135degree_8width_msa(uint8_t *dst, int32_t dst_stride, - uint8_t *src, + const uint8_t *src, int32_t src_stride, - int16_t *sao_offset_val, + const int16_t *sao_offset_val, int32_t height) { - uint8_t *src_orig; + const uint8_t *src_orig; uint64_t dst_val0, dst_val1; v16i8 edge_idx = { 1, 2, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; v16u8 const1 = (v16u8) __msa_ldi_b(1); @@ -2441,14 +2442,15 @@ static void hevc_sao_edge_filter_135degree_8width_msa(uint8_t *dst, static void hevc_sao_edge_filter_135degree_16multiple_msa(uint8_t *dst, int32_t dst_stride, - uint8_t *src, + const uint8_t *src, int32_t src_stride, - int16_t * + const int16_t * sao_offset_val, int32_t width, int32_t height) { - uint8_t *src_orig, *dst_orig; + const uint8_t *src_orig; + uint8_t *dst_orig; int32_t v_cnt; v16i8 edge_idx = { 1, 2, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; v16u8 const1 = (v16u8) __msa_ldi_b(1); @@ -2563,39 +2565,39 @@ static void hevc_sao_edge_filter_135degree_16multiple_msa(uint8_t *dst, void ff_hevc_loop_filter_luma_h_8_msa(uint8_t *src, ptrdiff_t src_stride, - int32_t beta, int32_t *tc, - uint8_t *no_p, uint8_t *no_q) + int32_t beta, const int32_t *tc, + const uint8_t *no_p, const uint8_t *no_q) { hevc_loopfilter_luma_hor_msa(src, src_stride, beta, tc, no_p, no_q); } void ff_hevc_loop_filter_luma_v_8_msa(uint8_t *src, ptrdiff_t src_stride, - int32_t beta, int32_t *tc, - uint8_t *no_p, uint8_t *no_q) + int32_t beta, const int32_t *tc, + const uint8_t *no_p, const uint8_t *no_q) { hevc_loopfilter_luma_ver_msa(src, src_stride, beta, tc, no_p, no_q); } void ff_hevc_loop_filter_chroma_h_8_msa(uint8_t *src, ptrdiff_t src_stride, - int32_t *tc, uint8_t *no_p, - uint8_t *no_q) + const int32_t *tc, const uint8_t *no_p, + const uint8_t *no_q) { hevc_loopfilter_chroma_hor_msa(src, src_stride, tc, no_p, no_q); } void ff_hevc_loop_filter_chroma_v_8_msa(uint8_t *src, ptrdiff_t src_stride, - int32_t *tc, uint8_t *no_p, - uint8_t *no_q) + const int32_t *tc, const uint8_t *no_p, + const uint8_t *no_q) { hevc_loopfilter_chroma_ver_msa(src, src_stride, tc, no_p, no_q); } -void ff_hevc_sao_band_filter_0_8_msa(uint8_t *dst, uint8_t *src, +void ff_hevc_sao_band_filter_0_8_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst, ptrdiff_t stride_src, - int16_t *sao_offset_val, int sao_left_class, + const int16_t *sao_offset_val, int sao_left_class, int width, int height) { if (width >> 4) { @@ -2621,9 +2623,9 @@ void ff_hevc_sao_band_filter_0_8_msa(uint8_t *dst, uint8_t *src, } } -void ff_hevc_sao_edge_filter_8_msa(uint8_t *dst, uint8_t *src, +void ff_hevc_sao_edge_filter_8_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst, - int16_t *sao_offset_val, + const int16_t *sao_offset_val, int eo, int width, int height) { ptrdiff_t stride_src = (2 * MAX_PB_SIZE + AV_INPUT_BUFFER_PADDING_SIZE) / sizeof(uint8_t); diff --git a/libavcodec/mips/hevc_mc_bi_msa.c b/libavcodec/mips/hevc_mc_bi_msa.c index c6c8d2705d..701e12ab86 100644 --- a/libavcodec/mips/hevc_mc_bi_msa.c +++ b/libavcodec/mips/hevc_mc_bi_msa.c @@ -58,9 +58,9 @@ static const uint8_t ff_hevc_mask_arr[16 * 2] __attribute__((aligned(0x40))) = { HEVC_BI_RND_CLIP2_MAX_SATU(in2, in3, vec2, vec3, rnd_val, out2, out3); \ } -static void hevc_bi_copy_4w_msa(uint8_t *src0_ptr, +static void hevc_bi_copy_4w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -126,9 +126,9 @@ static void hevc_bi_copy_4w_msa(uint8_t *src0_ptr, } } -static void hevc_bi_copy_6w_msa(uint8_t *src0_ptr, +static void hevc_bi_copy_6w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -178,9 +178,9 @@ static void hevc_bi_copy_6w_msa(uint8_t *src0_ptr, } } -static void hevc_bi_copy_8w_msa(uint8_t *src0_ptr, +static void hevc_bi_copy_8w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -266,9 +266,9 @@ static void hevc_bi_copy_8w_msa(uint8_t *src0_ptr, } } -static void hevc_bi_copy_12w_msa(uint8_t *src0_ptr, +static void hevc_bi_copy_12w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -305,9 +305,9 @@ static void hevc_bi_copy_12w_msa(uint8_t *src0_ptr, } } -static void hevc_bi_copy_16w_msa(uint8_t *src0_ptr, +static void hevc_bi_copy_16w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -343,9 +343,9 @@ static void hevc_bi_copy_16w_msa(uint8_t *src0_ptr, } } -static void hevc_bi_copy_24w_msa(uint8_t *src0_ptr, +static void hevc_bi_copy_24w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -389,9 +389,9 @@ static void hevc_bi_copy_24w_msa(uint8_t *src0_ptr, } } -static void hevc_bi_copy_32w_msa(uint8_t *src0_ptr, +static void hevc_bi_copy_32w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -433,9 +433,9 @@ static void hevc_bi_copy_32w_msa(uint8_t *src0_ptr, } } -static void hevc_bi_copy_48w_msa(uint8_t *src0_ptr, +static void hevc_bi_copy_48w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -487,9 +487,9 @@ static void hevc_bi_copy_48w_msa(uint8_t *src0_ptr, } } -static void hevc_bi_copy_64w_msa(uint8_t *src0_ptr, +static void hevc_bi_copy_64w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -526,9 +526,9 @@ static void hevc_bi_copy_64w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_bi_8t_4w_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_8t_4w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -599,9 +599,9 @@ static void hevc_hz_bi_8t_4w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_bi_8t_8w_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_8t_8w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -667,9 +667,9 @@ static void hevc_hz_bi_8t_8w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_bi_8t_12w_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_8t_12w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -755,9 +755,9 @@ static void hevc_hz_bi_8t_12w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_bi_8t_16w_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_8t_16w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -826,9 +826,9 @@ static void hevc_hz_bi_8t_16w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_bi_8t_24w_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_8t_24w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -898,9 +898,9 @@ static void hevc_hz_bi_8t_24w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_bi_8t_32w_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_8t_32w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -970,9 +970,9 @@ static void hevc_hz_bi_8t_32w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_bi_8t_48w_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_8t_48w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1062,9 +1062,9 @@ static void hevc_hz_bi_8t_48w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_bi_8t_64w_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_8t_64w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1172,9 +1172,9 @@ static void hevc_hz_bi_8t_64w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_bi_8t_4w_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_8t_4w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1258,9 +1258,9 @@ static void hevc_vt_bi_8t_4w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_bi_8t_8w_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_8t_8w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1336,9 +1336,9 @@ static void hevc_vt_bi_8t_8w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_bi_8t_12w_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_8t_12w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1443,17 +1443,17 @@ static void hevc_vt_bi_8t_12w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_bi_8t_16multx2mult_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_8t_16multx2mult_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height, int32_t width) { - uint8_t *src0_ptr_tmp; - int16_t *src1_ptr_tmp; + const uint8_t *src0_ptr_tmp; + const int16_t *src1_ptr_tmp; uint8_t *dst_tmp; uint32_t loop_cnt; uint32_t cnt; @@ -1549,9 +1549,9 @@ static void hevc_vt_bi_8t_16multx2mult_msa(uint8_t *src0_ptr, } } -static void hevc_vt_bi_8t_16w_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_8t_16w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1562,9 +1562,9 @@ static void hevc_vt_bi_8t_16w_msa(uint8_t *src0_ptr, dst, dst_stride, filter, height, 16); } -static void hevc_vt_bi_8t_24w_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_8t_24w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1577,9 +1577,9 @@ static void hevc_vt_bi_8t_24w_msa(uint8_t *src0_ptr, dst + 16, dst_stride, filter, height); } -static void hevc_vt_bi_8t_32w_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_8t_32w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1590,9 +1590,9 @@ static void hevc_vt_bi_8t_32w_msa(uint8_t *src0_ptr, dst, dst_stride, filter, height, 32); } -static void hevc_vt_bi_8t_48w_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_8t_48w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1603,9 +1603,9 @@ static void hevc_vt_bi_8t_48w_msa(uint8_t *src0_ptr, dst, dst_stride, filter, height, 48); } -static void hevc_vt_bi_8t_64w_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_8t_64w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1616,9 +1616,9 @@ static void hevc_vt_bi_8t_64w_msa(uint8_t *src0_ptr, dst, dst_stride, filter, height, 64); } -static void hevc_hv_bi_8t_4w_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_8t_4w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1741,9 +1741,9 @@ static void hevc_hv_bi_8t_4w_msa(uint8_t *src0_ptr, } } -static void hevc_hv_bi_8t_8multx1mult_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_8t_8multx1mult_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1753,8 +1753,8 @@ static void hevc_hv_bi_8t_8multx1mult_msa(uint8_t *src0_ptr, { uint32_t loop_cnt; uint32_t cnt; - uint8_t *src0_ptr_tmp; - int16_t *src1_ptr_tmp; + const uint8_t *src0_ptr_tmp; + const int16_t *src1_ptr_tmp; uint8_t *dst_tmp; v16u8 out; v16i8 src0, src1, src2, src3, src4, src5, src6, src7; @@ -1874,9 +1874,9 @@ static void hevc_hv_bi_8t_8multx1mult_msa(uint8_t *src0_ptr, } } -static void hevc_hv_bi_8t_8w_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_8t_8w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1889,9 +1889,9 @@ static void hevc_hv_bi_8t_8w_msa(uint8_t *src0_ptr, height, 8); } -static void hevc_hv_bi_8t_12w_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_8t_12w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1900,8 +1900,9 @@ static void hevc_hv_bi_8t_12w_msa(uint8_t *src0_ptr, int32_t height) { uint32_t loop_cnt; - uint8_t *src0_ptr_tmp, *dst_tmp; - int16_t *src1_ptr_tmp; + const uint8_t *src0_ptr_tmp; + uint8_t *dst_tmp; + const int16_t *src1_ptr_tmp; uint64_t tp0, tp1; v16u8 out; v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8, src9, src10; @@ -2103,9 +2104,9 @@ static void hevc_hv_bi_8t_12w_msa(uint8_t *src0_ptr, } } -static void hevc_hv_bi_8t_16w_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_8t_16w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2118,9 +2119,9 @@ static void hevc_hv_bi_8t_16w_msa(uint8_t *src0_ptr, height, 16); } -static void hevc_hv_bi_8t_24w_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_8t_24w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2133,9 +2134,9 @@ static void hevc_hv_bi_8t_24w_msa(uint8_t *src0_ptr, height, 24); } -static void hevc_hv_bi_8t_32w_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_8t_32w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2148,9 +2149,9 @@ static void hevc_hv_bi_8t_32w_msa(uint8_t *src0_ptr, height, 32); } -static void hevc_hv_bi_8t_48w_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_8t_48w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2163,9 +2164,9 @@ static void hevc_hv_bi_8t_48w_msa(uint8_t *src0_ptr, height, 48); } -static void hevc_hv_bi_8t_64w_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_8t_64w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2178,9 +2179,9 @@ static void hevc_hv_bi_8t_64w_msa(uint8_t *src0_ptr, height, 64); } -static void hevc_hz_bi_4t_4x2_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_4t_4x2_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2221,9 +2222,9 @@ static void hevc_hz_bi_4t_4x2_msa(uint8_t *src0_ptr, ST_W2(dst0, 0, 1, dst, dst_stride); } -static void hevc_hz_bi_4t_4x4_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_4t_4x4_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2267,9 +2268,9 @@ static void hevc_hz_bi_4t_4x4_msa(uint8_t *src0_ptr, ST_W4(dst0, 0, 1, 2, 3, dst, dst_stride); } -static void hevc_hz_bi_4t_4x8multiple_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_4t_4x8multiple_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2330,9 +2331,9 @@ static void hevc_hz_bi_4t_4x8multiple_msa(uint8_t *src0_ptr, } } -static void hevc_hz_bi_4t_4w_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_4t_4w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2352,9 +2353,9 @@ static void hevc_hz_bi_4t_4w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_bi_4t_6w_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_4t_6w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2413,9 +2414,9 @@ static void hevc_hz_bi_4t_6w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_bi_4t_8x2_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_4t_8x2_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2456,9 +2457,9 @@ static void hevc_hz_bi_4t_8x2_msa(uint8_t *src0_ptr, ST_D2(dst0, 0, 1, dst, dst_stride); } -static void hevc_hz_bi_4t_8x6_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_4t_8x6_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2520,9 +2521,9 @@ static void hevc_hz_bi_4t_8x6_msa(uint8_t *src0_ptr, ST_D2(dst2, 0, 1, dst + 4 * dst_stride, dst_stride); } -static void hevc_hz_bi_4t_8x4multiple_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_4t_8x4multiple_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2578,9 +2579,9 @@ static void hevc_hz_bi_4t_8x4multiple_msa(uint8_t *src0_ptr, } } -static void hevc_hz_bi_4t_8w_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_4t_8w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2600,9 +2601,9 @@ static void hevc_hz_bi_4t_8w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_bi_4t_12w_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_4t_12w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2674,9 +2675,9 @@ static void hevc_hz_bi_4t_12w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_bi_4t_16w_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_4t_16w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2734,16 +2735,16 @@ static void hevc_hz_bi_4t_16w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_bi_4t_24w_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_4t_24w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { - int16_t *src1_ptr_tmp; + const int16_t *src1_ptr_tmp; uint8_t *dst_tmp; uint32_t loop_cnt; v16i8 src0, src1, src2, src3, src4, src5, src6, src7; @@ -2840,9 +2841,9 @@ static void hevc_hz_bi_4t_24w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_bi_4t_32w_msa(uint8_t *src0_ptr, +static void hevc_hz_bi_4t_32w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2901,9 +2902,9 @@ static void hevc_hz_bi_4t_32w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_bi_4t_4x2_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_4t_4x2_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2949,9 +2950,9 @@ static void hevc_vt_bi_4t_4x2_msa(uint8_t *src0_ptr, ST_W2(dst10, 0, 1, dst, dst_stride); } -static void hevc_vt_bi_4t_4x4_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_4t_4x4_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2998,9 +2999,9 @@ static void hevc_vt_bi_4t_4x4_msa(uint8_t *src0_ptr, ST_W4(dst10, 0, 1, 2, 3, dst, dst_stride); } -static void hevc_vt_bi_4t_4x8multiple_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_4t_4x8multiple_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3071,9 +3072,9 @@ static void hevc_vt_bi_4t_4x8multiple_msa(uint8_t *src0_ptr, } } -static void hevc_vt_bi_4t_4w_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_4t_4w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3093,9 +3094,9 @@ static void hevc_vt_bi_4t_4w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_bi_4t_6w_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_4t_6w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3191,9 +3192,9 @@ static void hevc_vt_bi_4t_6w_msa(uint8_t *src0_ptr, dst += (4 * dst_stride); } -static void hevc_vt_bi_4t_8x2_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_4t_8x2_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3235,9 +3236,9 @@ static void hevc_vt_bi_4t_8x2_msa(uint8_t *src0_ptr, ST_D2(dst0_r, 0, 1, dst, dst_stride); } -static void hevc_vt_bi_4t_8x6_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_4t_8x6_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3295,9 +3296,9 @@ static void hevc_vt_bi_4t_8x6_msa(uint8_t *src0_ptr, ST_D2(dst2_r, 0, 1, dst + 4 * dst_stride, dst_stride); } -static void hevc_vt_bi_4t_8x4multiple_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_4t_8x4multiple_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3357,9 +3358,9 @@ static void hevc_vt_bi_4t_8x4multiple_msa(uint8_t *src0_ptr, } } -static void hevc_vt_bi_4t_8w_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_4t_8w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3379,9 +3380,9 @@ static void hevc_vt_bi_4t_8w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_bi_4t_12w_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_4t_12w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3462,9 +3463,9 @@ static void hevc_vt_bi_4t_12w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_bi_4t_16w_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_4t_16w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3547,9 +3548,9 @@ static void hevc_vt_bi_4t_16w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_bi_4t_24w_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_4t_24w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3671,9 +3672,9 @@ static void hevc_vt_bi_4t_24w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_bi_4t_32w_msa(uint8_t *src0_ptr, +static void hevc_vt_bi_4t_32w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3781,9 +3782,9 @@ static void hevc_vt_bi_4t_32w_msa(uint8_t *src0_ptr, } } -static void hevc_hv_bi_4t_4x2_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_4t_4x2_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3848,9 +3849,9 @@ static void hevc_hv_bi_4t_4x2_msa(uint8_t *src0_ptr, ST_W2(out, 0, 1, dst, dst_stride); } -static void hevc_hv_bi_4t_4x4_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_4t_4x4_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3924,9 +3925,9 @@ static void hevc_hv_bi_4t_4x4_msa(uint8_t *src0_ptr, ST_W4(out, 0, 1, 2, 3, dst, dst_stride); } -static void hevc_hv_bi_4t_4multx8mult_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_4t_4multx8mult_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4043,9 +4044,9 @@ static void hevc_hv_bi_4t_4multx8mult_msa(uint8_t *src0_ptr, } } -static void hevc_hv_bi_4t_4w_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_4t_4w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4067,9 +4068,9 @@ static void hevc_hv_bi_4t_4w_msa(uint8_t *src0_ptr, } } -static void hevc_hv_bi_4t_6w_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_4t_6w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4217,9 +4218,9 @@ static void hevc_hv_bi_4t_6w_msa(uint8_t *src0_ptr, ST_H8(out2, 0, 1, 2, 3, 4, 5, 6, 7, dst + 4, dst_stride); } -static void hevc_hv_bi_4t_8x2_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_4t_8x2_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4291,9 +4292,9 @@ static void hevc_hv_bi_4t_8x2_msa(uint8_t *src0_ptr, ST_D2(out, 0, 1, dst, dst_stride); } -static void hevc_hv_bi_4t_8multx4_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_4t_8multx4_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4387,9 +4388,9 @@ static void hevc_hv_bi_4t_8multx4_msa(uint8_t *src0_ptr, } } -static void hevc_hv_bi_4t_8x6_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_4t_8x6_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4503,9 +4504,9 @@ static void hevc_hv_bi_4t_8x6_msa(uint8_t *src0_ptr, ST_D2(out2, 0, 1, dst + 4 * dst_stride, dst_stride); } -static void hevc_hv_bi_4t_8multx4mult_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_4t_8multx4mult_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4515,8 +4516,8 @@ static void hevc_hv_bi_4t_8multx4mult_msa(uint8_t *src0_ptr, int32_t width) { uint32_t loop_cnt, cnt; - uint8_t *src0_ptr_tmp; - int16_t *src1_ptr_tmp; + const uint8_t *src0_ptr_tmp; + const int16_t *src1_ptr_tmp; uint8_t *dst_tmp; v16u8 out0, out1; v16i8 src0, src1, src2, src3, src4, src5, src6; @@ -4628,9 +4629,9 @@ static void hevc_hv_bi_4t_8multx4mult_msa(uint8_t *src0_ptr, } } -static void hevc_hv_bi_4t_8w_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_4t_8w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4655,9 +4656,9 @@ static void hevc_hv_bi_4t_8w_msa(uint8_t *src0_ptr, } } -static void hevc_hv_bi_4t_12w_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_4t_12w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4667,8 +4668,9 @@ static void hevc_hv_bi_4t_12w_msa(uint8_t *src0_ptr, { uint32_t loop_cnt; uint64_t tp0, tp1; - uint8_t *src0_ptr_tmp, *dst_tmp; - int16_t *src1_ptr_tmp; + const uint8_t *src0_ptr_tmp; + uint8_t *dst_tmp; + const int16_t *src1_ptr_tmp; v16u8 out0, out1; v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8, src9, src10; v16i8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7; @@ -4857,9 +4859,9 @@ static void hevc_hv_bi_4t_12w_msa(uint8_t *src0_ptr, } } -static void hevc_hv_bi_4t_16w_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_4t_16w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4877,9 +4879,9 @@ static void hevc_hv_bi_4t_16w_msa(uint8_t *src0_ptr, } } -static void hevc_hv_bi_4t_24w_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_4t_24w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4892,9 +4894,9 @@ static void hevc_hv_bi_4t_24w_msa(uint8_t *src0_ptr, height, 24); } -static void hevc_hv_bi_4t_32w_msa(uint8_t *src0_ptr, +static void hevc_hv_bi_4t_32w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4910,9 +4912,9 @@ static void hevc_hv_bi_4t_32w_msa(uint8_t *src0_ptr, #define BI_MC_COPY(WIDTH) \ void ff_hevc_put_hevc_bi_pel_pixels##WIDTH##_8_msa(uint8_t *dst, \ ptrdiff_t dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ - int16_t *src_16bit, \ + const int16_t *src_16bit, \ int height, \ intptr_t mx, \ intptr_t my, \ @@ -4937,9 +4939,9 @@ BI_MC_COPY(64); #define BI_MC(PEL, DIR, WIDTH, TAP, DIR1, FILT_DIR) \ void ff_hevc_put_hevc_bi_##PEL##_##DIR##WIDTH##_8_msa(uint8_t *dst, \ ptrdiff_t dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ - int16_t *src_16bit, \ + const int16_t *src_16bit, \ int height, \ intptr_t mx, \ intptr_t my, \ @@ -4991,9 +4993,9 @@ BI_MC(epel, v, 32, 4, vt, my); #define BI_MC_HV(PEL, WIDTH, TAP) \ void ff_hevc_put_hevc_bi_##PEL##_hv##WIDTH##_8_msa(uint8_t *dst, \ ptrdiff_t dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ - int16_t *src_16bit, \ + const int16_t *src_16bit, \ int height, \ intptr_t mx, \ intptr_t my, \ diff --git a/libavcodec/mips/hevc_mc_biw_msa.c b/libavcodec/mips/hevc_mc_biw_msa.c index f775ea8592..981c37d7e8 100644 --- a/libavcodec/mips/hevc_mc_biw_msa.c +++ b/libavcodec/mips/hevc_mc_biw_msa.c @@ -79,9 +79,9 @@ static const uint8_t ff_hevc_mask_arr[16 * 2] __attribute__((aligned(0x40))) = { out2, out3); \ } -static void hevc_biwgt_copy_4w_msa(uint8_t *src0_ptr, +static void hevc_biwgt_copy_4w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -168,9 +168,9 @@ static void hevc_biwgt_copy_4w_msa(uint8_t *src0_ptr, } } -static void hevc_biwgt_copy_6w_msa(uint8_t *src0_ptr, +static void hevc_biwgt_copy_6w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -222,9 +222,9 @@ static void hevc_biwgt_copy_6w_msa(uint8_t *src0_ptr, } } -static void hevc_biwgt_copy_8w_msa(uint8_t *src0_ptr, +static void hevc_biwgt_copy_8w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -310,9 +310,9 @@ static void hevc_biwgt_copy_8w_msa(uint8_t *src0_ptr, } } -static void hevc_biwgt_copy_12w_msa(uint8_t *src0_ptr, +static void hevc_biwgt_copy_12w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -369,9 +369,9 @@ static void hevc_biwgt_copy_12w_msa(uint8_t *src0_ptr, } } -static void hevc_biwgt_copy_16w_msa(uint8_t *src0_ptr, +static void hevc_biwgt_copy_16w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -424,9 +424,9 @@ static void hevc_biwgt_copy_16w_msa(uint8_t *src0_ptr, } } -static void hevc_biwgt_copy_24w_msa(uint8_t *src0_ptr, +static void hevc_biwgt_copy_24w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -488,9 +488,9 @@ static void hevc_biwgt_copy_24w_msa(uint8_t *src0_ptr, } } -static void hevc_biwgt_copy_32w_msa(uint8_t *src0_ptr, +static void hevc_biwgt_copy_32w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -549,9 +549,9 @@ static void hevc_biwgt_copy_32w_msa(uint8_t *src0_ptr, } } -static void hevc_biwgt_copy_48w_msa(uint8_t *src0_ptr, +static void hevc_biwgt_copy_48w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -601,9 +601,9 @@ static void hevc_biwgt_copy_48w_msa(uint8_t *src0_ptr, } } -static void hevc_biwgt_copy_64w_msa(uint8_t *src0_ptr, +static void hevc_biwgt_copy_64w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -656,9 +656,9 @@ static void hevc_biwgt_copy_64w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_biwgt_8t_4w_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_8t_4w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -728,9 +728,9 @@ static void hevc_hz_biwgt_8t_4w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_biwgt_8t_8w_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_8t_8w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -808,9 +808,9 @@ static void hevc_hz_biwgt_8t_8w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_biwgt_8t_12w_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_8t_12w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -903,9 +903,9 @@ static void hevc_hz_biwgt_8t_12w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_biwgt_8t_16w_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_8t_16w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -987,9 +987,9 @@ static void hevc_hz_biwgt_8t_16w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_biwgt_8t_24w_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_8t_24w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1109,9 +1109,9 @@ static void hevc_hz_biwgt_8t_24w_msa(uint8_t *src0_ptr, dst += dst_stride; } -static void hevc_hz_biwgt_8t_32w_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_8t_32w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1195,9 +1195,9 @@ static void hevc_hz_biwgt_8t_32w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_biwgt_8t_48w_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_8t_48w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1299,9 +1299,9 @@ static void hevc_hz_biwgt_8t_48w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_biwgt_8t_64w_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_8t_64w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1313,9 +1313,9 @@ static void hevc_hz_biwgt_8t_64w_msa(uint8_t *src0_ptr, int32_t offset1, int32_t rnd_val) { - uint8_t *src0_ptr_tmp; + const uint8_t *src0_ptr_tmp; uint8_t *dst_tmp; - int16_t *src1_ptr_tmp; + const int16_t *src1_ptr_tmp; uint32_t loop_cnt, cnt; int32_t offset, weight, constant; v16i8 src0, src1, src2; @@ -1398,9 +1398,9 @@ static void hevc_hz_biwgt_8t_64w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_biwgt_8t_4w_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_8t_4w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1496,9 +1496,9 @@ static void hevc_vt_biwgt_8t_4w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_biwgt_8t_8w_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_8t_8w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1584,9 +1584,9 @@ static void hevc_vt_biwgt_8t_8w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_biwgt_8t_12w_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_8t_12w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1694,9 +1694,9 @@ static void hevc_vt_biwgt_8t_12w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_biwgt_8t_16multx2mult_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_8t_16multx2mult_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1709,8 +1709,8 @@ static void hevc_vt_biwgt_8t_16multx2mult_msa(uint8_t *src0_ptr, int32_t rnd_val, int32_t width) { - uint8_t *src0_ptr_tmp; - int16_t *src1_ptr_tmp; + const uint8_t *src0_ptr_tmp; + const int16_t *src1_ptr_tmp; uint8_t *dst_tmp; uint32_t loop_cnt, cnt; int32_t offset, weight; @@ -1810,9 +1810,9 @@ static void hevc_vt_biwgt_8t_16multx2mult_msa(uint8_t *src0_ptr, } } -static void hevc_vt_biwgt_8t_16w_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_8t_16w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1831,9 +1831,9 @@ static void hevc_vt_biwgt_8t_16w_msa(uint8_t *src0_ptr, rnd_val, 16); } -static void hevc_vt_biwgt_8t_24w_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_8t_24w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1856,9 +1856,9 @@ static void hevc_vt_biwgt_8t_24w_msa(uint8_t *src0_ptr, weight0, weight1, offset0, offset1, rnd_val); } -static void hevc_vt_biwgt_8t_32w_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_8t_32w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1877,9 +1877,9 @@ static void hevc_vt_biwgt_8t_32w_msa(uint8_t *src0_ptr, rnd_val, 32); } -static void hevc_vt_biwgt_8t_48w_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_8t_48w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1898,9 +1898,9 @@ static void hevc_vt_biwgt_8t_48w_msa(uint8_t *src0_ptr, rnd_val, 48); } -static void hevc_vt_biwgt_8t_64w_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_8t_64w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -1919,9 +1919,9 @@ static void hevc_vt_biwgt_8t_64w_msa(uint8_t *src0_ptr, rnd_val, 64); } -static void hevc_hv_biwgt_8t_4w_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_8t_4w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2064,9 +2064,9 @@ static void hevc_hv_biwgt_8t_4w_msa(uint8_t *src0_ptr, } } -static void hevc_hv_biwgt_8t_8multx2mult_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_8t_8multx2mult_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2082,8 +2082,8 @@ static void hevc_hv_biwgt_8t_8multx2mult_msa(uint8_t *src0_ptr, { uint32_t loop_cnt, cnt; int32_t offset, weight; - uint8_t *src0_ptr_tmp; - int16_t *src1_ptr_tmp; + const uint8_t *src0_ptr_tmp; + const int16_t *src1_ptr_tmp; uint8_t *dst_tmp; v16u8 out; v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8; @@ -2247,9 +2247,9 @@ static void hevc_hv_biwgt_8t_8multx2mult_msa(uint8_t *src0_ptr, } } -static void hevc_hv_biwgt_8t_8w_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_8t_8w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2269,9 +2269,9 @@ static void hevc_hv_biwgt_8t_8w_msa(uint8_t *src0_ptr, offset1, rnd_val, 1); } -static void hevc_hv_biwgt_8t_12w_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_8t_12w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2285,8 +2285,9 @@ static void hevc_hv_biwgt_8t_12w_msa(uint8_t *src0_ptr, int32_t rnd_val) { uint32_t loop_cnt; - uint8_t *src0_ptr_tmp, *dst_tmp; - int16_t *src1_ptr_tmp; + const uint8_t *src0_ptr_tmp; + uint8_t *dst_tmp; + const int16_t *src1_ptr_tmp; int32_t offset, weight; uint64_t tp0, tp1; v16u8 out; @@ -2519,9 +2520,9 @@ static void hevc_hv_biwgt_8t_12w_msa(uint8_t *src0_ptr, } } -static void hevc_hv_biwgt_8t_16w_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_8t_16w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2541,9 +2542,9 @@ static void hevc_hv_biwgt_8t_16w_msa(uint8_t *src0_ptr, offset1, rnd_val, 2); } -static void hevc_hv_biwgt_8t_24w_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_8t_24w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2563,9 +2564,9 @@ static void hevc_hv_biwgt_8t_24w_msa(uint8_t *src0_ptr, offset1, rnd_val, 3); } -static void hevc_hv_biwgt_8t_32w_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_8t_32w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2585,9 +2586,9 @@ static void hevc_hv_biwgt_8t_32w_msa(uint8_t *src0_ptr, offset1, rnd_val, 4); } -static void hevc_hv_biwgt_8t_48w_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_8t_48w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2607,9 +2608,9 @@ static void hevc_hv_biwgt_8t_48w_msa(uint8_t *src0_ptr, offset1, rnd_val, 6); } -static void hevc_hv_biwgt_8t_64w_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_8t_64w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2629,9 +2630,9 @@ static void hevc_hv_biwgt_8t_64w_msa(uint8_t *src0_ptr, offset1, rnd_val, 8); } -static void hevc_hz_biwgt_4t_4x2_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_4t_4x2_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2689,9 +2690,9 @@ static void hevc_hz_biwgt_4t_4x2_msa(uint8_t *src0_ptr, ST_W2(out0, 0, 1, dst, dst_stride); } -static void hevc_hz_biwgt_4t_4x4_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_4t_4x4_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2749,9 +2750,9 @@ static void hevc_hz_biwgt_4t_4x4_msa(uint8_t *src0_ptr, ST_W4(dst0, 0, 1, 2, 3, dst, dst_stride); } -static void hevc_hz_biwgt_4t_4x8multiple_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_4t_4x8multiple_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2824,9 +2825,9 @@ static void hevc_hz_biwgt_4t_4x8multiple_msa(uint8_t *src0_ptr, } } -static void hevc_hz_biwgt_4t_4w_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_4t_4w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2855,9 +2856,9 @@ static void hevc_hz_biwgt_4t_4w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_biwgt_4t_6w_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_4t_6w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2929,9 +2930,9 @@ static void hevc_hz_biwgt_4t_6w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_biwgt_4t_8x2_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_4t_8x2_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -2985,9 +2986,9 @@ static void hevc_hz_biwgt_4t_8x2_msa(uint8_t *src0_ptr, ST_D2(dst0, 0, 1, dst, dst_stride); } -static void hevc_hz_biwgt_4t_8x6_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_4t_8x6_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3059,9 +3060,9 @@ static void hevc_hz_biwgt_4t_8x6_msa(uint8_t *src0_ptr, ST_D2(dst3, 0, 1, dst + 4 * dst_stride, dst_stride); } -static void hevc_hz_biwgt_4t_8x4multiple_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_4t_8x4multiple_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3129,9 +3130,9 @@ static void hevc_hz_biwgt_4t_8x4multiple_msa(uint8_t *src0_ptr, } } -static void hevc_hz_biwgt_4t_8w_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_4t_8w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3160,9 +3161,9 @@ static void hevc_hz_biwgt_4t_8w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_biwgt_4t_12w_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_4t_12w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3246,9 +3247,9 @@ static void hevc_hz_biwgt_4t_12w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_biwgt_4t_16w_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_4t_16w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3335,9 +3336,9 @@ static void hevc_hz_biwgt_4t_16w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_biwgt_4t_24w_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_4t_24w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3422,9 +3423,9 @@ static void hevc_hz_biwgt_4t_24w_msa(uint8_t *src0_ptr, } } -static void hevc_hz_biwgt_4t_32w_msa(uint8_t *src0_ptr, +static void hevc_hz_biwgt_4t_32w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3495,9 +3496,9 @@ static void hevc_hz_biwgt_4t_32w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_biwgt_4t_4x2_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_4t_4x2_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3560,9 +3561,9 @@ static void hevc_vt_biwgt_4t_4x2_msa(uint8_t *src0_ptr, ST_W2(out, 0, 1, dst, dst_stride); } -static void hevc_vt_biwgt_4t_4x4_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_4t_4x4_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3627,9 +3628,9 @@ static void hevc_vt_biwgt_4t_4x4_msa(uint8_t *src0_ptr, dst += (4 * dst_stride); } -static void hevc_vt_biwgt_4t_4x8multiple_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_4t_4x8multiple_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3713,9 +3714,9 @@ static void hevc_vt_biwgt_4t_4x8multiple_msa(uint8_t *src0_ptr, } } -static void hevc_vt_biwgt_4t_4w_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_4t_4w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3744,9 +3745,9 @@ static void hevc_vt_biwgt_4t_4w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_biwgt_4t_6w_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_4t_6w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3821,9 +3822,9 @@ static void hevc_vt_biwgt_4t_6w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_biwgt_4t_8x2_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_4t_8x2_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3878,9 +3879,9 @@ static void hevc_vt_biwgt_4t_8x2_msa(uint8_t *src0_ptr, ST_D2(tmp0, 0, 1, dst, dst_stride); } -static void hevc_vt_biwgt_4t_8x6_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_4t_8x6_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -3949,9 +3950,9 @@ static void hevc_vt_biwgt_4t_8x6_msa(uint8_t *src0_ptr, ST_D2(tmp3, 0, 1, dst + 4 * dst_stride, dst_stride); } -static void hevc_vt_biwgt_4t_8x4multiple_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_4t_8x4multiple_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4023,9 +4024,9 @@ static void hevc_vt_biwgt_4t_8x4multiple_msa(uint8_t *src0_ptr, } } -static void hevc_vt_biwgt_4t_8w_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_4t_8w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4054,9 +4055,9 @@ static void hevc_vt_biwgt_4t_8w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_biwgt_4t_12w_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_4t_12w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4146,9 +4147,9 @@ static void hevc_vt_biwgt_4t_12w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_biwgt_4t_16w_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_4t_16w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4240,9 +4241,9 @@ static void hevc_vt_biwgt_4t_16w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_biwgt_4t_24w_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_4t_24w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4377,9 +4378,9 @@ static void hevc_vt_biwgt_4t_24w_msa(uint8_t *src0_ptr, } } -static void hevc_vt_biwgt_4t_32w_msa(uint8_t *src0_ptr, +static void hevc_vt_biwgt_4t_32w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4496,9 +4497,9 @@ static void hevc_vt_biwgt_4t_32w_msa(uint8_t *src0_ptr, } } -static void hevc_hv_biwgt_4t_4x2_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_4t_4x2_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4580,9 +4581,9 @@ static void hevc_hv_biwgt_4t_4x2_msa(uint8_t *src0_ptr, ST_W2(out, 0, 1, dst, dst_stride); } -static void hevc_hv_biwgt_4t_4x4_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_4t_4x4_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4677,9 +4678,9 @@ static void hevc_hv_biwgt_4t_4x4_msa(uint8_t *src0_ptr, ST_W4(out, 0, 1, 2, 3, dst, dst_stride); } -static void hevc_hv_biwgt_4t_4multx8mult_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_4t_4multx8mult_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4821,9 +4822,9 @@ static void hevc_hv_biwgt_4t_4multx8mult_msa(uint8_t *src0_ptr, } } -static void hevc_hv_biwgt_4t_4w_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_4t_4w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -4853,9 +4854,9 @@ static void hevc_hv_biwgt_4t_4w_msa(uint8_t *src0_ptr, } } -static void hevc_hv_biwgt_4t_6w_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_4t_6w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -5035,9 +5036,9 @@ static void hevc_hv_biwgt_4t_6w_msa(uint8_t *src0_ptr, ST_H8(out2, 0, 1, 2, 3, 4, 5, 6, 7, dst + 4, dst_stride); } -static void hevc_hv_biwgt_4t_8x2_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_4t_8x2_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -5131,9 +5132,9 @@ static void hevc_hv_biwgt_4t_8x2_msa(uint8_t *src0_ptr, ST_D2(out, 0, 1, dst, dst_stride); } -static void hevc_hv_biwgt_4t_8multx4_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_4t_8multx4_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -5255,9 +5256,9 @@ static void hevc_hv_biwgt_4t_8multx4_msa(uint8_t *src0_ptr, } } -static void hevc_hv_biwgt_4t_8x6_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_4t_8x6_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -5405,9 +5406,9 @@ static void hevc_hv_biwgt_4t_8x6_msa(uint8_t *src0_ptr, ST_D2(out2, 0, 1, dst + 4 * dst_stride, dst_stride); } -static void hevc_hv_biwgt_4t_8multx4mult_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_4t_8multx4mult_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -5424,8 +5425,8 @@ static void hevc_hv_biwgt_4t_8multx4mult_msa(uint8_t *src0_ptr, uint32_t loop_cnt; uint32_t cnt; int32_t offset, weight; - uint8_t *src0_ptr_tmp; - int16_t *src1_ptr_tmp; + const uint8_t *src0_ptr_tmp; + const int16_t *src1_ptr_tmp; uint8_t *dst_tmp; v16u8 out0, out1; v16i8 src0, src1, src2, src3, src4, src5, src6; @@ -5555,9 +5556,9 @@ static void hevc_hv_biwgt_4t_8multx4mult_msa(uint8_t *src0_ptr, } } -static void hevc_hv_biwgt_4t_8w_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_4t_8w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -5592,9 +5593,9 @@ static void hevc_hv_biwgt_4t_8w_msa(uint8_t *src0_ptr, } } -static void hevc_hv_biwgt_4t_12w_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_4t_12w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -5610,8 +5611,9 @@ static void hevc_hv_biwgt_4t_12w_msa(uint8_t *src0_ptr, uint32_t loop_cnt; uint64_t tp0, tp1; int32_t offset, weight; - uint8_t *src0_ptr_tmp, *dst_tmp; - int16_t *src1_ptr_tmp; + const uint8_t *src0_ptr_tmp; + const int16_t *src1_ptr_tmp; + uint8_t *dst_tmp; v16u8 out0, out1; v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8, src9, src10; v16i8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7; @@ -5831,9 +5833,9 @@ static void hevc_hv_biwgt_4t_12w_msa(uint8_t *src0_ptr, } } -static void hevc_hv_biwgt_4t_16w_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_4t_16w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -5859,9 +5861,9 @@ static void hevc_hv_biwgt_4t_16w_msa(uint8_t *src0_ptr, } } -static void hevc_hv_biwgt_4t_24w_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_4t_24w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -5881,9 +5883,9 @@ static void hevc_hv_biwgt_4t_24w_msa(uint8_t *src0_ptr, weight1, offset0, offset1, rnd_val, 24); } -static void hevc_hv_biwgt_4t_32w_msa(uint8_t *src0_ptr, +static void hevc_hv_biwgt_4t_32w_msa(const uint8_t *src0_ptr, int32_t src_stride, - int16_t *src1_ptr, + const int16_t *src1_ptr, int32_t src2_stride, uint8_t *dst, int32_t dst_stride, @@ -5906,9 +5908,9 @@ static void hevc_hv_biwgt_4t_32w_msa(uint8_t *src0_ptr, #define BI_W_MC_COPY(WIDTH) \ void ff_hevc_put_hevc_bi_w_pel_pixels##WIDTH##_8_msa(uint8_t *dst, \ ptrdiff_t dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ - int16_t *src_16bit, \ + const int16_t *src_16bit, \ int height, \ int denom, \ int weight0, \ @@ -5944,10 +5946,10 @@ BI_W_MC_COPY(64); void ff_hevc_put_hevc_bi_w_##PEL##_##DIR##WIDTH##_8_msa(uint8_t *dst, \ ptrdiff_t \ dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t \ src_stride, \ - int16_t *src_16bit, \ + const int16_t *src_16bit, \ int height, \ int denom, \ int weight0, \ @@ -6007,9 +6009,9 @@ BI_W_MC(epel, v, 32, 4, vt, my); #define BI_W_MC_HV(PEL, WIDTH, TAP) \ void ff_hevc_put_hevc_bi_w_##PEL##_hv##WIDTH##_8_msa(uint8_t *dst, \ ptrdiff_t dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ - int16_t *src_16bit, \ + const int16_t *src_16bit, \ int height, \ int denom, \ int weight0, \ diff --git a/libavcodec/mips/hevc_mc_uni_msa.c b/libavcodec/mips/hevc_mc_uni_msa.c index 36e65527af..c0571e1231 100644 --- a/libavcodec/mips/hevc_mc_uni_msa.c +++ b/libavcodec/mips/hevc_mc_uni_msa.c @@ -101,7 +101,7 @@ static const uint8_t ff_hevc_mask_arr[16 * 3] __attribute__((aligned(0x40))) = { out0, out1, out2, out3); \ } -static void copy_width8_msa(uint8_t *src, int32_t src_stride, +static void copy_width8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height) { @@ -143,7 +143,7 @@ static void copy_width8_msa(uint8_t *src, int32_t src_stride, } } -static void copy_width12_msa(uint8_t *src, int32_t src_stride, +static void copy_width12_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height) { @@ -157,7 +157,7 @@ static void copy_width12_msa(uint8_t *src, int32_t src_stride, ST12x8_UB(src0, src1, src2, src3, src4, src5, src6, src7, dst, dst_stride); } -static void copy_width16_msa(uint8_t *src, int32_t src_stride, +static void copy_width16_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height) { @@ -193,7 +193,7 @@ static void copy_width16_msa(uint8_t *src, int32_t src_stride, } } -static void copy_width24_msa(uint8_t *src, int32_t src_stride, +static void copy_width24_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height) { @@ -216,7 +216,7 @@ static void copy_width24_msa(uint8_t *src, int32_t src_stride, } } -static void copy_width32_msa(uint8_t *src, int32_t src_stride, +static void copy_width32_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height) { @@ -233,7 +233,7 @@ static void copy_width32_msa(uint8_t *src, int32_t src_stride, } } -static void copy_width48_msa(uint8_t *src, int32_t src_stride, +static void copy_width48_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height) { @@ -254,7 +254,7 @@ static void copy_width48_msa(uint8_t *src, int32_t src_stride, } } -static void copy_width64_msa(uint8_t *src, int32_t src_stride, +static void copy_width64_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height) { @@ -283,7 +283,7 @@ static void copy_width64_msa(uint8_t *src, int32_t src_stride, } } -static void common_hz_8t_4x4_msa(uint8_t *src, int32_t src_stride, +static void common_hz_8t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -312,7 +312,7 @@ static void common_hz_8t_4x4_msa(uint8_t *src, int32_t src_stride, ST_W4(out, 0, 1, 2, 3, dst, dst_stride); } -static void common_hz_8t_4x8_msa(uint8_t *src, int32_t src_stride, +static void common_hz_8t_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -349,7 +349,7 @@ static void common_hz_8t_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_8t_4x16_msa(uint8_t *src, int32_t src_stride, +static void common_hz_8t_4x16_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -405,7 +405,7 @@ static void common_hz_8t_4x16_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_8t_4w_msa(uint8_t *src, int32_t src_stride, +static void common_hz_8t_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -418,7 +418,7 @@ static void common_hz_8t_4w_msa(uint8_t *src, int32_t src_stride, } } -static void common_hz_8t_8w_msa(uint8_t *src, int32_t src_stride, +static void common_hz_8t_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -470,7 +470,7 @@ static void common_hz_8t_8w_msa(uint8_t *src, int32_t src_stride, } } -static void common_hz_8t_12w_msa(uint8_t *src, int32_t src_stride, +static void common_hz_8t_12w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -549,7 +549,7 @@ static void common_hz_8t_12w_msa(uint8_t *src, int32_t src_stride, } } -static void common_hz_8t_16w_msa(uint8_t *src, int32_t src_stride, +static void common_hz_8t_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -607,7 +607,7 @@ static void common_hz_8t_16w_msa(uint8_t *src, int32_t src_stride, } } -static void common_hz_8t_24w_msa(uint8_t *src, int32_t src_stride, +static void common_hz_8t_24w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -677,7 +677,7 @@ static void common_hz_8t_24w_msa(uint8_t *src, int32_t src_stride, } } -static void common_hz_8t_32w_msa(uint8_t *src, int32_t src_stride, +static void common_hz_8t_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -738,7 +738,7 @@ static void common_hz_8t_32w_msa(uint8_t *src, int32_t src_stride, } } -static void common_hz_8t_48w_msa(uint8_t *src, int32_t src_stride, +static void common_hz_8t_48w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -824,7 +824,7 @@ static void common_hz_8t_48w_msa(uint8_t *src, int32_t src_stride, } } -static void common_hz_8t_64w_msa(uint8_t *src, int32_t src_stride, +static void common_hz_8t_64w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -903,7 +903,7 @@ static void common_hz_8t_64w_msa(uint8_t *src, int32_t src_stride, } } -static void common_vt_8t_4w_msa(uint8_t *src, int32_t src_stride, +static void common_vt_8t_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -972,7 +972,7 @@ static void common_vt_8t_4w_msa(uint8_t *src, int32_t src_stride, } } -static void common_vt_8t_8w_msa(uint8_t *src, int32_t src_stride, +static void common_vt_8t_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1027,7 +1027,7 @@ static void common_vt_8t_8w_msa(uint8_t *src, int32_t src_stride, } } -static void common_vt_8t_12w_msa(uint8_t *src, int32_t src_stride, +static void common_vt_8t_12w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1129,7 +1129,7 @@ static void common_vt_8t_12w_msa(uint8_t *src, int32_t src_stride, } } -static void common_vt_8t_16w_msa(uint8_t *src, int32_t src_stride, +static void common_vt_8t_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1208,12 +1208,12 @@ static void common_vt_8t_16w_msa(uint8_t *src, int32_t src_stride, } } -static void common_vt_8t_16w_mult_msa(uint8_t *src, int32_t src_stride, +static void common_vt_8t_16w_mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height, int32_t width) { - uint8_t *src_tmp; + const uint8_t *src_tmp; uint8_t *dst_tmp; uint32_t loop_cnt, cnt; v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8, src9, src10; @@ -1297,7 +1297,7 @@ static void common_vt_8t_16w_mult_msa(uint8_t *src, int32_t src_stride, } } -static void common_vt_8t_24w_msa(uint8_t *src, int32_t src_stride, +static void common_vt_8t_24w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1308,7 +1308,7 @@ static void common_vt_8t_24w_msa(uint8_t *src, int32_t src_stride, height); } -static void common_vt_8t_32w_msa(uint8_t *src, int32_t src_stride, +static void common_vt_8t_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1316,7 +1316,7 @@ static void common_vt_8t_32w_msa(uint8_t *src, int32_t src_stride, 32); } -static void common_vt_8t_48w_msa(uint8_t *src, int32_t src_stride, +static void common_vt_8t_48w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1324,7 +1324,7 @@ static void common_vt_8t_48w_msa(uint8_t *src, int32_t src_stride, 48); } -static void common_vt_8t_64w_msa(uint8_t *src, int32_t src_stride, +static void common_vt_8t_64w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1332,7 +1332,7 @@ static void common_vt_8t_64w_msa(uint8_t *src, int32_t src_stride, 64); } -static void hevc_hv_uni_8t_4w_msa(uint8_t *src, +static void hevc_hv_uni_8t_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1466,7 +1466,7 @@ static void hevc_hv_uni_8t_4w_msa(uint8_t *src, } } -static void hevc_hv_uni_8t_8multx2mult_msa(uint8_t *src, +static void hevc_hv_uni_8t_8multx2mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1475,7 +1475,7 @@ static void hevc_hv_uni_8t_8multx2mult_msa(uint8_t *src, int32_t height, int32_t width) { uint32_t loop_cnt, cnt; - uint8_t *src_tmp; + const uint8_t *src_tmp; uint8_t *dst_tmp; v16u8 out; v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8; @@ -1605,7 +1605,7 @@ static void hevc_hv_uni_8t_8multx2mult_msa(uint8_t *src, } } -static void hevc_hv_uni_8t_8w_msa(uint8_t *src, +static void hevc_hv_uni_8t_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1617,7 +1617,7 @@ static void hevc_hv_uni_8t_8w_msa(uint8_t *src, filter_x, filter_y, height, 8); } -static void hevc_hv_uni_8t_12w_msa(uint8_t *src, +static void hevc_hv_uni_8t_12w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1626,7 +1626,8 @@ static void hevc_hv_uni_8t_12w_msa(uint8_t *src, int32_t height) { uint32_t loop_cnt; - uint8_t *src_tmp, *dst_tmp; + const uint8_t *src_tmp; + uint8_t *dst_tmp; v16u8 out0, out1; v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8, src9, src10; v16i8 src11, src12, src13, src14; @@ -1851,7 +1852,7 @@ static void hevc_hv_uni_8t_12w_msa(uint8_t *src, } } -static void hevc_hv_uni_8t_16w_msa(uint8_t *src, +static void hevc_hv_uni_8t_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1863,7 +1864,7 @@ static void hevc_hv_uni_8t_16w_msa(uint8_t *src, filter_x, filter_y, height, 16); } -static void hevc_hv_uni_8t_24w_msa(uint8_t *src, +static void hevc_hv_uni_8t_24w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1875,7 +1876,7 @@ static void hevc_hv_uni_8t_24w_msa(uint8_t *src, filter_x, filter_y, height, 24); } -static void hevc_hv_uni_8t_32w_msa(uint8_t *src, +static void hevc_hv_uni_8t_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1887,7 +1888,7 @@ static void hevc_hv_uni_8t_32w_msa(uint8_t *src, filter_x, filter_y, height, 32); } -static void hevc_hv_uni_8t_48w_msa(uint8_t *src, +static void hevc_hv_uni_8t_48w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1899,7 +1900,7 @@ static void hevc_hv_uni_8t_48w_msa(uint8_t *src, filter_x, filter_y, height, 48); } -static void hevc_hv_uni_8t_64w_msa(uint8_t *src, +static void hevc_hv_uni_8t_64w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1911,7 +1912,7 @@ static void hevc_hv_uni_8t_64w_msa(uint8_t *src, filter_x, filter_y, height, 64); } -static void common_hz_4t_4x2_msa(uint8_t *src, int32_t src_stride, +static void common_hz_4t_4x2_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -1938,7 +1939,7 @@ static void common_hz_4t_4x2_msa(uint8_t *src, int32_t src_stride, ST_W2(out, 0, 1, dst, 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) { @@ -1965,7 +1966,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) { @@ -2000,7 +2001,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) { @@ -2048,7 +2049,7 @@ static void common_hz_4t_4x16_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_4w_msa(uint8_t *src, int32_t src_stride, +static void common_hz_4t_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2063,7 +2064,7 @@ static void common_hz_4t_4w_msa(uint8_t *src, int32_t src_stride, } } -static void common_hz_4t_6w_msa(uint8_t *src, int32_t src_stride, +static void common_hz_4t_6w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2112,7 +2113,7 @@ static void common_hz_4t_6w_msa(uint8_t *src, int32_t src_stride, ST_H2(out5, 2, 6, dst + 2 * dst_stride + 4, dst_stride); } -static void common_hz_4t_8x2mult_msa(uint8_t *src, int32_t src_stride, +static void common_hz_4t_8x2mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2146,7 +2147,7 @@ static void common_hz_4t_8x2mult_msa(uint8_t *src, int32_t src_stride, } } -static void common_hz_4t_8x4mult_msa(uint8_t *src, int32_t src_stride, +static void common_hz_4t_8x4mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2180,7 +2181,7 @@ static void common_hz_4t_8x4mult_msa(uint8_t *src, int32_t src_stride, } } -static void common_hz_4t_8w_msa(uint8_t *src, int32_t src_stride, +static void common_hz_4t_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2193,7 +2194,7 @@ static void common_hz_4t_8w_msa(uint8_t *src, int32_t src_stride, } } -static void common_hz_4t_12w_msa(uint8_t *src, int32_t src_stride, +static void common_hz_4t_12w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2247,7 +2248,7 @@ static void common_hz_4t_12w_msa(uint8_t *src, int32_t src_stride, } } -static void common_hz_4t_16w_msa(uint8_t *src, int32_t src_stride, +static void common_hz_4t_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2310,7 +2311,7 @@ static void common_hz_4t_16w_msa(uint8_t *src, int32_t src_stride, } } -static void common_hz_4t_24w_msa(uint8_t *src, int32_t src_stride, +static void common_hz_4t_24w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2393,7 +2394,7 @@ static void common_hz_4t_24w_msa(uint8_t *src, int32_t src_stride, } } -static void common_hz_4t_32w_msa(uint8_t *src, int32_t src_stride, +static void common_hz_4t_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2461,7 +2462,7 @@ static void common_hz_4t_32w_msa(uint8_t *src, int32_t src_stride, } } -static void common_vt_4t_4x2_msa(uint8_t *src, int32_t src_stride, +static void common_vt_4t_4x2_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -2492,7 +2493,7 @@ static void common_vt_4t_4x2_msa(uint8_t *src, int32_t src_stride, ST_W2(out, 0, 1, dst, dst_stride); } -static void common_vt_4t_4x4multiple_msa(uint8_t *src, int32_t src_stride, +static void common_vt_4t_4x4multiple_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2538,7 +2539,7 @@ static void common_vt_4t_4x4multiple_msa(uint8_t *src, int32_t src_stride, } } -static void common_vt_4t_4w_msa(uint8_t *src, int32_t src_stride, +static void common_vt_4t_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2550,7 +2551,7 @@ static void common_vt_4t_4w_msa(uint8_t *src, int32_t src_stride, } } -static void common_vt_4t_6w_msa(uint8_t *src, int32_t src_stride, +static void common_vt_4t_6w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2621,7 +2622,7 @@ static void common_vt_4t_6w_msa(uint8_t *src, int32_t src_stride, ST_H2(out1, 2, 6, dst + 2 * dst_stride + 4, dst_stride); } -static void common_vt_4t_8x2_msa(uint8_t *src, int32_t src_stride, +static void common_vt_4t_8x2_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -2647,7 +2648,7 @@ static void common_vt_4t_8x2_msa(uint8_t *src, int32_t src_stride, ST_D2(out, 0, 1, dst, dst_stride); } -static void common_vt_4t_8x6_msa(uint8_t *src, int32_t src_stride, +static void common_vt_4t_8x6_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -2700,7 +2701,7 @@ static void common_vt_4t_8x6_msa(uint8_t *src, int32_t src_stride, } } -static void common_vt_4t_8x4mult_msa(uint8_t *src, int32_t src_stride, +static void common_vt_4t_8x4mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2745,7 +2746,7 @@ static void common_vt_4t_8x4mult_msa(uint8_t *src, int32_t src_stride, } } -static void common_vt_4t_8w_msa(uint8_t *src, int32_t src_stride, +static void common_vt_4t_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2759,7 +2760,7 @@ static void common_vt_4t_8w_msa(uint8_t *src, int32_t src_stride, } } -static void common_vt_4t_12w_msa(uint8_t *src, int32_t src_stride, +static void common_vt_4t_12w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2822,7 +2823,7 @@ static void common_vt_4t_12w_msa(uint8_t *src, int32_t src_stride, } } -static void common_vt_4t_16w_msa(uint8_t *src, int32_t src_stride, +static void common_vt_4t_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2880,7 +2881,7 @@ static void common_vt_4t_16w_msa(uint8_t *src, int32_t src_stride, } } -static void common_vt_4t_24w_msa(uint8_t *src, int32_t src_stride, +static void common_vt_4t_24w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2991,7 +2992,7 @@ static void common_vt_4t_24w_msa(uint8_t *src, int32_t src_stride, } } -static void common_vt_4t_32w_msa(uint8_t *src, int32_t src_stride, +static void common_vt_4t_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -3084,7 +3085,7 @@ static void common_vt_4t_32w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_hv_uni_4t_4x2_msa(uint8_t *src, +static void hevc_hv_uni_4t_4x2_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3139,7 +3140,7 @@ static void hevc_hv_uni_4t_4x2_msa(uint8_t *src, ST_W2(out, 0, 1, dst, dst_stride); } -static void hevc_hv_uni_4t_4x4_msa(uint8_t *src, +static void hevc_hv_uni_4t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3198,7 +3199,7 @@ static void hevc_hv_uni_4t_4x4_msa(uint8_t *src, ST_W4(out, 0, 1, 2, 3, dst, dst_stride); } -static void hevc_hv_uni_4t_4multx8mult_msa(uint8_t *src, +static void hevc_hv_uni_4t_4multx8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3296,7 +3297,7 @@ static void hevc_hv_uni_4t_4multx8mult_msa(uint8_t *src, } } -static void hevc_hv_uni_4t_4w_msa(uint8_t *src, +static void hevc_hv_uni_4t_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3316,7 +3317,7 @@ static void hevc_hv_uni_4t_4w_msa(uint8_t *src, } } -static void hevc_hv_uni_4t_6w_msa(uint8_t *src, +static void hevc_hv_uni_4t_6w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3435,7 +3436,7 @@ static void hevc_hv_uni_4t_6w_msa(uint8_t *src, ST_H8(out2, 0, 1, 2, 3, 4, 5, 6, 7, dst + 4, dst_stride); } -static void hevc_hv_uni_4t_8x2_msa(uint8_t *src, +static void hevc_hv_uni_4t_8x2_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3497,7 +3498,7 @@ static void hevc_hv_uni_4t_8x2_msa(uint8_t *src, ST_D2(out, 0, 1, dst, dst_stride); } -static void hevc_hv_uni_4t_8multx4_msa(uint8_t *src, +static void hevc_hv_uni_4t_8multx4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3582,7 +3583,7 @@ static void hevc_hv_uni_4t_8multx4_msa(uint8_t *src, } } -static void hevc_hv_uni_4t_8x6_msa(uint8_t *src, +static void hevc_hv_uni_4t_8x6_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3685,7 +3686,7 @@ static void hevc_hv_uni_4t_8x6_msa(uint8_t *src, ST_D2(out2, 0, 1, dst + 4 * dst_stride, dst_stride); } -static void hevc_hv_uni_4t_8multx4mult_msa(uint8_t *src, +static void hevc_hv_uni_4t_8multx4mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3695,7 +3696,7 @@ static void hevc_hv_uni_4t_8multx4mult_msa(uint8_t *src, int32_t width8mult) { uint32_t loop_cnt, cnt; - uint8_t *src_tmp; + const uint8_t *src_tmp; uint8_t *dst_tmp; v16u8 out0, out1; v16i8 src0, src1, src2, src3, src4, src5, src6; @@ -3799,7 +3800,7 @@ static void hevc_hv_uni_4t_8multx4mult_msa(uint8_t *src, } } -static void hevc_hv_uni_4t_8w_msa(uint8_t *src, +static void hevc_hv_uni_4t_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3822,7 +3823,7 @@ static void hevc_hv_uni_4t_8w_msa(uint8_t *src, } } -static void hevc_hv_uni_4t_12w_msa(uint8_t *src, +static void hevc_hv_uni_4t_12w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3831,7 +3832,8 @@ static void hevc_hv_uni_4t_12w_msa(uint8_t *src, int32_t height) { uint32_t loop_cnt; - uint8_t *src_tmp, *dst_tmp; + const uint8_t *src_tmp; + uint8_t *dst_tmp; v16u8 out0, out1; v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8, src9, src10; v16i8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7; @@ -3990,7 +3992,7 @@ static void hevc_hv_uni_4t_12w_msa(uint8_t *src, } } -static void hevc_hv_uni_4t_16w_msa(uint8_t *src, +static void hevc_hv_uni_4t_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -4007,7 +4009,7 @@ static void hevc_hv_uni_4t_16w_msa(uint8_t *src, } } -static void hevc_hv_uni_4t_24w_msa(uint8_t *src, +static void hevc_hv_uni_4t_24w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -4019,7 +4021,7 @@ static void hevc_hv_uni_4t_24w_msa(uint8_t *src, filter_x, filter_y, height, 3); } -static void hevc_hv_uni_4t_32w_msa(uint8_t *src, +static void hevc_hv_uni_4t_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -4034,7 +4036,7 @@ static void hevc_hv_uni_4t_32w_msa(uint8_t *src, #define UNI_MC_COPY(WIDTH) \ void ff_hevc_put_hevc_uni_pel_pixels##WIDTH##_8_msa(uint8_t *dst, \ ptrdiff_t dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ int height, \ intptr_t mx, \ @@ -4057,7 +4059,7 @@ UNI_MC_COPY(64); #define UNI_MC(PEL, DIR, WIDTH, TAP, DIR1, FILT_DIR) \ void ff_hevc_put_hevc_uni_##PEL##_##DIR##WIDTH##_8_msa(uint8_t *dst, \ ptrdiff_t dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ int height, \ intptr_t mx, \ @@ -4109,7 +4111,7 @@ UNI_MC(epel, v, 32, 4, vt, my); #define UNI_MC_HV(PEL, WIDTH, TAP) \ void ff_hevc_put_hevc_uni_##PEL##_hv##WIDTH##_8_msa(uint8_t *dst, \ ptrdiff_t dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ int height, \ intptr_t mx, \ diff --git a/libavcodec/mips/hevc_mc_uniw_msa.c b/libavcodec/mips/hevc_mc_uniw_msa.c index 1a8c251534..3c3d7a0da2 100644 --- a/libavcodec/mips/hevc_mc_uniw_msa.c +++ b/libavcodec/mips/hevc_mc_uniw_msa.c @@ -54,7 +54,7 @@ static const uint8_t ff_hevc_mask_arr[16 * 2] __attribute__((aligned(0x40))) = { out2_h, out3_h); \ } -static void hevc_uniwgt_copy_4w_msa(uint8_t *src, +static void hevc_uniwgt_copy_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -121,7 +121,7 @@ static void hevc_uniwgt_copy_4w_msa(uint8_t *src, } } -static void hevc_uniwgt_copy_6w_msa(uint8_t *src, +static void hevc_uniwgt_copy_6w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -183,7 +183,7 @@ static void hevc_uniwgt_copy_6w_msa(uint8_t *src, } } -static void hevc_uniwgt_copy_8w_msa(uint8_t *src, +static void hevc_uniwgt_copy_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -278,7 +278,7 @@ static void hevc_uniwgt_copy_8w_msa(uint8_t *src, } } -static void hevc_uniwgt_copy_12w_msa(uint8_t *src, +static void hevc_uniwgt_copy_12w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -323,7 +323,7 @@ static void hevc_uniwgt_copy_12w_msa(uint8_t *src, } } -static void hevc_uniwgt_copy_16w_msa(uint8_t *src, +static void hevc_uniwgt_copy_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -366,7 +366,7 @@ static void hevc_uniwgt_copy_16w_msa(uint8_t *src, } } -static void hevc_uniwgt_copy_24w_msa(uint8_t *src, +static void hevc_uniwgt_copy_24w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -419,7 +419,7 @@ static void hevc_uniwgt_copy_24w_msa(uint8_t *src, } } -static void hevc_uniwgt_copy_32w_msa(uint8_t *src, +static void hevc_uniwgt_copy_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -465,7 +465,7 @@ static void hevc_uniwgt_copy_32w_msa(uint8_t *src, } } -static void hevc_uniwgt_copy_48w_msa(uint8_t *src, +static void hevc_uniwgt_copy_48w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -522,7 +522,7 @@ static void hevc_uniwgt_copy_48w_msa(uint8_t *src, } } -static void hevc_uniwgt_copy_64w_msa(uint8_t *src, +static void hevc_uniwgt_copy_64w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -585,7 +585,7 @@ static void hevc_uniwgt_copy_64w_msa(uint8_t *src, } } -static void hevc_hz_uniwgt_8t_4w_msa(uint8_t *src, +static void hevc_hz_uniwgt_8t_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -661,7 +661,7 @@ static void hevc_hz_uniwgt_8t_4w_msa(uint8_t *src, } } -static void hevc_hz_uniwgt_8t_8w_msa(uint8_t *src, +static void hevc_hz_uniwgt_8t_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -739,7 +739,7 @@ static void hevc_hz_uniwgt_8t_8w_msa(uint8_t *src, } } -static void hevc_hz_uniwgt_8t_12w_msa(uint8_t *src, +static void hevc_hz_uniwgt_8t_12w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -833,7 +833,7 @@ static void hevc_hz_uniwgt_8t_12w_msa(uint8_t *src, } } -static void hevc_hz_uniwgt_8t_16w_msa(uint8_t *src, +static void hevc_hz_uniwgt_8t_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -911,7 +911,7 @@ static void hevc_hz_uniwgt_8t_16w_msa(uint8_t *src, } } -static void hevc_hz_uniwgt_8t_24w_msa(uint8_t *src, +static void hevc_hz_uniwgt_8t_24w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1004,7 +1004,7 @@ static void hevc_hz_uniwgt_8t_24w_msa(uint8_t *src, } } -static void hevc_hz_uniwgt_8t_32w_msa(uint8_t *src, +static void hevc_hz_uniwgt_8t_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1106,7 +1106,7 @@ static void hevc_hz_uniwgt_8t_32w_msa(uint8_t *src, } } -static void hevc_hz_uniwgt_8t_48w_msa(uint8_t *src, +static void hevc_hz_uniwgt_8t_48w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1200,7 +1200,7 @@ static void hevc_hz_uniwgt_8t_48w_msa(uint8_t *src, } } -static void hevc_hz_uniwgt_8t_64w_msa(uint8_t *src, +static void hevc_hz_uniwgt_8t_64w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1210,7 +1210,7 @@ static void hevc_hz_uniwgt_8t_64w_msa(uint8_t *src, int32_t offset, int32_t rnd_val) { - uint8_t *src_tmp; + const uint8_t *src_tmp; uint8_t *dst_tmp; uint32_t loop_cnt, cnt; v16u8 out0, out1; @@ -1291,7 +1291,7 @@ static void hevc_hz_uniwgt_8t_64w_msa(uint8_t *src, } } -static void hevc_vt_uniwgt_8t_4w_msa(uint8_t *src, +static void hevc_vt_uniwgt_8t_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1383,7 +1383,7 @@ static void hevc_vt_uniwgt_8t_4w_msa(uint8_t *src, } } -static void hevc_vt_uniwgt_8t_8w_msa(uint8_t *src, +static void hevc_vt_uniwgt_8t_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1462,7 +1462,7 @@ static void hevc_vt_uniwgt_8t_8w_msa(uint8_t *src, } } -static void hevc_vt_uniwgt_8t_12w_msa(uint8_t *src, +static void hevc_vt_uniwgt_8t_12w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1565,7 +1565,7 @@ static void hevc_vt_uniwgt_8t_12w_msa(uint8_t *src, } } -static void hevc_vt_uniwgt_8t_16multx4mult_msa(uint8_t *src, +static void hevc_vt_uniwgt_8t_16multx4mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1576,7 +1576,7 @@ static void hevc_vt_uniwgt_8t_16multx4mult_msa(uint8_t *src, int32_t rnd_val, int32_t weightmul16) { - uint8_t *src_tmp; + const uint8_t *src_tmp; uint8_t *dst_tmp; int32_t loop_cnt, cnt; v16u8 out0, out1, out2, out3; @@ -1676,7 +1676,7 @@ static void hevc_vt_uniwgt_8t_16multx4mult_msa(uint8_t *src, } } -static void hevc_vt_uniwgt_8t_16w_msa(uint8_t *src, +static void hevc_vt_uniwgt_8t_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1691,7 +1691,7 @@ static void hevc_vt_uniwgt_8t_16w_msa(uint8_t *src, offset, rnd_val, 1); } -static void hevc_vt_uniwgt_8t_24w_msa(uint8_t *src, +static void hevc_vt_uniwgt_8t_24w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1709,7 +1709,7 @@ static void hevc_vt_uniwgt_8t_24w_msa(uint8_t *src, filter, 32, weight, offset, rnd_val); } -static void hevc_vt_uniwgt_8t_32w_msa(uint8_t *src, +static void hevc_vt_uniwgt_8t_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1724,7 +1724,7 @@ static void hevc_vt_uniwgt_8t_32w_msa(uint8_t *src, offset, rnd_val, 2); } -static void hevc_vt_uniwgt_8t_48w_msa(uint8_t *src, +static void hevc_vt_uniwgt_8t_48w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1739,7 +1739,7 @@ static void hevc_vt_uniwgt_8t_48w_msa(uint8_t *src, offset, rnd_val, 3); } -static void hevc_vt_uniwgt_8t_64w_msa(uint8_t *src, +static void hevc_vt_uniwgt_8t_64w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1754,7 +1754,7 @@ static void hevc_vt_uniwgt_8t_64w_msa(uint8_t *src, offset, rnd_val, 4); } -static void hevc_hv_uniwgt_8t_4w_msa(uint8_t *src, +static void hevc_hv_uniwgt_8t_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1879,7 +1879,7 @@ static void hevc_hv_uniwgt_8t_4w_msa(uint8_t *src, } } -static void hevc_hv_uniwgt_8t_8multx2mult_msa(uint8_t *src, +static void hevc_hv_uniwgt_8t_8multx2mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -1892,7 +1892,7 @@ static void hevc_hv_uniwgt_8t_8multx2mult_msa(uint8_t *src, int32_t width) { uint32_t loop_cnt, cnt; - uint8_t *src_tmp; + const uint8_t *src_tmp; uint8_t *dst_tmp; v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8; v8i16 filt0, filt1, filt2, filt3; @@ -2041,7 +2041,7 @@ static void hevc_hv_uniwgt_8t_8multx2mult_msa(uint8_t *src, } } -static void hevc_hv_uniwgt_8t_8w_msa(uint8_t *src, +static void hevc_hv_uniwgt_8t_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2057,7 +2057,7 @@ static void hevc_hv_uniwgt_8t_8w_msa(uint8_t *src, offset, rnd_val, 8); } -static void hevc_hv_uniwgt_8t_12w_msa(uint8_t *src, +static void hevc_hv_uniwgt_8t_12w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2069,7 +2069,8 @@ static void hevc_hv_uniwgt_8t_12w_msa(uint8_t *src, int32_t rnd_val) { uint32_t loop_cnt; - uint8_t *src_tmp, *dst_tmp; + const uint8_t *src_tmp; + uint8_t *dst_tmp; v16u8 out; v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8, src9, src10; v16i8 mask0, mask1, mask2, mask3, mask4, mask5, mask6, mask7; @@ -2262,7 +2263,7 @@ static void hevc_hv_uniwgt_8t_12w_msa(uint8_t *src, } } -static void hevc_hv_uniwgt_8t_16w_msa(uint8_t *src, +static void hevc_hv_uniwgt_8t_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2278,7 +2279,7 @@ static void hevc_hv_uniwgt_8t_16w_msa(uint8_t *src, offset, rnd_val, 16); } -static void hevc_hv_uniwgt_8t_24w_msa(uint8_t *src, +static void hevc_hv_uniwgt_8t_24w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2294,7 +2295,7 @@ static void hevc_hv_uniwgt_8t_24w_msa(uint8_t *src, offset, rnd_val, 24); } -static void hevc_hv_uniwgt_8t_32w_msa(uint8_t *src, +static void hevc_hv_uniwgt_8t_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2310,7 +2311,7 @@ static void hevc_hv_uniwgt_8t_32w_msa(uint8_t *src, offset, rnd_val, 32); } -static void hevc_hv_uniwgt_8t_48w_msa(uint8_t *src, +static void hevc_hv_uniwgt_8t_48w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2326,7 +2327,7 @@ static void hevc_hv_uniwgt_8t_48w_msa(uint8_t *src, offset, rnd_val, 48); } -static void hevc_hv_uniwgt_8t_64w_msa(uint8_t *src, +static void hevc_hv_uniwgt_8t_64w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2342,7 +2343,7 @@ static void hevc_hv_uniwgt_8t_64w_msa(uint8_t *src, offset, rnd_val, 64); } -static void hevc_hz_uniwgt_4t_4x2_msa(uint8_t *src, +static void hevc_hz_uniwgt_4t_4x2_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2400,7 +2401,7 @@ static void hevc_hz_uniwgt_4t_4x2_msa(uint8_t *src, dst += (4 * dst_stride); } -static void hevc_hz_uniwgt_4t_4x4_msa(uint8_t *src, +static void hevc_hz_uniwgt_4t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2457,7 +2458,7 @@ static void hevc_hz_uniwgt_4t_4x4_msa(uint8_t *src, dst += (4 * dst_stride); } -static void hevc_hz_uniwgt_4t_4x8multiple_msa(uint8_t *src, +static void hevc_hz_uniwgt_4t_4x8multiple_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2525,7 +2526,7 @@ static void hevc_hz_uniwgt_4t_4x8multiple_msa(uint8_t *src, } } -static void hevc_hz_uniwgt_4t_4w_msa(uint8_t *src, +static void hevc_hz_uniwgt_4t_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2548,7 +2549,7 @@ static void hevc_hz_uniwgt_4t_4w_msa(uint8_t *src, } } -static void hevc_hz_uniwgt_4t_6w_msa(uint8_t *src, +static void hevc_hz_uniwgt_4t_6w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2629,7 +2630,7 @@ static void hevc_hz_uniwgt_4t_6w_msa(uint8_t *src, ST_H2(out3, 2, 6, dst + 2 * dst_stride + 4, dst_stride); } -static void hevc_hz_uniwgt_4t_8x2_msa(uint8_t *src, +static void hevc_hz_uniwgt_4t_8x2_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2684,7 +2685,7 @@ static void hevc_hz_uniwgt_4t_8x2_msa(uint8_t *src, ST_D2(out, 0, 1, dst, dst_stride); } -static void hevc_hz_uniwgt_4t_8x4_msa(uint8_t *src, +static void hevc_hz_uniwgt_4t_8x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2741,7 +2742,7 @@ static void hevc_hz_uniwgt_4t_8x4_msa(uint8_t *src, ST_D4(out0, out1, 0, 1, 0, 1, dst, dst_stride); } -static void hevc_hz_uniwgt_4t_8x6_msa(uint8_t *src, +static void hevc_hz_uniwgt_4t_8x6_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2811,7 +2812,7 @@ static void hevc_hz_uniwgt_4t_8x6_msa(uint8_t *src, ST_D2(out2, 0, 1, dst + 4 * dst_stride, dst_stride); } -static void hevc_hz_uniwgt_4t_8x8multiple_msa(uint8_t *src, +static void hevc_hz_uniwgt_4t_8x8multiple_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2891,7 +2892,7 @@ static void hevc_hz_uniwgt_4t_8x8multiple_msa(uint8_t *src, } } -static void hevc_hz_uniwgt_4t_8w_msa(uint8_t *src, +static void hevc_hz_uniwgt_4t_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2917,7 +2918,7 @@ static void hevc_hz_uniwgt_4t_8w_msa(uint8_t *src, } } -static void hevc_hz_uniwgt_4t_12w_msa(uint8_t *src, +static void hevc_hz_uniwgt_4t_12w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -2997,7 +2998,7 @@ static void hevc_hz_uniwgt_4t_12w_msa(uint8_t *src, } } -static void hevc_hz_uniwgt_4t_16w_msa(uint8_t *src, +static void hevc_hz_uniwgt_4t_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3080,7 +3081,7 @@ static void hevc_hz_uniwgt_4t_16w_msa(uint8_t *src, } } -static void hevc_hz_uniwgt_4t_24w_msa(uint8_t *src, +static void hevc_hz_uniwgt_4t_24w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3158,7 +3159,7 @@ static void hevc_hz_uniwgt_4t_24w_msa(uint8_t *src, } } -static void hevc_hz_uniwgt_4t_32w_msa(uint8_t *src, +static void hevc_hz_uniwgt_4t_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3245,7 +3246,7 @@ static void hevc_hz_uniwgt_4t_32w_msa(uint8_t *src, } } -static void hevc_vt_uniwgt_4t_4x2_msa(uint8_t *src, +static void hevc_vt_uniwgt_4t_4x2_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3300,7 +3301,7 @@ static void hevc_vt_uniwgt_4t_4x2_msa(uint8_t *src, ST_W2(out, 0, 1, dst, dst_stride); } -static void hevc_vt_uniwgt_4t_4x4_msa(uint8_t *src, +static void hevc_vt_uniwgt_4t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3354,7 +3355,7 @@ static void hevc_vt_uniwgt_4t_4x4_msa(uint8_t *src, ST_W4(out, 0, 1, 2, 3, dst, dst_stride); } -static void hevc_vt_uniwgt_4t_4x8multiple_msa(uint8_t *src, +static void hevc_vt_uniwgt_4t_4x8multiple_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3430,7 +3431,7 @@ static void hevc_vt_uniwgt_4t_4x8multiple_msa(uint8_t *src, } } -static void hevc_vt_uniwgt_4t_4w_msa(uint8_t *src, +static void hevc_vt_uniwgt_4t_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3453,7 +3454,7 @@ static void hevc_vt_uniwgt_4t_4w_msa(uint8_t *src, } } -static void hevc_vt_uniwgt_4t_6w_msa(uint8_t *src, +static void hevc_vt_uniwgt_4t_6w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3531,7 +3532,7 @@ static void hevc_vt_uniwgt_4t_6w_msa(uint8_t *src, ST_H2(out3, 2, 6, dst + 2 * dst_stride + 4, dst_stride); } -static void hevc_vt_uniwgt_4t_8x2_msa(uint8_t *src, +static void hevc_vt_uniwgt_4t_8x2_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3582,7 +3583,7 @@ static void hevc_vt_uniwgt_4t_8x2_msa(uint8_t *src, ST_D2(out, 0, 1, dst, dst_stride); } -static void hevc_vt_uniwgt_4t_8x4_msa(uint8_t *src, +static void hevc_vt_uniwgt_4t_8x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3637,7 +3638,7 @@ static void hevc_vt_uniwgt_4t_8x4_msa(uint8_t *src, ST_D4(out0, out1, 0, 1, 0, 1, dst, dst_stride); } -static void hevc_vt_uniwgt_4t_8x6_msa(uint8_t *src, +static void hevc_vt_uniwgt_4t_8x6_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3700,7 +3701,7 @@ static void hevc_vt_uniwgt_4t_8x6_msa(uint8_t *src, ST_D2(out2, 0, 1, dst + 4 * dst_stride, dst_stride); } -static void hevc_vt_uniwgt_4t_8x8mult_msa(uint8_t *src, +static void hevc_vt_uniwgt_4t_8x8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3779,7 +3780,7 @@ static void hevc_vt_uniwgt_4t_8x8mult_msa(uint8_t *src, } } -static void hevc_vt_uniwgt_4t_8w_msa(uint8_t *src, +static void hevc_vt_uniwgt_4t_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3805,7 +3806,7 @@ static void hevc_vt_uniwgt_4t_8w_msa(uint8_t *src, } } -static void hevc_vt_uniwgt_4t_12w_msa(uint8_t *src, +static void hevc_vt_uniwgt_4t_12w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3910,7 +3911,7 @@ static void hevc_vt_uniwgt_4t_12w_msa(uint8_t *src, } } -static void hevc_vt_uniwgt_4t_16w_msa(uint8_t *src, +static void hevc_vt_uniwgt_4t_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -3992,7 +3993,7 @@ static void hevc_vt_uniwgt_4t_16w_msa(uint8_t *src, } } -static void hevc_vt_uniwgt_4t_24w_msa(uint8_t *src, +static void hevc_vt_uniwgt_4t_24w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -4094,7 +4095,7 @@ static void hevc_vt_uniwgt_4t_24w_msa(uint8_t *src, } } -static void hevc_vt_uniwgt_4t_32w_msa(uint8_t *src, +static void hevc_vt_uniwgt_4t_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -4188,7 +4189,7 @@ static void hevc_vt_uniwgt_4t_32w_msa(uint8_t *src, } } -static void hevc_hv_uniwgt_4t_4x2_msa(uint8_t *src, +static void hevc_hv_uniwgt_4t_4x2_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -4252,7 +4253,7 @@ static void hevc_hv_uniwgt_4t_4x2_msa(uint8_t *src, ST_W2(out, 0, 1, dst, dst_stride); } -static void hevc_hv_uniwgt_4t_4x4_msa(uint8_t *src, +static void hevc_hv_uniwgt_4t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -4321,7 +4322,7 @@ static void hevc_hv_uniwgt_4t_4x4_msa(uint8_t *src, ST_W4(out, 0, 1, 2, 3, dst, dst_stride); } -static void hevc_hv_uniwgt_4t_4multx8mult_msa(uint8_t *src, +static void hevc_hv_uniwgt_4t_4multx8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -4428,7 +4429,7 @@ static void hevc_hv_uniwgt_4t_4multx8mult_msa(uint8_t *src, } } -static void hevc_hv_uniwgt_4t_4w_msa(uint8_t *src, +static void hevc_hv_uniwgt_4t_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -4454,7 +4455,7 @@ static void hevc_hv_uniwgt_4t_4w_msa(uint8_t *src, } } -static void hevc_hv_uniwgt_4t_6w_msa(uint8_t *src, +static void hevc_hv_uniwgt_4t_6w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -4581,7 +4582,7 @@ static void hevc_hv_uniwgt_4t_6w_msa(uint8_t *src, ST_H8(out2, 0, 1, 2, 3, 4, 5, 6, 7, dst + 4, dst_stride); } -static void hevc_hv_uniwgt_4t_8x2_msa(uint8_t *src, +static void hevc_hv_uniwgt_4t_8x2_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -4657,7 +4658,7 @@ static void hevc_hv_uniwgt_4t_8x2_msa(uint8_t *src, ST_D2(out, 0, 1, dst, dst_stride); } -static void hevc_hv_uniwgt_4t_8multx4_msa(uint8_t *src, +static void hevc_hv_uniwgt_4t_8multx4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -4752,7 +4753,7 @@ static void hevc_hv_uniwgt_4t_8multx4_msa(uint8_t *src, } } -static void hevc_hv_uniwgt_4t_8x6_msa(uint8_t *src, +static void hevc_hv_uniwgt_4t_8x6_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -4868,7 +4869,7 @@ static void hevc_hv_uniwgt_4t_8x6_msa(uint8_t *src, ST_D2(out2, 0, 1, dst + 4 * dst_stride, dst_stride); } -static void hevc_hv_uniwgt_4t_8multx4mult_msa(uint8_t *src, +static void hevc_hv_uniwgt_4t_8multx4mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -4881,7 +4882,7 @@ static void hevc_hv_uniwgt_4t_8multx4mult_msa(uint8_t *src, int32_t width8mult) { uint32_t loop_cnt, cnt; - uint8_t *src_tmp; + const uint8_t *src_tmp; uint8_t *dst_tmp; v16u8 out0, out1; v16i8 src0, src1, src2, src3, src4, src5, src6; @@ -4990,7 +4991,7 @@ static void hevc_hv_uniwgt_4t_8multx4mult_msa(uint8_t *src, } } -static void hevc_hv_uniwgt_4t_8w_msa(uint8_t *src, +static void hevc_hv_uniwgt_4t_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -5021,7 +5022,7 @@ static void hevc_hv_uniwgt_4t_8w_msa(uint8_t *src, } } -static void hevc_hv_uniwgt_4t_12w_msa(uint8_t *src, +static void hevc_hv_uniwgt_4t_12w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -5033,7 +5034,8 @@ static void hevc_hv_uniwgt_4t_12w_msa(uint8_t *src, int32_t rnd_val) { uint32_t loop_cnt; - uint8_t *src_tmp, *dst_tmp; + const uint8_t *src_tmp; + uint8_t *dst_tmp; v16u8 out0, out1; v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8, src9, src10; v16i8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7; @@ -5198,7 +5200,7 @@ static void hevc_hv_uniwgt_4t_12w_msa(uint8_t *src, } } -static void hevc_hv_uniwgt_4t_16w_msa(uint8_t *src, +static void hevc_hv_uniwgt_4t_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -5220,7 +5222,7 @@ static void hevc_hv_uniwgt_4t_16w_msa(uint8_t *src, } } -static void hevc_hv_uniwgt_4t_24w_msa(uint8_t *src, +static void hevc_hv_uniwgt_4t_24w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -5236,7 +5238,7 @@ static void hevc_hv_uniwgt_4t_24w_msa(uint8_t *src, offset, rnd_val, 3); } -static void hevc_hv_uniwgt_4t_32w_msa(uint8_t *src, +static void hevc_hv_uniwgt_4t_32w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -5255,7 +5257,7 @@ static void hevc_hv_uniwgt_4t_32w_msa(uint8_t *src, #define UNIWGT_MC_COPY(WIDTH) \ void ff_hevc_put_hevc_uni_w_pel_pixels##WIDTH##_8_msa(uint8_t *dst, \ ptrdiff_t dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ int height, \ int denom, \ @@ -5286,7 +5288,7 @@ UNIWGT_MC_COPY(64); void ff_hevc_put_hevc_uni_w_##PEL##_##DIR##WIDTH##_8_msa(uint8_t *dst, \ ptrdiff_t \ dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t \ src_stride, \ int height, \ @@ -5344,7 +5346,7 @@ UNI_W_MC(epel, v, 32, 4, vt, my); #define UNI_W_MC_HV(PEL, WIDTH, TAP) \ void ff_hevc_put_hevc_uni_w_##PEL##_hv##WIDTH##_8_msa(uint8_t *dst, \ ptrdiff_t dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ int height, \ int denom, \ diff --git a/libavcodec/mips/hevcdsp_mips.h b/libavcodec/mips/hevcdsp_mips.h index c84e08d160..a8f78ff73a 100644 --- a/libavcodec/mips/hevcdsp_mips.h +++ b/libavcodec/mips/hevcdsp_mips.h @@ -25,7 +25,7 @@ #define MC(PEL, DIR, WIDTH) \ void ff_hevc_put_hevc_##PEL##_##DIR##WIDTH##_8_msa(int16_t *dst, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ int height, \ intptr_t mx, \ @@ -104,7 +104,7 @@ MC(epel, hv, 64); #define UNI_MC(PEL, DIR, WIDTH) \ void ff_hevc_put_hevc_uni_##PEL##_##DIR##WIDTH##_8_msa(uint8_t *dst, \ ptrdiff_t dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ int height, \ intptr_t mx, \ @@ -184,7 +184,7 @@ UNI_MC(epel, hv, 64); void ff_hevc_put_hevc_uni_w_##PEL##_##DIR##WIDTH##_8_msa(uint8_t *dst, \ ptrdiff_t \ dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t \ src_stride, \ int height, \ @@ -267,9 +267,9 @@ UNI_W_MC(epel, hv, 64); #define BI_MC(PEL, DIR, WIDTH) \ void ff_hevc_put_hevc_bi_##PEL##_##DIR##WIDTH##_8_msa(uint8_t *dst, \ ptrdiff_t dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ - int16_t *src_16bit, \ + const int16_t *src_16bit, \ int height, \ intptr_t mx, \ intptr_t my, \ @@ -348,10 +348,10 @@ BI_MC(epel, hv, 64); void ff_hevc_put_hevc_bi_w_##PEL##_##DIR##WIDTH##_8_msa(uint8_t *dst, \ ptrdiff_t \ dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t \ src_stride, \ - int16_t *src_16bit, \ + const int16_t *src_16bit, \ int height, \ int denom, \ int weight0, \ @@ -433,32 +433,32 @@ BI_W_MC(epel, hv, 64); void ff_hevc_loop_filter_luma_h_8_msa(uint8_t *src, ptrdiff_t src_stride, - int32_t beta, int32_t *tc, - uint8_t *no_p, uint8_t *no_q); + int32_t beta, const int32_t *tc, + const uint8_t *no_p, const uint8_t *no_q); void ff_hevc_loop_filter_luma_v_8_msa(uint8_t *src, ptrdiff_t src_stride, - int32_t beta, int32_t *tc, - uint8_t *no_p, uint8_t *no_q); + int32_t beta, const int32_t *tc, + const uint8_t *no_p, const uint8_t *no_q); void ff_hevc_loop_filter_chroma_h_8_msa(uint8_t *src, ptrdiff_t src_stride, - int32_t *tc, uint8_t *no_p, - uint8_t *no_q); + const int32_t *tc, const uint8_t *no_p, + const uint8_t *no_q); void ff_hevc_loop_filter_chroma_v_8_msa(uint8_t *src, ptrdiff_t src_stride, - int32_t *tc, uint8_t *no_p, - uint8_t *no_q); + const int32_t *tc, const uint8_t *no_p, + const uint8_t *no_q); -void ff_hevc_sao_band_filter_0_8_msa(uint8_t *dst, uint8_t *src, +void ff_hevc_sao_band_filter_0_8_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst, ptrdiff_t stride_src, - int16_t *sao_offset_val, int sao_left_class, + const int16_t *sao_offset_val, int sao_left_class, int width, int height); -void ff_hevc_sao_edge_filter_8_msa(uint8_t *dst, uint8_t *src, +void ff_hevc_sao_edge_filter_8_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst, - int16_t *sao_offset_val, + const int16_t *sao_offset_val, int eo, int width, int height); void ff_hevc_idct_4x4_msa(int16_t *coeffs, int col_limit); @@ -469,20 +469,20 @@ void ff_hevc_idct_dc_4x4_msa(int16_t *coeffs); void ff_hevc_idct_dc_8x8_msa(int16_t *coeffs); void ff_hevc_idct_dc_16x16_msa(int16_t *coeffs); void ff_hevc_idct_dc_32x32_msa(int16_t *coeffs); -void ff_hevc_addblk_4x4_msa(uint8_t *dst, int16_t *pi16Coeffs, +void ff_hevc_addblk_4x4_msa(uint8_t *dst, const int16_t *pi16Coeffs, ptrdiff_t stride); -void ff_hevc_addblk_8x8_msa(uint8_t *dst, int16_t *pi16Coeffs, +void ff_hevc_addblk_8x8_msa(uint8_t *dst, const int16_t *pi16Coeffs, ptrdiff_t stride); -void ff_hevc_addblk_16x16_msa(uint8_t *dst, int16_t *pi16Coeffs, +void ff_hevc_addblk_16x16_msa(uint8_t *dst, const int16_t *pi16Coeffs, ptrdiff_t stride); -void ff_hevc_addblk_32x32_msa(uint8_t *dst, int16_t *pi16Coeffs, +void ff_hevc_addblk_32x32_msa(uint8_t *dst, const int16_t *pi16Coeffs, ptrdiff_t stride); void ff_hevc_idct_luma_4x4_msa(int16_t *pi16Coeffs); /* Loongson optimization */ #define L_MC(PEL, DIR, WIDTH, TYPE) \ void ff_hevc_put_hevc_##PEL##_##DIR##WIDTH##_8_##TYPE(int16_t *dst, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ int height, \ intptr_t mx, \ @@ -509,9 +509,9 @@ L_MC(qpel, hv, 64, mmi); #define L_BI_MC(PEL, DIR, WIDTH, TYPE) \ void ff_hevc_put_hevc_##PEL##_bi_##DIR##WIDTH##_8_##TYPE(uint8_t *dst, \ ptrdiff_t dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ - int16_t *src2, \ + const int16_t *src2, \ int height, \ intptr_t mx, \ intptr_t my, \ @@ -553,7 +553,7 @@ L_BI_MC(epel, hv, 32, mmi); #define L_UNI_MC(PEL, DIR, WIDTH, TYPE) \ void ff_hevc_put_hevc_##PEL##_uni_##DIR##WIDTH##_8_##TYPE(uint8_t *dst, \ ptrdiff_t dst_stride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ int height, \ intptr_t mx, \ diff --git a/libavcodec/mips/hevcdsp_mmi.c b/libavcodec/mips/hevcdsp_mmi.c index 6583bef5da..0ea88a7c08 100644 --- a/libavcodec/mips/hevcdsp_mmi.c +++ b/libavcodec/mips/hevcdsp_mmi.c @@ -24,13 +24,13 @@ #include "libavutil/mips/mmiutils.h" #define PUT_HEVC_QPEL_H(w, x_step, src_step, dst_step) \ -void ff_hevc_put_hevc_qpel_h##w##_8_mmi(int16_t *dst, uint8_t *_src, \ +void ff_hevc_put_hevc_qpel_h##w##_8_mmi(int16_t *dst, const uint8_t *_src, \ ptrdiff_t _srcstride, \ int height, intptr_t mx, \ intptr_t my, int width) \ { \ int x, y; \ - pixel *src = (pixel*)_src - 3; \ + const pixel *src = (const pixel*)_src - 3; \ ptrdiff_t srcstride = _srcstride / sizeof(pixel); \ double ftmp[15]; \ uint64_t rtmp[1]; \ @@ -118,14 +118,14 @@ PUT_HEVC_QPEL_H(48, 12, -48, -96); PUT_HEVC_QPEL_H(64, 16, -64, -128); #define PUT_HEVC_QPEL_HV(w, x_step, src_step, dst_step) \ -void ff_hevc_put_hevc_qpel_hv##w##_8_mmi(int16_t *dst, uint8_t *_src, \ +void ff_hevc_put_hevc_qpel_hv##w##_8_mmi(int16_t *dst, const uint8_t *_src,\ ptrdiff_t _srcstride, \ int height, intptr_t mx, \ intptr_t my, int width) \ { \ int x, y; \ const int8_t *filter; \ - pixel *src = (pixel*)_src; \ + const pixel *src = (const pixel*)_src; \ ptrdiff_t srcstride = _srcstride / sizeof(pixel); \ int16_t tmp_array[(MAX_PB_SIZE + QPEL_EXTRA) * MAX_PB_SIZE]; \ int16_t *tmp = tmp_array; \ @@ -303,14 +303,14 @@ PUT_HEVC_QPEL_HV(64, 16, -64, -128); #define PUT_HEVC_QPEL_BI_H(w, x_step, src_step, src2_step, dst_step) \ void ff_hevc_put_hevc_qpel_bi_h##w##_8_mmi(uint8_t *_dst, \ ptrdiff_t _dststride, \ - uint8_t *_src, \ + const uint8_t *_src, \ ptrdiff_t _srcstride, \ - int16_t *src2, int height, \ + const int16_t *src2, int height, \ intptr_t mx, intptr_t my, \ int width) \ { \ int x, y; \ - pixel *src = (pixel*)_src - 3; \ + const pixel *src = (const pixel*)_src - 3; \ ptrdiff_t srcstride = _srcstride / sizeof(pixel); \ pixel *dst = (pixel *)_dst; \ ptrdiff_t dststride = _dststride / sizeof(pixel); \ @@ -434,9 +434,9 @@ PUT_HEVC_QPEL_BI_H(64, 16, -64, -128, -64); #define PUT_HEVC_QPEL_BI_HV(w, x_step, src_step, src2_step, dst_step) \ void ff_hevc_put_hevc_qpel_bi_hv##w##_8_mmi(uint8_t *_dst, \ ptrdiff_t _dststride, \ - uint8_t *_src, \ + const uint8_t *_src, \ ptrdiff_t _srcstride, \ - int16_t *src2, int height, \ + const int16_t *src2, int height, \ intptr_t mx, intptr_t my, \ int width) \ { \ @@ -654,9 +654,9 @@ PUT_HEVC_QPEL_BI_HV(64, 16, -64, -128, -64); #define PUT_HEVC_EPEL_BI_HV(w, x_step, src_step, src2_step, dst_step) \ void ff_hevc_put_hevc_epel_bi_hv##w##_8_mmi(uint8_t *_dst, \ ptrdiff_t _dststride, \ - uint8_t *_src, \ + const uint8_t *_src, \ ptrdiff_t _srcstride, \ - int16_t *src2, int height, \ + const int16_t *src2, int height, \ intptr_t mx, intptr_t my, \ int width) \ { \ @@ -835,9 +835,9 @@ PUT_HEVC_EPEL_BI_HV(32, 8, -32, -64, -32); #define PUT_HEVC_PEL_BI_PIXELS(w, x_step, src_step, dst_step, src2_step) \ void ff_hevc_put_hevc_pel_bi_pixels##w##_8_mmi(uint8_t *_dst, \ ptrdiff_t _dststride, \ - uint8_t *_src, \ + const uint8_t *_src, \ ptrdiff_t _srcstride, \ - int16_t *src2, int height, \ + const int16_t *src2, int height, \ intptr_t mx, intptr_t my, \ int width) \ { \ @@ -945,7 +945,7 @@ PUT_HEVC_PEL_BI_PIXELS(64, 8, -64, -64, -128); #define PUT_HEVC_QPEL_UNI_HV(w, x_step, src_step, dst_step, tmp_step) \ void ff_hevc_put_hevc_qpel_uni_hv##w##_8_mmi(uint8_t *_dst, \ ptrdiff_t _dststride, \ - uint8_t *_src, \ + const uint8_t *_src, \ ptrdiff_t _srcstride, \ int height, \ intptr_t mx, intptr_t my, \ diff --git a/libavcodec/mips/hevcdsp_msa.c b/libavcodec/mips/hevcdsp_msa.c index 2c57ec857a..8841a31369 100644 --- a/libavcodec/mips/hevcdsp_msa.c +++ b/libavcodec/mips/hevcdsp_msa.c @@ -29,7 +29,7 @@ static const uint8_t ff_hevc_mask_arr[16 * 2] __attribute__((aligned(0x40))) = { 0, 1, 1, 2, 2, 3, 3, 4, 16, 17, 17, 18, 18, 19, 19, 20 }; -static void hevc_copy_4w_msa(uint8_t *src, int32_t src_stride, +static void hevc_copy_4w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, int32_t height) { @@ -77,7 +77,7 @@ static void hevc_copy_4w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_copy_6w_msa(uint8_t *src, int32_t src_stride, +static void hevc_copy_6w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, int32_t height) { @@ -101,7 +101,7 @@ static void hevc_copy_6w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_copy_8w_msa(uint8_t *src, int32_t src_stride, +static void hevc_copy_8w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, int32_t height) { @@ -162,7 +162,7 @@ static void hevc_copy_8w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_copy_12w_msa(uint8_t *src, int32_t src_stride, +static void hevc_copy_12w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, int32_t height) { @@ -199,7 +199,7 @@ static void hevc_copy_12w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_copy_16w_msa(uint8_t *src, int32_t src_stride, +static void hevc_copy_16w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, int32_t height) { @@ -290,7 +290,7 @@ static void hevc_copy_16w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_copy_24w_msa(uint8_t *src, int32_t src_stride, +static void hevc_copy_24w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, int32_t height) { @@ -319,7 +319,7 @@ static void hevc_copy_24w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_copy_32w_msa(uint8_t *src, int32_t src_stride, +static void hevc_copy_32w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, int32_t height) { @@ -357,7 +357,7 @@ static void hevc_copy_32w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_copy_48w_msa(uint8_t *src, int32_t src_stride, +static void hevc_copy_48w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, int32_t height) { @@ -408,7 +408,7 @@ static void hevc_copy_48w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_copy_64w_msa(uint8_t *src, int32_t src_stride, +static void hevc_copy_64w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, int32_t height) { @@ -445,7 +445,7 @@ static void hevc_copy_64w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_hz_8t_4w_msa(uint8_t *src, int32_t src_stride, +static void hevc_hz_8t_4w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -500,7 +500,7 @@ static void hevc_hz_8t_4w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_hz_8t_8w_msa(uint8_t *src, int32_t src_stride, +static void hevc_hz_8t_8w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -555,7 +555,7 @@ static void hevc_hz_8t_8w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_hz_8t_12w_msa(uint8_t *src, int32_t src_stride, +static void hevc_hz_8t_12w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -630,7 +630,7 @@ static void hevc_hz_8t_12w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_hz_8t_16w_msa(uint8_t *src, int32_t src_stride, +static void hevc_hz_8t_16w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -687,7 +687,7 @@ static void hevc_hz_8t_16w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_hz_8t_24w_msa(uint8_t *src, int32_t src_stride, +static void hevc_hz_8t_24w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -762,7 +762,7 @@ static void hevc_hz_8t_24w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_hz_8t_32w_msa(uint8_t *src, int32_t src_stride, +static void hevc_hz_8t_32w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -822,7 +822,7 @@ static void hevc_hz_8t_32w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_hz_8t_48w_msa(uint8_t *src, int32_t src_stride, +static void hevc_hz_8t_48w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -893,7 +893,7 @@ static void hevc_hz_8t_48w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_hz_8t_64w_msa(uint8_t *src, int32_t src_stride, +static void hevc_hz_8t_64w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -987,7 +987,7 @@ static void hevc_hz_8t_64w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_vt_8t_4w_msa(uint8_t *src, int32_t src_stride, +static void hevc_vt_8t_4w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1057,7 +1057,7 @@ static void hevc_vt_8t_4w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_vt_8t_8w_msa(uint8_t *src, int32_t src_stride, +static void hevc_vt_8t_8w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1120,7 +1120,7 @@ static void hevc_vt_8t_8w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_vt_8t_12w_msa(uint8_t *src, int32_t src_stride, +static void hevc_vt_8t_12w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1207,7 +1207,7 @@ static void hevc_vt_8t_12w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_vt_8t_16multx4mult_msa(uint8_t *src, +static void hevc_vt_8t_16multx4mult_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -1215,7 +1215,7 @@ static void hevc_vt_8t_16multx4mult_msa(uint8_t *src, int32_t height, int32_t width) { - uint8_t *src_tmp; + const uint8_t *src_tmp; int16_t *dst_tmp; int32_t loop_cnt, cnt; v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8, src9, src10; @@ -1315,7 +1315,7 @@ static void hevc_vt_8t_16multx4mult_msa(uint8_t *src, } } -static void hevc_vt_8t_16w_msa(uint8_t *src, int32_t src_stride, +static void hevc_vt_8t_16w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1323,7 +1323,7 @@ static void hevc_vt_8t_16w_msa(uint8_t *src, int32_t src_stride, filter, height, 16); } -static void hevc_vt_8t_24w_msa(uint8_t *src, int32_t src_stride, +static void hevc_vt_8t_24w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1333,7 +1333,7 @@ static void hevc_vt_8t_24w_msa(uint8_t *src, int32_t src_stride, filter, height); } -static void hevc_vt_8t_32w_msa(uint8_t *src, int32_t src_stride, +static void hevc_vt_8t_32w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1341,7 +1341,7 @@ static void hevc_vt_8t_32w_msa(uint8_t *src, int32_t src_stride, filter, height, 32); } -static void hevc_vt_8t_48w_msa(uint8_t *src, int32_t src_stride, +static void hevc_vt_8t_48w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1349,7 +1349,7 @@ static void hevc_vt_8t_48w_msa(uint8_t *src, int32_t src_stride, filter, height, 48); } -static void hevc_vt_8t_64w_msa(uint8_t *src, int32_t src_stride, +static void hevc_vt_8t_64w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1357,7 +1357,7 @@ static void hevc_vt_8t_64w_msa(uint8_t *src, int32_t src_stride, filter, height, 64); } -static void hevc_hv_8t_4w_msa(uint8_t *src, int32_t src_stride, +static void hevc_hv_8t_4w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter_x, const int8_t *filter_y, int32_t height) @@ -1464,7 +1464,7 @@ static void hevc_hv_8t_4w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_hv_8t_8multx1mult_msa(uint8_t *src, +static void hevc_hv_8t_8multx1mult_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -1473,7 +1473,7 @@ static void hevc_hv_8t_8multx1mult_msa(uint8_t *src, int32_t height, int32_t width) { uint32_t loop_cnt, cnt; - uint8_t *src_tmp; + const uint8_t *src_tmp; int16_t *dst_tmp; v16i8 src0, src1, src2, src3, src4, src5, src6, src7; v8i16 filt0, filt1, filt2, filt3; @@ -1591,7 +1591,7 @@ static void hevc_hv_8t_8multx1mult_msa(uint8_t *src, } } -static void hevc_hv_8t_8w_msa(uint8_t *src, int32_t src_stride, +static void hevc_hv_8t_8w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter_x, const int8_t *filter_y, int32_t height) @@ -1600,13 +1600,13 @@ static void hevc_hv_8t_8w_msa(uint8_t *src, int32_t src_stride, filter_x, filter_y, height, 8); } -static void hevc_hv_8t_12w_msa(uint8_t *src, int32_t src_stride, +static void hevc_hv_8t_12w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter_x, const int8_t *filter_y, int32_t height) { uint32_t loop_cnt; - uint8_t *src_tmp; + const uint8_t *src_tmp; int16_t *dst_tmp; v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8, src9, src10; v16i8 mask0, mask1, mask2, mask3, mask4, mask5, mask6, mask7; @@ -1795,7 +1795,7 @@ static void hevc_hv_8t_12w_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_hv_8t_16w_msa(uint8_t *src, int32_t src_stride, +static void hevc_hv_8t_16w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter_x, const int8_t *filter_y, int32_t height) @@ -1804,7 +1804,7 @@ static void hevc_hv_8t_16w_msa(uint8_t *src, int32_t src_stride, filter_x, filter_y, height, 16); } -static void hevc_hv_8t_24w_msa(uint8_t *src, int32_t src_stride, +static void hevc_hv_8t_24w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter_x, const int8_t *filter_y, int32_t height) @@ -1813,7 +1813,7 @@ static void hevc_hv_8t_24w_msa(uint8_t *src, int32_t src_stride, filter_x, filter_y, height, 24); } -static void hevc_hv_8t_32w_msa(uint8_t *src, int32_t src_stride, +static void hevc_hv_8t_32w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter_x, const int8_t *filter_y, int32_t height) @@ -1822,7 +1822,7 @@ static void hevc_hv_8t_32w_msa(uint8_t *src, int32_t src_stride, filter_x, filter_y, height, 32); } -static void hevc_hv_8t_48w_msa(uint8_t *src, int32_t src_stride, +static void hevc_hv_8t_48w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter_x, const int8_t *filter_y, int32_t height) @@ -1831,7 +1831,7 @@ static void hevc_hv_8t_48w_msa(uint8_t *src, int32_t src_stride, filter_x, filter_y, height, 48); } -static void hevc_hv_8t_64w_msa(uint8_t *src, int32_t src_stride, +static void hevc_hv_8t_64w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter_x, const int8_t *filter_y, int32_t height) @@ -1840,7 +1840,7 @@ static void hevc_hv_8t_64w_msa(uint8_t *src, int32_t src_stride, filter_x, filter_y, height, 64); } -static void hevc_hz_4t_4x2_msa(uint8_t *src, +static void hevc_hz_4t_4x2_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -1873,7 +1873,7 @@ static void hevc_hz_4t_4x2_msa(uint8_t *src, ST_D2(dst0, 0, 1, dst, dst_stride); } -static void hevc_hz_4t_4x4_msa(uint8_t *src, +static void hevc_hz_4t_4x4_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -1910,7 +1910,7 @@ static void hevc_hz_4t_4x4_msa(uint8_t *src, ST_D4(dst0, dst1, 0, 1, 0, 1, dst, dst_stride); } -static void hevc_hz_4t_4x8multiple_msa(uint8_t *src, +static void hevc_hz_4t_4x8multiple_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -1959,7 +1959,7 @@ static void hevc_hz_4t_4x8multiple_msa(uint8_t *src, } } -static void hevc_hz_4t_4w_msa(uint8_t *src, +static void hevc_hz_4t_4w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -1976,7 +1976,7 @@ static void hevc_hz_4t_4w_msa(uint8_t *src, } } -static void hevc_hz_4t_6w_msa(uint8_t *src, +static void hevc_hz_4t_6w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2047,7 +2047,7 @@ static void hevc_hz_4t_6w_msa(uint8_t *src, } } -static void hevc_hz_4t_8x2multiple_msa(uint8_t *src, +static void hevc_hz_4t_8x2multiple_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2091,7 +2091,7 @@ static void hevc_hz_4t_8x2multiple_msa(uint8_t *src, } } -static void hevc_hz_4t_8x4multiple_msa(uint8_t *src, +static void hevc_hz_4t_8x4multiple_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2144,7 +2144,7 @@ static void hevc_hz_4t_8x4multiple_msa(uint8_t *src, } } -static void hevc_hz_4t_8w_msa(uint8_t *src, +static void hevc_hz_4t_8w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2160,7 +2160,7 @@ static void hevc_hz_4t_8w_msa(uint8_t *src, } } -static void hevc_hz_4t_12w_msa(uint8_t *src, +static void hevc_hz_4t_12w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2221,7 +2221,7 @@ static void hevc_hz_4t_12w_msa(uint8_t *src, } } -static void hevc_hz_4t_16w_msa(uint8_t *src, +static void hevc_hz_4t_16w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2293,7 +2293,7 @@ static void hevc_hz_4t_16w_msa(uint8_t *src, } } -static void hevc_hz_4t_24w_msa(uint8_t *src, +static void hevc_hz_4t_24w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2394,7 +2394,7 @@ static void hevc_hz_4t_24w_msa(uint8_t *src, } } -static void hevc_hz_4t_32w_msa(uint8_t *src, +static void hevc_hz_4t_32w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2446,7 +2446,7 @@ static void hevc_hz_4t_32w_msa(uint8_t *src, } } -static void hevc_vt_4t_4x2_msa(uint8_t *src, +static void hevc_vt_4t_4x2_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2479,7 +2479,7 @@ static void hevc_vt_4t_4x2_msa(uint8_t *src, ST_D2(dst10, 0, 1, dst, dst_stride); } -static void hevc_vt_4t_4x4_msa(uint8_t *src, +static void hevc_vt_4t_4x4_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2516,7 +2516,7 @@ static void hevc_vt_4t_4x4_msa(uint8_t *src, ST_D4(dst10, dst32, 0, 1, 0, 1, dst, dst_stride); } -static void hevc_vt_4t_4x8_msa(uint8_t *src, +static void hevc_vt_4t_4x8_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2565,7 +2565,7 @@ static void hevc_vt_4t_4x8_msa(uint8_t *src, ST_D8(dst10, dst32, dst54, dst76, 0, 1, 0, 1, 0, 1, 0, 1, dst, dst_stride); } -static void hevc_vt_4t_4x16_msa(uint8_t *src, int32_t src_stride, +static void hevc_vt_4t_4x16_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -2635,7 +2635,7 @@ static void hevc_vt_4t_4x16_msa(uint8_t *src, int32_t src_stride, ST_D8(dst10, dst32, dst54, dst76, 0, 1, 0, 1, 0, 1, 0, 1, dst, dst_stride); } -static void hevc_vt_4t_4w_msa(uint8_t *src, +static void hevc_vt_4t_4w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2653,7 +2653,7 @@ static void hevc_vt_4t_4w_msa(uint8_t *src, } } -static void hevc_vt_4t_6w_msa(uint8_t *src, +static void hevc_vt_4t_6w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2727,7 +2727,7 @@ static void hevc_vt_4t_6w_msa(uint8_t *src, } } -static void hevc_vt_4t_8x2_msa(uint8_t *src, +static void hevc_vt_4t_8x2_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2762,7 +2762,7 @@ static void hevc_vt_4t_8x2_msa(uint8_t *src, ST_SH2(dst0_r, dst1_r, dst, dst_stride); } -static void hevc_vt_4t_8x6_msa(uint8_t *src, +static void hevc_vt_4t_8x6_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2824,7 +2824,7 @@ static void hevc_vt_4t_8x6_msa(uint8_t *src, ST_SH2(dst0_r, dst1_r, dst, dst_stride); } -static void hevc_vt_4t_8x4multiple_msa(uint8_t *src, +static void hevc_vt_4t_8x4multiple_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2873,7 +2873,7 @@ static void hevc_vt_4t_8x4multiple_msa(uint8_t *src, } } -static void hevc_vt_4t_8w_msa(uint8_t *src, +static void hevc_vt_4t_8w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2890,7 +2890,7 @@ static void hevc_vt_4t_8w_msa(uint8_t *src, } } -static void hevc_vt_4t_12w_msa(uint8_t *src, +static void hevc_vt_4t_12w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -2961,7 +2961,7 @@ static void hevc_vt_4t_12w_msa(uint8_t *src, } } -static void hevc_vt_4t_16w_msa(uint8_t *src, +static void hevc_vt_4t_16w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -3028,7 +3028,7 @@ static void hevc_vt_4t_16w_msa(uint8_t *src, } } -static void hevc_vt_4t_24w_msa(uint8_t *src, +static void hevc_vt_4t_24w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -3126,7 +3126,7 @@ static void hevc_vt_4t_24w_msa(uint8_t *src, } } -static void hevc_vt_4t_32w_msa(uint8_t *src, +static void hevc_vt_4t_32w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -3232,7 +3232,7 @@ static void hevc_vt_4t_32w_msa(uint8_t *src, } } -static void hevc_hv_4t_4x2_msa(uint8_t *src, +static void hevc_hv_4t_4x2_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -3286,7 +3286,7 @@ static void hevc_hv_4t_4x2_msa(uint8_t *src, ST_D2(dst0, 0, 1, dst, dst_stride); } -static void hevc_hv_4t_4x4_msa(uint8_t *src, +static void hevc_hv_4t_4x4_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -3349,7 +3349,7 @@ static void hevc_hv_4t_4x4_msa(uint8_t *src, } -static void hevc_hv_4t_4multx8mult_msa(uint8_t *src, +static void hevc_hv_4t_4multx8mult_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -3445,7 +3445,7 @@ static void hevc_hv_4t_4multx8mult_msa(uint8_t *src, } } -static void hevc_hv_4t_4w_msa(uint8_t *src, +static void hevc_hv_4t_4w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -3465,7 +3465,7 @@ static void hevc_hv_4t_4w_msa(uint8_t *src, } } -static void hevc_hv_4t_6w_msa(uint8_t *src, +static void hevc_hv_4t_6w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -3590,7 +3590,7 @@ static void hevc_hv_4t_6w_msa(uint8_t *src, ST_W4(tmp5, 0, 1, 2, 3, dst + 4, dst_stride); } -static void hevc_hv_4t_8x2_msa(uint8_t *src, +static void hevc_hv_4t_8x2_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -3657,7 +3657,7 @@ static void hevc_hv_4t_8x2_msa(uint8_t *src, ST_SW2(dst0_r, dst1_r, dst, dst_stride); } -static void hevc_hv_4t_8multx4_msa(uint8_t *src, int32_t src_stride, +static void hevc_hv_4t_8multx4_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, const int8_t *filter_x, const int8_t *filter_y, int32_t width8mult) @@ -3741,7 +3741,7 @@ static void hevc_hv_4t_8multx4_msa(uint8_t *src, int32_t src_stride, } } -static void hevc_hv_4t_8x6_msa(uint8_t *src, +static void hevc_hv_4t_8x6_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -3852,7 +3852,7 @@ static void hevc_hv_4t_8x6_msa(uint8_t *src, ST_SW2(dst4_r, dst5_r, dst, dst_stride); } -static void hevc_hv_4t_8multx4mult_msa(uint8_t *src, +static void hevc_hv_4t_8multx4mult_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -3862,7 +3862,7 @@ static void hevc_hv_4t_8multx4mult_msa(uint8_t *src, int32_t width8mult) { uint32_t loop_cnt, cnt; - uint8_t *src_tmp; + const uint8_t *src_tmp; int16_t *dst_tmp; v16i8 src0, src1, src2, src3, src4, src5, src6; v8i16 filt0, filt1; @@ -3969,7 +3969,7 @@ static void hevc_hv_4t_8multx4mult_msa(uint8_t *src, } } -static void hevc_hv_4t_8w_msa(uint8_t *src, +static void hevc_hv_4t_8w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -3993,7 +3993,7 @@ static void hevc_hv_4t_8w_msa(uint8_t *src, } } -static void hevc_hv_4t_12w_msa(uint8_t *src, +static void hevc_hv_4t_12w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -4002,7 +4002,7 @@ static void hevc_hv_4t_12w_msa(uint8_t *src, int32_t height) { uint32_t loop_cnt; - uint8_t *src_tmp; + const uint8_t *src_tmp; int16_t *dst_tmp; v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8, src9, src10; v16i8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7; @@ -4166,7 +4166,7 @@ static void hevc_hv_4t_12w_msa(uint8_t *src, } } -static void hevc_hv_4t_16w_msa(uint8_t *src, +static void hevc_hv_4t_16w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -4183,7 +4183,7 @@ static void hevc_hv_4t_16w_msa(uint8_t *src, } } -static void hevc_hv_4t_24w_msa(uint8_t *src, +static void hevc_hv_4t_24w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -4195,7 +4195,7 @@ static void hevc_hv_4t_24w_msa(uint8_t *src, filter_x, filter_y, height, 3); } -static void hevc_hv_4t_32w_msa(uint8_t *src, +static void hevc_hv_4t_32w_msa(const uint8_t *src, int32_t src_stride, int16_t *dst, int32_t dst_stride, @@ -4209,7 +4209,7 @@ static void hevc_hv_4t_32w_msa(uint8_t *src, #define MC_COPY(WIDTH) \ void ff_hevc_put_hevc_pel_pixels##WIDTH##_8_msa(int16_t *dst, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ int height, \ intptr_t mx, \ @@ -4233,7 +4233,7 @@ MC_COPY(64); #define MC(PEL, DIR, WIDTH, TAP, DIR1, FILT_DIR) \ void ff_hevc_put_hevc_##PEL##_##DIR##WIDTH##_8_msa(int16_t *dst, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ int height, \ intptr_t mx, \ @@ -4284,7 +4284,7 @@ MC(epel, v, 32, 4, vt, my); #define MC_HV(PEL, WIDTH, TAP) \ void ff_hevc_put_hevc_##PEL##_hv##WIDTH##_8_msa(int16_t *dst, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ int height, \ intptr_t mx, \ |