ref: f85bc8a293af86165979f35db4e1073b19cca354
parent: 686bfe83faa2b9d50d00751e69905f9df7a62af6
author: Jean-Marc Valin <[email protected]>
date: Thu Feb 3 07:08:38 EST 2011
Oops, had inverted some tuning lines
--- a/Makefile.draft
+++ b/Makefile.draft
@@ -18,7 +18,8 @@
ldflags-from-ldlibdirs = $(addprefix -L,$(1))
ldlibs-from-libs = $(addprefix -l,$(1))
-CFLAGS += -O2 -g -Wall -DOPUS_BUILD -Drestrict=
+WARNINGS = -Wall -W -Wstrict-prototypes -Wextra -Wcast-align -Wnested-externs -Wshadow -Wno-parentheses -Wno-unused-parameter -Wno-sign-compare
+CFLAGS += -O2 -g $(WARNINGS) -DOPUS_BUILD -Drestrict=
CFLAGS += $(call cppflags-from-defines,$(CDEFINES))
CFLAGS += $(call cppflags-from-includes,$(CINCLUDES))
@@ -59,7 +60,7 @@
test
# Variable definitions
-LIB_NAME = libopus
+LIB_NAME = opus
TARGET = $(LIBPREFIX)$(LIB_NAME)$(LIBSUFFIX)
SRCS_C = $(SILK_SOURCES) $(CELT_SOURCES) $(OPUS_SOURCES)
--- a/src/opus_decoder.h
+++ b/src/opus_decoder.h
@@ -51,7 +51,7 @@
#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;
};
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -113,10 +113,10 @@
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 ) {