Lines Matching defs:pXGI
46 static CARD32 _XGIRead(XGIPtr pXGI, CARD32 reg)
48 return *(pXGI->IOBase + reg);
51 static void _XGIWrite(XGIPtr pXGI, CARD32 reg, CARD32 data)
53 *(pXGI->IOBase + reg) = data;
56 static CARD8 GetVideoReg(XGIPtr pXGI, CARD8 reg)
58 outb (pXGI->RelIO + vi_index_offset, reg);
59 return inb(pXGI->RelIO + vi_data_offset);
62 static void SetVideoReg(XGIPtr pXGI, CARD8 reg, CARD8 data)
64 outb (pXGI->RelIO + vi_index_offset, reg);
65 outb (pXGI->RelIO + vi_data_offset, data);
68 static void SetVideoRegMask(XGIPtr pXGI, CARD8 reg, CARD8 data, CARD8 mask)
72 outb (pXGI->RelIO + vi_index_offset, reg);
73 old = inb(pXGI->RelIO + vi_data_offset);
75 outb (pXGI->RelIO + vi_data_offset, data);
78 static CARD8 GetSRReg(XGIPtr pXGI, CARD8 reg)
80 outb (pXGI->RelIO + sr_index_offset, 0x05);
81 if (inb (pXGI->RelIO + sr_data_offset) != 0xa1)
82 outb (pXGI->RelIO + sr_data_offset, 0x86);
83 outb (pXGI->RelIO + sr_index_offset, reg);
84 return inb(pXGI->RelIO + sr_data_offset);
87 static void SetSRReg(XGIPtr pXGI, CARD8 reg, CARD8 data)
89 outb (pXGI->RelIO + sr_index_offset, 0x05);
90 if (inb (pXGI->RelIO + sr_data_offset) != 0xa1)
91 outb (pXGI->RelIO + sr_data_offset, 0x86);
92 outb (pXGI->RelIO + sr_index_offset, reg);
93 outb (pXGI->RelIO + sr_data_offset, data);
96 void SetSRRegMask(XGIPtr pXGI, CARD8 reg, CARD8 data, CARD8 mask)
100 outb (pXGI->RelIO + sr_index_offset, 0x05);
101 if (inb (pXGI->RelIO + sr_data_offset) != 0xa1)
102 outb (pXGI->RelIO + sr_data_offset, 0x86);
103 outb (pXGI->RelIO + sr_index_offset, reg);
104 old = inb(pXGI->RelIO + sr_data_offset);
106 outb (pXGI->RelIO + sr_data_offset, data);
109 static void SetVCReg(XGIPtr pXGI, CARD8 reg, CARD8 data)
111 outb (pXGI->RelIO + vc_index_offset, reg);
112 outb (pXGI->RelIO + vc_data_offset, data);
115 static void SetVCRegMask(XGIPtr pXGI, CARD8 reg, CARD8 data, CARD8 mask)
119 outb (pXGI->RelIO + vc_index_offset, reg);
120 old = inb(pXGI->RelIO + vc_data_offset);
122 outb (pXGI->RelIO + vc_data_offset, data);
125 static CARD8 GetXGIReg(XGIPtr pXGI, CARD8 index_offset, CARD8 reg)
127 outb (pXGI->RelIO + index_offset, reg);
128 return inb(pXGI->RelIO + index_offset+1);
131 static void SetXGIReg(XGIPtr pXGI, CARD8 index_offset, CARD8 reg, CARD8 data)
133 outb (pXGI->RelIO + index_offset, reg);
134 outb (pXGI->RelIO + index_offset+1, data);
155 void SetEnableCaptureReg(XGIPtr pXGI, Bool bEnable, Bool bFlip)
159 SetVCRegMask(pXGI, Index_VC_Ver_Down_Scale_Factor_Over, 0x00, 0x10);
161 if (pXGI->Chipset == PCI_CHIP_XGIXG40)
162 SetVideoRegMask(pXGI, Index_VI_Key_Overlay_OP, 0x20, 0x20);
164 SetVideoRegMask(pXGI, Index_VI_Control_Misc0, 0x01, 0x01);
168 SetVCRegMask(pXGI, Index_VC_Ver_Down_Scale_Factor_Over, 0x10, 0x10);
170 if (pXGI->Chipset == PCI_CHIP_XGIXG40)
171 SetVideoRegMask(pXGI, Index_VI_Key_Overlay_OP, 0x00, 0x20);
173 SetVideoRegMask(pXGI, Index_VI_Control_Misc0, 0x00, 0x01);
177 if (pXGI->Chipset == PCI_CHIP_XGIXG40)
180 SetVideoRegMask(pXGI, Index_VI_Control_Misc0, 0x01, 0x01);
182 SetVideoRegMask(pXGI, Index_VI_Control_Misc0, 0x00, 0x01);
186 void T05_EnableCapture(XGIPtr pXGI, Bool bEnable)
190 SetVCRegMask(pXGI, Index_VC_Ver_Down_Scale_Factor_Over, 0x00, 0x10);
191 SetVideoRegMask(pXGI, Index_VI_Control_Misc0, 0x01, 0x01);
195 SetVCRegMask(pXGI, Index_VC_Ver_Down_Scale_Factor_Over, 0x10, 0x10);
196 SetVideoRegMask(pXGI, Index_VI_Control_Misc0, 0x00, 0x01);
202 XGIComputeXvGamma(XGIPtr pXGI)
205 double red = 1.0 / (double)((double)pXGI->XvGammaRed / 1000);
206 double green = 1.0 / (double)((double)pXGI->XvGammaGreen / 1000);
207 double blue = 1.0 / (double)((double)pXGI->XvGammaBlue / 1000);
210 pXGI->XvGammaRampRed[i] =
213 pXGI->XvGammaRampGreen[i] =
216 pXGI->XvGammaRampBlue[i] =
222 XGISetXvGamma(XGIPtr pXGI)
225 unsigned char backup = GetSRReg(pXGI, Index_SR_Power_Management);
229 SetSRRegMask(pXGI, Index_SR_Power_Management, 0x08, 0x18);
231 MMIO_OUT32(pXGI->IOBase, REG_GAMMA_PALETTE,
233 (pXGI->XvGammaRampBlue[i] << 16) |
234 (pXGI->XvGammaRampGreen[i] << 8) |
235 pXGI->XvGammaRampRed[i]);
237 SetSRRegMask(pXGI, Index_SR_Power_Management, backup, 0xff);
241 XGIUpdateXvGamma(XGIPtr pXGI, XGIPortPrivPtr pPriv)
243 unsigned char sr7 = GetSRReg(pXGI, Index_SR_RAMDAC_Ctrl);
248 XGIComputeXvGamma(pXGI);
249 XGISetXvGamma(pXGI);
253 VOID SetDDAReg (XGIPtr pXGI, float scale)
350 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_A0, WeightMat[0][0], 0x3F);
351 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_A1, WeightMat[0][1], 0x3F);
352 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_A2, WeightMat[0][2], 0x3F);
353 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_A3, WeightMat[0][3], 0x3F);
354 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_B0, WeightMat[1][0], 0x3F);
355 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_B1, WeightMat[1][1], 0x3F);
356 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_B2, WeightMat[1][2], 0x3F);
357 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_B3, WeightMat[1][3], 0x3F);
358 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_C0, WeightMat[2][0], 0x3F);
359 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_C1, WeightMat[2][1], 0x3F);
360 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_C2, WeightMat[2][2], 0x3F);
361 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_C3, WeightMat[2][3], 0x3F);
362 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_D0, WeightMat[3][0], 0x3F);
363 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_D1, WeightMat[3][1], 0x3F);
364 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_D2, WeightMat[3][2], 0x3F);
365 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_D3, WeightMat[3][3], 0x3F);
366 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_E0, WeightMat[4][0], 0x3F);
367 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_E1, WeightMat[4][1], 0x3F);
368 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_E2, WeightMat[4][2], 0x3F);
369 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_E3, WeightMat[4][3], 0x3F);
370 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_F0, WeightMat[5][0], 0x3F);
371 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_F1, WeightMat[5][1], 0x3F);
372 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_F2, WeightMat[5][2], 0x3F);
373 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_F3, WeightMat[5][3], 0x3F);
374 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_G0, WeightMat[6][0], 0x3F);
375 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_G1, WeightMat[6][1], 0x3F);
376 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_G2, WeightMat[6][2], 0x3F);
377 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_G3, WeightMat[6][3], 0x3F);
378 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_H0, WeightMat[7][0], 0x3F);
379 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_H1, WeightMat[7][1], 0x3F);
380 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_H2, WeightMat[7][2], 0x3F);
381 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_H3, WeightMat[7][3], 0x3F);
382 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_I0, WeightMat[8][0], 0x3F);
383 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_I1, WeightMat[8][1], 0x3F);
384 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_I2, WeightMat[8][2], 0x3F);
385 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_I3, WeightMat[8][3], 0x3F);
386 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_J0, WeightMat[9][0], 0x3F);
387 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_J1, WeightMat[9][1], 0x3F);
388 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_J2, WeightMat[9][2], 0x3F);
389 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_J3, WeightMat[9][3], 0x3F);
390 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_K0, WeightMat[10][0], 0x3F);
391 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_K1, WeightMat[10][1], 0x3F);
392 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_K2, WeightMat[10][2], 0x3F);
393 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_K3, WeightMat[10][3], 0x3F);
394 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_L0, WeightMat[11][0], 0x3F);
395 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_L1, WeightMat[11][1], 0x3F);
396 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_L2, WeightMat[11][2], 0x3F);
397 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_L3, WeightMat[11][3], 0x3F);
398 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_M0, WeightMat[12][0], 0x3F);
399 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_M1, WeightMat[12][1], 0x3F);
400 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_M2, WeightMat[12][2], 0x3F);
401 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_M3, WeightMat[12][3], 0x3F);
402 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_N0, WeightMat[13][0], 0x3F);
403 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_N1, WeightMat[13][1], 0x3F);
404 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_N2, WeightMat[13][2], 0x3F);
405 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_N3, WeightMat[13][3], 0x3F);
406 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_O0, WeightMat[14][0], 0x3F);
407 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_O1, WeightMat[14][1], 0x3F);
408 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_O2, WeightMat[14][2], 0x3F);
409 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_O3, WeightMat[14][3], 0x3F);
410 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_P0, WeightMat[15][0], 0x3F);
411 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_P1, WeightMat[15][1], 0x3F);
412 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_P2, WeightMat[15][2], 0x3F);
413 SetVideoRegMask(pXGI, Index_DDA_Weighting_Matrix_P3, WeightMat[15][3], 0x3F);
419 XGIPtr pXGI = XGIPTR(pScrn);
423 XGIUpdateXvGamma(pXGI, pPriv);
425 if (GetSRReg (pXGI, 0x05) != 0xa1)
427 SetSRReg (pXGI, 0x05, 0x86);
428 if (GetSRReg (pXGI, 0x05) != 0xa1)
433 if (GetVideoReg (pXGI, Index_VI_Passwd) != 0xa1)
435 SetVideoReg (pXGI, Index_VI_Passwd, 0x86);
436 if (GetVideoReg (pXGI, Index_VI_Passwd) != 0xa1)
443 SetVideoRegMask(pXGI, Index_VI_Control_Misc2, 0x00, 0x81);
444 SetVideoRegMask(pXGI, Index_VI_Control_Misc0, 0x00, 0x03);
446 SetVideoRegMask(pXGI, Index_VI_Control_Misc1, 0x82, 0x82);
447 SetVideoRegMask(pXGI, Index_VI_Scale_Control, 0x60, 0x60);
448 SetVideoRegMask(pXGI, Index_VI_Contrast_Enh_Ctrl, 0x04, 0x1F);
450 SetVideoReg(pXGI, Index_VI_Disp_Y_Buf_Preset_Low, 0x00);
451 SetVideoReg(pXGI, Index_VI_Disp_Y_Buf_Preset_Middle, 0x00);
452 SetVideoReg(pXGI, Index_VI_Disp_UV_Buf_Preset_Low, 0x00);
453 SetVideoReg(pXGI, Index_VI_Disp_UV_Buf_Preset_Middle, 0x00);
454 SetVideoReg(pXGI, Index_VI_Disp_Y_UV_Buf_Preset_High, 0x00);
455 SetVideoReg(pXGI, Index_VI_Play_Threshold_Low, 0x00);
456 SetVideoRegMask(pXGI, Index_VI_Play_Threshold_Low_Ext, 0x00, 0x01);
457 SetVideoReg(pXGI, Index_VI_Play_Threshold_High, 0x00);
458 SetVideoRegMask(pXGI, Index_VI_Play_Threshold_High_Ext, 0x00, 0x01);
461 SetSRRegMask(pXGI, Index_SR_CRT_Misc_Ctrl, 0x00, 0x02);
464 SetEnableCaptureReg(pXGI, FALSE, FALSE);
466 SetEnableCaptureReg(pXGI, FALSE);
470 SetSRRegMask(pXGI, Index_Video_Process, 0x00, 0x02);
473 SetVideoRegMask(pXGI, Index_VI_Key_Overlay_OP, 0x40, 0x40);
475 SetVideoRegMask(pXGI, Index_VI_Key_Overlay_OP, 0x00, 0x80);
477 SetDDAReg (pXGI, 1.0);
480 SetVideoRegMask(pXGI, Index_VI_Key_Overlay_OP, 0x20, 0x20);
483 SetVideoRegMask(pXGI, Index_VI_Key_Overlay_OP, 0x00, 0x10);
486 SetVideoReg(pXGI, Index_VI_Brightness, Default_Brightness);
487 SetVideoRegMask(pXGI, Index_VI_Contrast_Enh_Ctrl, Default_Contrast, 0x07);
488 SetVideoReg(pXGI, Index_VI_Saturation, Default_Saturation);
489 SetVideoRegMask(pXGI, Index_VI_Hue, Default_Hue, 0x07);
493 SetMergeLineBufReg(XGIPtr pXGI, Bool enable)
497 SetVideoRegMask(pXGI, Index_VI_Control_Misc2, 0x00, 0x11);
499 SetVideoRegMask(pXGI, Index_VI_Control_Misc1, 0x04, 0x04);
503 SetVideoRegMask(pXGI, Index_VI_Control_Misc2, 0x00, 0x11);
505 SetVideoRegMask(pXGI, Index_VI_Control_Misc1, 0x00, 0x04);
510 SetVideoFormatReg(XGIPtr pXGI, int format)
553 SetVideoRegMask(pXGI, Index_VI_Control_Misc0, fmt, 0x7c);
557 SetColorkeyReg(XGIPtr pXGI, CARD32 colorkey)
566 SetVideoReg(pXGI, Index_VI_Overlay_ColorKey_Blue_Min , b);
567 SetVideoReg(pXGI, Index_VI_Overlay_ColorKey_Green_Min , g);
568 SetVideoReg(pXGI, Index_VI_Overlay_ColorKey_Red_Min , r);
570 SetVideoReg(pXGI, Index_VI_Overlay_ColorKey_Blue_Max , b);
571 SetVideoReg(pXGI, Index_VI_Overlay_ColorKey_Green_Max , g);
572 SetVideoReg(pXGI, Index_VI_Overlay_ColorKey_Red_Max , r);
576 SetVideoBrightnessReg(XGIPtr pXGI, INT32 value)
582 SetVideoReg(pXGI, Index_VI_Brightness ,brightness);
586 SetVideoContrastReg(XGIPtr pXGI, INT32 value)
592 SetVideoRegMask(pXGI, Index_VI_Contrast_Enh_Ctrl, contrast, 0x07);
596 SetVideoHueReg(XGIPtr pXGI, INT32 value)
602 SetVideoRegMask(pXGI, Index_VI_Hue, 0x00, 0x08);
606 SetVideoRegMask(pXGI, Index_VI_Hue, 0x08, 0x08);
614 SetVideoRegMask(pXGI, Index_VI_Hue, hue, 0x07);
618 SetVideoSaturationReg(XGIPtr pXGI, INT32 value)
624 SetVideoRegMask(pXGI, Index_VI_Saturation, 0x00, 0x08);
625 SetVideoRegMask(pXGI, Index_VI_Saturation, 0x00, 0x80);
629 SetVideoRegMask(pXGI, Index_VI_Saturation, 0x08, 0x08);
630 SetVideoRegMask(pXGI, Index_VI_Saturation, 0x80, 0x80);
637 SetVideoRegMask(pXGI, Index_VI_Saturation, saturation, 0x07);
638 SetVideoRegMask(pXGI, Index_VI_Saturation, saturation << 4, 0x70);
642 SetOverlayReg(XGIPtr pXGI, XGIOverlayPtr pOverlay)
645 ScrnInfoPtr pScrn = pXGI->pScrn;
667 SetVideoReg(pXGI, Index_VI_Win_Hor_Disp_Start_Low, LOBYTE(left));
668 SetVideoReg(pXGI, Index_VI_Win_Hor_Disp_End_Low, LOBYTE(right));
669 SetVideoReg(pXGI, Index_VI_Win_Hor_Over, (HIBYTE(right)<<4)|HIBYTE(left));
671 SetVideoReg(pXGI, Index_VI_Win_Ver_Disp_Start_Low, LOBYTE(top));
672 SetVideoReg(pXGI, Index_VI_Win_Ver_Disp_End_Low, LOBYTE(bottom));
673 SetVideoReg(pXGI, Index_VI_Win_Ver_Over, (HIBYTE(bottom)<<4)|HIBYTE(top));
676 SetVideoRegMask(pXGI, Index_VI_Contrast_Enh_Ctrl, pOverlay->dwContrastFactor << 6, 0xc0);
677 SetVideoReg(pXGI, Index_VI_Contrast_Factor, pOverlay->SamplePixel);
679 /* SetVideoRegMask(pXGI, Index_VI_Control_Misc3, 0x00, 0x03); */
682 SetMergeLineBufReg(pXGI, pOverlay->pitch > pPriv->linebufMergeLimit);
685 SetVideoFormatReg(pXGI, pOverlay->pixelFormat);
688 SetVideoReg(pXGI, Index_VI_Line_Buffer_Size, LOBYTE(LOWORD(pOverlay->lineBufSize)));
689 SetVideoReg(pXGI, Index_VI_Line_Buffer_Size_Ext, HIBYTE(LOWORD(pOverlay->lineBufSize)));
692 SetVideoRegMask (pXGI, Index_VI_Key_Overlay_OP, pOverlay->keyOP, 0x0f);
696 SetVideoReg (pXGI, Index_VI_Hor_Post_Up_Scale_Low, LOBYTE(pOverlay->HUSF));
697 SetVideoReg (pXGI, Index_VI_Hor_Post_Up_Scale_High, HIBYTE(pOverlay->HUSF));
699 SetVideoReg (pXGI, Index_VI_Ver_Up_Scale_Low, LOBYTE(pOverlay->VUSF));
700 SetVideoReg (pXGI, Index_VI_Ver_Up_Scale_High, HIBYTE(pOverlay->VUSF));
702 SetVideoRegMask (pXGI, Index_VI_Scale_Control, (pOverlay->IntBit << 3)|(pOverlay->wHPre), 0x7f);
705 SetDDAReg(pXGI, pOverlay->f_scale);
708 SetVideoRegMask(pXGI, Index_VI_Control_Misc1, pOverlay->bobEnable, 0x1a);
713 SetVideoReg (pXGI, Index_VI_Disp_Y_Buf_Start_Low, LOBYTE(LOWORD(PSY)));
714 SetVideoReg (pXGI, Index_VI_Disp_Y_Buf_Start_Middle, HIBYTE(LOWORD(PSY)));
715 SetVideoReg (pXGI, Index_VI_Disp_Y_Buf_Start_High, LOBYTE(HIWORD(PSY)));
716 SetVideoRegMask(pXGI, Index_VI_Disp_Y_Buf_EXT_High, HIBYTE(HIWORD(PSY)), 0x03);
733 SetVideoReg (pXGI, Index_VI_Disp_UV_Buf_Pitch_Low, LOBYTE(LOWORD(uvpitch)));
734 SetVideoReg (pXGI, Index_VI_Disp_Y_UV_Buf_Pitch_High, bYUV_Pitch_High);
735 SetVideoRegMask(pXGI, Index_VI_Disp_UV_Buf_Pitch_EXT_High, uvpitch >> 12, 0x1f);
741 SetVideoReg(pXGI, Index_VI_Disp_U_Buf_Start_Low, LOBYTE(LOWORD(PSU)));
742 SetVideoReg(pXGI, Index_VI_Disp_U_Buf_Start_Middle, HIBYTE(LOWORD(PSU)));
743 SetVideoReg(pXGI, Index_VI_Disp_U_Buf_Start_High, LOBYTE(HIWORD(PSU)));
745 SetVideoRegMask(pXGI, Index_VI_Disp_U_Buf_EXT_High, HIBYTE(HIWORD(PSU)), 0x03);
747 SetVideoReg(pXGI, Index_VI_Disp_V_Buf_Start_Low, LOBYTE(LOWORD(PSV)));
748 SetVideoReg(pXGI, Index_VI_Disp_V_Buf_Start_Middle, HIBYTE(LOWORD(PSV)));
749 SetVideoReg(pXGI, Index_VI_Disp_V_Buf_Start_High, LOBYTE(HIWORD(PSV)));
751 SetVideoRegMask(pXGI, Index_VI_Disp_V_Buf_EXT_High, HIBYTE(HIWORD(PSV)), 0x03);
755 SetVideoRegMask(pXGI, Index_VI_Disp_Y_UV_Buf_Pitch_High, HIBYTE(LOWORD(tmpYPitch)), 0x0f);
759 SetVideoReg(pXGI, Index_VI_Disp_Y_Buf_Pitch_Low, LOBYTE(LOWORD(tmpYPitch)));
761 SetVideoRegMask(pXGI, Index_VI_Disp_Y_Buf_Pitch_EXT_High, (tmpYPitch>>12)&0x1f , 0x1f);
765 SetVideoRegMask(pXGI, Index_VI_Control_Misc3, 0x03, 0x03);
768 /* SetVideoRegMask(pXGI, Index_VI_Contrast_Enh_Ctrl, pOverlay->contrastCtrl<<6, 0xc0); */
769 /* SetVideoReg (pXGI, Index_VI_Contrast_Factor, pOverlay->contrastFactor); */
773 SetCloseOverlayReg(XGIPtr pXGI)
775 SetVideoRegMask (pXGI, Index_VI_Control_Misc2, 0x00, 0x01);
776 SetVideoRegMask(pXGI, Index_VI_Control_Misc0, 0x00, 0x02);
780 SetSelectOverlayReg(XGIPtr pXGI, CARD8 index)
782 SetVideoRegMask(pXGI, Index_VI_Control_Misc2, index, 0x01);
786 SetEnableOverlayReg(XGIPtr pXGI, Bool bEnable)
789 SetVideoRegMask(pXGI, Index_VI_Control_Misc0, 0x02, 0x02);
791 SetVideoRegMask(pXGI, Index_VI_Control_Misc0, 0x00, 0x02);
795 EnableCaptureAutoFlip(XGIPtr pXGI, Bool bEnable)
798 SetVideoRegMask(pXGI, Index_VI_Control_Misc0, 0x01, 0x01);
800 SetVideoRegMask(pXGI, Index_VI_Control_Misc0, 0x00, 0x01);