changeset 21469:682fcac7202a

10l: wrong bitmask when patching the pce_ptr in soft_telecine()
author nicodvb
date Mon, 04 Dec 2006 00:52:11 +0000
parents f6554710e21b
children ba43517724b7
files libmpdemux/muxer_mpeg.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/muxer_mpeg.c	Mon Dec 04 00:28:43 2006 +0000
+++ b/libmpdemux/muxer_mpeg.c	Mon Dec 04 00:52:11 2006 +0000
@@ -1670,7 +1670,9 @@
 	}
 	else if(vpriv->telecine == TELECINE_DGPULLDOWN)
 	{
-		pce_ptr[3] = (pce_ptr[3] & 0xfd) | bff_mask[vpriv->display_frame % MAX_PATTERN_LENGTH];
+		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;
 	}
 	else
 	{