Mercurial > libavcodec.hg
comparison h263.c @ 1646:c3c166ead03a libavcodec
h263 MV prediction doesnt match mpeg4, for some slices configurations (fixes RV20 MVs)
author | michael |
---|---|
date | Mon, 01 Dec 2003 20:04:14 +0000 |
parents | 835cf346975e |
children | e6a474a5b929 |
comparison
equal
deleted
inserted
replaced
1645:901f928ec1f6 | 1646:c3c166ead03a |
---|---|
1471 // we cant just change some MVs to simulate that as we need them for the B frames (and ME) | 1471 // we cant just change some MVs to simulate that as we need them for the B frames (and ME) |
1472 // and if we ever support non rectangular objects than we need to do a few ifs here anyway :( | 1472 // and if we ever support non rectangular objects than we need to do a few ifs here anyway :( |
1473 if(block==0){ //most common case | 1473 if(block==0){ //most common case |
1474 if(s->mb_x == s->resync_mb_x){ //rare | 1474 if(s->mb_x == s->resync_mb_x){ //rare |
1475 *px= *py = 0; | 1475 *px= *py = 0; |
1476 }else if(s->mb_x + 1 == s->resync_mb_x){ //rare | 1476 }else if(s->mb_x + 1 == s->resync_mb_x && s->h263_pred){ //rare |
1477 C = s->motion_val[xy + off[block] - wrap]; | 1477 C = s->motion_val[xy + off[block] - wrap]; |
1478 if(s->mb_x==0){ | 1478 if(s->mb_x==0){ |
1479 *px = C[0]; | 1479 *px = C[0]; |
1480 *py = C[1]; | 1480 *py = C[1]; |
1481 }else{ | 1481 }else{ |
1485 }else{ | 1485 }else{ |
1486 *px = A[0]; | 1486 *px = A[0]; |
1487 *py = A[1]; | 1487 *py = A[1]; |
1488 } | 1488 } |
1489 }else if(block==1){ | 1489 }else if(block==1){ |
1490 if(s->mb_x + 1 == s->resync_mb_x){ //rare | 1490 if(s->mb_x + 1 == s->resync_mb_x && s->h263_pred){ //rare |
1491 C = s->motion_val[xy + off[block] - wrap]; | 1491 C = s->motion_val[xy + off[block] - wrap]; |
1492 *px = mid_pred(A[0], 0, C[0]); | 1492 *px = mid_pred(A[0], 0, C[0]); |
1493 *py = mid_pred(A[1], 0, C[1]); | 1493 *py = mid_pred(A[1], 0, C[1]); |
1494 }else{ | 1494 }else{ |
1495 *px = A[0]; | 1495 *px = A[0]; |