;***********************************************************************
; H261.INI
;***********************************************************************

[VCP]                                         ; section for everyone

vcx_dwVidScnInterlaceMode  = 0
vcx_dwVidDramControl       = 0x0       ; 0x355 for 1Meg
                                       ; 0x255 for 2Meg
                                       ; 0x395 for 4Meg
                                       ; 0 for driver controlled
bEncExtraGrabFrame         = 1         ; 0 for 1Meg, 1 for 2Meg

; audio params
vcx_h261_audio             = 1         ; 1/0 : enable/audio
vcp_echo_cancellation      = 1;

; The variable vcp_swap_endian is for audio and effects the
; endian of PCM-16 audio. A value of 0 provides audio in the
; same format as /dev/audio on a Sun. A value of 1 swaps the
; the bytes of PCM16 and is the endian format for PCs
vcp_swap_endian = 0

;***********************************************************************

[H.261]   ; Variables common to all H261 configurations

; H261 Version 3.0
stream 0x4102              = vph261.010
vcx_bH261SkipVpReadback    = 1
dbg_dwDecBuffSize          = 0x1710

vcx_dwH261EncBitrate       = 96000 ; in bits per second              
vcx_dwH261EncTnr           = 0     ; turn on for rev3 chip only
vcx_bBchOn                 = 0     ; 0 for no BCH
vcx_dwH261EncIntraQuant    = 10    ; Quant for the intra frame
vcx_dwH261EncMotion15      = 1     ; switch for +-15/+-7 motion 
vcx_dwH261EncRateBuffer    = 1     ; if 0 will use MaxQuant always 

vcx_dwH261EncCif           = 1

vcx_dwH261EncMaxQuantCif       = 10 ; 0 - 31 large=fast, bad quality
vcx_dwH261EncFrameRateIndexCif = 5  ; max fps = (30 fps / index)      
vcx_dwH261EncIRefPeriodCif     = 17 ;
vcx_dwH261EncRepThrCif         = 20 ; replenishment threshold : 0 - 63 

vcx_dwH261EncMaxQuantQcif       = 10 ; 0 - 31 large=fast, bad quality
vcx_dwH261EncFrameRateIndexQcif = 5  ; max fps = (30 fps / index)      
vcx_dwH261EncIRefPeriodQcif     = 17 ;

dbg_dwBeamTraceMargin           = 144 ; this fixes slicing in qcif mode

vcx_dwH261ByteAlignPSC    = 1   ; Add MBS to byte align frames on PSC
vcx_dwH261EncIFramePeriod = 0   ; intra frame period (setting equal to 0
                                ; means no forced periodic I frame output)

;***********************************************************************

[VIDIN.NTSC]    ; Settings for NTSC video input source

vcx_dwH261EncNTSC     = 1
vcx_dwH261DecNTSC     = 1

; NTSC CAMERA SETTINGS

vcx_dwVidCamHstart    = 140
vcx_dwVidCamHendCif   = 840
vcx_dwVidCamHendQcif  = 836

vcx_dwVidCamVstart    = 15
vcx_dwVidCamVend      = 256
vcx_dwVidCamVertirq   = 256

vcx_dwVidCamMode0Cif  = 0x01ed  ; 7 tap filter with uv skew
vcx_dwVidCamMode0Qcif = 0x01ed  ; 7 tap filter with uv skew

;***********************************************************************

[VIDIN.PAL]    ; Settings for PAL video input source

vcx_dwH261EncNTSC     = 0
vcx_dwH261DecNTSC     = 0

; PAL CAMERA SETTINGS

vcx_dwVidCamHstart    = 150 ; Anything less has color problems at left edge
vcx_dwVidCamHendCif   = 850 ;
vcx_dwVidCamHendQcif  = 846 ;

vcx_dwVidCamVstart    = 16  ; Anything less gets junk at top of image, anything more
                                    ; gets junk at bottom of image with our PAL camera
vcx_dwVidCamVend      = 305 ;
vcx_dwVidCamVertirq   = 306 ; Anything greater doesn't update with our PAL camera

vcx_dwVidCamMode0Cif  = 0x11ed  ; 3 tap filter with uv skew
vcx_dwVidCamMode0Qcif = 0x11ed  ; 3 tap filter with uv skew

dbg_dwAnnexdFieldSize = 288 ;

vcx_dwAVCForceOdd = 0;

;***********************************************************************

[VIDOUT.PCI]

; Settings for digital video out via PCI to video adapter or buffer on host

vcx_dwVidScnMisc0            = 0x18
vcx_dwVidScnOutputcntl       = 0x2010
vcx_dwVidScnCounterCtl       = 0x11
vcx_dwVidScnInterlaceMode    = 0x0

