Page 2 of 2

Re: looking for a pixel flood fill routine

Posted: Tue Oct 12, 2021 4:47 pm
by Symoon
I almost finished commenting (in French) the Retour du Dr Genius flood fill routine.
I'm just in a boring moment with real life, kind of "a new problem each day". When (if!) things calm down, I'll post it.

Re: looking for a pixel flood fill routine

Posted: Sun Oct 31, 2021 9:58 pm
by goyo
Nice !
but it's not urgent.
if you have the time, otherwise it's okay. :wink:

Re: looking for a pixel flood fill routine

Posted: Fri Nov 12, 2021 12:01 am
by Symoon
There it is! In French sorry, but I guess automatic translators can do the job if any non-French is curious.

Sorry it took so long, I struggled a lot with the stack management, I never found a long quiet moment to focus on it and understand. Now here we are ;)

BTW, the code is long, maybe it's worth to take a look at Geoff Philips' one in his book, I didn't test it but it might be easier / less memory consuming, etc.
retour_dr_Genius_routine_flood_fill.zip
(11.41 KiB) Downloaded 15 times

Re: looking for a pixel flood fill routine

Posted: Fri Nov 12, 2021 11:37 am
by Symoon
goyo wrote:
Tue Oct 12, 2021 2:30 pm
The Lorigraph floodfill Algo look like very speed and optimal but it's difficult to disassemble it for me.
Oh yes it looks much faster than Genius. Genuis looks nice and is no-so-slow, but I wonder if Lorigraph doesn't already use the idea I had (check/fill pixels by group of six before doing it of one by one).

Re: looking for a pixel flood fill routine

Posted: Fri Nov 12, 2021 12:01 pm
by Dbug
Symoon wrote:
Fri Nov 12, 2021 11:37 am
goyo wrote:
Tue Oct 12, 2021 2:30 pm
The Lorigraph floodfill Algo look like very speed and optimal but it's difficult to disassemble it for me.
Oh yes it looks much faster than Genius. Genuis looks nice and is no-so-slow, but I wonder if Lorigraph doesn't already use the idea I had (check/fill pixels by group of six before doing it of one by one).
Yeah, a quick exit with a byte test makes sense :)

Re: looking for a pixel flood fill routine

Posted: Fri Nov 12, 2021 2:49 pm
by Symoon
Dbug wrote:
Fri Nov 12, 2021 12:01 pm
Yeah, a quick exit with a byte test makes sense :)
Well, I haven't deeply checked but I saw a CMP $40 while Lorigraph was executing the fill routine.
So I guess that's the idea ;)

So finally, it will probably be better to isolate Lorigraph's routine... Oh no, not again!

Re: looking for a pixel flood fill routine

Posted: Fri Nov 12, 2021 4:45 pm
by jbperin
Symoon wrote:
Fri Nov 12, 2021 12:01 am
There it is! In French sorry, but I guess automatic translators can do the job if any non-French is curious.
retour_dr_Genius_routine_flood_fill.zip
Waou :shock: nice work

It's very difficult to extract the meaning of an assembly code without knowing the design.
Well done.

Re: looking for a pixel flood fill routine

Posted: Fri Nov 12, 2021 5:02 pm
by Symoon
Thanks!
Well, at least I knew from the start what I was looking for, it helped a lot ;)

Re: looking for a pixel flood fill routine

Posted: Fri Nov 12, 2021 6:36 pm
by iss
@Symoon: Congrats for this huge amount of work!

Re: looking for a pixel flood fill routine

Posted: Fri Nov 12, 2021 9:33 pm
by Symoon
Thanks, that's not that much work, it's just me complaining about the lack of spare time ;)
If you're curious and need some help translating, just let me know (I kept it in French both by lazyness and for Goyo)