[FFmpeg-devel] [PATCH] SBG decoder
Nicolas George
nicolas.george at normalesup.org
Sun Dec 4 19:48:46 CET 2011
Le tridi 13 frimaire, an CCXX, Michael Niedermayer a écrit :
> A similar trick as with LCGs is possible here, allowing to double the
> distance of the source and destination coefficients (the number of
> source coeffs is limited to FFMAX(A,B) because more can be simplified
> by applying the n(i) = n(i-A) + n(i-B).
> This is a bit more messy but it also allows to quickly calculate any
> point in the cycle
This one is in fact a simple matrix exponentiation: if we consider the
state[index+i] vector, each step is the multiplication by a sparse 64×64
matrix with an over-diagonal of 1 (corresponding to the index increment)
except the last column, with 1s in the rows corresponding to A and B.
Unfortunately, exponentiating a 64×64 matrix has a rather large base cost,
and if using it to seek is indeed asymptotically faster, a quick benchmark
shows that simple skipping is faster for up to six millions steps (on my
box, where it takes 9.5 ms).
This is not really satisfactory.
On the other hand, the dithering noise amounts to about half the time spent
by ffwavesynth, so improving the speed there would be useful indeed. I will
do some listening tests to see if a simple LCG can be enough, although I
really do not like the fact that the lower bits are less random that the
upper ones.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111204/77e943a9/attachment.asc>
More information about the ffmpeg-devel
mailing list