It seems to me that in this version of the function using float p=.7071067812f; float q=.7071067812f; will just leads after applying all the products and squaring to p and q having a common factor 0.5 which can be extracted from the formulaes. So I propose to replace: float p=.7071067812f; float q=.7071067812f; float w=vorbis_coslook(wdel*k); float *ftmp=lsp; int c=m>>1; by: float w=vorbis_coslook(wdel*k); float p=lsp[0]-w; float q=lsp[1]-w; float *ftmp=lsp + 2; int c=(m>>1) - 1; and: vorbis_invsq2explook(qexp+m) by: vorbis_invsq2explook(qexp+m-1) 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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
> -----Original Message----- > From: TIMMERMANS ANDRE > Sent: Wednesday, June 26, 2002 8:40 AM > To: vorbis-dev@xiph.org > Subject: [vorbis-dev] FLOAT_LOOKUP version of lsp_to_curve > > It seems to me that in this version of the function using > > float p=.7071067812f; > float q=.7071067812f; > > will just leads after applying all the products and squaring > to p and q having a common factor 0.5 which can be extracted > from the formulaes. > > So I propose to replace: > > float p=.7071067812f; > float q=.7071067812f; > float w=vorbis_coslook(wdel*k); > float *ftmp=lsp; > int c=m>>1; > > by: > > float w=vorbis_coslook(wdel*k); > float p=lsp[0]-w; > float q=lsp[1]-w; > float *ftmp=lsp + 2; > int c=(m>>1) - 1; > > and: > > vorbis_invsq2explook(qexp+m) > > by: > > vorbis_invsq2explook(qexp+m-1) >I forget to add that strictly speaking the looping conditions should changed on do{ q*=ftmp[0]-w; p*=ftmp[1]-w; ftmp+=2; }while(--c); but if I understand it correctly m is always greater or equal than 8 which means the loop will always be executed at least once. 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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
> -----Original Message----- > From: TIMMERMANS ANDRE > Sent: Wednesday, June 26, 2002 8:47 AM > To: 'vorbis-dev@xiph.org' > Subject: RE: [vorbis-dev] FLOAT_LOOKUP version of lsp_to_curve > > > -----Original Message----- > > From: TIMMERMANS ANDRE > > Sent: Wednesday, June 26, 2002 8:40 AM > > To: vorbis-dev@xiph.org > > Subject: [vorbis-dev] FLOAT_LOOKUP version of lsp_to_curve > > > > It seems to me that in this version of the function using > > > > float p=.7071067812f; > > float q=.7071067812f; > > > > will just leads after applying all the products and squaring > > to p and q having a common factor 0.5 which can be extracted > > from the formulaes. > > > > So I propose to replace: > > > > float p=.7071067812f; > > float q=.7071067812f; > > float w=vorbis_coslook(wdel*k); > > float *ftmp=lsp; > > int c=m>>1; > > > > by: > > > > float w=vorbis_coslook(wdel*k); > > float p=lsp[0]-w; > > float q=lsp[1]-w; > > float *ftmp=lsp + 2; > > int c=(m>>1) - 1; > > > > and: > > > > vorbis_invsq2explook(qexp+m) > > > > by: > > > > vorbis_invsq2explook(qexp+m-1) > > > I forget to add that strictly speaking the looping conditions should changed on > > do{ > q*=ftmp[0]-w; > p*=ftmp[1]-w; > ftmp+=2; > }while(--c); > > but if I understand it correctly m is always greater or equal than 8 > which means the loop will always be executed at least once. >I have mad a confusion with windowing/mdct, from floor one I see the 0 < m < 256. But is really m = 1 valid because in that case not only my changes are problematic but the integer variant of lsp_to_curve is incorrect. 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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.