cancel
Showing results for 
Search instead for 
Did you mean: 

how to mix the VGA input with the video?

shuaiye1999
Associate II
Posted on May 02, 2003 at 05:45

how to mix the VGA input with the video?

6 REPLIES 6
shuaiye1999
Associate II
Posted on April 28, 2003 at 02:20

how to mix the VGA input with the video?

I used the HWVPIPE_InitDestination(HWVPIPE_COLORKEY_VIDEO, HWVPIPE_FORMAT_YUV422);

but it seems not work,any step I missed?

thierry239955_st
Associate II
Posted on April 29, 2003 at 05:04

To mix video with graphics, you must provide the color key value as first parameter of the HWVPIPE_InitDestination function, in the same pixel format as the screen.

For example:

HWVPIPE_InitDestination(0xffff, WVPIPE_FORMAT_YUV422);

will replace all white pixels of the screen by the video (in 16 bits per pixels mode)

HWVPIPE_COLORKEY_VIDEO parmeter is used if you want to replace a color from the video by graphics pixels (in place of replace a color from graphics by video). It is usable when uses the video pipeline to display a second graphics plan. With video it is better to use HWVPIPE_COLORKEY_CHROMA and then specify a range of color with HWVPIPE_InitChromaKey.

Farfalla

shuaiye1999
Associate II
Posted on April 30, 2003 at 00:40

Farfalla

I used your vid3buf and vipmod.o,the video is nice!thx a lot.

I seted the function in vid3buf.c like that:

HWVPIPE_InitDestination(0x0, WVPIPE_FORMAT_YUV422);

means all black color should be replaced by video,but the screen

is full of many color points.seems neither video nor graphics signal.

shuaiye

[ This message was edited by: shuaiye on 30-04-2003 04:11 ]

[ This message was edited by: shuaiye on 30-04-2003 04:14 ]
thierry239955_st
Associate II
Posted on April 30, 2003 at 05:41

What you see is probably the contend of your graphics screen, which is not initialized. The HWCRTC_InitGraphicMode function doesn't clear the screen.

To fill you screen with black pixels, you can do this:

for(j = 0; j < sDisplay.ulHeight; j++)

{

ulBegin = sDisplay.ulBase + j * sDisplay.ulPitch;

for(i = 0; i < sDisplay.ulWidth * 2; i += 4)

{

REGHOST_SET_ONSCREEN32(ulBegin + i, 0x0L);

}

}

Then, all the pixels should be black and you should see the video only.

Farfalla

shuaiye1999
Associate II
Posted on April 30, 2003 at 06:22

Farfalla

thx.I saw part of the screen have video.

the 1/4 upper screen still covered with color points.

is it the problem of 640*480 or others?

can another program draw something on the graphics

at the same time?maybe use the linux framebuffer.

shuaiye
thierry239955_st
Associate II
Posted on May 02, 2003 at 05:45

First check you did the clear screen after the HWFRAMEBUF_GESurfaceAlloc(&sDisplay) function call. Before this call, the sDisplay.ulBase is set to 0 in place of the real screen location (which should be at offset 256KB).

If you are in a standard VGA mode you should have no conflict with Linux. The HWFRAMEBUF_Init(256*1024L, 0xFFFFFFFFL) function means you doesn't use the first 256KB of the frame buffer. It is the maximum size used by standard VGA.

If you are in SVGA, XFree86 server or frame buffer device, you could have conflict. Anyway, if nothing is moving at screen, there is no raison Linux draw something after your clear screen.

Farfalla