blob: 0a71817d3c2e578fc27ea2620719546f8c724390 [file] [log] [blame]
Yaowu Xuc27fc142016-08-22 16:08:15 -07001/*
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 Xuf883b422016-08-30 14:01:10 -070011#ifndef AOM_DSP_AOM_FILTER_H_
12#define AOM_DSP_AOM_FILTER_H_
Yaowu Xuc27fc142016-08-22 16:08:15 -070013
Yaowu Xuf883b422016-08-30 14:01:10 -070014#include "aom/aom_integer.h"
Yaowu Xuc27fc142016-08-22 16:08:15 -070015
16#ifdef __cplusplus
17extern "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
27typedef 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
33static 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 Xuf883b422016-08-30 14:01:10 -070042#endif // AOM_DSP_AOM_FILTER_H_