vcx_dwVidScnHstart           = 10;
vcx_dwVidScnHend             = 363; (352+vcx_dwVidScnHstart+1)
vcx_dwVidScnHblankStart      = 363;
vcx_dwVidScnHblankStop       = 10;
vcx_dwVidScnHsyncPeriod      = 820 
vcx_dwVidScnHsyncWidth       = 2

vcx_dwVidScnVstart           = 3; 
vcx_dwVidScnVblankStop       = 2;
; FOR VPIC 3511:
;  SCREEN 1 vcx_dwVidScnVsyncDelayedOdd  == vcx_dwVidScnHsyncPeriod
;  SCREEN2  vcx_dwVidScnVsyncDelayedEven == 1
vcx_dwVidScnVsyncDelayedOdd  = 1
vcx_dwVidScnVsyncDelayedEven = 410
vcx_dwVidScnVsyncPeriodOdd   = 490;
vcx_dwVidScnVsyncPeriodEven  = 490;
vcx_dwVidScnVertirq          = 480;
vcx_dwVidScnVsyncWidth       = 3



; CIF specific settings

vcx_dwVidScnYStartstopCif    = 0x2c48;   (88 << 7) | 72 ; 0x2c48
vcx_dwVidScnUVStartstopCif   = 0x1624;   (44 << 7) | 36 
vcx_dwVidScnIncvalCif        = 0x1000

; QCIF specific settings

vcx_dwVidScnYStartstopQcif   = 0x1817; (35 << 7) | 27
vcx_dwVidScnUVStartstopQcif  = 0x0d0c; (20<< 7) | 19
vcx_dwVidScnIncvalQcif       = 0x1000

;vcx_dwVidDmaScaleValueQcif  = 0x20
;vcx_dwVidDmaScaleTypeQcif   = 0x55

vcx_osprey_local_and_far     = 0
vcx_release_wait             = 0

;***********************************************************************

[VIDOUT.PCI.NTSC]   ; Settings for NTSC video out via PCI to host

; NTSC SCREEN SETTINGS
; CIF  244, 253  CIFs  292, 301  
; QCIF 124, 133  QCIFs 148, 157

vcx_dwVidScnVend             = 244 ;       
vcx_dwVidScnVblankStart      = 253 ; 
vcx_dwVidScnVertsize         = 239 ; 

vcx_dwVidScnVendCif          = 244 ;       
vcx_dwVidScnVblankStartCif   = 253 ; 

vcx_dwVidScnVendQcif         = 124 ;     
vcx_dwVidScnVblankStartQcif  = 133 ; 

;***********************************************************************

[VIDOUT.PCI.PAL]   ; Settings for PAL video out via PCI to host

; PAL SCREEN SETTINGS
; CIF  244, 253  CIFs  292, 301  
; QCIF 124, 133  QCIFs 148, 157

vcx_dwVidScnVend             = 292 ; 
vcx_dwVidScnVblankStart      = 301 ; 
vcx_dwVidScnVertsize         = 287 ; 

vcx_dwVidScnVendCif          = 292 ; 
vcx_dwVidScnVblankStartCif   = 301 ; 

vcx_dwVidScnVendQcif         = 148 ; 
vcx_dwVidScnVblankStartQcif  = 157 ; 

;***********************************************************************

[VIDOUT.BT]   ; Settings for analog video out via Brooktree D/A

vcx_dwVidScnMisc0            = 0x18
vcx_dwVidScnOutputcntl       = 0x2380
vcx_dwVidScnCounterCtl       = 0x17	; 6/16/98 LEM 
vcx_dwVidScnInterlaceMode    = 0x0

vcx_dwVidScnYStartstopCif    = 0x2c48;  (88 << 7) | 72
vcx_dwVidScnUVStartstopCif   = 0x1624;  (44 << 7) | 36
vcx_dwVidScnIncvalCif        = 0x800

vcx_dwVidScnYStartstopQcif   = 0x119b;  (35 << 7) | 27
vcx_dwVidScnUVStartstopQcif  = 0x0a13;  (20<< 7) | 19
vcx_dwVidScnIncvalQcif       = 0x400
vcx_dwVidDmaScaleValueQcif   = 0x10
;vcx_dwVidDmaScaleTypeQcif   = 0x55;    ### variable not defined in VCX

vcx_osprey_local_and_far     = 0
vcx_release_wait             = 0

;***********************************************************************

[VIDOUT.BT.NTSC]    ; Settings for analog NTSC out with VCP as sync. master

vcx_dwVidScnHstart           = 131	; 6/16/98 LEM was 141
vcx_dwVidScnHend             = 834	; 6/16/98 LEM was 844;     (Hstart+704-1)
vcx_dwVidScnHblankStart      = 833	; 6/16/98 LEM was 840
vcx_dwVidScnHblankStop       = 135	; 6/16/98 LEM was 141
vcx_dwVidScnHsyncPeriod      = 858	; 6/16/98 LEM 
vcx_dwVidScnHsyncWidth       = 60	; 6/16/98 LEM

