Skip to content

Commit

Permalink
Fix 090f409: Fix macDepth computation
Browse files Browse the repository at this point in the history
  • Loading branch information
jmvalin committed Jan 17, 2025
1 parent 75b65fd commit 176c52d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion celt/celt_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -1603,7 +1603,7 @@ static int compute_vbr(const CELTMode *mode, AnalysisInfo *analysis, opus_int32
int bins;
bins = eBands[nbEBands-2]<<LM;
/*floor_depth = SHR32(MULT16_16((C*bins<<BITRES),celt_log2(SHL32(MAX16(1,sample_max),13))), DB_SHIFT);*/
floor_depth = (opus_int32)SHR32(MULT16_16((C*bins<<BITRES),maxDepth), DB_SHIFT);
floor_depth = (opus_int32)SHR32(MULT16_32_Q15((C*bins<<BITRES),maxDepth), DB_SHIFT-15);
floor_depth = IMAX(floor_depth, target>>2);
target = IMIN(target, floor_depth);
/*printf("%f %d\n", maxDepth, floor_depth);*/
Expand Down

0 comments on commit 176c52d

Please sign in to comment.