Also fixes a minor typo.
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
opus_demo$(EXESUFFIX): $(OPUSDEMO_OBJS) $(TARGET)
$(LINK.o.cmdline)
-
+
opus_compare$(EXESUFFIX): $(OPUSCOMPARE_OBJS)
$(LINK.o.cmdline)
-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:
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
"<input> <output>\n");
return 1;
}
-
+
rate = (opus_int32)atol(argv[1]);
channels = atoi(argv[2]);
frame_size = atoi(argv[3]);
fclose(fin);
return 1;
}
-
+
enc = opus_custom_encoder_create(mode, channels, &err);
if (err != 0)
{
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));
skip = 0;
}
PRINT_MIPS(stderr);
-
+
opus_custom_encoder_destroy(enc);
opus_custom_decoder_destroy(dec);
fclose(fin);
/* 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
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
/* 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] */
/* 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 */
);
/* 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] */
}
/* 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
/****************************************/
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 ) {
#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 */
)
{
#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;
#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
)
{
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;
16384, 8812, 3906, 1554, 589, 219
};
-opus_int silk_sigm_Q15(
+opus_int silk_sigm_Q15(
opus_int in_Q5 /* I */
)
{
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
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
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