; Listing generated by Microsoft (R) Optimizing Compiler Version 15.00.21022.08 

	TITLE	c:\Develop\DScaler423a\DScaler\FD_Common.cpp
	.686P
	.XMM
	include listing.inc
	.model	flat

INCLUDELIB OLDNAMES

PUBLIC	??_C@_0O@KBHNOFMH@FilmFlipDelay?$AA@		; `string'
PUBLIC	??_C@_0BA@MICJDFBB@Film?5Flip?5Delay?$AA@	; `string'
PUBLIC	??_C@_09FPJHDPPG@UseChroma?$AA@			; `string'
PUBLIC	??_C@_0O@DDFDBPPD@Chroma?5Detect?$AA@		; `string'
PUBLIC	??_C@_0O@OHGLHDIH@DiffThreshold?$AA@		; `string'
PUBLIC	??_C@_0BA@FLPGDLAL@JaggieThreshold?$AA@		; `string'
PUBLIC	??_C@_0BG@EAMCLAHA@Comb?5Jaggie?5Threshold?$AA@	; `string'
PUBLIC	??_C@_0L@KCHHFKDA@EdgeDetect?$AA@		; `string'
PUBLIC	??_C@_0BB@JCPLDGMJ@Comb?5Edge?5Detect?$AA@	; `string'
PUBLIC	??_C@_08FMGOHKEE@BitShift?$AA@			; `string'
PUBLIC	??_C@_09PDCCCECB@Bit?5Shift?$AA@		; `string'
PUBLIC	_qwThreshold
PUBLIC	_qwBitShift
PUBLIC	?BitShift@@3JA					; BitShift
PUBLIC	?CombEdgeDetect@@3JA				; CombEdgeDetect
PUBLIC	?CombJaggieThreshold@@3JA			; CombJaggieThreshold
PUBLIC	?DiffThreshold@@3JA				; DiffThreshold
PUBLIC	?UseChromaInDetect@@3HA				; UseChromaInDetect
PUBLIC	?FilmFlipDelay@@3JA				; FilmFlipDelay
PUBLIC	_qwYMask
PUBLIC	_qwMask
PUBLIC	_qwOnes
PUBLIC	??_C@_1CC@DABIACJG@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AAF?$AAD?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@ ; `string'
PUBLIC	??_C@_1CI@MMCCBLDK@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?$CF?$AAc?$AA?5?$AAC?$AAF?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@ ; `string'
PUBLIC	??_C@_1CI@FHBFACIB@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?$CF?$AAc?$AA?5?$AAF?$AAD?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@ ; `string'
PUBLIC	??_C@_1DM@NGDJLNBJ@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?$CF?$AAc?$AA?5?$AAF?$AAD?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?7?$AA?5?$AAC?$AAF?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@ ; `string'
PUBLIC	?FD_CommonSettings@@3PAUSETTING@@A		; FD_CommonSettings
EXTRN	_CalcCombFactorLine:PROC
EXTRN	_CalcDiffFactorLine:PROC
EXTRN	_CalcCombFactorLineChroma:PROC
EXTRN	_CalcDiffFactorLineChroma:PROC
EXTRN	_memcpyBOBMMX:PROC
EXTRN	_memcpyBOBSSE:PROC
_qwThreshold DQ	01H DUP (?)
_qwBitShift DQ	01H DUP (?)
?UseChromaInDetect@@3HA DD 01H DUP (?)			; UseChromaInDetect
?FilmFlipDelay@@3JA DD 01H DUP (?)			; FilmFlipDelay
;	COMDAT ??_C@_0O@KBHNOFMH@FilmFlipDelay?$AA@
CONST	SEGMENT
??_C@_0O@KBHNOFMH@FilmFlipDelay?$AA@ DB 'FilmFlipDelay', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_0BA@MICJDFBB@Film?5Flip?5Delay?$AA@
CONST	SEGMENT
??_C@_0BA@MICJDFBB@Film?5Flip?5Delay?$AA@ DB 'Film Flip Delay', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_09FPJHDPPG@UseChroma?$AA@
CONST	SEGMENT
??_C@_09FPJHDPPG@UseChroma?$AA@ DB 'UseChroma', 00H	; `string'
CONST	ENDS
;	COMDAT ??_C@_0O@DDFDBPPD@Chroma?5Detect?$AA@
CONST	SEGMENT
??_C@_0O@DDFDBPPD@Chroma?5Detect?$AA@ DB 'Chroma Detect', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_0O@OHGLHDIH@DiffThreshold?$AA@
CONST	SEGMENT
??_C@_0O@OHGLHDIH@DiffThreshold?$AA@ DB 'DiffThreshold', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_0BA@FLPGDLAL@JaggieThreshold?$AA@
CONST	SEGMENT
??_C@_0BA@FLPGDLAL@JaggieThreshold?$AA@ DB 'JaggieThreshold', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_0BG@EAMCLAHA@Comb?5Jaggie?5Threshold?$AA@
CONST	SEGMENT
??_C@_0BG@EAMCLAHA@Comb?5Jaggie?5Threshold?$AA@ DB 'Comb Jaggie Threshold'
	DB	00H						; `string'
CONST	ENDS
;	COMDAT ??_C@_0L@KCHHFKDA@EdgeDetect?$AA@
CONST	SEGMENT
??_C@_0L@KCHHFKDA@EdgeDetect?$AA@ DB 'EdgeDetect', 00H	; `string'
CONST	ENDS
;	COMDAT ??_C@_0BB@JCPLDGMJ@Comb?5Edge?5Detect?$AA@
CONST	SEGMENT
??_C@_0BB@JCPLDGMJ@Comb?5Edge?5Detect?$AA@ DB 'Comb Edge Detect', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_08FMGOHKEE@BitShift?$AA@
CONST	SEGMENT
??_C@_08FMGOHKEE@BitShift?$AA@ DB 'BitShift', 00H	; `string'
CONST	ENDS
;	COMDAT ??_C@_09PDCCCECB@Bit?5Shift?$AA@
CONST	SEGMENT
??_C@_09PDCCCECB@Bit?5Shift?$AA@ DB 'Bit Shift', 00H	; `string'
CONST	ENDS
;	COMDAT ??_C@_1DM@NGDJLNBJ@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?$CF?$AAc?$AA?5?$AAF?$AAD?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?7?$AA?5?$AAC?$AAF?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@
CONST	SEGMENT
??_C@_1DM@NGDJLNBJ@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?$CF?$AAc?$AA?5?$AAF?$AAD?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?7?$AA?5?$AAC?$AAF?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@ DB 'F'
	DB	00H, 'r', 00H, 'a', 00H, 'm', 00H, 'e', 00H, ' ', 00H, '%', 00H
	DB	'd', 00H, ' ', 00H, '%', 00H, 'c', 00H, ' ', 00H, 'F', 00H, 'D'
	DB	00H, ' ', 00H, '=', 00H, ' ', 00H, '%', 00H, 'd', 00H, ' ', 00H
	DB	09H, 00H, ' ', 00H, 'C', 00H, 'F', 00H, ' ', 00H, '=', 00H, ' '
	DB	00H, '%', 00H, 'd', 00H, 00H, 00H		; `string'
CONST	ENDS
;	COMDAT ??_C@_1CI@FHBFACIB@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?$CF?$AAc?$AA?5?$AAF?$AAD?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@
CONST	SEGMENT
??_C@_1CI@FHBFACIB@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?$CF?$AAc?$AA?5?$AAF?$AAD?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@ DB 'F'
	DB	00H, 'r', 00H, 'a', 00H, 'm', 00H, 'e', 00H, ' ', 00H, '%', 00H
	DB	'd', 00H, ' ', 00H, '%', 00H, 'c', 00H, ' ', 00H, 'F', 00H, 'D'
	DB	00H, ' ', 00H, '=', 00H, ' ', 00H, '%', 00H, 'd', 00H, 00H, 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_1CI@MMCCBLDK@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?$CF?$AAc?$AA?5?$AAC?$AAF?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@
CONST	SEGMENT
??_C@_1CI@MMCCBLDK@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?$CF?$AAc?$AA?5?$AAC?$AAF?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@ DB 'F'
	DB	00H, 'r', 00H, 'a', 00H, 'm', 00H, 'e', 00H, ' ', 00H, '%', 00H
	DB	'd', 00H, ' ', 00H, '%', 00H, 'c', 00H, ' ', 00H, 'C', 00H, 'F'
	DB	00H, ' ', 00H, '=', 00H, ' ', 00H, '%', 00H, 'd', 00H, 00H, 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_1CC@DABIACJG@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AAF?$AAD?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@
CONST	SEGMENT
??_C@_1CC@DABIACJG@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AAF?$AAD?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@ DB 'F'
	DB	00H, 'r', 00H, 'a', 00H, 'm', 00H, 'e', 00H, ' ', 00H, '%', 00H
	DB	'd', 00H, ' ', 00H, 'F', 00H, 'D', 00H, ' ', 00H, '=', 00H, ' '
	DB	00H, '%', 00H, 'd', 00H, 00H, 00H		; `string'
?BitShift@@3JA DD 0cH					; BitShift
?CombEdgeDetect@@3JA DD 0271H				; CombEdgeDetect
?CombJaggieThreshold@@3JA DD 049H			; CombJaggieThreshold
?DiffThreshold@@3JA DD 0e0H				; DiffThreshold
_qwYMask DQ	00ff00ff00ff00ffH
_qwMask	DQ	7f7f7f7f7f7f7f7fH
_qwOnes	DQ	0001000100010001H
?FD_CommonSettings@@3PAUSETTING@@A DD FLAT:??_C@_09PDCCCECB@Bit?5Shift?$AA@ ; FD_CommonSettings
	DD	04H
	DD	00H
	DD	FLAT:?BitShift@@3JA
	DD	0cH
	DD	00H
	DD	0fH
	DD	01H
	DD	01H
	DD	00H
	DD	FLAT:??_C@_08BJADNCEH@Pulldown?$AA@
	DD	FLAT:??_C@_08FMGOHKEE@BitShift?$AA@
	DD	00H
	DD	FLAT:??_C@_0BB@JCPLDGMJ@Comb?5Edge?5Detect?$AA@
	DD	04H
	DD	00H
	DD	FLAT:?CombEdgeDetect@@3JA
	DD	0271H
	DD	00H
	DD	02710H
	DD	05H
	DD	01H
	DD	00H
	DD	FLAT:??_C@_08BJADNCEH@Pulldown?$AA@
	DD	FLAT:??_C@_0L@KCHHFKDA@EdgeDetect?$AA@
	DD	00H
	DD	FLAT:??_C@_0BG@EAMCLAHA@Comb?5Jaggie?5Threshold?$AA@
	DD	04H
	DD	00H
	DD	FLAT:?CombJaggieThreshold@@3JA
	DD	049H
	DD	00H
	DD	01388H
	DD	05H
	DD	01H
	DD	00H
	DD	FLAT:??_C@_08BJADNCEH@Pulldown?$AA@
	DD	FLAT:??_C@_0BA@FLPGDLAL@JaggieThreshold?$AA@
	DD	00H
	DD	FLAT:??_C@_0O@OHGLHDIH@DiffThreshold?$AA@
	DD	04H
	DD	00H
	DD	FLAT:?DiffThreshold@@3JA
	DD	0e0H
	DD	00H
	DD	01388H
	DD	05H
	DD	01H
	DD	00H
	DD	FLAT:??_C@_08BJADNCEH@Pulldown?$AA@
	DD	FLAT:??_C@_0O@OHGLHDIH@DiffThreshold?$AA@
	DD	00H
	DD	FLAT:??_C@_0O@DDFDBPPD@Chroma?5Detect?$AA@
	DD	01H
	DD	00H
	DD	FLAT:?UseChromaInDetect@@3HA
	DD	00H
	DD	00H
	DD	01H
	DD	01H
	DD	01H
	DD	00H
	DD	FLAT:??_C@_08BJADNCEH@Pulldown?$AA@
	DD	FLAT:??_C@_09FPJHDPPG@UseChroma?$AA@
	DD	00H
	DD	FLAT:??_C@_0BA@MICJDFBB@Film?5Flip?5Delay?$AA@
	DD	04H
	DD	00H
	DD	FLAT:?FilmFlipDelay@@3JA
	DD	00H
	DD	00H
	DD	03H
	DD	01H
	DD	01H
	DD	00H
	DD	FLAT:??_C@_08BJADNCEH@Pulldown?$AA@
	DD	FLAT:??_C@_0O@KBHNOFMH@FilmFlipDelay?$AA@
	DD	00H
PUBLIC	?FD_Common_SetMenu@@YAXPAUHMENU__@@@Z		; FD_Common_SetMenu
; Function compile flags: /Odtp
; File c:\develop\dscaler423a\dscaler\fd_common.cpp
;	COMDAT ?FD_Common_SetMenu@@YAXPAUHMENU__@@@Z
_TEXT	SEGMENT
_hMenu$ = 8						; size = 4
?FD_Common_SetMenu@@YAXPAUHMENU__@@@Z PROC		; FD_Common_SetMenu, COMDAT

; 741  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp

; 742  : }

  00003	5d		 pop	 ebp
  00004	c3		 ret	 0
?FD_Common_SetMenu@@YAXPAUHMENU__@@@Z ENDP		; FD_Common_SetMenu
_TEXT	ENDS
PUBLIC	?FD_Common_GetSetting@@YAPAUSETTING@@W4FD_COMMON_SETTING@@@Z ; FD_Common_GetSetting
; Function compile flags: /Odtp
;	COMDAT ?FD_Common_GetSetting@@YAPAUSETTING@@W4FD_COMMON_SETTING@@@Z
_TEXT	SEGMENT
_Setting$ = 8						; size = 4
?FD_Common_GetSetting@@YAPAUSETTING@@W4FD_COMMON_SETTING@@@Z PROC ; FD_Common_GetSetting, COMDAT

; 729  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp

; 730  :     if(Setting > -1 && Setting < FD_COMMON_SETTING_LASTONE)

  00003	83 7d 08 ff	 cmp	 DWORD PTR _Setting$[ebp], -1
  00007	7e 15		 jle	 SHORT $LN2@FD_Common_
  00009	83 7d 08 06	 cmp	 DWORD PTR _Setting$[ebp], 6
  0000d	7d 0f		 jge	 SHORT $LN2@FD_Common_

; 731  :     {
; 732  :         return &(FD_CommonSettings[Setting]);

  0000f	8b 45 08	 mov	 eax, DWORD PTR _Setting$[ebp]
  00012	6b c0 34	 imul	 eax, 52			; 00000034H
  00015	05 00 00 00 00	 add	 eax, OFFSET ?FD_CommonSettings@@3PAUSETTING@@A ; FD_CommonSettings
  0001a	eb 04		 jmp	 SHORT $LN3@FD_Common_

; 733  :     }
; 734  :     else

  0001c	eb 02		 jmp	 SHORT $LN3@FD_Common_
$LN2@FD_Common_:

; 735  :     {
; 736  :         return NULL;

  0001e	33 c0		 xor	 eax, eax
$LN3@FD_Common_:

; 737  :     }
; 738  : }

  00020	5d		 pop	 ebp
  00021	c3		 ret	 0
?FD_Common_GetSetting@@YAPAUSETTING@@W4FD_COMMON_SETTING@@@Z ENDP ; FD_Common_GetSetting
_TEXT	ENDS
PUBLIC	?Bob@@YAHPAUTDeinterlaceInfo@@@Z		; Bob
; Function compile flags: /Odtp
;	COMDAT ?Bob@@YAHPAUTDeinterlaceInfo@@@Z
_TEXT	SEGMENT
_lpOverlay$ = -16					; size = 4
_CurrentLine$ = -12					; size = 4
_Pitch$ = -8						; size = 4
_i$ = -4						; size = 4
_pInfo$ = 8						; size = 4
?Bob@@YAHPAUTDeinterlaceInfo@@@Z PROC			; Bob, COMDAT

; 609  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 10	 sub	 esp, 16			; 00000010H

; 610  :     int i;
; 611  :     BYTE* lpOverlay = pInfo->Overlay;

  00006	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00009	8b 48 2c	 mov	 ecx, DWORD PTR [eax+44]
  0000c	89 4d f0	 mov	 DWORD PTR _lpOverlay$[ebp], ecx

; 612  :     BYTE* CurrentLine = pInfo->PictureHistory[0]->pData;

  0000f	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00012	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  00015	8b 08		 mov	 ecx, DWORD PTR [eax]
  00017	89 4d f4	 mov	 DWORD PTR _CurrentLine$[ebp], ecx

; 613  :     DWORD Pitch = pInfo->InputPitch;

  0001a	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0001d	8b 82 84 00 00
	00		 mov	 eax, DWORD PTR [edx+132]
  00023	89 45 f8	 mov	 DWORD PTR _Pitch$[ebp], eax

; 614  : 
; 615  :     // No recent data?  We can't do anything.
; 616  :     if (CurrentLine == NULL)

  00026	83 7d f4 00	 cmp	 DWORD PTR _CurrentLine$[ebp], 0
  0002a	75 07		 jne	 SHORT $LN19@Bob

; 617  :     {
; 618  :         return FALSE;

  0002c	33 c0		 xor	 eax, eax
  0002e	e9 2a 02 00 00	 jmp	 $LN20@Bob
$LN19@Bob:

; 619  :     }
; 620  : 
; 621  :     // If field is odd we will offset it down 1 line to avoid jitter  TRB 1/21/01
; 622  :     if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD)

  00033	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00036	8b 51 04	 mov	 edx, DWORD PTR [ecx+4]
  00039	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  0003c	83 e0 01	 and	 eax, 1
  0003f	0f 84 52 01 00
	00		 je	 $LN18@Bob

