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 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 for (j = 0; j < 8; ++j) | 1269 for (j = 0; j < 8; ++j) |
1270 zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1]; | 1270 zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1]; |
1271 for (j = 0; j < 4; ++j) | 1271 for (j = 0; j < 4; ++j) |
1272 zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1]; | 1272 zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1]; |
1273 for (j = 0; j < 2; ++j) | 1273 for (j = 0; j < 2; ++j) |
1274 zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1]; | 1274 zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1]; |
1275 | 1275 |
1276 if (zero_coeff[0] | zero_coeff[1]) | 1276 if (zero_coeff[0] | zero_coeff[1]) |
1277 idct32(input, outptr); | 1277 idct32(input, outptr); |
1278 else | 1278 else |
1279 vpx_memset(outptr, 0, sizeof(tran_low_t) * 32); | 1279 memset(outptr, 0, sizeof(tran_low_t) * 32); |
1280 input += 32; | 1280 input += 32; |
1281 outptr += 32; | 1281 outptr += 32; |
1282 } | 1282 } |
1283 | 1283 |
1284 // Columns | 1284 // Columns |
1285 for (i = 0; i < 32; ++i) { | 1285 for (i = 0; i < 32; ++i) { |
1286 for (j = 0; j < 32; ++j) | 1286 for (j = 0; j < 32; ++j) |
1287 temp_in[j] = out[j * 32 + i]; | 1287 temp_in[j] = out[j * 32 + i]; |
1288 idct32(temp_in, temp_out); | 1288 idct32(temp_in, temp_out); |
1289 for (j = 0; j < 32; ++j) { | 1289 for (j = 0; j < 32; ++j) { |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1669 static void highbd_iadst4(const tran_low_t *input, tran_low_t *output, int bd) { | 1669 static void highbd_iadst4(const tran_low_t *input, tran_low_t *output, int bd) { |
1670 tran_high_t s0, s1, s2, s3, s4, s5, s6, s7; | 1670 tran_high_t s0, s1, s2, s3, s4, s5, s6, s7; |
1671 | 1671 |
1672 tran_low_t x0 = input[0]; | 1672 tran_low_t x0 = input[0]; |
1673 tran_low_t x1 = input[1]; | 1673 tran_low_t x1 = input[1]; |
1674 tran_low_t x2 = input[2]; | 1674 tran_low_t x2 = input[2]; |
1675 tran_low_t x3 = input[3]; | 1675 tran_low_t x3 = input[3]; |
1676 (void) bd; | 1676 (void) bd; |
1677 | 1677 |
1678 if (!(x0 | x1 | x2 | x3)) { | 1678 if (!(x0 | x1 | x2 | x3)) { |
1679 vpx_memset(output, 0, 4 * sizeof(*output)); | 1679 memset(output, 0, 4 * sizeof(*output)); |
1680 return; | 1680 return; |
1681 } | 1681 } |
1682 | 1682 |
1683 s0 = sinpi_1_9 * x0; | 1683 s0 = sinpi_1_9 * x0; |
1684 s1 = sinpi_2_9 * x0; | 1684 s1 = sinpi_2_9 * x0; |
1685 s2 = sinpi_3_9 * x1; | 1685 s2 = sinpi_3_9 * x1; |
1686 s3 = sinpi_4_9 * x2; | 1686 s3 = sinpi_4_9 * x2; |
1687 s4 = sinpi_1_9 * x2; | 1687 s4 = sinpi_1_9 * x2; |
1688 s5 = sinpi_2_9 * x3; | 1688 s5 = sinpi_2_9 * x3; |
1689 s6 = sinpi_4_9 * x3; | 1689 s6 = sinpi_4_9 * x3; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1745 tran_low_t x1 = input[0]; | 1745 tran_low_t x1 = input[0]; |
1746 tran_low_t x2 = input[5]; | 1746 tran_low_t x2 = input[5]; |
1747 tran_low_t x3 = input[2]; | 1747 tran_low_t x3 = input[2]; |
1748 tran_low_t x4 = input[3]; | 1748 tran_low_t x4 = input[3]; |
1749 tran_low_t x5 = input[4]; | 1749 tran_low_t x5 = input[4]; |
1750 tran_low_t x6 = input[1]; | 1750 tran_low_t x6 = input[1]; |
1751 tran_low_t x7 = input[6]; | 1751 tran_low_t x7 = input[6]; |
1752 (void) bd; | 1752 (void) bd; |
1753 | 1753 |
1754 if (!(x0 | x1 | x2 | x3 | x4 | x5 | x6 | x7)) { | 1754 if (!(x0 | x1 | x2 | x3 | x4 | x5 | x6 | x7)) { |
1755 vpx_memset(output, 0, 8 * sizeof(*output)); | 1755 memset(output, 0, 8 * sizeof(*output)); |
1756 return; | 1756 return; |
1757 } | 1757 } |
1758 | 1758 |
1759 // stage 1 | 1759 // stage 1 |
1760 s0 = cospi_2_64 * x0 + cospi_30_64 * x1; | 1760 s0 = cospi_2_64 * x0 + cospi_30_64 * x1; |
1761 s1 = cospi_30_64 * x0 - cospi_2_64 * x1; | 1761 s1 = cospi_30_64 * x0 - cospi_2_64 * x1; |
1762 s2 = cospi_10_64 * x2 + cospi_22_64 * x3; | 1762 s2 = cospi_10_64 * x2 + cospi_22_64 * x3; |
1763 s3 = cospi_22_64 * x2 - cospi_10_64 * x3; | 1763 s3 = cospi_22_64 * x2 - cospi_10_64 * x3; |
1764 s4 = cospi_18_64 * x4 + cospi_14_64 * x5; | 1764 s4 = cospi_18_64 * x4 + cospi_14_64 * x5; |
1765 s5 = cospi_14_64 * x4 - cospi_18_64 * x5; | 1765 s5 = cospi_14_64 * x4 - cospi_18_64 * x5; |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2088 tran_low_t x10 = input[5]; | 2088 tran_low_t x10 = input[5]; |
2089 tran_low_t x11 = input[10]; | 2089 tran_low_t x11 = input[10]; |
2090 tran_low_t x12 = input[3]; | 2090 tran_low_t x12 = input[3]; |
2091 tran_low_t x13 = input[12]; | 2091 tran_low_t x13 = input[12]; |
2092 tran_low_t x14 = input[1]; | 2092 tran_low_t x14 = input[1]; |
2093 tran_low_t x15 = input[14]; | 2093 tran_low_t x15 = input[14]; |
2094 (void) bd; | 2094 (void) bd; |
2095 | 2095 |
2096 if (!(x0 | x1 | x2 | x3 | x4 | x5 | x6 | x7 | x8 | 2096 if (!(x0 | x1 | x2 | x3 | x4 | x5 | x6 | x7 | x8 |
2097 | x9 | x10 | x11 | x12 | x13 | x14 | x15)) { | 2097 | x9 | x10 | x11 | x12 | x13 | x14 | x15)) { |
2098 vpx_memset(output, 0, 16 * sizeof(*output)); | 2098 memset(output, 0, 16 * sizeof(*output)); |
2099 return; | 2099 return; |
2100 } | 2100 } |
2101 | 2101 |
2102 // stage 1 | 2102 // stage 1 |
2103 s0 = x0 * cospi_1_64 + x1 * cospi_31_64; | 2103 s0 = x0 * cospi_1_64 + x1 * cospi_31_64; |
2104 s1 = x0 * cospi_31_64 - x1 * cospi_1_64; | 2104 s1 = x0 * cospi_31_64 - x1 * cospi_1_64; |
2105 s2 = x2 * cospi_5_64 + x3 * cospi_27_64; | 2105 s2 = x2 * cospi_5_64 + x3 * cospi_27_64; |
2106 s3 = x2 * cospi_27_64 - x3 * cospi_5_64; | 2106 s3 = x2 * cospi_27_64 - x3 * cospi_5_64; |
2107 s4 = x4 * cospi_9_64 + x5 * cospi_23_64; | 2107 s4 = x4 * cospi_9_64 + x5 * cospi_23_64; |
2108 s5 = x4 * cospi_23_64 - x5 * cospi_9_64; | 2108 s5 = x4 * cospi_23_64 - x5 * cospi_9_64; |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2705 for (j = 0; j < 8; ++j) | 2705 for (j = 0; j < 8; ++j) |
2706 zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1]; | 2706 zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1]; |
2707 for (j = 0; j < 4; ++j) | 2707 for (j = 0; j < 4; ++j) |
2708 zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1]; | 2708 zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1]; |
2709 for (j = 0; j < 2; ++j) | 2709 for (j = 0; j < 2; ++j) |
2710 zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1]; | 2710 zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1]; |
2711 | 2711 |
2712 if (zero_coeff[0] | zero_coeff[1]) | 2712 if (zero_coeff[0] | zero_coeff[1]) |
2713 highbd_idct32(input, outptr, bd); | 2713 highbd_idct32(input, outptr, bd); |
2714 else | 2714 else |
2715 vpx_memset(outptr, 0, sizeof(tran_low_t) * 32); | 2715 memset(outptr, 0, sizeof(tran_low_t) * 32); |
2716 input += 32; | 2716 input += 32; |
2717 outptr += 32; | 2717 outptr += 32; |
2718 } | 2718 } |
2719 | 2719 |
2720 // Columns | 2720 // Columns |
2721 for (i = 0; i < 32; ++i) { | 2721 for (i = 0; i < 32; ++i) { |
2722 for (j = 0; j < 32; ++j) | 2722 for (j = 0; j < 32; ++j) |
2723 temp_in[j] = out[j * 32 + i]; | 2723 temp_in[j] = out[j * 32 + i]; |
2724 highbd_idct32(temp_in, temp_out, bd); | 2724 highbd_idct32(temp_in, temp_out, bd); |
2725 for (j = 0; j < 32; ++j) { | 2725 for (j = 0; j < 32; ++j) { |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2857 | 2857 |
2858 void vp9_highbd_iht16x16_add(TX_TYPE tx_type, const tran_low_t *input, | 2858 void vp9_highbd_iht16x16_add(TX_TYPE tx_type, const tran_low_t *input, |
2859 uint8_t *dest, int stride, int eob, int bd) { | 2859 uint8_t *dest, int stride, int eob, int bd) { |
2860 if (tx_type == DCT_DCT) { | 2860 if (tx_type == DCT_DCT) { |
2861 vp9_highbd_idct16x16_add(input, dest, stride, eob, bd); | 2861 vp9_highbd_idct16x16_add(input, dest, stride, eob, bd); |
2862 } else { | 2862 } else { |
2863 vp9_highbd_iht16x16_256_add(input, dest, stride, tx_type, bd); | 2863 vp9_highbd_iht16x16_256_add(input, dest, stride, tx_type, bd); |
2864 } | 2864 } |
2865 } | 2865 } |
2866 #endif // CONFIG_VP9_HIGHBITDEPTH | 2866 #endif // CONFIG_VP9_HIGHBITDEPTH |
OLD | NEW |