From 8903b9fa8345726efbe9b92a759c98cc21c4c14b Mon Sep 17 00:00:00 2001 From: Angie Chiang Date: Fri, 18 Sep 2015 18:46:22 -0700 Subject: remove static from fdct4/8/16/32 remove static from fdct4/8/16/32 in vp10/encoder/dct.c add prefix vp10_ to fdct4/8/16/32 add vp10/encoder/dct.h Change-Id: I644827a191c1a7761850ec0b1da705638b618c66 --- vp10/encoder/dct.c | 35 ++++++++++++++++++----------------- vp10/encoder/dct.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 17 deletions(-) create mode 100644 vp10/encoder/dct.h (limited to 'vp10/encoder') diff --git a/vp10/encoder/dct.c b/vp10/encoder/dct.c index 80ace06cd..78f151ebb 100644 --- a/vp10/encoder/dct.c +++ b/vp10/encoder/dct.c @@ -34,7 +34,7 @@ static INLINE void range_check(const tran_low_t *input, const int size, #endif } -static void fdct4(const tran_low_t *input, tran_low_t *output) { +void vp10_fdct4(const tran_low_t *input, tran_low_t *output) { tran_high_t temp; tran_low_t step[4]; @@ -70,7 +70,7 @@ static void fdct4(const tran_low_t *input, tran_low_t *output) { range_check(output, 4, 13); } -static void fdct8(const tran_low_t *input, tran_low_t *output) { +void vp10_fdct8(const tran_low_t *input, tran_low_t *output) { tran_high_t temp; tran_low_t step[8]; @@ -148,7 +148,7 @@ static void fdct8(const tran_low_t *input, tran_low_t *output) { range_check(output, 8, 14); } -static void fdct16(const tran_low_t *input, tran_low_t *output) { +void vp10_fdct16(const tran_low_t *input, tran_low_t *output) { tran_high_t temp; tran_low_t step[16]; @@ -322,7 +322,8 @@ static void fdct16(const tran_low_t *input, tran_low_t *output) { range_check(output, 16, 16); } -static void fdct32(const tran_low_t *input, tran_low_t *output) { +// TODO(angiebird): Unify this with vp10_fwd_txfm.c: vp10_fdct32 +void vp10_fdct32_local(const tran_low_t *input, tran_low_t *output) { tran_high_t temp; tran_low_t step[32]; @@ -995,24 +996,24 @@ static void fadst16(const tran_low_t *input, tran_low_t *output) { } static const transform_2d FHT_4[] = { - { fdct4, fdct4 }, // DCT_DCT = 0 - { fadst4, fdct4 }, // ADST_DCT = 1 - { fdct4, fadst4 }, // DCT_ADST = 2 - { fadst4, fadst4 } // ADST_ADST = 3 + { vp10_fdct4, vp10_fdct4 }, // DCT_DCT = 0 + { fadst4, vp10_fdct4 }, // ADST_DCT = 1 + { vp10_fdct4, fadst4 }, // DCT_ADST = 2 + { fadst4, fadst4 } // ADST_ADST = 3 }; static const transform_2d FHT_8[] = { - { fdct8, fdct8 }, // DCT_DCT = 0 - { fadst8, fdct8 }, // ADST_DCT = 1 - { fdct8, fadst8 }, // DCT_ADST = 2 - { fadst8, fadst8 } // ADST_ADST = 3 + { vp10_fdct8, vp10_fdct8 }, // DCT_DCT = 0 + { fadst8, vp10_fdct8 }, // ADST_DCT = 1 + { vp10_fdct8, fadst8 }, // DCT_ADST = 2 + { fadst8, fadst8 } // ADST_ADST = 3 }; static const transform_2d FHT_16[] = { - { fdct16, fdct16 }, // DCT_DCT = 0 - { fadst16, fdct16 }, // ADST_DCT = 1 - { fdct16, fadst16 }, // DCT_ADST = 2 - { fadst16, fadst16 } // ADST_ADST = 3 + { vp10_fdct16, vp10_fdct16 }, // DCT_DCT = 0 + { fadst16, vp10_fdct16 }, // ADST_DCT = 1 + { vp10_fdct16, fadst16 }, // DCT_ADST = 2 + { fadst16, fadst16 } // ADST_ADST = 3 }; void vp10_fht4x4_c(const int16_t *input, tran_low_t *output, @@ -1123,7 +1124,7 @@ void vp10_fdct8x8_quant_c(const int16_t *input, int stride, // Rows for (i = 0; i < 8; ++i) { - fdct8(&intermediate[i * 8], &coeff_ptr[i * 8]); + vp10_fdct8(&intermediate[i * 8], &coeff_ptr[i * 8]); for (j = 0; j < 8; ++j) coeff_ptr[j + i * 8] /= 2; } diff --git a/vp10/encoder/dct.h b/vp10/encoder/dct.h new file mode 100644 index 000000000..ab0db93eb --- /dev/null +++ b/vp10/encoder/dct.h @@ -0,0 +1,28 @@ +/* + * 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. + */ +#ifndef VP10_ENCODER_DCT_H_ +#define VP10_ENCODER_DCT_H_ + +#include "vpx_dsp/vpx_dsp_common.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void vp10_fdct4(const tran_low_t *input, tran_low_t *output); +void vp10_fdct8(const tran_low_t *input, tran_low_t *output); +void vp10_fdct16(const tran_low_t *input, tran_low_t *output); +void vp10_fdct32_local(const tran_low_t *input, tran_low_t *output); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // VP10_ENCODER_DCT_H_ -- cgit v1.2.3