michael@0: /* michael@0: * Copyright (c) 2010 The WebM project authors. All Rights Reserved. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license michael@0: * that can be found in the LICENSE file in the root of the source michael@0: * tree. An additional intellectual property rights grant can be found michael@0: * in the file PATENTS. All contributing project authors may michael@0: * be found in the AUTHORS file in the root of the source tree. michael@0: */ michael@0: michael@0: michael@0: #ifndef VP9_ENCODER_VP9_SEGMENTATION_H_ michael@0: #define VP9_ENCODER_VP9_SEGMENTATION_H_ michael@0: michael@0: #include "vp9/common/vp9_blockd.h" michael@0: #include "vp9/encoder/vp9_onyx_int.h" michael@0: michael@0: void vp9_enable_segmentation(VP9_PTR ptr); michael@0: void vp9_disable_segmentation(VP9_PTR ptr); michael@0: michael@0: // Valid values for a segment are 0 to 3 michael@0: // Segmentation map is arrange as [Rows][Columns] michael@0: void vp9_set_segmentation_map(VP9_PTR ptr, unsigned char *segmentation_map); michael@0: michael@0: // The values given for each segment can be either deltas (from the default michael@0: // value chosen for the frame) or absolute values. michael@0: // michael@0: // Valid range for abs values is (0-127 for MB_LVL_ALT_Q), (0-63 for michael@0: // SEGMENT_ALT_LF) michael@0: // Valid range for delta values are (+/-127 for MB_LVL_ALT_Q), (+/-63 for michael@0: // SEGMENT_ALT_LF) michael@0: // michael@0: // abs_delta = SEGMENT_DELTADATA (deltas) abs_delta = SEGMENT_ABSDATA (use michael@0: // the absolute values given). michael@0: void vp9_set_segment_data(VP9_PTR ptr, signed char *feature_data, michael@0: unsigned char abs_delta); michael@0: michael@0: void vp9_choose_segmap_coding_method(VP9_COMP *cpi); michael@0: michael@0: #endif // VP9_ENCODER_VP9_SEGMENTATION_H_