Object look(DspState vd, InfoMode mi, Object i){ float scale; Info vi=vd.vi; InfoFloor0 info=(InfoFloor0)i; LookFloor0 look=new LookFloor0(); look.m=info.order; look.n=vi.blocksizes[mi.blockflag]/2; look.ln=info.barkmap; look.vi=info; look.lpclook.init(look.ln, look.m); // we choose a scaling constant so that: scale=look.ln/toBARK((float)(info.rate/2.)); // the mapping from a linear scale to a smaller bark scale is // straightforward. We do *not* make sure that the linear mapping // does not skip bark-scale bins; the decoder simply skips them and // the encoder may do what it wishes in filling them. They're // necessary in some mapping combinations to keep the scale spacing // accurate look.linearmap=new int[look.n]; for(int j=0; j<look.n; j++){ int val=(int)Math.floor(toBARK((float)((info.rate/2.)/look.n*j))*scale); // bark numbers represent band edges if(val>=look.ln) val=look.ln; // guard against the approximation look.linearmap[j]=val; } return look; }
Object look(DspState vd, InfoMode mi, Object i){ float scale; Info vi=vd.vi; InfoFloor0 info=(InfoFloor0)i; LookFloor0 look=new LookFloor0(); look.m=info.order; look.n=vi.blocksizes[mi.blockflag]/2; look.ln=info.barkmap; look.vi=info; look.lpclook.init(look.ln, look.m); // we choose a scaling constant so that: scale=look.ln/toBARK((float)(info.rate/2.)); // the mapping from a linear scale to a smaller bark scale is // straightforward. We do *not* make sure that the linear mapping // does not skip bark-scale bins; the decoder simply skips them and // the encoder may do what it wishes in filling them. They're // necessary in some mapping combinations to keep the scale spacing // accurate look.linearmap=new int[look.n]; for(int j=0; j<look.n; j++){ int val=(int)Math.floor(toBARK((float)((info.rate/2.)/look.n*j))*scale); // bark numbers represent band edges if(val>=look.ln) val=look.ln; // guard against the approximation look.linearmap[j]=val; } return look; }
Object look(DspState vd, InfoMode mi, Object i){ float scale; Info vi=vd.vi; InfoFloor0 info=(InfoFloor0)i; LookFloor0 look=new LookFloor0(); look.m=info.order; look.n=vi.blocksizes[mi.blockflag]/2; look.ln=info.barkmap; look.vi=info; look.lpclook.init(look.ln, look.m); // we choose a scaling constant so that: scale=look.ln/toBARK((float)(info.rate/2.)); // the mapping from a linear scale to a smaller bark scale is // straightforward. We do *not* make sure that the linear mapping // does not skip bark-scale bins; the decoder simply skips them and // the encoder may do what it wishes in filling them. They're // necessary in some mapping combinations to keep the scale spacing // accurate look.linearmap=new int[look.n]; for(int j=0; j<look.n; j++){ int val=(int)Math.floor(toBARK((float)((info.rate/2.)/look.n*j))*scale); // bark numbers represent band edges if(val>=look.ln) val=look.ln; // guard against the approximation look.linearmap[j]=val; } return look; }
Object look(DspState vd, InfoMode mi, Object i) { float scale; Info vi = vd.vi; InfoFloor0 info = (InfoFloor0) i; LookFloor0 look = new LookFloor0(); look.m = info.order; look.n = vi.blocksizes[mi.blockflag] / 2; look.ln = info.barkmap; look.vi = info; look.lpclook.init(look.ln, look.m); // we choose a scaling constant so that: scale = look.ln / toBARK((float) (info.rate / 2.)); // the mapping from a linear scale to a smaller bark scale is // straightforward. We do *not* make sure that the linear mapping // does not skip bark-scale bins; the decoder simply skips them and // the encoder may do what it wishes in filling them. They're // necessary in some mapping combinations to keep the scale spacing // accurate look.linearmap = new int[look.n]; for (int j = 0; j < look.n; j++) { int val = (int) Math.floor(toBARK((float) ((info.rate / 2.) / look.n * j)) * scale); // bark numbers represent band edges if (val >= look.ln) val = look.ln; // guard against the approximation look.linearmap[j] = val; } return look; }
Object look(DspState vd, InfoMode mi, Object i){ float scale; Info vi=vd.vi; InfoFloor0 info=(InfoFloor0)i; LookFloor0 look=new LookFloor0(); look.m=info.order; look.n=vi.blocksizes[mi.blockflag]/2; look.ln=info.barkmap; look.vi=info; look.lpclook.init(look.ln, look.m); // we choose a scaling constant so that: scale=look.ln/toBARK((float)(info.rate/2.)); // the mapping from a linear scale to a smaller bark scale is // straightforward. We do *not* make sure that the linear mapping // does not skip bark-scale bins; the decoder simply skips them and // the encoder may do what it wishes in filling them. They're // necessary in some mapping combinations to keep the scale spacing // accurate look.linearmap=new int[look.n]; for(int j=0; j<look.n; j++){ int val=(int)Math.floor(toBARK((float)((info.rate/2.)/look.n*j))*scale); // bark numbers represent band edges if(val>=look.ln) val=look.ln; // guard against the approximation look.linearmap[j]=val; } return look; }