OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 17 matching lines...) Expand all Loading... |
28 #define SUBPEL_TAPS 8 | 28 #define SUBPEL_TAPS 8 |
29 | 29 |
30 typedef enum { | 30 typedef enum { |
31 EIGHTTAP = 0, | 31 EIGHTTAP = 0, |
32 EIGHTTAP_SMOOTH = 1, | 32 EIGHTTAP_SMOOTH = 1, |
33 EIGHTTAP_SHARP = 2, | 33 EIGHTTAP_SHARP = 2, |
34 BILINEAR = 3, | 34 BILINEAR = 3, |
35 SWITCHABLE = 4 /* should be the last one */ | 35 SWITCHABLE = 4 /* should be the last one */ |
36 } INTERP_FILTER; | 36 } INTERP_FILTER; |
37 | 37 |
| 38 // Number of switchable filters |
| 39 #define SWITCHABLE_FILTERS 3 |
| 40 |
| 41 // The codec can operate in four possible inter prediction filter mode: |
| 42 // 8-tap, 8-tap-smooth, 8-tap-sharp, and switching between the three. |
| 43 #define SWITCHABLE_FILTER_CONTEXTS (SWITCHABLE_FILTERS + 1) |
| 44 |
38 typedef int16_t InterpKernel[SUBPEL_TAPS]; | 45 typedef int16_t InterpKernel[SUBPEL_TAPS]; |
39 | 46 |
40 const InterpKernel *vp9_get_interp_kernel(INTERP_FILTER filter); | 47 const InterpKernel *vp9_get_interp_kernel(INTERP_FILTER filter); |
41 | 48 |
42 DECLARE_ALIGNED(256, extern const InterpKernel, | 49 DECLARE_ALIGNED(256, extern const InterpKernel, |
43 vp9_bilinear_filters[SUBPEL_SHIFTS]); | 50 vp9_bilinear_filters[SUBPEL_SHIFTS]); |
44 | 51 |
45 // The VP9_BILINEAR_FILTERS_2TAP macro returns a pointer to the bilinear | 52 // The VP9_BILINEAR_FILTERS_2TAP macro returns a pointer to the bilinear |
46 // filter kernel as a 2 tap filter. | 53 // filter kernel as a 2 tap filter. |
47 #define BILINEAR_FILTERS_2TAP(x) \ | 54 #define BILINEAR_FILTERS_2TAP(x) \ |
48 (vp9_bilinear_filters[(x)] + SUBPEL_TAPS/2 - 1) | 55 (vp9_bilinear_filters[(x)] + SUBPEL_TAPS/2 - 1) |
49 | 56 |
50 #ifdef __cplusplus | 57 #ifdef __cplusplus |
51 } // extern "C" | 58 } // extern "C" |
52 #endif | 59 #endif |
53 | 60 |
54 #endif // VP9_COMMON_VP9_FILTER_H_ | 61 #endif // VP9_COMMON_VP9_FILTER_H_ |
OLD | NEW |