Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015 The WebM project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame^] | 11 | #ifndef AOM_DSP_AOM_FILTER_H_ |
| 12 | #define AOM_DSP_AOM_FILTER_H_ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 13 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame^] | 14 | #include "aom/aom_integer.h" |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 15 | |
| 16 | #ifdef __cplusplus |
| 17 | extern "C" { |
| 18 | #endif |
| 19 | |
| 20 | #define FILTER_BITS 7 |
| 21 | |
| 22 | #define SUBPEL_BITS 4 |
| 23 | #define SUBPEL_MASK ((1 << SUBPEL_BITS) - 1) |
| 24 | #define SUBPEL_SHIFTS (1 << SUBPEL_BITS) |
| 25 | #define SUBPEL_TAPS 8 |
| 26 | |
| 27 | typedef int16_t InterpKernel[SUBPEL_TAPS]; |
| 28 | |
| 29 | #define BIL_SUBPEL_BITS 3 |
| 30 | #define BIL_SUBPEL_SHIFTS (1 << BIL_SUBPEL_BITS) |
| 31 | |
| 32 | // 2 tap bilinear filters |
| 33 | static const uint8_t bilinear_filters_2t[BIL_SUBPEL_SHIFTS][2] = { |
| 34 | { 128, 0 }, { 112, 16 }, { 96, 32 }, { 80, 48 }, |
| 35 | { 64, 64 }, { 48, 80 }, { 32, 96 }, { 16, 112 }, |
| 36 | }; |
| 37 | |
| 38 | #ifdef __cplusplus |
| 39 | } // extern "C" |
| 40 | #endif |
| 41 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame^] | 42 | #endif // AOM_DSP_AOM_FILTER_H_ |