[vorbis-dev] regarding vorbis encoder

Leena
Thu, 11 Mar 2004 00:27:09 -0000

How physcoacoustic  model is generated . I was reading noise masking .
I have understood that FFT of 2048 samples is used for finding tone masking
.
And MDCT of same samples is used for noise masking .

 Now while caculating noise masking , logmdct input is used . And function
 bark_noise_hybridmp is called . In that function some mathematical
computation is done and
 noise is calculate . ( noise[i] = R - offset )  Can anyone explain me what
it is .?

logmask is the output of bark_noise_hybridmp ( fun 1)
  why it is substracted and again passed to bark_noise_hybridmp ..?
 (  work[i]=logmdct[i]-logmask[i];)

  What is the algorithm of noise masking.?

----------------------------------------------------------------------------
-----------------------------------------------
void _vp_noisemask(vorbis_look_psy *p,
                   float *logmdct,
                   float *logmask){

  int i,n=p->n;
  float *work=alloca(n*sizeof(*work));

  bark_noise_hybridmp(n,p->bark,logmdct,logmask,
                      140.,-1);

  for(i=0;i<n;i++)work[i]=logmdct[i]-logmask[i];

  bark_noise_hybridmp(n,p->bark,work,logmask,0.,
                      p->vi->noisewindowfixed);

  for(i=0;i<n;i++)work[i]=logmdct[i]-work[i];

  for(i=0;i<n;i++){
    int dB=logmask[i]+.5;
    if(dB>=NOISE_COMPAND_LEVELS)dB=NOISE_COMPAND_LEVELS-1;
    if(dB<0)dB=0;
    logmask[i]= work[i]+p->vi->noisecompand[dB];
  }

}
----------------------------------------------------------------------------
-----------------------------------------------

regards
Leena

--- >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.