shithub: libvpx

Download patch

ref: ca4df94858f46621bc83feb33de8f31ecf6142b5
parent: ea48370a500537906d62544ca4ed75301d79e772
parent: d803e8a20e252c47da6ced84a685cfc994dc9942
author: Yaowu Xu <yaowu@google.com>
date: Wed Jan 13 16:07:53 EST 2016

Merge "Fix encoder crashes and enc/dec mismatches"

--- a/vp10/encoder/aq_complexity.c
+++ b/vp10/encoder/aq_complexity.c
@@ -51,7 +51,7 @@
   // Make SURE use of floating point in this function is safe.
   vpx_clear_system_state();
 
-  if (cm->frame_type == KEY_FRAME ||
+  if (frame_is_intra_only(cm) || cm->error_resilient_mode ||
       cpi->refresh_alt_ref_frame ||
       (cpi->refresh_golden_frame && !cpi->rc.is_src_frame_alt_ref)) {
     int segment;
--- a/vp10/encoder/aq_variance.c
+++ b/vp10/encoder/aq_variance.c
@@ -47,7 +47,7 @@
   struct segmentation *seg = &cm->seg;
   int i;
 
-  if (cm->frame_type == KEY_FRAME ||
+  if (frame_is_intra_only(cm) || cm->error_resilient_mode ||
       cpi->refresh_alt_ref_frame ||
       (cpi->refresh_golden_frame && !cpi->rc.is_src_frame_alt_ref)) {
     vp10_enable_segmentation(seg);
--- a/vp10/encoder/segmentation.c
+++ b/vp10/encoder/segmentation.c
@@ -273,7 +273,7 @@
   no_pred_cost = cost_segmap(no_pred_segcounts, no_pred_tree);
 
   // Key frames cannot use temporal prediction
-  if (!frame_is_intra_only(cm)) {
+  if (!frame_is_intra_only(cm) && !cm->error_resilient_mode) {
     // Work out probability tree for coding those segments not
     // predicted using the temporal method and the cost.
     calc_segtree_probs(t_unpred_seg_counts, t_pred_tree, segp->tree_probs);
@@ -300,6 +300,7 @@
 
   // Now choose which coding method to use.
   if (t_pred_cost < no_pred_cost) {
+    assert(!cm->error_resilient_mode);
     seg->temporal_update = 1;
 #if !CONFIG_MISC_FIXES
     memcpy(segp->tree_probs, t_pred_tree, sizeof(t_pred_tree));