1 /* 2 * Copyright (c) 2015 The WebM project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef VPX_VP8_COMMON_VP8_SKIN_DETECTION_H_ 12 #define VPX_VP8_COMMON_VP8_SKIN_DETECTION_H_ 13 14 #include "vp8/encoder/onyx_int.h" 15 #include "vpx/vpx_integer.h" 16 #include "vpx_dsp/skin_detection.h" 17 #include "vpx_scale/yv12config.h" 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 struct VP8_COMP; 24 25 typedef enum { 26 // Skin detection based on 8x8 block. If two of them are identified as skin, 27 // the macroblock is marked as skin. 28 SKIN_8X8, 29 // Skin detection based on 16x16 block. 30 SKIN_16X16 31 } SKIN_DETECTION_BLOCK_SIZE; 32 33 int vp8_compute_skin_block(const uint8_t *y, const uint8_t *u, const uint8_t *v, 34 int stride, int strideuv, 35 SKIN_DETECTION_BLOCK_SIZE bsize, int consec_zeromv, 36 int curr_motion_magn); 37 38 #ifdef OUTPUT_YUV_SKINMAP 39 // For viewing skin map on input source. 40 void vp8_compute_skin_map(struct VP8_COMP *const cpi, FILE *yuv_skinmap_file); 41 #endif 42 43 #ifdef __cplusplus 44 } // extern "C" 45 #endif 46 47 #endif // VPX_VP8_COMMON_VP8_SKIN_DETECTION_H_ 48