42bs Posted March 9, 2020 Share Posted March 9, 2020 Now for the algo: - At first I run the simple scan, that is finding all literals and packed groups and stores it in an intermediate format keeping start pixel and length. Later passes work on this. - Then I run multiple passes to combine literals and packed groups: More then 3 2-pixel groups are converted into a literal group: Literal: 5+3*4 = 17 < 3*(5+4) = 27 A sequence of literal, packed with < 3, literal is converted into a literal group. Quote Link to comment Share on other sites More sharing options...
enthusi Posted March 9, 2020 Share Posted March 9, 2020 Very nice improvement! :) sprpck is about the only tool that I kept using and it looks like it might stay so. 1 Quote Link to comment Share on other sites More sharing options...
42bs Posted March 9, 2020 Share Posted March 9, 2020 @karri, would it be ok for you if I put the "bg" part as reference on GitHub (and also a 8, 4 and 2 bit/color version)? Quote Link to comment Share on other sites More sharing options...
+karri Posted March 10, 2020 Author Share Posted March 10, 2020 Of course! And I hope it is ok if I copy your code to sp65. I really don't see any point in going any further in optimisation when the end result is "mostly perfect". As Mary Poppins would say. Quote Link to comment Share on other sites More sharing options...
42bs Posted March 10, 2020 Share Posted March 10, 2020 (edited) 26 minutes ago, karri said: Of course! Great. Quote And I hope it is ok if I copy your code to sp65. I really don't see any point in going any further in optimisation when the end result is "mostly perfect". As Mary Poppins would say. Yes of course. Please go ahead. I hope the code is clear enough. Edited March 10, 2020 by 42bs Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.