From 50ec6311e6376086e771bdad736888a486ca871b Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Mon, 16 Dec 2013 12:09:34 -0800 Subject: Move two functions to encoder As they are used by encoder only. Change-Id: I7b1e6955b218aba66fe156523521a8121c9a84a4 --- vp9/encoder/vp9_onyx_if.c | 1 - vp9/encoder/vp9_segmentation.c | 9 +++++++++ vp9/encoder/vp9_segmentation.h | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) (limited to 'vp9/encoder') diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index 9747eb5a2..0a225b517 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -329,7 +329,6 @@ static void setup_in_frame_q_adj(VP9_COMP *cpi) { } } } - static void configure_static_seg_features(VP9_COMP *cpi) { VP9_COMMON *cm = &cpi->common; struct segmentation *seg = &cm->seg; diff --git a/vp9/encoder/vp9_segmentation.c b/vp9/encoder/vp9_segmentation.c index a9cdc9a67..4568e7a4c 100644 --- a/vp9/encoder/vp9_segmentation.c +++ b/vp9/encoder/vp9_segmentation.c @@ -58,6 +58,15 @@ void vp9_set_segment_data(VP9_PTR ptr, // vpx_memcpy(cpi->mb.e_mbd.segment_feature_mask, 0, // 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 static void calc_segtree_probs(int *segcounts, vp9_prob *segment_tree_probs) { diff --git a/vp9/encoder/vp9_segmentation.h b/vp9/encoder/vp9_segmentation.h index 2183771c4..03f14ea06 100644 --- a/vp9/encoder/vp9_segmentation.h +++ b/vp9/encoder/vp9_segmentation.h @@ -18,6 +18,12 @@ void vp9_enable_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 // Segmentation map is arrange as [Rows][Columns] void vp9_set_segmentation_map(VP9_PTR ptr, unsigned char *segmentation_map); -- cgit v1.2.3