Yaowu Xu | 2ab7ff0 | 2016-09-02 12:04:54 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016, Alliance for Open Media. All rights reserved |
| 3 | * |
| 4 | * This source code is subject to the terms of the BSD 2 Clause License and |
| 5 | * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License |
| 6 | * was not distributed with this source code in the LICENSE file, you can |
| 7 | * obtain it at www.aomedia.org/license/software. If the Alliance for Open |
| 8 | * Media Patent License 1.0 was not distributed with this source code in the |
| 9 | * PATENTS file, you can obtain it at www.aomedia.org/license/patent. |
| 10 | */ |
Yaowu Xu | 253c001 | 2016-08-15 10:27:19 -0700 | [diff] [blame] | 11 | |
| 12 | #if !defined(_dering_H) |
clang-format | 21a0c2c | 2016-08-18 15:10:22 -0700 | [diff] [blame] | 13 | #define _dering_H (1) |
Yaowu Xu | 253c001 | 2016-08-15 10:27:19 -0700 | [diff] [blame] | 14 | |
clang-format | 21a0c2c | 2016-08-18 15:10:22 -0700 | [diff] [blame] | 15 | #include "odintrin.h" |
Yaowu Xu | 253c001 | 2016-08-15 10:27:19 -0700 | [diff] [blame] | 16 | |
clang-format | 21a0c2c | 2016-08-18 15:10:22 -0700 | [diff] [blame] | 17 | #if defined(DAALA_ODINTRIN) |
| 18 | #include "filter.h" |
Yaowu Xu | 253c001 | 2016-08-15 10:27:19 -0700 | [diff] [blame] | 19 | typedef int16_t od_dering_in; |
clang-format | 21a0c2c | 2016-08-18 15:10:22 -0700 | [diff] [blame] | 20 | #endif |
Yaowu Xu | 253c001 | 2016-08-15 10:27:19 -0700 | [diff] [blame] | 21 | |
| 22 | #define OD_DERINGSIZES (2) |
| 23 | |
clang-format | 21a0c2c | 2016-08-18 15:10:22 -0700 | [diff] [blame] | 24 | #define OD_DERING_NBLOCKS (OD_BSIZE_MAX / 8) |
Yaowu Xu | 253c001 | 2016-08-15 10:27:19 -0700 | [diff] [blame] | 25 | |
| 26 | #define OD_FILT_BORDER (3) |
clang-format | 21a0c2c | 2016-08-18 15:10:22 -0700 | [diff] [blame] | 27 | #define OD_FILT_BSTRIDE (OD_BSIZE_MAX + 2 * OD_FILT_BORDER) |
Yaowu Xu | 253c001 | 2016-08-15 10:27:19 -0700 | [diff] [blame] | 28 | |
| 29 | extern const int OD_DIRECTION_OFFSETS_TABLE[8][3]; |
| 30 | |
Jean-Marc Valin | 4713d8d | 2016-09-16 11:06:50 -0400 | [diff] [blame] | 31 | typedef int (*od_filter_dering_direction_func)(int16_t *y, int ystride, |
| 32 | const int16_t *in, int threshold, |
| 33 | int dir); |
Yaowu Xu | 253c001 | 2016-08-15 10:27:19 -0700 | [diff] [blame] | 34 | typedef void (*od_filter_dering_orthogonal_func)(int16_t *y, int ystride, |
clang-format | 21a0c2c | 2016-08-18 15:10:22 -0700 | [diff] [blame] | 35 | const int16_t *in, |
Jean-Marc Valin | 4713d8d | 2016-09-16 11:06:50 -0400 | [diff] [blame] | 36 | int threshold, int dir); |
Michael Bebenita | 7227b65 | 2016-10-06 14:27:34 -0700 | [diff] [blame] | 37 | void od_dering(int16_t *y, int ystride, const od_dering_in *x, int xstride, |
| 38 | int nvb, int nhb, int sbx, int sby, int nhsb, int nvsb, int xdec, |
clang-format | 21a0c2c | 2016-08-18 15:10:22 -0700 | [diff] [blame] | 39 | int dir[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS], int pli, |
| 40 | unsigned char *bskip, int skip_stride, int threshold, |
Jean-Marc Valin | 2c616e6 | 2016-08-23 02:45:43 -0400 | [diff] [blame] | 41 | int coeff_shift); |
Jean-Marc Valin | 4713d8d | 2016-09-16 11:06:50 -0400 | [diff] [blame] | 42 | int od_filter_dering_direction_4x4_c(int16_t *y, int ystride, const int16_t *in, |
| 43 | int threshold, int dir); |
| 44 | int od_filter_dering_direction_8x8_c(int16_t *y, int ystride, const int16_t *in, |
| 45 | int threshold, int dir); |
Yaowu Xu | 253c001 | 2016-08-15 10:27:19 -0700 | [diff] [blame] | 46 | void od_filter_dering_orthogonal_4x4_c(int16_t *y, int ystride, |
Jean-Marc Valin | 4713d8d | 2016-09-16 11:06:50 -0400 | [diff] [blame] | 47 | const int16_t *in, int threshold, |
| 48 | int dir); |
Yaowu Xu | 253c001 | 2016-08-15 10:27:19 -0700 | [diff] [blame] | 49 | void od_filter_dering_orthogonal_8x8_c(int16_t *y, int ystride, |
Jean-Marc Valin | 4713d8d | 2016-09-16 11:06:50 -0400 | [diff] [blame] | 50 | const int16_t *in, int threshold, |
| 51 | int dir); |
Yaowu Xu | 253c001 | 2016-08-15 10:27:19 -0700 | [diff] [blame] | 52 | #endif |