Forum Discussion
Altera_Forum
Honored Contributor
16 years agonow I am trying to build vga signal by using sgdma and clocked video output. when I connected "test pattern generator" to the "clocked video output", it was working properly but when I connect sgdma, it shows the image as about 33-35 pixel shifted up. why does this shifting problem occur?and how can I solve it?
with a code as follows, I can send r,g,b colours to whole screen and it can refresh the screen 3 times in a second (3 fps). what kind of real time video can I play using this performance?
...
alt_video_display * vga;
vga=alt_video_display_init("/dev/sgdma",640,480,32,SSRAM_BASE,DESCRIPTOR_MEMORY_BASE,1);
...
for(p=0;p<10;p++){
for(x=1;x<=480;x++){
for(y=1;y<=640;y++){
vid_set_pixel(y,x,0xff,vga);
}
}
for(x=1;x<=480;x++){
for(y=1;y<=640;y++){
vid_set_pixel(y,x,0xff00,vga);
}
}
for(x=1;x<=480;x++){
for(y=1;y<=640;y++){
vid_set_pixel(y,x,0xff0000,vga);
}
}
}
...
http://img163.imageshack.us/img163/7116/sgdmacvo.th.jpg (http://img163.imageshack.us/i/sgdmacvo.jpg/)