; 623  :     {
; 624  :         if (pInfo->CpuFeatureFlags & FEATURE_SSE)

  00045	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00048	8b 51 64	 mov	 edx, DWORD PTR [ecx+100]
  0004b	81 e2 00 20 00
	00		 and	 edx, 8192		; 00002000H
  00051	0f 84 a0 00 00
	00		 je	 $LN17@Bob

; 625  :         {
; 626  :             pInfo->pMemcpy(lpOverlay, CurrentLine, pInfo->LineLength);   // extra copy of first line

  00057	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  0005a	8b 48 48	 mov	 ecx, DWORD PTR [eax+72]
  0005d	51		 push	 ecx
  0005e	8b 55 f4	 mov	 edx, DWORD PTR _CurrentLine$[ebp]
  00061	52		 push	 edx
  00062	8b 45 f0	 mov	 eax, DWORD PTR _lpOverlay$[ebp]
  00065	50		 push	 eax
  00066	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00069	8b 51 60	 mov	 edx, DWORD PTR [ecx+96]
  0006c	ff d2		 call	 edx
  0006e	83 c4 0c	 add	 esp, 12			; 0000000cH

; 627  :             lpOverlay += pInfo->OverlayPitch;                            // and offset out output ptr

  00071	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00074	8b 4d f0	 mov	 ecx, DWORD PTR _lpOverlay$[ebp]
  00077	03 48 44	 add	 ecx, DWORD PTR [eax+68]
  0007a	89 4d f0	 mov	 DWORD PTR _lpOverlay$[ebp], ecx

; 628  :             for (i = 0; i < pInfo->FieldHeight - 1; i++)

  0007d	c7 45 fc 00 00
	00 00		 mov	 DWORD PTR _i$[ebp], 0
  00084	eb 09		 jmp	 SHORT $LN16@Bob
$LN15@Bob:
  00086	8b 55 fc	 mov	 edx, DWORD PTR _i$[ebp]
  00089	83 c2 01	 add	 edx, 1
  0008c	89 55 fc	 mov	 DWORD PTR _i$[ebp], edx
$LN16@Bob:
  0008f	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00092	8b 48 54	 mov	 ecx, DWORD PTR [eax+84]
  00095	83 e9 01	 sub	 ecx, 1
  00098	39 4d fc	 cmp	 DWORD PTR _i$[ebp], ecx
  0009b	7d 3b		 jge	 SHORT $LN14@Bob

; 629  :             {
; 630  :                 memcpyBOBSSE(lpOverlay, lpOverlay + pInfo->OverlayPitch,
; 631  :                     CurrentLine, pInfo->LineLength);

  0009d	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  000a0	8b 42 48	 mov	 eax, DWORD PTR [edx+72]
  000a3	50		 push	 eax
  000a4	8b 4d f4	 mov	 ecx, DWORD PTR _CurrentLine$[ebp]
  000a7	51		 push	 ecx
  000a8	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  000ab	8b 45 f0	 mov	 eax, DWORD PTR _lpOverlay$[ebp]
  000ae	03 42 44	 add	 eax, DWORD PTR [edx+68]
  000b1	50		 push	 eax
  000b2	8b 4d f0	 mov	 ecx, DWORD PTR _lpOverlay$[ebp]
  000b5	51		 push	 ecx
  000b6	e8 00 00 00 00	 call	 _memcpyBOBSSE
  000bb	83 c4 10	 add	 esp, 16			; 00000010H

; 632  :                 lpOverlay += 2 * pInfo->OverlayPitch;

  000be	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  000c1	8b 42 44	 mov	 eax, DWORD PTR [edx+68]
  000c4	8b 4d f0	 mov	 ecx, DWORD PTR _lpOverlay$[ebp]
  000c7	8d 14 41	 lea	 edx, DWORD PTR [ecx+eax*2]
  000ca	89 55 f0	 mov	 DWORD PTR _lpOverlay$[ebp], edx

; 633  :                 CurrentLine += Pitch;

  000cd	8b 45 f4	 mov	 eax, DWORD PTR _CurrentLine$[ebp]
  000d0	03 45 f8	 add	 eax, DWORD PTR _Pitch$[ebp]
  000d3	89 45 f4	 mov	 DWORD PTR _CurrentLine$[ebp], eax

; 634  :             }

  000d6	eb ae		 jmp	 SHORT $LN15@Bob
$LN14@Bob:

; 635  :             pInfo->pMemcpy(lpOverlay, CurrentLine, pInfo->LineLength);   // only 1 copy of last line

  000d8	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  000db	8b 51 48	 mov	 edx, DWORD PTR [ecx+72]
  000de	52		 push	 edx
  000df	8b 45 f4	 mov	 eax, DWORD PTR _CurrentLine$[ebp]
  000e2	50		 push	 eax
  000e3	8b 4d f0	 mov	 ecx, DWORD PTR _lpOverlay$[ebp]
  000e6	51		 push	 ecx
  000e7	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  000ea	8b 42 60	 mov	 eax, DWORD PTR [edx+96]
  000ed	ff d0		 call	 eax
  000ef	83 c4 0c	 add	 esp, 12			; 0000000cH

; 636  :         }
; 637  :         else

  000f2	e9 9b 00 00 00	 jmp	 $LN13@Bob
$LN17@Bob:

; 638  :         {
; 639  :             pInfo->pMemcpy(lpOverlay, CurrentLine, pInfo->LineLength);   // extra copy of first line

  000f7	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  000fa	8b 51 48	 mov	 edx, DWORD PTR [ecx+72]
  000fd	52		 push	 edx
  000fe	8b 45 f4	 mov	 eax, DWORD PTR _CurrentLine$[ebp]
  00101	50		 push	 eax
  00102	8b 4d f0	 mov	 ecx, DWORD PTR _lpOverlay$[ebp]
  00105	51		 push	 ecx
  00106	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00109	8b 42 60	 mov	 eax, DWORD PTR [edx+96]
  0010c	ff d0		 call	 eax
  0010e	83 c4 0c	 add	 esp, 12			; 0000000cH

; 640  :             lpOverlay += pInfo->OverlayPitch;                    // and offset out output ptr

  00111	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00114	8b 55 f0	 mov	 edx, DWORD PTR _lpOverlay$[ebp]
  00117	03 51 44	 add	 edx, DWORD PTR [ecx+68]
  0011a	89 55 f0	 mov	 DWORD PTR _lpOverlay$[ebp], edx

; 641  :             for (i = 0; i < pInfo->FieldHeight - 1; i++)

  0011d	c7 45 fc 00 00
	00 00		 mov	 DWORD PTR _i$[ebp], 0
  00124	eb 09		 jmp	 SHORT $LN12@Bob
$LN11@Bob:
  00126	8b 45 fc	 mov	 eax, DWORD PTR _i$[ebp]
  00129	83 c0 01	 add	 eax, 1
  0012c	89 45 fc	 mov	 DWORD PTR _i$[ebp], eax
$LN12@Bob:
  0012f	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00132	8b 51 54	 mov	 edx, DWORD PTR [ecx+84]
  00135	83 ea 01	 sub	 edx, 1
  00138	39 55 fc	 cmp	 DWORD PTR _i$[ebp], edx
  0013b	7d 3b		 jge	 SHORT $LN10@Bob

; 642  :             {
; 643  :                 memcpyBOBMMX(lpOverlay, lpOverlay + pInfo->OverlayPitch,
; 644  :                     CurrentLine, pInfo->LineLength);

  0013d	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00140	8b 48 48	 mov	 ecx, DWORD PTR [eax+72]
  00143	51		 push	 ecx
  00144	8b 55 f4	 mov	 edx, DWORD PTR _CurrentLine$[ebp]
  00147	52		 push	 edx
  00148	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  0014b	8b 4d f0	 mov	 ecx, DWORD PTR _lpOverlay$[ebp]
  0014e	03 48 44	 add	 ecx, DWORD PTR [eax+68]
  00151	51		 push	 ecx
  00152	8b 55 f0	 mov	 edx, DWORD PTR _lpOverlay$[ebp]
  00155	52		 push	 edx
  00156	e8 00 00 00 00	 call	 _memcpyBOBMMX
  0015b	83 c4 10	 add	 esp, 16			; 00000010H

; 645  :                 lpOverlay += 2 * pInfo->OverlayPitch;

  0015e	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00161	8b 48 44	 mov	 ecx, DWORD PTR [eax+68]
  00164	8b 55 f0	 mov	 edx, DWORD PTR _lpOverlay$[ebp]
  00167	8d 04 4a	 lea	 eax, DWORD PTR [edx+ecx*2]
  0016a	89 45 f0	 mov	 DWORD PTR _lpOverlay$[ebp], eax

; 646  :                 CurrentLine += Pitch;

  0016d	8b 4d f4	 mov	 ecx, DWORD PTR _CurrentLine$[ebp]
  00170	03 4d f8	 add	 ecx, DWORD PTR _Pitch$[ebp]
  00173	89 4d f4	 mov	 DWORD PTR _CurrentLine$[ebp], ecx

; 647  :             }

  00176	eb ae		 jmp	 SHORT $LN11@Bob
$LN10@Bob:

; 648  :             pInfo->pMemcpy(lpOverlay, CurrentLine, pInfo->LineLength);   // only 1 copy of last line

  00178	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0017b	8b 42 48	 mov	 eax, DWORD PTR [edx+72]
  0017e	50		 push	 eax
  0017f	8b 4d f4	 mov	 ecx, DWORD PTR _CurrentLine$[ebp]
  00182	51		 push	 ecx
  00183	8b 55 f0	 mov	 edx, DWORD PTR _lpOverlay$[ebp]
  00186	52		 push	 edx
  00187	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  0018a	8b 48 60	 mov	 ecx, DWORD PTR [eax+96]
  0018d	ff d1		 call	 ecx
  0018f	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN13@Bob:

; 649  :         }
; 650  :     }
; 651  :     else

  00192	e9 bf 00 00 00	 jmp	 $LN9@Bob
$LN18@Bob:

; 652  :     {
; 653  :         if (pInfo->CpuFeatureFlags & FEATURE_SSE)

  00197	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0019a	8b 42 64	 mov	 eax, DWORD PTR [edx+100]
  0019d	25 00 20 00 00	 and	 eax, 8192		; 00002000H
  001a2	74 5a		 je	 SHORT $LN8@Bob

; 654  :         {
; 655  :             for (i = 0; i < pInfo->FieldHeight; i++)

  001a4	c7 45 fc 00 00
	00 00		 mov	 DWORD PTR _i$[ebp], 0
  001ab	eb 09		 jmp	 SHORT $LN7@Bob
$LN6@Bob:
  001ad	8b 4d fc	 mov	 ecx, DWORD PTR _i$[ebp]
  001b0	83 c1 01	 add	 ecx, 1
  001b3	89 4d fc	 mov	 DWORD PTR _i$[ebp], ecx
$LN7@Bob:
  001b6	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  001b9	8b 45 fc	 mov	 eax, DWORD PTR _i$[ebp]
  001bc	3b 42 54	 cmp	 eax, DWORD PTR [edx+84]
  001bf	7d 3b		 jge	 SHORT $LN5@Bob

; 656  :             {
; 657  :                 memcpyBOBSSE(lpOverlay, lpOverlay + pInfo->OverlayPitch,
; 658  :                     CurrentLine, pInfo->LineLength);

  001c1	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  001c4	8b 51 48	 mov	 edx, DWORD PTR [ecx+72]
  001c7	52		 push	 edx
  001c8	8b 45 f4	 mov	 eax, DWORD PTR _CurrentLine$[ebp]
  001cb	50		 push	 eax
  001cc	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  001cf	8b 55 f0	 mov	 edx, DWORD PTR _lpOverlay$[ebp]
  001d2	03 51 44	 add	 edx, DWORD PTR [ecx+68]
  001d5	52		 push	 edx
  001d6	8b 45 f0	 mov	 eax, DWORD PTR _lpOverlay$[ebp]
  001d9	50		 push	 eax
  001da	e8 00 00 00 00	 call	 _memcpyBOBSSE
  001df	83 c4 10	 add	 esp, 16			; 00000010H

; 659  :                 lpOverlay += 2 * pInfo->OverlayPitch;

  001e2	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  001e5	8b 51 44	 mov	 edx, DWORD PTR [ecx+68]
  001e8	8b 45 f0	 mov	 eax, DWORD PTR _lpOverlay$[ebp]
  001eb	8d 0c 50	 lea	 ecx, DWORD PTR [eax+edx*2]
  001ee	89 4d f0	 mov	 DWORD PTR _lpOverlay$[ebp], ecx

; 660  :                 CurrentLine += Pitch;

  001f1	8b 55 f4	 mov	 edx, DWORD PTR _CurrentLine$[ebp]
  001f4	03 55 f8	 add	 edx, DWORD PTR _Pitch$[ebp]
  001f7	89 55 f4	 mov	 DWORD PTR _CurrentLine$[ebp], edx

; 661  :             }

  001fa	eb b1		 jmp	 SHORT $LN6@Bob
$LN5@Bob:

; 662  :         }
; 663  :         else

  001fc	eb 58		 jmp	 SHORT $LN9@Bob
$LN8@Bob:

; 664  :         {
; 665  :             for (i = 0; i < pInfo->FieldHeight; i++)

  001fe	c7 45 fc 00 00
	00 00		 mov	 DWORD PTR _i$[ebp], 0
  00205	eb 09		 jmp	 SHORT $LN3@Bob
$LN2@Bob:
  00207	8b 45 fc	 mov	 eax, DWORD PTR _i$[ebp]
  0020a	83 c0 01	 add	 eax, 1
  0020d	89 45 fc	 mov	 DWORD PTR _i$[ebp], eax
$LN3@Bob:
  00210	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00213	8b 55 fc	 mov	 edx, DWORD PTR _i$[ebp]
  00216	3b 51 54	 cmp	 edx, DWORD PTR [ecx+84]
  00219	7d 3b		 jge	 SHORT $LN9@Bob

; 666  :             {
; 667  :                 memcpyBOBMMX(lpOverlay, lpOverlay + pInfo->OverlayPitch,
; 668  :                     CurrentLine, pInfo->LineLength);

  0021b	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  0021e	8b 48 48	 mov	 ecx, DWORD PTR [eax+72]
  00221	51		 push	 ecx
  00222	8b 55 f4	 mov	 edx, DWORD PTR _CurrentLine$[ebp]
  00225	52		 push	 edx
  00226	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00229	8b 4d f0	 mov	 ecx, DWORD PTR _lpOverlay$[ebp]
  0022c	03 48 44	 add	 ecx, DWORD PTR [eax+68]
  0022f	51		 push	 ecx
  00230	8b 55 f0	 mov	 edx, DWORD PTR _lpOverlay$[ebp]
  00233	52		 push	 edx
  00234	e8 00 00 00 00	 call	 _memcpyBOBMMX
  00239	83 c4 10	 add	 esp, 16			; 00000010H

; 669  :                 lpOverlay += 2 * pInfo->OverlayPitch;

  0023c	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  0023f	8b 48 44	 mov	 ecx, DWORD PTR [eax+68]
  00242	8b 55 f0	 mov	 edx, DWORD PTR _lpOverlay$[ebp]
  00245	8d 04 4a	 lea	 eax, DWORD PTR [edx+ecx*2]
  00248	89 45 f0	 mov	 DWORD PTR _lpOverlay$[ebp], eax

; 670  :                 CurrentLine += Pitch;

  0024b	8b 4d f4	 mov	 ecx, DWORD PTR _CurrentLine$[ebp]
  0024e	03 4d f8	 add	 ecx, DWORD PTR _Pitch$[ebp]
  00251	89 4d f4	 mov	 DWORD PTR _CurrentLine$[ebp], ecx

; 671  :             }

  00254	eb b1		 jmp	 SHORT $LN2@Bob
$LN9@Bob:

; 672  :         }
; 673  :     }
; 674  :     // need to clear up MMX registers
; 675  :     DO_EMMS;

  00256	0f 77		 emms

; 676  :     return TRUE;

  00258	b8 01 00 00 00	 mov	 eax, 1
$LN20@Bob:

; 677  : }

  0025d	8b e5		 mov	 esp, ebp
  0025f	5d		 pop	 ebp
  00260	c3		 ret	 0
?Bob@@YAHPAUTDeinterlaceInfo@@@Z ENDP			; Bob
_TEXT	ENDS
PUBLIC	?WeaveDelay@@YAHPAUTDeinterlaceInfo@@H@Z	; WeaveDelay
; Function compile flags: /Odtp
;	COMDAT ?WeaveDelay@@YAHPAUTDeinterlaceInfo@@H@Z
_TEXT	SEGMENT
_CurrentOddLine$ = -20					; size = 4
_lpOverlay$ = -16					; size = 4
_CurrentEvenLine$ = -12					; size = 4
_Pitch$ = -8						; size = 4
_i$ = -4						; size = 4
_pInfo$ = 8						; size = 4
_Delay$ = 12						; size = 4
?WeaveDelay@@YAHPAUTDeinterlaceInfo@@H@Z PROC		; WeaveDelay, COMDAT

; 538  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 14	 sub	 esp, 20			; 00000014H

; 539  :     int i;
; 540  :     BYTE *lpOverlay = pInfo->Overlay;

  00006	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00009	8b 48 2c	 mov	 ecx, DWORD PTR [eax+44]
  0000c	89 4d f0	 mov	 DWORD PTR _lpOverlay$[ebp], ecx

; 541  :     BYTE* CurrentOddLine;
; 542  :     BYTE* CurrentEvenLine;
; 543  :     DWORD Pitch = pInfo->InputPitch;

  0000f	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00012	8b 82 84 00 00
	00		 mov	 eax, DWORD PTR [edx+132]
  00018	89 45 f8	 mov	 DWORD PTR _Pitch$[ebp], eax

; 544  : 
; 545  :     if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD)

  0001b	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  0001e	8b 51 04	 mov	 edx, DWORD PTR [ecx+4]
  00021	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  00024	83 e0 01	 and	 eax, 1
  00027	74 20		 je	 SHORT $LN5@WeaveDelay

; 546  :     {
; 547  :         CurrentOddLine = pInfo->PictureHistory[Delay]->pData;

  00029	8b 4d 0c	 mov	 ecx, DWORD PTR _Delay$[ebp]
  0002c	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0002f	8b 44 8a 04	 mov	 eax, DWORD PTR [edx+ecx*4+4]
  00033	8b 08		 mov	 ecx, DWORD PTR [eax]
  00035	89 4d ec	 mov	 DWORD PTR _CurrentOddLine$[ebp], ecx

; 548  :         CurrentEvenLine = pInfo->PictureHistory[Delay + 1]->pData;

  00038	8b 55 0c	 mov	 edx, DWORD PTR _Delay$[ebp]
  0003b	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  0003e	8b 4c 90 08	 mov	 ecx, DWORD PTR [eax+edx*4+8]
  00042	8b 11		 mov	 edx, DWORD PTR [ecx]
  00044	89 55 f4	 mov	 DWORD PTR _CurrentEvenLine$[ebp], edx

; 549  :     }
; 550  :     else

  00047	eb 1e		 jmp	 SHORT $LN4@WeaveDelay
$LN5@WeaveDelay:

; 551  :     {
; 552  :         CurrentOddLine = pInfo->PictureHistory[Delay + 1]->pData;

  00049	8b 45 0c	 mov	 eax, DWORD PTR _Delay$[ebp]
  0004c	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  0004f	8b 54 81 08	 mov	 edx, DWORD PTR [ecx+eax*4+8]
  00053	8b 02		 mov	 eax, DWORD PTR [edx]
  00055	89 45 ec	 mov	 DWORD PTR _CurrentOddLine$[ebp], eax

; 553  :         CurrentEvenLine = pInfo->PictureHistory[Delay]->pData;

  00058	8b 4d 0c	 mov	 ecx, DWORD PTR _Delay$[ebp]
  0005b	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0005e	8b 44 8a 04	 mov	 eax, DWORD PTR [edx+ecx*4+4]
  00062	8b 08		 mov	 ecx, DWORD PTR [eax]
  00064	89 4d f4	 mov	 DWORD PTR _CurrentEvenLine$[ebp], ecx
$LN4@WeaveDelay:

; 554  :     }
; 555  : 
; 556  :     for (i = 0; i < pInfo->FieldHeight; i++)

  00067	c7 45 fc 00 00
	00 00		 mov	 DWORD PTR _i$[ebp], 0
  0006e	eb 09		 jmp	 SHORT $LN3@WeaveDelay
$LN2@WeaveDelay:
  00070	8b 55 fc	 mov	 edx, DWORD PTR _i$[ebp]
  00073	83 c2 01	 add	 edx, 1
  00076	89 55 fc	 mov	 DWORD PTR _i$[ebp], edx
$LN3@WeaveDelay:
  00079	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  0007c	8b 4d fc	 mov	 ecx, DWORD PTR _i$[ebp]
  0007f	3b 48 54	 cmp	 ecx, DWORD PTR [eax+84]
  00082	7d 60		 jge	 SHORT $LN1@WeaveDelay

; 557  :     {
; 558  :         pInfo->pMemcpy(lpOverlay, CurrentEvenLine, pInfo->LineLength);

  00084	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00087	8b 42 48	 mov	 eax, DWORD PTR [edx+72]
  0008a	50		 push	 eax
  0008b	8b 4d f4	 mov	 ecx, DWORD PTR _CurrentEvenLine$[ebp]
  0008e	51		 push	 ecx
  0008f	8b 55 f0	 mov	 edx, DWORD PTR _lpOverlay$[ebp]
  00092	52		 push	 edx
  00093	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00096	8b 48 60	 mov	 ecx, DWORD PTR [eax+96]
  00099	ff d1		 call	 ecx
  0009b	83 c4 0c	 add	 esp, 12			; 0000000cH

; 559  :         lpOverlay += pInfo->OverlayPitch;

  0009e	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  000a1	8b 45 f0	 mov	 eax, DWORD PTR _lpOverlay$[ebp]
  000a4	03 42 44	 add	 eax, DWORD PTR [edx+68]
  000a7	89 45 f0	 mov	 DWORD PTR _lpOverlay$[ebp], eax

; 560  :         CurrentEvenLine += Pitch;

  000aa	8b 4d f4	 mov	 ecx, DWORD PTR _CurrentEvenLine$[ebp]
  000ad	03 4d f8	 add	 ecx, DWORD PTR _Pitch$[ebp]
  000b0	89 4d f4	 mov	 DWORD PTR _CurrentEvenLine$[ebp], ecx

; 561  : 
; 562  :         pInfo->pMemcpy(lpOverlay, CurrentOddLine, pInfo->LineLength);

  000b3	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  000b6	8b 42 48	 mov	 eax, DWORD PTR [edx+72]
  000b9	50		 push	 eax
  000ba	8b 4d ec	 mov	 ecx, DWORD PTR _CurrentOddLine$[ebp]
  000bd	51		 push	 ecx
  000be	8b 55 f0	 mov	 edx, DWORD PTR _lpOverlay$[ebp]
  000c1	52		 push	 edx
  000c2	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  000c5	8b 48 60	 mov	 ecx, DWORD PTR [eax+96]
  000c8	ff d1		 call	 ecx
  000ca	83 c4 0c	 add	 esp, 12			; 0000000cH

; 563  :         lpOverlay += pInfo->OverlayPitch;

  000cd	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  000d0	8b 45 f0	 mov	 eax, DWORD PTR _lpOverlay$[ebp]
  000d3	03 42 44	 add	 eax, DWORD PTR [edx+68]
  000d6	89 45 f0	 mov	 DWORD PTR _lpOverlay$[ebp], eax

; 564  :         CurrentOddLine += Pitch;

  000d9	8b 4d ec	 mov	 ecx, DWORD PTR _CurrentOddLine$[ebp]
  000dc	03 4d f8	 add	 ecx, DWORD PTR _Pitch$[ebp]
  000df	89 4d ec	 mov	 DWORD PTR _CurrentOddLine$[ebp], ecx

; 565  :     }

  000e2	eb 8c		 jmp	 SHORT $LN2@WeaveDelay
$LN1@WeaveDelay:

; 566  :     DO_EMMS;

  000e4	0f 77		 emms

; 567  :     return TRUE;

  000e6	b8 01 00 00 00	 mov	 eax, 1

; 568  : }

  000eb	8b e5		 mov	 esp, ebp
  000ed	5d		 pop	 ebp
  000ee	c3		 ret	 0
