Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2109)

Unified Diff: celt/quant_bands.c

Issue 12388030: Update Opus to 1.0.2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « celt/pitch.c ('k') | celt/rate.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: celt/quant_bands.c
diff --git a/celt/quant_bands.c b/celt/quant_bands.c
index b1d4eb15608e2d3b544114fbe84ff5b4e5120d51..66f1f5fc5e6a1183937ade3a517f30313acd2a18 100644
--- a/celt/quant_bands.c
+++ b/celt/quant_bands.c
@@ -283,12 +283,15 @@ void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd,
/* Encode the global flags using a simple probability model
(first symbols in the stream) */
+ max_decay = QCONST16(16.f,DB_SHIFT);
+ if (end-start>10)
+ {
#ifdef FIXED_POINT
- max_decay = MIN32(QCONST16(16.f,DB_SHIFT), SHL32(EXTEND32(nbAvailableBytes),DB_SHIFT-3));
+ max_decay = MIN32(max_decay, SHL32(EXTEND32(nbAvailableBytes),DB_SHIFT-3));
#else
- max_decay = MIN32(16.f, .125f*nbAvailableBytes);
+ max_decay = MIN32(max_decay, .125f*nbAvailableBytes);
#endif
-
+ }
enc_start_state = *enc;
ALLOC(oldEBands_intra, C*m->nbEBands, opus_val16);
« no previous file with comments | « celt/pitch.c ('k') | celt/rate.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698