ref: 29199efd57ad748f683200cc3381f664539f3d2a
parent: bbb25e6a394720cbf682b5b009f30b86c78c372c
parent: 4603f31d025ac11ba8712763ba4c3d2d930abee1
author: Dmitry Kovalev <[email protected]>
date: Mon Jan 6 10:01:54 EST 2014
Merge "Moving reset_segment_features() to encoder/vp9_segmentation.h."
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -170,17 +170,6 @@
}
}
-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 @@
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);
{
@@ -2939,7 +2928,7 @@
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) {
--- a/vp9/encoder/vp9_segmentation.c
+++ b/vp9/encoder/vp9_segmentation.c
@@ -296,3 +296,12 @@
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);
+}
--- a/vp9/encoder/vp9_segmentation.h
+++ b/vp9/encoder/vp9_segmentation.h
@@ -43,4 +43,6 @@
void vp9_choose_segmap_coding_method(VP9_COMP *cpi);
+void vp9_reset_segment_features(struct segmentation *seg);
+
#endif // VP9_ENCODER_VP9_SEGMENTATION_H_