Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Converting animation into lossy charset - how ?
2015-07-12 12:14
Oswald

Registered: Apr 2002
Posts: 5127
Converting animation into lossy charset - how ?

I've always wondered how an algorithm decides how far is a char from another. any pointers ?
 
... 38 posts hidden. Click here to view all posts....
 
2015-07-12 20:59
Oswald

Registered: Apr 2002
Posts: 5127
lol no, thats eye cancer :) actually the nice rotation anim inspired me in the new hoaxers reu demo.

couldnt google anything usable for my simple mind in pattern matching, anyone ? :)
2015-07-12 21:13
Marq

Registered: Sep 2011
Posts: 50
I did some similar stuff for the Sharp MZ-700, which only has a fixed charset. One little addition that helped especially with lines was to test against chars that had been shifted up/down/left/right one pixel.

2015-07-13 05:48
LHS

Registered: Dec 2002
Posts: 66
A really primitive unscientific brute force method used in my converter to compare two chars:

chb1 = first Byte from char1
chb2 = first Byte from char2
res_and = chb1 AND chb2
res_or = chb1 OR chb2

sum1 = sum of bits in res_and
sum2 = sum of bits in res_or

Compare sum1 and sum2. The higher difference means dissimilarity. If = 0, the Bytes are equal, 1 is very similar, 8 is totally dissimilar...

Compare all Bytes in two chars and sum all results (in ABS values).
2015-07-13 07:12
Oswald

Registered: Apr 2002
Posts: 5127
LHS, that sounds like what I do, but more complicated: compare bits on all 64 locations, and count differences.

your method: fex we have a set bit (1) and a cleared bit (0) on the same location

1 and 0 = 0

1 or 0 = 1

different bits: 1

1 and 1 = 1

1 or 1 = 1

different bits: 0
2015-07-13 07:42
ChristopherJam

Registered: Aug 2004
Posts: 1424
Optimising a little,

sum2 - sum1 will always be equal to the sum of bits in (chb1 XOR chb2)
2015-07-13 08:16
LHS

Registered: Dec 2002
Posts: 66
That's right, XOR gives directly sum of different bites...
2015-07-13 08:16
JackAsser

Registered: Jun 2002
Posts: 2038
@Oswald: You might wanna check out the endless guru-zoomer in Sharp
2015-07-13 08:56
Bitbreaker

Registered: Oct 2002
Posts: 510
I used ELBG for creating an optimal charset, downsampling to c64 colours + dithering should happen after optimal charset was found. For PETSCII however the simple approach was enough so far, but one might restrict the chars being used to have a more graphical appearance without too many letters being used.
2015-07-13 10:28
Oswald

Registered: Apr 2002
Posts: 5127
Quote: @Oswald: You might wanna check out the endless guru-zoomer in Sharp

I'd rather check out a least squares method in pseudo code for a 8x8 matrix :)
2015-07-13 10:30
Oswald

Registered: Apr 2002
Posts: 5127
Quote: I used ELBG for creating an optimal charset, downsampling to c64 colours + dithering should happen after optimal charset was found. For PETSCII however the simple approach was enough so far, but one might restrict the chars being used to have a more graphical appearance without too many letters being used.

okay guys how do you manage to implement those algorithms, its all cryptic to me at Wikipedia. Maybe its my non existant university degree ? I saw in some places partial derivation and shit like that, totally over the top of my head.

- downsampling to c64 colors before dithering ?
- simple method = counting different bits on same loc ? why would one need a better one if character set is not fixed ?
Previous - 1 | 2 | 3 | 4 | 5 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
REBEL 1/HF
EALL/HT
Alakran_64
t0m3000/bo0M!^hf^ibex
Krill/Plush
Knobby/Role
Guests online: 329
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Acidchild  (9.7)
4 Cash  (9.6)
5 Violator  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.045 sec.