Make sure all mvs of a mb are set in the error concealment code.
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 14 Mar 2010 01:52:31 +0000 (01:52 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 14 Mar 2010 01:52:31 +0000 (01:52 +0000)
Originally committed as revision 22520 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/error_resilience.c
tests/ref/vsynth1/error
tests/ref/vsynth2/error

index 135dc0a..c0c786f 100644 (file)
@@ -548,9 +548,14 @@ int score_sum=0;
                         }
                     }
 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);
 
index 9d95811..6b8a49e 100644 (file)
@@ -1,4 +1,4 @@
 7416dfd319f04044d4575dc9d1b406e1 *./tests/data/vsynth1/error-mpeg4-adv.avi
 756836 ./tests/data/vsynth1/error-mpeg4-adv.avi
-0d21f59c1600f5b6afb90b5278e28cd6 *./tests/data/error.vsynth1.out.yuv
-stddev:   18.08 PSNR: 22.98 bytes:  7603200/  7603200
+ef8bfcd6e0883daba95d0f32486ebe2d *./tests/data/error.vsynth1.out.yuv
+stddev:   18.05 PSNR: 23.00 bytes:  7603200/  7603200
index 59b0439..b273e00 100644 (file)
@@ -1,4 +1,4 @@
 90e65096aa9ebafa3fe3f44a5a47cdc4 *./tests/data/vsynth2/error-mpeg4-adv.avi
 176588 ./tests/data/vsynth2/error-mpeg4-adv.avi
-113defd3f8daf878e0b3fc03fafb4c09 *./tests/data/error.vsynth2.out.yuv
-stddev:    9.02 PSNR: 29.02 bytes:  7603200/  7603200
+9fe1082179f80179439953c7397a46ef *./tests/data/error.vsynth2.out.yuv
+stddev:    9.00 PSNR: 29.04 bytes:  7603200/  7603200