/* * Copyright (c) 2015 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
for (i = mi_row; i < mi_row_limit; i += fac) {
num_bl = 0; for (j = mi_col; j < mi_col_limit; j += fac) { int consec_zeromv = 0; int bl_index = i * cm->mi_cols + j; int bl_index1 = bl_index + 1; int bl_index2 = bl_index + cm->mi_cols; int bl_index3 = bl_index2 + 1; // Don't detect skin on the boundary. if (i == 0 || j == 0) continue; if (bsize == BLOCK_8X8)
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])));
cpi->skin_map[bl_index] =
vp9_compute_skin_block(src_y, src_u, src_v, src_ystride, src_uvstride,
bsize, consec_zeromv, 0);
num_bl++;
src_y += y_bsize;
src_u += uv_bsize;
src_v += uv_bsize;
}
src_y += (src_ystride << shy) - (num_bl << shy);
src_u += (src_uvstride << shuv) - (num_bl << shuv);
src_v += (src_uvstride << shuv) - (num_bl << shuv);
}
// Remove isolated skin blocks (none of its neighbors are skin) and isolated // non-skin blocks (all of its neighbors are skin). // Skip 4 corner blocks which have only 3 neighbors to remove isolated skin // blocks. Skip superblock borders to remove isolated non-skin blocks. for (i = mi_row; i < mi_row_limit; i += fac) { for (j = mi_col; j < mi_col_limit; j += fac) { int bl_index = i * cm->mi_cols + j; int num_neighbor = 0; int mi, mj; int non_skin_threshold = 8; // Skip 4 corners. if ((i == mi_row && (j == mi_col || j == mi_col_limit - fac)) ||
(i == mi_row_limit - fac && (j == mi_col || j == mi_col_limit - fac))) continue; // There are only 5 neighbors for non-skin blocks on the border. if (i == mi_row || i == mi_row_limit - fac || j == mi_col ||
j == mi_col_limit - fac)
non_skin_threshold = 5;
for (mi = -fac; mi <= fac; mi += fac) { for (mj = -fac; mj <= fac; mj += fac) { if (i + mi >= mi_row && i + mi < mi_row_limit && j + mj >= mi_col &&
j + mj < mi_col_limit) { int bl_neighbor_index = (i + mi) * cm->mi_cols + j + mj; if (cpi->skin_map[bl_neighbor_index]) num_neighbor++;
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.