changeset 11484:5330f17dc769 libavcodec

Make sure all mvs of a mb are set in the error concealment code.
author michael
date Sun, 14 Mar 2010 01:52:31 +0000
parents b16c5c5705df
children 0f0cd6b5791f
files error_resilience.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/error_resilience.c	Sun Mar 14 00:42:26 2010 +0000
+++ b/error_resilience.c	Sun Mar 14 01:52:31 2010 +0000
@@ -548,9 +548,14 @@
                         }
                     }
 score_sum+= best_score;
-//FIXME no need to set s->current_picture.motion_val[0][mot_index][0] explicit
-                    s->current_picture.motion_val[0][mot_index][0]= s->mv[0][0][0]= mv_predictor[best_pred][0];
-                    s->current_picture.motion_val[0][mot_index][1]= s->mv[0][0][1]= mv_predictor[best_pred][1];
+                    s->mv[0][0][0]= mv_predictor[best_pred][0];
+                    s->mv[0][0][1]= mv_predictor[best_pred][1];
+
+                    for(i=0; i<mot_step; i++)
+                        for(j=0; j<mot_step; j++){
+                            s->current_picture.motion_val[0][mot_index+i+j*mot_stride][0]= s->mv[0][0][0];
+                            s->current_picture.motion_val[0][mot_index+i+j*mot_stride][1]= s->mv[0][0][1];
+                        }
 
                     decode_mb(s);