?WeaveDelay@@YAHPAUTDeinterlaceInfo@@H@Z ENDP		; WeaveDelay
_TEXT	ENDS
PUBLIC	?Weave@@YAHPAUTDeinterlaceInfo@@@Z		; Weave
; Function compile flags: /Odtp
;	COMDAT ?Weave@@YAHPAUTDeinterlaceInfo@@@Z
_TEXT	SEGMENT
_CurrentOddLine$ = -20					; size = 4
_lpOverlay$ = -16					; size = 4
_CurrentEvenLine$ = -12					; size = 4
_Pitch$ = -8						; size = 4
_i$ = -4						; size = 4
_pInfo$ = 8						; size = 4
?Weave@@YAHPAUTDeinterlaceInfo@@@Z PROC			; Weave, COMDAT

; 505  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 14	 sub	 esp, 20			; 00000014H

; 506  :     int i;
; 507  :     BYTE *lpOverlay = pInfo->Overlay;

  00006	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00009	8b 48 2c	 mov	 ecx, DWORD PTR [eax+44]
  0000c	89 4d f0	 mov	 DWORD PTR _lpOverlay$[ebp], ecx

; 508  :     BYTE* CurrentOddLine;
; 509  :     BYTE* CurrentEvenLine;
; 510  :     DWORD Pitch = pInfo->InputPitch;

  0000f	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00012	8b 82 84 00 00
	00		 mov	 eax, DWORD PTR [edx+132]
  00018	89 45 f8	 mov	 DWORD PTR _Pitch$[ebp], eax

; 511  : 
; 512  :     if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD)

  0001b	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  0001e	8b 51 04	 mov	 edx, DWORD PTR [ecx+4]
  00021	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  00024	83 e0 01	 and	 eax, 1
  00027	74 18		 je	 SHORT $LN5@Weave

; 513  :     {
; 514  :         CurrentOddLine = pInfo->PictureHistory[0]->pData;

  00029	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  0002c	8b 51 04	 mov	 edx, DWORD PTR [ecx+4]
  0002f	8b 02		 mov	 eax, DWORD PTR [edx]
  00031	89 45 ec	 mov	 DWORD PTR _CurrentOddLine$[ebp], eax

; 515  :         CurrentEvenLine = pInfo->PictureHistory[1]->pData;

  00034	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00037	8b 51 08	 mov	 edx, DWORD PTR [ecx+8]
  0003a	8b 02		 mov	 eax, DWORD PTR [edx]
  0003c	89 45 f4	 mov	 DWORD PTR _CurrentEvenLine$[ebp], eax

; 516  :     }
; 517  :     else

  0003f	eb 16		 jmp	 SHORT $LN4@Weave
$LN5@Weave:

; 518  :     {
; 519  :         CurrentOddLine = pInfo->PictureHistory[1]->pData;

  00041	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00044	8b 51 08	 mov	 edx, DWORD PTR [ecx+8]
  00047	8b 02		 mov	 eax, DWORD PTR [edx]
  00049	89 45 ec	 mov	 DWORD PTR _CurrentOddLine$[ebp], eax

; 520  :         CurrentEvenLine = pInfo->PictureHistory[0]->pData;

  0004c	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  0004f	8b 51 04	 mov	 edx, DWORD PTR [ecx+4]
  00052	8b 02		 mov	 eax, DWORD PTR [edx]
  00054	89 45 f4	 mov	 DWORD PTR _CurrentEvenLine$[ebp], eax
$LN4@Weave:

; 521  :     }
; 522  : 
; 523  :     for (i = 0; i < pInfo->FieldHeight; i++)

  00057	c7 45 fc 00 00
	00 00		 mov	 DWORD PTR _i$[ebp], 0
  0005e	eb 09		 jmp	 SHORT $LN3@Weave
$LN2@Weave:
  00060	8b 4d fc	 mov	 ecx, DWORD PTR _i$[ebp]
  00063	83 c1 01	 add	 ecx, 1
  00066	89 4d fc	 mov	 DWORD PTR _i$[ebp], ecx
$LN3@Weave:
  00069	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0006c	8b 45 fc	 mov	 eax, DWORD PTR _i$[ebp]
  0006f	3b 42 54	 cmp	 eax, DWORD PTR [edx+84]
  00072	7d 60		 jge	 SHORT $LN1@Weave

; 524  :     {
; 525  :         pInfo->pMemcpy(lpOverlay, CurrentEvenLine, pInfo->LineLength);

  00074	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00077	8b 51 48	 mov	 edx, DWORD PTR [ecx+72]
  0007a	52		 push	 edx
  0007b	8b 45 f4	 mov	 eax, DWORD PTR _CurrentEvenLine$[ebp]
  0007e	50		 push	 eax
  0007f	8b 4d f0	 mov	 ecx, DWORD PTR _lpOverlay$[ebp]
  00082	51		 push	 ecx
  00083	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00086	8b 42 60	 mov	 eax, DWORD PTR [edx+96]
  00089	ff d0		 call	 eax
  0008b	83 c4 0c	 add	 esp, 12			; 0000000cH

; 526  :         lpOverlay += pInfo->OverlayPitch;

  0008e	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00091	8b 55 f0	 mov	 edx, DWORD PTR _lpOverlay$[ebp]
  00094	03 51 44	 add	 edx, DWORD PTR [ecx+68]
  00097	89 55 f0	 mov	 DWORD PTR _lpOverlay$[ebp], edx

; 527  :         CurrentEvenLine += Pitch;

  0009a	8b 45 f4	 mov	 eax, DWORD PTR _CurrentEvenLine$[ebp]
  0009d	03 45 f8	 add	 eax, DWORD PTR _Pitch$[ebp]
  000a0	89 45 f4	 mov	 DWORD PTR _CurrentEvenLine$[ebp], eax

; 528  : 
; 529  :         pInfo->pMemcpy(lpOverlay, CurrentOddLine, pInfo->LineLength);

  000a3	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  000a6	8b 51 48	 mov	 edx, DWORD PTR [ecx+72]
  000a9	52		 push	 edx
  000aa	8b 45 ec	 mov	 eax, DWORD PTR _CurrentOddLine$[ebp]
  000ad	50		 push	 eax
  000ae	8b 4d f0	 mov	 ecx, DWORD PTR _lpOverlay$[ebp]
  000b1	51		 push	 ecx
  000b2	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  000b5	8b 42 60	 mov	 eax, DWORD PTR [edx+96]
  000b8	ff d0		 call	 eax
  000ba	83 c4 0c	 add	 esp, 12			; 0000000cH

; 530  :         lpOverlay += pInfo->OverlayPitch;

  000bd	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  000c0	8b 55 f0	 mov	 edx, DWORD PTR _lpOverlay$[ebp]
  000c3	03 51 44	 add	 edx, DWORD PTR [ecx+68]
  000c6	89 55 f0	 mov	 DWORD PTR _lpOverlay$[ebp], edx

; 531  :         CurrentOddLine += Pitch;

  000c9	8b 45 ec	 mov	 eax, DWORD PTR _CurrentOddLine$[ebp]
  000cc	03 45 f8	 add	 eax, DWORD PTR _Pitch$[ebp]
  000cf	89 45 ec	 mov	 DWORD PTR _CurrentOddLine$[ebp], eax

; 532  :     }

  000d2	eb 8c		 jmp	 SHORT $LN2@Weave
$LN1@Weave:

; 533  :     DO_EMMS;

  000d4	0f 77		 emms

; 534  :     return TRUE;

  000d6	b8 01 00 00 00	 mov	 eax, 1

; 535  : }

  000db	8b e5		 mov	 esp, ebp
  000dd	5d		 pop	 ebp
  000de	c3		 ret	 0
?Weave@@YAHPAUTDeinterlaceInfo@@@Z ENDP			; Weave
_TEXT	ENDS
PUBLIC	?CalculateTotalCombFactor@@YAJPAKPAUTDeinterlaceInfo@@@Z ; CalculateTotalCombFactor
; Function compile flags: /Odtp
;	COMDAT ?CalculateTotalCombFactor@@YAJPAKPAUTDeinterlaceInfo@@@Z
_TEXT	SEGMENT
_Line$141245 = -8					; size = 4
_CombFactor$ = -4					; size = 4
_Combs$ = 8						; size = 4
_pInfo$ = 12						; size = 4
?CalculateTotalCombFactor@@YAJPAKPAUTDeinterlaceInfo@@@Z PROC ; CalculateTotalCombFactor, COMDAT

; 141  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 08	 sub	 esp, 8
  00006	56		 push	 esi

; 142  :     long CombFactor = 0;

  00007	c7 45 fc 00 00
	00 00		 mov	 DWORD PTR _CombFactor$[ebp], 0

; 143  :     for (int Line = 17; Line < pInfo->FieldHeight - 17; ++Line)

  0000e	c7 45 f8 11 00
	00 00		 mov	 DWORD PTR _Line$141245[ebp], 17 ; 00000011H
  00015	eb 09		 jmp	 SHORT $LN8@CalculateT
$LN7@CalculateT:
  00017	8b 45 f8	 mov	 eax, DWORD PTR _Line$141245[ebp]
  0001a	83 c0 01	 add	 eax, 1
  0001d	89 45 f8	 mov	 DWORD PTR _Line$141245[ebp], eax
$LN8@CalculateT:
  00020	8b 4d 0c	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00023	8b 51 54	 mov	 edx, DWORD PTR [ecx+84]
  00026	83 ea 11	 sub	 edx, 17			; 00000011H
  00029	39 55 f8	 cmp	 DWORD PTR _Line$141245[ebp], edx
  0002c	7d 7c		 jge	 SHORT $LN6@CalculateT

; 144  :     {
; 145  :         if(Combs[Line - 1] > 0 && Combs[Line + 1] > 0)

  0002e	8b 45 f8	 mov	 eax, DWORD PTR _Line$141245[ebp]
  00031	8b 4d 08	 mov	 ecx, DWORD PTR _Combs$[ebp]
  00034	83 7c 81 fc 00	 cmp	 DWORD PTR [ecx+eax*4-4], 0
  00039	76 6a		 jbe	 SHORT $LN5@CalculateT
  0003b	8b 55 f8	 mov	 edx, DWORD PTR _Line$141245[ebp]
  0003e	8b 45 08	 mov	 eax, DWORD PTR _Combs$[ebp]
  00041	83 7c 90 04 00	 cmp	 DWORD PTR [eax+edx*4+4], 0
  00046	76 5d		 jbe	 SHORT $LN5@CalculateT

; 146  :         {
; 147  :             if(Combs[Line - 1] < Combs[Line])

  00048	8b 4d f8	 mov	 ecx, DWORD PTR _Line$141245[ebp]
  0004b	8b 55 08	 mov	 edx, DWORD PTR _Combs$[ebp]
  0004e	8b 45 f8	 mov	 eax, DWORD PTR _Line$141245[ebp]
  00051	8b 75 08	 mov	 esi, DWORD PTR _Combs$[ebp]
  00054	8b 4c 8a fc	 mov	 ecx, DWORD PTR [edx+ecx*4-4]
  00058	3b 0c 86	 cmp	 ecx, DWORD PTR [esi+eax*4]
  0005b	73 12		 jae	 SHORT $LN4@CalculateT

; 148  :             {
; 149  :                 CombFactor += Combs[Line - 1];

  0005d	8b 55 f8	 mov	 edx, DWORD PTR _Line$141245[ebp]
  00060	8b 45 08	 mov	 eax, DWORD PTR _Combs$[ebp]
  00063	8b 4d fc	 mov	 ecx, DWORD PTR _CombFactor$[ebp]
  00066	03 4c 90 fc	 add	 ecx, DWORD PTR [eax+edx*4-4]
  0006a	89 4d fc	 mov	 DWORD PTR _CombFactor$[ebp], ecx
  0006d	eb 36		 jmp	 SHORT $LN5@CalculateT
$LN4@CalculateT:

; 150  :             }
; 151  :             else if(Combs[Line + 1] < Combs[Line])

  0006f	8b 55 f8	 mov	 edx, DWORD PTR _Line$141245[ebp]
  00072	8b 45 08	 mov	 eax, DWORD PTR _Combs$[ebp]
  00075	8b 4d f8	 mov	 ecx, DWORD PTR _Line$141245[ebp]
  00078	8b 75 08	 mov	 esi, DWORD PTR _Combs$[ebp]
  0007b	8b 54 90 04	 mov	 edx, DWORD PTR [eax+edx*4+4]
  0007f	3b 14 8e	 cmp	 edx, DWORD PTR [esi+ecx*4]
  00082	73 12		 jae	 SHORT $LN2@CalculateT

; 152  :             {
; 153  :                 CombFactor += Combs[Line + 1];

  00084	8b 45 f8	 mov	 eax, DWORD PTR _Line$141245[ebp]
  00087	8b 4d 08	 mov	 ecx, DWORD PTR _Combs$[ebp]
  0008a	8b 55 fc	 mov	 edx, DWORD PTR _CombFactor$[ebp]
  0008d	03 54 81 04	 add	 edx, DWORD PTR [ecx+eax*4+4]
  00091	89 55 fc	 mov	 DWORD PTR _CombFactor$[ebp], edx

; 154  :             }
; 155  :             else

  00094	eb 0f		 jmp	 SHORT $LN5@CalculateT
$LN2@CalculateT:

; 156  :             {
; 157  :                 CombFactor += Combs[Line];

  00096	8b 45 f8	 mov	 eax, DWORD PTR _Line$141245[ebp]
  00099	8b 4d 08	 mov	 ecx, DWORD PTR _Combs$[ebp]
  0009c	8b 55 fc	 mov	 edx, DWORD PTR _CombFactor$[ebp]
  0009f	03 14 81	 add	 edx, DWORD PTR [ecx+eax*4]
  000a2	89 55 fc	 mov	 DWORD PTR _CombFactor$[ebp], edx
$LN5@CalculateT:

; 158  :             }
; 159  :         }
; 160  :     }

  000a5	e9 6d ff ff ff	 jmp	 $LN7@CalculateT
$LN6@CalculateT:

; 161  :     return CombFactor;

  000aa	8b 45 fc	 mov	 eax, DWORD PTR _CombFactor$[ebp]

; 162  : }

  000ad	5e		 pop	 esi
  000ae	8b e5		 mov	 esp, ebp
  000b0	5d		 pop	 ebp
  000b1	c3		 ret	 0
?CalculateTotalCombFactor@@YAJPAKPAUTDeinterlaceInfo@@@Z ENDP ; CalculateTotalCombFactor
PUBLIC	?SimpleFilmMode@@YAHPAUTDeinterlaceInfo@@P6AHHH@Z@Z ; SimpleFilmMode
; Function compile flags: /Odtp
;	COMDAT ?SimpleFilmMode@@YAHPAUTDeinterlaceInfo@@P6AHHH@Z@Z
_TEXT	SEGMENT
_TestOdd$ = -16						; size = 4
_lpOverlay$ = -12					; size = 4
_TestField$ = -8					; size = 4
_IsOdd$ = -4						; size = 4
_pInfo$ = 8						; size = 4
_pfnFlip$ = 12						; size = 4
?SimpleFilmMode@@YAHPAUTDeinterlaceInfo@@P6AHHH@Z@Z PROC ; SimpleFilmMode, COMDAT

; 575  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 10	 sub	 esp, 16			; 00000010H

; 576  :     BYTE* lpOverlay = pInfo->Overlay;

  00006	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00009	8b 48 2c	 mov	 ecx, DWORD PTR [eax+44]
  0000c	89 4d f4	 mov	 DWORD PTR _lpOverlay$[ebp], ecx

; 577  :     int TestField;
; 578  :     int TestOdd;
; 579  :     BOOL IsOdd((pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) > 0);

  0000f	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00012	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  00015	8b 48 04	 mov	 ecx, DWORD PTR [eax+4]
  00018	83 e1 01	 and	 ecx, 1
  0001b	33 d2		 xor	 edx, edx
  0001d	3b d1		 cmp	 edx, ecx
  0001f	1b c0		 sbb	 eax, eax
  00021	f7 d8		 neg	 eax
  00023	89 45 fc	 mov	 DWORD PTR _IsOdd$[ebp], eax

; 580  : 
; 581  : 
; 582  :     if(IsOdd == TRUE)

  00026	83 7d fc 01	 cmp	 DWORD PTR _IsOdd$[ebp], 1
  0002a	75 41		 jne	 SHORT $LN4@SimpleFilm@2

; 583  :     {
; 584  :         TestField = (pInfo->CurrentFrame + 5 - FilmFlipDelay / 2) % 5;

  0002c	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  0002f	8b 49 40	 mov	 ecx, DWORD PTR [ecx+64]
  00032	83 c1 05	 add	 ecx, 5
  00035	a1 00 00 00 00	 mov	 eax, DWORD PTR ?FilmFlipDelay@@3JA ; FilmFlipDelay
  0003a	99		 cdq
  0003b	2b c2		 sub	 eax, edx
  0003d	d1 f8		 sar	 eax, 1
  0003f	2b c8		 sub	 ecx, eax
  00041	8b c1		 mov	 eax, ecx
  00043	99		 cdq
  00044	b9 05 00 00 00	 mov	 ecx, 5
  00049	f7 f9		 idiv	 ecx
  0004b	89 55 f8	 mov	 DWORD PTR _TestField$[ebp], edx

; 585  :         TestOdd = ((FilmFlipDelay % 2) == 0);

  0004e	8b 15 00 00 00
	00		 mov	 edx, DWORD PTR ?FilmFlipDelay@@3JA ; FilmFlipDelay
  00054	81 e2 01 00 00
	80		 and	 edx, -2147483647	; 80000001H
  0005a	79 05		 jns	 SHORT $LN7@SimpleFilm@2
  0005c	4a		 dec	 edx
  0005d	83 ca fe	 or	 edx, -2			; fffffffeH
  00060	42		 inc	 edx
$LN7@SimpleFilm@2:
  00061	f7 da		 neg	 edx
  00063	1b d2		 sbb	 edx, edx
  00065	83 c2 01	 add	 edx, 1
  00068	89 55 f0	 mov	 DWORD PTR _TestOdd$[ebp], edx

; 586  :     }
; 587  :     else

  0006b	eb 41		 jmp	 SHORT $LN3@SimpleFilm@2
$LN4@SimpleFilm@2:

; 588  :     {
; 589  :         TestField = (pInfo->CurrentFrame + 5 - (FilmFlipDelay + 1) / 2) % 5;

  0006d	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00070	8b 48 40	 mov	 ecx, DWORD PTR [eax+64]
  00073	83 c1 05	 add	 ecx, 5
  00076	a1 00 00 00 00	 mov	 eax, DWORD PTR ?FilmFlipDelay@@3JA ; FilmFlipDelay
  0007b	83 c0 01	 add	 eax, 1
  0007e	99		 cdq
  0007f	2b c2		 sub	 eax, edx
  00081	d1 f8		 sar	 eax, 1
  00083	2b c8		 sub	 ecx, eax
  00085	8b c1		 mov	 eax, ecx
  00087	99		 cdq
  00088	b9 05 00 00 00	 mov	 ecx, 5
  0008d	f7 f9		 idiv	 ecx
  0008f	89 55 f8	 mov	 DWORD PTR _TestField$[ebp], edx

; 590  :         TestOdd = ((FilmFlipDelay % 2) != 0);

  00092	8b 15 00 00 00
	00		 mov	 edx, DWORD PTR ?FilmFlipDelay@@3JA ; FilmFlipDelay
  00098	81 e2 01 00 00
	80		 and	 edx, -2147483647	; 80000001H
  0009e	79 05		 jns	 SHORT $LN8@SimpleFilm@2
  000a0	4a		 dec	 edx
  000a1	83 ca fe	 or	 edx, -2			; fffffffeH
  000a4	42		 inc	 edx
$LN8@SimpleFilm@2:
  000a5	f7 da		 neg	 edx
  000a7	1b d2		 sbb	 edx, edx
  000a9	f7 da		 neg	 edx
  000ab	89 55 f0	 mov	 DWORD PTR _TestOdd$[ebp], edx
$LN3@SimpleFilm@2:

; 591  :     }
; 592  : 
; 593  :     if(pfnFlip(TestField, TestOdd) == TRUE)

  000ae	8b 45 f0	 mov	 eax, DWORD PTR _TestOdd$[ebp]
  000b1	50		 push	 eax
  000b2	8b 4d f8	 mov	 ecx, DWORD PTR _TestField$[ebp]
  000b5	51		 push	 ecx
  000b6	ff 55 0c	 call	 DWORD PTR _pfnFlip$[ebp]
  000b9	83 c4 08	 add	 esp, 8
  000bc	83 f8 01	 cmp	 eax, 1
  000bf	75 17		 jne	 SHORT $LN2@SimpleFilm@2

; 594  :     {
; 595  :         return WeaveDelay(pInfo, FilmFlipDelay);

  000c1	8b 15 00 00 00
	00		 mov	 edx, DWORD PTR ?FilmFlipDelay@@3JA ; FilmFlipDelay
  000c7	52		 push	 edx
  000c8	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  000cb	50		 push	 eax
  000cc	e8 00 00 00 00	 call	 ?WeaveDelay@@YAHPAUTDeinterlaceInfo@@H@Z ; WeaveDelay
  000d1	83 c4 08	 add	 esp, 8
  000d4	eb 04		 jmp	 SHORT $LN5@SimpleFilm@2

; 596  :     }
; 597  :     else

  000d6	eb 02		 jmp	 SHORT $LN5@SimpleFilm@2
