cancel
Showing results for 
Search instead for 
Did you mean: 

how to set the VGA to support interlace?

shuaiye1999
Associate II
Posted on April 24, 2003 at 07:19

how to set the VGA to support interlace?

8 REPLIES 8
shuaiye1999
Associate II
Posted on April 10, 2003 at 00:07

I used the STPC Consumer2,testing the gdk14,

the sample/basic/vidfull to TVOUT is OK,but I searched

the whole gdk14,not found a easy way to set the CRTC

register to support interlace.any suggestion will help.
thierry239955_st
Associate II
Posted on April 10, 2003 at 06:32

Shuaiye,

The way to switch the CRTC in interlaced mode is quite simple. You just have to fill the CRTC register 0x39 with half of the register 0x0:

REGHOST_SET_CRTC_REG(0x39, REGHOST_GET_CRTC_REG(0x0) / 2);

Anyway, I don't think it is what you wan't to do. The TV encoder expect full frame from the CRTC and you will loose your TV output doing that.

What do you mean exactly by 'set the CRTC register to support interlace'?

Farfalla

shuaiye1999
Associate II
Posted on April 11, 2003 at 02:18

Farfalla

thank you for your answer.my problem is the video in the

TV seems OK,but the video on the VGA have some sawtooth

when the object in the video moving.I guessed maybe the signal

is interlaced(so TV can play it) but the VGA not support it.maybe I

am wrong.but I can not find the correct way to set VGA well to

play smoothly video.

the signal go the way like that:

camera--->saa7113---->aq414---->STPC------->TV(VGA)

shuaiye

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

thierry239955_st
Associate II
Posted on April 15, 2003 at 07:45

Shuaiye,

Unfortunatly, if you would like a perfect quality on the CRTC, the problem is not as simple as switching in interlaced mode. You also need to synchronize the frame coming from the video input with the frame going out of the CRTC.

This can be done by creating 3 buffers in memory and switching from one buffer to another only when a buffer is ready to be displayed. You need 3 buffers because one of the buffer is filled by the video input in the same time as a second buffer is dispayed by the CRTC. The video input and CRTC are not switching from one buffer to another at the same time and you need a 3rd buffer to be ready for a switch.

To don't loose CPU time waiting for end of frames, the best is to use IRQs. We have got an example for Linux (attached to this message) if this can help you. Anyway, it is something difficult to implement.

You could also try your solution to switch the CRTC in interlaced mode but you will never get the same level of quality and you won't be able to display on TV output and CRTC at the same time.

Farfalla

________________

Attachments :

vid3buf.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Htqi&d=%2Fa%2F0X0000000aXq%2FIzUUj9Z1vA5quN6znrNH3dimGiN6IhMj.XqfnK4hoEk&asPdf=false
shuaiye1999
Associate II
Posted on April 23, 2003 at 06:33

thank you very much.

I cannot compile the file yet,because I cannot find the directory

''pci'' in src/libhard/ in the gdk14.zip package.would you please

give me some advice about it?thanks again.

thierry239955_st
Associate II
Posted on April 23, 2003 at 12:21

The PCI module have moved from the libreg to the libhard directory in the last version of kit.

You should download what is called 'STPC Software Development Kit v1.0' in the STPC software section of this site.

This development kit replace the GDK. There is additional source code which is not related to graphics but the whole contend of the GDK is still there.

Farfalla

shuaiye1999
Associate II
Posted on April 24, 2003 at 00:48

thx.

I build the driver step by step follow the vid3buf.txt

but when I insmod the vipmod.o,it report errors:

*******************************************

bash-2.05a# insmod vipmod.o

vipmod.o: unresolved symbol OSAL_IORead8

vipmod.o: unresolved symbol OSAL_MemoryMap

vipmod.o: unresolved symbol OSAL_IORead16

vipmod.o: unresolved symbol OSAL_IORead32

vipmod.o: unresolved symbol OSAL_IOWrite8

vipmod.o: unresolved symbol OSAL_IOWrite16

vipmod.o: unresolved symbol OSAL_IOWrite32

vipmod.o:

Hint: You are trying to load a module without a GPL compatible license

and it has unresolved symbols. The module may be trying to access

GPLONLY symbols but the problem is more likely to be a coding or

user error. Contact the module supplier for assistance, only they

can help you.

************************************************

and the sample program's build also report errors:

*************************************************

[hex@iServer stpckit]$ make -f MakeSmp

gcc -O2 -I./include -I./src/libosal/linux -T1 -c -o vid3buf.o vid3buf.c

vid3buf.c: In function `ST_MainFunction':

vid3buf.c:137: warning: assignment makes integer from pointer without a cast

vid3buf.c:138: warning: passing arg 2 of `HWDUMP_Dump' makes pointer from integer without a cast

vid3buf.c:179: `ulDumpHandle' undeclared (first use in this function)

vid3buf.c:179: (Each undeclared identifier is reported only once

vid3buf.c:179: for each function it appears in.)

vid3buf.c:179: warning: passing arg 1 of `HWDUMP_Restore' makes pointer from integer without a cast

make: *** [vid3buf.o] Error 1

*****************************************************

I use the 'STPC Software Development Kit v1.0'--stpckit-v10.tgz

and the file your attached.

shuaiye1999
Associate II
Posted on April 24, 2003 at 07:19

Farfalla ,

It's OK now.hehe

shuaiye

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