blob: c64439f3d4ee80f27a0d0649bf374dee0bca0c72 [file] [log] [blame]
Yaowu Xu2ab7ff02016-09-02 12:04:54 -07001/*
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 Xu253c0012016-08-15 10:27:19 -070011
12#if !defined(_dering_H)
clang-format21a0c2c2016-08-18 15:10:22 -070013#define _dering_H (1)
Yaowu Xu253c0012016-08-15 10:27:19 -070014
clang-format21a0c2c2016-08-18 15:10:22 -070015#include "odintrin.h"
Yaowu Xu253c0012016-08-15 10:27:19 -070016
clang-format21a0c2c2016-08-18 15:10:22 -070017#if defined(DAALA_ODINTRIN)
18#include "filter.h"
Yaowu Xu253c0012016-08-15 10:27:19 -070019typedef int16_t od_dering_in;
clang-format21a0c2c2016-08-18 15:10:22 -070020#endif
Yaowu Xu253c0012016-08-15 10:27:19 -070021
22#define OD_DERINGSIZES (2)
23
clang-format21a0c2c2016-08-18 15:10:22 -070024#define OD_DERING_NBLOCKS (OD_BSIZE_MAX / 8)
Yaowu Xu253c0012016-08-15 10:27:19 -070025
26#define OD_FILT_BORDER (3)
clang-format21a0c2c2016-08-18 15:10:22 -070027#define OD_FILT_BSTRIDE (OD_BSIZE_MAX + 2 * OD_FILT_BORDER)
Yaowu Xu253c0012016-08-15 10:27:19 -070028
29extern const int OD_DIRECTION_OFFSETS_TABLE[8][3];
30
Jean-Marc Valin4713d8d2016-09-16 11:06:50 -040031typedef int (*od_filter_dering_direction_func)(int16_t *y, int ystride,
32 const int16_t *in, int threshold,
33 int dir);
Yaowu Xu253c0012016-08-15 10:27:19 -070034typedef void (*od_filter_dering_orthogonal_func)(int16_t *y, int ystride,
clang-format21a0c2c2016-08-18 15:10:22 -070035 const int16_t *in,
Jean-Marc Valin4713d8d2016-09-16 11:06:50 -040036 int threshold, int dir);
Michael Bebenita7227b652016-10-06 14:27:34 -070037void 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-format21a0c2c2016-08-18 15:10:22 -070039 int dir[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS], int pli,
40 unsigned char *bskip, int skip_stride, int threshold,
Jean-Marc Valin2c616e62016-08-23 02:45:43 -040041 int coeff_shift);
Jean-Marc Valin4713d8d2016-09-16 11:06:50 -040042int od_filter_dering_direction_4x4_c(int16_t *y, int ystride, const int16_t *in,
43 int threshold, int dir);
44int od_filter_dering_direction_8x8_c(int16_t *y, int ystride, const int16_t *in,
45 int threshold, int dir);
Yaowu Xu253c0012016-08-15 10:27:19 -070046void od_filter_dering_orthogonal_4x4_c(int16_t *y, int ystride,
Jean-Marc Valin4713d8d2016-09-16 11:06:50 -040047 const int16_t *in, int threshold,
48 int dir);
Yaowu Xu253c0012016-08-15 10:27:19 -070049void od_filter_dering_orthogonal_8x8_c(int16_t *y, int ystride,
Jean-Marc Valin4713d8d2016-09-16 11:06:50 -040050 const int16_t *in, int threshold,
51 int dir);
Yaowu Xu253c0012016-08-15 10:27:19 -070052#endif