2
0

vp9_segmentation.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 VP9_ENCODER_VP9_SEGMENTATION_H_
  11. #define 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. // The values given for each segment can be either deltas (from the default
  24. // value chosen for the frame) or absolute values.
  25. //
  26. // Valid range for abs values is (0-127 for MB_LVL_ALT_Q), (0-63 for
  27. // SEGMENT_ALT_LF)
  28. // Valid range for delta values are (+/-127 for MB_LVL_ALT_Q), (+/-63 for
  29. // SEGMENT_ALT_LF)
  30. //
  31. // abs_delta = SEGMENT_DELTADATA (deltas) abs_delta = SEGMENT_ABSDATA (use
  32. // the absolute values given).
  33. void vp9_set_segment_data(struct segmentation *seg, signed char *feature_data,
  34. unsigned char abs_delta);
  35. void vp9_choose_segmap_coding_method(VP9_COMMON *cm, MACROBLOCKD *xd);
  36. void vp9_reset_segment_features(struct segmentation *seg);
  37. #ifdef __cplusplus
  38. } // extern "C"
  39. #endif
  40. #endif // VP9_ENCODER_VP9_SEGMENTATION_H_