blob: e1ef27dafd8206fd8d3837deb1074b7ef2c039e2 [file] [log] [blame]
Yaowu Xuc27fc142016-08-22 16:08:15 -07001/*
Yaowu Xu2ab7ff02016-09-02 12:04:54 -07002 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
Yaowu Xuc27fc142016-08-22 16:08:15 -07003 *
Yaowu Xu2ab7ff02016-09-02 12:04:54 -07004 * 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.
Yaowu Xuc27fc142016-08-22 16:08:15 -070010 */
11
Yaowu Xuf883b422016-08-30 14:01:10 -070012#ifndef AV1_COMMON_RECONINTRA_H_
13#define AV1_COMMON_RECONINTRA_H_
Yaowu Xuc27fc142016-08-22 16:08:15 -070014
Yaowu Xuf883b422016-08-30 14:01:10 -070015#include "aom/aom_integer.h"
Yaowu Xuc27fc142016-08-22 16:08:15 -070016#include "av1/common/blockd.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
Yaowu Xuf883b422016-08-30 14:01:10 -070022void av1_init_intra_predictors(void);
Yaowu Xuc27fc142016-08-22 16:08:15 -070023
Jingning Hanc4c99da2016-10-24 10:27:28 -070024void av1_predict_intra_block(const MACROBLOCKD *xd, int bw, int bh,
David Barker839467f2017-01-19 11:06:15 +000025 BLOCK_SIZE bsize, PREDICTION_MODE mode,
Yaowu Xuf883b422016-08-30 14:01:10 -070026 const uint8_t *ref, int ref_stride, uint8_t *dst,
27 int dst_stride, int aoff, int loff, int plane);
Debargha Mukherjeecb603792016-10-04 13:10:23 -070028
29#if CONFIG_EXT_INTER
30// Mapping of interintra to intra mode for use in the intra component
31static const PREDICTION_MODE interintra_to_intra_mode[INTERINTRA_MODES] = {
32 DC_PRED, V_PRED, H_PRED, D45_PRED, D135_PRED,
33 D117_PRED, D153_PRED, D207_PRED, D63_PRED, TM_PRED
34};
35
36// Mapping of intra mode to the interintra mode
37static const INTERINTRA_MODE intra_to_interintra_mode[INTRA_MODES] = {
38 II_DC_PRED, II_V_PRED, II_H_PRED, II_D45_PRED, II_D135_PRED,
Urvang Joshi102245d2016-11-28 13:05:36 -080039 II_D117_PRED, II_D153_PRED, II_D207_PRED, II_D63_PRED,
40#if CONFIG_ALT_INTRA
41 II_DC_PRED, // Note: Filler value, as there's no II_SMOOTH_PRED.
42#endif // CONFIG_ALT_INTRA
43 II_TM_PRED
Debargha Mukherjeecb603792016-10-04 13:10:23 -070044};
45#endif // CONFIG_EXT_INTER
Yaowu Xuc27fc142016-08-22 16:08:15 -070046#ifdef __cplusplus
47} // extern "C"
48#endif
49
hui su344b6432016-10-18 16:07:04 -070050#if CONFIG_FILTER_INTRA
51#define FILTER_INTRA_PREC_BITS 10
52extern int av1_filter_intra_taps_4[TX_SIZES][INTRA_MODES][4];
53#endif // CONFIG_FILTER_INTRA
54
hui su0c628e62016-11-30 15:20:48 -080055#if CONFIG_EXT_INTRA
56static INLINE int av1_is_directional_mode(PREDICTION_MODE mode,
57 BLOCK_SIZE bsize) {
58 return mode != DC_PRED && mode != TM_PRED &&
59#if CONFIG_ALT_INTRA
60 mode != SMOOTH_PRED &&
61#endif // CONFIG_ALT_INTRA
62 bsize >= BLOCK_8X8;
63}
64#endif // CONFIG_EXT_INTRA
65
Yaowu Xuf883b422016-08-30 14:01:10 -070066#endif // AV1_COMMON_RECONINTRA_H_