How To Set Input Video Color Format; How To Set Interlaced Or Non-Interlaced Video Input - DIGITAL-LOGIC MICROSPACE PCC-P5 Technical User's Manual

Table of Contents

Advertisement

DIGITAL-LOGIC AG
PCCP5 Manual V2.3

4.11.6 How to set input video color format

CHIPS 6555x supports three basic color formats which are YUV4:2:2, RG555 and RGB565. Each format is 16 bit per
pixel. The 6555x also allows swapping of the UV positions within a 32 bit dword. The default sequence for YUV4:2:2 is
Byte0=Y0, Byte1=U, Byte2=Y1, Byte3=V. The following code shows the input video format selection.
//-------------------------------------------------------------------------
// SetVideoInputFormat() - sets Video Transfer Format bits
//-------------------------------------------------------------------------
int ChipsVideoOverlay::SetVideoInputFormat(int iVideoFormat)
{
UINT i;
WritePortUchar(ulMrAddr,MR_VIN_CTRL_1); // read video display control reg1
i = ReadPortUshort(ulMrAddr);
i &= ~(VIC1_FORMAT << 8); // clear format bits (0 is YUV4:2:2)
switch(iVideoFormat)
{
case CMM_FMT_YUV_422:
// i |= (VIC1_YUV422 << 8); // 0 is YUV 4:2:2
break;
case CMM_FMT_RGB_555:
i |= (VIC1_RGB555 << 8);
break;
case CMM_FMT_RGB_565:
i |= (VIC1_RGB565 << 8);
break;
default:
return;
}
WritePortUshort(ulMrAddr,i); // write new format
}

4.11.7 How to set interlaced or non-interlaced video input

CHIPS 6555x supports interlaced or non-interlaced video sources. Usually, the NTSC/PAL video sources are interlaced
and the hardware MPEG decoder generates non-interlaced video source. Following code selects video input type.
void SetVideoInputBits(BOOL interlaced)
{ // interlaced = 1 for interlaced video source
int mr02;
WritePortUchar(ulMrAddr, MR_VIN_CTRL_1);
mr02 = ReadPortUshort(ulMrAddr); // Read current value
mr02 &= ~(VIC1_NONINTERLACE << 8); // assume interlaced video
if(interlaced) mr02 |= (VIC1_NONINTERLACE << 8);
WritePortUshort(ulMrAddr, mr02); // write new value
77

Advertisement

Table of Contents
loading

Table of Contents