Mercurial > libavcodec.hg
comparison msmpeg4.c @ 1255:625ccacd1113 libavcodec
decode motion & modulo optimize patch by (BERO <bero at geocities dot co dot jp>)
| author | michaelni |
|---|---|
| date | Wed, 14 May 2003 01:08:02 +0000 |
| parents | b874217f906b |
| children | 362947395f5c |
comparison
equal
deleted
inserted
replaced
| 1254:604661d34c68 | 1255:625ccacd1113 |
|---|---|
| 1479 | 1479 |
| 1480 if (code == 0) | 1480 if (code == 0) |
| 1481 return pred; | 1481 return pred; |
| 1482 sign = get_bits1(&s->gb); | 1482 sign = get_bits1(&s->gb); |
| 1483 shift = f_code - 1; | 1483 shift = f_code - 1; |
| 1484 val = (code - 1) << shift; | 1484 val = code; |
| 1485 if (shift > 0) | 1485 if (shift) { |
| 1486 val = (val - 1) << shift; | |
| 1486 val |= get_bits(&s->gb, shift); | 1487 val |= get_bits(&s->gb, shift); |
| 1487 val++; | 1488 val++; |
| 1489 } | |
| 1488 if (sign) | 1490 if (sign) |
| 1489 val = -val; | 1491 val = -val; |
| 1490 | 1492 |
| 1491 val += pred; | 1493 val += pred; |
| 1492 if (val <= -64) | 1494 if (val <= -64) |
