• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  */
11 
12 #ifndef AOM_AV1_COMMON_ALLOCCOMMON_H_
13 #define AOM_AV1_COMMON_ALLOCCOMMON_H_
14 
15 #define INVALID_IDX -1  // Invalid buffer index.
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 struct AV1Common;
22 struct BufferPool;
23 
24 void av1_remove_common(struct AV1Common *cm);
25 
26 int av1_alloc_above_context_buffers(struct AV1Common *cm,
27                                     int num_alloc_above_contexts);
28 void av1_free_above_context_buffers(struct AV1Common *cm,
29                                     int num_free_above_contexts);
30 int av1_alloc_context_buffers(struct AV1Common *cm, int width, int height);
31 void av1_init_context_buffers(struct AV1Common *cm);
32 void av1_free_context_buffers(struct AV1Common *cm);
33 
34 void av1_free_ref_frame_buffers(struct BufferPool *pool);
35 void av1_alloc_restoration_buffers(struct AV1Common *cm);
36 void av1_free_restoration_buffers(struct AV1Common *cm);
37 
38 int av1_alloc_state_buffers(struct AV1Common *cm, int width, int height);
39 void av1_free_state_buffers(struct AV1Common *cm);
40 
41 void av1_set_mb_mi(struct AV1Common *cm, int width, int height);
42 int av1_get_MBs(int width, int height);
43 
44 #ifdef __cplusplus
45 }  // extern "C"
46 #endif
47 
48 #endif  // AOM_AV1_COMMON_ALLOCCOMMON_H_
49