$LN2@SimpleFilm@2:

; 598  :     {
; 599  :         return FALSE;

  000d8	33 c0		 xor	 eax, eax
$LN5@SimpleFilm@2:

; 600  :     }
; 601  : }

  000da	8b e5		 mov	 esp, ebp
  000dc	5d		 pop	 ebp
  000dd	c3		 ret	 0
?SimpleFilmMode@@YAHPAUTDeinterlaceInfo@@P6AHHH@Z@Z ENDP ; SimpleFilmMode
PUBLIC	?DoBothCombAndDiffChroma@@YAXPAUTDeinterlaceInfo@@@Z ; DoBothCombAndDiffChroma
; Function compile flags: /Odtp
;	COMDAT ?DoBothCombAndDiffChroma@@YAXPAUTDeinterlaceInfo@@@Z
_TEXT	SEGMENT
_EvenLine$141359 = -4364				; size = 4
_OddLine$141360 = -4360					; size = 4
_PreviousLine$141361 = -4356				; size = 4
_EvenLine$141352 = -4352				; size = 4
_OddLine$141353 = -4348					; size = 4
_PreviousLine$141354 = -4344				; size = 4
_Line$ = -4340						; size = 4
_Combs$ = -4336						; size = 4320
_DiffFactor$ = -12					; size = 4
_Pitch$ = -8						; size = 4
_IsOdd$ = -4						; size = 4
_pInfo$ = 8						; size = 4
?DoBothCombAndDiffChroma@@YAXPAUTDeinterlaceInfo@@@Z PROC ; DoBothCombAndDiffChroma, COMDAT

; 437  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	b8 0c 11 00 00	 mov	 eax, 4364		; 0000110cH
  00008	e8 00 00 00 00	 call	 __chkstk
  0000d	56		 push	 esi
  0000e	57		 push	 edi

; 438  :     if (pInfo->PictureHistory[0] == NULL || pInfo->PictureHistory[1] == NULL || pInfo->PictureHistory[2] == NULL)

  0000f	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00012	83 78 04 00	 cmp	 DWORD PTR [eax+4], 0
  00016	74 12		 je	 SHORT $LN9@DoBothComb
  00018	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  0001b	83 79 08 00	 cmp	 DWORD PTR [ecx+8], 0
  0001f	74 09		 je	 SHORT $LN9@DoBothComb
  00021	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00024	83 7a 0c 00	 cmp	 DWORD PTR [edx+12], 0
  00028	75 19		 jne	 SHORT $LN10@DoBothComb
$LN9@DoBothComb:

; 439  :     {
; 440  :         pInfo->CombFactor = 0x7fffffff;

  0002a	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  0002d	c7 40 5c ff ff
	ff 7f		 mov	 DWORD PTR [eax+92], 2147483647 ; 7fffffffH

; 441  :         pInfo->FieldDiff = 0x7fffffff;

  00034	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00037	c7 41 58 ff ff
	ff 7f		 mov	 DWORD PTR [ecx+88], 2147483647 ; 7fffffffH

; 442  :         return;

  0003e	e9 28 03 00 00	 jmp	 $LN11@DoBothComb
$LN10@DoBothComb:

; 443  :     }
; 444  : 
; 445  :     int Line;
; 446  :     long DiffFactor = 0;

  00043	c7 45 f4 00 00
	00 00		 mov	 DWORD PTR _DiffFactor$[ebp], 0

; 447  :     DWORD Combs[DSCALER_MAX_HEIGHT / 2];
; 448  :     DWORD Pitch = pInfo->InputPitch;

  0004a	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0004d	8b 82 84 00 00
	00		 mov	 eax, DWORD PTR [edx+132]
  00053	89 45 f8	 mov	 DWORD PTR _Pitch$[ebp], eax

; 449  :     BOOL IsOdd((pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) > 0);

  00056	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00059	8b 51 04	 mov	 edx, DWORD PTR [ecx+4]
  0005c	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  0005f	83 e0 01	 and	 eax, 1
  00062	33 c9		 xor	 ecx, ecx
  00064	3b c8		 cmp	 ecx, eax
  00066	1b d2		 sbb	 edx, edx
  00068	f7 da		 neg	 edx
  0006a	89 55 fc	 mov	 DWORD PTR _IsOdd$[ebp], edx

; 450  : 
; 451  :     qwThreshold = CombJaggieThreshold;

  0006d	a1 00 00 00 00	 mov	 eax, DWORD PTR ?CombJaggieThreshold@@3JA ; CombJaggieThreshold
  00072	99		 cdq
  00073	a3 00 00 00 00	 mov	 DWORD PTR _qwThreshold, eax
  00078	89 15 04 00 00
	00		 mov	 DWORD PTR _qwThreshold+4, edx

; 452  :     qwThreshold += (qwThreshold << 48) + (qwThreshold << 32) + (qwThreshold << 16);

  0007e	a1 00 00 00 00	 mov	 eax, DWORD PTR _qwThreshold
  00083	8b 15 04 00 00
	00		 mov	 edx, DWORD PTR _qwThreshold+4
  00089	b1 30		 mov	 cl, 48			; 00000030H
  0008b	e8 00 00 00 00	 call	 __allshl
  00090	8b f0		 mov	 esi, eax
  00092	8b fa		 mov	 edi, edx
  00094	a1 00 00 00 00	 mov	 eax, DWORD PTR _qwThreshold
  00099	8b 15 04 00 00
	00		 mov	 edx, DWORD PTR _qwThreshold+4
  0009f	b1 20		 mov	 cl, 32			; 00000020H
  000a1	e8 00 00 00 00	 call	 __allshl
  000a6	03 f0		 add	 esi, eax
  000a8	13 fa		 adc	 edi, edx
  000aa	a1 00 00 00 00	 mov	 eax, DWORD PTR _qwThreshold
  000af	8b 15 04 00 00
	00		 mov	 edx, DWORD PTR _qwThreshold+4
  000b5	b1 10		 mov	 cl, 16			; 00000010H
  000b7	e8 00 00 00 00	 call	 __allshl
  000bc	03 f0		 add	 esi, eax
  000be	13 fa		 adc	 edi, edx
  000c0	03 35 00 00 00
	00		 add	 esi, DWORD PTR _qwThreshold
  000c6	a1 04 00 00 00	 mov	 eax, DWORD PTR _qwThreshold+4
  000cb	13 c7		 adc	 eax, edi
  000cd	89 35 00 00 00
	00		 mov	 DWORD PTR _qwThreshold, esi
  000d3	a3 04 00 00 00	 mov	 DWORD PTR _qwThreshold+4, eax

; 453  :     qwBitShift = BitShift;

  000d8	a1 00 00 00 00	 mov	 eax, DWORD PTR ?BitShift@@3JA ; BitShift
  000dd	99		 cdq
  000de	a3 00 00 00 00	 mov	 DWORD PTR _qwBitShift, eax
  000e3	89 15 04 00 00
	00		 mov	 DWORD PTR _qwBitShift+4, edx

; 454  : 
; 455  :     if(IsOdd)

  000e9	83 7d fc 00	 cmp	 DWORD PTR _IsOdd$[ebp], 0
  000ed	0f 84 13 01 00
	00		 je	 $LN8@DoBothComb

; 456  :     {
; 457  :         BYTE* EvenLine = pInfo->PictureHistory[1]->pData + 16 * Pitch;

  000f3	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  000f6	8b 51 08	 mov	 edx, DWORD PTR [ecx+8]
  000f9	8b 45 f8	 mov	 eax, DWORD PTR _Pitch$[ebp]
  000fc	c1 e0 04	 shl	 eax, 4
  000ff	03 02		 add	 eax, DWORD PTR [edx]
  00101	89 85 00 ef ff
	ff		 mov	 DWORD PTR _EvenLine$141352[ebp], eax

; 458  :         BYTE* OddLine = pInfo->PictureHistory[0]->pData + 16 * Pitch;

  00107	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  0010a	8b 51 04	 mov	 edx, DWORD PTR [ecx+4]
  0010d	8b 45 f8	 mov	 eax, DWORD PTR _Pitch$[ebp]
  00110	c1 e0 04	 shl	 eax, 4
  00113	03 02		 add	 eax, DWORD PTR [edx]
  00115	89 85 04 ef ff
	ff		 mov	 DWORD PTR _OddLine$141353[ebp], eax

; 459  :         BYTE* PreviousLine = pInfo->PictureHistory[2]->pData + 16 * Pitch;

  0011b	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  0011e	8b 51 0c	 mov	 edx, DWORD PTR [ecx+12]
  00121	8b 45 f8	 mov	 eax, DWORD PTR _Pitch$[ebp]
  00124	c1 e0 04	 shl	 eax, 4
  00127	03 02		 add	 eax, DWORD PTR [edx]
  00129	89 85 08 ef ff
	ff		 mov	 DWORD PTR _PreviousLine$141354[ebp], eax

; 460  :         // If one of the fields is missing, treat them as very different.
; 461  :         for (Line = 16; Line < pInfo->FieldHeight - 16; ++Line)

  0012f	c7 85 0c ef ff
	ff 10 00 00 00	 mov	 DWORD PTR _Line$[ebp], 16 ; 00000010H
  00139	eb 0f		 jmp	 SHORT $LN7@DoBothComb
$LN6@DoBothComb:
  0013b	8b 8d 0c ef ff
	ff		 mov	 ecx, DWORD PTR _Line$[ebp]
  00141	83 c1 01	 add	 ecx, 1
  00144	89 8d 0c ef ff
	ff		 mov	 DWORD PTR _Line$[ebp], ecx
$LN7@DoBothComb:
  0014a	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0014d	8b 42 54	 mov	 eax, DWORD PTR [edx+84]
  00150	83 e8 10	 sub	 eax, 16			; 00000010H
  00153	39 85 0c ef ff
	ff		 cmp	 DWORD PTR _Line$[ebp], eax
  00159	0f 8d a2 00 00
	00		 jge	 $LN5@DoBothComb

; 462  :         {
; 463  :             Combs[Line] = CalcCombFactorLineChroma(EvenLine + 16,
; 464  :                                                     OddLine + 16,
; 465  :                                                     EvenLine + Pitch + 16,
; 466  :                                                     pInfo->LineLength - 32);

  0015f	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00162	8b 51 48	 mov	 edx, DWORD PTR [ecx+72]
  00165	83 ea 20	 sub	 edx, 32			; 00000020H
  00168	52		 push	 edx
  00169	8b 45 f8	 mov	 eax, DWORD PTR _Pitch$[ebp]
  0016c	8b 8d 00 ef ff
	ff		 mov	 ecx, DWORD PTR _EvenLine$141352[ebp]
  00172	8d 54 01 10	 lea	 edx, DWORD PTR [ecx+eax+16]
  00176	52		 push	 edx
  00177	8b 85 04 ef ff
	ff		 mov	 eax, DWORD PTR _OddLine$141353[ebp]
  0017d	83 c0 10	 add	 eax, 16			; 00000010H
  00180	50		 push	 eax
  00181	8b 8d 00 ef ff
	ff		 mov	 ecx, DWORD PTR _EvenLine$141352[ebp]
  00187	83 c1 10	 add	 ecx, 16			; 00000010H
  0018a	51		 push	 ecx
  0018b	e8 00 00 00 00	 call	 _CalcCombFactorLineChroma
  00190	83 c4 10	 add	 esp, 16			; 00000010H
  00193	0f b7 d0	 movzx	 edx, ax
  00196	8b 85 0c ef ff
	ff		 mov	 eax, DWORD PTR _Line$[ebp]
  0019c	89 94 85 10 ef
	ff ff		 mov	 DWORD PTR _Combs$[ebp+eax*4], edx

; 467  :             DiffFactor += CalcDiffFactorLineChroma(OddLine + 16,
; 468  :                                                     PreviousLine + 16,
; 469  :                                                     pInfo->LineLength - 32);

  001a3	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  001a6	8b 51 48	 mov	 edx, DWORD PTR [ecx+72]
  001a9	83 ea 20	 sub	 edx, 32			; 00000020H
  001ac	52		 push	 edx
  001ad	8b 85 08 ef ff
	ff		 mov	 eax, DWORD PTR _PreviousLine$141354[ebp]
  001b3	83 c0 10	 add	 eax, 16			; 00000010H
  001b6	50		 push	 eax
  001b7	8b 8d 04 ef ff
	ff		 mov	 ecx, DWORD PTR _OddLine$141353[ebp]
  001bd	83 c1 10	 add	 ecx, 16			; 00000010H
  001c0	51		 push	 ecx
  001c1	e8 00 00 00 00	 call	 _CalcDiffFactorLineChroma
  001c6	83 c4 0c	 add	 esp, 12			; 0000000cH
  001c9	03 45 f4	 add	 eax, DWORD PTR _DiffFactor$[ebp]
  001cc	89 45 f4	 mov	 DWORD PTR _DiffFactor$[ebp], eax

; 470  :             EvenLine += Pitch;

  001cf	8b 95 00 ef ff
	ff		 mov	 edx, DWORD PTR _EvenLine$141352[ebp]
  001d5	03 55 f8	 add	 edx, DWORD PTR _Pitch$[ebp]
  001d8	89 95 00 ef ff
	ff		 mov	 DWORD PTR _EvenLine$141352[ebp], edx

; 471  :             OddLine += Pitch;

  001de	8b 85 04 ef ff
	ff		 mov	 eax, DWORD PTR _OddLine$141353[ebp]
  001e4	03 45 f8	 add	 eax, DWORD PTR _Pitch$[ebp]
  001e7	89 85 04 ef ff
	ff		 mov	 DWORD PTR _OddLine$141353[ebp], eax

; 472  :             PreviousLine += Pitch;

  001ed	8b 8d 08 ef ff
	ff		 mov	 ecx, DWORD PTR _PreviousLine$141354[ebp]
  001f3	03 4d f8	 add	 ecx, DWORD PTR _Pitch$[ebp]
  001f6	89 8d 08 ef ff
	ff		 mov	 DWORD PTR _PreviousLine$141354[ebp], ecx

; 473  :         }

  001fc	e9 3a ff ff ff	 jmp	 $LN6@DoBothComb
$LN5@DoBothComb:

; 474  :     }
; 475  :     else

  00201	e9 0e 01 00 00	 jmp	 $LN4@DoBothComb
$LN8@DoBothComb:

; 476  :     {
; 477  :         BYTE* EvenLine = pInfo->PictureHistory[0]->pData + 16 * Pitch;

  00206	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00209	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  0020c	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  0020f	c1 e1 04	 shl	 ecx, 4
  00212	03 08		 add	 ecx, DWORD PTR [eax]
  00214	89 8d f4 ee ff
	ff		 mov	 DWORD PTR _EvenLine$141359[ebp], ecx

; 478  :         BYTE* OddLine = pInfo->PictureHistory[1]->pData + 16 * Pitch;

  0021a	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0021d	8b 42 08	 mov	 eax, DWORD PTR [edx+8]
  00220	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  00223	c1 e1 04	 shl	 ecx, 4
  00226	03 08		 add	 ecx, DWORD PTR [eax]
  00228	89 8d f8 ee ff
	ff		 mov	 DWORD PTR _OddLine$141360[ebp], ecx

; 479  :         BYTE* PreviousLine = pInfo->PictureHistory[2]->pData + 16 * Pitch;

  0022e	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00231	8b 42 0c	 mov	 eax, DWORD PTR [edx+12]
  00234	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  00237	c1 e1 04	 shl	 ecx, 4
  0023a	03 08		 add	 ecx, DWORD PTR [eax]
  0023c	89 8d fc ee ff
	ff		 mov	 DWORD PTR _PreviousLine$141361[ebp], ecx

; 480  : 
; 481  :         for (Line = 16; Line < pInfo->FieldHeight - 16; ++Line)

  00242	c7 85 0c ef ff
	ff 10 00 00 00	 mov	 DWORD PTR _Line$[ebp], 16 ; 00000010H
  0024c	eb 0f		 jmp	 SHORT $LN3@DoBothComb
$LN2@DoBothComb:
  0024e	8b 95 0c ef ff
	ff		 mov	 edx, DWORD PTR _Line$[ebp]
  00254	83 c2 01	 add	 edx, 1
  00257	89 95 0c ef ff
	ff		 mov	 DWORD PTR _Line$[ebp], edx
$LN3@DoBothComb:
  0025d	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00260	8b 48 54	 mov	 ecx, DWORD PTR [eax+84]
  00263	83 e9 10	 sub	 ecx, 16			; 00000010H
  00266	39 8d 0c ef ff
	ff		 cmp	 DWORD PTR _Line$[ebp], ecx
  0026c	0f 8d a2 00 00
	00		 jge	 $LN4@DoBothComb

; 482  :         {
; 483  :             Combs[Line] = CalcCombFactorLineChroma(EvenLine + 16,
; 484  :                                                     OddLine + 16,
; 485  :                                                     EvenLine + Pitch + 16,
; 486  :                                                     pInfo->LineLength - 32);

  00272	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00275	8b 42 48	 mov	 eax, DWORD PTR [edx+72]
  00278	83 e8 20	 sub	 eax, 32			; 00000020H
  0027b	50		 push	 eax
  0027c	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  0027f	8b 95 f4 ee ff
	ff		 mov	 edx, DWORD PTR _EvenLine$141359[ebp]
  00285	8d 44 0a 10	 lea	 eax, DWORD PTR [edx+ecx+16]
  00289	50		 push	 eax
  0028a	8b 8d f8 ee ff
	ff		 mov	 ecx, DWORD PTR _OddLine$141360[ebp]
  00290	83 c1 10	 add	 ecx, 16			; 00000010H
  00293	51		 push	 ecx
  00294	8b 95 f4 ee ff
	ff		 mov	 edx, DWORD PTR _EvenLine$141359[ebp]
  0029a	83 c2 10	 add	 edx, 16			; 00000010H
  0029d	52		 push	 edx
  0029e	e8 00 00 00 00	 call	 _CalcCombFactorLineChroma
  002a3	83 c4 10	 add	 esp, 16			; 00000010H
  002a6	0f b7 c0	 movzx	 eax, ax
  002a9	8b 8d 0c ef ff
	ff		 mov	 ecx, DWORD PTR _Line$[ebp]
  002af	89 84 8d 10 ef
	ff ff		 mov	 DWORD PTR _Combs$[ebp+ecx*4], eax

; 487  :             DiffFactor += CalcDiffFactorLineChroma(EvenLine + 16,
; 488  :                                                     PreviousLine + 16,
; 489  :                                                     pInfo->LineLength - 32);

  002b6	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  002b9	8b 42 48	 mov	 eax, DWORD PTR [edx+72]
  002bc	83 e8 20	 sub	 eax, 32			; 00000020H
  002bf	50		 push	 eax
  002c0	8b 8d fc ee ff
	ff		 mov	 ecx, DWORD PTR _PreviousLine$141361[ebp]
  002c6	83 c1 10	 add	 ecx, 16			; 00000010H
  002c9	51		 push	 ecx
  002ca	8b 95 f4 ee ff
	ff		 mov	 edx, DWORD PTR _EvenLine$141359[ebp]
  002d0	83 c2 10	 add	 edx, 16			; 00000010H
  002d3	52		 push	 edx
  002d4	e8 00 00 00 00	 call	 _CalcDiffFactorLineChroma
  002d9	83 c4 0c	 add	 esp, 12			; 0000000cH
  002dc	03 45 f4	 add	 eax, DWORD PTR _DiffFactor$[ebp]
  002df	89 45 f4	 mov	 DWORD PTR _DiffFactor$[ebp], eax

; 490  :             EvenLine += Pitch;

  002e2	8b 85 f4 ee ff
	ff		 mov	 eax, DWORD PTR _EvenLine$141359[ebp]
  002e8	03 45 f8	 add	 eax, DWORD PTR _Pitch$[ebp]
  002eb	89 85 f4 ee ff
	ff		 mov	 DWORD PTR _EvenLine$141359[ebp], eax

; 491  :             OddLine += Pitch;

  002f1	8b 8d f8 ee ff
	ff		 mov	 ecx, DWORD PTR _OddLine$141360[ebp]
  002f7	03 4d f8	 add	 ecx, DWORD PTR _Pitch$[ebp]
  002fa	89 8d f8 ee ff
	ff		 mov	 DWORD PTR _OddLine$141360[ebp], ecx

; 492  :             PreviousLine += Pitch;

  00300	8b 95 fc ee ff
	ff		 mov	 edx, DWORD PTR _PreviousLine$141361[ebp]
  00306	03 55 f8	 add	 edx, DWORD PTR _Pitch$[ebp]
  00309	89 95 fc ee ff
	ff		 mov	 DWORD PTR _PreviousLine$141361[ebp], edx

; 493  :         }

  0030f	e9 3a ff ff ff	 jmp	 $LN2@DoBothComb
$LN4@DoBothComb:

; 494  :     }
; 495  :     DO_EMMS;

  00314	0f 77		 emms

