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
path: root/src
diff options
context:
space:
mode:
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2011-02-03 20:08:38 +0300
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2011-02-03 20:08:38 +0300
commitf85bc8a293af86165979f35db4e1073b19cca354 (patch)
tree98722a4ca2866ff85e32d2fe2e6b12e5ab9cc177 /src
parent686bfe83faa2b9d50d00751e69905f9df7a62af6 (diff)
Oops, had inverted some tuning lines
Diffstat (limited to 'src')
-rw-r--r--src/opus_decoder.h2
-rw-r--r--src/opus_encoder.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/opus_decoder.h b/src/opus_decoder.h
index e6f05344..82d9be2f 100644
--- a/src/opus_decoder.h
+++ b/src/opus_decoder.h
@@ -51,7 +51,7 @@ struct OpusDecoder {
#endif
};
-inline short ADD_SAT16(a, b) {
+inline short ADD_SAT16(short a, short b) {
int sum = a + b;
return sum > 32767 ? 32767 : sum < -32768 ? -32768 : (short)sum;
};
diff --git a/src/opus_encoder.c b/src/opus_encoder.c
index b0e445f8..3a1cdc4b 100644
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -113,10 +113,10 @@ int opus_encode(OpusEncoder *st, const short *pcm, int frame_size,
if( st->bandwidth == BANDWIDTH_SUPERWIDEBAND ) {
if( st->Fs == 100 * frame_size ) {
/* 24 kHz, 10 ms */
- st->silk_mode.bitRate = ( ( st->silk_mode.bitRate + 8000 - ( 1 - st->use_vbr ) * 7000 ) * 2 ) / 3;
+ st->silk_mode.bitRate = ( ( st->silk_mode.bitRate + 12000 - ( 1 - st->use_vbr ) * 10000 ) * 2 ) / 3;
} else {
/* 24 kHz, 20 ms */
- st->silk_mode.bitRate = ( ( st->silk_mode.bitRate + 12000 - ( 1 - st->use_vbr ) * 10000 ) * 2 ) / 3;
+ st->silk_mode.bitRate = ( ( st->silk_mode.bitRate + 8000 - ( 1 - st->use_vbr ) * 7000 ) * 2 ) / 3;
}
} else {
if( st->Fs == 100 * frame_size ) {