ref: 4dcbf0a809d63752e784abe19ac2c04c95561235
parent: b6d874d73bc2514c99603eecf025ab882567e549
parent: ee380cc5c4f5e89d20597919eac93a2506fe330e
author: Marco Paniconi <[email protected]>
date: Fri Aug 28 17:49:56 EDT 2015
Merge "vp8: modifcatiion to skin map computation."
--- a/vp8/encoder/pickinter.c
+++ b/vp8/encoder/pickinter.c
@@ -813,9 +813,18 @@
// 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);