| Index: source/libvpx/vpx_dsp/mips/itrans4_dspr2.c
|
| diff --git a/source/libvpx/vp9/common/mips/dspr2/vp9_itrans4_dspr2.c b/source/libvpx/vpx_dsp/mips/itrans4_dspr2.c
|
| similarity index 82%
|
| copy from source/libvpx/vp9/common/mips/dspr2/vp9_itrans4_dspr2.c
|
| copy to source/libvpx/vpx_dsp/mips/itrans4_dspr2.c
|
| index aa801ecb67eedecfda45691173ef245bdd0a32f8..ecb8bd3de7518d0039d92deeb52e9833953a3ca9 100644
|
| --- a/source/libvpx/vp9/common/mips/dspr2/vp9_itrans4_dspr2.c
|
| +++ b/source/libvpx/vpx_dsp/mips/itrans4_dspr2.c
|
| @@ -1,5 +1,5 @@
|
| /*
|
| - * Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
| + * 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
|
| @@ -8,20 +8,13 @@
|
| * be found in the AUTHORS file in the root of the source tree.
|
| */
|
|
|
| -#include <assert.h>
|
| -#include <stdio.h>
|
| -
|
| #include "./vpx_config.h"
|
| -#include "./vp9_rtcd.h"
|
| -#include "vp9/common/vp9_common.h"
|
| -#include "vp9/common/vp9_blockd.h"
|
| -#include "vp9/common/vp9_idct.h"
|
| -#include "vp9/common/mips/dspr2/vp9_common_dspr2.h"
|
| +#include "./vpx_dsp_rtcd.h"
|
| +#include "vpx_dsp/mips/inv_txfm_dspr2.h"
|
| #include "vpx_dsp/txfm_common.h"
|
| -#include "vpx_ports/mem.h"
|
|
|
| #if HAVE_DSPR2
|
| -static void vp9_idct4_rows_dspr2(const int16_t *input, int16_t *output) {
|
| +void vpx_idct4_rows_dspr2(const int16_t *input, int16_t *output) {
|
| int16_t step_0, step_1, step_2, step_3;
|
| int Temp0, Temp1, Temp2, Temp3;
|
| const int const_2_power_13 = 8192;
|
| @@ -106,8 +99,8 @@ static void vp9_idct4_rows_dspr2(const int16_t *input, int16_t *output) {
|
| }
|
| }
|
|
|
| -static void vp9_idct4_columns_add_blk_dspr2(int16_t *input, uint8_t *dest,
|
| - int dest_stride) {
|
| +void vpx_idct4_columns_add_blk_dspr2(int16_t *input, uint8_t *dest,
|
| + int dest_stride) {
|
| int16_t step_0, step_1, step_2, step_3;
|
| int Temp0, Temp1, Temp2, Temp3;
|
| const int const_2_power_13 = 8192;
|
| @@ -228,7 +221,7 @@ static void vp9_idct4_columns_add_blk_dspr2(int16_t *input, uint8_t *dest,
|
| }
|
| }
|
|
|
| -void vp9_idct4x4_16_add_dspr2(const int16_t *input, uint8_t *dest,
|
| +void vpx_idct4x4_16_add_dspr2(const int16_t *input, uint8_t *dest,
|
| int dest_stride) {
|
| DECLARE_ALIGNED(32, int16_t, out[4 * 4]);
|
| int16_t *outptr = out;
|
| @@ -242,13 +235,13 @@ void vp9_idct4x4_16_add_dspr2(const int16_t *input, uint8_t *dest,
|
| );
|
|
|
| // Rows
|
| - vp9_idct4_rows_dspr2(input, outptr);
|
| + vpx_idct4_rows_dspr2(input, outptr);
|
|
|
| // Columns
|
| - vp9_idct4_columns_add_blk_dspr2(&out[0], dest, dest_stride);
|
| + vpx_idct4_columns_add_blk_dspr2(&out[0], dest, dest_stride);
|
| }
|
|
|
| -void vp9_idct4x4_1_add_dspr2(const int16_t *input, uint8_t *dest,
|
| +void vpx_idct4x4_1_add_dspr2(const int16_t *input, uint8_t *dest,
|
| int dest_stride) {
|
| int a1, absa1;
|
| int r;
|
| @@ -321,7 +314,7 @@ void vp9_idct4x4_1_add_dspr2(const int16_t *input, uint8_t *dest,
|
| }
|
| }
|
|
|
| -static void iadst4_dspr2(const int16_t *input, int16_t *output) {
|
| +void iadst4_dspr2(const int16_t *input, int16_t *output) {
|
| int s0, s1, s2, s3, s4, s5, s6, s7;
|
| int x0, x1, x2, x3;
|
|
|
| @@ -363,78 +356,4 @@ static void iadst4_dspr2(const int16_t *input, int16_t *output) {
|
| output[2] = dct_const_round_shift(s2);
|
| output[3] = dct_const_round_shift(s3);
|
| }
|
| -
|
| -void vp9_iht4x4_16_add_dspr2(const int16_t *input, uint8_t *dest,
|
| - int dest_stride, int tx_type) {
|
| - 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;
|
| -
|
| - /* 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
|
| - vp9_idct4_rows_dspr2(input, outptr);
|
| - vp9_idct4_columns_add_blk_dspr2(&out[0], dest, dest_stride);
|
| - break;
|
| - case ADST_DCT: // ADST in vertical, DCT in horizontal
|
| - vp9_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];
|
| - }
|
| - }
|
| - vp9_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("vp9_short_iht4x4_add_dspr2 : Invalid tx_type\n");
|
| - break;
|
| - }
|
| -}
|
| #endif // #if HAVE_DSPR2
|
|
|