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

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

INCLUDELIB OLDNAMES

PUBLIC	??_C@_0BD@MCAMHAHA@GiveUpProcDuringJT?$AA@	; `string'
PUBLIC	??_C@_0CK@KGMFJIGH@Give?5Up?5processor?5during?5JudderT@ ; `string'
PUBLIC	??_C@_0M@PPDDBKOC@AlwaysSleep?$AA@		; `string'
PUBLIC	??_C@_0BM@KLPEMKBN@Always?5sleep?5even?5when?5late?$AA@ ; `string'
PUBLIC	??_C@_0O@LGBNOFIA@MaxFieldShift?$AA@		; `string'
PUBLIC	??_C@_0DE@ONNALCGG@Maximum?5shift?5between?5received?5a@ ; `string'
PUBLIC	??_C@_0BE@IONCICOB@SleepSkipFieldsLate?$AA@	; `string'
PUBLIC	??_C@_0BH@CCEPBIFF@Sleep?5Skip?5Fields?5Late?$AA@ ; `string'
PUBLIC	??_C@_0BA@DNPDCIJF@SleepSkipFields?$AA@		; `string'
PUBLIC	??_C@_0BC@BEPIFNJJ@Sleep?5Skip?5Fields?$AA@	; `string'
PUBLIC	??_C@_0O@DMAJALHG@SleepInterval?$AA@		; `string'
PUBLIC	??_C@_0P@LJOHOLHG@Sleep?5Interval?$AA@		; `string'
PUBLIC	??_C@_0BG@PDAGGELF@FormatChangeThreshold?$AA@	; `string'
PUBLIC	??_C@_0BI@OJEPLALJ@Format?5Change?5Threshold?$AA@ ; `string'
PUBLIC	??_C@_04EMMOPAGB@60Hz?$AA@			; `string'
PUBLIC	??_C@_0M@NAKDPBHJ@60Hz?5Format?$AA@		; `string'
PUBLIC	??_C@_04LGOIKLB@50Hz?$AA@			; `string'
PUBLIC	??_C@_0M@KHDNCDIJ@50Hz?5Format?$AA@		; `string'
PUBLIC	??_C@_0BD@PGHLGLIM@DoAutoFormatDetect?$AA@	; `string'
PUBLIC	??_C@_06NFILKDII@Timing?$AA@			; `string'
PUBLIC	??_C@_0BD@PKJNDNFP@Auto?5Format?5Detect?$AA@	; `string'
PUBLIC	?TimerFrequency@@3T_LARGE_INTEGER@@A		; TimerFrequency
PUBLIC	?hTimerEvent@@3PAXA				; hTimerEvent
PUBLIC	?wTimerRes@@3IA					; wTimerRes
PUBLIC	?RunningAverageCounterTicks@@3NA		; RunningAverageCounterTicks
PUBLIC	?StartAverageCounterTicks@@3NA			; StartAverageCounterTicks
PUBLIC	?LastFieldTime@@3T_LARGE_INTEGER@@A		; LastFieldTime
PUBLIC	?CurrentFieldTime@@3T_LARGE_INTEGER@@A		; CurrentFieldTime
PUBLIC	?LastFlipTime@@3T_LARGE_INTEGER@@A		; LastFlipTime
PUBLIC	?CurrentFlipTime@@3T_LARGE_INTEGER@@A		; CurrentFlipTime
PUBLIC	?bIsPAL@@3HA					; bIsPAL
PUBLIC	?FlipAdjust@@3HA				; FlipAdjust
PUBLIC	?nDroppedFields@@3HA				; nDroppedFields
PUBLIC	?nNotWaitedFields@@3HA				; nNotWaitedFields
PUBLIC	?nLateFields@@3HA				; nLateFields
PUBLIC	?nNoFlipAtTime@@3HA				; nNoFlipAtTime
PUBLIC	?nUsedFields@@3HA				; nUsedFields
PUBLIC	?Weight@@3NA					; Weight
PUBLIC	?bDoAutoFormatDetect@@3HA			; bDoAutoFormatDetect
PUBLIC	?FiftyHzFormat@@3W4eVideoFormat@@A		; FiftyHzFormat
PUBLIC	?SixtyHzFormat@@3W4eVideoFormat@@A		; SixtyHzFormat
PUBLIC	?FormatChangeThreshold@@3JA			; FormatChangeThreshold
PUBLIC	?SleepInterval@@3JA				; SleepInterval
PUBLIC	?SleepSkipFields@@3JA				; SleepSkipFields
PUBLIC	?SleepSkipFieldsLate@@3JA			; SleepSkipFieldsLate
PUBLIC	?MaxFieldShift@@3JA				; MaxFieldShift
PUBLIC	?bAlwaysSleep@@3HA				; bAlwaysSleep
PUBLIC	?bGiveUpProcDuringJT@@3HA			; bGiveUpProcDuringJT
PUBLIC	??_C@_1DO@LEOCHEAF@?$AAF?$AAa?$AAi?$AAl?$AAe?$AAd?$AA?5?$AAt?$AAo?$AA?5?$AAg?$AAe?$AAt?$AA?5?$AAT?$AAi?$AAm?$AAe?$AAr?$AA?5?$AAR?$AAe?$AAs?$AAo?$AAl?$AAu?$AAt?$AAi?$AAo?$AAn?$AA?$AA@ ; `string'
PUBLIC	??_C@_1CE@JPHMLMPE@?$AA?4?$AA?2?$AAF?$AAi?$AAe?$AAl?$AAd?$AAT?$AAi?$AAm?$AAi?$AAn?$AAg?$AA?4?$AAc?$AAp?$AAp?$AA?$AA@ ; `string'
PUBLIC	??_C@_1DM@LPJJDNJE@?$AAF?$AAa?$AAi?$AAl?$AAe?$AAd?$AA?5?$AAt?$AAo?$AA?5?$AAc?$AAr?$AAe?$AAa?$AAt?$AAe?$AA?5?$AAt?$AAi?$AAm?$AAi?$AAn?$AAg?$AA?5?$AAe?$AAv?$AAe?$AAn?$AAt?$AA?$AA@ ; `string'
PUBLIC	??_C@_1BC@EBAAOLAF@?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AA?$CF?$AAf?$AA?$AA@ ; `string'
PUBLIC	??_C@_1CI@FEDPDNKA@?$AA?5?$AAR?$AAu?$AAn?$AAn?$AAi?$AAn?$AAg?$AA?5?$AAA?$AAv?$AAe?$AAr?$AAa?$AAg?$AAe?$AA?5?$AA?$CF?$AAf?$AA?$AA@ ; `string'
PUBLIC	??_C@_1CG@GJALGNFC@?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AA?$CF?$AAf?$AA?5?$AA?$CI?$AAI?$AAG?$AAN?$AAO?$AAR?$AAE?$AAD?$AA?$CJ?$AA?$AA@ ; `string'
PUBLIC	??_C@_1DA@DOEEMFPO@?$AA?5?$AAO?$AAl?$AAd?$AA?5?$AAR?$AAu?$AAn?$AAn?$AAi?$AAn?$AAg?$AA?5?$AAA?$AAv?$AAe?$AAr?$AAa?$AAg?$AAe?$AA?5?$AA?$CF?$AAf?$AA?$AA@ ; `string'
PUBLIC	??_C@_1EM@CBGPHNCC@?$AAW?$AAe?$AAn?$AAt?$AA?5?$AAt?$AAo?$AA?5?$AA5?$AA0?$AAH?$AAz?$AA?5?$AAM?$AAo?$AAd?$AAe?$AA?5?$AA?9?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AAT?$AAe?$AAn?$AA?5?$AAC?$AAo?$AAu@ ; `string'
PUBLIC	??_C@_1EM@KFGKOIPC@?$AAW?$AAe?$AAn?$AAt?$AA?5?$AAt?$AAo?$AA?5?$AA6?$AA0?$AAH?$AAz?$AA?5?$AAM?$AAo?$AAd?$AAe?$AA?5?$AA?9?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AAT?$AAe?$AAn?$AA?5?$AAC?$AAo?$AAu@ ; `string'
PUBLIC	??_C@_1EC@OKOLENHM@?$AAG?$AAo?$AAt?$AA?5?$AAu?$AAn?$AAe?$AAx?$AAp?$AAe?$AAc?$AAt?$AAe?$AAd?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AAT?$AAe?$AAn?$AA?5?$AAC?$AAo?$AAu?$AAn?$AAt?$AA?5?$AA?$CF?$AAd@ ; `string'
PUBLIC	??_C@_1EE@OGGMBDDH@?$AA?5?$AAT?$AAo?$AAo?$AA?5?$AAl?$AAa?$AAt?$AAe?$AA?5?$AAb?$AAa?$AAc?$AAk?$AA?5?$AAf?$AAr?$AAo?$AAm?$AA?5?$AAm?$AAm?$AA?5?$AAt?$AAi?$AAm?$AAe?$AAr?$AA?5?$AA?9?$AA?5?$AA?$CF@ ; `string'
PUBLIC	?TimingSettings@@3PAUSETTING@@A			; TimingSettings
EXTRN	__imp__timeGetDevCaps@8:PROC
EXTRN	__imp__timeBeginPeriod@4:PROC
EXTRN	__imp__timeEndPeriod@4:PROC
EXTRN	__imp__timeSetEvent@20:PROC
?TimerFrequency@@3T_LARGE_INTEGER@@A DQ 01H DUP (?)	; TimerFrequency
?hTimerEvent@@3PAXA DD 01H DUP (?)			; hTimerEvent
?wTimerRes@@3IA DD 01H DUP (?)				; wTimerRes
?RunningAverageCounterTicks@@3NA DQ 01H DUP (?)		; RunningAverageCounterTicks
?StartAverageCounterTicks@@3NA DQ 01H DUP (?)		; StartAverageCounterTicks
?LastFieldTime@@3T_LARGE_INTEGER@@A DQ 01H DUP (?)	; LastFieldTime
?CurrentFieldTime@@3T_LARGE_INTEGER@@A DQ 01H DUP (?)	; CurrentFieldTime
?LastFlipTime@@3T_LARGE_INTEGER@@A DQ 01H DUP (?)	; LastFlipTime
?CurrentFlipTime@@3T_LARGE_INTEGER@@A DQ 01H DUP (?)	; CurrentFlipTime
?bIsPAL@@3HA DD	01H DUP (?)				; bIsPAL
?FlipAdjust@@3HA DD 01H DUP (?)				; FlipAdjust
?nDroppedFields@@3HA DD 01H DUP (?)			; nDroppedFields
?nNotWaitedFields@@3HA DD 01H DUP (?)			; nNotWaitedFields
?nLateFields@@3HA DD 01H DUP (?)			; nLateFields
?nNoFlipAtTime@@3HA DD 01H DUP (?)			; nNoFlipAtTime
?nUsedFields@@3HA DD 01H DUP (?)			; nUsedFields
?FiftyHzFormat@@3W4eVideoFormat@@A DD 01H DUP (?)	; FiftyHzFormat
?SleepSkipFields@@3JA DD 01H DUP (?)			; SleepSkipFields
?SleepSkipFieldsLate@@3JA DD 01H DUP (?)		; SleepSkipFieldsLate
?bAlwaysSleep@@3HA DD 01H DUP (?)			; bAlwaysSleep
?bGiveUpProcDuringJT@@3HA DD 01H DUP (?)		; bGiveUpProcDuringJT
;	COMDAT ?nSleepSkipFields@?4??Timing_SmartSleep@@YAXPAUTDeinterlaceInfo@@HAAH@Z@4HA
_BSS	SEGMENT
?nSleepSkipFields@?4??Timing_SmartSleep@@YAXPAUTDeinterlaceInfo@@HAAH@Z@4HA DD 01H DUP (?) ; `Timing_SmartSleep'::`5'::nSleepSkipFields
_BSS	ENDS
;	COMDAT ?RepeatCount@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA
_BSS	SEGMENT
?RepeatCount@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA DD 01H DUP (?) ; `Timimg_AutoFormatDetect'::`2'::RepeatCount
_BSS	ENDS
;	COMDAT ?LastTenFieldTime@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4T_LARGE_INTEGER@@A
_BSS	SEGMENT
?LastTenFieldTime@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4T_LARGE_INTEGER@@A DQ 01H DUP (?) ; `Timimg_AutoFormatDetect'::`2'::LastTenFieldTime
_BSS	ENDS
;	COMDAT ?Counted@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA
_BSS	SEGMENT
?Counted@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA DD 01H DUP (?) ; `Timimg_AutoFormatDetect'::`2'::Counted
_BSS	ENDS
;	COMDAT ?LastFrame@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA
_BSS	SEGMENT
?LastFrame@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA DD 01H DUP (?) ; `Timimg_AutoFormatDetect'::`2'::LastFrame
;	COMDAT ??_C@_0BD@MCAMHAHA@GiveUpProcDuringJT?$AA@
CONST	SEGMENT
??_C@_0BD@MCAMHAHA@GiveUpProcDuringJT?$AA@ DB 'GiveUpProcDuringJT', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_0CK@KGMFJIGH@Give?5Up?5processor?5during?5JudderT@
CONST	SEGMENT
??_C@_0CK@KGMFJIGH@Give?5Up?5processor?5during?5JudderT@ DB 'Give Up proc'
	DB	'essor during JudderTerminator', 00H		; `string'
CONST	ENDS
;	COMDAT ??_C@_0M@PPDDBKOC@AlwaysSleep?$AA@
CONST	SEGMENT
??_C@_0M@PPDDBKOC@AlwaysSleep?$AA@ DB 'AlwaysSleep', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_0BM@KLPEMKBN@Always?5sleep?5even?5when?5late?$AA@
CONST	SEGMENT
??_C@_0BM@KLPEMKBN@Always?5sleep?5even?5when?5late?$AA@ DB 'Always sleep '
	DB	'even when late', 00H			; `string'
CONST	ENDS
;	COMDAT ??_C@_0O@LGBNOFIA@MaxFieldShift?$AA@
CONST	SEGMENT
??_C@_0O@LGBNOFIA@MaxFieldShift?$AA@ DB 'MaxFieldShift', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_0DE@ONNALCGG@Maximum?5shift?5between?5received?5a@
CONST	SEGMENT
??_C@_0DE@ONNALCGG@Maximum?5shift?5between?5received?5a@ DB 'Maximum shif'
	DB	't between received and processed fields', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_0BE@IONCICOB@SleepSkipFieldsLate?$AA@
CONST	SEGMENT
??_C@_0BE@IONCICOB@SleepSkipFieldsLate?$AA@ DB 'SleepSkipFieldsLate', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_0BH@CCEPBIFF@Sleep?5Skip?5Fields?5Late?$AA@
CONST	SEGMENT
??_C@_0BH@CCEPBIFF@Sleep?5Skip?5Fields?5Late?$AA@ DB 'Sleep Skip Fields L'
	DB	'ate', 00H					; `string'
CONST	ENDS
;	COMDAT ??_C@_0BA@DNPDCIJF@SleepSkipFields?$AA@
CONST	SEGMENT
??_C@_0BA@DNPDCIJF@SleepSkipFields?$AA@ DB 'SleepSkipFields', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_0BC@BEPIFNJJ@Sleep?5Skip?5Fields?$AA@
CONST	SEGMENT
??_C@_0BC@BEPIFNJJ@Sleep?5Skip?5Fields?$AA@ DB 'Sleep Skip Fields', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_0O@DMAJALHG@SleepInterval?$AA@
CONST	SEGMENT
??_C@_0O@DMAJALHG@SleepInterval?$AA@ DB 'SleepInterval', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_0P@LJOHOLHG@Sleep?5Interval?$AA@
CONST	SEGMENT
??_C@_0P@LJOHOLHG@Sleep?5Interval?$AA@ DB 'Sleep Interval', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_0BG@PDAGGELF@FormatChangeThreshold?$AA@
CONST	SEGMENT
??_C@_0BG@PDAGGELF@FormatChangeThreshold?$AA@ DB 'FormatChangeThreshold', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_0BI@OJEPLALJ@Format?5Change?5Threshold?$AA@
CONST	SEGMENT
??_C@_0BI@OJEPLALJ@Format?5Change?5Threshold?$AA@ DB 'Format Change Thres'
	DB	'hold', 00H					; `string'
