Commit b7e8b3cb authored by Marco's avatar Marco
Browse files

vp9: Fix consec_zero_mv in skin detection.

This was missed in https://chromium-review.googlesource.com/#/c/340135/.

Change-Id: Iafc83141f4ff744819bdbde7d239678b215feb9d
parent 97d8adef
......@@ -112,7 +112,6 @@ int vp9_compute_skin_block(const uint8_t *y, const uint8_t *u, const uint8_t *v,
void vp9_compute_skin_map(VP9_COMP *const cpi, FILE *yuv_skinmap_file) {
int i, j, mi_row, mi_col, num_bl;
VP9_COMMON *const cm = &cpi->common;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
uint8_t *y;
const uint8_t *src_y = cpi->Source->y_buffer;
const uint8_t *src_u = cpi->Source->u_buffer;
......@@ -166,19 +165,17 @@ void vp9_compute_skin_map(VP9_COMP *const cpi, FILE *yuv_skinmap_file) {
} else {
int block_size = BLOCK_8X8;
int consec_zeromv = 0;
if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && cm->seg.enabled) {
int bl_index = mi_row * cm->mi_cols + mi_col;
int bl_index1 = bl_index + 1;
int bl_index2 = bl_index + cm->mi_cols;
int bl_index3 = bl_index2 + 1;
if (y_bsize == 8)
consec_zeromv = cr->consec_zero_mv[bl_index];
else
consec_zeromv = VPXMIN(cr->consec_zero_mv[bl_index],
VPXMIN(cr->consec_zero_mv[bl_index1],
VPXMIN(cr->consec_zero_mv[bl_index2],
cr->consec_zero_mv[bl_index3])));
}
int bl_index = mi_row * cm->mi_cols + mi_col;
int bl_index1 = bl_index + 1;
int bl_index2 = bl_index + cm->mi_cols;
int bl_index3 = bl_index2 + 1;
if (y_bsize == 8)
consec_zeromv = cpi->consec_zero_mv[bl_index];
else
consec_zeromv = VPXMIN(cpi->consec_zero_mv[bl_index],
VPXMIN(cpi->consec_zero_mv[bl_index1],
VPXMIN(cpi->consec_zero_mv[bl_index2],
cpi->consec_zero_mv[bl_index3])));
if (y_bsize == 16)
block_size = BLOCK_16X16;
is_skin = vp9_compute_skin_block(src_y, src_u, src_v, src_ystride,
......
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