Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 1 | /* |
Yaowu Xu | 5e53c43 | 2016-09-23 15:37:36 -0700 | [diff] [blame] | 2 | * Copyright (c) 2016, Alliance for Open Media. All rights reserved |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 3 | * |
Yaowu Xu | 5e53c43 | 2016-09-23 15:37:36 -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. |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 10 | */ |
| 11 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 12 | #ifndef AV1_COMMON_ALLOCCOMMON_H_ |
| 13 | #define AV1_COMMON_ALLOCCOMMON_H_ |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 14 | |
| 15 | #define INVALID_IDX -1 // Invalid buffer index. |
| 16 | |
| 17 | #ifdef __cplusplus |
| 18 | extern "C" { |
| 19 | #endif |
| 20 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 21 | struct AV1Common; |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 22 | struct BufferPool; |
| 23 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 24 | void av1_remove_common(struct AV1Common *cm); |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 25 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 26 | int av1_alloc_context_buffers(struct AV1Common *cm, int width, int height); |
| 27 | void av1_init_context_buffers(struct AV1Common *cm); |
| 28 | void av1_free_context_buffers(struct AV1Common *cm); |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 29 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 30 | void av1_free_ref_frame_buffers(struct BufferPool *pool); |
Debargha Mukherjee | 84ca7a9 | 2016-01-19 13:01:01 -0800 | [diff] [blame] | 31 | #if CONFIG_LOOP_RESTORATION |
Debargha Mukherjee | 874d36d | 2016-12-14 16:53:17 -0800 | [diff] [blame] | 32 | void av1_alloc_restoration_buffers(struct AV1Common *cm); |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 33 | void av1_free_restoration_buffers(struct AV1Common *cm); |
Debargha Mukherjee | 84ca7a9 | 2016-01-19 13:01:01 -0800 | [diff] [blame] | 34 | #endif // CONFIG_LOOP_RESTORATION |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 35 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 36 | int av1_alloc_state_buffers(struct AV1Common *cm, int width, int height); |
| 37 | void av1_free_state_buffers(struct AV1Common *cm); |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 38 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 39 | void av1_set_mb_mi(struct AV1Common *cm, int width, int height); |
Debargha Mukherjee | 7166f22 | 2017-09-05 21:32:42 -0700 | [diff] [blame] | 40 | int av1_get_MBs(int width, int height); |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 41 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 42 | void av1_swap_current_and_last_seg_map(struct AV1Common *cm); |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 43 | |
| 44 | #ifdef __cplusplus |
| 45 | } // extern "C" |
| 46 | #endif |
| 47 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 48 | #endif // AV1_COMMON_ALLOCCOMMON_H_ |