/////////////////////////////////////////////////////////////////////////////
// Copyright (c) Winnov Inc., 1994.  All rights reserved
// compile.h
/////////////////////////////////////////////////////////////////////////////

#define COMPFLAG_SYNCPOLARITY	0x0001	//  Vertical sync signal polarity (blank level)
#define COMPFLAG_FIELDORDER	0x0002	//  Order of fields for interlaced capture
#define COMPFLAG_VSDELAY	0x0004	//  Generate delay instruction after vertical blank
#define COMPFLAG_AVPRO_DMA	0x0008	//  Insert AV Pro DMA trigger instructions
#define COMPFLAG_AVPRO_INT	0x0010	//  Insert AV Pro interrupt instructions
#define COMPFLAG_HUFFMAN	0x0020	//  Microcode intended for Huffman capture
#define COMPFLAG_MCLK_2X	0x0040	//  MCLK is 2X VCLK
#define COMPFLAG_MARKERCODE	0x0080	//  Generate microcode for marker capture
#define COMPFLAG_EOFINT		0x0100	//  End-of-frame interrupt, ITR2
#define COMPFLAG_PREFERREDFIELD	0x0200	//  Preferred field for single-field capture


extern DWORD CompileMicrocode (
    BOOL bBothFields,
    DWORD dwVideoLeft,
    DWORD dwVideoTop,
    DWORD dwVideoWidth,
    DWORD dwVideoHeight,
    DWORD dwCaptureWidth,
    DWORD dwCaptureHeight,
    DWORD dwInterruptLine,
    DWORD dwDmaLine,
    LPSTR lpMicrocode,
    BOOL bEnablelineAvg,
    int  nHSkip,
    int  nVSkip,
    int  nActiveWidth,
    DWORD dwFlags);

extern long CompileStillMicrocode (
    LPSTR lpMicrocode,
    BOOL bCaptureBothFields,
    BOOL bCapture2Fields,
    int  nFieldOffset,
    UINT nReserved,
    UINT nVideoLeft, UINT nVideoTop,
    UINT nVideoWidth, UINT nVideoHeight,
    UINT nCaptureWidth, UINT nCaptureHeight,
    UINT nHSkip, UINT nVSkip, UINT nActiveWidth, 
    BOOL bAnalog, DWORD dwFlags);

extern LRESULT UpdateStillMicrocode (
    LPSTR lpMicrocode,		// microcode
    UINT nFieldSize,		// size of one field of microcode
    BOOL b2Fields,
    UINT nReservedOffset,	// offset
    UINT nCount,		// size
    UINT nCommand);		// command
#define INSERT_NOPS	1
#define INSERT_VSKIPS	2
