| Index: source/libvpx/vp9/encoder/vp9_dct.c
|
| ===================================================================
|
| --- source/libvpx/vp9/encoder/vp9_dct.c (revision 278778)
|
| +++ source/libvpx/vp9/encoder/vp9_dct.c (working copy)
|
| @@ -43,6 +43,17 @@
|
| output[3] = fdct_round_shift(temp2);
|
| }
|
|
|
| +void vp9_fdct4x4_1_c(const int16_t *input, int16_t *output, int stride) {
|
| + int r, c;
|
| + int16_t sum = 0;
|
| + for (r = 0; r < 4; ++r)
|
| + for (c = 0; c < 4; ++c)
|
| + sum += input[r * stride + c];
|
| +
|
| + output[0] = sum << 1;
|
| + output[1] = 0;
|
| +}
|
| +
|
| void vp9_fdct4x4_c(const int16_t *input, int16_t *output, int stride) {
|
| // The 2D transform is done with two passes which are actually pretty
|
| // similar. In the first one, we transform the columns and transpose
|
| @@ -240,6 +251,17 @@
|
| output[7] = fdct_round_shift(t3);
|
| }
|
|
|
| +void vp9_fdct8x8_1_c(const int16_t *input, int16_t *output, int stride) {
|
| + int r, c;
|
| + int16_t sum = 0;
|
| + for (r = 0; r < 8; ++r)
|
| + for (c = 0; c < 8; ++c)
|
| + sum += input[r * stride + c];
|
| +
|
| + output[0] = sum;
|
| + output[1] = 0;
|
| +}
|
| +
|
| void vp9_fdct8x8_c(const int16_t *input, int16_t *final_output, int stride) {
|
| int i, j;
|
| int16_t intermediate[64];
|
| @@ -311,6 +333,17 @@
|
| }
|
| }
|
|
|
| +void vp9_fdct16x16_1_c(const int16_t *input, int16_t *output, int stride) {
|
| + int r, c;
|
| + int16_t sum = 0;
|
| + for (r = 0; r < 16; ++r)
|
| + for (c = 0; c < 16; ++c)
|
| + sum += input[r * stride + c];
|
| +
|
| + output[0] = sum >> 1;
|
| + output[1] = 0;
|
| +}
|
| +
|
| void vp9_fdct16x16_c(const int16_t *input, int16_t *output, int stride) {
|
| // The 2D transform is done with two passes which are actually pretty
|
| // similar. In the first one, we transform the columns and transpose
|
| @@ -445,20 +478,20 @@
|
| step3[7] = step1[7] + step2[4];
|
| // step 4
|
| temp1 = step3[1] * -cospi_8_64 + step3[6] * cospi_24_64;
|
| - temp2 = step3[2] * -cospi_24_64 - step3[5] * cospi_8_64;
|
| + temp2 = step3[2] * cospi_24_64 + step3[5] * cospi_8_64;
|
| step2[1] = fdct_round_shift(temp1);
|
| step2[2] = fdct_round_shift(temp2);
|
| - temp1 = step3[2] * -cospi_8_64 + step3[5] * cospi_24_64;
|
| + temp1 = step3[2] * cospi_8_64 - step3[5] * cospi_24_64;
|
| temp2 = step3[1] * cospi_24_64 + step3[6] * cospi_8_64;
|
| step2[5] = fdct_round_shift(temp1);
|
| step2[6] = fdct_round_shift(temp2);
|
| // step 5
|
| step1[0] = step3[0] + step2[1];
|
| step1[1] = step3[0] - step2[1];
|
| - step1[2] = step3[3] - step2[2];
|
| - step1[3] = step3[3] + step2[2];
|
| - step1[4] = step3[4] + step2[5];
|
| - step1[5] = step3[4] - step2[5];
|
| + step1[2] = step3[3] + step2[2];
|
| + step1[3] = step3[3] - step2[2];
|
| + step1[4] = step3[4] - step2[5];
|
| + step1[5] = step3[4] + step2[5];
|
| step1[6] = step3[7] - step2[6];
|
| step1[7] = step3[7] + step2[6];
|
| // step 6
|
| @@ -755,10 +788,10 @@
|
|
|
| // step 4
|
| temp1 = step3[1] * -cospi_8_64 + step3[6] * cospi_24_64;
|
| - temp2 = step3[2] * -cospi_24_64 - step3[5] * cospi_8_64;
|
| + temp2 = step3[2] * cospi_24_64 + step3[5] * cospi_8_64;
|
| step2[1] = fdct_round_shift(temp1);
|
| step2[2] = fdct_round_shift(temp2);
|
| - temp1 = step3[2] * -cospi_8_64 + step3[5] * cospi_24_64;
|
| + temp1 = step3[2] * cospi_8_64 - step3[5] * cospi_24_64;
|
| temp2 = step3[1] * cospi_24_64 + step3[6] * cospi_8_64;
|
| step2[5] = fdct_round_shift(temp1);
|
| step2[6] = fdct_round_shift(temp2);
|
| @@ -766,10 +799,10 @@
|
| // step 5
|
| step1[0] = step3[0] + step2[1];
|
| step1[1] = step3[0] - step2[1];
|
| - step1[2] = step3[3] - step2[2];
|
| - step1[3] = step3[3] + step2[2];
|
| - step1[4] = step3[4] + step2[5];
|
| - step1[5] = step3[4] - step2[5];
|
| + step1[2] = step3[3] + step2[2];
|
| + step1[3] = step3[3] - step2[2];
|
| + step1[4] = step3[4] - step2[5];
|
| + step1[5] = step3[4] + step2[5];
|
| step1[6] = step3[7] - step2[6];
|
| step1[7] = step3[7] + step2[6];
|
|
|
| @@ -1329,6 +1362,17 @@
|
| output[31] = dct_32_round(step[31] * cospi_31_64 + step[16] * -cospi_1_64);
|
| }
|
|
|
| +void vp9_fdct32x32_1_c(const int16_t *input, int16_t *output, int stride) {
|
| + int r, c;
|
| + int16_t sum = 0;
|
| + for (r = 0; r < 32; ++r)
|
| + for (c = 0; c < 32; ++c)
|
| + sum += input[r * stride + c];
|
| +
|
| + output[0] = sum >> 3;
|
| + output[1] = 0;
|
| +}
|
| +
|
| void vp9_fdct32x32_c(const int16_t *input, int16_t *out, int stride) {
|
| int i, j;
|
| int output[32 * 32];
|
|
|