summaryrefslogtreecommitdiff
path: root/vp10/common/mips/msa/idct4x4_msa.c
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2015-08-06 21:14:07 -0700
committerJingning Han <jingning@google.com>2015-08-11 21:24:08 -0700
commit54d66ef165a86dd23ca4e5e645288f9ef63b7bb0 (patch)
tree05916e9655ce4eb8b7e731bf6a228b2d86f72990 /vp10/common/mips/msa/idct4x4_msa.c
parentb522d1cdffdc060b6bef9fceef9b316316b05d9c (diff)
downloadlibvpx-54d66ef165a86dd23ca4e5e645288f9ef63b7bb0.tar
libvpx-54d66ef165a86dd23ca4e5e645288f9ef63b7bb0.tar.gz
libvpx-54d66ef165a86dd23ca4e5e645288f9ef63b7bb0.tar.bz2
libvpx-54d66ef165a86dd23ca4e5e645288f9ef63b7bb0.zip
Remove vp9_ prefix from vp10 files
Remove the vp9_ prefix from vp10 file names. Change-Id: I513a211b286a57d6126fc1b0fbfd6405120014f1
Diffstat (limited to 'vp10/common/mips/msa/idct4x4_msa.c')
-rw-r--r--vp10/common/mips/msa/idct4x4_msa.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/vp10/common/mips/msa/idct4x4_msa.c b/vp10/common/mips/msa/idct4x4_msa.c
new file mode 100644
index 000000000..866f321ab
--- /dev/null
+++ b/vp10/common/mips/msa/idct4x4_msa.c
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2015 The WebM project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <assert.h>
+
+#include "vp10/common/enums.h"
+#include "vpx_dsp/mips/inv_txfm_msa.h"
+
+void vp10_iht4x4_16_add_msa(const int16_t *input, uint8_t *dst,
+ int32_t dst_stride, int32_t tx_type) {
+ v8i16 in0, in1, in2, in3;
+
+ /* load vector elements of 4x4 block */
+ LD4x4_SH(input, in0, in1, in2, in3);
+ TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
+
+ switch (tx_type) {
+ case DCT_DCT:
+ /* DCT in horizontal */
+ VP9_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ /* DCT in vertical */
+ TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
+ VP9_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ break;
+ case ADST_DCT:
+ /* DCT in horizontal */
+ VP9_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ /* ADST in vertical */
+ TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
+ VP9_IADST4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ break;
+ case DCT_ADST:
+ /* ADST in horizontal */
+ VP9_IADST4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ /* DCT in vertical */
+ TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
+ VP9_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ break;
+ case ADST_ADST:
+ /* ADST in horizontal */
+ VP9_IADST4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ /* ADST in vertical */
+ TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
+ VP9_IADST4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+
+ /* final rounding (add 2^3, divide by 2^4) and shift */
+ SRARI_H4_SH(in0, in1, in2, in3, 4);
+ /* add block and store 4x4 */
+ ADDBLK_ST4x4_UB(in0, in1, in2, in3, dst, dst_stride);
+}