AVI container and VGA display

T

tandt_53

Guest
hi all!
I'm working on the Spartan 3E started with mapping MJPEG decoder. I had th
source code of the JPEG deccoding, now I use AVI container to display MJPE
via VGA port. I wanna find the first image inside of AVI container but
don't understand the AVI's structure. it has some index such as supe
index, old index, ect. And I don't know how to display video into monito
via VGA port. any body has idea for my problems? Please, help me!
thanks alot!



---------------------------------------
Posted through http://www.FPGARelated.com
 
On May 20, 4:17 am, "tandt_53" <dothetan.040490@n_o_s_p_a_m.gmail.com>
wrote:
hi all!
I'm working on the Spartan 3E started with mapping MJPEG decoder. I had the
source code of the JPEG deccoding, now I use AVI container to display MJPEG
via VGA port. I wanna find the first image inside of AVI container but I
don't understand the AVI's structure. it has some index such as super
index, old index, ect. And I don't know how to display video into monitor
via VGA port. any body has idea for my problems? Please, help me!
thanks alot!

---------------------------------------        
Posted throughhttp://www.FPGARelated.com

I was acutally doign somethign similar not too long ago. I was
receiving video into an FPGA and trying to write out to and SDXC card
in AVI format. I didn't finish this, got pulled into something else.
But after hours I figured out AVI is formatted and wrote a C program
to pull out the data. If you get your code please email it me to
sk3ptic@gmail.com. Below are the links I used to figure it out.

http://www.jmcgowan.com/avitech.html


http://www.tomkv.com/what-is-avi-format.html



Basically a typical byte stream looks like this:

[52 49 46] [46 B0 2C ][07 00 41] 56 49 20 4C 49 53 54 D2 00 00 00 68
64 72 6C 61 76 69 68 38 00 00 00 1A 41 00 00 28 FC 00 00 00 00 00 00
10 08 00 00 8C 00 00 00 00 00 00 00 01 00 00 00 0C 1E 00 00 00 01 00
00 00 01 00 00 00 00

If you look at those links it tells you how AVI is formatted.

You will see it is

'RIFF' + 4 byte file length + 'AVI' + 'LIST' + 4 byte list length +
'hdrl' + 'avih' + 4 byte chunk size + (data)


It is liek a hierarchy where RIFF contains AVI and AVI contains LIST
and LIST contains hdrl etc.. until you get down to the image. Each
time you get a container you get a label and size, so from the size
you know how many bytes to count to the header.

Hope that helps.
 

Welcome to EDABoard.com

Sponsor

Back
Top