[FFmpeg-devel] [PATCH] Add a codebook generator

Vitor vitor1001
Thu May 31 00:58:25 CEST 2007


Hi

Michael Niedermayer wrote:
> Hi
>
> [...]
>   
> one trick which might speed this up is to apply a orthogonal decorrelation
> transform on the points (for example the DCT or hadamard transform) the
> reason why this might be faster is that it concentrates the energy into
> the first few coefficients and so the distance_limited() will on average
> stop sooner
> note that the euclidian distance does not change between orthogonally
> transformed (=rotated) points
> though this maybe should be left for a future patch ...
>
>
> [...]
>   

I don't pretend to understand why an Hadamard transform can concentrate 
the energy in the first coefficients, but if it does, maybe it would be 
a good idea to sort the codebooks by the first coefficient, then do a 
binary search to find a good candidate to the closest. Then try the 
other codebooks until the distance of the first coefficient is greater 
than the best distance. It should be faster at least for small dimensions...

-Vitor




More information about the ffmpeg-devel mailing list