| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 temp1 = step[2] * cospi_24_64 + step[3] * cospi_8_64; | 40 temp1 = step[2] * cospi_24_64 + step[3] * cospi_8_64; |
| 41 temp2 = -step[2] * cospi_8_64 + step[3] * cospi_24_64; | 41 temp2 = -step[2] * cospi_8_64 + step[3] * cospi_24_64; |
| 42 output[1] = fdct_round_shift(temp1); | 42 output[1] = fdct_round_shift(temp1); |
| 43 output[3] = fdct_round_shift(temp2); | 43 output[3] = fdct_round_shift(temp2); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void vp9_fdct4x4_c(const int16_t *input, int16_t *output, int stride) { | 46 void vp9_fdct4x4_c(const int16_t *input, int16_t *output, int stride) { |
| 47 // The 2D transform is done with two passes which are actually pretty | 47 // The 2D transform is done with two passes which are actually pretty |
| 48 // similar. In the first one, we transform the columns and transpose | 48 // similar. In the first one, we transform the columns and transpose |
| 49 // the results. In the second one, we transform the rows. To achieve that, | 49 // the results. In the second one, we transform the rows. To achieve that, |
| 50 // as the first pass results are transposed, we tranpose the columns (that | 50 // as the first pass results are transposed, we transpose the columns (that |
| 51 // is the transposed rows) and transpose the results (so that it goes back | 51 // is the transposed rows) and transpose the results (so that it goes back |
| 52 // in normal/row positions). | 52 // in normal/row positions). |
| 53 int pass; | 53 int pass; |
| 54 // We need an intermediate buffer between passes. | 54 // We need an intermediate buffer between passes. |
| 55 int16_t intermediate[4 * 4]; | 55 int16_t intermediate[4 * 4]; |
| 56 const int16_t *in = input; | 56 const int16_t *in = input; |
| 57 int16_t *out = intermediate; | 57 int16_t *out = intermediate; |
| 58 // Do the two transform/transpose passes | 58 // Do the two transform/transpose passes |
| 59 for (pass = 0; pass < 2; ++pass) { | 59 for (pass = 0; pass < 2; ++pass) { |
| 60 /*canbe16*/ int input[4]; | 60 /*canbe16*/ int input[4]; |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 fdct8(&intermediate[i * 8], &final_output[i * 8]); | 308 fdct8(&intermediate[i * 8], &final_output[i * 8]); |
| 309 for (j = 0; j < 8; ++j) | 309 for (j = 0; j < 8; ++j) |
| 310 final_output[j + i * 8] /= 2; | 310 final_output[j + i * 8] /= 2; |
| 311 } | 311 } |
| 312 } | 312 } |
| 313 | 313 |
| 314 void vp9_fdct16x16_c(const int16_t *input, int16_t *output, int stride) { | 314 void vp9_fdct16x16_c(const int16_t *input, int16_t *output, int stride) { |
| 315 // The 2D transform is done with two passes which are actually pretty | 315 // The 2D transform is done with two passes which are actually pretty |
| 316 // similar. In the first one, we transform the columns and transpose | 316 // similar. In the first one, we transform the columns and transpose |
| 317 // the results. In the second one, we transform the rows. To achieve that, | 317 // the results. In the second one, we transform the rows. To achieve that, |
| 318 // as the first pass results are transposed, we tranpose the columns (that | 318 // as the first pass results are transposed, we transpose the columns (that |
| 319 // is the transposed rows) and transpose the results (so that it goes back | 319 // is the transposed rows) and transpose the results (so that it goes back |
| 320 // in normal/row positions). | 320 // in normal/row positions). |
| 321 int pass; | 321 int pass; |
| 322 // We need an intermediate buffer between passes. | 322 // We need an intermediate buffer between passes. |
| 323 int16_t intermediate[256]; | 323 int16_t intermediate[256]; |
| 324 const int16_t *in = input; | 324 const int16_t *in = input; |
| 325 int16_t *out = intermediate; | 325 int16_t *out = intermediate; |
| 326 // Do the two transform/transpose passes | 326 // Do the two transform/transpose passes |
| 327 for (pass = 0; pass < 2; ++pass) { | 327 for (pass = 0; pass < 2; ++pass) { |
| 328 /*canbe16*/ int step1[8]; | 328 /*canbe16*/ int step1[8]; |
| (...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1377 // Rows | 1377 // Rows |
| 1378 for (i = 0; i < 32; ++i) { | 1378 for (i = 0; i < 32; ++i) { |
| 1379 int temp_in[32], temp_out[32]; | 1379 int temp_in[32], temp_out[32]; |
| 1380 for (j = 0; j < 32; ++j) | 1380 for (j = 0; j < 32; ++j) |
| 1381 temp_in[j] = output[j + i * 32]; | 1381 temp_in[j] = output[j + i * 32]; |
| 1382 fdct32(temp_in, temp_out, 1); | 1382 fdct32(temp_in, temp_out, 1); |
| 1383 for (j = 0; j < 32; ++j) | 1383 for (j = 0; j < 32; ++j) |
| 1384 out[j + i * 32] = temp_out[j]; | 1384 out[j + i * 32] = temp_out[j]; |
| 1385 } | 1385 } |
| 1386 } | 1386 } |
| OLD | NEW |