Commit 4f9d8527 authored by James Zern's avatar James Zern
Browse files

vp8_skin_detection: add 'vp8_' prefix to public fns

BUG=webm:1438

Change-Id: I5feb31c254d02e116e624cfe702e73ba5a1f7aca
parent 98666368
......@@ -14,9 +14,9 @@
#include "vpx_mem/vpx_mem.h"
#include "vpx_util/vpx_write_yuv_frame.h"
int compute_skin_block(const uint8_t *y, const uint8_t *u, const uint8_t *v,
int stride, int strideuv, int consec_zeromv,
int curr_motion_magn) {
int vp8_compute_skin_block(const uint8_t *y, const uint8_t *u, const uint8_t *v,
int stride, int strideuv, int consec_zeromv,
int curr_motion_magn) {
// No skin if block has been zero/small motion for long consecutive time.
if (consec_zeromv > 60 && curr_motion_magn == 0) {
return 0;
......@@ -39,7 +39,7 @@ int compute_skin_block(const uint8_t *y, const uint8_t *u, const uint8_t *v,
#ifdef OUTPUT_YUV_SKINMAP
// For viewing skin map on input source.
void compute_skin_map(VP8_COMP *const cpi, FILE *yuv_skinmap_file) {
void vp8_compute_skin_map(VP8_COMP *const cpi, FILE *yuv_skinmap_file) {
int i, j, mb_row, mb_col, num_bl;
VP8_COMMON *const cm = &cpi->common;
uint8_t *y;
......@@ -74,8 +74,8 @@ void compute_skin_map(VP8_COMP *const cpi, FILE *yuv_skinmap_file) {
VPXMIN(cpi->consec_zero_last[bl_index1],
VPXMIN(cpi->consec_zero_last[bl_index2],
cpi->consec_zero_last[bl_index3])));
is_skin = compute_skin_block(src_y, src_u, src_v, src_ystride,
src_uvstride, consec_zeromv, 0);
is_skin = vp8_compute_skin_block(src_y, src_u, src_v, src_ystride,
src_uvstride, consec_zeromv, 0);
for (i = 0; i < 16; i++) {
for (j = 0; j < 16; j++) {
if (is_skin)
......
......@@ -22,13 +22,13 @@ extern "C" {
struct VP8_COMP;
int compute_skin_block(const uint8_t *y, const uint8_t *u, const uint8_t *v,
int stride, int strideuv, int consec_zeromv,
int curr_motion_magn);
int vp8_compute_skin_block(const uint8_t *y, const uint8_t *u, const uint8_t *v,
int stride, int strideuv, int consec_zeromv,
int curr_motion_magn);
#ifdef OUTPUT_YUV_SKINMAP
// For viewing skin map on input source.
void compute_skin_map(struct VP8_COMP *const cpi, FILE *yuv_skinmap_file);
void vp8_compute_skin_map(struct VP8_COMP *const cpi, FILE *yuv_skinmap_file);
#endif
#ifdef __cplusplus
......
......@@ -4405,7 +4405,7 @@ static void encode_frame_to_data_rate(VP8_COMP *cpi, size_t *size,
#ifdef OUTPUT_YUV_SKINMAP
if (cpi->common.current_video_frame > 1) {
compute_skin_map(cpi, yuv_skinmap_file);
vp8_compute_skin_map(cpi, yuv_skinmap_file);
}
#endif
......
......@@ -691,7 +691,7 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
x->is_skin = 0;
if (!cpi->oxcf.screen_content_mode) {
int block_index = mb_row * cpi->common.mb_cols + mb_col;
x->is_skin = compute_skin_block(
x->is_skin = vp8_compute_skin_block(
x->src.y_buffer, x->src.u_buffer, x->src.v_buffer, x->src.y_stride,
x->src.uv_stride, cpi->consec_zero_last[block_index], 0);
}
......
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