vcx_dwVidScnVstart           = 10
vcx_dwVidScnVend             = 251
vcx_dwVidScnVblankStart      = 251
vcx_dwVidScnVblankStop       = 14	; 6/16/98 LEM was 11
vcx_dwVidScnVsyncDelayedOdd  = 429	; 6/16/98 LEM
vcx_dwVidScnVsyncDelayedEven = 857	; 6/16/98 LEM
vcx_dwVidScnVsyncWidth       = 3	; 6/16/98 LEM
vcx_dwVidScnVsyncPeriodOdd   = 263
vcx_dwVidScnVsyncPeriodEven  = 262
vcx_dwVidScnVertirq          = 252

vcx_dwVidScnVendCif          = 251
vcx_dwVidScnVblankStartCif   = 251

vcx_dwVidScnVendQcif         = 251
vcx_dwVidScnVblankStartQcif  = 251

;***********************************************************************

[VIDOUT.BT.PAL]    ; Settings for analog PAL out with VCP as sync. master

vcx_dwVidScnHstart           = 143	; 6/17/98 LEM was 141
vcx_dwVidScnHend             = 846	; 6/17/98 LEM was 844;     (Hstart+704-1)
vcx_dwVidScnHblankStart      = 843	; 6/17/98 LEM was 840
vcx_dwVidScnHblankStop       = 146	; 6/17/98 LEM was 141
vcx_dwVidScnHsyncPeriod      = 864	; 6/16/98 LEM was 858
vcx_dwVidScnHsyncWidth       = 60	; 6/16/98 LEM

vcx_dwVidScnVstart           = 13
vcx_dwVidScnVend             = 301
vcx_dwVidScnVblankStart      = 301
vcx_dwVidScnVblankStop       = 14
vcx_dwVidScnVsyncDelayedOdd  = 431	; 6/16/98 LEM was 429
vcx_dwVidScnVsyncDelayedEven = 20	; 6/16/98 LEM was 857
vcx_dwVidScnVsyncWidth       = 3;       [3]
vcx_dwVidScnVsyncPeriodOdd   = 312	; 6/16/98 LEM was 311
vcx_dwVidScnVsyncPeriodEven  = 313	; 6/16/98 LEM was 310
vcx_dwVidScnVertirq          = 302

vcx_dwVidScnVendCif          = 301
vcx_dwVidScnVblankStartCif   = 301

vcx_dwVidScnVendQcif         = 301
vcx_dwVidScnVblankStartQcif  = 301

;***********************************************************************

[VIDOUT.BT.NTSC.MASTER]    ; Analog NTSC out with Brooktree as sync. master

vcx_dwVidScnCounterCtl       = 0x10;    bt856 is master 

vcx_dwVidScnHstart           = 60
vcx_dwVidScnHend             = 853;     (Hstart+704-1)
vcx_dwVidScnHblankStart      = 850
vcx_dwVidScnHblankStop       = 60

vcx_dwVidScnVstart           = 10
vcx_dwVidScnVend             = 251
vcx_dwVidScnVblankStart      = 251
vcx_dwVidScnVblankStop       = 14
vcx_dwVidScnVsyncPeriodOdd   = 262
vcx_dwVidScnVsyncPeriodEven  = 262
vcx_dwVidScnVertirq          = 252

vcx_dwVidScnVendCif          = 251
vcx_dwVidScnVblankStartCif   = 251

vcx_dwVidScnVendQcif         = 251
vcx_dwVidScnVblankStartQcif  = 251

;***********************************************************************

[VIDOUT.BT.PAL.MASTER]    ; Analog PAL out with Brooktree as sync. master

vcx_dwVidScnCounterCtl       = 0x10;    bt856 is master 

vcx_dwVidScnHstart           = 60
vcx_dwVidScnHend             = 863;     (Hstart+704-1)
vcx_dwVidScnHblankStart      = 863
vcx_dwVidScnHblankStop       = 60

vcx_dwVidScnVstart           = 13
vcx_dwVidScnVend             = 301
vcx_dwVidScnVblankStart      = 301
vcx_dwVidScnVblankStop       = 14
vcx_dwVidScnVsyncPeriodOdd   = 310
vcx_dwVidScnVsyncPeriodEven  = 310
vcx_dwVidScnVertirq          = 302

vcx_dwVidScnVendCif          = 301
vcx_dwVidScnVblankStartCif   = 301

vcx_dwVidScnVendQcif         = 301
vcx_dwVidScnVblankStartQcif  = 301

;***********************************************************************
; eof
