Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaustubh Raste <kaustubh.raste@imgtec.com>2017-09-21 11:15:34 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-09-24 03:33:48 +0300
commit7f8417f22619366aaaad848ee2ff71be14637b7b (patch)
treec7bff86fa2a9acc3a33e4f342e7792558ddc61c3 /libavutil/mips
parentd8ef5a47bba85fa147ac53a9d9523b3eca031696 (diff)
avcodec/mips: Improve hevc uni-w copy 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 'libavutil/mips')
-rw-r--r--libavutil/mips/generic_macros_msa.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/libavutil/mips/generic_macros_msa.h b/libavutil/mips/generic_macros_msa.h
index 3ff94fdc99..bda3ed263f 100644
--- a/libavutil/mips/generic_macros_msa.h
+++ b/libavutil/mips/generic_macros_msa.h
@@ -204,6 +204,12 @@
out3 = LW((psrc) + 3 * stride); \
}
+#define LW2(psrc, stride, out0, out1) \
+{ \
+ out0 = LW((psrc)); \
+ out1 = LW((psrc) + stride); \
+}
+
/* Description : Load double words with stride
Arguments : Inputs - psrc (source pointer to load from)
- stride
@@ -1047,6 +1053,25 @@
CLIP_SH2_0_255(in2, in3); \
}
+#define CLIP_SH_0_255_MAX_SATU(in) \
+( { \
+ v8i16 out_m; \
+ \
+ out_m = __msa_maxi_s_h((v8i16) in, 0); \
+ out_m = (v8i16) __msa_sat_u_h((v8u16) out_m, 7); \
+ out_m; \
+} )
+#define CLIP_SH2_0_255_MAX_SATU(in0, in1) \
+{ \
+ in0 = CLIP_SH_0_255_MAX_SATU(in0); \
+ in1 = CLIP_SH_0_255_MAX_SATU(in1); \
+}
+#define CLIP_SH4_0_255_MAX_SATU(in0, in1, in2, in3) \
+{ \
+ CLIP_SH2_0_255_MAX_SATU(in0, in1); \
+ CLIP_SH2_0_255_MAX_SATU(in2, in3); \
+}
+
/* Description : Clips all signed word elements of input vector
between 0 & 255
Arguments : Inputs - in (input vector)
@@ -1965,6 +1990,11 @@
result is in place written to 'in0'
Similar for other pairs
*/
+#define SLLI_2V(in0, in1, shift) \
+{ \
+ in0 = in0 << shift; \
+ in1 = in1 << shift; \
+}
#define SLLI_4V(in0, in1, in2, in3, shift) \
{ \
in0 = in0 << shift; \