changeset 8431:405a44077331 libavcodec

Simplify if(), 3 cpu cycles faster in pentium dual.
author michael
date Mon, 22 Dec 2008 15:53:00 +0000
parents 7768bdfd4f7b
children 05465a76d699
files h264.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Mon Dec 22 09:12:42 2008 +0000
+++ b/h264.c	Mon Dec 22 15:53:00 2008 +0000
@@ -5314,10 +5314,8 @@
         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) {