Skip to content

Commit

Permalink
Fix d330cce: 1/8 bit headroom in cubic bit alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
jmvalin committed Dec 20, 2024
1 parent 99fc239 commit 4bfbb86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion celt/bands.c
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ static unsigned cubic_quant_partition(struct band_ctx *ctx, celt_norm *X, int N,
if (LM==0 || b<=2*N<<BITRES) {
int K, res, ret;
/* Resolution left after taking into account coding the cube face. */
res = (b-(1<<BITRES)-ctx->m->logN[ctx->i]-(LM<<BITRES))/(N-1);
res = (b-(1<<BITRES)-ctx->m->logN[ctx->i]-(LM<<BITRES)-1)/(N-1);
res = IMIN(14<<BITRES, IMAX(0, res));
K = compute_qext_res(res);
K = IMAX(1, K>>1<<1);
Expand Down

0 comments on commit 4bfbb86

Please sign in to comment.