CONST	ENDS
;	COMDAT ??_C@_04EMMOPAGB@60Hz?$AA@
CONST	SEGMENT
??_C@_04EMMOPAGB@60Hz?$AA@ DB '60Hz', 00H		; `string'
CONST	ENDS
;	COMDAT ??_C@_0M@NAKDPBHJ@60Hz?5Format?$AA@
CONST	SEGMENT
??_C@_0M@NAKDPBHJ@60Hz?5Format?$AA@ DB '60Hz Format', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_04LGOIKLB@50Hz?$AA@
CONST	SEGMENT
??_C@_04LGOIKLB@50Hz?$AA@ DB '50Hz', 00H		; `string'
CONST	ENDS
;	COMDAT ??_C@_0M@KHDNCDIJ@50Hz?5Format?$AA@
CONST	SEGMENT
??_C@_0M@KHDNCDIJ@50Hz?5Format?$AA@ DB '50Hz Format', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_0BD@PGHLGLIM@DoAutoFormatDetect?$AA@
CONST	SEGMENT
??_C@_0BD@PGHLGLIM@DoAutoFormatDetect?$AA@ DB 'DoAutoFormatDetect', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_06NFILKDII@Timing?$AA@
CONST	SEGMENT
??_C@_06NFILKDII@Timing?$AA@ DB 'Timing', 00H		; `string'
CONST	ENDS
;	COMDAT ??_C@_0BD@PKJNDNFP@Auto?5Format?5Detect?$AA@
CONST	SEGMENT
??_C@_0BD@PKJNDNFP@Auto?5Format?5Detect?$AA@ DB 'Auto Format Detect', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_1EE@OGGMBDDH@?$AA?5?$AAT?$AAo?$AAo?$AA?5?$AAl?$AAa?$AAt?$AAe?$AA?5?$AAb?$AAa?$AAc?$AAk?$AA?5?$AAf?$AAr?$AAo?$AAm?$AA?5?$AAm?$AAm?$AA?5?$AAt?$AAi?$AAm?$AAe?$AAr?$AA?5?$AA?9?$AA?5?$AA?$CF@
CONST	SEGMENT
??_C@_1EE@OGGMBDDH@?$AA?5?$AAT?$AAo?$AAo?$AA?5?$AAl?$AAa?$AAt?$AAe?$AA?5?$AAb?$AAa?$AAc?$AAk?$AA?5?$AAf?$AAr?$AAo?$AAm?$AA?5?$AAm?$AAm?$AA?5?$AAt?$AAi?$AAm?$AAe?$AAr?$AA?5?$AA?9?$AA?5?$AA?$CF@ DB ' '
	DB	00H, 'T', 00H, 'o', 00H, 'o', 00H, ' ', 00H, 'l', 00H, 'a', 00H
	DB	't', 00H, 'e', 00H, ' ', 00H, 'b', 00H, 'a', 00H, 'c', 00H, 'k'
	DB	00H, ' ', 00H, 'f', 00H, 'r', 00H, 'o', 00H, 'm', 00H, ' ', 00H
	DB	'm', 00H, 'm', 00H, ' ', 00H, 't', 00H, 'i', 00H, 'm', 00H, 'e'
	DB	00H, 'r', 00H, ' ', 00H, '-', 00H, ' ', 00H, '%', 00H, 'd', 00H
	DB	00H, 00H					; `string'
CONST	ENDS
;	COMDAT ??_C@_1EC@OKOLENHM@?$AAG?$AAo?$AAt?$AA?5?$AAu?$AAn?$AAe?$AAx?$AAp?$AAe?$AAc?$AAt?$AAe?$AAd?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AAT?$AAe?$AAn?$AA?5?$AAC?$AAo?$AAu?$AAn?$AAt?$AA?5?$AA?$CF?$AAd@
CONST	SEGMENT
??_C@_1EC@OKOLENHM@?$AAG?$AAo?$AAt?$AA?5?$AAu?$AAn?$AAe?$AAx?$AAp?$AAe?$AAc?$AAt?$AAe?$AAd?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AAT?$AAe?$AAn?$AA?5?$AAC?$AAo?$AAu?$AAn?$AAt?$AA?5?$AA?$CF?$AAd@ DB 'G'
	DB	00H, 'o', 00H, 't', 00H, ' ', 00H, 'u', 00H, 'n', 00H, 'e', 00H
	DB	'x', 00H, 'p', 00H, 'e', 00H, 'c', 00H, 't', 00H, 'e', 00H, 'd'
	DB	00H, ' ', 00H, 'L', 00H, 'a', 00H, 's', 00H, 't', 00H, ' ', 00H
	DB	'T', 00H, 'e', 00H, 'n', 00H, ' ', 00H, 'C', 00H, 'o', 00H, 'u'
	DB	00H, 'n', 00H, 't', 00H, ' ', 00H, '%', 00H, 'd', 00H, 00H, 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_1EM@KFGKOIPC@?$AAW?$AAe?$AAn?$AAt?$AA?5?$AAt?$AAo?$AA?5?$AA6?$AA0?$AAH?$AAz?$AA?5?$AAM?$AAo?$AAd?$AAe?$AA?5?$AA?9?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AAT?$AAe?$AAn?$AA?5?$AAC?$AAo?$AAu@
CONST	SEGMENT
??_C@_1EM@KFGKOIPC@?$AAW?$AAe?$AAn?$AAt?$AA?5?$AAt?$AAo?$AA?5?$AA6?$AA0?$AAH?$AAz?$AA?5?$AAM?$AAo?$AAd?$AAe?$AA?5?$AA?9?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AAT?$AAe?$AAn?$AA?5?$AAC?$AAo?$AAu@ DB 'W'
	DB	00H, 'e', 00H, 'n', 00H, 't', 00H, ' ', 00H, 't', 00H, 'o', 00H
	DB	' ', 00H, '6', 00H, '0', 00H, 'H', 00H, 'z', 00H, ' ', 00H, 'M'
	DB	00H, 'o', 00H, 'd', 00H, 'e', 00H, ' ', 00H, '-', 00H, ' ', 00H
	DB	'L', 00H, 'a', 00H, 's', 00H, 't', 00H, ' ', 00H, 'T', 00H, 'e'
	DB	00H, 'n', 00H, ' ', 00H, 'C', 00H, 'o', 00H, 'u', 00H, 'n', 00H
	DB	't', 00H, ' ', 00H, '%', 00H, 'd', 00H, 00H, 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_1EM@CBGPHNCC@?$AAW?$AAe?$AAn?$AAt?$AA?5?$AAt?$AAo?$AA?5?$AA5?$AA0?$AAH?$AAz?$AA?5?$AAM?$AAo?$AAd?$AAe?$AA?5?$AA?9?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AAT?$AAe?$AAn?$AA?5?$AAC?$AAo?$AAu@
CONST	SEGMENT
??_C@_1EM@CBGPHNCC@?$AAW?$AAe?$AAn?$AAt?$AA?5?$AAt?$AAo?$AA?5?$AA5?$AA0?$AAH?$AAz?$AA?5?$AAM?$AAo?$AAd?$AAe?$AA?5?$AA?9?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AAT?$AAe?$AAn?$AA?5?$AAC?$AAo?$AAu@ DB 'W'
	DB	00H, 'e', 00H, 'n', 00H, 't', 00H, ' ', 00H, 't', 00H, 'o', 00H
	DB	' ', 00H, '5', 00H, '0', 00H, 'H', 00H, 'z', 00H, ' ', 00H, 'M'
	DB	00H, 'o', 00H, 'd', 00H, 'e', 00H, ' ', 00H, '-', 00H, ' ', 00H
	DB	'L', 00H, 'a', 00H, 's', 00H, 't', 00H, ' ', 00H, 'T', 00H, 'e'
	DB	00H, 'n', 00H, ' ', 00H, 'C', 00H, 'o', 00H, 'u', 00H, 'n', 00H
	DB	't', 00H, ' ', 00H, '%', 00H, 'd', 00H, 00H, 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_1DA@DOEEMFPO@?$AA?5?$AAO?$AAl?$AAd?$AA?5?$AAR?$AAu?$AAn?$AAn?$AAi?$AAn?$AAg?$AA?5?$AAA?$AAv?$AAe?$AAr?$AAa?$AAg?$AAe?$AA?5?$AA?$CF?$AAf?$AA?$AA@
CONST	SEGMENT
??_C@_1DA@DOEEMFPO@?$AA?5?$AAO?$AAl?$AAd?$AA?5?$AAR?$AAu?$AAn?$AAn?$AAi?$AAn?$AAg?$AA?5?$AAA?$AAv?$AAe?$AAr?$AAa?$AAg?$AAe?$AA?5?$AA?$CF?$AAf?$AA?$AA@ DB ' '
	DB	00H, 'O', 00H, 'l', 00H, 'd', 00H, ' ', 00H, 'R', 00H, 'u', 00H
	DB	'n', 00H, 'n', 00H, 'i', 00H, 'n', 00H, 'g', 00H, ' ', 00H, 'A'
	DB	00H, 'v', 00H, 'e', 00H, 'r', 00H, 'a', 00H, 'g', 00H, 'e', 00H
	DB	' ', 00H, '%', 00H, 'f', 00H, 00H, 00H	; `string'
CONST	ENDS
;	COMDAT ??_C@_1CG@GJALGNFC@?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AA?$CF?$AAf?$AA?5?$AA?$CI?$AAI?$AAG?$AAN?$AAO?$AAR?$AAE?$AAD?$AA?$CJ?$AA?$AA@
CONST	SEGMENT
??_C@_1CG@GJALGNFC@?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AA?$CF?$AAf?$AA?5?$AA?$CI?$AAI?$AAG?$AAN?$AAO?$AAR?$AAE?$AAD?$AA?$CJ?$AA?$AA@ DB ' '
	DB	00H, 'L', 00H, 'a', 00H, 's', 00H, 't', 00H, ' ', 00H, '%', 00H
	DB	'f', 00H, ' ', 00H, '(', 00H, 'I', 00H, 'G', 00H, 'N', 00H, 'O'
	DB	00H, 'R', 00H, 'E', 00H, 'D', 00H, ')', 00H, 00H, 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_1CI@FEDPDNKA@?$AA?5?$AAR?$AAu?$AAn?$AAn?$AAi?$AAn?$AAg?$AA?5?$AAA?$AAv?$AAe?$AAr?$AAa?$AAg?$AAe?$AA?5?$AA?$CF?$AAf?$AA?$AA@
CONST	SEGMENT
??_C@_1CI@FEDPDNKA@?$AA?5?$AAR?$AAu?$AAn?$AAn?$AAi?$AAn?$AAg?$AA?5?$AAA?$AAv?$AAe?$AAr?$AAa?$AAg?$AAe?$AA?5?$AA?$CF?$AAf?$AA?$AA@ DB ' '
	DB	00H, 'R', 00H, 'u', 00H, 'n', 00H, 'n', 00H, 'i', 00H, 'n', 00H
	DB	'g', 00H, ' ', 00H, 'A', 00H, 'v', 00H, 'e', 00H, 'r', 00H, 'a'
	DB	00H, 'g', 00H, 'e', 00H, ' ', 00H, '%', 00H, 'f', 00H, 00H, 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_1BC@EBAAOLAF@?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AA?$CF?$AAf?$AA?$AA@
CONST	SEGMENT
??_C@_1BC@EBAAOLAF@?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AA?$CF?$AAf?$AA?$AA@ DB ' '
	DB	00H, 'L', 00H, 'a', 00H, 's', 00H, 't', 00H, ' ', 00H, '%', 00H
	DB	'f', 00H, 00H, 00H				; `string'
CONST	ENDS
;	COMDAT ??_C@_1DM@LPJJDNJE@?$AAF?$AAa?$AAi?$AAl?$AAe?$AAd?$AA?5?$AAt?$AAo?$AA?5?$AAc?$AAr?$AAe?$AAa?$AAt?$AAe?$AA?5?$AAt?$AAi?$AAm?$AAi?$AAn?$AAg?$AA?5?$AAe?$AAv?$AAe?$AAn?$AAt?$AA?$AA@
CONST	SEGMENT
??_C@_1DM@LPJJDNJE@?$AAF?$AAa?$AAi?$AAl?$AAe?$AAd?$AA?5?$AAt?$AAo?$AA?5?$AAc?$AAr?$AAe?$AAa?$AAt?$AAe?$AA?5?$AAt?$AAi?$AAm?$AAi?$AAn?$AAg?$AA?5?$AAe?$AAv?$AAe?$AAn?$AAt?$AA?$AA@ DB 'F'
	DB	00H, 'a', 00H, 'i', 00H, 'l', 00H, 'e', 00H, 'd', 00H, ' ', 00H
	DB	't', 00H, 'o', 00H, ' ', 00H, 'c', 00H, 'r', 00H, 'e', 00H, 'a'
	DB	00H, 't', 00H, 'e', 00H, ' ', 00H, 't', 00H, 'i', 00H, 'm', 00H
	DB	'i', 00H, 'n', 00H, 'g', 00H, ' ', 00H, 'e', 00H, 'v', 00H, 'e'
	DB	00H, 'n', 00H, 't', 00H, 00H, 00H		; `string'
CONST	ENDS
;	COMDAT ??_C@_1CE@JPHMLMPE@?$AA?4?$AA?2?$AAF?$AAi?$AAe?$AAl?$AAd?$AAT?$AAi?$AAm?$AAi?$AAn?$AAg?$AA?4?$AAc?$AAp?$AAp?$AA?$AA@
CONST	SEGMENT
??_C@_1CE@JPHMLMPE@?$AA?4?$AA?2?$AAF?$AAi?$AAe?$AAl?$AAd?$AAT?$AAi?$AAm?$AAi?$AAn?$AAg?$AA?4?$AAc?$AAp?$AAp?$AA?$AA@ DB '.'
	DB	00H, '\', 00H, 'F', 00H, 'i', 00H, 'e', 00H, 'l', 00H, 'd', 00H
	DB	'T', 00H, 'i', 00H, 'm', 00H, 'i', 00H, 'n', 00H, 'g', 00H, '.'
	DB	00H, 'c', 00H, 'p', 00H, 'p', 00H, 00H, 00H	; `string'