; 496  : 
; 497  :     pInfo->CombFactor = CalculateTotalCombFactor(Combs, pInfo);

  00316	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00319	50		 push	 eax
  0031a	8d 8d 10 ef ff
	ff		 lea	 ecx, DWORD PTR _Combs$[ebp]
  00320	51		 push	 ecx
  00321	e8 00 00 00 00	 call	 ?CalculateTotalCombFactor@@YAJPAKPAUTDeinterlaceInfo@@@Z ; CalculateTotalCombFactor
  00326	83 c4 08	 add	 esp, 8
  00329	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0032c	89 42 5c	 mov	 DWORD PTR [edx+92], eax

; 498  :     pInfo->FieldDiff = DiffFactor;

  0032f	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00332	8b 4d f4	 mov	 ecx, DWORD PTR _DiffFactor$[ebp]
  00335	89 48 58	 mov	 DWORD PTR [eax+88], ecx

; 499  :     LOG(2, _T("Frame %d %c FD = %d \t CF = %d"), pInfo->CurrentFrame, IsOdd ? 'O' : 'E', pInfo->FieldDiff, pInfo->CombFactor);

  00338	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0033b	8b 42 5c	 mov	 eax, DWORD PTR [edx+92]
  0033e	50		 push	 eax
  0033f	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00342	8b 51 58	 mov	 edx, DWORD PTR [ecx+88]
  00345	52		 push	 edx
  00346	8b 45 fc	 mov	 eax, DWORD PTR _IsOdd$[ebp]
  00349	f7 d8		 neg	 eax
  0034b	1a c0		 sbb	 al, al
  0034d	24 0a		 and	 al, 10			; 0000000aH
  0034f	04 45		 add	 al, 69			; 00000045H
  00351	0f be c8	 movsx	 ecx, al
  00354	51		 push	 ecx
  00355	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00358	8b 42 40	 mov	 eax, DWORD PTR [edx+64]
  0035b	50		 push	 eax
  0035c	68 00 00 00 00	 push	 OFFSET ??_C@_1DM@NGDJLNBJ@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?$CF?$AAc?$AA?5?$AAF?$AAD?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?7?$AA?5?$AAC?$AAF?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@
  00361	6a 02		 push	 2
  00363	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  00368	83 c4 18	 add	 esp, 24			; 00000018H
$LN11@DoBothComb:

; 500  : }

  0036b	5f		 pop	 edi
  0036c	5e		 pop	 esi
  0036d	8b e5		 mov	 esp, ebp
  0036f	5d		 pop	 ebp
  00370	c3		 ret	 0
?DoBothCombAndDiffChroma@@YAXPAUTDeinterlaceInfo@@@Z ENDP ; DoBothCombAndDiffChroma
_TEXT	ENDS
PUBLIC	?DoBothCombAndDiff@@YAXPAUTDeinterlaceInfo@@@Z	; DoBothCombAndDiff
; Function compile flags: /Odtp
;	COMDAT ?DoBothCombAndDiff@@YAXPAUTDeinterlaceInfo@@@Z
_TEXT	SEGMENT
_EvenLine$141334 = -4364				; size = 4
_OddLine$141335 = -4360					; size = 4
_PreviousLine$141336 = -4356				; size = 4
_EvenLine$141327 = -4352				; size = 4
_OddLine$141328 = -4348					; size = 4
_PreviousLine$141329 = -4344				; size = 4
_Line$ = -4340						; size = 4
_Combs$ = -4336						; size = 4320
_DiffFactor$ = -12					; size = 4
_Pitch$ = -8						; size = 4
_IsOdd$ = -4						; size = 4
_pInfo$ = 8						; size = 4
?DoBothCombAndDiff@@YAXPAUTDeinterlaceInfo@@@Z PROC	; DoBothCombAndDiff, COMDAT

; 371  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	b8 0c 11 00 00	 mov	 eax, 4364		; 0000110cH
  00008	e8 00 00 00 00	 call	 __chkstk
  0000d	56		 push	 esi
  0000e	57		 push	 edi

; 372  :     if (pInfo->PictureHistory[0] == NULL || pInfo->PictureHistory[1] == NULL || pInfo->PictureHistory[2] == NULL)

  0000f	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00012	83 78 04 00	 cmp	 DWORD PTR [eax+4], 0
  00016	74 12		 je	 SHORT $LN9@DoBothComb@2
  00018	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  0001b	83 79 08 00	 cmp	 DWORD PTR [ecx+8], 0
  0001f	74 09		 je	 SHORT $LN9@DoBothComb@2
  00021	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00024	83 7a 0c 00	 cmp	 DWORD PTR [edx+12], 0
  00028	75 19		 jne	 SHORT $LN10@DoBothComb@2
$LN9@DoBothComb@2:

; 373  :     {
; 374  :         pInfo->CombFactor = 0x7fffffff;

  0002a	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  0002d	c7 40 5c ff ff
	ff 7f		 mov	 DWORD PTR [eax+92], 2147483647 ; 7fffffffH

; 375  :         pInfo->FieldDiff = 0x7fffffff;

  00034	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00037	c7 41 58 ff ff
	ff 7f		 mov	 DWORD PTR [ecx+88], 2147483647 ; 7fffffffH

; 376  :         return;

  0003e	e9 28 03 00 00	 jmp	 $LN11@DoBothComb@2
$LN10@DoBothComb@2:

; 377  :     }
; 378  : 
; 379  :     int Line;
; 380  :     long DiffFactor = 0;

  00043	c7 45 f4 00 00
	00 00		 mov	 DWORD PTR _DiffFactor$[ebp], 0

; 381  :     DWORD Combs[DSCALER_MAX_HEIGHT / 2];
; 382  :     DWORD Pitch = pInfo->InputPitch;

  0004a	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0004d	8b 82 84 00 00
	00		 mov	 eax, DWORD PTR [edx+132]
  00053	89 45 f8	 mov	 DWORD PTR _Pitch$[ebp], eax

; 383  :     BOOL IsOdd((pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) > 0);

  00056	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00059	8b 51 04	 mov	 edx, DWORD PTR [ecx+4]
  0005c	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  0005f	83 e0 01	 and	 eax, 1
  00062	33 c9		 xor	 ecx, ecx
  00064	3b c8		 cmp	 ecx, eax
  00066	1b d2		 sbb	 edx, edx
  00068	f7 da		 neg	 edx
  0006a	89 55 fc	 mov	 DWORD PTR _IsOdd$[ebp], edx

; 384  : 
; 385  :     qwThreshold = CombJaggieThreshold;

  0006d	a1 00 00 00 00	 mov	 eax, DWORD PTR ?CombJaggieThreshold@@3JA ; CombJaggieThreshold
  00072	99		 cdq
  00073	a3 00 00 00 00	 mov	 DWORD PTR _qwThreshold, eax
  00078	89 15 04 00 00
	00		 mov	 DWORD PTR _qwThreshold+4, edx

; 386  :     qwThreshold += (qwThreshold << 48) + (qwThreshold << 32) + (qwThreshold << 16);

  0007e	a1 00 00 00 00	 mov	 eax, DWORD PTR _qwThreshold
  00083	8b 15 04 00 00
	00		 mov	 edx, DWORD PTR _qwThreshold+4
  00089	b1 30		 mov	 cl, 48			; 00000030H
  0008b	e8 00 00 00 00	 call	 __allshl
  00090	8b f0		 mov	 esi, eax
  00092	8b fa		 mov	 edi, edx
  00094	a1 00 00 00 00	 mov	 eax, DWORD PTR _qwThreshold
  00099	8b 15 04 00 00
	00		 mov	 edx, DWORD PTR _qwThreshold+4
  0009f	b1 20		 mov	 cl, 32			; 00000020H
  000a1	e8 00 00 00 00	 call	 __allshl
  000a6	03 f0		 add	 esi, eax
  000a8	13 fa		 adc	 edi, edx
  000aa	a1 00 00 00 00	 mov	 eax, DWORD PTR _qwThreshold
  000af	8b 15 04 00 00
	00		 mov	 edx, DWORD PTR _qwThreshold+4
  000b5	b1 10		 mov	 cl, 16			; 00000010H
  000b7	e8 00 00 00 00	 call	 __allshl
  000bc	03 f0		 add	 esi, eax
  000be	13 fa		 adc	 edi, edx
  000c0	03 35 00 00 00
	00		 add	 esi, DWORD PTR _qwThreshold
  000c6	a1 04 00 00 00	 mov	 eax, DWORD PTR _qwThreshold+4
  000cb	13 c7		 adc	 eax, edi
  000cd	89 35 00 00 00
	00		 mov	 DWORD PTR _qwThreshold, esi
  000d3	a3 04 00 00 00	 mov	 DWORD PTR _qwThreshold+4, eax

; 387  :     qwBitShift = BitShift;

  000d8	a1 00 00 00 00	 mov	 eax, DWORD PTR ?BitShift@@3JA ; BitShift
  000dd	99		 cdq
  000de	a3 00 00 00 00	 mov	 DWORD PTR _qwBitShift, eax
  000e3	89 15 04 00 00
	00		 mov	 DWORD PTR _qwBitShift+4, edx

; 388  : 
; 389  :     if(IsOdd)

  000e9	83 7d fc 00	 cmp	 DWORD PTR _IsOdd$[ebp], 0
  000ed	0f 84 13 01 00
	00		 je	 $LN8@DoBothComb@2

; 390  :     {
; 391  :         BYTE* EvenLine = pInfo->PictureHistory[1]->pData + 16 * Pitch;

  000f3	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  000f6	8b 51 08	 mov	 edx, DWORD PTR [ecx+8]
  000f9	8b 45 f8	 mov	 eax, DWORD PTR _Pitch$[ebp]
  000fc	c1 e0 04	 shl	 eax, 4
  000ff	03 02		 add	 eax, DWORD PTR [edx]
  00101	89 85 00 ef ff
	ff		 mov	 DWORD PTR _EvenLine$141327[ebp], eax

; 392  :         BYTE* OddLine = pInfo->PictureHistory[0]->pData + 16 * Pitch;

  00107	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  0010a	8b 51 04	 mov	 edx, DWORD PTR [ecx+4]
  0010d	8b 45 f8	 mov	 eax, DWORD PTR _Pitch$[ebp]
  00110	c1 e0 04	 shl	 eax, 4
  00113	03 02		 add	 eax, DWORD PTR [edx]
  00115	89 85 04 ef ff
	ff		 mov	 DWORD PTR _OddLine$141328[ebp], eax

; 393  :         BYTE* PreviousLine = pInfo->PictureHistory[2]->pData + 16 * Pitch;

  0011b	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  0011e	8b 51 0c	 mov	 edx, DWORD PTR [ecx+12]
  00121	8b 45 f8	 mov	 eax, DWORD PTR _Pitch$[ebp]
  00124	c1 e0 04	 shl	 eax, 4
  00127	03 02		 add	 eax, DWORD PTR [edx]
  00129	89 85 08 ef ff
	ff		 mov	 DWORD PTR _PreviousLine$141329[ebp], eax

; 394  :         // If one of the fields is missing, treat them as very different.
; 395  :         for (Line = 16; Line < pInfo->FieldHeight - 16; ++Line)

  0012f	c7 85 0c ef ff
	ff 10 00 00 00	 mov	 DWORD PTR _Line$[ebp], 16 ; 00000010H
  00139	eb 0f		 jmp	 SHORT $LN7@DoBothComb@2
$LN6@DoBothComb@2:
  0013b	8b 8d 0c ef ff
	ff		 mov	 ecx, DWORD PTR _Line$[ebp]
  00141	83 c1 01	 add	 ecx, 1
  00144	89 8d 0c ef ff
	ff		 mov	 DWORD PTR _Line$[ebp], ecx
$LN7@DoBothComb@2:
  0014a	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0014d	8b 42 54	 mov	 eax, DWORD PTR [edx+84]
  00150	83 e8 10	 sub	 eax, 16			; 00000010H
  00153	39 85 0c ef ff
	ff		 cmp	 DWORD PTR _Line$[ebp], eax
  00159	0f 8d a2 00 00
	00		 jge	 $LN5@DoBothComb@2

; 396  :         {
; 397  :             Combs[Line] = CalcCombFactorLine(EvenLine + 16,
; 398  :                                             OddLine + 16,
; 399  :                                             EvenLine + Pitch + 16,
; 400  :                                             pInfo->LineLength - 32);

  0015f	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00162	8b 51 48	 mov	 edx, DWORD PTR [ecx+72]
  00165	83 ea 20	 sub	 edx, 32			; 00000020H
  00168	52		 push	 edx
  00169	8b 45 f8	 mov	 eax, DWORD PTR _Pitch$[ebp]
  0016c	8b 8d 00 ef ff
	ff		 mov	 ecx, DWORD PTR _EvenLine$141327[ebp]
  00172	8d 54 01 10	 lea	 edx, DWORD PTR [ecx+eax+16]
  00176	52		 push	 edx
  00177	8b 85 04 ef ff
	ff		 mov	 eax, DWORD PTR _OddLine$141328[ebp]
  0017d	83 c0 10	 add	 eax, 16			; 00000010H
  00180	50		 push	 eax
  00181	8b 8d 00 ef ff
	ff		 mov	 ecx, DWORD PTR _EvenLine$141327[ebp]
  00187	83 c1 10	 add	 ecx, 16			; 00000010H
  0018a	51		 push	 ecx
  0018b	e8 00 00 00 00	 call	 _CalcCombFactorLine
  00190	83 c4 10	 add	 esp, 16			; 00000010H
  00193	0f b7 d0	 movzx	 edx, ax
  00196	8b 85 0c ef ff
	ff		 mov	 eax, DWORD PTR _Line$[ebp]
  0019c	89 94 85 10 ef
	ff ff		 mov	 DWORD PTR _Combs$[ebp+eax*4], edx

; 401  :             DiffFactor += CalcDiffFactorLine(OddLine + 16,
; 402  :                                                 PreviousLine + 16,
; 403  :                                                 pInfo->LineLength - 32);

  001a3	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  001a6	8b 51 48	 mov	 edx, DWORD PTR [ecx+72]
  001a9	83 ea 20	 sub	 edx, 32			; 00000020H
  001ac	52		 push	 edx
  001ad	8b 85 08 ef ff
	ff		 mov	 eax, DWORD PTR _PreviousLine$141329[ebp]
  001b3	83 c0 10	 add	 eax, 16			; 00000010H
  001b6	50		 push	 eax
  001b7	8b 8d 04 ef ff
	ff		 mov	 ecx, DWORD PTR _OddLine$141328[ebp]
  001bd	83 c1 10	 add	 ecx, 16			; 00000010H
  001c0	51		 push	 ecx
  001c1	e8 00 00 00 00	 call	 _CalcDiffFactorLine
  001c6	83 c4 0c	 add	 esp, 12			; 0000000cH
  001c9	03 45 f4	 add	 eax, DWORD PTR _DiffFactor$[ebp]
  001cc	89 45 f4	 mov	 DWORD PTR _DiffFactor$[ebp], eax

; 404  :             EvenLine += Pitch;

  001cf	8b 95 00 ef ff
	ff		 mov	 edx, DWORD PTR _EvenLine$141327[ebp]
  001d5	03 55 f8	 add	 edx, DWORD PTR _Pitch$[ebp]
  001d8	89 95 00 ef ff
	ff		 mov	 DWORD PTR _EvenLine$141327[ebp], edx

; 405  :             OddLine += Pitch;

  001de	8b 85 04 ef ff
	ff		 mov	 eax, DWORD PTR _OddLine$141328[ebp]
  001e4	03 45 f8	 add	 eax, DWORD PTR _Pitch$[ebp]
  001e7	89 85 04 ef ff
	ff		 mov	 DWORD PTR _OddLine$141328[ebp], eax

; 406  :             PreviousLine += Pitch;

  001ed	8b 8d 08 ef ff
	ff		 mov	 ecx, DWORD PTR _PreviousLine$141329[ebp]
  001f3	03 4d f8	 add	 ecx, DWORD PTR _Pitch$[ebp]
  001f6	89 8d 08 ef ff
	ff		 mov	 DWORD PTR _PreviousLine$141329[ebp], ecx

; 407  :         }

  001fc	e9 3a ff ff ff	 jmp	 $LN6@DoBothComb@2
$LN5@DoBothComb@2:

; 408  :     }
; 409  :     else

  00201	e9 0e 01 00 00	 jmp	 $LN4@DoBothComb@2
$LN8@DoBothComb@2:

; 410  :     {
; 411  :         BYTE* EvenLine = pInfo->PictureHistory[0]->pData + 16 * Pitch;

  00206	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00209	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  0020c	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  0020f	c1 e1 04	 shl	 ecx, 4
  00212	03 08		 add	 ecx, DWORD PTR [eax]
  00214	89 8d f4 ee ff
	ff		 mov	 DWORD PTR _EvenLine$141334[ebp], ecx

; 412  :         BYTE* OddLine = pInfo->PictureHistory[1]->pData + 16 * Pitch;

  0021a	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0021d	8b 42 08	 mov	 eax, DWORD PTR [edx+8]
  00220	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  00223	c1 e1 04	 shl	 ecx, 4
  00226	03 08		 add	 ecx, DWORD PTR [eax]
  00228	89 8d f8 ee ff
	ff		 mov	 DWORD PTR _OddLine$141335[ebp], ecx

; 413  :         BYTE* PreviousLine = pInfo->PictureHistory[2]->pData + 16 * Pitch;

  0022e	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00231	8b 42 0c	 mov	 eax, DWORD PTR [edx+12]
  00234	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  00237	c1 e1 04	 shl	 ecx, 4
  0023a	03 08		 add	 ecx, DWORD PTR [eax]
  0023c	89 8d fc ee ff
	ff		 mov	 DWORD PTR _PreviousLine$141336[ebp], ecx

; 414  : 
; 415  :         for (Line = 16; Line < pInfo->FieldHeight - 16; ++Line)

  00242	c7 85 0c ef ff
	ff 10 00 00 00	 mov	 DWORD PTR _Line$[ebp], 16 ; 00000010H
  0024c	eb 0f		 jmp	 SHORT $LN3@DoBothComb@2
$LN2@DoBothComb@2:
  0024e	8b 95 0c ef ff
	ff		 mov	 edx, DWORD PTR _Line$[ebp]
  00254	83 c2 01	 add	 edx, 1
  00257	89 95 0c ef ff
	ff		 mov	 DWORD PTR _Line$[ebp], edx
$LN3@DoBothComb@2:
  0025d	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00260	8b 48 54	 mov	 ecx, DWORD PTR [eax+84]
  00263	83 e9 10	 sub	 ecx, 16			; 00000010H
  00266	39 8d 0c ef ff
	ff		 cmp	 DWORD PTR _Line$[ebp], ecx
  0026c	0f 8d a2 00 00
	00		 jge	 $LN4@DoBothComb@2

; 416  :         {
; 417  :             Combs[Line] = CalcCombFactorLine(EvenLine + 16,
; 418  :                                             OddLine + 16,
; 419  :                                             EvenLine + Pitch + 16,
; 420  :                                             pInfo->LineLength - 32);

  00272	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00275	8b 42 48	 mov	 eax, DWORD PTR [edx+72]
  00278	83 e8 20	 sub	 eax, 32			; 00000020H
  0027b	50		 push	 eax
  0027c	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  0027f	8b 95 f4 ee ff
	ff		 mov	 edx, DWORD PTR _EvenLine$141334[ebp]
  00285	8d 44 0a 10	 lea	 eax, DWORD PTR [edx+ecx+16]
  00289	50		 push	 eax
  0028a	8b 8d f8 ee ff
	ff		 mov	 ecx, DWORD PTR _OddLine$141335[ebp]
  00290	83 c1 10	 add	 ecx, 16			; 00000010H
  00293	51		 push	 ecx
  00294	8b 95 f4 ee ff
	ff		 mov	 edx, DWORD PTR _EvenLine$141334[ebp]
  0029a	83 c2 10	 add	 edx, 16			; 00000010H
  0029d	52		 push	 edx
  0029e	e8 00 00 00 00	 call	 _CalcCombFactorLine
  002a3	83 c4 10	 add	 esp, 16			; 00000010H
  002a6	0f b7 c0	 movzx	 eax, ax
  002a9	8b 8d 0c ef ff
	ff		 mov	 ecx, DWORD PTR _Line$[ebp]
  002af	89 84 8d 10 ef
	ff ff		 mov	 DWORD PTR _Combs$[ebp+ecx*4], eax

; 421  :             DiffFactor += CalcDiffFactorLine(EvenLine + 16,
; 422  :                                                 PreviousLine + 16,
; 423  :                                                 pInfo->LineLength - 32);

  002b6	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  002b9	8b 42 48	 mov	 eax, DWORD PTR [edx+72]
  002bc	83 e8 20	 sub	 eax, 32			; 00000020H
  002bf	50		 push	 eax
  002c0	8b 8d fc ee ff
	ff		 mov	 ecx, DWORD PTR _PreviousLine$141336[ebp]
  002c6	83 c1 10	 add	 ecx, 16			; 00000010H
  002c9	51		 push	 ecx
  002ca	8b 95 f4 ee ff
	ff		 mov	 edx, DWORD PTR _EvenLine$141334[ebp]
  002d0	83 c2 10	 add	 edx, 16			; 00000010H
  002d3	52		 push	 edx
  002d4	e8 00 00 00 00	 call	 _CalcDiffFactorLine
  002d9	83 c4 0c	 add	 esp, 12			; 0000000cH
  002dc	03 45 f4	 add	 eax, DWORD PTR _DiffFactor$[ebp]
  002df	89 45 f4	 mov	 DWORD PTR _DiffFactor$[ebp], eax

; 424  :             EvenLine += Pitch;

  002e2	8b 85 f4 ee ff
	ff		 mov	 eax, DWORD PTR _EvenLine$141334[ebp]
  002e8	03 45 f8	 add	 eax, DWORD PTR _Pitch$[ebp]
  002eb	89 85 f4 ee ff
	ff		 mov	 DWORD PTR _EvenLine$141334[ebp], eax

; 425  :             OddLine += Pitch;

  002f1	8b 8d f8 ee ff
	ff		 mov	 ecx, DWORD PTR _OddLine$141335[ebp]
  002f7	03 4d f8	 add	 ecx, DWORD PTR _Pitch$[ebp]
  002fa	89 8d f8 ee ff
	ff		 mov	 DWORD PTR _OddLine$141335[ebp], ecx

; 426  :             PreviousLine += Pitch;

  00300	8b 95 fc ee ff
	ff		 mov	 edx, DWORD PTR _PreviousLine$141336[ebp]
  00306	03 55 f8	 add	 edx, DWORD PTR _Pitch$[ebp]
  00309	89 95 fc ee ff
	ff		 mov	 DWORD PTR _PreviousLine$141336[ebp], edx

; 427  :         }

  0030f	e9 3a ff ff ff	 jmp	 $LN2@DoBothComb@2
$LN4@DoBothComb@2:

; 428  :     }
; 429  :     DO_EMMS;

  00314	0f 77		 emms

