[vorbis-dev] Floor0-decode-curve
Csaba Szepesvari
szepes at puhasoft.hu
Wed Oct 15 05:29:00 PDT 2003
In lsp.c of an older distribution (I did not check if this is still in
lsp.c):
/* side effect: changes *lsp to cosines of lsp */
void mudec_lsp_to_curve(float *curve,int *map,int n,int ln,float *lsp,int m,
float amp,float ampoffset){
int i;
float wdel=M_PI/ln;
for(i=0;i<m;i++)lsp[i]=2.f*cos(lsp[i]);
i=0;
while(i<n){
int j,k=map[i];
float p=.5f;
float q=.5f;
float w=2.f*cos(wdel*k);
for(j=1;j<m;j+=2){
q *= w-lsp[j-1];
p *= w-lsp[j];
}
if(j==m){
/* odd order filter; slightly assymetric */
/* the last coefficient */
q*=w-lsp[j-1];
p*=p*(4.f-w*w);
q*=q;
}else{
/* even order filter; still symmetric */
p*=p*(2.f-w);
q*=q*(2.f+w);
}
q=fromdB(amp/sqrt(p+q)-ampoffset);
curve[i]*=q;
while(map[++i]==k)curve[i]*=q;
}
}
Hope this helped,
Csaba
> -----Original Message-----
> From: owner-vorbis-dev at xiph.org [mailto:owner-vorbis-dev at xiph.org]On
> Behalf Of Christian Wassmer
> Sent: Wednesday, October 15, 2003 12:27 PM
> To: vorbis-dev at xiph.org
> Subject: [vorbis-dev] Floor0-decode-curve
>
>
> Hello I'm working on a fix-point decoder for AOS/Bluebottle -
> the proprietary OS of ETH Zurich. I've some problems with
> Floor0-curve-computation: I don't know what the little omega
> [cos(w)] stands for, line 3 of the official Vorbis
> documentation. Does anybody knows what this value means? I've
> tried to get the answer from the jOrbis and Tremor, but both seem
> to do - among other things - Floor0-Curve-Computation somehow
> different than the official documentation. Btw, isn't it
> recommed to implement as the official documentation proposes?
> Thanks Christian Wassmer --- >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.
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003
--- >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