Skip to content
Snippets Groups Projects
Commit 079b9169 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

using "end" rather than nbEBands for trim_offset[]

parent 1e9fb629
No related branches found
No related tags found
No related merge requests found
......@@ -568,7 +568,7 @@ int compute_allocation(const CELTMode *m, int start, int end, const int *offsets
/* Below this threshold, we're sure not to allocate any PVQ bits */
thresh[j] = IMAX((C)<<BITRES, (3*(m->eBands[j+1]-m->eBands[j])<<LM<<BITRES)>>4);
/* Tilt of the allocation curve */
trim_offset[j] = C*(m->eBands[j+1]-m->eBands[j])*(alloc_trim-5-LM)*(m->nbEBands-j-1)
trim_offset[j] = C*(m->eBands[j+1]-m->eBands[j])*(alloc_trim-5-LM)*(end-j-1)
<<(LM+BITRES)>>6;
/* Giving less resolution to single-coefficient bands because they get
more benefit from having one coarse value per coefficient*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment