# HG changeset patch # User michael # Date 1259548623 0 # Node ID 40af8390d83f34e6cfa7bdf39b8e0b5db7bd2015 # Parent f2a8cba717b0c9846c1691872dec351f9e186adb Fix dual prime motion compensation in field pictures. Fixes issue1125. diff -r f2a8cba717b0 -r 40af8390d83f mpeg12.c --- a/mpeg12.c Sun Nov 29 23:01:29 2009 +0000 +++ b/mpeg12.c Mon Nov 30 02:37:03 2009 +0000 @@ -448,18 +448,20 @@ for(i=0;i<2;i++) { if (USES_LIST(mb_type, i)) { int dmx, dmy, mx, my, m; + const int my_shift= s->picture_structure == PICT_FRAME; + mx = mpeg_decode_motion(s, s->mpeg_f_code[i][0], s->last_mv[i][0][0]); s->last_mv[i][0][0] = mx; s->last_mv[i][1][0] = mx; dmx = get_dmv(s); my = mpeg_decode_motion(s, s->mpeg_f_code[i][1], - s->last_mv[i][0][1] >> 1); + s->last_mv[i][0][1] >> my_shift); dmy = get_dmv(s); - s->last_mv[i][0][1] = my<<1; - s->last_mv[i][1][1] = my<<1; + s->last_mv[i][0][1] = my<last_mv[i][1][1] = my<mv[i][0][0] = mx; s->mv[i][0][1] = my;