changeset 8862:5aa3cfee2291 libavcodec

get rid of the branch prediction
author iive
date Sat, 14 Feb 2009 19:02:46 +0000
parents da23b389e856
children 4b11309c8322
files mpegvideo_xvmc.c
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mpegvideo_xvmc.c	Sat Feb 14 19:00:51 2009 +0000
+++ b/mpegvideo_xvmc.c	Sat Feb 14 19:02:46 2009 +0000
@@ -226,14 +226,10 @@
 
 //set correct field references
         if (s->mv_type == MV_TYPE_FIELD || s->mv_type == MV_TYPE_16X8) {
-            if (s->field_select[0][0])
-                mv_block->motion_vertical_field_select |= 1;
-            if (s->field_select[1][0])
-                mv_block->motion_vertical_field_select |= 2;
-            if (s->field_select[0][1])
-                mv_block->motion_vertical_field_select |= 4;
-            if (s->field_select[1][1])
-                mv_block->motion_vertical_field_select |= 8;
+            mv_block->motion_vertical_field_select |= s->field_select[0][0];
+            mv_block->motion_vertical_field_select |= s->field_select[1][0]<<1;
+            mv_block->motion_vertical_field_select |= s->field_select[0][1]<<2;
+            mv_block->motion_vertical_field_select |= s->field_select[1][1]<<3;
         }
     }//!intra
 //time to handle data blocks;