2015-06-18 08:33:30 +02:00
|
|
|
/*
|
|
|
|
* 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>
|
|
|
|
|
2015-07-28 23:42:25 +02:00
|
|
|
#include "vp9/common/vp9_enums.h"
|
2015-06-18 08:33:30 +02:00
|
|
|
#include "vp9/encoder/mips/msa/vp9_fdct_msa.h"
|
|
|
|
|
|
|
|
void vp9_fht8x8_msa(const int16_t *input, int16_t *output, int32_t stride,
|
|
|
|
int32_t tx_type) {
|
|
|
|
v8i16 in0, in1, in2, in3, in4, in5, in6, in7;
|
|
|
|
|
|
|
|
LD_SH8(input, stride, in0, in1, in2, in3, in4, in5, in6, in7);
|
|
|
|
SLLI_4V(in0, in1, in2, in3, 2);
|
|
|
|
SLLI_4V(in4, in5, in6, in7, 2);
|
|
|
|
|
|
|
|
switch (tx_type) {
|
|
|
|
case DCT_DCT:
|
2016-07-27 05:43:23 +02:00
|
|
|
VP9_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
|
|
|
|
in5, in6, in7);
|
|
|
|
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2,
|
|
|
|
in3, in4, in5, in6, in7);
|
|
|
|
VP9_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
|
|
|
|
in5, in6, in7);
|
2015-06-18 08:33:30 +02:00
|
|
|
break;
|
|
|
|
case ADST_DCT:
|
2016-07-27 05:43:23 +02:00
|
|
|
VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
|
|
|
|
in5, in6, in7);
|
|
|
|
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2,
|
|
|
|
in3, in4, in5, in6, in7);
|
|
|
|
VP9_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
|
|
|
|
in5, in6, in7);
|
2015-06-18 08:33:30 +02:00
|
|
|
break;
|
|
|
|
case DCT_ADST:
|
2016-07-27 05:43:23 +02:00
|
|
|
VP9_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
|
|
|
|
in5, in6, in7);
|
|
|
|
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2,
|
|
|
|
in3, in4, in5, in6, in7);
|
|
|
|
VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
|
|
|
|
in5, in6, in7);
|
2015-06-18 08:33:30 +02:00
|
|
|
break;
|
|
|
|
case ADST_ADST:
|
2016-07-27 05:43:23 +02:00
|
|
|
VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
|
|
|
|
in5, in6, in7);
|
|
|
|
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2,
|
|
|
|
in3, in4, in5, in6, in7);
|
|
|
|
VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
|
|
|
|
in5, in6, in7);
|
2015-06-18 08:33:30 +02:00
|
|
|
break;
|
2016-07-27 05:43:23 +02:00
|
|
|
default: assert(0); break;
|
2015-06-18 08:33:30 +02:00
|
|
|
}
|
|
|
|
|
2016-07-27 05:43:23 +02:00
|
|
|
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
|
|
|
|
in4, in5, in6, in7);
|
2015-07-22 18:39:17 +02:00
|
|
|
SRLI_AVE_S_4V_H(in0, in1, in2, in3, in4, in5, in6, in7);
|
2015-06-18 08:33:30 +02:00
|
|
|
ST_SH8(in0, in1, in2, in3, in4, in5, in6, in7, output, 8);
|
|
|
|
}
|