/work/svt-av1/Source/Lib/Codec/block_structures.c
Line | Count | Source |
1 | | /* |
2 | | * Copyright(c) 2019 Intel Corporation |
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 https://www.aomedia.org/license/software-license. 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 https://www.aomedia.org/license/patent-license. |
10 | | */ |
11 | | |
12 | | #include "block_structures.h" |
13 | | |
14 | 1.51k | void svt_av1_tile_set_row(TileInfo* tile, TilesInfo* tiles_info, int32_t mi_rows, int row) { |
15 | 1.51k | assert(row < tiles_info->tile_rows); |
16 | 1.51k | int mi_row_start = tiles_info->tile_row_start_mi[row]; |
17 | 1.51k | int mi_row_end = tiles_info->tile_row_start_mi[row + 1]; |
18 | 1.51k | tile->tile_row = row; |
19 | 1.51k | tile->mi_row_start = mi_row_start; |
20 | 1.51k | tile->mi_row_end = AOMMIN(mi_row_end, mi_rows); |
21 | 1.51k | tile->tg_horz_boundary = 0; |
22 | 1.51k | assert(tile->mi_row_end > tile->mi_row_start); |
23 | 1.51k | } |
24 | | |
25 | 4.99k | void svt_av1_tile_set_col(TileInfo* tile, const TilesInfo* tiles_info, int32_t mi_cols, int col) { |
26 | 4.99k | assert(col < tiles_info->tile_cols); |
27 | 4.99k | int mi_col_start = tiles_info->tile_col_start_mi[col]; |
28 | 4.99k | int mi_col_end = tiles_info->tile_col_start_mi[col + 1]; |
29 | 4.99k | tile->tile_col = col; |
30 | 4.99k | tile->mi_col_start = mi_col_start; |
31 | 4.99k | tile->mi_col_end = AOMMIN(mi_col_end, mi_cols); |
32 | | assert(tile->mi_col_end > tile->mi_col_start); |
33 | 4.99k | } |