Commit 6952f450 authored by Cheng Chen's avatar Cheng Chen

Fix a bug for directional deblocking filter

Fix width/height for U, V planes.
Previously, width/height will be right shifted multiple times
in the loop.

Change-Id: I3581cb948c1918e39c30eb5c99ac958df5d3ed31
parent a10981b1
......@@ -897,6 +897,9 @@ static void filter_selectively_horiz(
unsigned int mask;
int count;
#if CONFIG_LPF_DIRECT
// scale for u, v plane
width >>= ss_x;
height >>= ss_y;
int idx_c = 0;
#endif
......@@ -927,10 +930,6 @@ static void filter_selectively_horiz(
const int row = (mi_row + idx_r) * MI_SIZE >> ss_y;
const int col = (mi_col + idx_c) * MI_SIZE >> ss_x;
// scale for u, v plane
width >>= ss_x;
height >>= ss_y;
// Next block's thresholds.
const loop_filter_thresh *lfin = lfi_n->lfthr + *(lfl + 1);
......@@ -1866,6 +1865,9 @@ static void filter_selectively_vert(
) {
unsigned int mask;
#if CONFIG_LPF_DIRECT
// scale for u, v plane
width >>= ss_x;
height >>= ss_y;
int idx_c = 0;
#endif
......@@ -1886,10 +1888,6 @@ static void filter_selectively_vert(
const int row = (mi_row + idx_r) * MI_SIZE >> ss_y;
const int col = (mi_col + idx_c) * MI_SIZE >> ss_x;
// scale for u, v plane
width >>= ss_x;
height >>= ss_y;
// Could use asymmetric length in the future
assert(left_filt_len == right_filt_len);
(void)right_filt_len;
......
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