Commit 4603f31d authored by Dmitry Kovalev's avatar Dmitry Kovalev
Browse files

Moving reset_segment_features() to encoder/vp9_segmentation.h.

Change-Id: I0db4b31cb2382d4f6249eae0a8f42d227ad0ac57
parent a9deec43
......@@ -170,17 +170,6 @@ void vp9_initialize_enc() {
}
}
static void reset_segment_features(VP9_COMMON *cm) {
struct segmentation *const seg = &cm->seg;
// Set up default state for MB feature flags
seg->enabled = 0;
seg->update_map = 0;
seg->update_data = 0;
vpx_memset(seg->tree_probs, 255, sizeof(seg->tree_probs));
vp9_clearall_segfeatures(seg);
}
static void dealloc_compressor_data(VP9_COMP *cpi) {
// Delete sementation map
vpx_free(cpi->segmentation_map);
......@@ -1192,7 +1181,7 @@ void vp9_change_config(VP9_PTR ptr, VP9_CONFIG *oxcf) {
cm->refresh_frame_context = 1;
cm->reset_frame_context = 0;
reset_segment_features(cm);
vp9_reset_segment_features(&cm->seg);
set_high_precision_mv(cpi, 0);
{
......@@ -2952,7 +2941,7 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
if (frame_is_intra_only(cm)) {
vp9_setup_key_frame(cpi);
// Reset the loop filter deltas and segmentation map.
reset_segment_features(cm);
vp9_reset_segment_features(&cm->seg);
// If segmentation is enabled force a map update for key frames.
if (seg->enabled) {
......
......@@ -296,3 +296,12 @@ void vp9_choose_segmap_coding_method(VP9_COMP *cpi) {
vpx_memcpy(seg->tree_probs, no_pred_tree, sizeof(no_pred_tree));
}
}
void vp9_reset_segment_features(struct segmentation *seg) {
// Set up default state for MB feature flags
seg->enabled = 0;
seg->update_map = 0;
seg->update_data = 0;
vpx_memset(seg->tree_probs, 255, sizeof(seg->tree_probs));
vp9_clearall_segfeatures(seg);
}
......@@ -43,4 +43,6 @@ void vp9_set_segment_data(VP9_PTR ptr, signed char *feature_data,
void vp9_choose_segmap_coding_method(VP9_COMP *cpi);
void vp9_reset_segment_features(struct segmentation *seg);
#endif // VP9_ENCODER_VP9_SEGMENTATION_H_
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