[vorbis-dev] floor0.c and lsp.c optimisations
TIMMERMANS ANDRE
Andre.Timmermans at sbs.be
Wed Sep 11 00:04:32 PDT 2002
Hi,
I think that the introduction of the lsp_look lookup array
isn't ideal and found a better change that can be applied.
in floor0_map_lazy_init() you can replace
look->linearmap[W][j]=val;
by
look->linearmap[W][j]=vorbis_coslook(M_PI*val/look->ln);
and in vorbis_lsp_to_curve you then replace
float w=vorbis_coslook(wdel*k);
...
}while(map[i]==k);
by
float w=map[i];
...
}while(map[i]==w);
then get rid of the ln function parameter and the k local variable.
<p><p>Next the fact that p and q are initialised to 1/sqrt(2),
multiplied by a series of factors and finally squared
means that on exit the 1/sqrt(2) becomes a 1/2 factor
and me think that there are some multiplications
that can be spared in the process by doing
float p=lsp[0]-w;
float q=lsp[1]-w;
int c=(m>>1)-1;
...
q=frexp(p+q,&qexp);
qexp--;
André
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list