/**************************************************************************** * * Module Title : DeInterlaceWmt.c * * Description : DeInterlace * ***************************************************************************/ /**************************************************************************** * Header Frames ****************************************************************************/ #include "postp.h" /**************************************************************************** * Module constants. ****************************************************************************/ #if defined(_WIN32_WCE) #pragma pack(16) short Eight2s[] = { 2, 2, 2, 2, 2, 2, 2, 2 }; #pragma pack() #else __declspec(align(16)) short Eight2s[] = { 2, 2, 2, 2, 2, 2, 2, 2 }; #endif /**************************************************************************** * * ROUTINE : WmtFastDeInterlace * * INPUTS : UINT8 *SrcPtr : Pointer to input frame. * UINT8 *DstPtr : Pointer to output frame. * INT32 Width : Width of frame in pixels. * INT32 Height : Height of frame in pixels. * INT32 Stride : Stride of images. * * OUTPUTS : None. * * RETURNS : void * * FUNCTION : Applies a 3 tap filter vertically to remove interlacing * artifacts. * * SPECIAL NOTES : This function use a three tap filter [1, 2, 1] to blur * veritically in an interlaced frame. This function assumes: * 1) Buffers SrcPtr and DstPtr point to have the same geometery, * 2) SrcPtr and DstPtr can _not_ be same. * ****************************************************************************/ void WmtFastDeInterlace ( UINT8 *SrcPtr, UINT8 *DstPtr, INT32 Width, INT32 Height, INT32 Stride ) { INT32 i; UINT8 *CurrentSrcPtr = SrcPtr; UINT8 *CurrentDstPtr = DstPtr; #if defined(_WIN32_WCE) return; #else // Always copy the first line memcpy ( CurrentDstPtr, CurrentSrcPtr, Width ); for ( i=1; i>2 ); } */ } //copy the last line CurrentSrcPtr += Stride; CurrentDstPtr += Stride; memcpy ( CurrentDstPtr, CurrentSrcPtr, Width ); #endif }