Hi All, Is the following loop in function compute_ebands meant to work out the nearest celt frequency bin to a bark critical band? ?If so why an offset is required to be considered? Thanks in advance if somebody can explain it. Thanks, Hamid /* Spacing follows critical bands */ for (i=0;i<high;i++) { int target = bark_freq[lin+i]; eBands[i+low] = (2*target+offset+res)/(2*res); offset = eBands[i+low]*res - target; }
The offset is there because what's even more important than getting the nearest frequency bin is getting the right *width* for the band. Jean-Marc Quoting Hamid Zare Doust <hzdoust at googlemail.com>:> Hi All, > > Is the following loop in function compute_ebands meant to work out the > nearest celt frequency bin to a bark critical band? ?If so why an > offset is required to be considered? Thanks in advance if somebody can > explain it. > > Thanks, > Hamid > > /* Spacing follows critical bands */ > for (i=0;i<high;i++) > { > int target = bark_freq[lin+i]; > eBands[i+low] = (2*target+offset+res)/(2*res); > offset = eBands[i+low]*res - target; > } > _______________________________________________ > celt-dev mailing list > celt-dev at xiph.org > http://lists.xiph.org/mailman/listinfo/celt-dev > >