summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-07-11 22:05:25 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-07-11 22:05:25 +0000
commitc3d0c11bfb55668c9dd3938c5a83e22b89a83224 (patch)
tree18e25b9f75571b041dd82a5cb20b43379508aade /libavcodec/mpegvideo.h
parentefb6836fe319d7bdf0d513f08bcf5abbe09c74b0 (diff)
simplify ff_h263_round_chroma()
Originally committed as revision 9602 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.h')
-rw-r--r--libavcodec/mpegvideo.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index b1c2f93731..fde3aaeacd 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -765,14 +765,9 @@ static inline int get_bits_diff(MpegEncContext *s){
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 */