2
0

vp8_skin_detection.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #ifndef VPX_VP8_COMMON_VP8_SKIN_DETECTION_H_
  11. #define VPX_VP8_COMMON_VP8_SKIN_DETECTION_H_
  12. #include "vp8/encoder/onyx_int.h"
  13. #include "vpx/vpx_integer.h"
  14. #include "vpx_dsp/skin_detection.h"
  15. #include "vpx_scale/yv12config.h"
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. struct VP8_COMP;
  20. typedef enum {
  21. // Skin detection based on 8x8 block. If two of them are identified as skin,
  22. // the macroblock is marked as skin.
  23. SKIN_8X8,
  24. // Skin detection based on 16x16 block.
  25. SKIN_16X16
  26. } SKIN_DETECTION_BLOCK_SIZE;
  27. int vp8_compute_skin_block(const uint8_t *y, const uint8_t *u, const uint8_t *v,
  28. int stride, int strideuv,
  29. SKIN_DETECTION_BLOCK_SIZE bsize, int consec_zeromv,
  30. int curr_motion_magn);
  31. #ifdef OUTPUT_YUV_SKINMAP
  32. // For viewing skin map on input source.
  33. void vp8_compute_skin_map(struct VP8_COMP *const cpi, FILE *yuv_skinmap_file);
  34. #endif
  35. #ifdef __cplusplus
  36. } // extern "C"
  37. #endif
  38. #endif // VPX_VP8_COMMON_VP8_SKIN_DETECTION_H_