diff --git a/COPYING b/COPYING index 240ee09165486cb2b4d0dd320629abb92e22767e..7f4efc964beffb30510d3e487b2d19eafa321d26 100644 --- a/COPYING +++ b/COPYING @@ -1,6 +1,6 @@ Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic, Jean-Marc Valin, Timothy B. Terriberry, - CSIRO, Gregory Maxwell, Mark Borgerding, + CSIRO, Gregory Maxwell, Mark Borgerding, Erik de Castro Lopo Redistribution and use in source and binary forms, with or without diff --git a/Makefile.draft b/Makefile.draft index 501f76eb14e97bf62ef5c4b5d382ce14829019bd..fdf1c937159df7fc0607bfe5649dc6b29d71ed65 100644 --- a/Makefile.draft +++ b/Makefile.draft @@ -120,7 +120,7 @@ $(TARGET): $(OBJS) opus_demo$(EXESUFFIX): $(OPUSDEMO_OBJS) $(TARGET) $(LINK.o.cmdline) - + opus_compare$(EXESUFFIX): $(OPUSCOMPARE_OBJS) $(LINK.o.cmdline) diff --git a/README b/README index 5387aeac0126686b275d8108914080f6ad36c2de..c48b91efd6084028c78a378c9c8b6a889beb97e6 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -This is a prototype codec and for now it has limited functionality. +This is a prototype codec and for now it has limited functionality. To build from a distribution tarball, you only need to do the following: diff --git a/celt/opus_custom_demo.c b/celt/opus_custom_demo.c index e25341b8763f3be16403d1e07a88e8f55b591c52..f15ce42b9a4f10547b84fcc8dbc36a28474c8df4 100644 --- a/celt/opus_custom_demo.c +++ b/celt/opus_custom_demo.c @@ -5,14 +5,14 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -66,7 +66,7 @@ int main(int argc, char *argv[]) "<input> <output>\n"); return 1; } - + rate = (opus_int32)atol(argv[1]); channels = atoi(argv[2]); frame_size = atoi(argv[3]); @@ -100,7 +100,7 @@ int main(int argc, char *argv[]) fclose(fin); return 1; } - + enc = opus_custom_encoder_create(mode, channels, &err); if (err != 0) { @@ -124,7 +124,7 @@ int main(int argc, char *argv[]) complexity=atoi(argv[5]); opus_custom_encoder_ctl(enc,OPUS_SET_COMPLEXITY(complexity)); } - + in = (opus_int16*)malloc(frame_size*channels*sizeof(opus_int16)); out = (opus_int16*)malloc(frame_size*channels*sizeof(opus_int16)); @@ -186,7 +186,7 @@ int main(int argc, char *argv[]) skip = 0; } PRINT_MIPS(stderr); - + opus_custom_encoder_destroy(enc); opus_custom_decoder_destroy(dec); fclose(fin); diff --git a/include/opus_custom.h b/include/opus_custom.h index a497d79087c1607f6a274031be7523c2a715eb90..29623b364b0f2aa169c26eafffd410b736b693ed 100644 --- a/include/opus_custom.h +++ b/include/opus_custom.h @@ -1,6 +1,6 @@ /* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation - Copyright (c) 2008 Gregory Maxwell + Copyright (c) 2008 Gregory Maxwell Written by Jean-Marc Valin and Gregory Maxwell */ /** @file celt.h @@ -11,14 +11,14 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/silk/SigProc_FIX.h b/silk/SigProc_FIX.h index 19eeecfae56c2d712691ca0d5b866cb8b6ca07d2..fc8c8e9e82b59e44f1cd30da157a57e4e9218297 100644 --- a/silk/SigProc_FIX.h +++ b/silk/SigProc_FIX.h @@ -141,7 +141,7 @@ opus_int32 silk_LPC_inverse_pred_gain_Q24( /* O Returns inverse pred /* Split signal in two decimated bands using first-order allpass filters */ void silk_ana_filt_bank_1( - const opus_int16 *in, /* I Input signal [N] */ + const opus_int16 *in, /* I Input signal [N] */ opus_int32 *S, /* I/O State vector [2] */ opus_int16 *outL, /* O Low band [N/2] */ opus_int16 *outH, /* O High band [N/2] */ @@ -154,18 +154,18 @@ void silk_ana_filt_bank_1( /* Approximation of 128 * log2() (exact inverse of approx 2^() below) */ /* Convert input to a log scale */ -opus_int32 silk_lin2log( +opus_int32 silk_lin2log( const opus_int32 inLin /* I input in linear scale */ ); /* Approximation of a sigmoid function */ -opus_int silk_sigm_Q15( +opus_int silk_sigm_Q15( opus_int in_Q5 /* I */ ); /* Approximation of 2^() (exact inverse of approx log2() above) */ /* Convert input to a linear scale */ -opus_int32 silk_log2lin( +opus_int32 silk_log2lin( const opus_int32 inLog_Q7 /* I input on log scale */ ); diff --git a/silk/ana_filt_bank_1.c b/silk/ana_filt_bank_1.c index bad630e60d02ebe4f463f48298268ea04ade5832..07a4ab1b7f7795b2738aa3859657154006f94ab5 100644 --- a/silk/ana_filt_bank_1.c +++ b/silk/ana_filt_bank_1.c @@ -37,7 +37,7 @@ static opus_int16 A_fb1_21 = -24290; /* (opus_int16)(20623 << 1) */ /* Split signal into two decimated bands using first-order allpass filters */ void silk_ana_filt_bank_1( - const opus_int16 *in, /* I Input signal [N] */ + const opus_int16 *in, /* I Input signal [N] */ opus_int32 *S, /* I/O State vector [2] */ opus_int16 *outL, /* O Low band [N/2] */ opus_int16 *outH, /* O High band [N/2] */ diff --git a/silk/float/SigProc_FLP.h b/silk/float/SigProc_FLP.h index 0fd1a6d9a47a3680c0b55c66a2550445bd940cf5..ee85dd06e451bc154d2e9a38ac4860bca1e1a08e 100644 --- a/silk/float/SigProc_FLP.h +++ b/silk/float/SigProc_FLP.h @@ -191,9 +191,9 @@ static inline void silk_short2float_array( } /* using log2() helps the fixed-point conversion */ -static inline silk_float silk_log2( double x ) -{ - return ( silk_float )( 3.32192809488736 * log10( x ) ); +static inline silk_float silk_log2( double x ) +{ + return ( silk_float )( 3.32192809488736 * log10( x ) ); } #ifdef __cplusplus diff --git a/silk/float/encode_frame_FLP.c b/silk/float/encode_frame_FLP.c index facb410496ebce4c4cc0587c03e0fb31ca13085d..e0d1e04da4e2955275f9e438020fc04ba8d2c4a9 100644 --- a/silk/float/encode_frame_FLP.c +++ b/silk/float/encode_frame_FLP.c @@ -200,7 +200,7 @@ opus_int silk_encode_frame_FLP( /****************************************/ silk_encode_pulses( psRangeEnc, psEnc->sCmn.indices.signalType, psEnc->sCmn.indices.quantOffsetType, psEnc->sCmn.pulses, psEnc->sCmn.frame_length ); - + nBits = ec_tell( psRangeEnc ); if( useCBR == 0 && iter == 0 && nBits <= maxBits ) { diff --git a/silk/lin2log.c b/silk/lin2log.c index 0772e470bd35e497f54d76228acd0adaaa35d6f4..7992dba7ad28022055550b23f538de6014b1c32b 100644 --- a/silk/lin2log.c +++ b/silk/lin2log.c @@ -32,7 +32,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "SigProc_FIX.h" /* Approximation of 128 * log2() (very close inverse of silk_log2lin()) */ /* Convert input to a log scale */ -opus_int32 silk_lin2log( +opus_int32 silk_lin2log( const opus_int32 inLin /* I input in linear scale */ ) { diff --git a/silk/resampler_private_IIR_FIR.c b/silk/resampler_private_IIR_FIR.c index f17fb5cae3a03da6e66e34c42579901a553c8d1b..afbf3f8230f1b2a709c483f7ed3b48c86c17634f 100644 --- a/silk/resampler_private_IIR_FIR.c +++ b/silk/resampler_private_IIR_FIR.c @@ -33,10 +33,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "resampler_private.h" static inline opus_int16 *silk_resampler_private_IIR_FIR_INTERPOL( - opus_int16 *out, - opus_int16 *buf, - opus_int32 max_index_Q16, - opus_int32 index_increment_Q16 + opus_int16 *out, + opus_int16 *buf, + opus_int32 max_index_Q16, + opus_int32 index_increment_Q16 ) { opus_int32 index_Q16, res_Q15; diff --git a/silk/resampler_private_down_FIR.c b/silk/resampler_private_down_FIR.c index d1ee15a36e08c50a59425b1b1556244593851e4b..7642df21f3f71cf7fe38a734c94050688bf71c3b 100644 --- a/silk/resampler_private_down_FIR.c +++ b/silk/resampler_private_down_FIR.c @@ -33,12 +33,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "resampler_private.h" static inline opus_int16 *silk_resampler_private_down_FIR_INTERPOL( - opus_int16 *out, - opus_int32 *buf, - const opus_int16 *FIR_Coefs, + opus_int16 *out, + opus_int32 *buf, + const opus_int16 *FIR_Coefs, opus_int FIR_Order, opus_int FIR_Fracs, - opus_int32 max_index_Q16, + opus_int32 max_index_Q16, opus_int32 index_increment_Q16 ) { @@ -170,7 +170,7 @@ void silk_resampler_private_down_FIR( max_index_Q16 = silk_LSHIFT32( nSamplesIn, 16 ); /* Interpolate filtered signal */ - out = silk_resampler_private_down_FIR_INTERPOL( out, buf, FIR_Coefs, S->FIR_Order, + out = silk_resampler_private_down_FIR_INTERPOL( out, buf, FIR_Coefs, S->FIR_Order, S->FIR_Fracs, max_index_Q16, index_increment_Q16 ); in += nSamplesIn; diff --git a/silk/sigm_Q15.c b/silk/sigm_Q15.c index 8d6b84b07098a1edd89deb82fc04b838a1423710..63842e5b54d43f1c822cba4af07a85fd7aa6f002 100644 --- a/silk/sigm_Q15.c +++ b/silk/sigm_Q15.c @@ -46,7 +46,7 @@ static const opus_int32 sigm_LUT_neg_Q15[ 6 ] = { 16384, 8812, 3906, 1554, 589, 219 }; -opus_int silk_sigm_Q15( +opus_int silk_sigm_Q15( opus_int in_Q5 /* I */ ) { diff --git a/tests/run_vectors.sh b/tests/run_vectors.sh index 9b5c29be39d12e76dc80c0ee634e6c1378145b84..ff685d81ec4a1f53c08ac8014f5519444a789829 100755 --- a/tests/run_vectors.sh +++ b/tests/run_vectors.sh @@ -19,8 +19,8 @@ if [ -d $VECTOR_PATH ]; then echo Test vectors found in $VECTOR_PATH else echo No test vectors found - #Don't make the test fail here because the test vectors will be - #distributed separateyl + #Don't make the test fail here because the test vectors + #will be distributed separately exit 0 fi @@ -40,7 +40,7 @@ for file in `seq -w 1 11` do if [ -e $VECTOR_PATH/testvector$file.bit ]; then echo Testing testvector$file - else + else echo Bitstream file not found: testvector$file.bit fi if $OPUS_DEMO -d $RATE 1 $VECTOR_PATH/testvector$file.bit tmp.out >> logs_mono.txt 2>&1; then @@ -70,7 +70,7 @@ for file in `seq -w 1 11` do if [ -e $VECTOR_PATH/testvector$file.bit ]; then echo Testing testvector$file - else + else echo Bitstream file not found: testvector$file fi if $OPUS_DEMO -d $RATE 2 $VECTOR_PATH/testvector$file.bit tmp.out >> logs_stereo.txt 2>&1; then