Commit c6ad70d5 authored by Dmitry Kovalev's avatar Dmitry Kovalev
Browse files

Giving consistent names to IDCT 8x8 functions.

Renames:
  vp9_short_idct8x8_add    -> vp9_idct8x8_64_add
  vp9_short_idct8x8_1_add  -> vp9_idct8x8_1_add
  vp9_short_idct8x8_10_add -> vp9_idct8x8_10_add
  vp9_idct_add_8x8         -> vp9_idct8x8_add

Change-Id: Ifb8d3a45b4c0397aa805b30463f3d14581bf72c1
parent 5c0b1086
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
extern "C" { extern "C" {
#include "vp9/common/vp9_entropy.h" #include "vp9/common/vp9_entropy.h"
#include "./vp9_rtcd.h" #include "./vp9_rtcd.h"
void vp9_short_idct8x8_add_c(int16_t *input, uint8_t *output, int pitch); void vp9_idct8x8_64_add_c(int16_t *input, uint8_t *output, int pitch);
} }
#include "vpx/vpx_integer.h" #include "vpx/vpx_integer.h"
...@@ -296,7 +296,7 @@ using std::tr1::make_tuple; ...@@ -296,7 +296,7 @@ using std::tr1::make_tuple;
INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_CASE_P(
C, FwdTrans8x8DCT, C, FwdTrans8x8DCT,
::testing::Values( ::testing::Values(
make_tuple(&vp9_short_fdct8x8_c, &vp9_short_idct8x8_add_c, 0))); make_tuple(&vp9_short_fdct8x8_c, &vp9_idct8x8_64_add_c, 0)));
INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_CASE_P(
C, FwdTrans8x8HT, C, FwdTrans8x8HT,
::testing::Values( ::testing::Values(
...@@ -309,7 +309,7 @@ INSTANTIATE_TEST_CASE_P( ...@@ -309,7 +309,7 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_CASE_P(
SSE2, FwdTrans8x8DCT, SSE2, FwdTrans8x8DCT,
::testing::Values( ::testing::Values(
make_tuple(&vp9_short_fdct8x8_sse2, &vp9_short_idct8x8_add_sse2, 0))); make_tuple(&vp9_short_fdct8x8_sse2, &vp9_idct8x8_64_add_sse2, 0)));
INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_CASE_P(
SSE2, FwdTrans8x8HT, SSE2, FwdTrans8x8HT,
::testing::Values( ::testing::Values(
......
...@@ -126,7 +126,7 @@ TEST(VP9Idct8x8Test, AccuracyCheck) { ...@@ -126,7 +126,7 @@ TEST(VP9Idct8x8Test, AccuracyCheck) {
reference_dct_2d(input, output_r); reference_dct_2d(input, output_r);
for (int j = 0; j < 64; ++j) for (int j = 0; j < 64; ++j)
coeff[j] = round(output_r[j]); coeff[j] = round(output_r[j]);
vp9_short_idct8x8_add_c(coeff, dst, 8); vp9_idct8x8_64_add_c(coeff, dst, 8);
for (int j = 0; j < 64; ++j) { for (int j = 0; j < 64; ++j) {
const int diff = dst[j] - src[j]; const int diff = dst[j] - src[j];
const int error = diff * diff; const int error = diff * diff;
......
...@@ -8,21 +8,21 @@ ...@@ -8,21 +8,21 @@
; ;
EXPORT |vp9_short_idct8x8_1_add_neon| EXPORT |vp9_idct8x8_1_add_neon|
ARM ARM
REQUIRE8 REQUIRE8
PRESERVE8 PRESERVE8
AREA ||.text||, CODE, READONLY, ALIGN=2 AREA ||.text||, CODE, READONLY, ALIGN=2
;void vp9_short_idct8x8_1_add_neon(int16_t *input, uint8_t *dest, ;void vp9_idct8x8_1_add_neon(int16_t *input, uint8_t *dest,
; int dest_stride) ; int dest_stride)
; ;
; r0 int16_t input ; r0 int16_t input
; r1 uint8_t *dest ; r1 uint8_t *dest
; r2 int dest_stride) ; r2 int dest_stride)
|vp9_short_idct8x8_1_add_neon| PROC |vp9_idct8x8_1_add_neon| PROC
ldrsh r0, [r0] ldrsh r0, [r0]
; generate cospi_16_64 = 11585 ; generate cospi_16_64 = 11585
...@@ -83,6 +83,6 @@ ...@@ -83,6 +83,6 @@
vst1.64 {d31}, [r12], r2 vst1.64 {d31}, [r12], r2
bx lr bx lr
ENDP ; |vp9_short_idct8x8_1_add_neon| ENDP ; |vp9_idct8x8_1_add_neon|
END END
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
; be found in the AUTHORS file in the root of the source tree. ; be found in the AUTHORS file in the root of the source tree.
; ;
EXPORT |vp9_short_idct8x8_add_neon| EXPORT |vp9_idct8x8_64_add_neon|
EXPORT |vp9_short_idct8x8_10_add_neon| EXPORT |vp9_idct8x8_10_add_neon|
ARM ARM
REQUIRE8 REQUIRE8
PRESERVE8 PRESERVE8
...@@ -198,13 +198,13 @@ ...@@ -198,13 +198,13 @@
MEND MEND
AREA Block, CODE, READONLY ; name this block of code AREA Block, CODE, READONLY ; name this block of code
;void vp9_short_idct8x8_add_neon(int16_t *input, uint8_t *dest, int dest_stride) ;void vp9_idct8x8_64_add_neon(int16_t *input, uint8_t *dest, int dest_stride)
; ;
; r0 int16_t input ; r0 int16_t input
; r1 uint8_t *dest ; r1 uint8_t *dest
; r2 int dest_stride) ; r2 int dest_stride)
|vp9_short_idct8x8_add_neon| PROC |vp9_idct8x8_64_add_neon| PROC
push {r4-r9} push {r4-r9}
vpush {d8-d15} vpush {d8-d15}
vld1.s16 {q8,q9}, [r0]! vld1.s16 {q8,q9}, [r0]!
...@@ -308,15 +308,15 @@ ...@@ -308,15 +308,15 @@
vpop {d8-d15} vpop {d8-d15}
pop {r4-r9} pop {r4-r9}
bx lr bx lr
ENDP ; |vp9_short_idct8x8_add_neon| ENDP ; |vp9_idct8x8_64_add_neon|
;void vp9_short_idct8x8_10_add_neon(int16_t *input, uint8_t *dest, int dest_stride) ;void vp9_idct8x8_10_add_neon(int16_t *input, uint8_t *dest, int dest_stride)
; ;
; r0 int16_t input ; r0 int16_t input
; r1 uint8_t *dest ; r1 uint8_t *dest
; r2 int dest_stride) ; r2 int dest_stride)
|vp9_short_idct8x8_10_add_neon| PROC |vp9_idct8x8_10_add_neon| PROC
push {r4-r9} push {r4-r9}
vpush {d8-d15} vpush {d8-d15}
vld1.s16 {q8,q9}, [r0]! vld1.s16 {q8,q9}, [r0]!
...@@ -514,6 +514,6 @@ ...@@ -514,6 +514,6 @@
vpop {d8-d15} vpop {d8-d15}
pop {r4-r9} pop {r4-r9}
bx lr bx lr
ENDP ; |vp9_short_idct8x8_10_add_neon| ENDP ; |vp9_idct8x8_10_add_neon|
END END
...@@ -201,7 +201,7 @@ static void idct8_1d(int16_t *input, int16_t *output) { ...@@ -201,7 +201,7 @@ static void idct8_1d(int16_t *input, int16_t *output) {
output[7] = step1[0] - step1[7]; output[7] = step1[0] - step1[7];
} }
void vp9_short_idct8x8_add_c(int16_t *input, uint8_t *dest, int dest_stride) { void vp9_idct8x8_64_add_c(int16_t *input, uint8_t *dest, int dest_stride) {
int16_t out[8 * 8]; int16_t out[8 * 8];
int16_t *outptr = out; int16_t *outptr = out;
int i, j; int i, j;
...@@ -225,7 +225,7 @@ void vp9_short_idct8x8_add_c(int16_t *input, uint8_t *dest, int dest_stride) { ...@@ -225,7 +225,7 @@ void vp9_short_idct8x8_add_c(int16_t *input, uint8_t *dest, int dest_stride) {
} }
} }
void vp9_short_idct8x8_1_add_c(int16_t *input, uint8_t *dest, int dest_stride) { void vp9_idct8x8_1_add_c(int16_t *input, uint8_t *dest, int dest_stride) {
int i, j; int i, j;
int a1; int a1;
int16_t out = dct_const_round_shift(input[0] * cospi_16_64); int16_t out = dct_const_round_shift(input[0] * cospi_16_64);
...@@ -420,7 +420,7 @@ void vp9_short_iht8x8_add_c(int16_t *input, uint8_t *dest, int dest_stride, ...@@ -420,7 +420,7 @@ void vp9_short_iht8x8_add_c(int16_t *input, uint8_t *dest, int dest_stride,
+ dest[j * dest_stride + i]); } + dest[j * dest_stride + i]); }
} }
void vp9_short_idct8x8_10_add_c(int16_t *input, uint8_t *dest, void vp9_idct8x8_10_add_c(int16_t *input, uint8_t *dest,
int dest_stride) { int dest_stride) {
int16_t out[8 * 8] = { 0 }; int16_t out[8 * 8] = { 0 };
int16_t *outptr = out; int16_t *outptr = out;
...@@ -1301,7 +1301,7 @@ void vp9_iwht4x4_add(int16_t *input, uint8_t *dest, int stride, int eob) { ...@@ -1301,7 +1301,7 @@ void vp9_iwht4x4_add(int16_t *input, uint8_t *dest, int stride, int eob) {
vp9_iwht4x4_1_add(input, dest, stride); vp9_iwht4x4_1_add(input, dest, stride);
} }
void vp9_idct_add_8x8(int16_t *input, uint8_t *dest, int stride, int eob) { void vp9_idct8x8_add(int16_t *input, uint8_t *dest, int stride, int eob) {
// If dc is 1, then input[0] is the reconstructed value, do not need // If dc is 1, then input[0] is the reconstructed value, do not need
// dequantization. Also, when dc is 1, dc is counted in eobs, namely eobs >=1. // dequantization. Also, when dc is 1, dc is counted in eobs, namely eobs >=1.
...@@ -1312,11 +1312,11 @@ void vp9_idct_add_8x8(int16_t *input, uint8_t *dest, int stride, int eob) { ...@@ -1312,11 +1312,11 @@ void vp9_idct_add_8x8(int16_t *input, uint8_t *dest, int stride, int eob) {
if (eob) { if (eob) {
if (eob == 1) if (eob == 1)
// DC only DCT coefficient // DC only DCT coefficient
vp9_short_idct8x8_1_add(input, dest, stride); vp9_idct8x8_1_add(input, dest, stride);
else if (eob <= 10) else if (eob <= 10)
vp9_short_idct8x8_10_add(input, dest, stride); vp9_idct8x8_10_add(input, dest, stride);
else else
vp9_short_idct8x8_add(input, dest, stride); vp9_idct8x8_64_add(input, dest, stride);
} }
} }
...@@ -1355,7 +1355,7 @@ void vp9_iht_add(TX_TYPE tx_type, int16_t *input, uint8_t *dest, int stride, ...@@ -1355,7 +1355,7 @@ void vp9_iht_add(TX_TYPE tx_type, int16_t *input, uint8_t *dest, int stride,
void vp9_iht_add_8x8(TX_TYPE tx_type, int16_t *input, uint8_t *dest, void vp9_iht_add_8x8(TX_TYPE tx_type, int16_t *input, uint8_t *dest,
int stride, int eob) { int stride, int eob) {
if (tx_type == DCT_DCT) { if (tx_type == DCT_DCT) {
vp9_idct_add_8x8(input, dest, stride, eob); vp9_idct8x8_add(input, dest, stride, eob);
} else { } else {
if (eob > 0) { if (eob > 0) {
vp9_short_iht8x8_add(input, dest, stride, tx_type); vp9_short_iht8x8_add(input, dest, stride, tx_type);
......
...@@ -90,7 +90,7 @@ typedef struct { ...@@ -90,7 +90,7 @@ typedef struct {
void vp9_idct4x4_add(int16_t *input, uint8_t *dest, int stride, int eob); void vp9_idct4x4_add(int16_t *input, uint8_t *dest, int stride, int eob);
void vp9_iwht4x4_add(int16_t *input, uint8_t *dest, int stride, int eob); void vp9_iwht4x4_add(int16_t *input, uint8_t *dest, int stride, int eob);
void vp9_idct_add_8x8(int16_t *input, uint8_t *dest, int stride, int eob); void vp9_idct8x8_add(int16_t *input, uint8_t *dest, int stride, int eob);
void vp9_idct_add_16x16(int16_t *input, uint8_t *dest, int stride, int eob); void vp9_idct_add_16x16(int16_t *input, uint8_t *dest, int stride, int eob);
void vp9_idct_add_32x32(int16_t *input, uint8_t *dest, int stride, int eob); void vp9_idct_add_32x32(int16_t *input, uint8_t *dest, int stride, int eob);
......
...@@ -273,14 +273,14 @@ specialize vp9_idct4x4_1_add sse2 neon ...@@ -273,14 +273,14 @@ specialize vp9_idct4x4_1_add sse2 neon
prototype void vp9_idct4x4_16_add "int16_t *input, uint8_t *dest, int dest_stride" prototype void vp9_idct4x4_16_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_idct4x4_16_add sse2 neon specialize vp9_idct4x4_16_add sse2 neon
prototype void vp9_short_idct8x8_1_add "int16_t *input, uint8_t *dest, int dest_stride" prototype void vp9_idct8x8_1_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_idct8x8_1_add sse2 neon specialize vp9_idct8x8_1_add sse2 neon
prototype void vp9_short_idct8x8_add "int16_t *input, uint8_t *dest, int dest_stride" prototype void vp9_idct8x8_64_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_idct8x8_add sse2 neon specialize vp9_idct8x8_64_add sse2 neon
prototype void vp9_short_idct8x8_10_add "int16_t *input, uint8_t *dest, int dest_stride" prototype void vp9_idct8x8_10_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_idct8x8_10_add sse2 neon specialize vp9_idct8x8_10_add sse2 neon
prototype void vp9_short_idct16x16_1_add "int16_t *input, uint8_t *dest, int dest_stride" prototype void vp9_short_idct16x16_1_add "int16_t *input, uint8_t *dest, int dest_stride"
specialize vp9_short_idct16x16_1_add sse2 neon specialize vp9_short_idct16x16_1_add sse2 neon
......
...@@ -529,7 +529,7 @@ void vp9_short_iht4x4_add_sse2(int16_t *input, uint8_t *dest, int stride, ...@@ -529,7 +529,7 @@ void vp9_short_iht4x4_add_sse2(int16_t *input, uint8_t *dest, int stride,
dest += stride; \ dest += stride; \
} }
void vp9_short_idct8x8_add_sse2(int16_t *input, uint8_t *dest, int stride) { void vp9_idct8x8_64_add_sse2(int16_t *input, uint8_t *dest, int stride) {
const __m128i zero = _mm_setzero_si128(); const __m128i zero = _mm_setzero_si128();
const __m128i rounding = _mm_set1_epi32(DCT_CONST_ROUNDING); const __m128i rounding = _mm_set1_epi32(DCT_CONST_ROUNDING);
const __m128i final_rounding = _mm_set1_epi16(1<<4); const __m128i final_rounding = _mm_set1_epi16(1<<4);
...@@ -597,7 +597,7 @@ void vp9_short_idct8x8_add_sse2(int16_t *input, uint8_t *dest, int stride) { ...@@ -597,7 +597,7 @@ void vp9_short_idct8x8_add_sse2(int16_t *input, uint8_t *dest, int stride) {
RECON_AND_STORE(dest, in7); RECON_AND_STORE(dest, in7);
} }
void vp9_short_idct8x8_1_add_sse2(int16_t *input, uint8_t *dest, int stride) { void vp9_idct8x8_1_add_sse2(int16_t *input, uint8_t *dest, int stride) {
__m128i dc_value; __m128i dc_value;
const __m128i zero = _mm_setzero_si128(); const __m128i zero = _mm_setzero_si128();
int a; int a;
...@@ -985,7 +985,7 @@ void vp9_short_iht8x8_add_sse2(int16_t *input, uint8_t *dest, int stride, ...@@ -985,7 +985,7 @@ void vp9_short_iht8x8_add_sse2(int16_t *input, uint8_t *dest, int stride,
RECON_AND_STORE(dest, in[7]); RECON_AND_STORE(dest, in[7]);
} }
void vp9_short_idct8x8_10_add_sse2(int16_t *input, uint8_t *dest, int stride) { void vp9_idct8x8_10_add_sse2(int16_t *input, uint8_t *dest, int stride) {
const __m128i zero = _mm_setzero_si128(); const __m128i zero = _mm_setzero_si128();
const __m128i rounding = _mm_set1_epi32(DCT_CONST_ROUNDING); const __m128i rounding = _mm_set1_epi32(DCT_CONST_ROUNDING);
const __m128i final_rounding = _mm_set1_epi16(1<<4); const __m128i final_rounding = _mm_set1_epi16(1<<4);
......
...@@ -460,7 +460,7 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize, ...@@ -460,7 +460,7 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize,
vp9_idct_add_16x16(dqcoeff, dst, pd->dst.stride, pd->eobs[block]); vp9_idct_add_16x16(dqcoeff, dst, pd->dst.stride, pd->eobs[block]);
break; break;
case TX_8X8: case TX_8X8:
vp9_idct_add_8x8(dqcoeff, dst, pd->dst.stride, pd->eobs[block]); vp9_idct8x8_add(dqcoeff, dst, pd->dst.stride, pd->eobs[block]);
break; break;
case TX_4X4: case TX_4X4:
// this is like vp9_short_idct4x4 but has a special case around eob<=1 // this is like vp9_short_idct4x4 but has a special case around eob<=1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment