Commit 440d4254 authored by Jingning Han's avatar Jingning Han

Account for the 64x64 proc block constrain in obmc masking

Make the codec account for the 64x64 processing unit constraint
when producing the mask for overlapped filter.

Change-Id: I3e596492ae522abe678369b0c9710441549e817e
parent 501294ce
......@@ -1984,7 +1984,8 @@ void av1_build_obmc_inter_prediction(const AV1_COMMON *cm, MACROBLOCKD *xd,
// handle above row
if (xd->up_available) {
const int overlap = num_4x4_blocks_high_lookup[bsize] * 2;
const int overlap =
AOMMIN(block_size_high[bsize] >> 1, block_size_high[BLOCK_64X64] >> 1);
const int miw = AOMMIN(xd->n8_w, cm->mi_cols - mi_col);
const int mi_row_offset = -1;
const int neighbor_limit = max_neighbor_obmc[b_width_log2_lookup[bsize]];
......@@ -2006,7 +2007,9 @@ void av1_build_obmc_inter_prediction(const AV1_COMMON *cm, MACROBLOCKD *xd,
#endif
const BLOCK_SIZE a_bsize = AOMMAX(BLOCK_8X8, above_mbmi->sb_type);
const int mi_step = AOMMIN(xd->n8_w, mi_size_wide[a_bsize]);
const int above_step =
AOMMIN(mi_size_wide[a_bsize], mi_size_wide[BLOCK_64X64]);
const int mi_step = AOMMIN(xd->n8_w, above_step);
if (is_neighbor_overlappable(above_mbmi)) {
neighbor_count++;
......@@ -2041,7 +2044,8 @@ void av1_build_obmc_inter_prediction(const AV1_COMMON *cm, MACROBLOCKD *xd,
// handle left column
if (xd->left_available) {
const int overlap = num_4x4_blocks_wide_lookup[bsize] * 2;
const int overlap =
AOMMIN(block_size_wide[bsize] >> 1, block_size_wide[BLOCK_64X64] >> 1);
const int mih = AOMMIN(xd->n8_h, cm->mi_rows - mi_row);
const int mi_col_offset = -1;
const int neighbor_limit = max_neighbor_obmc[b_height_log2_lookup[bsize]];
......@@ -2063,7 +2067,9 @@ void av1_build_obmc_inter_prediction(const AV1_COMMON *cm, MACROBLOCKD *xd,
#endif
const BLOCK_SIZE l_bsize = AOMMAX(BLOCK_8X8, left_mbmi->sb_type);
const int mi_step = AOMMIN(xd->n8_h, mi_size_high[l_bsize]);
const int left_step =
AOMMIN(mi_size_high[l_bsize], mi_size_high[BLOCK_64X64]);
const int mi_step = AOMMIN(xd->n8_h, left_step);
if (is_neighbor_overlappable(left_mbmi)) {
neighbor_count++;
......
......@@ -11984,7 +11984,8 @@ static void calc_target_weighted_pred(const AV1_COMMON *cm, const MACROBLOCK *x,
// handle above row
if (xd->up_available) {
const int overlap = num_4x4_blocks_high_lookup[bsize] * 2;
const int overlap =
AOMMIN(block_size_high[bsize] >> 1, block_size_high[BLOCK_64X64] >> 1);
const int miw = AOMMIN(xd->n8_w, cm->mi_cols - mi_col);
const int mi_row_offset = -1;
const uint8_t *const mask1d = av1_get_obmc_mask(overlap);
......@@ -12004,7 +12005,9 @@ static void calc_target_weighted_pred(const AV1_COMMON *cm, const MACROBLOCK *x,
&xd->mi[mi_col_offset + 1 + mi_row_offset * xd->mi_stride]->mbmi;
#endif
const BLOCK_SIZE a_bsize = AOMMAX(above_mbmi->sb_type, BLOCK_8X8);
const int mi_step = AOMMIN(xd->n8_w, mi_size_wide[a_bsize]);
const int above_step =
AOMMIN(mi_size_wide[a_bsize], mi_size_wide[BLOCK_64X64]);
const int mi_step = AOMMIN(xd->n8_w, above_step);
const int neighbor_bw = mi_step * MI_SIZE;
if (is_neighbor_overlappable(above_mbmi)) {
......@@ -12063,7 +12066,8 @@ static void calc_target_weighted_pred(const AV1_COMMON *cm, const MACROBLOCK *x,
// handle left column
if (xd->left_available) {
const int overlap = num_4x4_blocks_wide_lookup[bsize] * 2;
const int overlap =
AOMMIN(block_size_wide[bsize] >> 1, block_size_wide[BLOCK_64X64] >> 1);
const int mih = AOMMIN(xd->n8_h, cm->mi_rows - mi_row);
const int mi_col_offset = -1;
const uint8_t *const mask1d = av1_get_obmc_mask(overlap);
......@@ -12084,7 +12088,9 @@ static void calc_target_weighted_pred(const AV1_COMMON *cm, const MACROBLOCK *x,
&xd->mi[mi_col_offset + (mi_row_offset + 1) * xd->mi_stride]->mbmi;
#endif
const BLOCK_SIZE l_bsize = AOMMAX(left_mbmi->sb_type, BLOCK_8X8);
const int mi_step = AOMMIN(xd->n8_h, mi_size_high[l_bsize]);
const int left_step =
AOMMIN(mi_size_high[l_bsize], mi_size_high[BLOCK_64X64]);
const int mi_step = AOMMIN(xd->n8_h, left_step);
const int neighbor_bh = mi_step * MI_SIZE;
if (is_neighbor_overlappable(left_mbmi)) {
......
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