Thanks for the comments. A very serendipitous observation about AC - you're right about using CODE-LOW - we realised this when we started work on optimising the arithmetic decoder in Schro a couple of weeks ago, and this together with other improvements give about a 30% speed-up. We'll be committing these next week I guess.
I think I'll probably add this as an informative note, since a) the original structure corresponds to the usual description of renormalisation in the academic literature and b) it is the same as in the SMPTE spec which is nearly ratified, and which I therefore don't want to change at this very late stage. It will be really useful to have some more implementation notes in there, though. I'll check over all the other comments and produce a new 2.2.x release. many thanks, Thomas >-----Original Message----- >From: Dennis Ranke [mailto:[EMAIL PROTECTED] >Sent: 21 September 2008 16:41 >To: schrodinger-devel@lists.sourceforge.net >Subject: [Schrodinger-devel] Some minor notes regarding the >Dirac spec, including a small performance gain in the >arithmetic decoder > >Hi, > >Here are some observations on the Dirac spec (2.2.2) I made >while writing a toy-decoder for dirac: > >13.4.2.2: subband_coeffs() is missing "quant_index" in the >parameter list > >13.4.3.2: codeblock() Uses a local variable "band" that's not >set in this function. (should be "band = coeff_data[level][orient]") > >15.6.2: The lift2-4 functions use wrong parameters in the for >statement. >lift1 is correct ("for i = -N to M" vs. "for i = D to L + D - 1") > >Arithmetic decoder: > >There is no need for the arithmetic decoder to use the >variable "state[LOW]". You can simply change > count = state[CODE] - state[LOW] >to > count = state[CODE] >and > state[LOW] += range_times_prob >to > state[CODE] -= range_times_prob >and simplify renormalise() to: > state[RANGE] <<= 1 > state[CODE] <<= 1 > state[CODE] += read_bitb() >(There is no need for the bit twiddling and the masking if >state[LOW] always stays zero.) > >Short justification: > >In the end, state[LOW] is only used to calculate "count", >which is the real state that the read_boola function is >interested in. So anything that produces the correct value for >"count" is valid. > >Now count is defined as: > count = code - low > >The operation > low' = low + range_times_prob >changes "count" like this: > count' = code - low - range_times_prob = count - range_times_prob > >The renormalise operation: > low' = low * 2 > code' = code * 2 + read_bitb >changes "count" like this: > count' = code * 2 + read_bitb - low * 2 = (code - low) * 2 >+ read_bitb > = count * 2 + read_bitb > >So, it is possible to use "count" directly as a state variable >instead of "code" and "low" and this greatly simplifies the >renormalise function. > >Regards, >Dennis Ranke > >--------------------------------------------------------------- >---------- >This SF.Net email is sponsored by the Moblin Your Move >Developer's challenge Build the coolest Linux based >applications with Moblin SDK & win great prizes Grand prize is >a trip for two to an Open Source event anywhere in the world >http://moblin-contest.org/redirect.php?banner_id=100&url=/ >_______________________________________________ >Schrodinger-devel mailing list >Schrodinger-devel@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/schrodinger-devel > http://www.bbc.co.uk/ This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Schrodinger-devel mailing list Schrodinger-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/schrodinger-devel