2012-08-04 06:52 AM
hello
as the tittle says i'm searching for some example code for i have fatfs working from chan. i have a display up and running. now i only need to find out how to use the above decoder. could someone help me. thanks2012-08-10 11:35 PM
could you provide me the link from libjpg, i searched it but couldnot find it.
2012-08-11 04:08 AM
Main ijg (libjpeg developer) site:
STM32 firmware:
http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm32f2-f4_demobuild.zip
Have you successed in TJPGD porting yet?
Here is a short video how does FatFs_Tdjpg_Demo project look like. Jpeg files from Windows sample library are halved in size (512x384 due to LCD small resolution):
http://www.zaurosoft.com/videos/ZP_DSF4/STM32F4Discovery_runs_TJPGD_demo.mp4
2012-08-12 12:40 AM
Well i'm currently on holliday, so i have less time to try porting it.
i hope next week to get some time to try it out.2012-08-14 01:02 AM
i had some spare time, and have altered my project with part's of your code.
but now when invoke the maloc, i get this error Heap and stack collisionis there a way to get ride of this error. i looked at stm32_flash.ld but i realy don't know what and where to alter these things. by the way i have a stm32f4 discovery, without external memory. the display i have is 320x240, so i need153 6
00
bytes to allocate and later in the code i need to allocate 4096 bytes.
2012-08-14 01:31 AM
You can't allocate 153600 bytes without an external RAM so keep ld script as is.
Instead of writing a whole image to the memory buffer try to send it to your LCD by line x MCU height blocks (or, simplier but slower) by MCU line or MCU block (as you did in your version). All you need is just to change out_func. You are free to change IODEV structure, f.e. adding extra data to amend out_func behavior, or write a pair of out_funcs to implement some different strategies.2012-08-17 07:22 AM
I don't get a image on my screen.
when i debug it i have a JDR_MEM1, /* 3: Insufficient memory pool for the image */the pool size is 4096, do i have to increase it ?or is there somthing else wrong ?2012-08-17 08:52 AM
I gave you the working project. Have you read or compiled it? I did not use an external RAM at that time.
In my project do not change anything (except your FATFS realization and a bwa correction in the out_func as mentioned above) and in the main function add the breakpoint at f_lseek(), i.eif
(
JDR_OK
== jd_prepare(&jdec, in_func, work, work_size, &dev) &&
(JDR_OK
== jd_decomp(&jdec, out_func, scale)))
{// Output decoded 96*64 16bpp image to your LCD here
// or just check the
fb
bitmap contentf_lseek(&fsrc,0);
//set breakpoint here
} You should see now the 96x64 image on your LCD or as a bitmap while debugging memory (fb content). Try to get them at first. Then just correct the out_func for your needs.2012-08-17 10:09 AM
i tryed, but i have a test version of attollic and this has a code limitation.
normaly i use eclips, but eclips won't import the settings. i copy parts of your main file that i need to use, i used my own display driver and fatfs.now i need to alter some things to get it to work. i go try some more things.2012-08-18 01:10 AM
i found what was wrong, sometime ago i tryed alter the buffers even so JD_SZBUF
this buffer was set the same as the workspace, so i run out of memory, it is set back to 512next thing to do is to write it to the display, i tryed LCD_WriteBMP(0,0,LCD_W,LCD_H, (uint16_t*)fb);but that isn't working. i have to find out how to write it now.2012-08-21 12:51 PM
I have a new problem, my program won't start.
see [DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/program won't startup. strainge jump to&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/AllItems.aspx¤tviews=0]Linkwhen i have solved the above problem, i get back to let you know if it is running.