unsigned int threshold[MAX_SEGMENTS]) {
signed char feature_data[SEG_LVL_MAX][MAX_SEGMENTS];
struct segmentation *seg = &cpi->common.seg;
+ const VP9_COMMON *const cm = &cpi->common;
int i;
- if (cpi->common.mb_rows != rows || cpi->common.mb_cols != cols)
+ if (cm->mb_rows != rows || cm->mb_cols != cols)
return -1;
if (!map) {
return 0;
}
- // Set the segmentation Map
- vp9_set_segmentation_map(cpi, map);
+ vpx_memcpy(cpi->segmentation_map, map, cm->mi_rows * cm->mi_cols);
// Activate segmentation.
vp9_enable_segmentation(seg);
seg->enabled = 0;
}
-void vp9_set_segmentation_map(VP9_COMP *cpi, unsigned char *segmentation_map) {
- struct segmentation *const seg = &cpi->common.seg;
-
- // Copy in the new segmentation map
- vpx_memcpy(cpi->segmentation_map, segmentation_map,
- (cpi->common.mi_rows * cpi->common.mi_cols));
-
- // Signal that the map should be updated.
- seg->update_map = 1;
- seg->update_data = 1;
-}
-
void vp9_set_segment_data(struct segmentation *seg,
signed char *feature_data,
unsigned char abs_delta) {
void vp9_clear_segdata(struct segmentation *seg,
int segment_id,
SEG_LVL_FEATURES feature_id);
-// Valid values for a segment are 0 to 3
-// Segmentation map is arrange as [Rows][Columns]
-void vp9_set_segmentation_map(VP9_COMP *cpi, unsigned char *segmentation_map);
// The values given for each segment can be either deltas (from the default
// value chosen for the frame) or absolute values.