AWeb PowerPC JPEG Plugin

Top | Amiga | Aweb Contact


Yvon Rozijn kindly sent me the source for his 68k jpeg decoder. I have ported it to vbcc and have built a WarpOS version. This would not have been possible without Yvon's source. Looking at the complexity of the interface between it and the jpeg library, I would probably have given up if I wrote it from scratch.

I must also thank Frank Wille for work on vlink and vbcc and the help he gave me with vbcc and WarpOS libraries. Also thanks to Volker Barthelmann for writing vbcc in the first place.

BETA!

Currently this software should be considered BETA. While it does work here, I take no responsibility for it's actions. It hasn't had a huge amount of testing, especially in low memory situations, where it is possible with a very large number of temporary files to have trouble. Version 0.8 of the plugin seems to be a very good build here. Currently the virtual memory system is disabled and may stay that way. If you are using the plugin with low memory, I suggest you get some more simms before they become too expensive (actually they are already too expensive here).

If you have any problems of any kind please email me. If I have good feedback with this version I will upload it to aminet.

Performance

On my 040 25MHz 603e 175MHz, I get about a 3 - 4x speedup. This is reasonably dependant on the value of the PROGRESS argument, don't set this too low. Version 0.7 introduced all major optimisations. There are some areas that can be improved but these are probably minor. If you are willing to look at the source you may be able to spot something I've missed, but I now consider the plugin "finished". There might be some more work done, notably a PowerUp port, however I'm not to confidant this will happen.

I might compile 060 and 603e/604e versions, the current version is compiled with 68040 code and no PPC target specified. I will also look into where -amiga-align is needed (it ensures that structures passed to OS and 68k code from PPC code are aligned like a 68k processor would want them, and causes a performance penalty in the PPC code. I don't know how significant it is).

Feedback

Please mail me and tell me of your experiance with the plugin. I'm particularly interested in comments about the plugin's stability. Also, I've had an unconfirmed report that it won't work at all unless you run another WarpOS program first. If it won't work, try running something else first. If you have this problem then please mail me.

If anyone wants a MorphOS port then I wouldn't recomend using this source, I understand that MorphOS requires little more than a recompile from the 68k source. I have a working 68k only source here for VBCC, if someone wants me to recompile it for MorphOS the you can contact me with instructions on how to do it. Since this source is basically an unmodified version of Yvon's (maybe 20 lines are different from his SAS/C code in minor ways), I don't think I can distribute it.

Download

awebjfifPPC v0.8 (source, 486685 bytes)
awebjfifPPC v0.8 (binary, 118434 bytes)
Older Releases

History

v0.1 (20/05/01)Low memory, invalid jpeg, and filename bugs.
v0.2 (22/05/01)Recompile with -O3 optimisations. Fixed filename bug.
v0.3 (28/05/01)Fixed invalid jpeg bug.
Low memory bug possibly worse, remains due to typo.
Reduced context switching during buffer refill.
v0.4 (29/05/01)Fixed low memory bug (really!). Major memory trashing bug.
v0.5 (03/06/01)Worked around memory trashing bug by single threading jpeg library operations.
Code cleanup
Speed increase on colour mapped screens.
Some stability issues remain.
v0.6 (04/06/01)Fixed memory trashing bug by changing malloc() to AllocVecPPC().
Disabled virtual memory system.
Oops... left in some debug code for mapped colour screens and greyscale jpegs on all screens - it will be REALLY REALLY slow.
v0.7 (17/06/01)Significantly reduced context switches, large jpegs seem to cause problems
v0.8 (06/01/02)Found and removed Enforcer hits
Found and removed low memory bug

Installation

To install this plugin please first install the 68k version of the jpeg decoder. You will find this on the Aweb homepage. Now copy the PPC plugins to your plugin directory (usually AWeb3:AWebPlugin). Finally, edit your Browser Settings and click the Viewers tab. Select the jfif plugin and choose your favourite PPC decoder instead of the 68k plugin. The arguments for the PPC plugin are the same as those for the 68k plugin. You might want to experiment with higher values of the PROGRESS paramater, as this will significantly reduce the context switches.

I currently have good results using the following arguments, (don't forget to press enter after pasting this into AWeb's preferences, you will also probably have to flush all images from memory to have these changes take effect) PROGRESS=50 MULTIPASS=0 DITHER=2 The dither paramater will have no effect on truecolour screens. Multipass works with this plugin (enable it by setting MULTIPASS=1), but is fairly slow.

If you have problems with the installation, be sure that you have got the filenames correct. Do not change the names of the plugins, as AWeb will silently ignore them if the filenames are incorrect. If you have trouble, then use the debug version of the plugin and install a serial terminal or something like sashimi (from aminet). You should recieve a LOT of debug output. This will be useful for pinpointing where things go wrong. If you get no output at all, then it is likely that AWeb isn't loading the plugin for some reason.

If you like this plugin, you might want to try my WarpOS Gif plugin.

copyright 2002 Tom Parker - last modified 6 Jan 2002