Forum Discussion
Altera_Forum
Honored Contributor
22 years agoJPEG on NIOS II
Does anyone know how to display JPEGs on the Lancelot VGA daughter card on a NIOS II system? Is there a freely available jpeg component? Could one use the Linux jpeg libraries? Any ideas?
I want to load a jpeg from network share (or send it from a host PC) , decode it to a memory space and then DMA the image to the Lancelot ( which is basically a 3 x 8bit video DAC with H & V sync pins) Any suggestions Thanks everyone14 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by janhendrik@Aug 20 2004, 06:34 AM hi adrian,thaks for the help.
you mention a sample,<div class='quotetop'>quote
--- quote end ---
--- quote start ---
you'll need to create a source manager to handle the requests from the jpeg decompressor for memory, but it's all very trivial. i think there's a basic sample somewhere and you should be able to figure out exactly what you need. --- Quote End --- Is it a NIOS II sample or one of the JPEG samples. I'd like to get the decoder to work and then perhaps try to implement a hardware DCT/inverse DCT. Thanks again. Jan Hendrik [/b] --- Quote End --- Did you want to do the DCT/IDCT yourself? (I think I saw a free opencore on the altera site for doing this). Cheers
- Altera_Forum
Honored Contributor
Thanks BadOmen,
I'll go and have a look-see, If there is a free core for dct/Idct then I would rather use that, I'd just like to use "hardware accelaration" to speed things up http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif **Wondering how fast I can decode 800x600x16bit jpeg. On cylone with NIOS II core/f** - Altera_Forum
Honored Contributor
Hi janhendrik,
Here is an sample result of JPEG decoding on Nios II. No Hardware Acceleration. I have only Stratix Edition, so -mno-hw-mul option is used to near to Cyclone. -- Hardware -- Nios Dev Board : Stratix edition SOPC config : based on standard32 Nios II /f , ic 4k, dc 8k, hw-div enabled VGA controller added(original) Frecuency : SOPC core : 90MHz VGA dot frec : 40MHz VGA config : 800x600x16 -- Software -- OS : none (HAL) JPEG Decoder : modified "JPEGLS" library. I got from Japanese WEB site. (You may find "jpegls mona" on Google if you read Japanese...). This library uses Divide operation.# I tryed to use IJG source code before. Compiling was passed but it did not work correctly. I give up. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/tongue.gif JPEG Image file : "Sunset.jpeg (800x600)". WindowsXP may include this sample image. JPEG Image is put to ROZIPFS, so this file access might be overhead. -- Result -- Compile Options : Clocks : Time@90MHz (1) -O2 -mno-hw-mul : 3,198M : 35[s] (2) -O2 : 1,280M : 14[s] (3) -O2 -mhw-div : 327M : 3.6[s] I think the result of Cyclone may slower than (1). Because Nios II on Cyclone can not have Barrel Shifter. I'm not sure -mno-hw-mul disable Barrel Shift or not. I hope the info helps. p.s. for More faster JPEG decoding, I think I need to do ... - eliminate divide operation - SIMD custom instruction - Hardware DCT/IDCT - Hardware color conversion (YUV-RGB) - Altera_Forum
Honored Contributor
Hi Koma,
Thaks a lot for the info. It took longer than I thought it would, but then again its only @90Mhz not 2.4Ghz http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif I'll have a google for "jpegls mona" because I still cant compile all the JPEG source from ijp.org. I will (soon) try to write my own decoder based on adac's advice, and when I'm done I'll post the results here some where. Thanks for eveybody's guidance and support.