History

error_concealment: Use previous pictures motion vectors when the current ones have been lost.

Looks better for some cases, worse for others, overall not much difference. Its more correct though. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer committed 15 years ago

Commit 3732c481 parent a811ec73 files · +12 −4Browse files

Unified · Split

3 files
  1. libavcodec/error_resilience.c +8 −0
  2. tests/ref/vsynth1/error +2 −2
  3. tests/ref/vsynth2/error +2 −2
libavcodec/error_resilience.c+8−0
@@ -381,6 +381,14 @@ static void guess_mv(MpegEncContext *s){ · 380 unmodified lines
381 fixed[mb_xy]= f;381 fixed[mb_xy]= f;
382 if(f==MV_FROZEN)382 if(f==MV_FROZEN)
383 num_avail++;383 num_avail++;
384 else if(s->last_picture.data[0]){
385 const int mb_y= mb_xy / s->mb_stride;
386 const int mb_x= mb_xy % s->mb_stride;
387 const int mot_index= (mb_x + mb_y*mot_stride) * mot_step;
388 s->current_picture.motion_val[0][mot_index][0]= s->last_picture.motion_val[0][mot_index][0];
389 s->current_picture.motion_val[0][mot_index][1]= s->last_picture.motion_val[0][mot_index][1];
390 s->current_picture.ref_index[0][4*mb_xy] = s->last_picture.ref_index[0][4*mb_xy];
391 }
384 }392 }
385 393
386 if((!(s->avctx->error_concealment&FF_EC_GUESS_MVS)) || num_avail <= mb_width/2){394 if((!(s->avctx->error_concealment&FF_EC_GUESS_MVS)) || num_avail <= mb_width/2){
tests/ref/vsynth1/error+2−2
@@ -1,4 +1,4 @@
17416dfd319f04044d4575dc9d1b406e1 *./tests/data/vsynth1/error-mpeg4-adv.avi17416dfd319f04044d4575dc9d1b406e1 *./tests/data/vsynth1/error-mpeg4-adv.avi
2756836 ./tests/data/vsynth1/error-mpeg4-adv.avi2756836 ./tests/data/vsynth1/error-mpeg4-adv.avi
3ef8bfcd6e0883daba95d0f32486ebe2d *./tests/data/error.vsynth1.out.yuv379e94ba32b37759397362cbcb479d4d3 *./tests/data/error.vsynth1.out.yuv
4stddev: 18.05 PSNR: 23.00 MAXDIFF: 245 bytes: 7603200/ 76032004stddev: 18.36 PSNR: 22.85 MAXDIFF: 243 bytes: 7603200/ 7603200
tests/ref/vsynth2/error+2−2
@@ -1,4 +1,4 @@
190e65096aa9ebafa3fe3f44a5a47cdc4 *./tests/data/vsynth2/error-mpeg4-adv.avi190e65096aa9ebafa3fe3f44a5a47cdc4 *./tests/data/vsynth2/error-mpeg4-adv.avi
2176588 ./tests/data/vsynth2/error-mpeg4-adv.avi2176588 ./tests/data/vsynth2/error-mpeg4-adv.avi
39fe1082179f80179439953c7397a46ef *./tests/data/error.vsynth2.out.yuv396baa9e4c24c837a3ba5abd8dd2cdd30 *./tests/data/error.vsynth2.out.yuv
4stddev: 9.00 PSNR: 29.04 MAXDIFF: 168 bytes: 7603200/ 76032004stddev: 8.98 PSNR: 29.06 MAXDIFF: 184 bytes: 7603200/ 7603200

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t