Commit 9b02b0e6 authored by Ryan Lei's avatar Ryan Lei

deblocking_across_tiles->loopfilter_across_tiles

This commit renames deblocking_across_tiles to loopfilter_across_tiles, 
to get ready for dering and clpf integration.

Change-Id: Id25b051da9b1e5cb92f35a9619662597462d9537
parent 2768ebcb
...@@ -287,7 +287,7 @@ enum aome_enc_control_id { ...@@ -287,7 +287,7 @@ enum aome_enc_control_id {
*/ */
AV1E_SET_TILE_ROWS, AV1E_SET_TILE_ROWS,
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
/*!\brief Codec control function to set loop_filter_across_tiles_enabled. /*!\brief Codec control function to set loop_filter_across_tiles_enabled.
* *
* In encoding and decoding, AV1 allows disabling loop filter across tile * In encoding and decoding, AV1 allows disabling loop filter across tile
...@@ -606,10 +606,10 @@ AOM_CTRL_USE_TYPE(AV1E_SET_TILE_COLUMNS, int) ...@@ -606,10 +606,10 @@ AOM_CTRL_USE_TYPE(AV1E_SET_TILE_COLUMNS, int)
#define AOM_CTRL_AV1E_SET_TILE_COLUMNS #define AOM_CTRL_AV1E_SET_TILE_COLUMNS
AOM_CTRL_USE_TYPE(AV1E_SET_TILE_ROWS, int) AOM_CTRL_USE_TYPE(AV1E_SET_TILE_ROWS, int)
#define AOM_CTRL_AV1E_SET_TILE_ROWS #define AOM_CTRL_AV1E_SET_TILE_ROWS
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
AOM_CTRL_USE_TYPE(AV1E_SET_TILE_LOOPFILTER, int) AOM_CTRL_USE_TYPE(AV1E_SET_TILE_LOOPFILTER, int)
#define AOM_CTRL_AV1E_SET_TILE_LOOPFILTER #define AOM_CTRL_AV1E_SET_TILE_LOOPFILTER
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
AOM_CTRL_USE_TYPE(AOME_GET_LAST_QUANTIZER, int *) AOM_CTRL_USE_TYPE(AOME_GET_LAST_QUANTIZER, int *)
#define AOM_CTRL_AOME_GET_LAST_QUANTIZER #define AOM_CTRL_AOME_GET_LAST_QUANTIZER
......
...@@ -376,10 +376,10 @@ static const arg_def_t tile_cols = ...@@ -376,10 +376,10 @@ static const arg_def_t tile_cols =
static const arg_def_t tile_rows = static const arg_def_t tile_rows =
ARG_DEF(NULL, "tile-rows", 1, ARG_DEF(NULL, "tile-rows", 1,
"Number of tile rows to use, log2 (set to 0 while threads > 1)"); "Number of tile rows to use, log2 (set to 0 while threads > 1)");
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
static const arg_def_t tile_loopfilter = ARG_DEF( static const arg_def_t tile_loopfilter = ARG_DEF(
NULL, "tile-loopfilter", 1, "Enable loop filter across tile boundary"); NULL, "tile-loopfilter", 1, "Enable loop filter across tile boundary");
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
static const arg_def_t lossless = static const arg_def_t lossless =
ARG_DEF(NULL, "lossless", 1, "Lossless mode (0: false (default), 1: true)"); ARG_DEF(NULL, "lossless", 1, "Lossless mode (0: false (default), 1: true)");
#if CONFIG_AOM_QM #if CONFIG_AOM_QM
...@@ -476,9 +476,9 @@ static const arg_def_t *av1_args[] = { &cpu_used_av1, ...@@ -476,9 +476,9 @@ static const arg_def_t *av1_args[] = { &cpu_used_av1,
&static_thresh, &static_thresh,
&tile_cols, &tile_cols,
&tile_rows, &tile_rows,
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
&tile_loopfilter, &tile_loopfilter,
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
&arnr_maxframes, &arnr_maxframes,
&arnr_strength, &arnr_strength,
&tune_ssim, &tune_ssim,
...@@ -521,9 +521,9 @@ static const int av1_arg_ctrl_map[] = { AOME_SET_CPUUSED, ...@@ -521,9 +521,9 @@ static const int av1_arg_ctrl_map[] = { AOME_SET_CPUUSED,
AOME_SET_STATIC_THRESHOLD, AOME_SET_STATIC_THRESHOLD,
AV1E_SET_TILE_COLUMNS, AV1E_SET_TILE_COLUMNS,
AV1E_SET_TILE_ROWS, AV1E_SET_TILE_ROWS,
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
AV1E_SET_TILE_LOOPFILTER, AV1E_SET_TILE_LOOPFILTER,
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
AOME_SET_ARNR_MAXFRAMES, AOME_SET_ARNR_MAXFRAMES,
AOME_SET_ARNR_STRENGTH, AOME_SET_ARNR_STRENGTH,
AOME_SET_TUNING, AOME_SET_TUNING,
......
...@@ -34,9 +34,9 @@ struct av1_extracfg { ...@@ -34,9 +34,9 @@ struct av1_extracfg {
unsigned int static_thresh; unsigned int static_thresh;
unsigned int tile_columns; unsigned int tile_columns;
unsigned int tile_rows; unsigned int tile_rows;
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
unsigned int loop_filter_across_tiles_enabled; unsigned int loop_filter_across_tiles_enabled;
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
unsigned int arnr_max_frames; unsigned int arnr_max_frames;
unsigned int arnr_strength; unsigned int arnr_strength;
unsigned int min_gf_interval; unsigned int min_gf_interval;
...@@ -90,9 +90,9 @@ static struct av1_extracfg default_extra_cfg = { ...@@ -90,9 +90,9 @@ static struct av1_extracfg default_extra_cfg = {
0, // tile_columns 0, // tile_columns
0, // tile_rows 0, // tile_rows
#endif // CONFIG_EXT_TILE #endif // CONFIG_EXT_TILE
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
0, // loop_filter_across_tiles_enabled 0, // loop_filter_across_tiles_enabled
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
7, // arnr_max_frames 7, // arnr_max_frames
5, // arnr_strength 5, // arnr_strength
0, // min_gf_interval; 0 -> default decision 0, // min_gf_interval; 0 -> default decision
...@@ -268,9 +268,9 @@ static aom_codec_err_t validate_config(aom_codec_alg_priv_t *ctx, ...@@ -268,9 +268,9 @@ static aom_codec_err_t validate_config(aom_codec_alg_priv_t *ctx,
RANGE_CHECK_HI(extra_cfg, tile_columns, 6); RANGE_CHECK_HI(extra_cfg, tile_columns, 6);
RANGE_CHECK_HI(extra_cfg, tile_rows, 2); RANGE_CHECK_HI(extra_cfg, tile_rows, 2);
#endif // CONFIG_EXT_TILE #endif // CONFIG_EXT_TILE
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
RANGE_CHECK_HI(extra_cfg, loop_filter_across_tiles_enabled, 1); RANGE_CHECK_HI(extra_cfg, loop_filter_across_tiles_enabled, 1);
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
RANGE_CHECK_HI(extra_cfg, sharpness, 7); RANGE_CHECK_HI(extra_cfg, sharpness, 7);
RANGE_CHECK_HI(extra_cfg, arnr_max_frames, 15); RANGE_CHECK_HI(extra_cfg, arnr_max_frames, 15);
RANGE_CHECK_HI(extra_cfg, arnr_strength, 6); RANGE_CHECK_HI(extra_cfg, arnr_strength, 6);
...@@ -513,10 +513,10 @@ static aom_codec_err_t set_encoder_config( ...@@ -513,10 +513,10 @@ static aom_codec_err_t set_encoder_config(
oxcf->tile_rows = extra_cfg->tile_rows; oxcf->tile_rows = extra_cfg->tile_rows;
#endif // CONFIG_EXT_TILE #endif // CONFIG_EXT_TILE
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
oxcf->loop_filter_across_tiles_enabled = oxcf->loop_filter_across_tiles_enabled =
extra_cfg->loop_filter_across_tiles_enabled; extra_cfg->loop_filter_across_tiles_enabled;
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
oxcf->error_resilient_mode = cfg->g_error_resilient; oxcf->error_resilient_mode = cfg->g_error_resilient;
oxcf->frame_parallel_decoding_mode = extra_cfg->frame_parallel_decoding_mode; oxcf->frame_parallel_decoding_mode = extra_cfg->frame_parallel_decoding_mode;
...@@ -680,7 +680,7 @@ static aom_codec_err_t ctrl_set_tile_rows(aom_codec_alg_priv_t *ctx, ...@@ -680,7 +680,7 @@ static aom_codec_err_t ctrl_set_tile_rows(aom_codec_alg_priv_t *ctx,
return update_extra_cfg(ctx, &extra_cfg); return update_extra_cfg(ctx, &extra_cfg);
} }
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
static aom_codec_err_t ctrl_set_tile_loopfilter(aom_codec_alg_priv_t *ctx, static aom_codec_err_t ctrl_set_tile_loopfilter(aom_codec_alg_priv_t *ctx,
va_list args) { va_list args) {
struct av1_extracfg extra_cfg = ctx->extra_cfg; struct av1_extracfg extra_cfg = ctx->extra_cfg;
...@@ -688,7 +688,7 @@ static aom_codec_err_t ctrl_set_tile_loopfilter(aom_codec_alg_priv_t *ctx, ...@@ -688,7 +688,7 @@ static aom_codec_err_t ctrl_set_tile_loopfilter(aom_codec_alg_priv_t *ctx,
CAST(AV1E_SET_TILE_LOOPFILTER, args); CAST(AV1E_SET_TILE_LOOPFILTER, args);
return update_extra_cfg(ctx, &extra_cfg); return update_extra_cfg(ctx, &extra_cfg);
} }
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
static aom_codec_err_t ctrl_set_arnr_max_frames(aom_codec_alg_priv_t *ctx, static aom_codec_err_t ctrl_set_arnr_max_frames(aom_codec_alg_priv_t *ctx,
va_list args) { va_list args) {
...@@ -1390,9 +1390,9 @@ static aom_codec_ctrl_fn_map_t encoder_ctrl_maps[] = { ...@@ -1390,9 +1390,9 @@ static aom_codec_ctrl_fn_map_t encoder_ctrl_maps[] = {
{ AOME_SET_STATIC_THRESHOLD, ctrl_set_static_thresh }, { AOME_SET_STATIC_THRESHOLD, ctrl_set_static_thresh },
{ AV1E_SET_TILE_COLUMNS, ctrl_set_tile_columns }, { AV1E_SET_TILE_COLUMNS, ctrl_set_tile_columns },
{ AV1E_SET_TILE_ROWS, ctrl_set_tile_rows }, { AV1E_SET_TILE_ROWS, ctrl_set_tile_rows },
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
{ AV1E_SET_TILE_LOOPFILTER, ctrl_set_tile_loopfilter }, { AV1E_SET_TILE_LOOPFILTER, ctrl_set_tile_loopfilter },
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
{ AOME_SET_ARNR_MAXFRAMES, ctrl_set_arnr_max_frames }, { AOME_SET_ARNR_MAXFRAMES, ctrl_set_arnr_max_frames },
{ AOME_SET_ARNR_STRENGTH, ctrl_set_arnr_strength }, { AOME_SET_ARNR_STRENGTH, ctrl_set_arnr_strength },
{ AOME_SET_TUNING, ctrl_set_tuning }, { AOME_SET_TUNING, ctrl_set_tuning },
......
...@@ -376,9 +376,8 @@ typedef struct { ...@@ -376,9 +376,8 @@ typedef struct {
int num_proj_ref[2]; int num_proj_ref[2];
WarpedMotionParams wm_params[2]; WarpedMotionParams wm_params[2];
#endif // CONFIG_WARPED_MOTION #endif // CONFIG_WARPED_MOTION
#if CONFIG_DEBLOCKING_ACROSS_TILES
TILE_BOUNDARY_TYPE tile_boundary_info; BOUNDARY_TYPE boundary_info;
#endif // CONFIG_DEBLOCKING_ACROSS_TILES
} MB_MODE_INFO; } MB_MODE_INFO;
typedef struct MODE_INFO { typedef struct MODE_INFO {
......
...@@ -225,14 +225,16 @@ typedef enum { ...@@ -225,14 +225,16 @@ typedef enum {
TX_TYPES, TX_TYPES,
} TX_TYPE; } TX_TYPE;
#if CONFIG_DEBLOCKING_ACROSS_TILES
typedef enum { typedef enum {
TILE_LEFT_BOUNDARY = 1, TILE_LEFT_BOUNDARY = 1,
TILE_RIGHT_BOUNDARY = 2, TILE_RIGHT_BOUNDARY = 2,
TILE_ABOVE_BOUNDARY = 4, TILE_ABOVE_BOUNDARY = 4,
TILE_BOTTOM_BOUNDARY = 8, TILE_BOTTOM_BOUNDARY = 8,
} TILE_BOUNDARY_TYPE; FRAME_LEFT_BOUNDARY = 16,
#endif // CONFIG_DEBLOCKING_ACROSS_TILES FRAME_RIGHT_BOUNDARY = 32,
FRAME_ABOVE_BOUNDARY = 64,
FRAME_BOTTOM_BOUNDARY = 128,
} BOUNDARY_TYPE;
#if CONFIG_EXT_TX #if CONFIG_EXT_TX
#if CONFIG_CB4X4 #if CONFIG_CB4X4
......
...@@ -893,7 +893,7 @@ static void build_y_mask(const loop_filter_info_n *const lfi_n, ...@@ -893,7 +893,7 @@ static void build_y_mask(const loop_filter_info_n *const lfi_n,
*int_4x4_y |= (size_mask[block_size] & 0xffffffffffffffffULL) << shift_y; *int_4x4_y |= (size_mask[block_size] & 0xffffffffffffffffULL) << shift_y;
} }
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
// This function update the bit masks for the entire 64x64 region represented // This function update the bit masks for the entire 64x64 region represented
// by mi_row, mi_col. In case one of the edge is a tile boundary, loop filtering // by mi_row, mi_col. In case one of the edge is a tile boundary, loop filtering
// for that edge is disabled. This function only check the tile boundary info // for that edge is disabled. This function only check the tile boundary info
...@@ -905,21 +905,21 @@ static void update_tile_boundary_filter_mask(AV1_COMMON *const cm, ...@@ -905,21 +905,21 @@ static void update_tile_boundary_filter_mask(AV1_COMMON *const cm,
int i; int i;
MODE_INFO *const mi = cm->mi + mi_row * cm->mi_stride + mi_col; MODE_INFO *const mi = cm->mi + mi_row * cm->mi_stride + mi_col;
if (mi->mbmi.tile_boundary_info & TILE_LEFT_BOUNDARY) { if (mi->mbmi.boundary_info & TILE_LEFT_BOUNDARY) {
for (i = 0; i <= TX_32X32; i++) { for (i = 0; i <= TX_32X32; i++) {
lfm->left_y[i] &= 0xfefefefefefefefeULL; lfm->left_y[i] &= 0xfefefefefefefefeULL;
lfm->left_uv[i] &= 0xeeee; lfm->left_uv[i] &= 0xeeee;
} }
} }
if (mi->mbmi.tile_boundary_info & TILE_ABOVE_BOUNDARY) { if (mi->mbmi.boundary_info & TILE_ABOVE_BOUNDARY) {
for (i = 0; i <= TX_32X32; i++) { for (i = 0; i <= TX_32X32; i++) {
lfm->above_y[i] &= 0xffffffffffffff00ULL; lfm->above_y[i] &= 0xffffffffffffff00ULL;
lfm->above_uv[i] &= 0xfff0; lfm->above_uv[i] &= 0xfff0;
} }
} }
} }
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
// This function sets up the bit masks for the entire 64x64 region represented // This function sets up the bit masks for the entire 64x64 region represented
// by mi_row, mi_col. // by mi_row, mi_col.
...@@ -1206,11 +1206,11 @@ void av1_setup_mask(AV1_COMMON *const cm, const int mi_row, const int mi_col, ...@@ -1206,11 +1206,11 @@ void av1_setup_mask(AV1_COMMON *const cm, const int mi_row, const int mi_col,
} }
} }
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
if (av1_disable_loopfilter_on_tile_boundary(cm)) { if (av1_disable_loopfilter_on_tile_boundary(cm)) {
update_tile_boundary_filter_mask(cm, mi_row, mi_col, lfm); update_tile_boundary_filter_mask(cm, mi_row, mi_col, lfm);
} }
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
// Assert if we try to apply 2 different loop filters at the same position. // Assert if we try to apply 2 different loop filters at the same position.
assert(!(lfm->left_y[TX_16X16] & lfm->left_y[TX_8X8])); assert(!(lfm->left_y[TX_16X16] & lfm->left_y[TX_8X8]));
...@@ -1462,12 +1462,12 @@ void av1_filter_block_plane_non420_ver(AV1_COMMON *cm, ...@@ -1462,12 +1462,12 @@ void av1_filter_block_plane_non420_ver(AV1_COMMON *cm,
// Disable filtering on the leftmost column or tile boundary // Disable filtering on the leftmost column or tile boundary
border_mask = ~(mi_col == 0); border_mask = ~(mi_col == 0);
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
if (av1_disable_loopfilter_on_tile_boundary(cm) && if (av1_disable_loopfilter_on_tile_boundary(cm) &&
((mib[0]->mbmi.tile_boundary_info & TILE_LEFT_BOUNDARY) != 0)) { ((mib[0]->mbmi.boundary_info & TILE_LEFT_BOUNDARY) != 0)) {
border_mask = 0xfffffffe; border_mask = 0xfffffffe;
} }
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
#if CONFIG_AOM_HIGHBITDEPTH #if CONFIG_AOM_HIGHBITDEPTH
if (cm->use_highbitdepth) { if (cm->use_highbitdepth) {
...@@ -1666,11 +1666,11 @@ void av1_filter_block_plane_non420_hor(AV1_COMMON *cm, ...@@ -1666,11 +1666,11 @@ void av1_filter_block_plane_non420_hor(AV1_COMMON *cm,
unsigned int mask_8x8_r; unsigned int mask_8x8_r;
unsigned int mask_4x4_r; unsigned int mask_4x4_r;
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
// Disable filtering on the abovemost row or tile boundary // Disable filtering on the abovemost row or tile boundary
const MODE_INFO *mi = cm->mi + (mi_row + r) * cm->mi_stride; const MODE_INFO *mi = cm->mi + (mi_row + r) * cm->mi_stride;
if ((av1_disable_loopfilter_on_tile_boundary(cm) && if ((av1_disable_loopfilter_on_tile_boundary(cm) &&
(mi->mbmi.tile_boundary_info & TILE_ABOVE_BOUNDARY)) || (mi->mbmi.boundary_info & TILE_ABOVE_BOUNDARY)) ||
(mi_row + idx_r == 0)) { (mi_row + idx_r == 0)) {
mask_16x16_r = 0; mask_16x16_r = 0;
mask_8x8_r = 0; mask_8x8_r = 0;
...@@ -1680,7 +1680,7 @@ void av1_filter_block_plane_non420_hor(AV1_COMMON *cm, ...@@ -1680,7 +1680,7 @@ void av1_filter_block_plane_non420_hor(AV1_COMMON *cm,
mask_16x16_r = 0; mask_16x16_r = 0;
mask_8x8_r = 0; mask_8x8_r = 0;
mask_4x4_r = 0; mask_4x4_r = 0;
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
} else { } else {
mask_16x16_r = mask_16x16[r]; mask_16x16_r = mask_16x16[r];
mask_8x8_r = mask_8x8[r]; mask_8x8_r = mask_8x8[r];
......
...@@ -368,9 +368,9 @@ typedef struct AV1Common { ...@@ -368,9 +368,9 @@ typedef struct AV1Common {
int tile_cols, tile_rows; int tile_cols, tile_rows;
int tile_width, tile_height; // In MI units int tile_width, tile_height; // In MI units
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
int loop_filter_across_tiles_enabled; int loop_filter_across_tiles_enabled;
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
int byte_alignment; int byte_alignment;
int skip_loop_filter; int skip_loop_filter;
......
...@@ -60,28 +60,39 @@ void av1_get_tile_n_bits(const int mi_cols, int *min_log2_tile_cols, ...@@ -60,28 +60,39 @@ void av1_get_tile_n_bits(const int mi_cols, int *min_log2_tile_cols,
} }
#endif // !CONFIG_EXT_TILE #endif // !CONFIG_EXT_TILE
#if CONFIG_DEBLOCKING_ACROSS_TILES void av1_update_boundary_info(const struct AV1Common *cm,
void av1_update_tile_boundary_info(const struct AV1Common *cm, const TileInfo *const tile_info, int mi_row,
const TileInfo *const tile_info, int mi_row, int mi_col) {
int mi_col) {
int row, col; int row, col;
for (row = mi_row; row < (mi_row + cm->mib_size); row++) for (row = mi_row; row < (mi_row + cm->mib_size); row++)
for (col = mi_col; col < (mi_col + cm->mib_size); col++) { for (col = mi_col; col < (mi_col + cm->mib_size); col++) {
MODE_INFO *const mi = cm->mi + row * cm->mi_stride + col; MODE_INFO *const mi = cm->mi + row * cm->mi_stride + col;
mi->mbmi.tile_boundary_info = 0; mi->mbmi.boundary_info = 0;
if (row == tile_info->mi_row_start) if (cm->tile_cols * cm->tile_rows > 1) {
mi->mbmi.tile_boundary_info |= TILE_ABOVE_BOUNDARY; if (row == tile_info->mi_row_start)
if (col == tile_info->mi_col_start) mi->mbmi.boundary_info |= TILE_ABOVE_BOUNDARY;
mi->mbmi.tile_boundary_info |= TILE_LEFT_BOUNDARY; if (col == tile_info->mi_col_start)
if ((row + 1) >= tile_info->mi_row_end) mi->mbmi.boundary_info |= TILE_LEFT_BOUNDARY;
mi->mbmi.tile_boundary_info |= TILE_BOTTOM_BOUNDARY; if ((row + 1) >= tile_info->mi_row_end)
if ((col + 1) >= tile_info->mi_col_end) mi->mbmi.boundary_info |= TILE_BOTTOM_BOUNDARY;
mi->mbmi.tile_boundary_info |= TILE_RIGHT_BOUNDARY; if ((col + 1) >= tile_info->mi_col_end)
mi->mbmi.boundary_info |= TILE_RIGHT_BOUNDARY;
}
// Frame boundary is treated as tile boundary
if (row == 0)
mi->mbmi.boundary_info |= FRAME_ABOVE_BOUNDARY | TILE_ABOVE_BOUNDARY;
if (col == 0)
mi->mbmi.boundary_info |= FRAME_LEFT_BOUNDARY | TILE_LEFT_BOUNDARY;
if ((row + 1) >= cm->mi_rows)
mi->mbmi.boundary_info |= FRAME_BOTTOM_BOUNDARY | TILE_BOTTOM_BOUNDARY;
if ((col + 1) >= cm->mi_cols)
mi->mbmi.boundary_info |= FRAME_RIGHT_BOUNDARY | TILE_RIGHT_BOUNDARY;
} }
} }
#if CONFIG_LOOPFILTERING_ACROSS_TILES
int av1_disable_loopfilter_on_tile_boundary(const struct AV1Common *cm) { int av1_disable_loopfilter_on_tile_boundary(const struct AV1Common *cm) {
return (!cm->loop_filter_across_tiles_enabled && return (!cm->loop_filter_across_tiles_enabled &&
(cm->tile_cols * cm->tile_rows > 1)); (cm->tile_cols * cm->tile_rows > 1));
} }
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
...@@ -38,12 +38,13 @@ void av1_tile_set_col(TileInfo *tile, const struct AV1Common *cm, int col); ...@@ -38,12 +38,13 @@ void av1_tile_set_col(TileInfo *tile, const struct AV1Common *cm, int col);
void av1_get_tile_n_bits(const int mi_cols, int *min_log2_tile_cols, void av1_get_tile_n_bits(const int mi_cols, int *min_log2_tile_cols,
int *max_log2_tile_cols); int *max_log2_tile_cols);
#if CONFIG_DEBLOCKING_ACROSS_TILES void av1_update_boundary_info(const struct AV1Common *cm,
void av1_update_tile_boundary_info(const struct AV1Common *cm, const TileInfo *const tile_info, int mi_row,
const TileInfo *const tile_info, int mi_row, int mi_col);
int mi_col);
#if CONFIG_LOOPFILTERING_ACROSS_TILES
int av1_disable_loopfilter_on_tile_boundary(const struct AV1Common *cm); int av1_disable_loopfilter_on_tile_boundary(const struct AV1Common *cm);
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
......
...@@ -2971,9 +2971,9 @@ static void read_tile_info(AV1Decoder *const pbi, ...@@ -2971,9 +2971,9 @@ static void read_tile_info(AV1Decoder *const pbi,
cm->tile_height = aom_rb_read_literal(rb, 6) + 1; cm->tile_height = aom_rb_read_literal(rb, 6) + 1;
} }
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
cm->loop_filter_across_tiles_enabled = aom_rb_read_bit(rb); cm->loop_filter_across_tiles_enabled = aom_rb_read_bit(rb);
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
cm->tile_width <<= cm->mib_size_log2; cm->tile_width <<= cm->mib_size_log2;
cm->tile_height <<= cm->mib_size_log2; cm->tile_height <<= cm->mib_size_log2;
...@@ -3010,9 +3010,9 @@ static void read_tile_info(AV1Decoder *const pbi, ...@@ -3010,9 +3010,9 @@ static void read_tile_info(AV1Decoder *const pbi,
cm->log2_tile_rows = aom_rb_read_bit(rb); cm->log2_tile_rows = aom_rb_read_bit(rb);
if (cm->log2_tile_rows) cm->log2_tile_rows += aom_rb_read_bit(rb); if (cm->log2_tile_rows) cm->log2_tile_rows += aom_rb_read_bit(rb);
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
cm->loop_filter_across_tiles_enabled = aom_rb_read_bit(rb); cm->loop_filter_across_tiles_enabled = aom_rb_read_bit(rb);
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
cm->tile_cols = 1 << cm->log2_tile_cols; cm->tile_cols = 1 << cm->log2_tile_cols;
cm->tile_rows = 1 << cm->log2_tile_rows; cm->tile_rows = 1 << cm->log2_tile_rows;
...@@ -3492,11 +3492,7 @@ static const uint8_t *decode_tiles(AV1Decoder *pbi, const uint8_t *data, ...@@ -3492,11 +3492,7 @@ static const uint8_t *decode_tiles(AV1Decoder *pbi, const uint8_t *data,
for (mi_col = tile_info.mi_col_start; mi_col < tile_info.mi_col_end; for (mi_col = tile_info.mi_col_start; mi_col < tile_info.mi_col_end;
mi_col += cm->mib_size) { mi_col += cm->mib_size) {
#if CONFIG_DEBLOCKING_ACROSS_TILES av1_update_boundary_info(cm, &tile_info, mi_row, mi_col);
if (av1_disable_loopfilter_on_tile_boundary(cm)) {
av1_update_tile_boundary_info(cm, &tile_info, mi_row, mi_col);
}
#endif // CONFIG_DEBLOCKING_ACROSS_TILES
decode_partition(pbi, &td->xd, decode_partition(pbi, &td->xd,
#if CONFIG_SUPERTX #if CONFIG_SUPERTX
......
...@@ -3663,9 +3663,9 @@ static void write_tile_info(const AV1_COMMON *const cm, ...@@ -3663,9 +3663,9 @@ static void write_tile_info(const AV1_COMMON *const cm,
if (cm->log2_tile_rows != 0) aom_wb_write_bit(wb, cm->log2_tile_rows != 1); if (cm->log2_tile_rows != 0) aom_wb_write_bit(wb, cm->log2_tile_rows != 1);
#endif // CONFIG_EXT_TILE #endif // CONFIG_EXT_TILE
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
aom_wb_write_bit(wb, cm->loop_filter_across_tiles_enabled); aom_wb_write_bit(wb, cm->loop_filter_across_tiles_enabled);
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
} }
static int get_refresh_mask(AV1_COMP *cpi) { static int get_refresh_mask(AV1_COMP *cpi) {
......
...@@ -4543,11 +4543,8 @@ static void encode_rd_sb_row(AV1_COMP *cpi, ThreadData *td, ...@@ -4543,11 +4543,8 @@ static void encode_rd_sb_row(AV1_COMP *cpi, ThreadData *td,
MODE_INFO **mi = cm->mi_grid_visible + idx_str; MODE_INFO **mi = cm->mi_grid_visible + idx_str;
PC_TREE *const pc_root = td->pc_root[cm->mib_size_log2 - MIN_MIB_SIZE_LOG2]; PC_TREE *const pc_root = td->pc_root[cm->mib_size_log2 - MIN_MIB_SIZE_LOG2];
#if CONFIG_DEBLOCKING_ACROSS_TILES av1_update_boundary_info(cm, tile_info, mi_row, mi_col);
if (av1_disable_loopfilter_on_tile_boundary(cm)) {
av1_update_tile_boundary_info(cm, tile_info, mi_row, mi_col);
}
#endif // CONFIG_DEBLOCKING_ACROSS_TILES
if (sf->adaptive_pred_interp_filter) { if (sf->adaptive_pred_interp_filter) {
for (i = 0; i < leaf_nodes; ++i) for (i = 0; i < leaf_nodes; ++i)
td->leaf_tree[i].pred_interp_filter = SWITCHABLE; td->leaf_tree[i].pred_interp_filter = SWITCHABLE;
......
...@@ -868,10 +868,10 @@ static void set_tile_info(AV1_COMP *cpi) { ...@@ -868,10 +868,10 @@ static void set_tile_info(AV1_COMP *cpi) {
cm->tile_height = ALIGN_POWER_OF_TWO(cm->tile_height, MAX_MIB_SIZE_LOG2); cm->tile_height = ALIGN_POWER_OF_TWO(cm->tile_height, MAX_MIB_SIZE_LOG2);
#endif // CONFIG_EXT_TILE #endif // CONFIG_EXT_TILE
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
cm->loop_filter_across_tiles_enabled = cm->loop_filter_across_tiles_enabled =
cpi->oxcf.loop_filter_across_tiles_enabled; cpi->oxcf.loop_filter_across_tiles_enabled;
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
} }
static void update_frame_size(AV1_COMP *cpi) { static void update_frame_size(AV1_COMP *cpi) {
......
...@@ -242,9 +242,9 @@ typedef struct AV1EncoderConfig { ...@@ -242,9 +242,9 @@ typedef struct AV1EncoderConfig {
int tile_columns; int tile_columns;
int tile_rows; int tile_rows;
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
int loop_filter_across_tiles_enabled; int loop_filter_across_tiles_enabled;
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
int max_threads; int max_threads;
......
...@@ -289,7 +289,7 @@ EXPERIMENT_LIST=" ...@@ -289,7 +289,7 @@ EXPERIMENT_LIST="
adapt_scan adapt_scan
filter_7bit filter_7bit
parallel_deblocking parallel_deblocking
deblocking_across_tiles loopfiltering_across_tiles
tile_groups tile_groups
ec_adapt ec_adapt
tempmv_signaling tempmv_signaling
......
...@@ -83,9 +83,9 @@ class AVxEncoderThreadTest ...@@ -83,9 +83,9 @@ class AVxEncoderThreadTest
encoder->Control(AV1E_SET_TILE_COLUMNS, 2); encoder->Control(AV1E_SET_TILE_COLUMNS, 2);
encoder->Control(AV1E_SET_TILE_ROWS, 0); encoder->Control(AV1E_SET_TILE_ROWS, 0);
#endif // CONFIG_AV1 && CONFIG_EXT_TILE #endif // CONFIG_AV1 && CONFIG_EXT_TILE
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
encoder->Control(AV1E_SET_TILE_LOOPFILTER, 0); encoder->Control(AV1E_SET_TILE_LOOPFILTER, 0);
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
encoder->Control(AOME_SET_CPUUSED, set_cpu_used_); encoder->Control(AOME_SET_CPUUSED, set_cpu_used_);
if (encoding_mode_ != ::libaom_test::kRealTime) { if (encoding_mode_ != ::libaom_test::kRealTime) {
encoder->Control(AOME_SET_ENABLEAUTOALTREF, 1); encoder->Control(AOME_SET_ENABLEAUTOALTREF, 1);
......
...@@ -52,9 +52,9 @@ class SuperframeTest ...@@ -52,9 +52,9 @@ class SuperframeTest
encoder->Control(AOME_SET_CPUUSED, 2); encoder->Control(AOME_SET_CPUUSED, 2);
encoder->Control(AV1E_SET_TILE_COLUMNS, n_tile_cols_); encoder->Control(AV1E_SET_TILE_COLUMNS, n_tile_cols_);
encoder->Control(AV1E_SET_TILE_ROWS, n_tile_rows_); encoder->Control(AV1E_SET_TILE_ROWS, n_tile_rows_);
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
encoder->Control(AV1E_SET_TILE_LOOPFILTER, 0); encoder->Control(AV1E_SET_TILE_LOOPFILTER, 0);
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
} }
} }
......
...@@ -62,9 +62,9 @@ class TileIndependenceTest ...@@ -62,9 +62,9 @@ class TileIndependenceTest
if (video->frame() == 1) { if (video->frame() == 1) {
encoder->Control(AV1E_SET_TILE_COLUMNS, n_tile_cols_); encoder->Control(AV1E_SET_TILE_COLUMNS, n_tile_cols_);
encoder->Control(AV1E_SET_TILE_ROWS, n_tile_rows_); encoder->Control(AV1E_SET_TILE_ROWS, n_tile_rows_);
#if CONFIG_DEBLOCKING_ACROSS_TILES #if CONFIG_LOOPFILTERING_ACROSS_TILES
encoder->Control(AV1E_SET_TILE_LOOPFILTER, 0); encoder->Control(AV1E_SET_TILE_LOOPFILTER, 0);
#endif // CONFIG_DEBLOCKING_ACROSS_TILES #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
SetCpuUsed(encoder); SetCpuUsed(encoder);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment