]> granicus.if.org Git - libvpx/commitdiff
segmentation: Don't use uninitialized probability data.
authorAlex Converse <aconverse@google.com>
Tue, 24 May 2016 17:58:00 +0000 (10:58 -0700)
committerAlex Converse <aconverse@google.com>
Tue, 31 May 2016 23:42:29 +0000 (16:42 -0700)
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1224

Change-Id: I17b76fcf0d8c191850350d5aa50dcc007b8b0cdc

test/active_map_test.cc
vp10/encoder/segmentation.c

index 3583061fdcaf236c50d34bd1c2c9b6924fb4107f..ab01df44f320043491a24173c41b40e4866240f1 100644 (file)
@@ -87,11 +87,26 @@ VP9_INSTANTIATE_TEST_CASE(ActiveMapTest,
                           ::testing::Values(::libvpx_test::kRealTime),
                           ::testing::Range(0, 9));
 #if CONFIG_VP10
+#if CONFIG_SUPERTX
 INSTANTIATE_TEST_CASE_P(
     DISABLED_VP10, ActiveMapTest,
     ::testing::Combine(
         ::testing::Values(static_cast<const libvpx_test::CodecFactory *>(
             &libvpx_test::kVP10)),
         ::testing::Values(::libvpx_test::kRealTime), ::testing::Range(0, 9)));
+#else
+VP10_INSTANTIATE_TEST_CASE(ActiveMapTest,
+                           ::testing::Values(::libvpx_test::kRealTime),
+                           ::testing::Range(0, 6));
+
+// The new variance based partitioning scheme is incompatible with
+// SEGMENT_LEVEL_SKIP.
+INSTANTIATE_TEST_CASE_P(
+    DISABLED_VP10, ActiveMapTest,
+    ::testing::Combine(
+        ::testing::Values(static_cast<const libvpx_test::CodecFactory *>(
+            &libvpx_test::kVP10)),
+        ::testing::Values(::libvpx_test::kRealTime), ::testing::Range(6, 9)));
+#endif  // CONFIG_SUPERTX
 #endif  // CONFIG_VP10
 }  // namespace
index 29cf04d59ed58b9c8a3aa8654491f116b56da34c..222dc0d6f3cc46ac555392a6b795e1d266f88ba6 100644 (file)
@@ -358,6 +358,7 @@ void vp10_choose_segmap_coding_method(VP10_COMMON *cm, MACROBLOCKD *xd) {
       const int count0 = temporal_predictor_count[i][0];
       const int count1 = temporal_predictor_count[i][1];
 
+      t_nopred_prob[i] = get_binary_prob(count0, count1);
       vp10_prob_diff_update_savings_search(temporal_predictor_count[i],
                                            segp->pred_probs[i],
                                            &t_nopred_prob[i], DIFF_UPDATE_PROB);