Rework sb_compute_dering_list()
Use a unified is_8x8_block_skip() to find if an 8x8 block is coded in skip mode. This covers cases w/o cb4x4 mode turned on. Change-Id: I94b72ca7cf0fadbb61bfaa8b97f482feb94fd0f2
This commit is contained in:
Родитель
03de1b2886
Коммит
8a4de2182b
|
@ -44,6 +44,16 @@ int sb_all_skip(const AV1_COMMON *const cm, int mi_row, int mi_col) {
|
|||
return skip;
|
||||
}
|
||||
|
||||
static int is_8x8_block_skip(MODE_INFO **grid, int mi_row, int mi_col,
|
||||
int mi_stride) {
|
||||
int is_skip = 1;
|
||||
for (int r = 0; r < mi_size_high[BLOCK_8X8]; ++r)
|
||||
for (int c = 0; c < mi_size_wide[BLOCK_8X8]; ++c)
|
||||
is_skip &= grid[(mi_row + r) * mi_stride + (mi_col + c)]->mbmi.skip;
|
||||
|
||||
return is_skip;
|
||||
}
|
||||
|
||||
int sb_compute_dering_list(const AV1_COMMON *const cm, int mi_row, int mi_col,
|
||||
dering_list *dlist) {
|
||||
int r, c;
|
||||
|
@ -63,14 +73,17 @@ int sb_compute_dering_list(const AV1_COMMON *const cm, int mi_row, int mi_col,
|
|||
|
||||
const int r_step = mi_size_high[BLOCK_8X8];
|
||||
const int c_step = mi_size_wide[BLOCK_8X8];
|
||||
const int r_shift = (r_step == 2);
|
||||
const int c_shift = (c_step == 2);
|
||||
|
||||
assert(r_step == 1 || r_step == 2);
|
||||
assert(c_step == 1 || c_step == 2);
|
||||
|
||||
for (r = 0; r < maxr; r += r_step) {
|
||||
MODE_INFO **grid_row;
|
||||
grid_row = &grid[(mi_row + r) * cm->mi_stride + mi_col];
|
||||
for (c = 0; c < maxc; c += c_step) {
|
||||
if (!grid_row[c]->mbmi.skip) {
|
||||
dlist[count].by = r;
|
||||
dlist[count].bx = c;
|
||||
if (!is_8x8_block_skip(grid, mi_row + r, mi_col + c, cm->mi_stride)) {
|
||||
dlist[count].by = r >> r_shift;
|
||||
dlist[count].bx = c >> c_shift;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче