Commit 36c4e274 authored by Yaowu Xu's avatar Yaowu Xu Committed by Gerrit Code Review

Merge "Move two functions to encoder"

parents 07a28c77 50ec6311
...@@ -41,11 +41,6 @@ void vp9_enable_segfeature(struct segmentation *seg, int segment_id, ...@@ -41,11 +41,6 @@ void vp9_enable_segfeature(struct segmentation *seg, int segment_id,
seg->feature_mask[segment_id] |= 1 << feature_id; seg->feature_mask[segment_id] |= 1 << feature_id;
} }
void vp9_disable_segfeature(struct segmentation *seg, int segment_id,
SEG_LVL_FEATURES feature_id) {
seg->feature_mask[segment_id] &= ~(1 << feature_id);
}
int vp9_seg_feature_data_max(SEG_LVL_FEATURES feature_id) { int vp9_seg_feature_data_max(SEG_LVL_FEATURES feature_id) {
return seg_feature_data_max[feature_id]; return seg_feature_data_max[feature_id];
} }
...@@ -54,11 +49,6 @@ int vp9_is_segfeature_signed(SEG_LVL_FEATURES feature_id) { ...@@ -54,11 +49,6 @@ int vp9_is_segfeature_signed(SEG_LVL_FEATURES feature_id) {
return seg_feature_data_signed[feature_id]; return seg_feature_data_signed[feature_id];
} }
void vp9_clear_segdata(struct segmentation *seg, int segment_id,
SEG_LVL_FEATURES feature_id) {
seg->feature_data[segment_id][feature_id] = 0;
}
void vp9_set_segdata(struct segmentation *seg, int segment_id, void vp9_set_segdata(struct segmentation *seg, int segment_id,
SEG_LVL_FEATURES feature_id, int seg_data) { SEG_LVL_FEATURES feature_id, int seg_data) {
assert(seg_data <= seg_feature_data_max[feature_id]); assert(seg_data <= seg_feature_data_max[feature_id]);
......
...@@ -55,18 +55,10 @@ void vp9_enable_segfeature(struct segmentation *seg, ...@@ -55,18 +55,10 @@ void vp9_enable_segfeature(struct segmentation *seg,
int segment_id, int segment_id,
SEG_LVL_FEATURES feature_id); SEG_LVL_FEATURES feature_id);
void vp9_disable_segfeature(struct segmentation *seg,
int segment_id,
SEG_LVL_FEATURES feature_id);
int vp9_seg_feature_data_max(SEG_LVL_FEATURES feature_id); int vp9_seg_feature_data_max(SEG_LVL_FEATURES feature_id);
int vp9_is_segfeature_signed(SEG_LVL_FEATURES feature_id); int vp9_is_segfeature_signed(SEG_LVL_FEATURES feature_id);
void vp9_clear_segdata(struct segmentation *seg,
int segment_id,
SEG_LVL_FEATURES feature_id);
void vp9_set_segdata(struct segmentation *seg, void vp9_set_segdata(struct segmentation *seg,
int segment_id, int segment_id,
SEG_LVL_FEATURES feature_id, SEG_LVL_FEATURES feature_id,
......
...@@ -329,7 +329,6 @@ static void setup_in_frame_q_adj(VP9_COMP *cpi) { ...@@ -329,7 +329,6 @@ static void setup_in_frame_q_adj(VP9_COMP *cpi) {
} }
} }
} }
static void configure_static_seg_features(VP9_COMP *cpi) { static void configure_static_seg_features(VP9_COMP *cpi) {
VP9_COMMON *cm = &cpi->common; VP9_COMMON *cm = &cpi->common;
struct segmentation *seg = &cm->seg; struct segmentation *seg = &cm->seg;
......
...@@ -58,6 +58,15 @@ void vp9_set_segment_data(VP9_PTR ptr, ...@@ -58,6 +58,15 @@ void vp9_set_segment_data(VP9_PTR ptr,
// vpx_memcpy(cpi->mb.e_mbd.segment_feature_mask, 0, // vpx_memcpy(cpi->mb.e_mbd.segment_feature_mask, 0,
// sizeof(cpi->mb.e_mbd.segment_feature_mask)); // sizeof(cpi->mb.e_mbd.segment_feature_mask));
} }
void vp9_disable_segfeature(struct segmentation *seg, int segment_id,
SEG_LVL_FEATURES feature_id) {
seg->feature_mask[segment_id] &= ~(1 << feature_id);
}
void vp9_clear_segdata(struct segmentation *seg, int segment_id,
SEG_LVL_FEATURES feature_id) {
seg->feature_data[segment_id][feature_id] = 0;
}
// Based on set of segment counts calculate a probability tree // Based on set of segment counts calculate a probability tree
static void calc_segtree_probs(int *segcounts, vp9_prob *segment_tree_probs) { static void calc_segtree_probs(int *segcounts, vp9_prob *segment_tree_probs) {
......
...@@ -18,6 +18,12 @@ ...@@ -18,6 +18,12 @@
void vp9_enable_segmentation(VP9_PTR ptr); void vp9_enable_segmentation(VP9_PTR ptr);
void vp9_disable_segmentation(VP9_PTR ptr); void vp9_disable_segmentation(VP9_PTR ptr);
void vp9_disable_segfeature(struct segmentation *seg,
int segment_id,
SEG_LVL_FEATURES feature_id);
void vp9_clear_segdata(struct segmentation *seg,
int segment_id,
SEG_LVL_FEATURES feature_id);
// Valid values for a segment are 0 to 3 // Valid values for a segment are 0 to 3
// Segmentation map is arrange as [Rows][Columns] // Segmentation map is arrange as [Rows][Columns]
void vp9_set_segmentation_map(VP9_PTR ptr, unsigned char *segmentation_map); void vp9_set_segmentation_map(VP9_PTR ptr, unsigned char *segmentation_map);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment