Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 1 | /* |
Yaowu Xu | 2ab7ff0 | 2016-09-02 12:04:54 -0700 | [diff] [blame] | 2 | * Copyright (c) 2016, Alliance for Open Media. All rights reserved |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 3 | * |
Yaowu Xu | 2ab7ff0 | 2016-09-02 12:04:54 -0700 | [diff] [blame] | 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. |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 10 | */ |
| 11 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 12 | #ifndef AV1_COMMON_RECONINTRA_H_ |
| 13 | #define AV1_COMMON_RECONINTRA_H_ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 14 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 15 | #include "aom/aom_integer.h" |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 16 | #include "av1/common/blockd.h" |
| 17 | |
| 18 | #ifdef __cplusplus |
| 19 | extern "C" { |
| 20 | #endif |
| 21 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 22 | void av1_init_intra_predictors(void); |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 23 | |
Jingning Han | c4c99da | 2016-10-24 10:27:28 -0700 | [diff] [blame] | 24 | void av1_predict_intra_block(const MACROBLOCKD *xd, int bw, int bh, |
David Barker | 839467f | 2017-01-19 11:06:15 +0000 | [diff] [blame] | 25 | BLOCK_SIZE bsize, PREDICTION_MODE mode, |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 26 | const uint8_t *ref, int ref_stride, uint8_t *dst, |
| 27 | int dst_stride, int aoff, int loff, int plane); |
Debargha Mukherjee | cb60379 | 2016-10-04 13:10:23 -0700 | [diff] [blame] | 28 | |
| 29 | #if CONFIG_EXT_INTER |
| 30 | // Mapping of interintra to intra mode for use in the intra component |
| 31 | static 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 |
| 37 | static 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 Joshi | 102245d | 2016-11-28 13:05:36 -0800 | [diff] [blame] | 39 | 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 Mukherjee | cb60379 | 2016-10-04 13:10:23 -0700 | [diff] [blame] | 44 | }; |
| 45 | #endif // CONFIG_EXT_INTER |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 46 | #ifdef __cplusplus |
| 47 | } // extern "C" |
| 48 | #endif |
| 49 | |
hui su | 344b643 | 2016-10-18 16:07:04 -0700 | [diff] [blame] | 50 | #if CONFIG_FILTER_INTRA |
| 51 | #define FILTER_INTRA_PREC_BITS 10 |
| 52 | extern int av1_filter_intra_taps_4[TX_SIZES][INTRA_MODES][4]; |
| 53 | #endif // CONFIG_FILTER_INTRA |
| 54 | |
hui su | 0c628e6 | 2016-11-30 15:20:48 -0800 | [diff] [blame] | 55 | #if CONFIG_EXT_INTRA |
| 56 | static 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 Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 66 | #endif // AV1_COMMON_RECONINTRA_H_ |