vp9_segmentation.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright (c) 2010 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_VP9_ENCODER_VP9_SEGMENTATION_H_
  11. #define VPX_VP9_ENCODER_VP9_SEGMENTATION_H_
  12. #include "vp9/common/vp9_blockd.h"
  13. #include "vp9/encoder/vp9_encoder.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. void vp9_enable_segmentation(struct segmentation *seg);
  18. void vp9_disable_segmentation(struct segmentation *seg);
  19. void vp9_disable_segfeature(struct segmentation *seg, int segment_id,
  20. SEG_LVL_FEATURES feature_id);
  21. void vp9_clear_segdata(struct segmentation *seg, int segment_id,
  22. SEG_LVL_FEATURES feature_id);
  23. void vp9_psnr_aq_mode_setup(struct segmentation *seg);
  24. void vp9_perceptual_aq_mode_setup(struct VP9_COMP *cpi,
  25. struct segmentation *seg);
  26. // The values given for each segment can be either deltas (from the default
  27. // value chosen for the frame) or absolute values.
  28. //
  29. // Valid range for abs values is (0-127 for MB_LVL_ALT_Q), (0-63 for
  30. // SEGMENT_ALT_LF)
  31. // Valid range for delta values are (+/-127 for MB_LVL_ALT_Q), (+/-63 for
  32. // SEGMENT_ALT_LF)
  33. //
  34. // abs_delta = SEGMENT_DELTADATA (deltas) abs_delta = SEGMENT_ABSDATA (use
  35. // the absolute values given).
  36. void vp9_set_segment_data(struct segmentation *seg, signed char *feature_data,
  37. unsigned char abs_delta);
  38. void vp9_choose_segmap_coding_method(VP9_COMMON *cm, MACROBLOCKD *xd);
  39. void vp9_reset_segment_features(struct segmentation *seg);
  40. #ifdef __cplusplus
  41. } // extern "C"
  42. #endif
  43. #endif // VPX_VP9_ENCODER_VP9_SEGMENTATION_H_