1 /* 2 * Copyright (c) 2015 The WebM project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #include <assert.h> 12 13 #include "vp9/common/vp9_enums.h" 14 #include "vpx_dsp/mips/inv_txfm_msa.h" 15 16 void vp9_iht16x16_256_add_msa(const int16_t *input, uint8_t *dst, 17 int32_t dst_stride, int32_t tx_type) { 18 int32_t i; 19 DECLARE_ALIGNED(32, int16_t, out[16 * 16]); 20 int16_t *out_ptr = &out[0]; 21 22 switch (tx_type) { 23 case DCT_DCT: 24 /* transform rows */ 25 for (i = 0; i < 2; ++i) { 26 /* process 16 * 8 block */ 27 vpx_idct16_1d_rows_msa((input + (i << 7)), (out_ptr + (i << 7))); 28 } 29 30 /* transform columns */ 31 for (i = 0; i < 2; ++i) { 32 /* process 8 * 16 block */ 33 vpx_idct16_1d_columns_addblk_msa((out_ptr + (i << 3)), (dst + (i << 3)), 34 dst_stride); 35 } 36 break; 37 case ADST_DCT: 38 /* transform rows */ 39 for (i = 0; i < 2; ++i) { 40 /* process 16 * 8 block */ 41 vpx_idct16_1d_rows_msa((input + (i << 7)), (out_ptr + (i << 7))); 42 } 43 44 /* transform columns */ 45 for (i = 0; i < 2; ++i) { 46 vpx_iadst16_1d_columns_addblk_msa((out_ptr + (i << 3)), 47 (dst + (i << 3)), dst_stride); 48 } 49 break; 50 case DCT_ADST: 51 /* transform rows */ 52 for (i = 0; i < 2; ++i) { 53 /* process 16 * 8 block */ 54 vpx_iadst16_1d_rows_msa((input + (i << 7)), (out_ptr + (i << 7))); 55 } 56 57 /* transform columns */ 58 for (i = 0; i < 2; ++i) { 59 /* process 8 * 16 block */ 60 vpx_idct16_1d_columns_addblk_msa((out_ptr + (i << 3)), (dst + (i << 3)), 61 dst_stride); 62 } 63 break; 64 case ADST_ADST: 65 /* transform rows */ 66 for (i = 0; i < 2; ++i) { 67 /* process 16 * 8 block */ 68 vpx_iadst16_1d_rows_msa((input + (i << 7)), (out_ptr + (i << 7))); 69 } 70 71 /* transform columns */ 72 for (i = 0; i < 2; ++i) { 73 vpx_iadst16_1d_columns_addblk_msa((out_ptr + (i << 3)), 74 (dst + (i << 3)), dst_stride); 75 } 76 break; 77 default: assert(0); break; 78 } 79 } 80