From 92fc0bfa54d82e3bb18138f9f0ebc3a7322b64ce Mon Sep 17 00:00:00 2001 From: gxw Date: Tue, 6 Aug 2019 19:11:16 +0800 Subject: avutil/mips: refactor msa SLDI_Bn_0 and SLDI_Bn macros. Changing details as following: 1. The previous order of parameters are irregular and difficult to understand. Adjust the order of the parameters according to the rule: (RTYPE, input registers, input mask/input index/..., output registers). Most of the existing msa macros follow the rule. 2. Remove the redundant macro SLDI_Bn_0 and use SLDI_Bn instead. Reviewed-by: Shiyou Yin Signed-off-by: Michael Niedermayer --- libavcodec/mips/me_cmp_msa.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libavcodec/mips/me_cmp_msa.c') diff --git a/libavcodec/mips/me_cmp_msa.c b/libavcodec/mips/me_cmp_msa.c index 0e3165cd8f..7cb7af0047 100644 --- a/libavcodec/mips/me_cmp_msa.c +++ b/libavcodec/mips/me_cmp_msa.c @@ -87,8 +87,8 @@ static uint32_t sad_horiz_bilinear_filter_8width_msa(uint8_t *src, PCKEV_D2_UB(src1, src0, src3, src2, src0, src1); PCKEV_D2_UB(ref1, ref0, ref3, ref2, ref4, ref5); - SLDI_B2_UB(ref0, ref1, ref0, ref1, ref0, ref1, 1); - SLDI_B2_UB(ref2, ref3, ref2, ref3, ref2, ref3, 1); + SLDI_B4_UB(ref0, ref0, ref1, ref1, ref2, ref2, ref3, ref3, 1, + ref0, ref1, ref2, ref3); PCKEV_D2_UB(ref1, ref0, ref3, ref2, ref0, ref1); AVER_UB2_UB(ref4, ref0, ref5, ref1, comp0, comp1); sad += SAD_UB2_UH(src0, src1, comp0, comp1); @@ -100,8 +100,8 @@ static uint32_t sad_horiz_bilinear_filter_8width_msa(uint8_t *src, PCKEV_D2_UB(src1, src0, src3, src2, src0, src1); PCKEV_D2_UB(ref1, ref0, ref3, ref2, ref4, ref5); - SLDI_B2_UB(ref0, ref1, ref0, ref1, ref0, ref1, 1); - SLDI_B2_UB(ref2, ref3, ref2, ref3, ref2, ref3, 1); + SLDI_B4_UB(ref0, ref0, ref1, ref1, ref2, ref2, ref3, ref3, 1, + ref0, ref1, ref2, ref3); PCKEV_D2_UB(ref1, ref0, ref3, ref2, ref0, ref1); AVER_UB2_UB(ref4, ref0, ref5, ref1, comp0, comp1); sad += SAD_UB2_UH(src0, src1, comp0, comp1); -- cgit v1.2.3