Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2016-07-25 22:28:27 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-07-25 22:28:27 +0300
commit3b019585fc2084ebda7219ae6a7eacbce276b088 (patch)
treef481453134fb386d69f038f5f2bd21d10a282293
parent2d28ade4757fd8bc4b2f4b5842286157c113b6a9 (diff)
make decision
-rw-r--r--celt/bands.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/celt/bands.c b/celt/bands.c
index 35afed8f..5c8380cb 100644
--- a/celt/bands.c
+++ b/celt/bands.c
@@ -1496,7 +1496,7 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
opus_val32 dist0, dist1;
int cm;
int rate0, rate1;
- float lambda = .00003;
+ float lambda = .00000003;
/* Make a copy. */
cm = x_cm|y_cm;
ec_save = *ec;
@@ -1533,15 +1533,15 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
OPUS_COPY(Y, Y_save, N);
OPUS_COPY(norm+effective_lowband, norm_save, N);
/* Encode with best choice. */
- //printf("%f %f %d %d\n", dist0, dist1, rate0, rate1);
- //ctx.theta_round = (dist0 + lambda*rate0 < dist1 + lambda*rate1) ? -1 : 1;
+ //printf("%d %f %f %d %d\n", N, dist0, dist1, rate0, rate1);
+ ctx.theta_round = (dist0 + lambda*rate0 < dist1 + lambda*rate1) ? -1 : 1;
//if (fabs(dist0-dist1) < .0001 || dist0 > 2) ctx.theta_round = 0;
//ctx.theta_round = 0;
- ctx.theta_round = 0;
- if (dist0 < dist1 && rate0 < rate1)
- ctx.theta_round = -1;
- else if (dist0 > dist1 && rate0 > rate1)
- ctx.theta_round = 1;
+ //ctx.theta_round = 0;
+ //if (dist0 < dist1 && rate0 < rate1)
+ // ctx.theta_round = -1;
+ //else if (dist0 > dist1 && rate0 > rate1)
+ // ctx.theta_round = 1;
x_cm = quant_band_stereo(&ctx, X, Y, N, b, B,
effective_lowband != -1 ? norm+effective_lowband : NULL, LM,
last?NULL:norm+M*eBands[i]-norm_offset, lowband_scratch, cm);