vp8: modifcatiion to skin map computation.
For each block in pickinter: use average of four middle pixels (instead of single pixel) to set skin map. This can help a little in reducing false skin detection in some cases. Change-Id: Ic247af75e9c2948b08ab977a39e061adacd8ec97
This commit is contained in:
Родитель
f1d090e2f5
Коммит
ee380cc5c4
|
@ -813,9 +813,18 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
|
|||
|
||||
// Check if current macroblock is in skin area.
|
||||
{
|
||||
const int y = x->src.y_buffer[7 * x->src.y_stride + 7];
|
||||
const int cb = x->src.u_buffer[3 * x->src.uv_stride + 3];
|
||||
const int cr = x->src.v_buffer[3 * x->src.uv_stride + 3];
|
||||
const int y = (x->src.y_buffer[7 * x->src.y_stride + 7] +
|
||||
x->src.y_buffer[7 * x->src.y_stride + 8] +
|
||||
x->src.y_buffer[8 * x->src.y_stride + 7] +
|
||||
x->src.y_buffer[8 * x->src.y_stride + 8]) >> 2;
|
||||
const int cb = (x->src.u_buffer[3 * x->src.uv_stride + 3] +
|
||||
x->src.u_buffer[3 * x->src.uv_stride + 4] +
|
||||
x->src.u_buffer[4 * x->src.uv_stride + 3] +
|
||||
x->src.u_buffer[4 * x->src.uv_stride + 4]) >> 2;
|
||||
const int cr = (x->src.v_buffer[3 * x->src.uv_stride + 3] +
|
||||
x->src.v_buffer[3 * x->src.uv_stride + 4] +
|
||||
x->src.v_buffer[4 * x->src.uv_stride + 3] +
|
||||
x->src.v_buffer[4 * x->src.uv_stride + 4]) >> 2;
|
||||
x->is_skin = 0;
|
||||
if (!cpi->oxcf.screen_content_mode)
|
||||
x->is_skin = is_skin_color(y, cb, cr);
|
||||
|
|
Загрузка…
Ссылка в новой задаче