[MPlayer-cvslog] r21497 - trunk/libmpdemux/muxer_mpeg.c

nicodvb subversion at mplayerhq.hu
Mon Dec 4 21:38:46 CET 2006


Author: nicodvb
Date: Mon Dec  4 21:38:46 2006
New Revision: 21497

Modified:
   trunk/libmpdemux/muxer_mpeg.c

Log:
pre-store in bff_mask the correct or-mask to be saved in the pce (slightly faster)

Modified: trunk/libmpdemux/muxer_mpeg.c
==============================================================================
--- trunk/libmpdemux/muxer_mpeg.c	(original)
+++ trunk/libmpdemux/muxer_mpeg.c	Mon Dec  4 21:38:46 2006
@@ -1670,9 +1670,7 @@
 	}
 	else if(vpriv->telecine == TELECINE_DGPULLDOWN)
 	{
-		tff = (bff_mask[vpriv->display_frame % MAX_PATTERN_LENGTH] & 0x2) ? 0x80 : 0;
-		rff = (bff_mask[vpriv->display_frame % MAX_PATTERN_LENGTH] & 0x1) ? 0x02 : 0;
-		pce_ptr[3] = (pce_ptr[3] & 0xfd) | tff | rff;
+		pce_ptr[3] = (pce_ptr[3] & 0xfd) | bff_mask[vpriv->display_frame % MAX_PATTERN_LENGTH];
 	}
 	else
 	{
@@ -2549,6 +2547,7 @@
 {
 	unsigned int i, trfp;
 	uint64_t dfl,tfl;
+	unsigned char ormask[4] = {0x0, 0x2, 0x80, 0x82};
 	
 	dfl = (target - source) << 1;
 	tfl = source >> 1;
@@ -2560,11 +2559,11 @@
 		if(tfl >= source)
 		{
 			tfl -= source;
-			bff_mask[i] = trfp + 1;
+			bff_mask[i] = ormask[trfp + 1];
 			trfp ^= 2;
 		}
 		else
-			bff_mask[i] = trfp;
+			bff_mask[i] = ormask[trfp];
 	}
 }
 



More information about the MPlayer-cvslog mailing list