tile_common.h 1.92 KB
Newer Older
Jingning Han's avatar
Jingning Han committed
1
/*
Yaowu Xu's avatar
Yaowu Xu committed
2
 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
Jingning Han's avatar
Jingning Han committed
3
 *
Yaowu Xu's avatar
Yaowu Xu committed
4
5
6
7
8
9
 * This source code is subject to the terms of the BSD 2 Clause License and
 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
 * was not distributed with this source code in the LICENSE file, you can
 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
 * Media Patent License 1.0 was not distributed with this source code in the
 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
Jingning Han's avatar
Jingning Han committed
10
11
 */

Yaowu Xu's avatar
Yaowu Xu committed
12
13
#ifndef AV1_COMMON_TILE_COMMON_H_
#define AV1_COMMON_TILE_COMMON_H_
Jingning Han's avatar
Jingning Han committed
14
15
16
17
18

#ifdef __cplusplus
extern "C" {
#endif

19
20
#include "./aom_config.h"

Yaowu Xu's avatar
Yaowu Xu committed
21
struct AV1Common;
Jingning Han's avatar
Jingning Han committed
22

23
#if CONFIG_TILE_GROUPS
24
#define DEFAULT_MAX_NUM_TG 1
25
26
#endif

Jingning Han's avatar
Jingning Han committed
27
28
29
typedef struct TileInfo {
  int mi_row_start, mi_row_end;
  int mi_col_start, mi_col_end;
30
  int tg_horz_boundary;
Jingning Han's avatar
Jingning Han committed
31
32
33
34
} TileInfo;

// initializes 'tile->mi_(row|col)_(start|end)' for (row, col) based on
// 'cm->log2_tile_(rows|cols)' & 'cm->mi_(rows|cols)'
Yaowu Xu's avatar
Yaowu Xu committed
35
36
void av1_tile_init(TileInfo *tile, const struct AV1Common *cm, int row,
                   int col);
Jingning Han's avatar
Jingning Han committed
37

Yaowu Xu's avatar
Yaowu Xu committed
38
39
void av1_tile_set_row(TileInfo *tile, const struct AV1Common *cm, int row);
void av1_tile_set_col(TileInfo *tile, const struct AV1Common *cm, int col);
40
#if CONFIG_DEPENDENT_HORZTILES && CONFIG_TILE_GROUPS
Ryan's avatar
Ryan committed
41
void av1_tile_set_tg_boundary(TileInfo *tile, const struct AV1Common *const cm,
42
43
                              int row, int col);
#endif
44
void av1_get_tile_n_bits(int mi_cols, int *min_log2_tile_cols,
Yaowu Xu's avatar
Yaowu Xu committed
45
                         int *max_log2_tile_cols);
Jingning Han's avatar
Jingning Han committed
46

47
48
49
50
51
void av1_update_boundary_info(const struct AV1Common *cm,
                              const TileInfo *const tile_info, int mi_row,
                              int mi_col);

#if CONFIG_LOOPFILTERING_ACROSS_TILES
52
int av1_disable_loopfilter_on_tile_boundary(const struct AV1Common *cm);
53
#endif  // CONFIG_LOOPFILTERING_ACROSS_TILES
54

Jingning Han's avatar
Jingning Han committed
55
56
57
58
#ifdef __cplusplus
}  // extern "C"
#endif

Yaowu Xu's avatar
Yaowu Xu committed
59
#endif  // AV1_COMMON_TILE_COMMON_H_