This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#6862 - WPS Tokenizer
Attached to Project:
Rockbox
Opened by Nicolas Pennequin (nicolas_p) - Tuesday, 20 March 2007, 02:29 GMT+1
Last edited by Nicolas Pennequin (nicolas_p) - Wednesday, 04 April 2007, 18:10 GMT+1
Opened by Nicolas Pennequin (nicolas_p) - Tuesday, 20 March 2007, 02:29 GMT+1
Last edited by Nicolas Pennequin (nicolas_p) - Wednesday, 04 April 2007, 18:10 GMT+1
|
DetailsThis is my WPS tokenizer patch. The basic idea is to store the WPS as an array of tokens. That way it is only parsed once and transformed into a form easier to use for displaying.
The concept is somewhat similar to what's explained here : http://www.rockbox.org/twiki/bin/view/Main/WPSTokenbasedHandling. There are also some explanations on To make this patch, I used the code in It appears to be working nicely with most of the WPS files I tested on most targets. It still needs to go through extensive testing, so please apply it to your build and test some WPS files :) Please report any crashes you get (although there shouldn't be any), and post feedback on performance differences, if you notice any (maybe try to activate heavy CPU features like crossfeed, EQ, replaygain, etc... and compare with an SVN build). Also I'm not sure at all it will work well on the archos player, so it would be good if someone could try that too. |
This task depends upon
Closed by Nicolas Pennequin (nicolas_p)
Wednesday, 04 April 2007, 18:11 GMT+1
Reason for closing: Accepted
Additional comments about closing: Comitted to SVN. Please report problems on the forum : http://forums.rockbox.org/index.php?topic=9727.0
Wednesday, 04 April 2007, 18:11 GMT+1
Reason for closing: Accepted
Additional comments about closing: Comitted to SVN. Please report problems on the forum : http://forums.rockbox.org/index.php?topic=9727.0
Also the debug code has been moved into a separate file.
Please test and/or review !
* There's an #if 0 block in gwps-common.c. Should that still be there?
* This code
+ /* Skip the rest of the line */
+ while(*(wps_token + skip) != '\\n')
+ skip++;
shows up in a few places. Would it be worth factoring that out in to a function? Might save some bytes.
Thanks for the other suggestion, it's done :)
Another update should be arriving shortly.
Most of the updates are discusses here : http://www.rockbox.org/mail/archive/rockbox-dev-archive-2007-03/0112.shtml
There are a few others too, but nothing really important.
The good news is with all the duplicate code removal, binsize seems to have gone down a little. I hope I'll be able to make other improvements in that area :)
It seems to work with the themes I have tested except one : the rockbox_default has some pixels are set randomly (?) on the last line of the screen (just bellow the progress bar). Some pixel are set, some other are clear during the playback, but the line is never filled. The simulator has the same problem. The others themes I have tested : black-white, boxes, iCatcher, relief, Rockboxed (found here : http://www.rockbox.org/twiki/bin/view/Main/WpsArchos )
If HAVE_TAGCACHE is not defined, compilation is done, but the player freezes every time the WPS should appear.
For information : the rombox.ucl is ~1ko bigger with this patch (compiled without tagcache).
Note : I compiled rockbox using the VMPlayer image and I made a dist-upgrade, but sh-elf-gcc is still the version 4.0.3 (rocbox patch #1).
I think the pixels under the progressbar on the default WPS are due to the peakmeter... I'll take a closer look at it.
Also I'll check why not having tagcache causes a crash.
* Fix the issue with the peakmeter described above
* Fix crashing when the WPS had no newline at the end of the file (reported by pixelma)
* Fix some issues with sublines display
* Adapt to amiconn's archos player fixes. Now both the progressbars are displayed correctly.
* Some other changes I don't remember :)
* Memory improvements, mainly by removing the format_buffer where the WPS source was stored. The parser now uses the plugin buffer as temporary storage for the source.
* BMP loading was rewritten to make the pictures be loaded all at once after the parsing is finished
* Other improvements I can't remember