CONST	ENDS
;	COMDAT ??_C@_1DO@LEOCHEAF@?$AAF?$AAa?$AAi?$AAl?$AAe?$AAd?$AA?5?$AAt?$AAo?$AA?5?$AAg?$AAe?$AAt?$AA?5?$AAT?$AAi?$AAm?$AAe?$AAr?$AA?5?$AAR?$AAe?$AAs?$AAo?$AAl?$AAu?$AAt?$AAi?$AAo?$AAn?$AA?$AA@
CONST	SEGMENT
??_C@_1DO@LEOCHEAF@?$AAF?$AAa?$AAi?$AAl?$AAe?$AAd?$AA?5?$AAt?$AAo?$AA?5?$AAg?$AAe?$AAt?$AA?5?$AAT?$AAi?$AAm?$AAe?$AAr?$AA?5?$AAR?$AAe?$AAs?$AAo?$AAl?$AAu?$AAt?$AAi?$AAo?$AAn?$AA?$AA@ DB 'F'
	DB	00H, 'a', 00H, 'i', 00H, 'l', 00H, 'e', 00H, 'd', 00H, ' ', 00H
	DB	't', 00H, 'o', 00H, ' ', 00H, 'g', 00H, 'e', 00H, 't', 00H, ' '
	DB	00H, 'T', 00H, 'i', 00H, 'm', 00H, 'e', 00H, 'r', 00H, ' ', 00H
	DB	'R', 00H, 'e', 00H, 's', 00H, 'o', 00H, 'l', 00H, 'u', 00H, 't'
	DB	00H, 'i', 00H, 'o', 00H, 'n', 00H, 00H, 00H	; `string'
?Weight@@3NA DQ	03f747ae147ae147br		; 0.005	; Weight
?bDoAutoFormatDetect@@3HA DD 01H			; bDoAutoFormatDetect
?SixtyHzFormat@@3W4eVideoFormat@@A DD 011H		; SixtyHzFormat
?FormatChangeThreshold@@3JA DD 02H			; FormatChangeThreshold
?SleepInterval@@3JA DD 01H				; SleepInterval
?MaxFieldShift@@3JA DD 01H				; MaxFieldShift
?TimingSettings@@3PAUSETTING@@A DD FLAT:??_C@_0BD@PKJNDNFP@Auto?5Format?5Detect?$AA@ ; TimingSettings
	DD	01H
	DD	00H
	DD	FLAT:?bDoAutoFormatDetect@@3HA
	DD	00H
	DD	00H
	DD	01H
	DD	01H
	DD	01H
	DD	00H
	DD	FLAT:??_C@_06NFILKDII@Timing?$AA@
	DD	FLAT:??_C@_0BD@PGHLGLIM@DoAutoFormatDetect?$AA@
	DD	00H
	DD	FLAT:??_C@_0M@KHDNCDIJ@50Hz?5Format?$AA@
	DD	03H
	DD	00H
	DD	FLAT:?FiftyHzFormat@@3W4eVideoFormat@@A
	DD	00H
	DD	00H
	DD	019H
	DD	01H
	DD	01H
	DD	FLAT:?VideoFormatNames@@3PAPBDA
	DD	FLAT:??_C@_06NFILKDII@Timing?$AA@
	DD	FLAT:??_C@_04LGOIKLB@50Hz?$AA@
	DD	00H
	DD	FLAT:??_C@_0M@NAKDPBHJ@60Hz?5Format?$AA@
	DD	03H
	DD	00H
	DD	FLAT:?SixtyHzFormat@@3W4eVideoFormat@@A
	DD	011H
	DD	00H
	DD	019H
	DD	01H
	DD	01H
	DD	FLAT:?VideoFormatNames@@3PAPBDA
	DD	FLAT:??_C@_06NFILKDII@Timing?$AA@
	DD	FLAT:??_C@_04EMMOPAGB@60Hz?$AA@
	DD	00H
	DD	FLAT:??_C@_0BI@OJEPLALJ@Format?5Change?5Threshold?$AA@
	DD	04H
	DD	00H
	DD	FLAT:?FormatChangeThreshold@@3JA
	DD	02H
	DD	00H
	DD	032H
	DD	01H
	DD	01H
	DD	00H
	DD	FLAT:??_C@_06NFILKDII@Timing?$AA@
	DD	FLAT:??_C@_0BG@PDAGGELF@FormatChangeThreshold?$AA@
	DD	00H
	DD	FLAT:??_C@_0P@LJOHOLHG@Sleep?5Interval?$AA@
	DD	04H
	DD	00H
	DD	FLAT:?SleepInterval@@3JA
	DD	01H
	DD	00H
	DD	064H
	DD	01H
	DD	01H
	DD	00H
	DD	FLAT:??_C@_07CMIGFCHA@Threads?$AA@
	DD	FLAT:??_C@_0O@DMAJALHG@SleepInterval?$AA@
	DD	00H
	DD	FLAT:??_C@_0BC@BEPIFNJJ@Sleep?5Skip?5Fields?$AA@
	DD	04H
	DD	00H
	DD	FLAT:?SleepSkipFields@@3JA
	DD	00H
	DD	00H
	DD	03cH
	DD	01H
	DD	01H
	DD	00H
	DD	FLAT:??_C@_07CMIGFCHA@Threads?$AA@
	DD	FLAT:??_C@_0BA@DNPDCIJF@SleepSkipFields?$AA@
	DD	00H
	DD	FLAT:??_C@_0BH@CCEPBIFF@Sleep?5Skip?5Fields?5Late?$AA@
	DD	04H
	DD	00H
	DD	FLAT:?SleepSkipFieldsLate@@3JA
	DD	00H
	DD	00H
	DD	03cH
	DD	01H
	DD	01H
	DD	00H
	DD	FLAT:??_C@_07CMIGFCHA@Threads?$AA@
	DD	FLAT:??_C@_0BE@IONCICOB@SleepSkipFieldsLate?$AA@
	DD	00H
	DD	FLAT:??_C@_0DE@ONNALCGG@Maximum?5shift?5between?5received?5a@
	DD	04H
	DD	00H
	DD	FLAT:?MaxFieldShift@@3JA
	DD	01H
	DD	00H
	DD	02H
	DD	01H
	DD	01H
	DD	00H
	DD	FLAT:??_C@_07CMIGFCHA@Threads?$AA@
	DD	FLAT:??_C@_0O@LGBNOFIA@MaxFieldShift?$AA@
	DD	00H
	DD	FLAT:??_C@_0BM@KLPEMKBN@Always?5sleep?5even?5when?5late?$AA@
	DD	01H
	DD	00H
	DD	FLAT:?bAlwaysSleep@@3HA
	DD	00H
	DD	00H
	DD	01H
	DD	01H
	DD	01H
	DD	00H
	DD	FLAT:??_C@_06NFILKDII@Timing?$AA@
	DD	FLAT:??_C@_0M@PPDDBKOC@AlwaysSleep?$AA@
	DD	00H
	DD	FLAT:??_C@_0CK@KGMFJIGH@Give?5Up?5processor?5during?5JudderT@
	DD	01H
	DD	00H
	DD	FLAT:?bGiveUpProcDuringJT@@3HA
	DD	00H
	DD	00H
	DD	01H
	DD	01H
	DD	01H
	DD	00H
	DD	FLAT:??_C@_06NFILKDII@Timing?$AA@
	DD	FLAT:??_C@_0BD@MCAMHAHA@GiveUpProcDuringJT?$AA@
	DD	00H
PUBLIC	?Timing_SetMenu@@YAXPAUHMENU__@@@Z		; Timing_SetMenu
; Function compile flags: /Odtp
; File c:\develop\dscaler423a\dscaler\fieldtiming.cpp
;	COMDAT ?Timing_SetMenu@@YAXPAUHMENU__@@@Z
_TEXT	SEGMENT
_hMenu$ = 8						; size = 4
?Timing_SetMenu@@YAXPAUHMENU__@@@Z PROC			; Timing_SetMenu, COMDAT

; 522  : {

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

; 523  :     CheckMenuItemBool(hMenu, IDM_AUTO_FORMAT, bDoAutoFormatDetect);

  00003	a1 00 00 00 00	 mov	 eax, DWORD PTR ?bDoAutoFormatDetect@@3HA ; bDoAutoFormatDetect
  00008	f7 d8		 neg	 eax
  0000a	1b c0		 sbb	 eax, eax
  0000c	83 e0 08	 and	 eax, 8
  0000f	50		 push	 eax
  00010	68 df 07 00 00	 push	 2015			; 000007dfH
  00015	8b 4d 08	 mov	 ecx, DWORD PTR _hMenu$[ebp]
  00018	51		 push	 ecx
  00019	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__CheckMenuItem@12

; 524  : }

  0001f	5d		 pop	 ebp
  00020	c3		 ret	 0
?Timing_SetMenu@@YAXPAUHMENU__@@@Z ENDP			; Timing_SetMenu
_TEXT	ENDS
PUBLIC	?Timing_GetSetting@@YAPAUSETTING@@W4TIMING_SETTING@@@Z ; Timing_GetSetting
; Function compile flags: /Odtp
;	COMDAT ?Timing_GetSetting@@YAPAUSETTING@@W4TIMING_SETTING@@@Z
_TEXT	SEGMENT
_Setting$ = 8						; size = 4
?Timing_GetSetting@@YAPAUSETTING@@W4TIMING_SETTING@@@Z PROC ; Timing_GetSetting, COMDAT

; 510  : {

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

; 511  :     if(Setting > -1 && Setting < TIMING_SETTING_LASTONE)

  00003	83 7d 08 ff	 cmp	 DWORD PTR _Setting$[ebp], -1
  00007	7e 15		 jle	 SHORT $LN2@Timing_Get
  00009	83 7d 08 0a	 cmp	 DWORD PTR _Setting$[ebp], 10 ; 0000000aH
  0000d	7d 0f		 jge	 SHORT $LN2@Timing_Get

; 512  :     {
; 513  :         return &(TimingSettings[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 ?TimingSettings@@3PAUSETTING@@A ; TimingSettings
  0001a	eb 04		 jmp	 SHORT $LN3@Timing_Get

; 514  :     }
; 515  :     else

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

; 516  :     {
; 517  :         return NULL;

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

; 518  :     }
; 519  : }

  00020	5d		 pop	 ebp
  00021	c3		 ret	 0
?Timing_GetSetting@@YAPAUSETTING@@W4TIMING_SETTING@@@Z ENDP ; Timing_GetSetting
_TEXT	ENDS
PUBLIC	?Timing_SetFlipAdjustFlag@@YAXH@Z		; Timing_SetFlipAdjustFlag
; Function compile flags: /Odtp
;	COMDAT ?Timing_SetFlipAdjustFlag@@YAXH@Z
_TEXT	SEGMENT
_NewValue$ = 8						; size = 4
?Timing_SetFlipAdjustFlag@@YAXH@Z PROC			; Timing_SetFlipAdjustFlag, COMDAT

; 438  : {

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

; 439  :     FlipAdjust = NewValue;

  00003	8b 45 08	 mov	 eax, DWORD PTR _NewValue$[ebp]
  00006	a3 00 00 00 00	 mov	 DWORD PTR ?FlipAdjust@@3HA, eax ; FlipAdjust

; 440  : }

  0000b	5d		 pop	 ebp
  0000c	c3		 ret	 0
?Timing_SetFlipAdjustFlag@@YAXH@Z ENDP			; Timing_SetFlipAdjustFlag
_TEXT	ENDS
PUBLIC	?Timing_IncrementNoFlipAtTime@@YAXXZ		; Timing_IncrementNoFlipAtTime
; Function compile flags: /Odtp
;	COMDAT ?Timing_IncrementNoFlipAtTime@@YAXXZ
_TEXT	SEGMENT
?Timing_IncrementNoFlipAtTime@@YAXXZ PROC		; Timing_IncrementNoFlipAtTime, COMDAT

; 433  : {

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

; 434  :     ++nNoFlipAtTime;

  00003	a1 00 00 00 00	 mov	 eax, DWORD PTR ?nNoFlipAtTime@@3HA ; nNoFlipAtTime
  00008	83 c0 01	 add	 eax, 1
  0000b	a3 00 00 00 00	 mov	 DWORD PTR ?nNoFlipAtTime@@3HA, eax ; nNoFlipAtTime

; 435  : }

  00010	5d		 pop	 ebp
  00011	c3		 ret	 0
?Timing_IncrementNoFlipAtTime@@YAXXZ ENDP		; Timing_IncrementNoFlipAtTime
_TEXT	ENDS
PUBLIC	?Timing_AddLateFields@@YAXH@Z			; Timing_AddLateFields
; Function compile flags: /Odtp
;	COMDAT ?Timing_AddLateFields@@YAXH@Z
_TEXT	SEGMENT
_nLate$ = 8						; size = 4
?Timing_AddLateFields@@YAXH@Z PROC			; Timing_AddLateFields, COMDAT

; 428  : {

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

; 429  :     nLateFields += nLate;

  00003	a1 00 00 00 00	 mov	 eax, DWORD PTR ?nLateFields@@3HA ; nLateFields
  00008	03 45 08	 add	 eax, DWORD PTR _nLate$[ebp]
  0000b	a3 00 00 00 00	 mov	 DWORD PTR ?nLateFields@@3HA, eax ; nLateFields

; 430  : }

  00010	5d		 pop	 ebp
  00011	c3		 ret	 0
?Timing_AddLateFields@@YAXH@Z ENDP			; Timing_AddLateFields
_TEXT	ENDS
PUBLIC	?Timing_IncrementNotWaitedFields@@YAXXZ		; Timing_IncrementNotWaitedFields
; Function compile flags: /Odtp
;	COMDAT ?Timing_IncrementNotWaitedFields@@YAXXZ
_TEXT	SEGMENT
?Timing_IncrementNotWaitedFields@@YAXXZ PROC		; Timing_IncrementNotWaitedFields, COMDAT

; 423  : {

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

; 424  :     ++nNotWaitedFields;

  00003	a1 00 00 00 00	 mov	 eax, DWORD PTR ?nNotWaitedFields@@3HA ; nNotWaitedFields
  00008	83 c0 01	 add	 eax, 1
  0000b	a3 00 00 00 00	 mov	 DWORD PTR ?nNotWaitedFields@@3HA, eax ; nNotWaitedFields

; 425  : }

  00010	5d		 pop	 ebp
  00011	c3		 ret	 0
?Timing_IncrementNotWaitedFields@@YAXXZ ENDP		; Timing_IncrementNotWaitedFields
_TEXT	ENDS
PUBLIC	?Timing_AddDroppedFields@@YAXH@Z		; Timing_AddDroppedFields
; Function compile flags: /Odtp
;	COMDAT ?Timing_AddDroppedFields@@YAXH@Z
_TEXT	SEGMENT
_nDropped$ = 8						; size = 4
?Timing_AddDroppedFields@@YAXH@Z PROC			; Timing_AddDroppedFields, COMDAT

; 418  : {

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

; 419  :     nDroppedFields += nDropped;

  00003	a1 00 00 00 00	 mov	 eax, DWORD PTR ?nDroppedFields@@3HA ; nDroppedFields
  00008	03 45 08	 add	 eax, DWORD PTR _nDropped$[ebp]
  0000b	a3 00 00 00 00	 mov	 DWORD PTR ?nDroppedFields@@3HA, eax ; nDroppedFields

; 420  : }

  00010	5d		 pop	 ebp
  00011	c3		 ret	 0
?Timing_AddDroppedFields@@YAXH@Z ENDP			; Timing_AddDroppedFields
_TEXT	ENDS
PUBLIC	?Timing_IncrementUsedFields@@YAXXZ		; Timing_IncrementUsedFields
; Function compile flags: /Odtp
;	COMDAT ?Timing_IncrementUsedFields@@YAXXZ
_TEXT	SEGMENT
?Timing_IncrementUsedFields@@YAXXZ PROC			; Timing_IncrementUsedFields, COMDAT

; 413  : {

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

; 414  :     ++nUsedFields;

  00003	a1 00 00 00 00	 mov	 eax, DWORD PTR ?nUsedFields@@3HA ; nUsedFields
  00008	83 c0 01	 add	 eax, 1
  0000b	a3 00 00 00 00	 mov	 DWORD PTR ?nUsedFields@@3HA, eax ; nUsedFields

; 415  : }

  00010	5d		 pop	 ebp
  00011	c3		 ret	 0
?Timing_IncrementUsedFields@@YAXXZ ENDP			; Timing_IncrementUsedFields
_TEXT	ENDS
PUBLIC	?Timing_ResetNoFlipAtTime@@YAXXZ		; Timing_ResetNoFlipAtTime
; Function compile flags: /Odtp
;	COMDAT ?Timing_ResetNoFlipAtTime@@YAXXZ
_TEXT	SEGMENT
?Timing_ResetNoFlipAtTime@@YAXXZ PROC			; Timing_ResetNoFlipAtTime, COMDAT

; 408  : {

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

; 409  :     nNoFlipAtTime = 0;

  00003	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?nNoFlipAtTime@@3HA, 0 ; nNoFlipAtTime

; 410  : }

  0000d	5d		 pop	 ebp
  0000e	c3		 ret	 0
?Timing_ResetNoFlipAtTime@@YAXXZ ENDP			; Timing_ResetNoFlipAtTime
_TEXT	ENDS
PUBLIC	?Timing_GetNoFlipAtTime@@YAHXZ			; Timing_GetNoFlipAtTime
; Function compile flags: /Odtp
;	COMDAT ?Timing_GetNoFlipAtTime@@YAHXZ
_TEXT	SEGMENT
?Timing_GetNoFlipAtTime@@YAHXZ PROC			; Timing_GetNoFlipAtTime, COMDAT

; 403  : {

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

; 404  :     return nNoFlipAtTime;

  00003	a1 00 00 00 00	 mov	 eax, DWORD PTR ?nNoFlipAtTime@@3HA ; nNoFlipAtTime

; 405  : }

  00008	5d		 pop	 ebp
  00009	c3		 ret	 0
?Timing_GetNoFlipAtTime@@YAHXZ ENDP			; Timing_GetNoFlipAtTime
_TEXT	ENDS
PUBLIC	?Timing_ResetUsedFields@@YAXXZ			; Timing_ResetUsedFields
; Function compile flags: /Odtp
;	COMDAT ?Timing_ResetUsedFields@@YAXXZ
_TEXT	SEGMENT
?Timing_ResetUsedFields@@YAXXZ PROC			; Timing_ResetUsedFields, COMDAT

; 398  : {

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

; 399  :     nUsedFields = 0;

  00003	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?nUsedFields@@3HA, 0 ; nUsedFields

; 400  : }

  0000d	5d		 pop	 ebp
  0000e	c3		 ret	 0
?Timing_ResetUsedFields@@YAXXZ ENDP			; Timing_ResetUsedFields
_TEXT	ENDS
PUBLIC	?Timing_GetUsedFields@@YAHXZ			; Timing_GetUsedFields
; Function compile flags: /Odtp
;	COMDAT ?Timing_GetUsedFields@@YAHXZ
_TEXT	SEGMENT
?Timing_GetUsedFields@@YAHXZ PROC			; Timing_GetUsedFields, COMDAT

; 393  : {

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

; 394  :     return nUsedFields;

  00003	a1 00 00 00 00	 mov	 eax, DWORD PTR ?nUsedFields@@3HA ; nUsedFields

; 395  : }

  00008	5d		 pop	 ebp
  00009	c3		 ret	 0
?Timing_GetUsedFields@@YAHXZ ENDP			; Timing_GetUsedFields
_TEXT	ENDS
PUBLIC	?Timing_ResetLateFields@@YAXXZ			; Timing_ResetLateFields
; Function compile flags: /Odtp
;	COMDAT ?Timing_ResetLateFields@@YAXXZ
_TEXT	SEGMENT
?Timing_ResetLateFields@@YAXXZ PROC			; Timing_ResetLateFields, COMDAT

; 388  : {

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

; 389  :     nLateFields = 0;

  00003	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?nLateFields@@3HA, 0 ; nLateFields

; 390  : }

  0000d	5d		 pop	 ebp
  0000e	c3		 ret	 0
?Timing_ResetLateFields@@YAXXZ ENDP			; Timing_ResetLateFields
_TEXT	ENDS
PUBLIC	?Timing_GetLateFields@@YAHXZ			; Timing_GetLateFields
; Function compile flags: /Odtp
;	COMDAT ?Timing_GetLateFields@@YAHXZ
_TEXT	SEGMENT
?Timing_GetLateFields@@YAHXZ PROC			; Timing_GetLateFields, COMDAT

; 383  : {

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

; 384  :     return nLateFields;

  00003	a1 00 00 00 00	 mov	 eax, DWORD PTR ?nLateFields@@3HA ; nLateFields

; 385  : }

  00008	5d		 pop	 ebp
  00009	c3		 ret	 0
?Timing_GetLateFields@@YAHXZ ENDP			; Timing_GetLateFields
_TEXT	ENDS
PUBLIC	?Timing_ResetNotWaitedFields@@YAXXZ		; Timing_ResetNotWaitedFields
; Function compile flags: /Odtp
;	COMDAT ?Timing_ResetNotWaitedFields@@YAXXZ
_TEXT	SEGMENT
?Timing_ResetNotWaitedFields@@YAXXZ PROC		; Timing_ResetNotWaitedFields, COMDAT

; 378  : {

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

; 379  :     nNotWaitedFields = 0;

  00003	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?nNotWaitedFields@@3HA, 0 ; nNotWaitedFields

; 380  : }

  0000d	5d		 pop	 ebp
  0000e	c3		 ret	 0
?Timing_ResetNotWaitedFields@@YAXXZ ENDP		; Timing_ResetNotWaitedFields
_TEXT	ENDS
PUBLIC	?Timing_GetNotWaitedFields@@YAHXZ		; Timing_GetNotWaitedFields
; Function compile flags: /Odtp
;	COMDAT ?Timing_GetNotWaitedFields@@YAHXZ
_TEXT	SEGMENT
?Timing_GetNotWaitedFields@@YAHXZ PROC			; Timing_GetNotWaitedFields, COMDAT

; 373  : {

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

; 374  :     return nNotWaitedFields;

  00003	a1 00 00 00 00	 mov	 eax, DWORD PTR ?nNotWaitedFields@@3HA ; nNotWaitedFields

; 375  : }

  00008	5d		 pop	 ebp
  00009	c3		 ret	 0
?Timing_GetNotWaitedFields@@YAHXZ ENDP			; Timing_GetNotWaitedFields
_TEXT	ENDS
PUBLIC	?Timing_ResetDroppedFields@@YAXXZ		; Timing_ResetDroppedFields
; Function compile flags: /Odtp
;	COMDAT ?Timing_ResetDroppedFields@@YAXXZ
_TEXT	SEGMENT
?Timing_ResetDroppedFields@@YAXXZ PROC			; Timing_ResetDroppedFields, COMDAT

; 368  : {

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

; 369  :     nDroppedFields = 0;

  00003	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?nDroppedFields@@3HA, 0 ; nDroppedFields

; 370  : }

  0000d	5d		 pop	 ebp
  0000e	c3		 ret	 0
?Timing_ResetDroppedFields@@YAXXZ ENDP			; Timing_ResetDroppedFields
_TEXT	ENDS
PUBLIC	?Timing_GetDroppedFields@@YAHXZ			; Timing_GetDroppedFields
; Function compile flags: /Odtp
;	COMDAT ?Timing_GetDroppedFields@@YAHXZ
_TEXT	SEGMENT
?Timing_GetDroppedFields@@YAHXZ PROC			; Timing_GetDroppedFields, COMDAT

; 363  : {

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

; 364  :     return nDroppedFields;

  00003	a1 00 00 00 00	 mov	 eax, DWORD PTR ?nDroppedFields@@3HA ; nDroppedFields

; 365  : }

  00008	5d		 pop	 ebp
  00009	c3		 ret	 0
?Timing_GetDroppedFields@@YAHXZ ENDP			; Timing_GetDroppedFields
_TEXT	ENDS
PUBLIC	?Timing_Reset@@YAXXZ				; Timing_Reset
; Function compile flags: /Odtp
;	COMDAT ?Timing_Reset@@YAXXZ
_TEXT	SEGMENT
?Timing_Reset@@YAXXZ PROC				; Timing_Reset, COMDAT

; 276  : {

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

; 277  :     LastFieldTime.QuadPart = 0;

  00003	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?LastFieldTime@@3T_LARGE_INTEGER@@A, 0
  0000d	c7 05 04 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?LastFieldTime@@3T_LARGE_INTEGER@@A+4, 0

; 278  :     CurrentFieldTime.QuadPart = 0;

  00017	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?CurrentFieldTime@@3T_LARGE_INTEGER@@A, 0
  00021	c7 05 04 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?CurrentFieldTime@@3T_LARGE_INTEGER@@A+4, 0

; 279  :     LastFlipTime.QuadPart = 0;

  0002b	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?LastFlipTime@@3T_LARGE_INTEGER@@A, 0
  00035	c7 05 04 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?LastFlipTime@@3T_LARGE_INTEGER@@A+4, 0

; 280  :     CurrentFlipTime.QuadPart = 0;

  0003f	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?CurrentFlipTime@@3T_LARGE_INTEGER@@A, 0
  00049	c7 05 04 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?CurrentFlipTime@@3T_LARGE_INTEGER@@A+4, 0

; 281  : }

  00053	5d		 pop	 ebp
  00054	c3		 ret	 0
?Timing_Reset@@YAXXZ ENDP				; Timing_Reset
_TEXT	ENDS
PUBLIC	?Timing_SmartSleep@@YAXPAUTDeinterlaceInfo@@HAAH@Z ; Timing_SmartSleep
; Function compile flags: /Odtp
;	COMDAT ?Timing_SmartSleep@@YAXPAUTDeinterlaceInfo@@HAAH@Z
_TEXT	SEGMENT
_pInfo$ = 8						; size = 4
_bRunningLate$ = 12					; size = 4
_bSleptAlready$ = 16					; size = 4
?Timing_SmartSleep@@YAXPAUTDeinterlaceInfo@@HAAH@Z PROC	; Timing_SmartSleep, COMDAT

; 158  : {

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

; 159  :     if(bSleptAlready == FALSE || SleepSkipFields == 0)

  00003	8b 45 10	 mov	 eax, DWORD PTR _bSleptAlready$[ebp]
  00006	83 38 00	 cmp	 DWORD PTR [eax], 0
  00009	74 09		 je	 SHORT $LN3@Timing_Sma
  0000b	83 3d 00 00 00
	00 00		 cmp	 DWORD PTR ?SleepSkipFields@@3JA, 0 ; SleepSkipFields
  00012	75 6e		 jne	 SHORT $LN4@Timing_Sma
$LN3@Timing_Sma:

; 160  :     {
; 161  :         static int nSleepSkipFields = 0;
; 162  :         // Sleep less often if we're running late.
; 163  : 
; 164  :         // Increment sleep skipping counter, so we can sleep only every X fields specified by SleepSkipField
; 165  :         if (bRunningLate)

  00014	83 7d 0c 00	 cmp	 DWORD PTR _bRunningLate$[ebp], 0
  00018	74 35		 je	 SHORT $LN2@Timing_Sma

; 166  :         {
; 167  :             // Sleep skipping whenever we're running late
; 168  :             ++nSleepSkipFields;

  0001a	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?nSleepSkipFields@?4??Timing_SmartSleep@@YAXPAUTDeinterlaceInfo@@HAAH@Z@4HA
  00020	83 c1 01	 add	 ecx, 1
  00023	89 0d 00 00 00
	00		 mov	 DWORD PTR ?nSleepSkipFields@?4??Timing_SmartSleep@@YAXPAUTDeinterlaceInfo@@HAAH@Z@4HA, ecx

; 169  :             Sleep((nSleepSkipFields % (SleepSkipFieldsLate + 1)) ? 0 : SleepInterval);

  00029	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?SleepSkipFieldsLate@@3JA ; SleepSkipFieldsLate
  0002f	83 c1 01	 add	 ecx, 1
  00032	a1 00 00 00 00	 mov	 eax, DWORD PTR ?nSleepSkipFields@?4??Timing_SmartSleep@@YAXPAUTDeinterlaceInfo@@HAAH@Z@4HA
  00037	99		 cdq
  00038	f7 f9		 idiv	 ecx
  0003a	f7 da		 neg	 edx
  0003c	1b d2		 sbb	 edx, edx
  0003e	f7 d2		 not	 edx
  00040	23 15 00 00 00
	00		 and	 edx, DWORD PTR ?SleepInterval@@3JA ; SleepInterval
  00046	52		 push	 edx
  00047	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__Sleep@4

; 170  :         }
; 171  :         else

  0004d	eb 33		 jmp	 SHORT $LN4@Timing_Sma
$LN2@Timing_Sma:

; 172  :         {
; 173  :             // Sleep skipping whenever we're running on time
; 174  :             ++nSleepSkipFields;

  0004f	8b 15 00 00 00
	00		 mov	 edx, DWORD PTR ?nSleepSkipFields@?4??Timing_SmartSleep@@YAXPAUTDeinterlaceInfo@@HAAH@Z@4HA
  00055	83 c2 01	 add	 edx, 1
  00058	89 15 00 00 00
	00		 mov	 DWORD PTR ?nSleepSkipFields@?4??Timing_SmartSleep@@YAXPAUTDeinterlaceInfo@@HAAH@Z@4HA, edx

; 175  :             Sleep((nSleepSkipFields % (SleepSkipFields + 1)) ? 0 : SleepInterval);

  0005e	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?SleepSkipFields@@3JA ; SleepSkipFields
  00064	83 c1 01	 add	 ecx, 1
  00067	a1 00 00 00 00	 mov	 eax, DWORD PTR ?nSleepSkipFields@?4??Timing_SmartSleep@@YAXPAUTDeinterlaceInfo@@HAAH@Z@4HA
  0006c	99		 cdq
  0006d	f7 f9		 idiv	 ecx
  0006f	f7 da		 neg	 edx
  00071	1b d2		 sbb	 edx, edx
  00073	f7 d2		 not	 edx
  00075	23 15 00 00 00
	00		 and	 edx, DWORD PTR ?SleepInterval@@3JA ; SleepInterval
  0007b	52		 push	 edx
  0007c	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__Sleep@4
$LN4@Timing_Sma:

; 176  :         }
; 177  :     }
; 178  :     bSleptAlready = TRUE;

  00082	8b 55 10	 mov	 edx, DWORD PTR _bSleptAlready$[ebp]
  00085	c7 02 01 00 00
	00		 mov	 DWORD PTR [edx], 1

; 179  : }

  0008b	5d		 pop	 ebp
  0008c	c3		 ret	 0
?Timing_SmartSleep@@YAXPAUTDeinterlaceInfo@@HAAH@Z ENDP	; Timing_SmartSleep
_TEXT	ENDS
PUBLIC	?Timing_CleanUp@@YAXXZ				; Timing_CleanUp
; Function compile flags: /Odtp
;	COMDAT ?Timing_CleanUp@@YAXXZ
_TEXT	SEGMENT
?Timing_CleanUp@@YAXXZ PROC				; Timing_CleanUp, COMDAT

; 100  : {

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

; 101  :     if(hTimerEvent != NULL)

  00003	83 3d 00 00 00
	00 00		 cmp	 DWORD PTR ?hTimerEvent@@3PAXA, 0 ; hTimerEvent
  0000a	74 16		 je	 SHORT $LN1@Timing_Cle

; 102  :     {
; 103  :         CloseHandle(hTimerEvent);

  0000c	a1 00 00 00 00	 mov	 eax, DWORD PTR ?hTimerEvent@@3PAXA ; hTimerEvent
  00011	50		 push	 eax
  00012	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__CloseHandle@4

; 104  :         hTimerEvent = NULL;

  00018	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?hTimerEvent@@3PAXA, 0 ; hTimerEvent
$LN1@Timing_Cle:

; 105  :     }
; 106  : 
; 107  :     // reset the timer resolution
; 108  :     timeEndPeriod(wTimerRes);

  00022	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?wTimerRes@@3IA ; wTimerRes
  00028	51		 push	 ecx
  00029	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__timeEndPeriod@4

; 109  : }

  0002f	5d		 pop	 ebp
  00030	c3		 ret	 0
?Timing_CleanUp@@YAXXZ ENDP				; Timing_CleanUp
PUBLIC	__real@403e000000000000
PUBLIC	?Timing_WaitForTimeToFlip@@YAXPAUTDeinterlaceInfo@@PAU_DEINTERLACE_METHOD@@PAH@Z ; Timing_WaitForTimeToFlip
;	COMDAT __real@403e000000000000
CONST	SEGMENT
__real@403e000000000000 DQ 0403e000000000000r	; 30
; Function compile flags: /Odtp
CONST	ENDS
;	COMDAT ?Timing_WaitForTimeToFlip@@YAXPAUTDeinterlaceInfo@@PAU_DEINTERLACE_METHOD@@PAH@Z
_TEXT	SEGMENT
tv236 = -56						; size = 8
tv218 = -48						; size = 8
tv167 = -40						; size = 8
tv154 = -32						; size = 8
_wTimerID$141830 = -24					; size = 4
_MilliSecondsToWait$141827 = -20			; size = 4
_TicksToWait$141819 = -16				; size = 8
_bWait$ = -4						; size = 4
_pInfo$ = 8						; size = 4
_CurrentMethod$ = 12					; size = 4
_bStopThread$ = 16					; size = 4
?Timing_WaitForTimeToFlip@@YAXPAUTDeinterlaceInfo@@PAU_DEINTERLACE_METHOD@@PAH@Z PROC ; Timing_WaitForTimeToFlip, COMDAT

; 284  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 38	 sub	 esp, 56			; 00000038H

; 285  :     BOOL bWait = FALSE;

  00006	c7 45 fc 00 00
	00 00		 mov	 DWORD PTR _bWait$[ebp], 0

; 286  : 
; 287  :     if(pInfo->bMissedFrame == FALSE && FlipAdjust == FALSE)

  0000d	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00010	83 78 6c 00	 cmp	 DWORD PTR [eax+108], 0
  00014	0f 85 ff 01 00
	00		 jne	 $LN13@Timing_Wai
  0001a	83 3d 00 00 00
	00 00		 cmp	 DWORD PTR ?FlipAdjust@@3HA, 0 ; FlipAdjust
  00021	0f 85 f2 01 00
	00		 jne	 $LN13@Timing_Wai

; 288  :     {
; 289  :         if(LastFlipTime.QuadPart == 0)

  00027	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?LastFlipTime@@3T_LARGE_INTEGER@@A
  0002d	0b 0d 04 00 00
	00		 or	 ecx, DWORD PTR ?LastFlipTime@@3T_LARGE_INTEGER@@A+4
  00033	75 10		 jne	 SHORT $LN12@Timing_Wai

; 290  :         {
; 291  :             QueryPerformanceCounter(&LastFlipTime);

  00035	68 00 00 00 00	 push	 OFFSET ?LastFlipTime@@3T_LARGE_INTEGER@@A ; LastFlipTime
  0003a	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__QueryPerformanceCounter@4

; 292  :         }
; 293  :         else

  00040	e9 d2 01 00 00	 jmp	 $LN11@Timing_Wai
$LN12@Timing_Wai:

; 294  :         {
; 295  :             LONGLONG TicksToWait;
; 296  : 
; 297  :             // work out the required ticks between flips
; 298  :             if(bIsPAL)

  00045	83 3d 00 00 00
	00 00		 cmp	 DWORD PTR ?bIsPAL@@3HA, 0 ; bIsPAL
  0004c	74 2e		 je	 SHORT $LN10@Timing_Wai

; 299  :             {
; 300  :                 TicksToWait = (LONGLONG)(RunningAverageCounterTicks * 25.0 / (double)CurrentMethod->FrameRate50Hz);

  0004e	dd 05 00 00 00
	00		 fld	 QWORD PTR ?RunningAverageCounterTicks@@3NA ; RunningAverageCounterTicks
  00054	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@4039000000000000
  0005a	8b 55 0c	 mov	 edx, DWORD PTR _CurrentMethod$[ebp]
  0005d	8b 42 1c	 mov	 eax, DWORD PTR [edx+28]
  00060	89 45 e0	 mov	 DWORD PTR tv154[ebp], eax
  00063	c7 45 e4 00 00
	00 00		 mov	 DWORD PTR tv154[ebp+4], 0
  0006a	df 6d e0	 fild	 QWORD PTR tv154[ebp]
  0006d	de f9		 fdivp	 ST(1), ST(0)
  0006f	e8 00 00 00 00	 call	 __ftol2
  00074	89 45 f0	 mov	 DWORD PTR _TicksToWait$141819[ebp], eax
  00077	89 55 f4	 mov	 DWORD PTR _TicksToWait$141819[ebp+4], edx

; 301  :             }
; 302  :             else

  0007a	eb 2c		 jmp	 SHORT $LN9@Timing_Wai
$LN10@Timing_Wai:

; 303  :             {
; 304  :                 TicksToWait = (LONGLONG)(RunningAverageCounterTicks * 30.0 / (double)CurrentMethod->FrameRate60Hz);

  0007c	dd 05 00 00 00
	00		 fld	 QWORD PTR ?RunningAverageCounterTicks@@3NA ; RunningAverageCounterTicks
  00082	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@403e000000000000
  00088	8b 4d 0c	 mov	 ecx, DWORD PTR _CurrentMethod$[ebp]
  0008b	8b 51 20	 mov	 edx, DWORD PTR [ecx+32]
  0008e	89 55 d8	 mov	 DWORD PTR tv167[ebp], edx
  00091	c7 45 dc 00 00
	00 00		 mov	 DWORD PTR tv167[ebp+4], 0
  00098	df 6d d8	 fild	 QWORD PTR tv167[ebp]
  0009b	de f9		 fdivp	 ST(1), ST(0)
  0009d	e8 00 00 00 00	 call	 __ftol2
  000a2	89 45 f0	 mov	 DWORD PTR _TicksToWait$141819[ebp], eax
  000a5	89 55 f4	 mov	 DWORD PTR _TicksToWait$141819[ebp+4], edx
$LN9@Timing_Wai:

; 305  :             }
; 306  :             QueryPerformanceCounter(&CurrentFlipTime);

  000a8	68 00 00 00 00	 push	 OFFSET ?CurrentFlipTime@@3T_LARGE_INTEGER@@A ; CurrentFlipTime
  000ad	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__QueryPerformanceCounter@4

; 307  : 
; 308  :             if(bGiveUpProcDuringJT == TRUE)

  000b3	83 3d 00 00 00
	00 01		 cmp	 DWORD PTR ?bGiveUpProcDuringJT@@3HA, 1 ; bGiveUpProcDuringJT
  000ba	0f 85 f4 00 00
	00		 jne	 $LN5@Timing_Wai

; 309  :             {
; 310  :                 // see if we can afford to allow another process to cut in at this point
; 311  :                 // if we don't give up some time here we will hog the processor
; 312  :                 // this method is in test and should be used with an elevated priority on the
; 313  :                 // decoding thread so that when the event is fired out thread gets priority
; 314  :                 long MilliSecondsToWait = (long)((CurrentFlipTime.QuadPart - LastFlipTime.QuadPart) * 1000 / TimerFrequency.QuadPart);

  000c0	a1 00 00 00 00	 mov	 eax, DWORD PTR ?CurrentFlipTime@@3T_LARGE_INTEGER@@A
  000c5	2b 05 00 00 00
	00		 sub	 eax, DWORD PTR ?LastFlipTime@@3T_LARGE_INTEGER@@A
  000cb	8b 0d 04 00 00
	00		 mov	 ecx, DWORD PTR ?CurrentFlipTime@@3T_LARGE_INTEGER@@A+4
  000d1	1b 0d 04 00 00
	00		 sbb	 ecx, DWORD PTR ?LastFlipTime@@3T_LARGE_INTEGER@@A+4
  000d7	6a 00		 push	 0
  000d9	68 e8 03 00 00	 push	 1000			; 000003e8H
  000de	51		 push	 ecx
  000df	50		 push	 eax
  000e0	e8 00 00 00 00	 call	 __allmul
  000e5	8b 0d 04 00 00
	00		 mov	 ecx, DWORD PTR ?TimerFrequency@@3T_LARGE_INTEGER@@A+4
  000eb	51		 push	 ecx
  000ec	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?TimerFrequency@@3T_LARGE_INTEGER@@A
  000f2	51		 push	 ecx
  000f3	52		 push	 edx
  000f4	50		 push	 eax
  000f5	e8 00 00 00 00	 call	 __alldiv
  000fa	89 45 ec	 mov	 DWORD PTR _MilliSecondsToWait$141827[ebp], eax

; 315  :                 if(MilliSecondsToWait > wTimerRes * 2)

  000fd	8b 15 00 00 00
	00		 mov	 edx, DWORD PTR ?wTimerRes@@3IA ; wTimerRes
  00103	d1 e2		 shl	 edx, 1
  00105	39 55 ec	 cmp	 DWORD PTR _MilliSecondsToWait$141827[ebp], edx
  00108	76 49		 jbe	 SHORT $LN6@Timing_Wai

; 316  :                 {
; 317  :                     ResetEvent(hTimerEvent);

  0010a	a1 00 00 00 00	 mov	 eax, DWORD PTR ?hTimerEvent@@3PAXA ; hTimerEvent
  0010f	50		 push	 eax
  00110	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__ResetEvent@4

; 318  : 
; 319  :                     MMRESULT wTimerID = timeSetEvent(
; 320  :                                                     MilliSecondsToWait - wTimerRes,
; 321  :                                                     wTimerRes,
; 322  :                                                     (LPTIMECALLBACK)hTimerEvent,
; 323  :                                                     (DWORD)NULL,
; 324  :                                                     TIME_ONESHOT | TIME_CALLBACK_EVENT_SET
; 325  :                                                  );

  00116	6a 10		 push	 16			; 00000010H
  00118	6a 00		 push	 0
  0011a	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?hTimerEvent@@3PAXA ; hTimerEvent
  00120	51		 push	 ecx
  00121	8b 15 00 00 00
	00		 mov	 edx, DWORD PTR ?wTimerRes@@3IA ; wTimerRes
  00127	52		 push	 edx
  00128	8b 45 ec	 mov	 eax, DWORD PTR _MilliSecondsToWait$141827[ebp]
  0012b	2b 05 00 00 00
	00		 sub	 eax, DWORD PTR ?wTimerRes@@3IA ; wTimerRes
  00131	50		 push	 eax
  00132	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__timeSetEvent@20
  00138	89 45 e8	 mov	 DWORD PTR _wTimerID$141830[ebp], eax

; 326  :                     if(wTimerID != NULL)

  0013b	83 7d e8 00	 cmp	 DWORD PTR _wTimerID$141830[ebp], 0
  0013f	74 12		 je	 SHORT $LN6@Timing_Wai

; 327  :                     {
; 328  :                         // if this succeeded then wait for our event to be fired
; 329  :                         // but allow for the timer to not work and fall out after
; 330  :                         // 1/5 of a second.
; 331  :                         // note we don't really care if this works or not
; 332  :                         // as the downside is using all the CPU
; 333  :                         WaitForSingleObject(hTimerEvent, 200);

  00141	68 c8 00 00 00	 push	 200			; 000000c8H
  00146	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?hTimerEvent@@3PAXA ; hTimerEvent
  0014c	51		 push	 ecx
  0014d	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__WaitForSingleObject@8
$LN6@Timing_Wai:

; 334  :                     }
; 335  :                 }
; 336  :                 QueryPerformanceCounter(&CurrentFlipTime);

  00153	68 00 00 00 00	 push	 OFFSET ?CurrentFlipTime@@3T_LARGE_INTEGER@@A ; CurrentFlipTime
  00158	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__QueryPerformanceCounter@4

; 337  :                 if((CurrentFlipTime.QuadPart - LastFlipTime.QuadPart) > TicksToWait)

  0015e	8b 15 00 00 00
	00		 mov	 edx, DWORD PTR ?CurrentFlipTime@@3T_LARGE_INTEGER@@A
  00164	2b 15 00 00 00
	00		 sub	 edx, DWORD PTR ?LastFlipTime@@3T_LARGE_INTEGER@@A
  0016a	a1 04 00 00 00	 mov	 eax, DWORD PTR ?CurrentFlipTime@@3T_LARGE_INTEGER@@A+4
  0016f	1b 05 04 00 00
	00		 sbb	 eax, DWORD PTR ?LastFlipTime@@3T_LARGE_INTEGER@@A+4
  00175	89 55 d0	 mov	 DWORD PTR tv218[ebp], edx
  00178	89 45 d4	 mov	 DWORD PTR tv218[ebp+4], eax
  0017b	8b 4d d4	 mov	 ecx, DWORD PTR tv218[ebp+4]
  0017e	3b 4d f4	 cmp	 ecx, DWORD PTR _TicksToWait$141819[ebp+4]
  00181	7c 31		 jl	 SHORT $LN5@Timing_Wai
  00183	7f 08		 jg	 SHORT $LN16@Timing_Wai
  00185	8b 55 d0	 mov	 edx, DWORD PTR tv218[ebp]
  00188	3b 55 f0	 cmp	 edx, DWORD PTR _TicksToWait$141819[ebp]
  0018b	76 27		 jbe	 SHORT $LN5@Timing_Wai
$LN16@Timing_Wai:

; 338  :                 {
; 339  :                     LOG(1, _T(" Too late back from mm timer - %d"), (long)(CurrentFlipTime.QuadPart - LastFlipTime.QuadPart));

  0018d	a1 00 00 00 00	 mov	 eax, DWORD PTR ?CurrentFlipTime@@3T_LARGE_INTEGER@@A
  00192	2b 05 00 00 00
	00		 sub	 eax, DWORD PTR ?LastFlipTime@@3T_LARGE_INTEGER@@A
  00198	8b 0d 04 00 00
	00		 mov	 ecx, DWORD PTR ?CurrentFlipTime@@3T_LARGE_INTEGER@@A+4
  0019e	1b 0d 04 00 00
	00		 sbb	 ecx, DWORD PTR ?LastFlipTime@@3T_LARGE_INTEGER@@A+4
  001a4	50		 push	 eax
  001a5	68 00 00 00 00	 push	 OFFSET ??_C@_1EE@OGGMBDDH@?$AA?5?$AAT?$AAo?$AAo?$AA?5?$AAl?$AAa?$AAt?$AAe?$AA?5?$AAb?$AAa?$AAc?$AAk?$AA?5?$AAf?$AAr?$AAo?$AAm?$AA?5?$AAm?$AAm?$AA?5?$AAt?$AAi?$AAm?$AAe?$AAr?$AA?5?$AA?9?$AA?5?$AA?$CF@
  001aa	6a 01		 push	 1
  001ac	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  001b1	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN5@Timing_Wai:

; 340  :                 }
; 341  :             }
; 342  : 
; 343  :             while(!(*bStopThread) && (CurrentFlipTime.QuadPart - LastFlipTime.QuadPart) < TicksToWait)

  001b4	8b 55 10	 mov	 edx, DWORD PTR _bStopThread$[ebp]
  001b7	83 3a 00	 cmp	 DWORD PTR [edx], 0
  001ba	75 43		 jne	 SHORT $LN3@Timing_Wai
  001bc	a1 00 00 00 00	 mov	 eax, DWORD PTR ?CurrentFlipTime@@3T_LARGE_INTEGER@@A
  001c1	2b 05 00 00 00
	00		 sub	 eax, DWORD PTR ?LastFlipTime@@3T_LARGE_INTEGER@@A
  001c7	8b 0d 04 00 00
	00		 mov	 ecx, DWORD PTR ?CurrentFlipTime@@3T_LARGE_INTEGER@@A+4
  001cd	1b 0d 04 00 00
	00		 sbb	 ecx, DWORD PTR ?LastFlipTime@@3T_LARGE_INTEGER@@A+4
  001d3	89 45 c8	 mov	 DWORD PTR tv236[ebp], eax
  001d6	89 4d cc	 mov	 DWORD PTR tv236[ebp+4], ecx
  001d9	8b 55 cc	 mov	 edx, DWORD PTR tv236[ebp+4]
  001dc	3b 55 f4	 cmp	 edx, DWORD PTR _TicksToWait$141819[ebp+4]
  001df	7f 1e		 jg	 SHORT $LN3@Timing_Wai
  001e1	7c 08		 jl	 SHORT $LN17@Timing_Wai
  001e3	8b 45 c8	 mov	 eax, DWORD PTR tv236[ebp]
  001e6	3b 45 f0	 cmp	 eax, DWORD PTR _TicksToWait$141819[ebp]
  001e9	73 14		 jae	 SHORT $LN3@Timing_Wai
$LN17@Timing_Wai:

; 344  :             {
; 345  :                 QueryPerformanceCounter(&CurrentFlipTime);

  001eb	68 00 00 00 00	 push	 OFFSET ?CurrentFlipTime@@3T_LARGE_INTEGER@@A ; CurrentFlipTime
  001f0	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__QueryPerformanceCounter@4

; 346  :                 bWait = TRUE;

  001f6	c7 45 fc 01 00
	00 00		 mov	 DWORD PTR _bWait$[ebp], 1

; 347  :             }

  001fd	eb b5		 jmp	 SHORT $LN5@Timing_Wai
$LN3@Timing_Wai:

; 348  :             LastFlipTime.QuadPart = CurrentFlipTime.QuadPart;

  001ff	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?CurrentFlipTime@@3T_LARGE_INTEGER@@A
  00205	89 0d 00 00 00
	00		 mov	 DWORD PTR ?LastFlipTime@@3T_LARGE_INTEGER@@A, ecx
  0020b	8b 15 04 00 00
	00		 mov	 edx, DWORD PTR ?CurrentFlipTime@@3T_LARGE_INTEGER@@A+4
  00211	89 15 04 00 00
	00		 mov	 DWORD PTR ?LastFlipTime@@3T_LARGE_INTEGER@@A+4, edx
$LN11@Timing_Wai:

; 349  :         }
; 350  :     }
; 351  :     else

  00217	eb 0b		 jmp	 SHORT $LN2@Timing_Wai
$LN13@Timing_Wai:

; 352  :     {
; 353  :         QueryPerformanceCounter(&LastFlipTime);

  00219	68 00 00 00 00	 push	 OFFSET ?LastFlipTime@@3T_LARGE_INTEGER@@A ; LastFlipTime
  0021e	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__QueryPerformanceCounter@4
$LN2@Timing_Wai:

; 354  :     }
; 355  :     if (!bWait)

  00224	83 7d fc 00	 cmp	 DWORD PTR _bWait$[ebp], 0
  00228	75 05		 jne	 SHORT $LN1@Timing_Wai

; 356  :     {
; 357  :         Timing_IncrementNoFlipAtTime();

  0022a	e8 00 00 00 00	 call	 ?Timing_IncrementNoFlipAtTime@@YAXXZ ; Timing_IncrementNoFlipAtTime
$LN1@Timing_Wai:

; 358  :     }
; 359  :     FlipAdjust = FALSE;

  0022f	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?FlipAdjust@@3HA, 0 ; FlipAdjust

; 360  : }

  00239	8b e5		 mov	 esp, ebp
  0023b	5d		 pop	 ebp
  0023c	c3		 ret	 0
?Timing_WaitForTimeToFlip@@YAXPAUTDeinterlaceInfo@@PAU_DEINTERLACE_METHOD@@PAH@Z ENDP ; Timing_WaitForTimeToFlip
_TEXT	ENDS
PUBLIC	?Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z ; Timimg_AutoFormatDetect
; Function compile flags: /Odtp
;	COMDAT ?Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z
_TEXT	SEGMENT
tv195 = -36						; size = 4
tv184 = -32						; size = 4
tv172 = -28						; size = 4
tv161 = -24						; size = 4
tv149 = -20						; size = 4
tv138 = -16						; size = 4
_TenFieldTime$141790 = -12				; size = 4
_CurrentTime$141788 = -8				; size = 8
_pInfo$ = 8						; size = 4
_NumFields$ = 12					; size = 4
?Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z PROC ; Timimg_AutoFormatDetect, COMDAT

; 182  : {

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

; 183  :     static long RepeatCount = 0;
; 184  :     static LARGE_INTEGER LastTenFieldTime = {LONGLONG(0)};
; 185  :     static long Counted = 0;
; 186  :     static long LastFrame = 0;
; 187  : 
; 188  :     if(bDoAutoFormatDetect == TRUE)

  00006	83 3d 00 00 00
	00 01		 cmp	 DWORD PTR ?bDoAutoFormatDetect@@3HA, 1 ; bDoAutoFormatDetect
  0000d	0f 85 ad 02 00
	00		 jne	 $LN21@Timimg_Aut

; 189  :     {
; 190  :         if(pInfo->bRunningLate)

  00013	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00016	83 78 68 00	 cmp	 DWORD PTR [eax+104], 0
  0001a	74 05		 je	 SHORT $LN19@Timimg_Aut

; 191  :         {
; 192  :             return;

  0001c	e9 9f 02 00 00	 jmp	 $LN21@Timimg_Aut
$LN19@Timimg_Aut:

; 193  :         }
; 194  : 
; 195  :         if(pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD)

  00021	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00024	8b 51 04	 mov	 edx, DWORD PTR [ecx+4]
  00027	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  0002a	83 e0 01	 and	 eax, 1
  0002d	74 27		 je	 SHORT $LN18@Timimg_Aut

; 196  :         {
; 197  :             Counted += ((pInfo->CurrentFrame * 2 - LastFrame * 2 + NumFields) % NumFields);

  0002f	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  00032	8b 41 40	 mov	 eax, DWORD PTR [ecx+64]
  00035	d1 e0		 shl	 eax, 1
  00037	8b 15 00 00 00
	00		 mov	 edx, DWORD PTR ?LastFrame@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA
  0003d	d1 e2		 shl	 edx, 1
  0003f	2b c2		 sub	 eax, edx
  00041	03 45 0c	 add	 eax, DWORD PTR _NumFields$[ebp]
  00044	99		 cdq
  00045	f7 7d 0c	 idiv	 DWORD PTR _NumFields$[ebp]
  00048	03 15 00 00 00
	00		 add	 edx, DWORD PTR ?Counted@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA
  0004e	89 15 00 00 00
	00		 mov	 DWORD PTR ?Counted@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA, edx
  00054	eb 34		 jmp	 SHORT $LN17@Timimg_Aut
$LN18@Timimg_Aut:

; 198  :         }
; 199  :         else if(!(pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_MASK))

  00056	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00059	8b 48 04	 mov	 ecx, DWORD PTR [eax+4]
  0005c	8b 51 04	 mov	 edx, DWORD PTR [ecx+4]
  0005f	83 e2 03	 and	 edx, 3
  00062	75 21		 jne	 SHORT $LN16@Timimg_Aut

; 200  :         {
; 201  :             Counted += (pInfo->CurrentFrame - LastFrame + NumFields) % NumFields;

  00064	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00067	8b 40 40	 mov	 eax, DWORD PTR [eax+64]
  0006a	2b 05 00 00 00
	00		 sub	 eax, DWORD PTR ?LastFrame@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA
  00070	03 45 0c	 add	 eax, DWORD PTR _NumFields$[ebp]
  00073	99		 cdq
  00074	f7 7d 0c	 idiv	 DWORD PTR _NumFields$[ebp]
  00077	03 15 00 00 00
	00		 add	 edx, DWORD PTR ?Counted@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA
  0007d	89 15 00 00 00
	00		 mov	 DWORD PTR ?Counted@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA, edx

; 202  :         }
; 203  :         else

  00083	eb 05		 jmp	 SHORT $LN17@Timimg_Aut
$LN16@Timimg_Aut:

; 204  :         {
; 205  :             return;

  00085	e9 36 02 00 00	 jmp	 $LN21@Timimg_Aut
$LN17@Timimg_Aut:

; 206  :         }
; 207  : 
; 208  :         LastFrame = pInfo->CurrentFrame;

  0008a	8b 4d 08	 mov	 ecx, DWORD PTR _pInfo$[ebp]
  0008d	8b 51 40	 mov	 edx, DWORD PTR [ecx+64]
  00090	89 15 00 00 00
	00		 mov	 DWORD PTR ?LastFrame@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA, edx

; 209  : 
; 210  :         if(Counted >= NumFields)

  00096	a1 00 00 00 00	 mov	 eax, DWORD PTR ?Counted@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA
  0009b	3b 45 0c	 cmp	 eax, DWORD PTR _NumFields$[ebp]
  0009e	0f 8c 1c 02 00
	00		 jl	 $LN21@Timimg_Aut

; 211  :         {
; 212  :             LARGE_INTEGER CurrentTime;
; 213  :             QueryPerformanceCounter(&CurrentTime);

  000a4	8d 4d f8	 lea	 ecx, DWORD PTR _CurrentTime$141788[ebp]
  000a7	51		 push	 ecx
  000a8	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__QueryPerformanceCounter@4

; 214  :             if(LastTenFieldTime.QuadPart != 0)

  000ae	8b 15 00 00 00
	00		 mov	 edx, DWORD PTR ?LastTenFieldTime@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4T_LARGE_INTEGER@@A
  000b4	0b 15 04 00 00
	00		 or	 edx, DWORD PTR ?LastTenFieldTime@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4T_LARGE_INTEGER@@A+4
  000ba	0f 84 e5 01 00
	00		 je	 $LN13@Timimg_Aut

; 215  :             {
; 216  :                 long TenFieldTime;
; 217  :                 TenFieldTime = MulDiv((int)(CurrentTime.QuadPart - LastTenFieldTime.QuadPart), 10000, (int)(TimerFrequency.QuadPart) * Counted);

  000c0	a1 00 00 00 00	 mov	 eax, DWORD PTR ?TimerFrequency@@3T_LARGE_INTEGER@@A
  000c5	0f af 05 00 00
	00 00		 imul	 eax, DWORD PTR ?Counted@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA
  000cc	50		 push	 eax
  000cd	68 10 27 00 00	 push	 10000			; 00002710H
  000d2	8b 4d f8	 mov	 ecx, DWORD PTR _CurrentTime$141788[ebp]
  000d5	2b 0d 00 00 00
	00		 sub	 ecx, DWORD PTR ?LastTenFieldTime@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4T_LARGE_INTEGER@@A
  000db	8b 55 fc	 mov	 edx, DWORD PTR _CurrentTime$141788[ebp+4]
  000de	1b 15 04 00 00
	00		 sbb	 edx, DWORD PTR ?LastTenFieldTime@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4T_LARGE_INTEGER@@A+4
  000e4	51		 push	 ecx
  000e5	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__MulDiv@12
  000eb	89 45 f4	 mov	 DWORD PTR _TenFieldTime$141790[ebp], eax

; 218  : 
; 219  :                 // If we are not on a 50Hz Mode and we get 50hz timings then flip
; 220  :                 // to 50hz Mode
; 221  :                 if(TenFieldTime >= 195 && TenFieldTime <= 205)

  000ee	81 7d f4 c3 00
	00 00		 cmp	 DWORD PTR _TenFieldTime$141790[ebp], 195 ; 000000c3H
  000f5	0f 8c 80 00 00
	00		 jl	 $LN12@Timimg_Aut
  000fb	81 7d f4 cd 00
	00 00		 cmp	 DWORD PTR _TenFieldTime$141790[ebp], 205 ; 000000cdH
  00102	7f 77		 jg	 SHORT $LN12@Timimg_Aut

; 222  :                 {
; 223  :                     if(!(GetTVFormat(Providers_GetCurrentSource()->GetFormat())->Is25fps))

  00104	e8 00 00 00 00	 call	 ?Providers_GetCurrentSource@@YAPAVCSource@@XZ ; Providers_GetCurrentSource
  00109	89 45 f0	 mov	 DWORD PTR tv138[ebp], eax
  0010c	8b 45 f0	 mov	 eax, DWORD PTR tv138[ebp]
  0010f	8b 10		 mov	 edx, DWORD PTR [eax]
  00111	8b 4d f0	 mov	 ecx, DWORD PTR tv138[ebp]
  00114	8b 42 64	 mov	 eax, DWORD PTR [edx+100]
  00117	ff d0		 call	 eax
  00119	50		 push	 eax
  0011a	e8 00 00 00 00	 call	 ?GetTVFormat@@YAPAUTTVFormat@@W4eVideoFormat@@@Z ; GetTVFormat
  0011f	83 c4 04	 add	 esp, 4
  00122	83 78 10 00	 cmp	 DWORD PTR [eax+16], 0
  00126	75 4e		 jne	 SHORT $LN11@Timimg_Aut

; 224  :                     {
; 225  :                         ++RepeatCount;

  00128	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?RepeatCount@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA
  0012e	83 c1 01	 add	 ecx, 1
  00131	89 0d 00 00 00
	00		 mov	 DWORD PTR ?RepeatCount@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA, ecx

; 226  :                         if(RepeatCount > FormatChangeThreshold)

  00137	8b 15 00 00 00
	00		 mov	 edx, DWORD PTR ?RepeatCount@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA
  0013d	3b 15 00 00 00
	00		 cmp	 edx, DWORD PTR ?FormatChangeThreshold@@3JA ; FormatChangeThreshold
  00143	7e 31		 jle	 SHORT $LN11@Timimg_Aut

; 227  :                         {
; 228  :                             Providers_GetCurrentSource()->SetFormat(FiftyHzFormat);

  00145	e8 00 00 00 00	 call	 ?Providers_GetCurrentSource@@YAPAVCSource@@XZ ; Providers_GetCurrentSource
  0014a	89 45 ec	 mov	 DWORD PTR tv149[ebp], eax
  0014d	a1 00 00 00 00	 mov	 eax, DWORD PTR ?FiftyHzFormat@@3W4eVideoFormat@@A ; FiftyHzFormat
  00152	50		 push	 eax
  00153	8b 4d ec	 mov	 ecx, DWORD PTR tv149[ebp]
  00156	8b 11		 mov	 edx, DWORD PTR [ecx]
  00158	8b 4d ec	 mov	 ecx, DWORD PTR tv149[ebp]
  0015b	8b 82 8c 00 00
	00		 mov	 eax, DWORD PTR [edx+140]
  00161	ff d0		 call	 eax

; 229  :                             LOG(1, _T("Went to 50Hz Mode - Last Ten Count %d"), TenFieldTime);

  00163	8b 4d f4	 mov	 ecx, DWORD PTR _TenFieldTime$141790[ebp]
  00166	51		 push	 ecx
  00167	68 00 00 00 00	 push	 OFFSET ??_C@_1EM@CBGPHNCC@?$AAW?$AAe?$AAn?$AAt?$AA?5?$AAt?$AAo?$AA?5?$AA5?$AA0?$AAH?$AAz?$AA?5?$AAM?$AAo?$AAd?$AAe?$AA?5?$AA?9?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AAT?$AAe?$AAn?$AA?5?$AAC?$AAo?$AAu@
  0016c	6a 01		 push	 1
  0016e	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  00173	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN11@Timimg_Aut:

; 230  :                         }
; 231  :                     }
; 232  :                 }

  00176	e9 2a 01 00 00	 jmp	 $LN13@Timimg_Aut
$LN12@Timimg_Aut:

; 233  :                 // If we are not on a 60Hz Mode and we get 60hz timings then flip
; 234  :                 // to 60hz Mode, however this is not what we seem to get when playing
; 235  :                 // back 60Hz stuff when in PAL
; 236  :                 else if(TenFieldTime >= 160 && TenFieldTime <= 172)

  0017b	81 7d f4 a0 00
	00 00		 cmp	 DWORD PTR _TenFieldTime$141790[ebp], 160 ; 000000a0H
  00182	7c 7f		 jl	 SHORT $LN8@Timimg_Aut
  00184	81 7d f4 ac 00
	00 00		 cmp	 DWORD PTR _TenFieldTime$141790[ebp], 172 ; 000000acH
  0018b	7f 76		 jg	 SHORT $LN8@Timimg_Aut

; 237  :                 {
; 238  :                     if(GetTVFormat(Providers_GetCurrentSource()->GetFormat())->Is25fps)

  0018d	e8 00 00 00 00	 call	 ?Providers_GetCurrentSource@@YAPAVCSource@@XZ ; Providers_GetCurrentSource
  00192	89 45 e8	 mov	 DWORD PTR tv161[ebp], eax
  00195	8b 55 e8	 mov	 edx, DWORD PTR tv161[ebp]
  00198	8b 02		 mov	 eax, DWORD PTR [edx]
  0019a	8b 4d e8	 mov	 ecx, DWORD PTR tv161[ebp]
  0019d	8b 50 64	 mov	 edx, DWORD PTR [eax+100]
  001a0	ff d2		 call	 edx
  001a2	50		 push	 eax
  001a3	e8 00 00 00 00	 call	 ?GetTVFormat@@YAPAUTTVFormat@@W4eVideoFormat@@@Z ; GetTVFormat
  001a8	83 c4 04	 add	 esp, 4
  001ab	83 78 10 00	 cmp	 DWORD PTR [eax+16], 0
  001af	74 4d		 je	 SHORT $LN7@Timimg_Aut

; 239  :                     {
; 240  :                         ++RepeatCount;

  001b1	a1 00 00 00 00	 mov	 eax, DWORD PTR ?RepeatCount@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA
  001b6	83 c0 01	 add	 eax, 1
  001b9	a3 00 00 00 00	 mov	 DWORD PTR ?RepeatCount@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA, eax

; 241  :                         if(RepeatCount > FormatChangeThreshold)

  001be	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?RepeatCount@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA
  001c4	3b 0d 00 00 00
	00		 cmp	 ecx, DWORD PTR ?FormatChangeThreshold@@3JA ; FormatChangeThreshold
  001ca	7e 32		 jle	 SHORT $LN7@Timimg_Aut

; 242  :                         {
; 243  :                             Providers_GetCurrentSource()->SetFormat(SixtyHzFormat);

  001cc	e8 00 00 00 00	 call	 ?Providers_GetCurrentSource@@YAPAVCSource@@XZ ; Providers_GetCurrentSource
  001d1	89 45 e4	 mov	 DWORD PTR tv172[ebp], eax
  001d4	8b 15 00 00 00
	00		 mov	 edx, DWORD PTR ?SixtyHzFormat@@3W4eVideoFormat@@A ; SixtyHzFormat
  001da	52		 push	 edx
  001db	8b 45 e4	 mov	 eax, DWORD PTR tv172[ebp]
  001de	8b 10		 mov	 edx, DWORD PTR [eax]
  001e0	8b 4d e4	 mov	 ecx, DWORD PTR tv172[ebp]
  001e3	8b 82 8c 00 00
	00		 mov	 eax, DWORD PTR [edx+140]
  001e9	ff d0		 call	 eax

; 244  :                             LOG(1, _T("Went to 60Hz Mode - Last Ten Count %d"), TenFieldTime);

  001eb	8b 4d f4	 mov	 ecx, DWORD PTR _TenFieldTime$141790[ebp]
  001ee	51		 push	 ecx
  001ef	68 00 00 00 00	 push	 OFFSET ??_C@_1EM@KFGKOIPC@?$AAW?$AAe?$AAn?$AAt?$AA?5?$AAt?$AAo?$AA?5?$AA6?$AA0?$AAH?$AAz?$AA?5?$AAM?$AAo?$AAd?$AAe?$AA?5?$AA?9?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AAT?$AAe?$AAn?$AA?5?$AAC?$AAo?$AAu@
  001f4	6a 01		 push	 1
  001f6	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  001fb	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN7@Timimg_Aut:

; 245  :                         }
; 246  :                     }
; 247  :                 }

  001fe	e9 a2 00 00 00	 jmp	 $LN13@Timimg_Aut
$LN8@Timimg_Aut:

; 248  :                 // If we are not on a 60Hz Mode and we get 60hz timings then flip
; 249  :                 // to 60hz Mode, in my tests I get 334 come back as the timings
; 250  :                 // when playing NTSC in PAL Mode so this check is also needed
; 251  :                 else if(TenFieldTime >= 330 && TenFieldTime <= 340)

  00203	81 7d f4 4a 01
	00 00		 cmp	 DWORD PTR _TenFieldTime$141790[ebp], 330 ; 0000014aH
  0020a	7c 7c		 jl	 SHORT $LN4@Timimg_Aut
  0020c	81 7d f4 54 01
	00 00		 cmp	 DWORD PTR _TenFieldTime$141790[ebp], 340 ; 00000154H
  00213	7f 73		 jg	 SHORT $LN4@Timimg_Aut

; 252  :                 {
; 253  :                    if(GetTVFormat(Providers_GetCurrentSource()->GetFormat())->Is25fps)

  00215	e8 00 00 00 00	 call	 ?Providers_GetCurrentSource@@YAPAVCSource@@XZ ; Providers_GetCurrentSource
  0021a	89 45 e0	 mov	 DWORD PTR tv184[ebp], eax
  0021d	8b 55 e0	 mov	 edx, DWORD PTR tv184[ebp]
  00220	8b 02		 mov	 eax, DWORD PTR [edx]
  00222	8b 4d e0	 mov	 ecx, DWORD PTR tv184[ebp]
  00225	8b 50 64	 mov	 edx, DWORD PTR [eax+100]
  00228	ff d2		 call	 edx
  0022a	50		 push	 eax
  0022b	e8 00 00 00 00	 call	 ?GetTVFormat@@YAPAUTTVFormat@@W4eVideoFormat@@@Z ; GetTVFormat
  00230	83 c4 04	 add	 esp, 4
  00233	83 78 10 00	 cmp	 DWORD PTR [eax+16], 0
  00237	74 4d		 je	 SHORT $LN3@Timimg_Aut

; 254  :                     {
; 255  :                         ++RepeatCount;

  00239	a1 00 00 00 00	 mov	 eax, DWORD PTR ?RepeatCount@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA
  0023e	83 c0 01	 add	 eax, 1
  00241	a3 00 00 00 00	 mov	 DWORD PTR ?RepeatCount@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA, eax

; 256  :                         if(RepeatCount > FormatChangeThreshold)

  00246	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?RepeatCount@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA
  0024c	3b 0d 00 00 00
	00		 cmp	 ecx, DWORD PTR ?FormatChangeThreshold@@3JA ; FormatChangeThreshold
  00252	7e 32		 jle	 SHORT $LN3@Timimg_Aut

; 257  :                         {
; 258  :                             Providers_GetCurrentSource()->SetFormat(SixtyHzFormat);

  00254	e8 00 00 00 00	 call	 ?Providers_GetCurrentSource@@YAPAVCSource@@XZ ; Providers_GetCurrentSource
  00259	89 45 dc	 mov	 DWORD PTR tv195[ebp], eax
  0025c	8b 15 00 00 00
	00		 mov	 edx, DWORD PTR ?SixtyHzFormat@@3W4eVideoFormat@@A ; SixtyHzFormat
  00262	52		 push	 edx
  00263	8b 45 dc	 mov	 eax, DWORD PTR tv195[ebp]
  00266	8b 10		 mov	 edx, DWORD PTR [eax]
  00268	8b 4d dc	 mov	 ecx, DWORD PTR tv195[ebp]
  0026b	8b 82 8c 00 00
	00		 mov	 eax, DWORD PTR [edx+140]
  00271	ff d0		 call	 eax

; 259  :                             LOG(1, _T("Went to 60Hz Mode - Last Ten Count %d"), TenFieldTime);

  00273	8b 4d f4	 mov	 ecx, DWORD PTR _TenFieldTime$141790[ebp]
  00276	51		 push	 ecx
  00277	68 00 00 00 00	 push	 OFFSET ??_C@_1EM@KFGKOIPC@?$AAW?$AAe?$AAn?$AAt?$AA?5?$AAt?$AAo?$AA?5?$AA6?$AA0?$AAH?$AAz?$AA?5?$AAM?$AAo?$AAd?$AAe?$AA?5?$AA?9?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AAT?$AAe?$AAn?$AA?5?$AAC?$AAo?$AAu@
  0027c	6a 01		 push	 1
  0027e	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  00283	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN3@Timimg_Aut:

; 260  :                         }
; 261  :                     }
; 262  :                 }
; 263  :                 else

  00286	eb 1d		 jmp	 SHORT $LN13@Timimg_Aut
$LN4@Timimg_Aut:

; 264  :                 {
; 265  :                     LOG(2, _T("Got unexpected Last Ten Count %d"), TenFieldTime);

  00288	8b 55 f4	 mov	 edx, DWORD PTR _TenFieldTime$141790[ebp]
  0028b	52		 push	 edx
  0028c	68 00 00 00 00	 push	 OFFSET ??_C@_1EC@OKOLENHM@?$AAG?$AAo?$AAt?$AA?5?$AAu?$AAn?$AAe?$AAx?$AAp?$AAe?$AAc?$AAt?$AAe?$AAd?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AAT?$AAe?$AAn?$AA?5?$AAC?$AAo?$AAu?$AAn?$AAt?$AA?5?$AA?$CF?$AAd@
  00291	6a 02		 push	 2
  00293	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  00298	83 c4 0c	 add	 esp, 12			; 0000000cH

; 266  :                     RepeatCount = 0;

  0029b	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?RepeatCount@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA, 0
$LN13@Timimg_Aut:

; 267  :                 }
; 268  :             }
; 269  :             LastTenFieldTime.QuadPart = CurrentTime.QuadPart;

  002a5	8b 45 f8	 mov	 eax, DWORD PTR _CurrentTime$141788[ebp]
  002a8	a3 00 00 00 00	 mov	 DWORD PTR ?LastTenFieldTime@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4T_LARGE_INTEGER@@A, eax
  002ad	8b 4d fc	 mov	 ecx, DWORD PTR _CurrentTime$141788[ebp+4]
  002b0	89 0d 04 00 00
	00		 mov	 DWORD PTR ?LastTenFieldTime@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4T_LARGE_INTEGER@@A+4, ecx

; 270  :             Counted = 0;

  002b6	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?Counted@?1??Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z@4JA, 0
$LN21@Timimg_Aut:

; 271  :         }
; 272  :     }
; 273  : }

  002c0	8b e5		 mov	 esp, ebp
  002c2	5d		 pop	 ebp
  002c3	c3		 ret	 0
?Timimg_AutoFormatDetect@@YAXPAUTDeinterlaceInfo@@H@Z ENDP ; Timimg_AutoFormatDetect
_TEXT	ENDS
PUBLIC	__real@3ff0cccccccccccd
PUBLIC	__real@3fee666666666666
PUBLIC	?Timing_UpdateRunningAverage@@YAXPAUTDeinterlaceInfo@@H@Z ; Timing_UpdateRunningAverage
;	COMDAT __real@3ff0cccccccccccd
CONST	SEGMENT
__real@3ff0cccccccccccd DQ 03ff0cccccccccccdr	; 1.05
CONST	ENDS
;	COMDAT __real@3fee666666666666
CONST	SEGMENT
__real@3fee666666666666 DQ 03fee666666666666r	; 0.95
; Function compile flags: /Odtp
CONST	ENDS
;	COMDAT ?Timing_UpdateRunningAverage@@YAXPAUTDeinterlaceInfo@@H@Z
_TEXT	SEGMENT
tv137 = -24						; size = 8
_RecentTicks$141748 = -16				; size = 8
_CurrentFieldTime$141746 = -8				; size = 8
_pInfo$ = 8						; size = 4
_NumFields$ = 12					; size = 4
?Timing_UpdateRunningAverage@@YAXPAUTDeinterlaceInfo@@H@Z PROC ; Timing_UpdateRunningAverage, COMDAT

; 113  :     {

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

; 114  :     if(!(pInfo->bRunningLate))

  00006	8b 45 08	 mov	 eax, DWORD PTR _pInfo$[ebp]
  00009	83 78 68 00	 cmp	 DWORD PTR [eax+104], 0
  0000d	0f 85 ff 00 00
	00		 jne	 $LN5@Timing_Upd

; 115  :     {
; 116  :         LARGE_INTEGER CurrentFieldTime;
; 117  :         QueryPerformanceCounter(&CurrentFieldTime);

  00013	8d 4d f8	 lea	 ecx, DWORD PTR _CurrentFieldTime$141746[ebp]
  00016	51		 push	 ecx
  00017	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__QueryPerformanceCounter@4

; 118  : 
; 119  :         // if we're not running late then
; 120  :         // and we got a good clean run last time
; 121  :         if(LastFieldTime.QuadPart != 0)

  0001d	8b 15 00 00 00
	00		 mov	 edx, DWORD PTR ?LastFieldTime@@3T_LARGE_INTEGER@@A
  00023	0b 15 04 00 00
	00		 or	 edx, DWORD PTR ?LastFieldTime@@3T_LARGE_INTEGER@@A+4
  00029	0f 84 d0 00 00
	00		 je	 $LN2@Timing_Upd

; 122  :         {
; 123  :             // gets the last ticks odd - odd
; 124  :             double RecentTicks = (double)((CurrentFieldTime.QuadPart - LastFieldTime.QuadPart) * 2.0 / (double)NumFields);

  0002f	8b 45 f8	 mov	 eax, DWORD PTR _CurrentFieldTime$141746[ebp]
  00032	2b 05 00 00 00
	00		 sub	 eax, DWORD PTR ?LastFieldTime@@3T_LARGE_INTEGER@@A
  00038	8b 4d fc	 mov	 ecx, DWORD PTR _CurrentFieldTime$141746[ebp+4]
  0003b	1b 0d 04 00 00
	00		 sbb	 ecx, DWORD PTR ?LastFieldTime@@3T_LARGE_INTEGER@@A+4
  00041	89 45 e8	 mov	 DWORD PTR tv137[ebp], eax
  00044	89 4d ec	 mov	 DWORD PTR tv137[ebp+4], ecx
  00047	df 6d e8	 fild	 QWORD PTR tv137[ebp]
  0004a	dc c0		 fadd	 ST(0), ST(0)
  0004c	da 75 0c	 fidiv	 DWORD PTR _NumFields$[ebp]
  0004f	dd 5d f0	 fstp	 QWORD PTR _RecentTicks$141748[ebp]

; 125  :             // only allow values within 5% if current Value
; 126  :             // should prevent spurious values getting through
; 127  :             if(RecentTicks > RunningAverageCounterTicks * 0.95 &&
; 128  :                 RecentTicks < RunningAverageCounterTicks * 1.05)

  00052	dd 05 00 00 00
	00		 fld	 QWORD PTR ?RunningAverageCounterTicks@@3NA ; RunningAverageCounterTicks
  00058	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@3fee666666666666
  0005e	dc 5d f0	 fcomp	 QWORD PTR _RecentTicks$141748[ebp]
  00061	df e0		 fnstsw	 ax
  00063	f6 c4 05	 test	 ah, 5
  00066	7a 67		 jp	 SHORT $LN3@Timing_Upd
  00068	dd 05 00 00 00
	00		 fld	 QWORD PTR ?RunningAverageCounterTicks@@3NA ; RunningAverageCounterTicks
  0006e	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@3ff0cccccccccccd
  00074	dc 5d f0	 fcomp	 QWORD PTR _RecentTicks$141748[ebp]
  00077	df e0		 fnstsw	 ax
  00079	f6 c4 41	 test	 ah, 65			; 00000041H
  0007c	75 51		 jne	 SHORT $LN3@Timing_Upd

; 129  :             {
; 130  :                 // update the average
; 131  :                 // we're doing this weighted average because
; 132  :                 // it has lots of nice properties
; 133  :                 // especially that we don't need to keep a
; 134  :                 // data history
; 135  :                 RunningAverageCounterTicks = Weight * RecentTicks + (1.0 - Weight) * RunningAverageCounterTicks;

  0007e	dd 05 00 00 00
	00		 fld	 QWORD PTR ?Weight@@3NA	; Weight
  00084	dc 4d f0	 fmul	 QWORD PTR _RecentTicks$141748[ebp]
  00087	d9 e8		 fld1
  00089	dc 25 00 00 00
	00		 fsub	 QWORD PTR ?Weight@@3NA	; Weight
  0008f	dc 0d 00 00 00
	00		 fmul	 QWORD PTR ?RunningAverageCounterTicks@@3NA ; RunningAverageCounterTicks
  00095	de c1		 faddp	 ST(1), ST(0)
  00097	dd 1d 00 00 00
	00		 fstp	 QWORD PTR ?RunningAverageCounterTicks@@3NA ; RunningAverageCounterTicks

; 136  :                 LOG(2, _T(" Last %f"), RecentTicks);

  0009d	83 ec 08	 sub	 esp, 8
  000a0	dd 45 f0	 fld	 QWORD PTR _RecentTicks$141748[ebp]
  000a3	dd 1c 24	 fstp	 QWORD PTR [esp]
  000a6	68 00 00 00 00	 push	 OFFSET ??_C@_1BC@EBAAOLAF@?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AA?$CF?$AAf?$AA?$AA@
  000ab	6a 02		 push	 2
  000ad	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG

; 137  :                 LOG(2, _T(" Running Average %f"), RunningAverageCounterTicks);

  000b2	83 c4 08	 add	 esp, 8
  000b5	dd 05 00 00 00
	00		 fld	 QWORD PTR ?RunningAverageCounterTicks@@3NA ; RunningAverageCounterTicks
  000bb	dd 1c 24	 fstp	 QWORD PTR [esp]
  000be	68 00 00 00 00	 push	 OFFSET ??_C@_1CI@FEDPDNKA@?$AA?5?$AAR?$AAu?$AAn?$AAn?$AAi?$AAn?$AAg?$AA?5?$AAA?$AAv?$AAe?$AAr?$AAa?$AAg?$AAe?$AA?5?$AA?$CF?$AAf?$AA?$AA@
  000c3	6a 02		 push	 2
  000c5	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  000ca	83 c4 10	 add	 esp, 16			; 00000010H

; 138  :             }
; 139  :             else

  000cd	eb 30		 jmp	 SHORT $LN2@Timing_Upd
$LN3@Timing_Upd:

; 140  :             {
; 141  :                 LOG(2, _T(" Last %f (IGNORED)"), RecentTicks);

  000cf	83 ec 08	 sub	 esp, 8
  000d2	dd 45 f0	 fld	 QWORD PTR _RecentTicks$141748[ebp]
  000d5	dd 1c 24	 fstp	 QWORD PTR [esp]
  000d8	68 00 00 00 00	 push	 OFFSET ??_C@_1CG@GJALGNFC@?$AA?5?$AAL?$AAa?$AAs?$AAt?$AA?5?$AA?$CF?$AAf?$AA?5?$AA?$CI?$AAI?$AAG?$AAN?$AAO?$AAR?$AAE?$AAD?$AA?$CJ?$AA?$AA@
  000dd	6a 02		 push	 2
  000df	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG

; 142  :                 LOG(2, _T(" Old Running Average %f"), RunningAverageCounterTicks);

  000e4	83 c4 08	 add	 esp, 8
  000e7	dd 05 00 00 00
	00		 fld	 QWORD PTR ?RunningAverageCounterTicks@@3NA ; RunningAverageCounterTicks
  000ed	dd 1c 24	 fstp	 QWORD PTR [esp]
  000f0	68 00 00 00 00	 push	 OFFSET ??_C@_1DA@DOEEMFPO@?$AA?5?$AAO?$AAl?$AAd?$AA?5?$AAR?$AAu?$AAn?$AAn?$AAi?$AAn?$AAg?$AA?5?$AAA?$AAv?$AAe?$AAr?$AAa?$AAg?$AAe?$AA?5?$AA?$CF?$AAf?$AA?$AA@
  000f5	6a 02		 push	 2
  000f7	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  000fc	83 c4 10	 add	 esp, 16			; 00000010H
$LN2@Timing_Upd:

; 143  :             }
; 144  :         }
; 145  :         // save current Value for next time
; 146  :         LastFieldTime.QuadPart = CurrentFieldTime.QuadPart;

  000ff	8b 55 f8	 mov	 edx, DWORD PTR _CurrentFieldTime$141746[ebp]
  00102	89 15 00 00 00
	00		 mov	 DWORD PTR ?LastFieldTime@@3T_LARGE_INTEGER@@A, edx
  00108	8b 45 fc	 mov	 eax, DWORD PTR _CurrentFieldTime$141746[ebp+4]
  0010b	a3 04 00 00 00	 mov	 DWORD PTR ?LastFieldTime@@3T_LARGE_INTEGER@@A+4, eax

; 147  :     }
; 148  :     else

  00110	eb 14		 jmp	 SHORT $LN1@Timing_Upd
$LN5@Timing_Upd:

; 149  :     {
; 150  :         // if we're running late then
; 151  :         // time will be rubbish
; 152  :         // so make sure it won't be used
; 153  :         LastFieldTime.QuadPart = 0;

  00112	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?LastFieldTime@@3T_LARGE_INTEGER@@A, 0
  0011c	c7 05 04 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?LastFieldTime@@3T_LARGE_INTEGER@@A+4, 0
$LN1@Timing_Upd:

; 154  :     }
; 155  : }

  00126	8b e5		 mov	 esp, ebp
  00128	5d		 pop	 ebp
  00129	c3		 ret	 0
?Timing_UpdateRunningAverage@@YAXPAUTDeinterlaceInfo@@H@Z ENDP ; Timing_UpdateRunningAverage
PUBLIC	__real@403df851eb851eb8
PUBLIC	?Timing_Setup@@YAXXZ				; Timing_Setup
;	COMDAT __real@403df851eb851eb8
CONST	SEGMENT
__real@403df851eb851eb8 DQ 0403df851eb851eb8r	; 29.97
CONST	ENDS
;	COMDAT xdata$x
xdata$x	SEGMENT
__unwindtable$?Timing_Setup@@YAXXZ DD 0ffffffffH
	DD	FLAT:__unwindfunclet$?Timing_Setup@@YAXXZ$0
	DD	0ffffffffH
	DD	FLAT:__unwindfunclet$?Timing_Setup@@YAXXZ$1
__ehfuncinfo$?Timing_Setup@@YAXXZ DD 019930522H
	DD	02H
	DD	FLAT:__unwindtable$?Timing_Setup@@YAXXZ
	DD	2 DUP(00H)
	DD	2 DUP(00H)
	DD	00H
	DD	00H
; Function compile flags: /Odtp
xdata$x	ENDS
;	COMDAT ?Timing_Setup@@YAXXZ
_TEXT	SEGMENT
tv86 = -92						; size = 4
tv81 = -88						; size = 4
tv80 = -84						; size = 4
tv77 = -80						; size = 4
$T355328 = -76						; size = 28
$T355321 = -48						; size = 28
_tc$ = -20						; size = 8
__$EHRec$ = -12						; size = 12
?Timing_Setup@@YAXXZ PROC				; Timing_Setup, COMDAT

; 62   : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	6a ff		 push	 -1
  00005	68 00 00 00 00	 push	 __ehhandler$?Timing_Setup@@YAXXZ
  0000a	64 a1 00 00 00
	00		 mov	 eax, DWORD PTR fs:0
  00010	50		 push	 eax
  00011	83 ec 50	 sub	 esp, 80			; 00000050H
  00014	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  00019	33 c5		 xor	 eax, ebp
  0001b	50		 push	 eax
  0001c	8d 45 f4	 lea	 eax, DWORD PTR __$EHRec$[ebp]
  0001f	64 a3 00 00 00
	00		 mov	 DWORD PTR fs:0, eax

; 63   :     #define TARGET_RESOLUTION 3
; 64   : 
; 65   :     TIMECAPS tc;
; 66   : 
; 67   :     if (timeGetDevCaps(&tc, sizeof(TIMECAPS)) != TIMERR_NOERROR)

  00025	6a 08		 push	 8
  00027	8d 45 ec	 lea	 eax, DWORD PTR _tc$[ebp]
  0002a	50		 push	 eax
  0002b	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__timeGetDevCaps@8
  00031	85 c0		 test	 eax, eax
  00033	74 38		 je	 SHORT $LN4@Timing_Set

; 68   :     {
; 69   :         ErrorBox(_T("Failed to get Timer Resolution"));

  00035	68 00 00 00 00	 push	 OFFSET ??_C@_1DO@LEOCHEAF@?$AAF?$AAa?$AAi?$AAl?$AAe?$AAd?$AA?5?$AAt?$AAo?$AA?5?$AAg?$AAe?$AAt?$AA?5?$AAT?$AAi?$AAm?$AAe?$AAr?$AA?5?$AAR?$AAe?$AAs?$AAo?$AAl?$AAu?$AAt?$AAi?$AAo?$AAn?$AA?$AA@
  0003a	8d 4d d0	 lea	 ecx, DWORD PTR $T355321[ebp]
  0003d	e8 00 00 00 00	 call	 ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_W@Z ; std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >
  00042	c7 45 fc 00 00
	00 00		 mov	 DWORD PTR __$EHRec$[ebp+8], 0
  00049	8d 4d d0	 lea	 ecx, DWORD PTR $T355321[ebp]
  0004c	51		 push	 ecx
  0004d	6a 45		 push	 69			; 00000045H
  0004f	68 00 00 00 00	 push	 OFFSET ??_C@_1CE@JPHMLMPE@?$AA?4?$AA?2?$AAF?$AAi?$AAe?$AAl?$AAd?$AAT?$AAi?$AAm?$AAi?$AAn?$AAg?$AA?4?$AAc?$AAp?$AAp?$AA?$AA@
  00054	6a 00		 push	 0
  00056	e8 00 00 00 00	 call	 ?_ErrorBox@@YAXPAUHWND__@@PB_WHABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z ; _ErrorBox
  0005b	83 c4 10	 add	 esp, 16			; 00000010H
  0005e	c7 45 fc ff ff
	ff ff		 mov	 DWORD PTR __$EHRec$[ebp+8], -1
  00065	8d 4d d0	 lea	 ecx, DWORD PTR $T355321[ebp]
  00068	e8 00 00 00 00	 call	 ??1?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@XZ ; std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >::~basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >
$LN4@Timing_Set:

; 70   :     }
; 71   : 
; 72   :     wTimerRes = min(max(tc.wPeriodMin, TARGET_RESOLUTION), tc.wPeriodMax);

  0006d	83 7d ec 03	 cmp	 DWORD PTR _tc$[ebp], 3
  00071	76 08		 jbe	 SHORT $LN7@Timing_Set
  00073	8b 55 ec	 mov	 edx, DWORD PTR _tc$[ebp]
  00076	89 55 b0	 mov	 DWORD PTR tv77[ebp], edx
  00079	eb 07		 jmp	 SHORT $LN8@Timing_Set
$LN7@Timing_Set:
  0007b	c7 45 b0 03 00
	00 00		 mov	 DWORD PTR tv77[ebp], 3
$LN8@Timing_Set:
  00082	8b 45 b0	 mov	 eax, DWORD PTR tv77[ebp]
  00085	3b 45 f0	 cmp	 eax, DWORD PTR _tc$[ebp+4]
  00088	73 1d		 jae	 SHORT $LN11@Timing_Set
  0008a	83 7d ec 03	 cmp	 DWORD PTR _tc$[ebp], 3
  0008e	76 08		 jbe	 SHORT $LN9@Timing_Set
  00090	8b 4d ec	 mov	 ecx, DWORD PTR _tc$[ebp]
  00093	89 4d ac	 mov	 DWORD PTR tv80[ebp], ecx
  00096	eb 07		 jmp	 SHORT $LN10@Timing_Set
$LN9@Timing_Set:
  00098	c7 45 ac 03 00
	00 00		 mov	 DWORD PTR tv80[ebp], 3
$LN10@Timing_Set:
  0009f	8b 55 ac	 mov	 edx, DWORD PTR tv80[ebp]
  000a2	89 55 a8	 mov	 DWORD PTR tv81[ebp], edx
  000a5	eb 06		 jmp	 SHORT $LN12@Timing_Set
$LN11@Timing_Set:
  000a7	8b 45 f0	 mov	 eax, DWORD PTR _tc$[ebp+4]
  000aa	89 45 a8	 mov	 DWORD PTR tv81[ebp], eax
$LN12@Timing_Set:
  000ad	8b 4d a8	 mov	 ecx, DWORD PTR tv81[ebp]
  000b0	89 0d 00 00 00
	00		 mov	 DWORD PTR ?wTimerRes@@3IA, ecx ; wTimerRes

; 73   :     timeBeginPeriod(wTimerRes);

  000b6	8b 15 00 00 00
	00		 mov	 edx, DWORD PTR ?wTimerRes@@3IA ; wTimerRes
  000bc	52		 push	 edx
  000bd	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__timeBeginPeriod@4

; 74   : 
; 75   :     bIsPAL = GetTVFormat(Providers_GetCurrentSource()->GetFormat())->Is25fps;

  000c3	e8 00 00 00 00	 call	 ?Providers_GetCurrentSource@@YAPAVCSource@@XZ ; Providers_GetCurrentSource
  000c8	89 45 a4	 mov	 DWORD PTR tv86[ebp], eax
  000cb	8b 45 a4	 mov	 eax, DWORD PTR tv86[ebp]
  000ce	8b 10		 mov	 edx, DWORD PTR [eax]
  000d0	8b 4d a4	 mov	 ecx, DWORD PTR tv86[ebp]
  000d3	8b 42 64	 mov	 eax, DWORD PTR [edx+100]
  000d6	ff d0		 call	 eax
  000d8	50		 push	 eax
  000d9	e8 00 00 00 00	 call	 ?GetTVFormat@@YAPAUTTVFormat@@W4eVideoFormat@@@Z ; GetTVFormat
  000de	83 c4 04	 add	 esp, 4
  000e1	8b 48 10	 mov	 ecx, DWORD PTR [eax+16]
  000e4	89 0d 00 00 00
	00		 mov	 DWORD PTR ?bIsPAL@@3HA, ecx ; bIsPAL

; 76   : 
; 77   :     // get the Frequency of the high resolution timer
; 78   :     QueryPerformanceFrequency(&TimerFrequency);

  000ea	68 00 00 00 00	 push	 OFFSET ?TimerFrequency@@3T_LARGE_INTEGER@@A ; TimerFrequency
  000ef	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__QueryPerformanceFrequency@4

; 79   : 
; 80   :     hTimerEvent = CreateEvent(NULL, TRUE, FALSE, NULL);

  000f5	6a 00		 push	 0
  000f7	6a 00		 push	 0
  000f9	6a 01		 push	 1
  000fb	6a 00		 push	 0
  000fd	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__CreateEventW@16
  00103	a3 00 00 00 00	 mov	 DWORD PTR ?hTimerEvent@@3PAXA, eax ; hTimerEvent

; 81   :     if(hTimerEvent == NULL)

  00108	83 3d 00 00 00
	00 00		 cmp	 DWORD PTR ?hTimerEvent@@3PAXA, 0 ; hTimerEvent
  0010f	75 38		 jne	 SHORT $LN3@Timing_Set

; 82   :     {
; 83   :         ErrorBox(_T("Failed to create timing event"));

  00111	68 00 00 00 00	 push	 OFFSET ??_C@_1DM@LPJJDNJE@?$AAF?$AAa?$AAi?$AAl?$AAe?$AAd?$AA?5?$AAt?$AAo?$AA?5?$AAc?$AAr?$AAe?$AAa?$AAt?$AAe?$AA?5?$AAt?$AAi?$AAm?$AAi?$AAn?$AAg?$AA?5?$AAe?$AAv?$AAe?$AAn?$AAt?$AA?$AA@
  00116	8d 4d b4	 lea	 ecx, DWORD PTR $T355328[ebp]
  00119	e8 00 00 00 00	 call	 ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_W@Z ; std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >
  0011e	c7 45 fc 01 00
	00 00		 mov	 DWORD PTR __$EHRec$[ebp+8], 1
  00125	8d 55 b4	 lea	 edx, DWORD PTR $T355328[ebp]
  00128	52		 push	 edx
  00129	6a 53		 push	 83			; 00000053H
  0012b	68 00 00 00 00	 push	 OFFSET ??_C@_1CE@JPHMLMPE@?$AA?4?$AA?2?$AAF?$AAi?$AAe?$AAl?$AAd?$AAT?$AAi?$AAm?$AAi?$AAn?$AAg?$AA?4?$AAc?$AAp?$AAp?$AA?$AA@
  00130	6a 00		 push	 0
  00132	e8 00 00 00 00	 call	 ?_ErrorBox@@YAXPAUHWND__@@PB_WHABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z ; _ErrorBox
  00137	83 c4 10	 add	 esp, 16			; 00000010H
  0013a	c7 45 fc ff ff
	ff ff		 mov	 DWORD PTR __$EHRec$[ebp+8], -1
  00141	8d 4d b4	 lea	 ecx, DWORD PTR $T355328[ebp]
  00144	e8 00 00 00 00	 call	 ??1?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@XZ ; std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >::~basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >
$LN3@Timing_Set:

; 84   :     }
; 85   :     if(bIsPAL)

  00149	83 3d 00 00 00
	00 00		 cmp	 DWORD PTR ?bIsPAL@@3HA, 0 ; bIsPAL
  00150	74 20		 je	 SHORT $LN2@Timing_Set

; 86   :     {
; 87   :         RunningAverageCounterTicks = (double)TimerFrequency.QuadPart / 25.0;

  00152	df 2d 00 00 00
	00		 fild	 QWORD PTR ?TimerFrequency@@3T_LARGE_INTEGER@@A ; TimerFrequency
  00158	dc 35 00 00 00
	00		 fdiv	 QWORD PTR __real@4039000000000000
  0015e	dd 1d 00 00 00
	00		 fstp	 QWORD PTR ?RunningAverageCounterTicks@@3NA ; RunningAverageCounterTicks

; 88   :         StartAverageCounterTicks = RunningAverageCounterTicks;

  00164	dd 05 00 00 00
	00		 fld	 QWORD PTR ?RunningAverageCounterTicks@@3NA ; RunningAverageCounterTicks
  0016a	dd 1d 00 00 00
	00		 fstp	 QWORD PTR ?StartAverageCounterTicks@@3NA ; StartAverageCounterTicks

; 89   :     }
; 90   :     else

  00170	eb 1e		 jmp	 SHORT $LN1@Timing_Set
$LN2@Timing_Set:

; 91   :     {
; 92   :         RunningAverageCounterTicks = (double)TimerFrequency.QuadPart / 29.97;

  00172	df 2d 00 00 00
	00		 fild	 QWORD PTR ?TimerFrequency@@3T_LARGE_INTEGER@@A ; TimerFrequency
  00178	dc 35 00 00 00
	00		 fdiv	 QWORD PTR __real@403df851eb851eb8
  0017e	dd 1d 00 00 00
	00		 fstp	 QWORD PTR ?RunningAverageCounterTicks@@3NA ; RunningAverageCounterTicks

; 93   :         StartAverageCounterTicks = RunningAverageCounterTicks;

  00184	dd 05 00 00 00
	00		 fld	 QWORD PTR ?RunningAverageCounterTicks@@3NA ; RunningAverageCounterTicks
  0018a	dd 1d 00 00 00
	00		 fstp	 QWORD PTR ?StartAverageCounterTicks@@3NA ; StartAverageCounterTicks
$LN1@Timing_Set:

; 94   :     }
; 95   :     FlipAdjust = FALSE;

  00190	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?FlipAdjust@@3HA, 0 ; FlipAdjust

; 96   :     Timing_Reset();

  0019a	e8 00 00 00 00	 call	 ?Timing_Reset@@YAXXZ	; Timing_Reset

; 97   : }

  0019f	8b 4d f4	 mov	 ecx, DWORD PTR __$EHRec$[ebp]
  001a2	64 89 0d 00 00
	00 00		 mov	 DWORD PTR fs:0, ecx
  001a9	59		 pop	 ecx
  001aa	8b e5		 mov	 esp, ebp
  001ac	5d		 pop	 ebp
  001ad	c3		 ret	 0
_TEXT	ENDS
;	COMDAT text$x
text$x	SEGMENT
__unwindfunclet$?Timing_Setup@@YAXXZ$0:
  00000	8d 4d d0	 lea	 ecx, DWORD PTR $T355321[ebp]
  00003	e9 00 00 00 00	 jmp	 ??1?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@XZ ; std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >::~basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >
__unwindfunclet$?Timing_Setup@@YAXXZ$1:
  00008	8d 4d b4	 lea	 ecx, DWORD PTR $T355328[ebp]
  0000b	e9 00 00 00 00	 jmp	 ??1?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@XZ ; std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >::~basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >
__ehhandler$?Timing_Setup@@YAXXZ:
  00010	8b 54 24 08	 mov	 edx, DWORD PTR [esp+8]
  00014	8d 42 0c	 lea	 eax, DWORD PTR [edx+12]
  00017	8b 4a ac	 mov	 ecx, DWORD PTR [edx-84]
  0001a	33 c8		 xor	 ecx, eax
  0001c	e8 00 00 00 00	 call	 @__security_check_cookie@4
  00021	b8 00 00 00 00	 mov	 eax, OFFSET __ehfuncinfo$?Timing_Setup@@YAXXZ
  00026	e9 00 00 00 00	 jmp	 ___CxxFrameHandler3
text$x	ENDS
?Timing_Setup@@YAXXZ ENDP				; Timing_Setup
END