; 430  : 
; 431  :     pInfo->CombFactor = CalculateTotalCombFactor(Combs, pInfo);

  00316	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00319	50		 push	 eax
  0031a	8d 8d 10 ef ff
	ff		 lea	 ecx, DWORD PTR _Combs$[ebp]
  00320	51		 push	 ecx
  00321	e8 00 00 00 00	 call	 ?CalculateTotalCombFactor@@YAJPAKPAUTDeinterlaceInfo@@@Z ; CalculateTotalCombFactor
  00326	83 c4 08	 add	 esp, 8
  00329	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0032c	89 42 5c	 mov	 DWORD PTR [edx+92], eax

; 432  :     pInfo->FieldDiff = DiffFactor;

  0032f	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00332	8b 4d f4	 mov	 ecx, DWORD PTR _DiffFactor$[ebp]
  00335	89 48 58	 mov	 DWORD PTR [eax+88], ecx

; 433  :     LOG(2, _T("Frame %d %c FD = %d \t CF = %d"), pInfo->CurrentFrame, IsOdd ? 'O' : 'E', pInfo->FieldDiff, pInfo->CombFactor);

  00338	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0033b	8b 42 5c	 mov	 eax, DWORD PTR [edx+92]
  0033e	50		 push	 eax
  0033f	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00342	8b 51 58	 mov	 edx, DWORD PTR [ecx+88]
  00345	52		 push	 edx
  00346	8b 45 fc	 mov	 eax, DWORD PTR _IsOdd$[ebp]
  00349	f7 d8		 neg	 eax
  0034b	1a c0		 sbb	 al, al
  0034d	24 0a		 and	 al, 10			; 0000000aH
  0034f	04 45		 add	 al, 69			; 00000045H
  00351	0f be c8	 movsx	 ecx, al
  00354	51		 push	 ecx
  00355	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00358	8b 42 40	 mov	 eax, DWORD PTR [edx+64]
  0035b	50		 push	 eax
  0035c	68 00 00 00 00	 push	 OFFSET ??_C@_1DM@NGDJLNBJ@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?$CF?$AAc?$AA?5?$AAF?$AAD?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?7?$AA?5?$AAC?$AAF?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@
  00361	6a 02		 push	 2
  00363	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  00368	83 c4 18	 add	 esp, 24			; 00000018H
$LN11@DoBothComb@2:

; 434  : }

  0036b	5f		 pop	 edi
  0036c	5e		 pop	 esi
  0036d	8b e5		 mov	 esp, ebp
  0036f	5d		 pop	 ebp
  00370	c3		 ret	 0
?DoBothCombAndDiff@@YAXPAUTDeinterlaceInfo@@@Z ENDP	; DoBothCombAndDiff
_TEXT	ENDS
PUBLIC	?CalcDiffFactorChroma@@YAXPAUTDeinterlaceInfo@@@Z ; CalcDiffFactorChroma
; Function compile flags: /Odtp
;	COMDAT ?CalcDiffFactorChroma@@YAXPAUTDeinterlaceInfo@@@Z
_TEXT	SEGMENT
_CurrentLine$ = -24					; size = 4
_Line$ = -20						; size = 4
_DiffFactor$ = -16					; size = 4
_Pitch$ = -12						; size = 4
_IsOdd$ = -8						; size = 4
_PreviousLine$ = -4					; size = 4
_pInfo$ = 8						; size = 4
?CalcDiffFactorChroma@@YAXPAUTDeinterlaceInfo@@@Z PROC	; CalcDiffFactorChroma, COMDAT

; 337  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 18	 sub	 esp, 24			; 00000018H

; 338  :     // If we skipped a field, treat the new one as maximally different.
; 339  :     if (pInfo->PictureHistory[0] == NULL || pInfo->PictureHistory[2] == NULL)

  00006	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00009	83 78 04 00	 cmp	 DWORD PTR [eax+4], 0
  0000d	74 09		 je	 SHORT $LN4@CalcDiffFa
  0000f	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00012	83 79 0c 00	 cmp	 DWORD PTR [ecx+12], 0
  00016	75 0f		 jne	 SHORT $LN5@CalcDiffFa
$LN4@CalcDiffFa:

; 340  :     {
; 341  :         pInfo->FieldDiff = 0x7fffffff;

  00018	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0001b	c7 42 58 ff ff
	ff 7f		 mov	 DWORD PTR [edx+88], 2147483647 ; 7fffffffH

; 342  :         return;

  00022	e9 f0 00 00 00	 jmp	 $LN6@CalcDiffFa
$LN5@CalcDiffFa:

; 343  :     }
; 344  : 
; 345  :     int Line;
; 346  :     long DiffFactor = 0;

  00027	c7 45 f0 00 00
	00 00		 mov	 DWORD PTR _DiffFactor$[ebp], 0

; 347  :     DWORD Pitch = pInfo->InputPitch;

  0002e	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00031	8b 88 84 00 00
	00		 mov	 ecx, DWORD PTR [eax+132]
  00037	89 4d f4	 mov	 DWORD PTR _Pitch$[ebp], ecx

; 348  :     BOOL IsOdd((pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) > 0);

  0003a	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0003d	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  00040	8b 48 04	 mov	 ecx, DWORD PTR [eax+4]
  00043	83 e1 01	 and	 ecx, 1
  00046	33 d2		 xor	 edx, edx
  00048	3b d1		 cmp	 edx, ecx
  0004a	1b c0		 sbb	 eax, eax
  0004c	f7 d8		 neg	 eax
  0004e	89 45 f8	 mov	 DWORD PTR _IsOdd$[ebp], eax

; 349  : 
; 350  :     qwBitShift = BitShift;

  00051	a1 00 00 00 00	 mov	 eax, DWORD PTR ?BitShift@@3JA ; BitShift
  00056	99		 cdq
  00057	a3 00 00 00 00	 mov	 DWORD PTR _qwBitShift, eax
  0005c	89 15 04 00 00
	00		 mov	 DWORD PTR _qwBitShift+4, edx

; 351  : 
; 352  :     BYTE* CurrentLine = pInfo->PictureHistory[0]->pData + 16 * Pitch;

  00062	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00065	8b 51 04	 mov	 edx, DWORD PTR [ecx+4]
  00068	8b 45 f4	 mov	 eax, DWORD PTR _Pitch$[ebp]
  0006b	c1 e0 04	 shl	 eax, 4
  0006e	03 02		 add	 eax, DWORD PTR [edx]
  00070	89 45 e8	 mov	 DWORD PTR _CurrentLine$[ebp], eax

; 353  :     BYTE* PreviousLine = pInfo->PictureHistory[2]->pData + 16 * Pitch;

  00073	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00076	8b 51 0c	 mov	 edx, DWORD PTR [ecx+12]
  00079	8b 45 f4	 mov	 eax, DWORD PTR _Pitch$[ebp]
  0007c	c1 e0 04	 shl	 eax, 4
  0007f	03 02		 add	 eax, DWORD PTR [edx]
  00081	89 45 fc	 mov	 DWORD PTR _PreviousLine$[ebp], eax

; 354  : 
; 355  :     for (Line = 16; Line < pInfo->FieldHeight - 16; ++Line)

  00084	c7 45 ec 10 00
	00 00		 mov	 DWORD PTR _Line$[ebp], 16 ; 00000010H
  0008b	eb 09		 jmp	 SHORT $LN3@CalcDiffFa
$LN2@CalcDiffFa:
  0008d	8b 4d ec	 mov	 ecx, DWORD PTR _Line$[ebp]
  00090	83 c1 01	 add	 ecx, 1
  00093	89 4d ec	 mov	 DWORD PTR _Line$[ebp], ecx
$LN3@CalcDiffFa:
  00096	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00099	8b 42 54	 mov	 eax, DWORD PTR [edx+84]
  0009c	83 e8 10	 sub	 eax, 16			; 00000010H
  0009f	39 45 ec	 cmp	 DWORD PTR _Line$[ebp], eax
  000a2	7d 3a		 jge	 SHORT $LN1@CalcDiffFa

; 356  :     {
; 357  :         DiffFactor += CalcDiffFactorLineChroma(CurrentLine + 16,
; 358  :                                                 PreviousLine + 16,
; 359  :                                                 pInfo->LineLength - 32);

  000a4	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  000a7	8b 51 48	 mov	 edx, DWORD PTR [ecx+72]
  000aa	83 ea 20	 sub	 edx, 32			; 00000020H
  000ad	52		 push	 edx
  000ae	8b 45 fc	 mov	 eax, DWORD PTR _PreviousLine$[ebp]
  000b1	83 c0 10	 add	 eax, 16			; 00000010H
  000b4	50		 push	 eax
  000b5	8b 4d e8	 mov	 ecx, DWORD PTR _CurrentLine$[ebp]
  000b8	83 c1 10	 add	 ecx, 16			; 00000010H
  000bb	51		 push	 ecx
  000bc	e8 00 00 00 00	 call	 _CalcDiffFactorLineChroma
  000c1	83 c4 0c	 add	 esp, 12			; 0000000cH
  000c4	03 45 f0	 add	 eax, DWORD PTR _DiffFactor$[ebp]
  000c7	89 45 f0	 mov	 DWORD PTR _DiffFactor$[ebp], eax

; 360  :         CurrentLine += Pitch;

  000ca	8b 55 e8	 mov	 edx, DWORD PTR _CurrentLine$[ebp]
  000cd	03 55 f4	 add	 edx, DWORD PTR _Pitch$[ebp]
  000d0	89 55 e8	 mov	 DWORD PTR _CurrentLine$[ebp], edx

; 361  :         PreviousLine += Pitch;

  000d3	8b 45 fc	 mov	 eax, DWORD PTR _PreviousLine$[ebp]
  000d6	03 45 f4	 add	 eax, DWORD PTR _Pitch$[ebp]
  000d9	89 45 fc	 mov	 DWORD PTR _PreviousLine$[ebp], eax

; 362  :     }

  000dc	eb af		 jmp	 SHORT $LN2@CalcDiffFa
$LN1@CalcDiffFa:

; 363  : 
; 364  :     DO_EMMS;

  000de	0f 77		 emms

; 365  : 
; 366  :     pInfo->FieldDiff = DiffFactor;

  000e0	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  000e3	8b 55 f0	 mov	 edx, DWORD PTR _DiffFactor$[ebp]
  000e6	89 51 58	 mov	 DWORD PTR [ecx+88], edx

; 367  :     LOG(2, _T("Frame %d %c FD = %d"), pInfo->CurrentFrame, IsOdd ? 'O' : 'E', pInfo->FieldDiff);

  000e9	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  000ec	8b 48 58	 mov	 ecx, DWORD PTR [eax+88]
  000ef	51		 push	 ecx
  000f0	8b 55 f8	 mov	 edx, DWORD PTR _IsOdd$[ebp]
  000f3	f7 da		 neg	 edx
  000f5	1a d2		 sbb	 dl, dl
  000f7	80 e2 0a	 and	 dl, 10			; 0000000aH
  000fa	80 c2 45	 add	 dl, 69			; 00000045H
  000fd	0f be c2	 movsx	 eax, dl
  00100	50		 push	 eax
  00101	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00104	8b 51 40	 mov	 edx, DWORD PTR [ecx+64]
  00107	52		 push	 edx
  00108	68 00 00 00 00	 push	 OFFSET ??_C@_1CI@FHBFACIB@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?$CF?$AAc?$AA?5?$AAF?$AAD?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@
  0010d	6a 02		 push	 2
  0010f	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  00114	83 c4 14	 add	 esp, 20			; 00000014H
$LN6@CalcDiffFa:

; 368  : }

  00117	8b e5		 mov	 esp, ebp
  00119	5d		 pop	 ebp
  0011a	c3		 ret	 0
?CalcDiffFactorChroma@@YAXPAUTDeinterlaceInfo@@@Z ENDP	; CalcDiffFactorChroma
_TEXT	ENDS
PUBLIC	?CalcDiffFactor@@YAXPAUTDeinterlaceInfo@@@Z	; CalcDiffFactor
; Function compile flags: /Odtp
;	COMDAT ?CalcDiffFactor@@YAXPAUTDeinterlaceInfo@@@Z
_TEXT	SEGMENT
_CurrentLine$ = -24					; size = 4
_Line$ = -20						; size = 4
_DiffFactor$ = -16					; size = 4
_Pitch$ = -12						; size = 4
_IsOdd$ = -8						; size = 4
_PreviousLine$ = -4					; size = 4
_pInfo$ = 8						; size = 4
?CalcDiffFactor@@YAXPAUTDeinterlaceInfo@@@Z PROC	; CalcDiffFactor, COMDAT

; 290  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 18	 sub	 esp, 24			; 00000018H

; 291  :     // If we skipped a field, treat the new one as maximally different.
; 292  :     if (pInfo->PictureHistory[0] == NULL || pInfo->PictureHistory[2] == NULL)

  00006	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00009	83 78 04 00	 cmp	 DWORD PTR [eax+4], 0
  0000d	74 09		 je	 SHORT $LN4@CalcDiffFa@2
  0000f	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00012	83 79 0c 00	 cmp	 DWORD PTR [ecx+12], 0
  00016	75 0f		 jne	 SHORT $LN5@CalcDiffFa@2
$LN4@CalcDiffFa@2:

; 293  :     {
; 294  :         pInfo->FieldDiff = 0x7fffffff;

  00018	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0001b	c7 42 58 ff ff
	ff 7f		 mov	 DWORD PTR [edx+88], 2147483647 ; 7fffffffH

; 295  :         return;

  00022	e9 f0 00 00 00	 jmp	 $LN6@CalcDiffFa@2
$LN5@CalcDiffFa@2:

; 296  :     }
; 297  : 
; 298  :     int Line;
; 299  :     long DiffFactor = 0;

  00027	c7 45 f0 00 00
	00 00		 mov	 DWORD PTR _DiffFactor$[ebp], 0

; 300  :     DWORD Pitch = pInfo->InputPitch;

  0002e	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00031	8b 88 84 00 00
	00		 mov	 ecx, DWORD PTR [eax+132]
  00037	89 4d f4	 mov	 DWORD PTR _Pitch$[ebp], ecx

; 301  :     BOOL IsOdd((pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) > 0);

  0003a	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0003d	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  00040	8b 48 04	 mov	 ecx, DWORD PTR [eax+4]
  00043	83 e1 01	 and	 ecx, 1
  00046	33 d2		 xor	 edx, edx
  00048	3b d1		 cmp	 edx, ecx
  0004a	1b c0		 sbb	 eax, eax
  0004c	f7 d8		 neg	 eax
  0004e	89 45 f8	 mov	 DWORD PTR _IsOdd$[ebp], eax

; 302  : 
; 303  :     qwBitShift = BitShift;

  00051	a1 00 00 00 00	 mov	 eax, DWORD PTR ?BitShift@@3JA ; BitShift
  00056	99		 cdq
  00057	a3 00 00 00 00	 mov	 DWORD PTR _qwBitShift, eax
  0005c	89 15 04 00 00
	00		 mov	 DWORD PTR _qwBitShift+4, edx

; 304  : 
; 305  :     BYTE* CurrentLine = pInfo->PictureHistory[0]->pData + 16 * Pitch;

  00062	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00065	8b 51 04	 mov	 edx, DWORD PTR [ecx+4]
  00068	8b 45 f4	 mov	 eax, DWORD PTR _Pitch$[ebp]
  0006b	c1 e0 04	 shl	 eax, 4
  0006e	03 02		 add	 eax, DWORD PTR [edx]
  00070	89 45 e8	 mov	 DWORD PTR _CurrentLine$[ebp], eax

; 306  :     BYTE* PreviousLine = pInfo->PictureHistory[2]->pData + 16 * Pitch;

  00073	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00076	8b 51 0c	 mov	 edx, DWORD PTR [ecx+12]
  00079	8b 45 f4	 mov	 eax, DWORD PTR _Pitch$[ebp]
  0007c	c1 e0 04	 shl	 eax, 4
  0007f	03 02		 add	 eax, DWORD PTR [edx]
  00081	89 45 fc	 mov	 DWORD PTR _PreviousLine$[ebp], eax

; 307  : 
; 308  :     for (Line = 16; Line < pInfo->FieldHeight - 16; ++Line)

  00084	c7 45 ec 10 00
	00 00		 mov	 DWORD PTR _Line$[ebp], 16 ; 00000010H
  0008b	eb 09		 jmp	 SHORT $LN3@CalcDiffFa@2
$LN2@CalcDiffFa@2:
  0008d	8b 4d ec	 mov	 ecx, DWORD PTR _Line$[ebp]
  00090	83 c1 01	 add	 ecx, 1
  00093	89 4d ec	 mov	 DWORD PTR _Line$[ebp], ecx
$LN3@CalcDiffFa@2:
  00096	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00099	8b 42 54	 mov	 eax, DWORD PTR [edx+84]
  0009c	83 e8 10	 sub	 eax, 16			; 00000010H
  0009f	39 45 ec	 cmp	 DWORD PTR _Line$[ebp], eax
  000a2	7d 3a		 jge	 SHORT $LN1@CalcDiffFa@2

; 309  :     {
; 310  :         DiffFactor += CalcDiffFactorLine(CurrentLine + 16,
; 311  :                                             PreviousLine + 16,
; 312  :                                             pInfo->LineLength - 32);

  000a4	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  000a7	8b 51 48	 mov	 edx, DWORD PTR [ecx+72]
  000aa	83 ea 20	 sub	 edx, 32			; 00000020H
  000ad	52		 push	 edx
  000ae	8b 45 fc	 mov	 eax, DWORD PTR _PreviousLine$[ebp]
  000b1	83 c0 10	 add	 eax, 16			; 00000010H
  000b4	50		 push	 eax
  000b5	8b 4d e8	 mov	 ecx, DWORD PTR _CurrentLine$[ebp]
  000b8	83 c1 10	 add	 ecx, 16			; 00000010H
  000bb	51		 push	 ecx
  000bc	e8 00 00 00 00	 call	 _CalcDiffFactorLine
  000c1	83 c4 0c	 add	 esp, 12			; 0000000cH
  000c4	03 45 f0	 add	 eax, DWORD PTR _DiffFactor$[ebp]
  000c7	89 45 f0	 mov	 DWORD PTR _DiffFactor$[ebp], eax

; 313  :         CurrentLine += Pitch;

  000ca	8b 55 e8	 mov	 edx, DWORD PTR _CurrentLine$[ebp]
  000cd	03 55 f4	 add	 edx, DWORD PTR _Pitch$[ebp]
  000d0	89 55 e8	 mov	 DWORD PTR _CurrentLine$[ebp], edx

; 314  :         PreviousLine += Pitch;

  000d3	8b 45 fc	 mov	 eax, DWORD PTR _PreviousLine$[ebp]
  000d6	03 45 f4	 add	 eax, DWORD PTR _Pitch$[ebp]
  000d9	89 45 fc	 mov	 DWORD PTR _PreviousLine$[ebp], eax

; 315  :     }

  000dc	eb af		 jmp	 SHORT $LN2@CalcDiffFa@2
$LN1@CalcDiffFa@2:

; 316  : 
; 317  :     DO_EMMS;

  000de	0f 77		 emms

; 318  : 
; 319  :     pInfo->FieldDiff = DiffFactor;

  000e0	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  000e3	8b 55 f0	 mov	 edx, DWORD PTR _DiffFactor$[ebp]
  000e6	89 51 58	 mov	 DWORD PTR [ecx+88], edx

