[FFmpeg-cvslog] r9602 - trunk/libavcodec/mpegvideo.h

michael subversion
Thu Jul 12 00:05:28 CEST 2007


Author: michael
Date: Thu Jul 12 00:05:25 2007
New Revision: 9602

Log:
simplify ff_h263_round_chroma()


Modified:
   trunk/libavcodec/mpegvideo.h

Modified: trunk/libavcodec/mpegvideo.h
==============================================================================
--- trunk/libavcodec/mpegvideo.h	(original)
+++ trunk/libavcodec/mpegvideo.h	Thu Jul 12 00:05:25 2007
@@ -765,14 +765,9 @@ static inline int get_bits_diff(MpegEncC
 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 */




More information about the ffmpeg-cvslog mailing list