Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
724 Views

Raw imagedata on flash to screen, which components do I need

Hello 

 

I have a small problem 

I'm using the 5MP camera and a LCD screen. The captured video is being showed on the screen very well. Now I want to use a kind of overlay for some buttons.  

That button image is already stored on the onboard Flash (8MB). 

But because the video is already using the pixel buffer, I cannot add another 

pixel buffer, I get corrupted video then. (There has to be enough space on the SRAM chip, because the image is 480 x 272 x 16bit > 261120 bytes.  

It should be possible to use two pixel buffers, because the SRAM is 512 kB. But I don't get it good working. 

 

Is there another way to get an image stored on flash (or SDRAM, because I can read the flash) to an avalon streaming source? 

 

I already tried the Frame Reader, but that will not work :( 

 

Thanks a lot
0 Kudos
3 Replies
Altera_Forum
Honored Contributor I
30 Views

You'll need to define 2 screen buffers (probably both in SRAM), with the camera writing to one, and writing the overlay to the other. 

When the LCD reads memory, you'll need to read both screen buffers and merge the pixel data (eg use the overlay if not some fixed value). 

 

(You might manage to use address comparators to direct the LCD reads to alternate addresses - but that might be more complex.)
Altera_Forum
Honored Contributor I
30 Views

Thanks you dsl. I have managed to save two Pixel Buffers on the SRAM. I don't know what I was doing wrong at the first time, but it works for now. 

But there is a strange thing about it.  

When i draw a pixel to place 0,0, my screen get corrupted. Not a big deal, cause I can use the rest of all other pixels. The next problem to solve is also an strange one; explanation: 

 

I have now two Pixel buffers. Pixel buffer one I draw a red block, pixel buffer two I draw a green block. I can switch these two images by using the Alpa Blending Mixer control port in NIOS; it works like a charm. The input is 24-bit RGB (RGB resampler between the pixel buffer > blending mixer). 

Next step: I set the resampler to 32-bit RGBA, and make the opacity level 50% (128), and split the color planes with Color Sequencer to two streams (RGB and Alpha stream). I'm doing this with both Pixel Buffer streams. So I get two RGB streams, and two Alpha streams. 

If I connect these to the Alpa Blending Mixer, nothing appears on the screen, even if I enable both layers in NIOS. 

 

At the outputs of the Color Sequencer I use small FIFO buffers (Avalon-ST Single Clock FIFO) with the parameters: Symbols: 3, Bits: 8, Depth: 16, Channel Width: 0, Error Width: 0 , and Use Packets selected. 

 

What is the problem? 

Thanks
Altera_Forum
Honored Contributor I
30 Views

Hi, 

 

For debug, I would try to use the alt_vip_alpha_stub for the alpha of the two channels. 

 

BR,
Reply