| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 | 11 |
| 12 #ifndef VP9_ENCODER_VP9_SEGMENTATION_H_ | 12 #ifndef VP9_ENCODER_VP9_SEGMENTATION_H_ |
| 13 #define VP9_ENCODER_VP9_SEGMENTATION_H_ | 13 #define VP9_ENCODER_VP9_SEGMENTATION_H_ |
| 14 | 14 |
| 15 #include "vp9/common/vp9_blockd.h" | 15 #include "vp9/common/vp9_blockd.h" |
| 16 #include "vp9/encoder/vp9_onyx_int.h" | 16 #include "vp9/encoder/vp9_onyx_int.h" |
| 17 | 17 |
| 18 #ifdef __cplusplus | 18 #ifdef __cplusplus |
| 19 extern "C" { | 19 extern "C" { |
| 20 #endif | 20 #endif |
| 21 | 21 |
| 22 void vp9_enable_segmentation(VP9_PTR ptr); | 22 void vp9_enable_segmentation(struct segmentation *seg); |
| 23 void vp9_disable_segmentation(VP9_PTR ptr); | 23 void vp9_disable_segmentation(struct segmentation *seg); |
| 24 | 24 |
| 25 void vp9_disable_segfeature(struct segmentation *seg, | 25 void vp9_disable_segfeature(struct segmentation *seg, |
| 26 int segment_id, | 26 int segment_id, |
| 27 SEG_LVL_FEATURES feature_id); | 27 SEG_LVL_FEATURES feature_id); |
| 28 void vp9_clear_segdata(struct segmentation *seg, | 28 void vp9_clear_segdata(struct segmentation *seg, |
| 29 int segment_id, | 29 int segment_id, |
| 30 SEG_LVL_FEATURES feature_id); | 30 SEG_LVL_FEATURES feature_id); |
| 31 // Valid values for a segment are 0 to 3 | 31 // Valid values for a segment are 0 to 3 |
| 32 // Segmentation map is arrange as [Rows][Columns] | 32 // Segmentation map is arrange as [Rows][Columns] |
| 33 void vp9_set_segmentation_map(VP9_PTR ptr, unsigned char *segmentation_map); | 33 void vp9_set_segmentation_map(VP9_COMP *cpi, unsigned char *segmentation_map); |
| 34 | 34 |
| 35 // The values given for each segment can be either deltas (from the default | 35 // The values given for each segment can be either deltas (from the default |
| 36 // value chosen for the frame) or absolute values. | 36 // value chosen for the frame) or absolute values. |
| 37 // | 37 // |
| 38 // Valid range for abs values is (0-127 for MB_LVL_ALT_Q), (0-63 for | 38 // Valid range for abs values is (0-127 for MB_LVL_ALT_Q), (0-63 for |
| 39 // SEGMENT_ALT_LF) | 39 // SEGMENT_ALT_LF) |
| 40 // Valid range for delta values are (+/-127 for MB_LVL_ALT_Q), (+/-63 for | 40 // Valid range for delta values are (+/-127 for MB_LVL_ALT_Q), (+/-63 for |
| 41 // SEGMENT_ALT_LF) | 41 // SEGMENT_ALT_LF) |
| 42 // | 42 // |
| 43 // abs_delta = SEGMENT_DELTADATA (deltas) abs_delta = SEGMENT_ABSDATA (use | 43 // abs_delta = SEGMENT_DELTADATA (deltas) abs_delta = SEGMENT_ABSDATA (use |
| 44 // the absolute values given). | 44 // the absolute values given). |
| 45 void vp9_set_segment_data(VP9_PTR ptr, signed char *feature_data, | 45 void vp9_set_segment_data(struct segmentation *seg, signed char *feature_data, |
| 46 unsigned char abs_delta); | 46 unsigned char abs_delta); |
| 47 | 47 |
| 48 void vp9_choose_segmap_coding_method(VP9_COMP *cpi); | 48 void vp9_choose_segmap_coding_method(VP9_COMP *cpi); |
| 49 | 49 |
| 50 void vp9_reset_segment_features(struct segmentation *seg); | 50 void vp9_reset_segment_features(struct segmentation *seg); |
| 51 | 51 |
| 52 #ifdef __cplusplus | 52 #ifdef __cplusplus |
| 53 } // extern "C" | 53 } // extern "C" |
| 54 #endif | 54 #endif |
| 55 | 55 |
| 56 #endif // VP9_ENCODER_VP9_SEGMENTATION_H_ | 56 #endif // VP9_ENCODER_VP9_SEGMENTATION_H_ |
| OLD | NEW |