clean up the logic for generating tile boundary information
the tile boundary info flag was updated for each mi data structure which starts from cm->mi. there is the second level buffer which contains the pointer to the mi structure. it starts at cm->mi_grid_visible. for every coded block, pointer in the second level buffer only points to the top left mi structure of that particular coded block. in order to get the correct boundary info for each mi. we have to access the mi structure from cm->mi instead of cm->mi_grid_visible. this change doesn't impact the result, it only cleans up the logic. Change-Id: I8f883a284f600e3075754124b8197d78898a56be
This commit is contained in:
Родитель
6eb35eb45f
Коммит
639a9ebacf
|
@ -1600,8 +1600,9 @@ void av1_filter_block_plane_non420_ver(AV1_COMMON *const cm,
|
|||
// Disable filtering on the leftmost column or tile boundary
|
||||
unsigned int border_mask = ~(mi_col == 0);
|
||||
#if CONFIG_LOOPFILTERING_ACROSS_TILES
|
||||
MODE_INFO *const mi = cm->mi + (mi_row + idx_r) * cm->mi_stride + mi_col;
|
||||
if (av1_disable_loopfilter_on_tile_boundary(cm) &&
|
||||
((mib[0]->mbmi.boundary_info & TILE_LEFT_BOUNDARY) != 0)) {
|
||||
((mi->mbmi.boundary_info & TILE_LEFT_BOUNDARY) != 0)) {
|
||||
border_mask = 0xfffffffe;
|
||||
}
|
||||
#endif // CONFIG_LOOPFILTERING_ACROSS_TILES
|
||||
|
@ -1652,7 +1653,7 @@ void av1_filter_block_plane_non420_hor(AV1_COMMON *const cm,
|
|||
|
||||
#if CONFIG_LOOPFILTERING_ACROSS_TILES
|
||||
// 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 + idx_r) * cm->mi_stride + mi_col;
|
||||
if ((av1_disable_loopfilter_on_tile_boundary(cm) &&
|
||||
(mi->mbmi.boundary_info & TILE_ABOVE_BOUNDARY)) ||
|
||||
(mi_row + idx_r == 0)) {
|
||||
|
@ -2109,11 +2110,12 @@ static void set_lpf_parameters(
|
|||
// prepare outer edge parameters. deblock the edge if it's an edge of a TU
|
||||
if (coord) {
|
||||
#if CONFIG_LOOPFILTERING_ACROSS_TILES
|
||||
MODE_INFO *const mi = cm->mi + mi_row * cm->mi_stride + mi_col;
|
||||
if (!av1_disable_loopfilter_on_tile_boundary(cm) ||
|
||||
((VERT_EDGE == edgeDir) &&
|
||||
(0 == (ppCurr[0]->mbmi.boundary_info & TILE_LEFT_BOUNDARY))) ||
|
||||
(0 == (mi->mbmi.boundary_info & TILE_LEFT_BOUNDARY))) ||
|
||||
((HORZ_EDGE == edgeDir) &&
|
||||
(0 == (ppCurr[0]->mbmi.boundary_info & TILE_ABOVE_BOUNDARY))))
|
||||
(0 == (mi->mbmi.boundary_info & TILE_ABOVE_BOUNDARY))))
|
||||
#endif // CONFIG_LOOPFILTERING_ACROSS_TILES
|
||||
{
|
||||
const int32_t tuEdge =
|
||||
|
|
|
@ -226,27 +226,25 @@ void av1_cdef_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
|
|||
nvb = AOMMIN(MAX_MIB_SIZE, cm->mi_rows - MAX_MIB_SIZE * sbr);
|
||||
int tile_top, tile_left, tile_bottom, tile_right;
|
||||
int mi_idx = MAX_MIB_SIZE * sbr * cm->mi_stride + MAX_MIB_SIZE * sbc;
|
||||
BOUNDARY_TYPE boundary_tl =
|
||||
cm->mi_grid_visible[MAX_MIB_SIZE * sbr * cm->mi_stride +
|
||||
MAX_MIB_SIZE * sbc]
|
||||
->mbmi.boundary_info;
|
||||
MODE_INFO *const mi_tl = cm->mi + mi_idx;
|
||||
BOUNDARY_TYPE boundary_tl = mi_tl->mbmi.boundary_info;
|
||||
tile_top = boundary_tl & TILE_ABOVE_BOUNDARY;
|
||||
tile_left = boundary_tl & TILE_LEFT_BOUNDARY;
|
||||
/* Right and bottom information appear unreliable, so we use the top
|
||||
and left flags for the next superblocks. */
|
||||
|
||||
if (sbr != nvsb - 1 &&
|
||||
cm->mi_grid_visible[mi_idx + MAX_MIB_SIZE * cm->mi_stride])
|
||||
tile_bottom = cm->mi_grid_visible[mi_idx + MAX_MIB_SIZE * cm->mi_stride]
|
||||
->mbmi.boundary_info &
|
||||
TILE_ABOVE_BOUNDARY;
|
||||
(&cm->mi[mi_idx + (MAX_MIB_SIZE - 1) * cm->mi_stride]))
|
||||
tile_bottom = cm->mi[mi_idx + (MAX_MIB_SIZE - 1) * cm->mi_stride]
|
||||
.mbmi.boundary_info &
|
||||
TILE_BOTTOM_BOUNDARY;
|
||||
else
|
||||
tile_bottom = 1;
|
||||
if (sbc != nhsb - 1 && cm->mi_grid_visible[mi_idx + MAX_MIB_SIZE])
|
||||
tile_right =
|
||||
cm->mi_grid_visible[mi_idx + MAX_MIB_SIZE]->mbmi.boundary_info &
|
||||
TILE_LEFT_BOUNDARY;
|
||||
|
||||
if (sbc != nhsb - 1 && (&cm->mi[mi_idx + MAX_MIB_SIZE - 1]))
|
||||
tile_right = cm->mi[mi_idx + MAX_MIB_SIZE - 1].mbmi.boundary_info &
|
||||
TILE_RIGHT_BOUNDARY;
|
||||
else
|
||||
tile_right = 1;
|
||||
|
||||
const int mbmi_cdef_strength =
|
||||
cm->mi_grid_visible[MAX_MIB_SIZE * sbr * cm->mi_stride +
|
||||
MAX_MIB_SIZE * sbc]
|
||||
|
|
|
@ -82,8 +82,10 @@ void av1_update_boundary_info(const struct AV1Common *cm,
|
|||
const TileInfo *const tile_info, int mi_row,
|
||||
int mi_col) {
|
||||
int row, col;
|
||||
for (row = mi_row; row < (mi_row + cm->mib_size); row++)
|
||||
for (col = mi_col; col < (mi_col + cm->mib_size); col++) {
|
||||
for (row = mi_row; ((row < (mi_row + cm->mib_size)) && (row < cm->mi_rows));
|
||||
row++)
|
||||
for (col = mi_col; ((col < (mi_col + cm->mib_size)) && (col < cm->mi_cols));
|
||||
col++) {
|
||||
MODE_INFO *const mi = cm->mi + row * cm->mi_stride + col;
|
||||
mi->mbmi.boundary_info = 0;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче