What mechanism are you using to sync to vertical retrace?

Also, the for loop you provide is not going to be very fast code
for copying the buffer, at least not in my experiences.  Try using
something like memcpy() for the bulk of the copying, perhaps a memcpy()
invocation per horizontal line.  Maybe even when waiting for vert
retrace your copy is simply too slow and cannot finish before the gun starts
up again.  Perhaps try drawing to off-screen video memory and then
waiting for vert retrace before you page flip to the off-screen memory?

Cheers.

On Thu, Nov 25, 2004 at 03:38:56PM +0800, Eugene Farinas wrote:
> Hi guys! We're developing a DGA program that render full screen at 1280x1024 
> 16 bpp 15fps the video image read from a sony camera, but we're experiencing 
> tearing artifacts during rendering. This is a part of the code that copies 
> the data to the frame buffer:
> 
> void CAM_APP::DisplayImage_NoPartial(unsigned char* offset)
> {
>       register int j;
>       register unsigned long caddr = (unsigned long) offset;
>       for(j=0; j<iSize; caddr+=2,j++){
>       *( (unsigned short*) caddr ) = sTable[g_pBuf[j]];
>       }
> }
> 
> Where the offset is the start of the buffer destination, and g_pBuf is the 
> data captured from the camera. we've tried copying the data during vertical 
> resync but we're still experiencing tearing on the image. We're using an AMD 
> gx2 geode processor w/ 128 mb ram and 8mb vram. I would like to ask your help 
> in removing the tearing artifacts. Thanks.
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.797 / Virus Database: 541 - Release Date: 11/15/2004
>  
> 
> _______________________________________________
> Devel mailing list
> [EMAIL PROTECTED]
> http://XFree86.Org/mailman/listinfo/devel
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to