; 320  :     LOG(2, _T("Frame %d %c FD = %d"), pInfo->CurrentFrame, IsOdd ? 'O' : 'E', pInfo->FieldDiff);

  000e9	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  000ec	8b 48 58	 mov	 ecx, DWORD PTR [eax+88]
  000ef	51		 push	 ecx
  000f0	8b 55 f8	 mov	 edx, DWORD PTR _IsOdd$[ebp]
  000f3	f7 da		 neg	 edx
  000f5	1a d2		 sbb	 dl, dl
  000f7	80 e2 0a	 and	 dl, 10			; 0000000aH
  000fa	80 c2 45	 add	 dl, 69			; 00000045H
  000fd	0f be c2	 movsx	 eax, dl
  00100	50		 push	 eax
  00101	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00104	8b 51 40	 mov	 edx, DWORD PTR [ecx+64]
  00107	52		 push	 edx
  00108	68 00 00 00 00	 push	 OFFSET ??_C@_1CI@FHBFACIB@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?$CF?$AAc?$AA?5?$AAF?$AAD?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@
  0010d	6a 02		 push	 2
  0010f	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  00114	83 c4 14	 add	 esp, 20			; 00000014H
$LN6@CalcDiffFa@2:

; 321  : }

  00117	8b e5		 mov	 esp, ebp
  00119	5d		 pop	 ebp
  0011a	c3		 ret	 0
?CalcDiffFactor@@YAXPAUTDeinterlaceInfo@@@Z ENDP	; CalcDiffFactor
_TEXT	ENDS
PUBLIC	?CalcCombFactorChroma@@YAXPAUTDeinterlaceInfo@@@Z ; CalcCombFactorChroma
; Function compile flags: /Odtp
;	COMDAT ?CalcCombFactorChroma@@YAXPAUTDeinterlaceInfo@@@Z
_TEXT	SEGMENT
_EvenLine$ = -4340					; size = 4
_OddLine$ = -4336					; size = 4
_Line$ = -4332						; size = 4
_Combs$ = -4328						; size = 4320
_Pitch$ = -8						; size = 4
_IsOdd$ = -4						; size = 4
_pInfo$ = 8						; size = 4
?CalcCombFactorChroma@@YAXPAUTDeinterlaceInfo@@@Z PROC	; CalcCombFactorChroma, COMDAT

; 229  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	b8 f4 10 00 00	 mov	 eax, 4340		; 000010f4H
  00008	e8 00 00 00 00	 call	 __chkstk
  0000d	56		 push	 esi
  0000e	57		 push	 edi

; 230  :     // If one of the fields is missing, treat them as very different.
; 231  :     if (pInfo->PictureHistory[0] == NULL || pInfo->PictureHistory[1] == NULL)

  0000f	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00012	83 78 04 00	 cmp	 DWORD PTR [eax+4], 0
  00016	74 09		 je	 SHORT $LN6@CalcCombFa
  00018	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  0001b	83 79 08 00	 cmp	 DWORD PTR [ecx+8], 0
  0001f	75 0f		 jne	 SHORT $LN7@CalcCombFa
$LN6@CalcCombFa:

; 232  :     {
; 233  :         pInfo->CombFactor = 0x7fffffff;

  00021	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00024	c7 42 5c ff ff
	ff 7f		 mov	 DWORD PTR [edx+92], 2147483647 ; 7fffffffH

; 234  :         return;

  0002b	e9 c4 01 00 00	 jmp	 $LN8@CalcCombFa
$LN7@CalcCombFa:

; 235  :     }
; 236  : 
; 237  :     int Line;
; 238  :     DWORD Combs[DSCALER_MAX_HEIGHT / 2];
; 239  :     DWORD Pitch = pInfo->InputPitch;

  00030	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00033	8b 88 84 00 00
	00		 mov	 ecx, DWORD PTR [eax+132]
  00039	89 4d f8	 mov	 DWORD PTR _Pitch$[ebp], ecx

; 240  :     BYTE* EvenLine;
; 241  :     BYTE* OddLine;
; 242  :     BOOL IsOdd((pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) > 0);

  0003c	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0003f	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  00042	8b 48 04	 mov	 ecx, DWORD PTR [eax+4]
  00045	83 e1 01	 and	 ecx, 1
  00048	33 d2		 xor	 edx, edx
  0004a	3b d1		 cmp	 edx, ecx
  0004c	1b c0		 sbb	 eax, eax
  0004e	f7 d8		 neg	 eax
  00050	89 45 fc	 mov	 DWORD PTR _IsOdd$[ebp], eax

; 243  : 
; 244  :     qwThreshold = CombJaggieThreshold;

  00053	a1 00 00 00 00	 mov	 eax, DWORD PTR ?CombJaggieThreshold@@3JA ; CombJaggieThreshold
  00058	99		 cdq
  00059	a3 00 00 00 00	 mov	 DWORD PTR _qwThreshold, eax
  0005e	89 15 04 00 00
	00		 mov	 DWORD PTR _qwThreshold+4, edx

; 245  :     qwThreshold += (qwThreshold << 48) + (qwThreshold << 32) + (qwThreshold << 16);

  00064	a1 00 00 00 00	 mov	 eax, DWORD PTR _qwThreshold
  00069	8b 15 04 00 00
	00		 mov	 edx, DWORD PTR _qwThreshold+4
  0006f	b1 30		 mov	 cl, 48			; 00000030H
  00071	e8 00 00 00 00	 call	 __allshl
  00076	8b f0		 mov	 esi, eax
  00078	8b fa		 mov	 edi, edx
  0007a	a1 00 00 00 00	 mov	 eax, DWORD PTR _qwThreshold
  0007f	8b 15 04 00 00
	00		 mov	 edx, DWORD PTR _qwThreshold+4
  00085	b1 20		 mov	 cl, 32			; 00000020H
  00087	e8 00 00 00 00	 call	 __allshl
  0008c	03 f0		 add	 esi, eax
  0008e	13 fa		 adc	 edi, edx
  00090	a1 00 00 00 00	 mov	 eax, DWORD PTR _qwThreshold
  00095	8b 15 04 00 00
	00		 mov	 edx, DWORD PTR _qwThreshold+4
  0009b	b1 10		 mov	 cl, 16			; 00000010H
  0009d	e8 00 00 00 00	 call	 __allshl
  000a2	03 f0		 add	 esi, eax
  000a4	13 fa		 adc	 edi, edx
  000a6	03 35 00 00 00
	00		 add	 esi, DWORD PTR _qwThreshold
  000ac	8b 0d 04 00 00
	00		 mov	 ecx, DWORD PTR _qwThreshold+4
  000b2	13 cf		 adc	 ecx, edi
  000b4	89 35 00 00 00
	00		 mov	 DWORD PTR _qwThreshold, esi
  000ba	89 0d 04 00 00
	00		 mov	 DWORD PTR _qwThreshold+4, ecx

; 246  : 
; 247  :     if(IsOdd)

  000c0	83 7d fc 00	 cmp	 DWORD PTR _IsOdd$[ebp], 0
  000c4	74 2a		 je	 SHORT $LN5@CalcCombFa

; 248  :     {
; 249  :         EvenLine = pInfo->PictureHistory[1]->pData + 16 * Pitch;

  000c6	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  000c9	8b 42 08	 mov	 eax, DWORD PTR [edx+8]
  000cc	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  000cf	c1 e1 04	 shl	 ecx, 4
  000d2	03 08		 add	 ecx, DWORD PTR [eax]
  000d4	89 8d 0c ef ff
	ff		 mov	 DWORD PTR _EvenLine$[ebp], ecx

; 250  :         OddLine = pInfo->PictureHistory[0]->pData + 16 * Pitch;

  000da	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  000dd	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  000e0	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  000e3	c1 e1 04	 shl	 ecx, 4
  000e6	03 08		 add	 ecx, DWORD PTR [eax]
  000e8	89 8d 10 ef ff
	ff		 mov	 DWORD PTR _OddLine$[ebp], ecx

; 251  :     }
; 252  :     else

  000ee	eb 28		 jmp	 SHORT $LN4@CalcCombFa
$LN5@CalcCombFa:

; 253  :     {
; 254  :         EvenLine = pInfo->PictureHistory[0]->pData + 16 * Pitch;

  000f0	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  000f3	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  000f6	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  000f9	c1 e1 04	 shl	 ecx, 4
  000fc	03 08		 add	 ecx, DWORD PTR [eax]
  000fe	89 8d 0c ef ff
	ff		 mov	 DWORD PTR _EvenLine$[ebp], ecx

; 255  :         OddLine = pInfo->PictureHistory[1]->pData + 16 * Pitch;

  00104	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00107	8b 42 08	 mov	 eax, DWORD PTR [edx+8]
  0010a	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  0010d	c1 e1 04	 shl	 ecx, 4
  00110	03 08		 add	 ecx, DWORD PTR [eax]
  00112	89 8d 10 ef ff
	ff		 mov	 DWORD PTR _OddLine$[ebp], ecx
$LN4@CalcCombFa:

; 256  :     }
; 257  : 
; 258  :     for (Line = 16; Line < pInfo->FieldHeight - 16; ++Line)

  00118	c7 85 14 ef ff
	ff 10 00 00 00	 mov	 DWORD PTR _Line$[ebp], 16 ; 00000010H
  00122	eb 0f		 jmp	 SHORT $LN3@CalcCombFa
$LN2@CalcCombFa:
  00124	8b 95 14 ef ff
	ff		 mov	 edx, DWORD PTR _Line$[ebp]
  0012a	83 c2 01	 add	 edx, 1
  0012d	89 95 14 ef ff
	ff		 mov	 DWORD PTR _Line$[ebp], edx
$LN3@CalcCombFa:
  00133	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00136	8b 48 54	 mov	 ecx, DWORD PTR [eax+84]
  00139	83 e9 10	 sub	 ecx, 16			; 00000010H
  0013c	39 8d 14 ef ff
	ff		 cmp	 DWORD PTR _Line$[ebp], ecx
  00142	7d 67		 jge	 SHORT $LN1@CalcCombFa

; 259  :     {
; 260  :         Combs[Line] = CalcCombFactorLineChroma(EvenLine + 16,
; 261  :                                         OddLine + 16,
; 262  :                                         EvenLine + Pitch + 16,
; 263  :                                         pInfo->LineLength - 32);

  00144	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00147	8b 42 48	 mov	 eax, DWORD PTR [edx+72]
  0014a	83 e8 20	 sub	 eax, 32			; 00000020H
  0014d	50		 push	 eax
  0014e	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  00151	8b 95 0c ef ff
	ff		 mov	 edx, DWORD PTR _EvenLine$[ebp]
  00157	8d 44 0a 10	 lea	 eax, DWORD PTR [edx+ecx+16]
  0015b	50		 push	 eax
  0015c	8b 8d 10 ef ff
	ff		 mov	 ecx, DWORD PTR _OddLine$[ebp]
  00162	83 c1 10	 add	 ecx, 16			; 00000010H
  00165	51		 push	 ecx
  00166	8b 95 0c ef ff
	ff		 mov	 edx, DWORD PTR _EvenLine$[ebp]
  0016c	83 c2 10	 add	 edx, 16			; 00000010H
  0016f	52		 push	 edx
  00170	e8 00 00 00 00	 call	 _CalcCombFactorLineChroma
  00175	83 c4 10	 add	 esp, 16			; 00000010H
  00178	0f b7 c0	 movzx	 eax, ax
  0017b	8b 8d 14 ef ff
	ff		 mov	 ecx, DWORD PTR _Line$[ebp]
  00181	89 84 8d 18 ef
	ff ff		 mov	 DWORD PTR _Combs$[ebp+ecx*4], eax

; 264  :         EvenLine += Pitch;

  00188	8b 95 0c ef ff
	ff		 mov	 edx, DWORD PTR _EvenLine$[ebp]
  0018e	03 55 f8	 add	 edx, DWORD PTR _Pitch$[ebp]
  00191	89 95 0c ef ff
	ff		 mov	 DWORD PTR _EvenLine$[ebp], edx

; 265  :         OddLine += Pitch;

  00197	8b 85 10 ef ff
	ff		 mov	 eax, DWORD PTR _OddLine$[ebp]
  0019d	03 45 f8	 add	 eax, DWORD PTR _Pitch$[ebp]
  001a0	89 85 10 ef ff
	ff		 mov	 DWORD PTR _OddLine$[ebp], eax

; 266  :     }

  001a6	e9 79 ff ff ff	 jmp	 $LN2@CalcCombFa
$LN1@CalcCombFa:

; 267  : 
; 268  :     // Clear out MMX registers before we need to do floating point again
; 269  :     DO_EMMS;

  001ab	0f 77		 emms

; 270  : 
; 271  :     pInfo->CombFactor = CalculateTotalCombFactor(Combs, pInfo);

  001ad	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  001b0	51		 push	 ecx
  001b1	8d 95 18 ef ff
	ff		 lea	 edx, DWORD PTR _Combs$[ebp]
  001b7	52		 push	 edx
  001b8	e8 00 00 00 00	 call	 ?CalculateTotalCombFactor@@YAJPAKPAUTDeinterlaceInfo@@@Z ; CalculateTotalCombFactor
  001bd	83 c4 08	 add	 esp, 8
  001c0	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  001c3	89 41 5c	 mov	 DWORD PTR [ecx+92], eax

; 272  :     LOG(2, _T("Frame %d %c CF = %d"), pInfo->CurrentFrame, IsOdd ? 'O' : 'E', pInfo->CombFactor);

  001c6	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  001c9	8b 42 5c	 mov	 eax, DWORD PTR [edx+92]
  001cc	50		 push	 eax
  001cd	8b 4d fc	 mov	 ecx, DWORD PTR _IsOdd$[ebp]
  001d0	f7 d9		 neg	 ecx
  001d2	1a c9		 sbb	 cl, cl
  001d4	80 e1 0a	 and	 cl, 10			; 0000000aH
  001d7	80 c1 45	 add	 cl, 69			; 00000045H
  001da	0f be d1	 movsx	 edx, cl
  001dd	52		 push	 edx
  001de	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  001e1	8b 48 40	 mov	 ecx, DWORD PTR [eax+64]
  001e4	51		 push	 ecx
  001e5	68 00 00 00 00	 push	 OFFSET ??_C@_1CI@MMCCBLDK@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?$CF?$AAc?$AA?5?$AAC?$AAF?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@
  001ea	6a 02		 push	 2
  001ec	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  001f1	83 c4 14	 add	 esp, 20			; 00000014H
$LN8@CalcCombFa:

; 273  :     return;
; 274  : }

  001f4	5f		 pop	 edi
  001f5	5e		 pop	 esi
  001f6	8b e5		 mov	 esp, ebp
  001f8	5d		 pop	 ebp
  001f9	c3		 ret	 0
?CalcCombFactorChroma@@YAXPAUTDeinterlaceInfo@@@Z ENDP	; CalcCombFactorChroma
_TEXT	ENDS
PUBLIC	?CalcCombFactor@@YAXPAUTDeinterlaceInfo@@@Z	; CalcCombFactor
; Function compile flags: /Odtp
;	COMDAT ?CalcCombFactor@@YAXPAUTDeinterlaceInfo@@@Z
_TEXT	SEGMENT
_EvenLine$ = -4340					; size = 4
_OddLine$ = -4336					; size = 4
_Line$ = -4332						; size = 4
_Combs$ = -4328						; size = 4320
_Pitch$ = -8						; size = 4
_IsOdd$ = -4						; size = 4
_pInfo$ = 8						; size = 4
?CalcCombFactor@@YAXPAUTDeinterlaceInfo@@@Z PROC	; CalcCombFactor, COMDAT

; 181  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	b8 f4 10 00 00	 mov	 eax, 4340		; 000010f4H
  00008	e8 00 00 00 00	 call	 __chkstk
  0000d	56		 push	 esi
  0000e	57		 push	 edi

; 182  :     // If one of the fields is missing, treat them as very different.
; 183  :     if (pInfo->PictureHistory[0] == NULL || pInfo->PictureHistory[1] == NULL)

  0000f	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00012	83 78 04 00	 cmp	 DWORD PTR [eax+4], 0
  00016	74 09		 je	 SHORT $LN6@CalcCombFa@2
  00018	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  0001b	83 79 08 00	 cmp	 DWORD PTR [ecx+8], 0
  0001f	75 0f		 jne	 SHORT $LN7@CalcCombFa@2
$LN6@CalcCombFa@2:

; 184  :     {
; 185  :         pInfo->CombFactor = 0x7fffffff;

  00021	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00024	c7 42 5c ff ff
	ff 7f		 mov	 DWORD PTR [edx+92], 2147483647 ; 7fffffffH

; 186  :         return;

  0002b	e9 c4 01 00 00	 jmp	 $LN8@CalcCombFa@2
$LN7@CalcCombFa@2:

; 187  :     }
; 188  : 
; 189  :     int Line;
; 190  :     DWORD Combs[DSCALER_MAX_HEIGHT / 2];
; 191  :     DWORD Pitch = pInfo->InputPitch;

  00030	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00033	8b 88 84 00 00
	00		 mov	 ecx, DWORD PTR [eax+132]
  00039	89 4d f8	 mov	 DWORD PTR _Pitch$[ebp], ecx

; 192  :     BYTE* EvenLine;
; 193  :     BYTE* OddLine;
; 194  :     BOOL IsOdd((pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) > 0);

  0003c	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0003f	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  00042	8b 48 04	 mov	 ecx, DWORD PTR [eax+4]
  00045	83 e1 01	 and	 ecx, 1
  00048	33 d2		 xor	 edx, edx
  0004a	3b d1		 cmp	 edx, ecx
  0004c	1b c0		 sbb	 eax, eax
  0004e	f7 d8		 neg	 eax
  00050	89 45 fc	 mov	 DWORD PTR _IsOdd$[ebp], eax

; 195  : 
; 196  :     qwThreshold = CombJaggieThreshold;

  00053	a1 00 00 00 00	 mov	 eax, DWORD PTR ?CombJaggieThreshold@@3JA ; CombJaggieThreshold
  00058	99		 cdq
  00059	a3 00 00 00 00	 mov	 DWORD PTR _qwThreshold, eax
  0005e	89 15 04 00 00
	00		 mov	 DWORD PTR _qwThreshold+4, edx

; 197  :     qwThreshold += (qwThreshold << 48) + (qwThreshold << 32) + (qwThreshold << 16);

  00064	a1 00 00 00 00	 mov	 eax, DWORD PTR _qwThreshold
  00069	8b 15 04 00 00
	00		 mov	 edx, DWORD PTR _qwThreshold+4
  0006f	b1 30		 mov	 cl, 48			; 00000030H
  00071	e8 00 00 00 00	 call	 __allshl
  00076	8b f0		 mov	 esi, eax
  00078	8b fa		 mov	 edi, edx
  0007a	a1 00 00 00 00	 mov	 eax, DWORD PTR _qwThreshold
  0007f	8b 15 04 00 00
	00		 mov	 edx, DWORD PTR _qwThreshold+4
  00085	b1 20		 mov	 cl, 32			; 00000020H
  00087	e8 00 00 00 00	 call	 __allshl
  0008c	03 f0		 add	 esi, eax
  0008e	13 fa		 adc	 edi, edx
  00090	a1 00 00 00 00	 mov	 eax, DWORD PTR _qwThreshold
  00095	8b 15 04 00 00
	00		 mov	 edx, DWORD PTR _qwThreshold+4
  0009b	b1 10		 mov	 cl, 16			; 00000010H
  0009d	e8 00 00 00 00	 call	 __allshl
  000a2	03 f0		 add	 esi, eax
  000a4	13 fa		 adc	 edi, edx
  000a6	03 35 00 00 00
	00		 add	 esi, DWORD PTR _qwThreshold
  000ac	8b 0d 04 00 00
	00		 mov	 ecx, DWORD PTR _qwThreshold+4
  000b2	13 cf		 adc	 ecx, edi
  000b4	89 35 00 00 00
	00		 mov	 DWORD PTR _qwThreshold, esi
  000ba	89 0d 04 00 00
	00		 mov	 DWORD PTR _qwThreshold+4, ecx

; 198  : 
; 199  :     if(IsOdd)

  000c0	83 7d fc 00	 cmp	 DWORD PTR _IsOdd$[ebp], 0
  000c4	74 2a		 je	 SHORT $LN5@CalcCombFa@2

; 200  :     {
; 201  :         EvenLine = pInfo->PictureHistory[1]->pData + 16 * Pitch;

  000c6	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  000c9	8b 42 08	 mov	 eax, DWORD PTR [edx+8]
  000cc	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  000cf	c1 e1 04	 shl	 ecx, 4
  000d2	03 08		 add	 ecx, DWORD PTR [eax]
  000d4	89 8d 0c ef ff
	ff		 mov	 DWORD PTR _EvenLine$[ebp], ecx

; 202  :         OddLine = pInfo->PictureHistory[0]->pData + 16 * Pitch;

  000da	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  000dd	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  000e0	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  000e3	c1 e1 04	 shl	 ecx, 4
  000e6	03 08		 add	 ecx, DWORD PTR [eax]
  000e8	89 8d 10 ef ff
	ff		 mov	 DWORD PTR _OddLine$[ebp], ecx

; 203  :     }
; 204  :     else

  000ee	eb 28		 jmp	 SHORT $LN4@CalcCombFa@2
