Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Unified Diff: source/libvpx/test/idct8x8_test.cc

Issue 1339513003: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/test/frame_size_tests.cc ('k') | source/libvpx/test/invalid_file_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/test/idct8x8_test.cc
diff --git a/source/libvpx/test/idct8x8_test.cc b/source/libvpx/test/idct8x8_test.cc
index 987ba7536fcd95a303d7ad783f6dc16ff351c127..7f9d751d650a3ac471553285e96e359f1432e40b 100644
--- a/source/libvpx/test/idct8x8_test.cc
+++ b/source/libvpx/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;
« no previous file with comments | « source/libvpx/test/frame_size_tests.cc ('k') | source/libvpx/test/invalid_file_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698