# HG changeset patch # User michael # Date 1184191525 0 # Node ID 8c0bbf712d76f336591cf4eeb8804f99e89f44fa # Parent 6c3f73f20538b9567de3e7cd3ec83954ff3cbae3 simplify ff_h263_round_chroma() diff -r 6c3f73f20538 -r 8c0bbf712d76 mpegvideo.h --- a/mpegvideo.h Wed Jul 11 22:01:21 2007 +0000 +++ b/mpegvideo.h Wed Jul 11 22:05:25 2007 +0000 @@ -765,14 +765,9 @@ static inline int ff_h263_round_chroma(int x){ static const uint8_t h263_chroma_roundtab[16] = { // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 - 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, }; - if (x >= 0) - return (h263_chroma_roundtab[x & 0xf] + ((x >> 3) & ~1)); - else { - x = -x; - return -(h263_chroma_roundtab[x & 0xf] + ((x >> 3) & ~1)); - } + return h263_chroma_roundtab[x & 0xf] + (x >> 3); } /* motion_est.c */