How "expensive" is it just to start from byte 0 of the CDG
instructions and run every command in order internally up to the
current seek time, then blit the result?

I had been assuming that scaling/drawing the output itself is what
took time, and that on the internal drawing surface it was nearly
instantaneous and painless. Am I just nuts? :)

Actually I've never tried doing the CD+G decoding without syncing with the song and blitting. If it turns out to be near zero cost without those, then your idea of starting at byte 0 would be the best option.

The scaling/drawing is probably the most expensive operation. Some of the other number crunching can be time-consuming if modifying every one of the pixels, but I've worked harder on those parts to find the magic line of Python that does it quickly. For example my first bash at the Load Colour Table code was prohibitively slow as I ran through each pixel in a loop, looking it up in a table and replacing it with the new value. The magic dust in this case was to use the take() function of Numeric which was many orders of magnitude faster.

Either way, I would think that going back to the last memory preset
would do the trick; doesn't that clear out *everything,* not just the
visible area?

Having just looked back at CDG Revealed, I think you're right - it says Memory Preset should set "the entire screen". What pycdg currently does for Memory Preset is only alter the border if the border has never been set before. If "entire screen" includes the not-viewable area then that wants to be modified to always set the border.

Good catch by the way, you've really dug deep into this stuff :-)

Kelvin.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Pykaraoke-discuss mailing list
Pykaraoke-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pykaraoke-discuss

Reply via email to