Commit eb3be221 authored by Ryan's avatar Ryan Committed by Yaowu Xu

fix a bug for chroma mi block calculation in deblocking filter

for sub8x8 block, chroma prediciton mode is obtained from the
bottom/right mi structure of the co-located 8x8 luma block. so for
chroma plane, mi_row and mi_col should map to the bottom/right mi
structure, i.e, both mi_row and mi_col should be odd number for chroma
plane. the original implementaiton always map to the top/left mi
structure of the co-located 8x8 block. this patch fixes that.

BUG=aomedia:1087

Change-Id: Id5482c5a61828e3c13adb985bd2f0606eb05a3bd
parent 8f779c1f
...@@ -2061,8 +2061,12 @@ static void set_lpf_parameters( ...@@ -2061,8 +2061,12 @@ static void set_lpf_parameters(
const uint32_t scale_horz = plane_ptr->subsampling_x; const uint32_t scale_horz = plane_ptr->subsampling_x;
const uint32_t scale_vert = plane_ptr->subsampling_y; const uint32_t scale_vert = plane_ptr->subsampling_y;
const int mi_row = (y << scale_vert) >> MI_SIZE_LOG2; // for sub8x8 block, chroma prediction mode is obtained from the bottom/right
const int mi_col = (x << scale_horz) >> MI_SIZE_LOG2; // mi structure of the co-located 8x8 luma block. so for chroma plane, mi_row
// and mi_col should map to the bottom/right mi structure, i.e, both mi_row
// and mi_col should be odd number for chroma plane.
const int mi_row = scale_vert | ((y << scale_vert) >> MI_SIZE_LOG2);
const int mi_col = scale_horz | ((x << scale_horz) >> MI_SIZE_LOG2);
MODE_INFO **mi = cm->mi_grid_visible + mi_row * cm->mi_stride + mi_col; MODE_INFO **mi = cm->mi_grid_visible + mi_row * cm->mi_stride + mi_col;
const MB_MODE_INFO *mbmi = &mi[0]->mbmi; const MB_MODE_INFO *mbmi = &mi[0]->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