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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 static const int sinpi_2_9 = 9929; | 64 static const int sinpi_2_9 = 9929; |
65 static const int sinpi_3_9 = 13377; | 65 static const int sinpi_3_9 = 13377; |
66 static const int sinpi_4_9 = 15212; | 66 static const int sinpi_4_9 = 15212; |
67 | 67 |
68 static INLINE int dct_const_round_shift(int input) { | 68 static INLINE int dct_const_round_shift(int input) { |
69 int rv = ROUND_POWER_OF_TWO(input, DCT_CONST_BITS); | 69 int rv = ROUND_POWER_OF_TWO(input, DCT_CONST_BITS); |
70 assert(INT16_MIN <= rv && rv <= INT16_MAX); | 70 assert(INT16_MIN <= rv && rv <= INT16_MAX); |
71 return rv; | 71 return rv; |
72 } | 72 } |
73 | 73 |
74 static INLINE int dct_32_round(int input) { | |
75 int rv = ROUND_POWER_OF_TWO(input, DCT_CONST_BITS); | |
76 assert(-131072 <= rv && rv <= 131071); | |
77 return rv; | |
78 } | |
79 | |
80 typedef void (*transform_1d)(int16_t*, int16_t*); | 74 typedef void (*transform_1d)(int16_t*, int16_t*); |
81 | 75 |
82 typedef struct { | 76 typedef struct { |
83 transform_1d cols, rows; // vertical and horizontal | 77 transform_1d cols, rows; // vertical and horizontal |
84 } transform_2d; | 78 } transform_2d; |
85 | 79 |
86 #endif // VP9_COMMON_VP9_IDCT_H_ | 80 #endif // VP9_COMMON_VP9_IDCT_H_ |
OLD | NEW |