From: Johann Date: Tue, 1 Sep 2015 19:50:23 +0000 (-0700) Subject: Remove unused functions from test files X-Git-Tag: v1.5.0~201^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=906ec30c1099e562bb60a400ab85d5485b04877f;p=libvpx Remove unused functions from test files Change-Id: Id479a83fe3cb7d989a490328b3ff526530777f81 --- diff --git a/test/dct16x16_test.cc b/test/dct16x16_test.cc index e9de76ada..332210daa 100644 --- a/test/dct16x16_test.cc +++ b/test/dct16x16_test.cc @@ -40,30 +40,6 @@ static int round(double x) { #endif const int kNumCoeffs = 256; -const double PI = 3.1415926535898; -void reference2_16x16_idct_2d(double *input, double *output) { - double x; - for (int l = 0; l < 16; ++l) { - for (int k = 0; k < 16; ++k) { - double s = 0; - for (int i = 0; i < 16; ++i) { - for (int j = 0; j < 16; ++j) { - x = cos(PI * j * (l + 0.5) / 16.0) * - cos(PI * i * (k + 0.5) / 16.0) * - input[i * 16 + j] / 256; - if (i != 0) - x *= sqrt(2.0); - if (j != 0) - x *= sqrt(2.0); - s += x; - } - } - output[k*16+l] = s; - } - } -} - - const double C1 = 0.995184726672197; const double C2 = 0.98078528040323; const double C3 = 0.956940335732209; diff --git a/test/idct8x8_test.cc b/test/idct8x8_test.cc index 987ba7536..7f9d751d6 100644 --- a/test/idct8x8_test.cc +++ b/test/idct8x8_test.cc @@ -67,43 +67,6 @@ void reference_dct_2d(int16_t input[64], double output[64]) { output[i] *= 2; } -void reference_idct_1d(double input[8], double output[8]) { - const double kPi = 3.141592653589793238462643383279502884; - const double kSqrt2 = 1.414213562373095048801688724209698; - for (int k = 0; k < 8; k++) { - output[k] = 0.0; - for (int n = 0; n < 8; n++) { - output[k] += input[n]*cos(kPi*(2*k+1)*n/16.0); - if (n == 0) - output[k] = output[k]/kSqrt2; - } - } -} - -void reference_idct_2d(double input[64], int16_t output[64]) { - double out[64], out2[64]; - // First transform rows - for (int i = 0; i < 8; ++i) { - double temp_in[8], temp_out[8]; - for (int j = 0; j < 8; ++j) - temp_in[j] = input[j + i*8]; - reference_idct_1d(temp_in, temp_out); - for (int j = 0; j < 8; ++j) - out[j + i*8] = temp_out[j]; - } - // Then transform columns - for (int i = 0; i < 8; ++i) { - double temp_in[8], temp_out[8]; - for (int j = 0; j < 8; ++j) - temp_in[j] = out[j*8 + i]; - reference_idct_1d(temp_in, temp_out); - for (int j = 0; j < 8; ++j) - out2[j*8 + i] = temp_out[j]; - } - for (int i = 0; i < 64; ++i) - output[i] = round(out2[i]/32); -} - TEST(VP9Idct8x8Test, AccuracyCheck) { ACMRandom rnd(ACMRandom::DeterministicSeed()); const int count_test_block = 10000;