On 6/10/10 4:57 AM, Kevin O'Connor wrote:
On Wed, Jun 09, 2010 at 09:46:27AM +0200, Stefan Reinauer wrote:
See patch
Thanks Stefan! It looks very useful.
I haven't had a chance to review the patch fully.
Thanks for the input so far. Here's an updated patch
One thing I did note is that the new file jpeg.c needs a copyright statement.
Still working on that.
At a quick glance I also noticed a couple of minor things:
- It looks like you want malloc_tmplow/tmphigh instead of malloc_low/high - using the permanent allocations has an impact on reserved space even if they are eventually freed.
There is no malloc_tmplow so I used malloc_tmphigh all along.
- I'd guess we'd want to malloc_tmp and cbfs_copyfile instead of cbfs_getfile - doing the jpeg uncompression with the rom as source could be slow.
Ok, I changed the code. This significantly increases the required heap though (by the size of the compressed jpeg image)
- there seems to be some tab/space corruption in optionrom.c - seabios uses all spaces
Sorry, didn't know that. I hope I got it fixed.
- Do the vga changes justify a new file instead of an addition to optionrom.c?
Look at the attached patch to decide if you like it more. Maybe some more functions could be moved from optionroms.c to vga.c?
Another thing you mentioned on IRC is it would be nice to reduce the 18kb BSS requirement of the jpeg.c code. I didn't work on that yet. If you see any obvious low hanging fruits, please grab them.
Stefan