Page 1 of 1

JPG decoding on SMD?

Posted: Sun Aug 09, 2009 12:57 am
by Shiru
Just wondering, if anyone had tried to make JPG decoder for SMD? It probably can be useful for that type of games which shows picture for every level or couple of levels.

I know that there is at least two different JPG decoders for russian ZX Spectrum clones, both written in the beginning of the 2000s. One of them decoded test 17K JPG picture to 256x192, 8 colors per pixel + Floyd-Steinberg diffusion, just for 55 seconds. It is on Z80 @3.5 MHz + 128K RAM. Maybe SMD could do this faster, fast enough to be useful?

Re: JPG decoding on SMD?

Posted: Sun Aug 09, 2009 2:02 am
by plee
Shiru wrote:Just wondering, if anyone had tried to make JPG decoder for SMD? It probably can be useful for that type of games which shows picture for every level or couple of levels.

I know that there is at least two different JPG decoders for russian ZX Spectrum clones, both written in the beginning of the 2000s. One of them decoded test 17K JPG picture to 256x192, 8 colors per pixel + Floyd-Steinberg diffusion, just for 55 seconds. It is on Z80 @3.5 MHz + 128K RAM. Maybe SMD could do this faster, fast enough to be useful?
Your probably better off using a graphics program to reduce the colors of the image and then convert it smd tile data. Then, just load the tiles and display it...

Posted: Sun Aug 09, 2009 2:25 am
by Shiru
Can't find the words to answer that.

Posted: Sun Aug 09, 2009 5:17 am
by tomaitheous
Wow. 55 seconds seems kinda quick for that setup. It's not one of those 2 frame flicker at 60hz viewer, is it?

Posted: Sun Aug 09, 2009 5:53 am
by Shiru
This decoder has support for displaying pictures in different modes - native, 2 frame flicker, 3 frame flicker. I've tested it for 3 frame flicker.

Other one decoder is much slower, about 110 seconds for same picture, but it has tons of settings. First one only allows to select display mode.

Posted: Sun Aug 09, 2009 7:36 pm
by mic_
There is also one for the C64: http://www.ffd2.com/fridge/jpeg/

To get the best results you'd probably have to design your decoder from scratch with the Megadrive's capabilities in mind, so it would be a fair amount of work. But if you're really interested then go right ahead :wink:

You also have the possibility to try and modify an existing decoder, like tinyjpegdecoder or maybe if there are any for the classic Amigas or the old 68k Macs, but I don't know if that'd work out.

Posted: Sun Aug 09, 2009 7:49 pm
by Shiru
How can I run this C64 decoder? I haven't found anything resembling usual C64 files.

For now there is no real need in such decoder, so it just a theme for discussion - what exists, what possible, and if that can be useful. Of course, to get best results something must be designed for SMD from scratch, and I know how much work it will require (not speaking it must be in 68K assembly, which I'm absolutely not good at).

I know there are many JPG decoders for Amiga, but all I've found were at least for 68020 with 1 MB RAM.

Posted: Sun Aug 09, 2009 8:20 pm
by Chilly Willy
JPEG wasn't popular on the Amiga until it got faster CPUs. Even the fastest jpg viewer (FastJPEG) took over a minute to decode a low-res JPEG image on a stock 68000. You used IFF if you wanted 68000 users to look at your pics.

Posted: Sun Aug 09, 2009 9:43 pm
by mic_
How can I run this C64 decoder? I haven't found anything resembling usual C64 files.
I assume you have to compile it yourself since it comes in source code form.

Posted: Thu Aug 13, 2009 2:20 am
by plee
One thing to remember is that you'll have to "reduce" the colors of the .jpg which would probably be not worth the effort if your just trying to display a static image. If the Genesis had a true bitmapped graphics mode then it might be worth the effort...

Posted: Thu Aug 13, 2009 2:59 am
by Shiru
Plee, sorry if this will sounds harsh, but seems that you don't understand what we here talking about. Information from you here is like when some people discuss how to solve complex equation, and someone says them - hey, do you know that 2*2=4?

Posted: Fri Aug 14, 2009 5:24 pm
by matteus
Shiru that does sound harsh and not very polite

Posted: Fri Aug 14, 2009 6:09 pm
by Huge
matteus wrote:Shiru that does sound harsh and not very polite
Regardless, even I can see that he is right.

Posted: Sat Aug 15, 2009 12:24 am
by Chilly Willy
Jpeg really isn't useful for the MD alone. Even the fanciest tricks won't make it more than lousy graphics. Jpeg WOULD be useful on the 32X. It's got both the power and the graphics needed to make a JPG viewer worthwhile. That will be one of my sample apps once I get the CD code working - a picture viewer for the CD 32X that will handle most image formats.