20 May '13 - 17:56 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Further optimization: Re-order samples  (Read 7349 times)
saga
Posts: 1364


« on: 27 Jul '10 - 16:42 »
Reply with quoteQuote

I've got an idea for further optimization in the mo3 encoder after having a look at an encoded file: I took an IT file in instrument mode, which had quite a few empty sample slots. To save even more bytes, those empty sample slots could simply be removed, so that the useless sample headers don't have to be stored.
Logged
Ian @ un4seen
Administrator
Posts: 15253


« Reply #1 on: 27 Jul '10 - 17:38 »
Reply with quoteQuote

I'm not sure that would knock much off the file size as the sample structures are compressed, which should reduce empty/duplicate structures to practically nothing. Just to be sure though, you could try removing the empty sample slots from the IT file and make comparisons Smiley
Logged
saga
Posts: 1364


« Reply #2 on: 25 Jul '11 - 21:32 »
Reply with quoteQuote

I found that 6 sample slots made a different of a bit more than 1KiB (same with an uncompressed IT file). That is not a whole lot of course, but I suppose it could make a difference when size really matters. Of course it would also be possible for people to do it in their tracker (if it supports reordering samples), but it would be even nicer to automate this.



Talking about optimizations... MO3 keeps unused envelopes (which cannot be enabled in the XM format) and envelopes parts that can never be reached (specifically, the parts beyond the loop point in the IT format, where there is no command to jump around in the envelope), which is a pointless waste of space. I guess that removing those parts would be a trivial task, so why not add it to the encoder? Smiley
(as you might notice, I am currently fighting for every byte I can drop in a specific MO3 file...)
« Last Edit: 26 Jul '11 - 15:04 by saga » Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines