Rockbox

Tasklist

FS#11920 - possible savings when reading metadata

Attached to Project: Rockbox
Opened by Andree Buschmann (Buschel) - Thursday, 03 February 2011, 23:55 GMT
Last edited by Andree Buschmann (Buschel) - Sunday, 20 February 2011, 16:21 GMT
Task Type Patches
Category ID3 / meta data
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.7.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Rockbox' ID3 parser does not trim strings fields with in-lying null-termination or multiple zeroes at the string field end. For ape, aac and ogg this is already done.

This patch adds trimming to the ID3 parser in a very simple way. The next item is allowed to be written beyond the next following null in the array. Savings are few, but could be interesting for our reduced metadata size on low memory targets.
This task depends upon

Closed by  Andree Buschmann (Buschel)
Sunday, 20 February 2011, 16:21 GMT
Reason for closing:  Accepted
Additional comments about closing:  Submitted with r29349.
Comment by Andree Buschmann (Buschel) - Thursday, 10 February 2011, 21:21 GMT
The v02 version adds savings for ape- and mp4-tags as well.

Example: In case of multiple genre tags the current svn implementation will read each genre item seperately, write it to id3v2buf and set id3->genre to the last read genre. This way there might be several gernes written to id3v2buf, but only the last one will be valid. In effect we're wasting bytes.

Possible solution in this patch is to only add a new metadata item to id3v2buf, if the dedicated pointer within the id3-struct is still empty.
Comment by Andree Buschmann (Buschel) - Sunday, 13 February 2011, 16:45 GMT
This v03 version only minor impacts the binary size.

Loading...