Commit 935a837c authored by hui su's avatar hui su

Fix a couple of minor bugs in vp10_has_right and vp10_has_bottom

The above-right and left-bottom pixels were sometimes not used even
though they are available. Results on lowres_all and hdres_all are
mostly neutral.

Change-Id: Ic13533dd498442ad5592b83bb5fabf053cc8e8f0
parent 95428a59
......@@ -107,6 +107,10 @@ static int vp10_has_right(BLOCK_SIZE bsize, int mi_row, int mi_col,
const int w = VPXMAX(num_4x4_blocks_wide_lookup[bsize] >> ss_x, 1);
const int step = 1 << txsz;
// Handle block size 4x8 and 4x4
if (ss_x == 0 && num_4x4_blocks_wide_lookup[bsize] < 2 && x == 0)
return 1;
if (y == 0) {
const int hl = mi_height_log2_lookup[bsize];
const uint8_t *order = orders[bsize];
......@@ -144,6 +148,13 @@ static int vp10_has_bottom(BLOCK_SIZE bsize, int mi_row, int mi_col,
const uint8_t *order = orders[bsize];
int my_order, bl_order;
// Handle block size 8x4 and 4x4
if (ss_y == 0 && num_4x4_blocks_high_lookup[bsize] < 2 && y == 0)
return 1;
if (y + step < h)
return 1;
mi_row = (mi_row & 7) >> hl;
mi_col = (mi_col & 7) >> wl;
......@@ -154,9 +165,6 @@ static int vp10_has_bottom(BLOCK_SIZE bsize, int mi_row, int mi_col,
if (((mi_row + 1) << hl) >= 8)
return 0;
if (y + step < h)
return 1;
my_order = order[((mi_row + 0) << (3 - wl)) + mi_col + 0];
bl_order = order[((mi_row + 1) << (3 - wl)) + mi_col - 1];
......
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