scr2 encoding (Development MSX Fora)MSX Resource Center MSXdev 2008 - MSX1 development bonanza!           
            
English Nederlands Español Português Russian         
 Nieuws
   Voorpagina
  Nieuws archief
  Nieuws onderwerpen

 Informatie
   MSX Fora
  Artikelen
  Recensies
  Beursverslagen
  Fotoreportages
  Beurzen en meetings
  Enquêtes
  Links
  Zoek

 Software
   Downloads
  Webshop

 MRC
   Wie we zijn
  Kom bij ons team
  Doneren
  Policies
  Contact met het MRC
  Link naar Ons
  Statistieken

 Zoek
 
  

  

 Login
 

Gebruikersnaam

Wachtwoord




Ben je nog niet lid? Klik hier en word MSX vriend!


 Statistieken
 

Er zijn 125 gasten en 1 MSX vriend online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

Development - scr2 encoding

Schrijver

scr2 encoding

ARTRAG
msx master
Berichten: 1592
Geplaatst: 12 Mei 2007, 17:16   
What is the fastest way to get a good conversion in screen 2 of a 8x8 image ?

I have a 8x8 RGB image at 24bits (8 bit for each R,G and B component)
and I need to convert it to screen 2 in an efficient way
I use the MSX 1 palette.

My current solution is "brute force"

1) I generate all the possible lines of 8 points that can be visualized by the VDP in screen 2 (excluding repetitions they are 26685)
2) I split the 8x8 block in 8 horizontal lines of 8 pixels
3) for each line, I compute the distance with the "allowed lines" and find the minimum (minimum squared error)

This algorithm implies that I compute 8 times 26685 distances between two 3D vectors (R,G,B components)

Moreover the result does not seem very nice, as I have seen that
some converters give very good results using dithering (e.g. Jannone's one, at msx.jannone.org, that seems excellent)

Any suggestion to get a faster/better conversion, maybe using dithering ?
Does any one have a snippet of code to share with me?

dvik
msx master
Berichten: 1303
Geplaatst: 12 Mei 2007, 18:15   
I think the results from this tool is very good.

*EDIT* Never mind, you already mentioned this tool
ARTRAG
msx master
Berichten: 1592
Geplaatst: 12 Mei 2007, 18:27   
true, the problem is that the Floyd algorithm seems quite difficult
to implement...
 
 







(c) 1994 - 2008 Stichting MSX Resource Center. MSX is een trademark van MSX Licensing Corporation.