summaryrefslogtreecommitdiff
path: root/libavcodec/mips/hevc_macros_msa.h
diff options
context:
space:
mode:
authorShivraj Patil <shivraj.patil@imgtec.com>2015-05-29 12:20:26 +0530
committerMichael Niedermayer <michaelni@gmx.at>2015-06-02 01:54:51 +0200
commitaede1a1a60cc89bb663753fee1aad9feaca8a14a (patch)
treef8961f80bcd8fb16eb1b9478266dbfb3886a38e0 /libavcodec/mips/hevc_macros_msa.h
parentda05c624996f46d1b3547ac8fa62c7e7db09e345 (diff)
avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC bi mc functions
This patch adds MSA (MIPS-SIMD-Arch) optimizations for HEVC bi mc functions (qpel as well as epel) in new file hevc_mc_bi_msa.c Adds new generic macros (needed for this patch) in libavutil/mips/generic_macros_msa.h Adds HEVC specific macros (needed for this patch) in libavcodec/mips/hevc_macros_msa.h Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mips/hevc_macros_msa.h')
-rw-r--r--libavcodec/mips/hevc_macros_msa.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/libavcodec/mips/hevc_macros_msa.h b/libavcodec/mips/hevc_macros_msa.h
index 7a89f93a9c..b06c5ad9b9 100644
--- a/libavcodec/mips/hevc_macros_msa.h
+++ b/libavcodec/mips/hevc_macros_msa.h
@@ -37,6 +37,27 @@
out = (v4i32) __msa_pckev_b((v16i8) tmp1_m, (v16i8) tmp0_m); \
}
+#define HEVC_PCK_SW_SB8(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1) \
+{ \
+ v8i16 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \
+ \
+ PCKEV_H4_SH(in0, in1, in2, in3, in4, in5, in6, in7, \
+ tmp0_m, tmp1_m, tmp2_m, tmp3_m); \
+ PCKEV_B2_SW(tmp1_m, tmp0_m, tmp3_m, tmp2_m, out0, out1); \
+}
+
+#define HEVC_PCK_SW_SB12(in0, in1, in2, in3, in4, in5, in6, in7, \
+ in8, in9, in10, in11, out0, out1, out2) \
+{ \
+ v8i16 tmp0_m, tmp1_m, tmp2_m, tmp3_m, tmp4_m, tmp5_m; \
+ \
+ PCKEV_H4_SH(in0, in1, in2, in3, in4, in5, in6, in7, \
+ tmp0_m, tmp1_m, tmp2_m, tmp3_m); \
+ PCKEV_H2_SH(in8, in9, in10, in11, tmp4_m, tmp5_m); \
+ PCKEV_B2_SW(tmp1_m, tmp0_m, tmp3_m, tmp2_m, out0, out1); \
+ out2 = (v4i32) __msa_pckev_b((v16i8) tmp5_m, (v16i8) tmp4_m); \
+}
+
#define HEVC_FILT_8TAP(in0, in1, in2, in3, \
filt0, filt1, filt2, filt3) \
( { \
@@ -48,4 +69,13 @@
out_m; \
} )
+#define HEVC_FILT_4TAP(in0, in1, filt0, filt1) \
+( { \
+ v4i32 out_m; \
+ \
+ out_m = __msa_dotp_s_w(in0, (v8i16) filt0); \
+ out_m = __msa_dpadd_s_w(out_m, in1, (v8i16) filt1); \
+ out_m; \
+} )
+
#endif /* AVCODEC_MIPS_HEVC_MACROS_MSA_H */