$LN5@CalcCombFa@2:

; 205  :     {
; 206  :         EvenLine = pInfo->PictureHistory[0]->pData + 16 * Pitch;

  000f0	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  000f3	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  000f6	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  000f9	c1 e1 04	 shl	 ecx, 4
  000fc	03 08		 add	 ecx, DWORD PTR [eax]
  000fe	89 8d 0c ef ff
	ff		 mov	 DWORD PTR _EvenLine$[ebp], ecx

; 207  :         OddLine = pInfo->PictureHistory[1]->pData + 16 * Pitch;

  00104	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00107	8b 42 08	 mov	 eax, DWORD PTR [edx+8]
  0010a	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  0010d	c1 e1 04	 shl	 ecx, 4
  00110	03 08		 add	 ecx, DWORD PTR [eax]
  00112	89 8d 10 ef ff
	ff		 mov	 DWORD PTR _OddLine$[ebp], ecx
$LN4@CalcCombFa@2:

; 208  :     }
; 209  : 
; 210  :     for (Line = 16; Line < pInfo->FieldHeight - 16; ++Line)

  00118	c7 85 14 ef ff
	ff 10 00 00 00	 mov	 DWORD PTR _Line$[ebp], 16 ; 00000010H
  00122	eb 0f		 jmp	 SHORT $LN3@CalcCombFa@2
$LN2@CalcCombFa@2:
  00124	8b 95 14 ef ff
	ff		 mov	 edx, DWORD PTR _Line$[ebp]
  0012a	83 c2 01	 add	 edx, 1
  0012d	89 95 14 ef ff
	ff		 mov	 DWORD PTR _Line$[ebp], edx
$LN3@CalcCombFa@2:
  00133	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00136	8b 48 54	 mov	 ecx, DWORD PTR [eax+84]
  00139	83 e9 10	 sub	 ecx, 16			; 00000010H
  0013c	39 8d 14 ef ff
	ff		 cmp	 DWORD PTR _Line$[ebp], ecx
  00142	7d 67		 jge	 SHORT $LN1@CalcCombFa@2

; 211  :     {
; 212  :         Combs[Line] = CalcCombFactorLine(EvenLine + 16,
; 213  :                                         OddLine + 16,
; 214  :                                         EvenLine + Pitch + 16,
; 215  :                                         pInfo->LineLength - 32);

  00144	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00147	8b 42 48	 mov	 eax, DWORD PTR [edx+72]
  0014a	83 e8 20	 sub	 eax, 32			; 00000020H
  0014d	50		 push	 eax
  0014e	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  00151	8b 95 0c ef ff
	ff		 mov	 edx, DWORD PTR _EvenLine$[ebp]
  00157	8d 44 0a 10	 lea	 eax, DWORD PTR [edx+ecx+16]
  0015b	50		 push	 eax
  0015c	8b 8d 10 ef ff
	ff		 mov	 ecx, DWORD PTR _OddLine$[ebp]
  00162	83 c1 10	 add	 ecx, 16			; 00000010H
  00165	51		 push	 ecx
  00166	8b 95 0c ef ff
	ff		 mov	 edx, DWORD PTR _EvenLine$[ebp]
  0016c	83 c2 10	 add	 edx, 16			; 00000010H
  0016f	52		 push	 edx
  00170	e8 00 00 00 00	 call	 _CalcCombFactorLine
  00175	83 c4 10	 add	 esp, 16			; 00000010H
  00178	0f b7 c0	 movzx	 eax, ax
  0017b	8b 8d 14 ef ff
	ff		 mov	 ecx, DWORD PTR _Line$[ebp]
  00181	89 84 8d 18 ef
	ff ff		 mov	 DWORD PTR _Combs$[ebp+ecx*4], eax

; 216  :         EvenLine += Pitch;

  00188	8b 95 0c ef ff
	ff		 mov	 edx, DWORD PTR _EvenLine$[ebp]
  0018e	03 55 f8	 add	 edx, DWORD PTR _Pitch$[ebp]
  00191	89 95 0c ef ff
	ff		 mov	 DWORD PTR _EvenLine$[ebp], edx

; 217  :         OddLine += Pitch;

  00197	8b 85 10 ef ff
	ff		 mov	 eax, DWORD PTR _OddLine$[ebp]
  0019d	03 45 f8	 add	 eax, DWORD PTR _Pitch$[ebp]
  001a0	89 85 10 ef ff
	ff		 mov	 DWORD PTR _OddLine$[ebp], eax

; 218  :     }

  001a6	e9 79 ff ff ff	 jmp	 $LN2@CalcCombFa@2
$LN1@CalcCombFa@2:

; 219  : 
; 220  :     // Clear out MMX registers before we need to do floating point again
; 221  :     DO_EMMS;

  001ab	0f 77		 emms

; 222  : 
; 223  :     pInfo->CombFactor = CalculateTotalCombFactor(Combs, pInfo);

  001ad	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  001b0	51		 push	 ecx
  001b1	8d 95 18 ef ff
	ff		 lea	 edx, DWORD PTR _Combs$[ebp]
  001b7	52		 push	 edx
  001b8	e8 00 00 00 00	 call	 ?CalculateTotalCombFactor@@YAJPAKPAUTDeinterlaceInfo@@@Z ; CalculateTotalCombFactor
  001bd	83 c4 08	 add	 esp, 8
  001c0	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  001c3	89 41 5c	 mov	 DWORD PTR [ecx+92], eax

; 224  :     LOG(2, _T("Frame %d %c CF = %d"), pInfo->CurrentFrame, IsOdd ? 'O' : 'E', pInfo->CombFactor);

  001c6	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  001c9	8b 42 5c	 mov	 eax, DWORD PTR [edx+92]
  001cc	50		 push	 eax
  001cd	8b 4d fc	 mov	 ecx, DWORD PTR _IsOdd$[ebp]
  001d0	f7 d9		 neg	 ecx
  001d2	1a c9		 sbb	 cl, cl
  001d4	80 e1 0a	 and	 cl, 10			; 0000000aH
  001d7	80 c1 45	 add	 cl, 69			; 00000045H
  001da	0f be d1	 movsx	 edx, cl
  001dd	52		 push	 edx
  001de	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  001e1	8b 48 40	 mov	 ecx, DWORD PTR [eax+64]
  001e4	51		 push	 ecx
  001e5	68 00 00 00 00	 push	 OFFSET ??_C@_1CI@MMCCBLDK@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AA?$CF?$AAc?$AA?5?$AAC?$AAF?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@
  001ea	6a 02		 push	 2
  001ec	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  001f1	83 c4 14	 add	 esp, 20			; 00000014H
$LN8@CalcCombFa@2:

; 225  :     return;
; 226  : }

  001f4	5f		 pop	 edi
  001f5	5e		 pop	 esi
  001f6	8b e5		 mov	 esp, ebp
  001f8	5d		 pop	 ebp
  001f9	c3		 ret	 0
?CalcCombFactor@@YAXPAUTDeinterlaceInfo@@@Z ENDP	; CalcCombFactor
_TEXT	ENDS
PUBLIC	?PerformProgFilmDetectCalculations@@YAXPAUTDeinterlaceInfo@@@Z ; PerformProgFilmDetectCalculations
; Function compile flags: /Odtp
;	COMDAT ?PerformProgFilmDetectCalculations@@YAXPAUTDeinterlaceInfo@@@Z
_TEXT	SEGMENT
_CurrentLine$ = -20					; size = 4
_Line$ = -16						; size = 4
_DiffFactor$ = -12					; size = 4
_Pitch$ = -8						; size = 4
_PreviousLine$ = -4					; size = 4
_pInfo$ = 8						; size = 4
?PerformProgFilmDetectCalculations@@YAXPAUTDeinterlaceInfo@@@Z PROC ; PerformProgFilmDetectCalculations, COMDAT

; 105  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 14	 sub	 esp, 20			; 00000014H

; 106  :     // If we skipped a field, treat the new one as maximally different.
; 107  :     if (pInfo->PictureHistory[0] == NULL || pInfo->PictureHistory[1] == NULL ||
; 108  :         pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_MASK ||
; 109  :         pInfo->PictureHistory[1]->Flags & PICTURE_INTERLACED_MASK)

  00006	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00009	83 78 04 00	 cmp	 DWORD PTR [eax+4], 0
  0000d	74 25		 je	 SHORT $LN4@PerformPro
  0000f	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00012	83 79 08 00	 cmp	 DWORD PTR [ecx+8], 0
  00016	74 1c		 je	 SHORT $LN4@PerformPro
  00018	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0001b	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  0001e	8b 48 04	 mov	 ecx, DWORD PTR [eax+4]
  00021	83 e1 03	 and	 ecx, 3
  00024	75 0e		 jne	 SHORT $LN4@PerformPro
  00026	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00029	8b 42 08	 mov	 eax, DWORD PTR [edx+8]
  0002c	8b 48 04	 mov	 ecx, DWORD PTR [eax+4]
  0002f	83 e1 03	 and	 ecx, 3
  00032	74 0f		 je	 SHORT $LN5@PerformPro
$LN4@PerformPro:

; 110  :     {
; 111  :         pInfo->FieldDiff = 0x7fffffff;

  00034	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00037	c7 42 58 ff ff
	ff 7f		 mov	 DWORD PTR [edx+88], 2147483647 ; 7fffffffH

; 112  :         return;

  0003e	e9 c8 00 00 00	 jmp	 $LN6@PerformPro
$LN5@PerformPro:

; 113  :     }
; 114  : 
; 115  :     int Line;
; 116  :     long DiffFactor = 0;

  00043	c7 45 f4 00 00
	00 00		 mov	 DWORD PTR _DiffFactor$[ebp], 0

; 117  :     DWORD Pitch = pInfo->InputPitch;

  0004a	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  0004d	8b 88 84 00 00
	00		 mov	 ecx, DWORD PTR [eax+132]
  00053	89 4d f8	 mov	 DWORD PTR _Pitch$[ebp], ecx

; 118  : 
; 119  :     qwBitShift = BitShift;

  00056	a1 00 00 00 00	 mov	 eax, DWORD PTR ?BitShift@@3JA ; BitShift
  0005b	99		 cdq
  0005c	a3 00 00 00 00	 mov	 DWORD PTR _qwBitShift, eax
  00061	89 15 04 00 00
	00		 mov	 DWORD PTR _qwBitShift+4, edx

; 120  : 
; 121  :     BYTE* CurrentLine = pInfo->PictureHistory[0]->pData + 32 * Pitch;

  00067	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0006a	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  0006d	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  00070	c1 e1 05	 shl	 ecx, 5
  00073	03 08		 add	 ecx, DWORD PTR [eax]
  00075	89 4d ec	 mov	 DWORD PTR _CurrentLine$[ebp], ecx

; 122  :     BYTE* PreviousLine = pInfo->PictureHistory[1]->pData + 32 * Pitch;

  00078	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0007b	8b 42 08	 mov	 eax, DWORD PTR [edx+8]
  0007e	8b 4d f8	 mov	 ecx, DWORD PTR _Pitch$[ebp]
  00081	c1 e1 05	 shl	 ecx, 5
  00084	03 08		 add	 ecx, DWORD PTR [eax]
  00086	89 4d fc	 mov	 DWORD PTR _PreviousLine$[ebp], ecx

; 123  : 
; 124  :     for (Line = 32; Line < pInfo->FieldHeight - 32; ++Line)

  00089	c7 45 f0 20 00
	00 00		 mov	 DWORD PTR _Line$[ebp], 32 ; 00000020H
  00090	eb 09		 jmp	 SHORT $LN3@PerformPro
$LN2@PerformPro:
  00092	8b 55 f0	 mov	 edx, DWORD PTR _Line$[ebp]
  00095	83 c2 01	 add	 edx, 1
  00098	89 55 f0	 mov	 DWORD PTR _Line$[ebp], edx
$LN3@PerformPro:
  0009b	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  0009e	8b 48 54	 mov	 ecx, DWORD PTR [eax+84]
  000a1	83 e9 20	 sub	 ecx, 32			; 00000020H
  000a4	39 4d f0	 cmp	 DWORD PTR _Line$[ebp], ecx
  000a7	7d 3a		 jge	 SHORT $LN1@PerformPro

; 125  :     {
; 126  :         DiffFactor += CalcDiffFactorLine(CurrentLine + 32,
; 127  :                                             PreviousLine + 32,
; 128  :                                             pInfo->LineLength - 64);

  000a9	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  000ac	8b 42 48	 mov	 eax, DWORD PTR [edx+72]
  000af	83 e8 40	 sub	 eax, 64			; 00000040H
  000b2	50		 push	 eax
  000b3	8b 4d fc	 mov	 ecx, DWORD PTR _PreviousLine$[ebp]
  000b6	83 c1 20	 add	 ecx, 32			; 00000020H
  000b9	51		 push	 ecx
  000ba	8b 55 ec	 mov	 edx, DWORD PTR _CurrentLine$[ebp]
  000bd	83 c2 20	 add	 edx, 32			; 00000020H
  000c0	52		 push	 edx
  000c1	e8 00 00 00 00	 call	 _CalcDiffFactorLine
  000c6	83 c4 0c	 add	 esp, 12			; 0000000cH
  000c9	03 45 f4	 add	 eax, DWORD PTR _DiffFactor$[ebp]
  000cc	89 45 f4	 mov	 DWORD PTR _DiffFactor$[ebp], eax

; 129  :         CurrentLine += Pitch;

  000cf	8b 45 ec	 mov	 eax, DWORD PTR _CurrentLine$[ebp]
  000d2	03 45 f8	 add	 eax, DWORD PTR _Pitch$[ebp]
  000d5	89 45 ec	 mov	 DWORD PTR _CurrentLine$[ebp], eax

; 130  :         PreviousLine += Pitch;

  000d8	8b 4d fc	 mov	 ecx, DWORD PTR _PreviousLine$[ebp]
  000db	03 4d f8	 add	 ecx, DWORD PTR _Pitch$[ebp]
  000de	89 4d fc	 mov	 DWORD PTR _PreviousLine$[ebp], ecx

; 131  :     }

  000e1	eb af		 jmp	 SHORT $LN2@PerformPro
$LN1@PerformPro:

; 132  : 
; 133  :     DO_EMMS;

  000e3	0f 77		 emms

; 134  : 
; 135  :     pInfo->FieldDiff = DiffFactor;

  000e5	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  000e8	8b 45 f4	 mov	 eax, DWORD PTR _DiffFactor$[ebp]
  000eb	89 42 58	 mov	 DWORD PTR [edx+88], eax

; 136  :     LOG(2, _T("Frame %d FD = %d"), pInfo->CurrentFrame, pInfo->FieldDiff);

  000ee	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  000f1	8b 51 58	 mov	 edx, DWORD PTR [ecx+88]
  000f4	52		 push	 edx
  000f5	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  000f8	8b 48 40	 mov	 ecx, DWORD PTR [eax+64]
  000fb	51		 push	 ecx
  000fc	68 00 00 00 00	 push	 OFFSET ??_C@_1CC@DABIACJG@?$AAF?$AAr?$AAa?$AAm?$AAe?$AA?5?$AA?$CF?$AAd?$AA?5?$AAF?$AAD?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AA?$AA@
  00101	6a 02		 push	 2
  00103	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  00108	83 c4 10	 add	 esp, 16			; 00000010H
$LN6@PerformPro:

; 137  : }

  0010b	8b e5		 mov	 esp, ebp
  0010d	5d		 pop	 ebp
  0010e	c3		 ret	 0
?PerformProgFilmDetectCalculations@@YAXPAUTDeinterlaceInfo@@@Z ENDP ; PerformProgFilmDetectCalculations
_TEXT	ENDS
PUBLIC	?PerformFilmDetectCalculations@@YAXPAUTDeinterlaceInfo@@HH@Z ; PerformFilmDetectCalculations
; Function compile flags: /Odtp
;	COMDAT ?PerformFilmDetectCalculations@@YAXPAUTDeinterlaceInfo@@HH@Z
_TEXT	SEGMENT
_pInfo$ = 8						; size = 4
_NeedComb$ = 12						; size = 4
_NeedDiff$ = 16						; size = 4
?PerformFilmDetectCalculations@@YAXPAUTDeinterlaceInfo@@HH@Z PROC ; PerformFilmDetectCalculations, COMDAT

; 66   : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp

; 67   :     if(NeedComb && NeedDiff)

  00003	83 7d 0c 00	 cmp	 DWORD PTR _NeedComb$[ebp], 0
  00007	74 2b		 je	 SHORT $LN11@PerformFil
  00009	83 7d 10 00	 cmp	 DWORD PTR _NeedDiff$[ebp], 0
  0000d	74 25		 je	 SHORT $LN11@PerformFil

; 68   :     {
; 69   :         if(UseChromaInDetect)

  0000f	83 3d 00 00 00
	00 00		 cmp	 DWORD PTR ?UseChromaInDetect@@3HA, 0 ; UseChromaInDetect
  00016	74 0e		 je	 SHORT $LN10@PerformFil

; 70   :         {
; 71   :             DoBothCombAndDiffChroma(pInfo);

  00018	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  0001b	50		 push	 eax
  0001c	e8 00 00 00 00	 call	 ?DoBothCombAndDiffChroma@@YAXPAUTDeinterlaceInfo@@@Z ; DoBothCombAndDiffChroma
  00021	83 c4 04	 add	 esp, 4

; 72   :         }
; 73   :         else

  00024	eb 0c		 jmp	 SHORT $LN9@PerformFil
$LN10@PerformFil:

; 74   :         {
; 75   :             DoBothCombAndDiff(pInfo);

  00026	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00029	51		 push	 ecx
  0002a	e8 00 00 00 00	 call	 ?DoBothCombAndDiff@@YAXPAUTDeinterlaceInfo@@@Z ; DoBothCombAndDiff
  0002f	83 c4 04	 add	 esp, 4
$LN9@PerformFil:

; 76   :         }

  00032	eb 54		 jmp	 SHORT $LN12@PerformFil
$LN11@PerformFil:

; 77   :     }
; 78   :     else if(NeedComb)

  00034	83 7d 0c 00	 cmp	 DWORD PTR _NeedComb$[ebp], 0
  00038	74 25		 je	 SHORT $LN7@PerformFil

; 79   :     {
; 80   :         if(UseChromaInDetect)

  0003a	83 3d 00 00 00
	00 00		 cmp	 DWORD PTR ?UseChromaInDetect@@3HA, 0 ; UseChromaInDetect
  00041	74 0e		 je	 SHORT $LN6@PerformFil

; 81   :         {
; 82   :             CalcCombFactorChroma(pInfo);

  00043	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  00046	52		 push	 edx
  00047	e8 00 00 00 00	 call	 ?CalcCombFactorChroma@@YAXPAUTDeinterlaceInfo@@@Z ; CalcCombFactorChroma
  0004c	83 c4 04	 add	 esp, 4

; 83   :         }
; 84   :         else

  0004f	eb 0c		 jmp	 SHORT $LN5@PerformFil
$LN6@PerformFil:

; 85   :         {
; 86   :             CalcCombFactor(pInfo);

  00051	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00054	50		 push	 eax
  00055	e8 00 00 00 00	 call	 ?CalcCombFactor@@YAXPAUTDeinterlaceInfo@@@Z ; CalcCombFactor
  0005a	83 c4 04	 add	 esp, 4
$LN5@PerformFil:

; 87   :         }

  0005d	eb 29		 jmp	 SHORT $LN12@PerformFil
$LN7@PerformFil:

; 88   :     }
; 89   :     else if(NeedDiff)

  0005f	83 7d 10 00	 cmp	 DWORD PTR _NeedDiff$[ebp], 0
  00063	74 23		 je	 SHORT $LN12@PerformFil

; 90   :     {
; 91   :         if(UseChromaInDetect)

  00065	83 3d 00 00 00
	00 00		 cmp	 DWORD PTR ?UseChromaInDetect@@3HA, 0 ; UseChromaInDetect
  0006c	74 0e		 je	 SHORT $LN2@PerformFil

; 92   :         {
; 93   :             CalcDiffFactorChroma(pInfo);

  0006e	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00071	51		 push	 ecx
  00072	e8 00 00 00 00	 call	 ?CalcDiffFactorChroma@@YAXPAUTDeinterlaceInfo@@@Z ; CalcDiffFactorChroma
  00077	83 c4 04	 add	 esp, 4

; 94   :         }
; 95   :         else

  0007a	eb 0c		 jmp	 SHORT $LN12@PerformFil
$LN2@PerformFil:

; 96   :         {
; 97   :             CalcDiffFactor(pInfo);

  0007c	8b 55 08	 mov	 edx, DWORD PTR _pInfo$[ebp]
  0007f	52		 push	 edx
  00080	e8 00 00 00 00	 call	 ?CalcDiffFactor@@YAXPAUTDeinterlaceInfo@@@Z ; CalcDiffFactor
  00085	83 c4 04	 add	 esp, 4
$LN12@PerformFil:

; 98   :         }
; 99   :     }
; 100  : }

  00088	5d		 pop	 ebp
  00089	c3		 ret	 0
?PerformFilmDetectCalculations@@YAXPAUTDeinterlaceInfo@@HH@Z ENDP ; PerformFilmDetectCalculations
END
