summaryrefslogtreecommitdiffstats
path: root/third_party/aom/av1/common/mips
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/aom/av1/common/mips')
-rw-r--r--third_party/aom/av1/common/mips/dspr2/av1_itrans16_dspr2.c97
-rw-r--r--third_party/aom/av1/common/mips/dspr2/av1_itrans4_dspr2.c91
-rw-r--r--third_party/aom/av1/common/mips/dspr2/av1_itrans8_dspr2.c86
-rw-r--r--third_party/aom/av1/common/mips/msa/av1_idct16x16_msa.c2
-rw-r--r--third_party/aom/av1/common/mips/msa/av1_idct4x4_msa.c2
-rw-r--r--third_party/aom/av1/common/mips/msa/av1_idct8x8_msa.c2
6 files changed, 3 insertions, 277 deletions
diff --git a/third_party/aom/av1/common/mips/dspr2/av1_itrans16_dspr2.c b/third_party/aom/av1/common/mips/dspr2/av1_itrans16_dspr2.c
deleted file mode 100644
index 1b3343155..000000000
--- a/third_party/aom/av1/common/mips/dspr2/av1_itrans16_dspr2.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2016, Alliance for Open Media. All rights reserved
- *
- * This source code is subject to the terms of the BSD 2 Clause License and
- * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
- * was not distributed with this source code in the LICENSE file, you can
- * obtain it at www.aomedia.org/license/software. If the Alliance for Open
- * Media Patent License 1.0 was not distributed with this source code in the
- * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
- */
-
-#include <assert.h>
-#include <stdio.h>
-
-#include "./aom_config.h"
-#include "./av1_rtcd.h"
-#include "av1/common/common.h"
-#include "av1/common/blockd.h"
-#include "aom_dsp/mips/inv_txfm_dspr2.h"
-#include "aom_dsp/txfm_common.h"
-#include "aom_ports/mem.h"
-
-#if HAVE_DSPR2
-void av1_iht16x16_256_add_dspr2(const int16_t *input, uint8_t *dest, int pitch,
- TxfmParam *txfm_param) {
- int i, j;
- DECLARE_ALIGNED(32, int16_t, out[16 * 16]);
- int16_t *outptr = out;
- int16_t temp_out[16];
- uint32_t pos = 45;
- int tx_type = txfm_param->tx_type;
-
- /* bit positon for extract from acc */
- __asm__ __volatile__("wrdsp %[pos], 1 \n\t" : : [pos] "r"(pos));
-
- switch (tx_type) {
- case DCT_DCT: // DCT in both horizontal and vertical
- idct16_rows_dspr2(input, outptr, 16);
- idct16_cols_add_blk_dspr2(out, dest, pitch);
- break;
- case ADST_DCT: // ADST in vertical, DCT in horizontal
- idct16_rows_dspr2(input, outptr, 16);
-
- outptr = out;
-
- for (i = 0; i < 16; ++i) {
- iadst16_dspr2(outptr, temp_out);
-
- for (j = 0; j < 16; ++j)
- dest[j * pitch + i] = clip_pixel(ROUND_POWER_OF_TWO(temp_out[j], 6) +
- dest[j * pitch + i]);
- outptr += 16;
- }
- break;
- case DCT_ADST: // DCT in vertical, ADST in horizontal
- {
- int16_t temp_in[16 * 16];
-
- for (i = 0; i < 16; ++i) {
- /* prefetch row */
- prefetch_load((const uint8_t *)(input + 16));
-
- iadst16_dspr2(input, outptr);
- input += 16;
- outptr += 16;
- }
-
- for (i = 0; i < 16; ++i)
- for (j = 0; j < 16; ++j) temp_in[j * 16 + i] = out[i * 16 + j];
-
- idct16_cols_add_blk_dspr2(temp_in, dest, pitch);
- } break;
- case ADST_ADST: // ADST in both directions
- {
- int16_t temp_in[16];
-
- for (i = 0; i < 16; ++i) {
- /* prefetch row */
- prefetch_load((const uint8_t *)(input + 16));
-
- iadst16_dspr2(input, outptr);
- input += 16;
- outptr += 16;
- }
-
- for (i = 0; i < 16; ++i) {
- for (j = 0; j < 16; ++j) temp_in[j] = out[j * 16 + i];
- iadst16_dspr2(temp_in, temp_out);
- for (j = 0; j < 16; ++j)
- dest[j * pitch + i] = clip_pixel(ROUND_POWER_OF_TWO(temp_out[j], 6) +
- dest[j * pitch + i]);
- }
- } break;
- default: printf("av1_short_iht16x16_add_dspr2 : Invalid tx_type\n"); break;
- }
-}
-#endif // #if HAVE_DSPR2
diff --git a/third_party/aom/av1/common/mips/dspr2/av1_itrans4_dspr2.c b/third_party/aom/av1/common/mips/dspr2/av1_itrans4_dspr2.c
deleted file mode 100644
index d9da3a1e7..000000000
--- a/third_party/aom/av1/common/mips/dspr2/av1_itrans4_dspr2.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2016, Alliance for Open Media. All rights reserved
- *
- * This source code is subject to the terms of the BSD 2 Clause License and
- * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
- * was not distributed with this source code in the LICENSE file, you can
- * obtain it at www.aomedia.org/license/software. If the Alliance for Open
- * Media Patent License 1.0 was not distributed with this source code in the
- * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
- */
-
-#include <assert.h>
-#include <stdio.h>
-
-#include "./aom_config.h"
-#include "./av1_rtcd.h"
-#include "av1/common/common.h"
-#include "av1/common/blockd.h"
-#include "aom_dsp/mips/inv_txfm_dspr2.h"
-#include "aom_dsp/txfm_common.h"
-#include "aom_ports/mem.h"
-
-#if HAVE_DSPR2
-void av1_iht4x4_16_add_dspr2(const int16_t *input, uint8_t *dest,
- int dest_stride, TxfmParam *txfm_param) {
- int i, j;
- DECLARE_ALIGNED(32, int16_t, out[4 * 4]);
- int16_t *outptr = out;
- int16_t temp_in[4 * 4], temp_out[4];
- uint32_t pos = 45;
- int tx_type = txfm_param->tx_type;
-
- /* bit positon for extract from acc */
- __asm__ __volatile__("wrdsp %[pos], 1 \n\t"
- :
- : [pos] "r"(pos));
-
- switch (tx_type) {
- case DCT_DCT: // DCT in both horizontal and vertical
- aom_idct4_rows_dspr2(input, outptr);
- aom_idct4_columns_add_blk_dspr2(&out[0], dest, dest_stride);
- break;
- case ADST_DCT: // ADST in vertical, DCT in horizontal
- aom_idct4_rows_dspr2(input, outptr);
-
- outptr = out;
-
- for (i = 0; i < 4; ++i) {
- iadst4_dspr2(outptr, temp_out);
-
- for (j = 0; j < 4; ++j)
- dest[j * dest_stride + i] = clip_pixel(
- ROUND_POWER_OF_TWO(temp_out[j], 4) + dest[j * dest_stride + i]);
-
- outptr += 4;
- }
- break;
- case DCT_ADST: // DCT in vertical, ADST in horizontal
- for (i = 0; i < 4; ++i) {
- iadst4_dspr2(input, outptr);
- input += 4;
- outptr += 4;
- }
-
- for (i = 0; i < 4; ++i) {
- for (j = 0; j < 4; ++j) {
- temp_in[i * 4 + j] = out[j * 4 + i];
- }
- }
- aom_idct4_columns_add_blk_dspr2(&temp_in[0], dest, dest_stride);
- break;
- case ADST_ADST: // ADST in both directions
- for (i = 0; i < 4; ++i) {
- iadst4_dspr2(input, outptr);
- input += 4;
- outptr += 4;
- }
-
- for (i = 0; i < 4; ++i) {
- for (j = 0; j < 4; ++j) temp_in[j] = out[j * 4 + i];
- iadst4_dspr2(temp_in, temp_out);
-
- for (j = 0; j < 4; ++j)
- dest[j * dest_stride + i] = clip_pixel(
- ROUND_POWER_OF_TWO(temp_out[j], 4) + dest[j * dest_stride + i]);
- }
- break;
- default: printf("av1_short_iht4x4_add_dspr2 : Invalid tx_type\n"); break;
- }
-}
-#endif // #if HAVE_DSPR2
diff --git a/third_party/aom/av1/common/mips/dspr2/av1_itrans8_dspr2.c b/third_party/aom/av1/common/mips/dspr2/av1_itrans8_dspr2.c
deleted file mode 100644
index f62d5faef..000000000
--- a/third_party/aom/av1/common/mips/dspr2/av1_itrans8_dspr2.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2016, Alliance for Open Media. All rights reserved
- *
- * This source code is subject to the terms of the BSD 2 Clause License and
- * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
- * was not distributed with this source code in the LICENSE file, you can
- * obtain it at www.aomedia.org/license/software. If the Alliance for Open
- * Media Patent License 1.0 was not distributed with this source code in the
- * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
- */
-
-#include <assert.h>
-#include <stdio.h>
-
-#include "./aom_config.h"
-#include "./av1_rtcd.h"
-#include "av1/common/common.h"
-#include "av1/common/blockd.h"
-#include "aom_dsp/mips/inv_txfm_dspr2.h"
-#include "aom_dsp/txfm_common.h"
-#include "aom_ports/mem.h"
-
-#if HAVE_DSPR2
-void av1_iht8x8_64_add_dspr2(const int16_t *input, uint8_t *dest,
- int dest_stride, TxfmParam *txfm_param) {
- int i, j;
- DECLARE_ALIGNED(32, int16_t, out[8 * 8]);
- int16_t *outptr = out;
- int16_t temp_in[8 * 8], temp_out[8];
- uint32_t pos = 45;
- int tx_type = txfm_param->tx_type;
-
- /* bit positon for extract from acc */
- __asm__ __volatile__("wrdsp %[pos], 1 \n\t" : : [pos] "r"(pos));
-
- switch (tx_type) {
- case DCT_DCT: // DCT in both horizontal and vertical
- idct8_rows_dspr2(input, outptr, 8);
- idct8_columns_add_blk_dspr2(&out[0], dest, dest_stride);
- break;
- case ADST_DCT: // ADST in vertical, DCT in horizontal
- idct8_rows_dspr2(input, outptr, 8);
-
- for (i = 0; i < 8; ++i) {
- iadst8_dspr2(&out[i * 8], temp_out);
-
- for (j = 0; j < 8; ++j)
- dest[j * dest_stride + i] = clip_pixel(
- ROUND_POWER_OF_TWO(temp_out[j], 5) + dest[j * dest_stride + i]);
- }
- break;
- case DCT_ADST: // DCT in vertical, ADST in horizontal
- for (i = 0; i < 8; ++i) {
- iadst8_dspr2(input, outptr);
- input += 8;
- outptr += 8;
- }
-
- for (i = 0; i < 8; ++i) {
- for (j = 0; j < 8; ++j) {
- temp_in[i * 8 + j] = out[j * 8 + i];
- }
- }
- idct8_columns_add_blk_dspr2(&temp_in[0], dest, dest_stride);
- break;
- case ADST_ADST: // ADST in both directions
- for (i = 0; i < 8; ++i) {
- iadst8_dspr2(input, outptr);
- input += 8;
- outptr += 8;
- }
-
- for (i = 0; i < 8; ++i) {
- for (j = 0; j < 8; ++j) temp_in[j] = out[j * 8 + i];
-
- iadst8_dspr2(temp_in, temp_out);
-
- for (j = 0; j < 8; ++j)
- dest[j * dest_stride + i] = clip_pixel(
- ROUND_POWER_OF_TWO(temp_out[j], 5) + dest[j * dest_stride + i]);
- }
- break;
- default: printf("av1_short_iht8x8_add_dspr2 : Invalid tx_type\n"); break;
- }
-}
-#endif // #if HAVE_DSPR2
diff --git a/third_party/aom/av1/common/mips/msa/av1_idct16x16_msa.c b/third_party/aom/av1/common/mips/msa/av1_idct16x16_msa.c
index 522cce0f4..ff461b914 100644
--- a/third_party/aom/av1/common/mips/msa/av1_idct16x16_msa.c
+++ b/third_party/aom/av1/common/mips/msa/av1_idct16x16_msa.c
@@ -19,7 +19,7 @@ void av1_iht16x16_256_add_msa(const int16_t *input, uint8_t *dst,
int32_t i;
DECLARE_ALIGNED(32, int16_t, out[16 * 16]);
int16_t *out_ptr = &out[0];
- int32_t tx_type = txfm_param->tx_type;
+ const TX_TYPE tx_type = txfm_param->tx_type;
switch (tx_type) {
case DCT_DCT:
diff --git a/third_party/aom/av1/common/mips/msa/av1_idct4x4_msa.c b/third_party/aom/av1/common/mips/msa/av1_idct4x4_msa.c
index 7a68dbbe6..37f7fd77b 100644
--- a/third_party/aom/av1/common/mips/msa/av1_idct4x4_msa.c
+++ b/third_party/aom/av1/common/mips/msa/av1_idct4x4_msa.c
@@ -17,7 +17,7 @@
void av1_iht4x4_16_add_msa(const int16_t *input, uint8_t *dst,
int32_t dst_stride, TxfmParam *txfm_param) {
v8i16 in0, in1, in2, in3;
- int32_t tx_type = txfm_param->tx_type;
+ const TX_TYPE tx_type = txfm_param->tx_type;
/* load vector elements of 4x4 block */
LD4x4_SH(input, in0, in1, in2, in3);
diff --git a/third_party/aom/av1/common/mips/msa/av1_idct8x8_msa.c b/third_party/aom/av1/common/mips/msa/av1_idct8x8_msa.c
index c6ef61e1a..7410f7b98 100644
--- a/third_party/aom/av1/common/mips/msa/av1_idct8x8_msa.c
+++ b/third_party/aom/av1/common/mips/msa/av1_idct8x8_msa.c
@@ -17,7 +17,7 @@
void av1_iht8x8_64_add_msa(const int16_t *input, uint8_t *dst,
int32_t dst_stride, TxfmParam *txfm_param) {
v8i16 in0, in1, in2, in3, in4, in5, in6, in7;
- int32_t tx_type = txfm_param->tx_type;
+ const TX_TYPE tx_type = txfm_param->tx_type;
/* load vector elements of 8x8 block */
LD_SH8(input, 8, in0, in1, in2, in3, in4, in5, in6, in7);