JPG decoding on SMD?

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Post Reply
Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

JPG decoding on SMD?

Post by Shiru » Sun Aug 09, 2009 12:57 am

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?

plee
Very interested
Posts: 66
Joined: Wed Nov 29, 2006 11:32 am
Location: Houston, Texas

Re: JPG decoding on SMD?

Post by plee » Sun Aug 09, 2009 2:02 am

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...

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Sun Aug 09, 2009 2:25 am

Can't find the words to answer that.

tomaitheous
Very interested
Posts: 256
Joined: Tue Sep 11, 2007 9:10 pm

Post by tomaitheous » Sun Aug 09, 2009 5:17 am

Wow. 55 seconds seems kinda quick for that setup. It's not one of those 2 frame flicker at 60hz viewer, is it?

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Sun Aug 09, 2009 5:53 am

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.

mic_
Very interested
Posts: 265
Joined: Tue Aug 12, 2008 12:26 pm
Location: Sweden
Contact:

Post by mic_ » Sun Aug 09, 2009 7:36 pm

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.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Sun Aug 09, 2009 7:49 pm

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.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sun Aug 09, 2009 8:20 pm

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.

mic_
Very interested
Posts: 265
Joined: Tue Aug 12, 2008 12:26 pm
Location: Sweden
Contact:

Post by mic_ » Sun Aug 09, 2009 9:43 pm

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.

plee
Very interested
Posts: 66
Joined: Wed Nov 29, 2006 11:32 am
Location: Houston, Texas

Post by plee » Thu Aug 13, 2009 2:20 am

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...

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Thu Aug 13, 2009 2:59 am

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?

matteus
Very interested
Posts: 336
Joined: Mon Feb 04, 2008 1:41 pm

Post by matteus » Fri Aug 14, 2009 5:24 pm

Shiru that does sound harsh and not very polite

Huge
Very interested
Posts: 197
Joined: Sat Dec 13, 2008 11:50 pm

Post by Huge » Fri Aug 14, 2009 6:09 pm

matteus wrote:Shiru that does sound harsh and not very polite
Regardless, even I can see that he is right.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sat Aug 15, 2009 12:24 am

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.

Post Reply