From 686c781766e92d2798714a668b172a4bdf33a91f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 14 Mar 2010 01:52:31 +0000 Subject: [PATCH] Make sure all mvs of a mb are set in the error concealment code. Originally committed as revision 22520 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/error_resilience.c | 11 ++++++++--- tests/ref/vsynth1/error | 4 ++-- tests/ref/vsynth2/error | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index 135dc0a540..c0c786f8e3 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -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; icurrent_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); diff --git a/tests/ref/vsynth1/error b/tests/ref/vsynth1/error index 9d958113f0..6b8a49e50f 100644 --- a/tests/ref/vsynth1/error +++ b/tests/ref/vsynth1/error @@ -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 diff --git a/tests/ref/vsynth2/error b/tests/ref/vsynth2/error index 59b043920e..b273e002c1 100644 --- a/tests/ref/vsynth2/error +++ b/tests/ref/vsynth2/error @@ -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