summaryrefslogtreecommitdiff
path: root/libavcodec/mips/hevc_macros_msa.h
diff options
context:
space:
mode:
authorKaustubh Raste <kaustubh.raste@imgtec.com>2017-10-09 17:47:34 +0530
committerMichael Niedermayer <michael@niedermayer.cc>2017-10-10 23:58:41 +0200
commiteadb911643243c9c756d5a6c3d84182ad7578261 (patch)
tree84227eafefab0066b9b22301c2e0fa7be9f7d1d0 /libavcodec/mips/hevc_macros_msa.h
parent662234a9a22f1cd0f0ac83b8bb1ffadedca90c0a (diff)
avcodec/mips: Improve hevc uni-w horiz mc msa functions
Load the specific destination bytes instead of MSA load and pack. Pack the data to half word before clipping. Use immediate unsigned saturation for clip to max saving one vector register. Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com> Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mips/hevc_macros_msa.h')
-rw-r--r--libavcodec/mips/hevc_macros_msa.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/libavcodec/mips/hevc_macros_msa.h b/libavcodec/mips/hevc_macros_msa.h
index b06c5ad9b9..7dcfea03b4 100644
--- a/libavcodec/mips/hevc_macros_msa.h
+++ b/libavcodec/mips/hevc_macros_msa.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Manojkumar Bhosale (Manojkumar.Bhosale@imgtec.com)
+ * Copyright (c) 2015 - 2017 Manojkumar Bhosale (Manojkumar.Bhosale@imgtec.com)
*
* This file is part of FFmpeg.
*
@@ -58,6 +58,17 @@
out2 = (v4i32) __msa_pckev_b((v16i8) tmp5_m, (v16i8) tmp4_m); \
}
+#define HEVC_FILT_8TAP_SH(in0, in1, in2, in3, \
+ filt0, filt1, filt2, filt3) \
+( { \
+ v8i16 out_m; \
+ \
+ out_m = __msa_dotp_s_h((v16i8) in0, (v16i8) filt0); \
+ out_m = __msa_dpadd_s_h(out_m, (v16i8) in1, (v16i8) filt1); \
+ DPADD_SB2_SH(in2, in3, filt2, filt3, out_m, out_m); \
+ out_m; \
+} )
+
#define HEVC_FILT_8TAP(in0, in1, in2, in3, \
filt0, filt1, filt2, filt3) \
( { \