[FFmpeg-cvslog] r16272 - trunk/libavcodec/h264.c

michael subversion
Mon Dec 22 16:53:01 CET 2008


Author: michael
Date: Mon Dec 22 16:53:00 2008
New Revision: 16272

Log:
Simplify if(), 3 cpu cycles faster in pentium dual.


Modified:
   trunk/libavcodec/h264.c

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	(original)
+++ trunk/libavcodec/h264.c	Mon Dec 22 16:53:00 2008
@@ -5314,10 +5314,8 @@ static inline void compute_mb_neighbors(
         const int left_mb_frame_flag = !IS_INTERLACED(s->current_picture.mb_type[pair_xy-1]);
         const int curr_mb_frame_flag = !MB_FIELD;
         const int bottom = (s->mb_y & 1);
-        if (bottom
-                ? !curr_mb_frame_flag // bottom macroblock
-                : (!curr_mb_frame_flag && !top_mb_frame_flag) // top macroblock
-                ) {
+
+        if (!curr_mb_frame_flag && (bottom || !top_mb_frame_flag)){
             h->top_mb_xy -= s->mb_stride;
         }
         if (left_mb_frame_flag != curr_mb_frame_flag) {




More information about the ffmpeg-cvslog mailing list