2013-09-13 11:48:32 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2013 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.
|
|
|
|
*/
|
|
|
|
|
2015-08-03 19:50:32 +02:00
|
|
|
#ifndef VPX_DSP_MIPS_INV_TXFM_DSPR2_H_
|
|
|
|
#define VPX_DSP_MIPS_INV_TXFM_DSPR2_H_
|
2013-09-13 11:48:32 +02:00
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
|
|
#include "./vpx_config.h"
|
|
|
|
#include "vpx/vpx_integer.h"
|
2015-08-03 19:50:32 +02:00
|
|
|
#include "vpx_dsp/inv_txfm.h"
|
2015-07-17 18:20:10 +02:00
|
|
|
#include "vpx_dsp/mips/common_dspr2.h"
|
2013-09-13 11:48:32 +02:00
|
|
|
|
2014-01-18 21:16:11 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2013-09-13 11:48:32 +02:00
|
|
|
#if HAVE_DSPR2
|
2016-07-23 05:07:03 +02:00
|
|
|
#define DCT_CONST_ROUND_SHIFT_TWICE_COSPI_16_64(input) \
|
|
|
|
({ \
|
2013-09-13 11:48:32 +02:00
|
|
|
\
|
2016-07-23 05:07:03 +02:00
|
|
|
int32_t tmp, out; \
|
|
|
|
int dct_cost_rounding = DCT_CONST_ROUNDING; \
|
|
|
|
int in = input; \
|
2013-09-13 11:48:32 +02:00
|
|
|
\
|
2016-07-23 05:07:03 +02:00
|
|
|
__asm__ __volatile__(/* out = dct_const_round_shift(dc * cospi_16_64); */ \
|
|
|
|
"mtlo %[dct_cost_rounding], $ac1 " \
|
|
|
|
" \n\t" \
|
|
|
|
"mthi $zero, $ac1 " \
|
|
|
|
" \n\t" \
|
|
|
|
"madd $ac1, %[in], " \
|
|
|
|
"%[cospi_16_64] \n\t" \
|
|
|
|
"extp %[tmp], $ac1, " \
|
|
|
|
"31 \n\t" \
|
2013-09-13 11:48:32 +02:00
|
|
|
\
|
2016-07-23 05:07:03 +02:00
|
|
|
/* out = dct_const_round_shift(out * cospi_16_64); */ \
|
|
|
|
"mtlo %[dct_cost_rounding], $ac2 " \
|
|
|
|
" \n\t" \
|
|
|
|
"mthi $zero, $ac2 " \
|
|
|
|
" \n\t" \
|
|
|
|
"madd $ac2, %[tmp], " \
|
|
|
|
"%[cospi_16_64] \n\t" \
|
|
|
|
"extp %[out], $ac2, " \
|
|
|
|
"31 \n\t" \
|
2013-09-13 11:48:32 +02:00
|
|
|
\
|
2016-07-23 05:07:03 +02:00
|
|
|
: [tmp] "=&r"(tmp), [out] "=r"(out) \
|
|
|
|
: [in] "r"(in), \
|
|
|
|
[dct_cost_rounding] "r"(dct_cost_rounding), \
|
|
|
|
[cospi_16_64] "r"(cospi_16_64)); \
|
|
|
|
out; \
|
|
|
|
})
|
2013-09-13 11:48:32 +02:00
|
|
|
|
2016-12-13 00:13:22 +01:00
|
|
|
void vpx_idct32_cols_add_blk_dspr2(int16_t *input, uint8_t *dest, int stride);
|
2015-08-03 23:51:10 +02:00
|
|
|
void vpx_idct4_rows_dspr2(const int16_t *input, int16_t *output);
|
2016-12-13 00:13:22 +01:00
|
|
|
void vpx_idct4_columns_add_blk_dspr2(int16_t *input, uint8_t *dest, int stride);
|
2015-08-03 19:50:32 +02:00
|
|
|
void iadst4_dspr2(const int16_t *input, int16_t *output);
|
|
|
|
void idct8_rows_dspr2(const int16_t *input, int16_t *output, uint32_t no_rows);
|
2016-12-13 00:13:22 +01:00
|
|
|
void idct8_columns_add_blk_dspr2(int16_t *input, uint8_t *dest, int stride);
|
2015-08-03 19:50:32 +02:00
|
|
|
void iadst8_dspr2(const int16_t *input, int16_t *output);
|
2016-07-23 05:07:03 +02:00
|
|
|
void idct16_rows_dspr2(const int16_t *input, int16_t *output, uint32_t no_rows);
|
2016-12-13 00:13:22 +01:00
|
|
|
void idct16_cols_add_blk_dspr2(int16_t *input, uint8_t *dest, int stride);
|
2015-08-03 19:50:32 +02:00
|
|
|
void iadst16_dspr2(const int16_t *input, int16_t *output);
|
2013-10-24 07:59:04 +02:00
|
|
|
|
2013-09-13 11:48:32 +02:00
|
|
|
#endif // #if HAVE_DSPR2
|
2014-01-18 21:16:11 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
} // extern "C"
|
|
|
|
#endif
|
|
|
|
|
2015-08-03 19:50:32 +02:00
|
|
|
#endif // VPX_DSP_MIPS_INV_TXFM_DSPR2_H_
|