Commit 554b349c authored by Timothy B. Terriberry's avatar Timothy B. Terriberry

There are no tabs in source code.

There is also no trailing whitespace.
parent 020a0a48
......@@ -9,12 +9,12 @@ in the Makefile.
An up-to-date implementation conforming to this standard is available in a
Git repository at git://git.xiph.org/opus.git or on a website at:
http://opus-codec.org/
However, although that implementation is expected to remain conformant
with the standard, it is the code in this RFC that shall remain normative.
However, although that implementation is expected to remain conformant
with the standard, it is the code in this RFC that shall remain normative.
To build from the git repository instead of using this RFC, follow these
steps:
1) Clone the repository (latest implementation of this standard at the time
1) Clone the repository (latest implementation of this standard at the time
of publication)
% git clone git://git.opus-codec.org/opus.git
......
......@@ -4,7 +4,7 @@ INCLUDES=-I. -I../ -I../.. -I../../include
all: dump_modes
dump_modes:
$(CC) $(CFLAGS) $(INCLUDES) -DCUSTOM_MODES_ONLY -DCUSTOM_MODES dump_modes.c ../modes.c ../cwrs.c ../rate.c ../entenc.c ../entdec.c ../mathops.c ../mdct.c ../kiss_fft.c -o dump_modes -lm
$(CC) $(CFLAGS) $(INCLUDES) -DCUSTOM_MODES_ONLY -DCUSTOM_MODES dump_modes.c ../modes.c ../cwrs.c ../rate.c ../entenc.c ../entdec.c ../mathops.c ../mdct.c ../kiss_fft.c -o dump_modes -lm
clean:
rm -f dump_modes
......@@ -171,18 +171,18 @@ void dump_modes(FILE *file, CELTMode **modes, int nb_modes)
fprintf(file, "#define FFT_STATE%d_%d_%d\n", mode->Fs, mdctSize, k);
fprintf (file, "static const kiss_fft_state fft_state%d_%d_%d = {\n",
mode->Fs, mdctSize, k);
fprintf (file, "%d,\t/* nfft */\n", mode->mdct.kfft[k]->nfft);
fprintf (file, WORD16 ",\t/* scale */\n", mode->mdct.kfft[k]->scale);
fprintf (file, "%d, /* nfft */\n", mode->mdct.kfft[k]->nfft);
fprintf (file, WORD16 ", /* scale */\n", mode->mdct.kfft[k]->scale);
#ifdef FIXED_POINT
fprintf (file, "%d,\t/* scale_shift */\n", mode->mdct.kfft[k]->scale_shift);
fprintf (file, "%d, /* scale_shift */\n", mode->mdct.kfft[k]->scale_shift);
#endif
fprintf (file, "%d,\t/* shift */\n", mode->mdct.kfft[k]->shift);
fprintf (file, "%d, /* shift */\n", mode->mdct.kfft[k]->shift);
fprintf (file, "{");
for (j=0;j<2*MAXFACTORS;j++)
fprintf (file, "%d, ", mode->mdct.kfft[k]->factors[j]);
fprintf (file, "},\t/* factors */\n");
fprintf (file, "fft_bitrev%d,\t/* bitrev */\n", mode->mdct.kfft[k]->nfft);
fprintf (file, "fft_twiddles%d_%d,\t/* bitrev */\n", mode->Fs, mdctSize);
fprintf (file, "}, /* factors */\n");
fprintf (file, "fft_bitrev%d, /* bitrev */\n", mode->mdct.kfft[k]->nfft);
fprintf (file, "fft_twiddles%d_%d, /* bitrev */\n", mode->Fs, mdctSize);
fprintf (file, "};\n");
fprintf(file, "#endif\n");
......@@ -208,37 +208,37 @@ void dump_modes(FILE *file, CELTMode **modes, int nb_modes)
/* Print the actual mode data */
fprintf(file, "static const CELTMode mode%d_%d_%d = {\n", mode->Fs, mdctSize, mode->overlap);
fprintf(file, INT32 ",\t/* Fs */\n", mode->Fs);
fprintf(file, "%d,\t/* overlap */\n", mode->overlap);
fprintf(file, "%d,\t/* nbEBands */\n", mode->nbEBands);
fprintf(file, "%d,\t/* effEBands */\n", mode->effEBands);
fprintf(file, INT32 ", /* Fs */\n", mode->Fs);
fprintf(file, "%d, /* overlap */\n", mode->overlap);
fprintf(file, "%d, /* nbEBands */\n", mode->nbEBands);
fprintf(file, "%d, /* effEBands */\n", mode->effEBands);
fprintf(file, "{");
for (j=0;j<4;j++)
fprintf(file, WORD16 ", ", mode->preemph[j]);
fprintf(file, "},\t/* preemph */\n");
fprintf(file, "}, /* preemph */\n");
if (standard)
fprintf(file, "eband5ms,\t/* eBands */\n");
fprintf(file, "eband5ms, /* eBands */\n");
else
fprintf(file, "eBands%d_%d,\t/* eBands */\n", mode->Fs, mdctSize);
fprintf(file, "eBands%d_%d, /* eBands */\n", mode->Fs, mdctSize);
fprintf(file, "%d,\t/* maxLM */\n", mode->maxLM);
fprintf(file, "%d,\t/* nbShortMdcts */\n", mode->nbShortMdcts);
fprintf(file, "%d,\t/* shortMdctSize */\n", mode->shortMdctSize);
fprintf(file, "%d, /* maxLM */\n", mode->maxLM);
fprintf(file, "%d, /* nbShortMdcts */\n", mode->nbShortMdcts);
fprintf(file, "%d, /* shortMdctSize */\n", mode->shortMdctSize);
fprintf(file, "%d,\t/* nbAllocVectors */\n", mode->nbAllocVectors);
fprintf(file, "%d, /* nbAllocVectors */\n", mode->nbAllocVectors);
if (standard)
fprintf(file, "band_allocation,\t/* allocVectors */\n");
fprintf(file, "band_allocation, /* allocVectors */\n");
else
fprintf(file, "allocVectors%d_%d,\t/* allocVectors */\n", mode->Fs, mdctSize);
fprintf(file, "allocVectors%d_%d, /* allocVectors */\n", mode->Fs, mdctSize);
fprintf(file, "logN%d,\t/* logN */\n", framerate);
fprintf(file, "window%d,\t/* window */\n", mode->overlap);
fprintf(file, "logN%d, /* logN */\n", framerate);
fprintf(file, "window%d, /* window */\n", mode->overlap);
fprintf(file, "{%d, %d, {", mode->mdct.n, mode->mdct.maxshift);
for (k=0;k<=mode->mdct.maxshift;k++)
fprintf(file, "&fft_state%d_%d_%d, ", mode->Fs, mdctSize, k);
fprintf (file, "}, mdct_twiddles%d},\t/* mdct */\n", mdctSize);
fprintf (file, "}, mdct_twiddles%d}, /* mdct */\n", mdctSize);
fprintf(file, "{%d, cache_index%d, cache_bits%d, cache_caps%d},\t/* cache */\n",
fprintf(file, "{%d, cache_index%d, cache_bits%d, cache_caps%d}, /* cache */\n",
mode->cache.size, mode->Fs/mdctSize, mode->Fs/mdctSize, mode->Fs/mdctSize);
fprintf(file, "};\n");
}
......
......@@ -35,38 +35,38 @@
#undef MULT16_32_Q15_ADD
static inline int MULT16_32_Q15_ADD(int a, int b, int c, int d) {
int m;
asm volatile("MULT $ac1, %0, %1" : : "r" ((int)a), "r" ((int)b));
asm volatile("madd $ac1, %0, %1" : : "r" ((int)c), "r" ((int)d));
asm volatile("EXTR.W %0,$ac1, %1" : "=r" (m): "i" (15));
return m;
int m;
asm volatile("MULT $ac1, %0, %1" : : "r" ((int)a), "r" ((int)b));
asm volatile("madd $ac1, %0, %1" : : "r" ((int)c), "r" ((int)d));
asm volatile("EXTR.W %0,$ac1, %1" : "=r" (m): "i" (15));
return m;
}
#undef MULT16_32_Q15_SUB
static inline int MULT16_32_Q15_SUB(int a, int b, int c, int d) {
int m;
asm volatile("MULT $ac1, %0, %1" : : "r" ((int)a), "r" ((int)b));
asm volatile("msub $ac1, %0, %1" : : "r" ((int)c), "r" ((int)d));
asm volatile("EXTR.W %0,$ac1, %1" : "=r" (m): "i" (15));
return m;
int m;
asm volatile("MULT $ac1, %0, %1" : : "r" ((int)a), "r" ((int)b));
asm volatile("msub $ac1, %0, %1" : : "r" ((int)c), "r" ((int)d));
asm volatile("EXTR.W %0,$ac1, %1" : "=r" (m): "i" (15));
return m;
}
#undef MULT16_16_Q15_ADD
static inline int MULT16_16_Q15_ADD(int a, int b, int c, int d) {
int m;
asm volatile("MULT $ac1, %0, %1" : : "r" ((int)a), "r" ((int)b));
asm volatile("madd $ac1, %0, %1" : : "r" ((int)c), "r" ((int)d));
asm volatile("EXTR.W %0,$ac1, %1" : "=r" (m): "i" (15));
return m;
int m;
asm volatile("MULT $ac1, %0, %1" : : "r" ((int)a), "r" ((int)b));
asm volatile("madd $ac1, %0, %1" : : "r" ((int)c), "r" ((int)d));
asm volatile("EXTR.W %0,$ac1, %1" : "=r" (m): "i" (15));
return m;
}
#undef MULT16_16_Q15_SUB
static inline int MULT16_16_Q15_SUB(int a, int b, int c, int d) {
int m;
asm volatile("MULT $ac1, %0, %1" : : "r" ((int)a), "r" ((int)b));
asm volatile("msub $ac1, %0, %1" : : "r" ((int)c), "r" ((int)d));
asm volatile("EXTR.W %0,$ac1, %1" : "=r" (m): "i" (15));
return m;
int m;
asm volatile("MULT $ac1, %0, %1" : : "r" ((int)a), "r" ((int)b));
asm volatile("msub $ac1, %0, %1" : : "r" ((int)c), "r" ((int)d));
asm volatile("EXTR.W %0,$ac1, %1" : "=r" (m): "i" (15));
return m;
}
......
......@@ -37,20 +37,20 @@
#undef S_MUL_ADD
static inline int S_MUL_ADD(int a, int b, int c, int d) {
int m;
asm volatile("MULT $ac1, %0, %1" : : "r" ((int)a), "r" ((int)b));
asm volatile("madd $ac1, %0, %1" : : "r" ((int)c), "r" ((int)d));
asm volatile("EXTR.W %0,$ac1, %1" : "=r" (m): "i" (15));
return m;
int m;
asm volatile("MULT $ac1, %0, %1" : : "r" ((int)a), "r" ((int)b));
asm volatile("madd $ac1, %0, %1" : : "r" ((int)c), "r" ((int)d));
asm volatile("EXTR.W %0,$ac1, %1" : "=r" (m): "i" (15));
return m;
}
#undef S_MUL_SUB
static inline int S_MUL_SUB(int a, int b, int c, int d) {
int m;
asm volatile("MULT $ac1, %0, %1" : : "r" ((int)a), "r" ((int)b));
asm volatile("msub $ac1, %0, %1" : : "r" ((int)c), "r" ((int)d));
asm volatile("EXTR.W %0,$ac1, %1" : "=r" (m): "i" (15));
return m;
int m;
asm volatile("MULT $ac1, %0, %1" : : "r" ((int)a), "r" ((int)b));
asm volatile("msub $ac1, %0, %1" : : "r" ((int)c), "r" ((int)d));
asm volatile("EXTR.W %0,$ac1, %1" : "=r" (m): "i" (15));
return m;
}
#undef C_MUL
......
......@@ -46,11 +46,11 @@ static inline void dual_inner_prod(const opus_val16 *x, const opus_val16 *y01, c
/* Compute the norm of X+Y and X-Y as |X|^2 + |Y|^2 +/- sum(xy) */
for (j=0;j<N;j++)
{
asm volatile("MADD $ac1, %0, %1" : : "r" ((int)x[j]), "r" ((int)y01[j]));
asm volatile("MADD $ac2, %0, %1" : : "r" ((int)x[j]), "r" ((int)y02[j]));
++j;
asm volatile("MADD $ac1, %0, %1" : : "r" ((int)x[j]), "r" ((int)y01[j]));
asm volatile("MADD $ac2, %0, %1" : : "r" ((int)x[j]), "r" ((int)y02[j]));
asm volatile("MADD $ac1, %0, %1" : : "r" ((int)x[j]), "r" ((int)y01[j]));
asm volatile("MADD $ac2, %0, %1" : : "r" ((int)x[j]), "r" ((int)y02[j]));
++j;
asm volatile("MADD $ac1, %0, %1" : : "r" ((int)x[j]), "r" ((int)y01[j]));
asm volatile("MADD $ac2, %0, %1" : : "r" ((int)x[j]), "r" ((int)y02[j]));
}
asm volatile ("mflo %0, $ac1": "=r"(xy01));
asm volatile ("mflo %0, $ac2": "=r"(xy02));
......
......@@ -426,10 +426,10 @@ static const opus_int16 fft_bitrev60[60] = {
#define FFT_STATE48000_960_0
static const kiss_fft_state fft_state48000_960_0 = {
480, /* nfft */
17476, /* scale */
17476, /* scale */
8, /* scale_shift */
-1, /* shift */
{5, 96, 3, 32, 4, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, }, /* factors */
{5, 96, 3, 32, 4, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, }, /* factors */
fft_bitrev480, /* bitrev */
fft_twiddles48000_960, /* bitrev */
};
......@@ -439,10 +439,10 @@ fft_twiddles48000_960, /* bitrev */
#define FFT_STATE48000_960_1
static const kiss_fft_state fft_state48000_960_1 = {
240, /* nfft */
17476, /* scale */
17476, /* scale */
7, /* scale_shift */
1, /* shift */
{5, 48, 3, 16, 4, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
{5, 48, 3, 16, 4, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
fft_bitrev240, /* bitrev */
fft_twiddles48000_960, /* bitrev */
};
......@@ -452,10 +452,10 @@ fft_twiddles48000_960, /* bitrev */
#define FFT_STATE48000_960_2
static const kiss_fft_state fft_state48000_960_2 = {
120, /* nfft */
17476, /* scale */
17476, /* scale */
6, /* scale_shift */
2, /* shift */
{5, 24, 3, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
{5, 24, 3, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
fft_bitrev120, /* bitrev */
fft_twiddles48000_960, /* bitrev */
};
......@@ -465,10 +465,10 @@ fft_twiddles48000_960, /* bitrev */
#define FFT_STATE48000_960_3
static const kiss_fft_state fft_state48000_960_3 = {
60, /* nfft */
17476, /* scale */
17476, /* scale */
5, /* scale_shift */
3, /* shift */
{5, 12, 3, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
{5, 12, 3, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
fft_bitrev60, /* bitrev */
fft_twiddles48000_960, /* bitrev */
};
......
......@@ -440,7 +440,7 @@ static const kiss_fft_state fft_state48000_960_1 = {
240, /* nfft */
0.004166667f, /* scale */
1, /* shift */
{5, 48, 3, 16, 4, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
{5, 48, 3, 16, 4, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
fft_bitrev240, /* bitrev */
fft_twiddles48000_960, /* bitrev */
};
......@@ -452,7 +452,7 @@ static const kiss_fft_state fft_state48000_960_2 = {
120, /* nfft */
0.008333333f, /* scale */
2, /* shift */
{5, 24, 3, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
{5, 24, 3, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
fft_bitrev120, /* bitrev */
fft_twiddles48000_960, /* bitrev */
};
......@@ -464,7 +464,7 @@ static const kiss_fft_state fft_state48000_960_3 = {
60, /* nfft */
0.016666667f, /* scale */
3, /* shift */
{5, 12, 3, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
{5, 12, 3, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
fft_bitrev60, /* bitrev */
fft_twiddles48000_960, /* bitrev */
};
......
......@@ -66,10 +66,10 @@ int main(int _argc,char **_argv){
const char *env_seed;
ret=0;
entropy=0;
if (_argc > 2) {
fprintf(stderr, "Usage: %s [<seed>]\n", _argv[0]);
return 1;
}
if (_argc > 2) {
fprintf(stderr, "Usage: %s [<seed>]\n", _argv[0]);
return 1;
}
env_seed = getenv("SEED");
if (_argc > 1)
seed = atoi(_argv[1]);
......
......@@ -224,7 +224,7 @@ void testexp2(void)
float error2 = fabs(exp(0.6931471805599453094*x/1024.0)-celt_exp2(x)/65536.0);
if (error1>0.0002&&error2>0.00004)
{
fprintf (stderr, "celt_exp2 failed: x = "WORD", error1 = %f, error2 = %f\n", x,error1,error2);
fprintf (stderr, "celt_exp2 failed: x = "WORD", error1 = %f, error2 = %f\n", x,error1,error2);
ret = 1;
}
}
......
......@@ -611,7 +611,7 @@ WARN_LOGFILE =
# with spaces.
INPUT = @top_srcdir@/include/opus.h \
@top_srcdir@/include/opus_types.h \
@top_srcdir@/include/opus_types.h \
@top_srcdir@/include/opus_defines.h \
@top_srcdir@/include/opus_multistream.h \
@top_srcdir@/include/opus_custom.h
......
This diff is collapsed.
......@@ -58,7 +58,7 @@
<middle>
<section title="Introduction">
<t>This document addresses minor issues that were discovered in the reference
implementation of the Opus codec that serves as the specification in
implementation of the Opus codec that serves as the specification in
<xref target="RFC6716">RFC 6716</xref>. Only issues affecting the decoder are
listed here. An up-to-date implementation of the Opus encoder can be found at
http://opus-codec.org/. The updated specification remains fully compatible with
......@@ -84,7 +84,7 @@
for( n = 0; n < DECODER_NUM_CHANNELS; n++ ) {
ret = silk_init_decoder( &channel_state[ n ] );
}
+ silk_memset(&((silk_decoder *)decState)->sStereo, 0,
+ silk_memset(&((silk_decoder *)decState)->sStereo, 0,
+ sizeof(((silk_decoder *)decState)->sStereo));
+ /* Not strictly needed, but it's cleaner that way */
+ ((silk_decoder *)decState)->prev_decode_only_middle = 0;
......@@ -218,16 +218,16 @@ RESAMPLER_ORDER_FIR_12 * sizeof( opus_int16 ) );
in the patch above are split using a backslash character. The backslashes
at the end of a line and the white space at the beginning
of the following line are not part of the patch. A properly formatted patch
including the three changes above is available at
including the three changes above is available at
<eref target="http://jmvalin.ca/misc_stuff/opus_update.patch"/>.
</t>
</section>
<section title="Downmix to Mono">
<t>The last issue is not strictly a bug, but it is an issue that has been reported
when downmixing an Opus decoded stream to mono, whether this is done inside the decoder
or as a post-processing step on the stereo decoder output. Opus intensity stereo allows
optionally coding the two channels 180-degrees out of phase on a per-band basis.
optionally coding the two channels 180-degrees out of phase on a per-band basis.
This provides better stereo quality than forcing the two channels to be in phase,
but when the output is downmixed to mono, the energy in the affected bands is cancelled
sometimes resulting in audible artefacts.
......
......@@ -419,7 +419,7 @@
</figure>
<t>
<xref target='opus-packetization'/> shows supported frame sizes in
<xref target='opus-packetization'/> shows supported frame sizes in
milliseconds of encoded speech or audio data for the speech and audio modes
(Mode) and sampling rates (fs) of Opus and shows how the timestamp is
incremented for packetization (ts incr). If the Opus encoder
......@@ -427,7 +427,7 @@
increment is the sum of the increments for the individual frames.
</t>
<texttable anchor='opus-packetization' title="Supported Opus frame
<texttable anchor='opus-packetization' title="Supported Opus frame
sizes and timestamp increments">
<ttcol align='center'>Mode</ttcol>
<ttcol align='center'>fs</ttcol>
......@@ -517,7 +517,7 @@
usage and encoding complexity, so an encoder SHOULD NOT encode
frequencies above the audio bandwidth specified by maxplaybackrate.
This parameter can take any value between 8000 and 48000, although
commonly the value will match one of the Opus bandwidths
commonly the value will match one of the Opus bandwidths
(<xref target="bandwidth_definitions"/>).
By default, the receiver is assumed to have no limitations, i.e. 48000.
<vspace blankLines='1'/>
......@@ -531,7 +531,7 @@
This parameter is useful to avoid wasting receiver resources by operating the audio
processing pipeline (e.g. echo cancellation) at a higher rate than necessary.
This parameter can take any value between 8000 and 48000, although
commonly the value will match one of the Opus bandwidths
commonly the value will match one of the Opus bandwidths
(<xref target="bandwidth_definitions"/>).
By default, the sender is assumed to have no limitations, i.e. 48000.
<vspace blankLines='1'/>
......@@ -708,9 +708,9 @@
mapped to "a=ptime" and "a=maxptime" attributes, respectively, in the
SDP.</t>
<t>The OPTIONAL media type parameters "maxaveragebitrate",
"maxplaybackrate", "minptime", "stereo", "cbr", "useinbandfec", and
"usedtx", when present, MUST be included in the "a=fmtp" attribute
<t>The OPTIONAL media type parameters "maxaveragebitrate",
"maxplaybackrate", "minptime", "stereo", "cbr", "useinbandfec", and
"usedtx", when present, MUST be included in the "a=fmtp" attribute
in the SDP, expressed as a media type string in the form of a
semicolon-separated list of parameter=value pairs (e.g.,
maxaveragebitrate=20000). They MUST NOT be specified in an
......@@ -838,7 +838,7 @@
of the other side MUST NOT send with an average bitrate higher than
"maxaveragebitrate" as it might overload the network and/or
receiver. The "maxaveragebitrate" parameter typically will not
compromise interoperability; however, some values might cause
compromise interoperability; however, some values might cause
application performance to suffer, and ought to be set with
care.</t>
......
......@@ -11,13 +11,13 @@
/* Boxes */
.pre
{
white-space: pre; /* CSS 2.0 */
white-space: pre-wrap; /* CSS 2.1 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: -moz-pre-wrap; /* Mozilla */
white-space: -hp-pre-wrap; /* HP Printers */
word-wrap : break-word; /* IE 5+ */
white-space: pre; /* CSS 2.0 */
white-space: pre-wrap; /* CSS 2.1 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: -moz-pre-wrap; /* Mozilla */
white-space: -hp-pre-wrap; /* HP Printers */
word-wrap : break-word; /* IE 5+ */
}
.title_box
......
......@@ -59,11 +59,11 @@
y1="95.107399"
x2="194.53169"
y2="9.9475983e-14">
<stop
<stop
offset="0.0056"
style="stop-color:#8E8E8E"
id="stop7" />
<stop
<stop
offset="1"
style="stop-color:#B5B5B5"
id="stop9" />
......@@ -76,11 +76,11 @@
y1="116.208"
x2="229.61819"
y2="164.46291">
<stop
<stop
offset="0.0056"
style="stop-color:#494748"
id="stop14" />
<stop
<stop
offset="1"
style="stop-color:#000000"
id="stop16" />
......@@ -93,11 +93,11 @@
y1="115.4395"
x2="43.9897"
y2="165.2314">
<stop
<stop
offset="0.0056"
style="stop-color:#494748"
id="stop21" />
<stop
<stop
offset="1"
style="stop-color:#000000"
id="stop23" />
......@@ -110,11 +110,11 @@
y1="115.7188"
x2="311.2847"
y2="165.2822">
<stop
<stop
offset="0.0056"
style="stop-color:#494748"
id="stop28" />
<stop
<stop
offset="1"
style="stop-color:#000000"
id="stop30" />
......@@ -127,11 +127,11 @@
y1="115.5791"
x2="129.1987"
y2="204.4863">
<stop
<stop
offset="0.0056"
style="stop-color:#494748"
id="stop35" />
<stop
<stop
offset="1"
style="stop-color:#000000"
id="stop37" />
......
......@@ -10,7 +10,7 @@
- Verify 'make distcheck' produces a tarball with
the desired name.
- Push tag to public repo.
- Upload source package 'opus-${version}.tar.gz'
- Upload source package 'opus-${version}.tar.gz'
- Add to https://svn.xiph.org/releases/opus/
- Update checksum files
- svn commit
......
......@@ -128,16 +128,16 @@ void silk_CNG(
ALLOC( CNG_sig_Q10, length + MAX_LPC_ORDER, opus_int32 );
/* Generate CNG excitation */
gain_Q16 = silk_SMULWW( psDec->sPLC.randScale_Q14, psDec->sPLC.prevGain_Q16[1] );
if( gain_Q16 >= (1 << 21) || psCNG->CNG_smth_Gain_Q16 > (1 << 23) ) {
gain_Q16 = silk_SMULTT( gain_Q16, gain_Q16 );
gain_Q16 = silk_SUB_LSHIFT32(silk_SMULTT( psCNG->CNG_smth_Gain_Q16, psCNG->CNG_smth_Gain_Q16 ), gain_Q16, 5 );
gain_Q16 = silk_LSHIFT32( silk_SQRT_APPROX( gain_Q16 ), 16 );
} else {
gain_Q16 = silk_SMULWW( gain_Q16, gain_Q16 );
gain_Q16 = silk_SUB_LSHIFT32(silk_SMULWW( psCNG->CNG_smth_Gain_Q16, psCNG->CNG_smth_Gain_Q16 ), gain_Q16, 5 );
gain_Q16 = silk_LSHIFT32( silk_SQRT_APPROX( gain_Q16 ), 8 );
}
gain_Q16 = silk_SMULWW( psDec->sPLC.randScale_Q14, psDec->sPLC.prevGain_Q16[1] );
if( gain_Q16 >= (1 << 21) || psCNG->CNG_smth_Gain_Q16 > (1 << 23) ) {
gain_Q16 = silk_SMULTT( gain_Q16, gain_Q16 );
gain_Q16 = silk_SUB_LSHIFT32(silk_SMULTT( psCNG->CNG_smth_Gain_Q16, psCNG->CNG_smth_Gain_Q16 ), gain_Q16, 5 );
gain_Q16 = silk_LSHIFT32( silk_SQRT_APPROX( gain_Q16 ), 16 );
} else {
gain_Q16 = silk_SMULWW( gain_Q16, gain_Q16 );
gain_Q16 = silk_SUB_LSHIFT32(silk_SMULWW( psCNG->CNG_smth_Gain_Q16, psCNG->CNG_smth_Gain_Q16 ), gain_Q16, 5 );
gain_Q16 = silk_LSHIFT32( silk_SQRT_APPROX( gain_Q16 ), 8 );
}
silk_CNG_exc( CNG_sig_Q10 + MAX_LPC_ORDER, psCNG->CNG_exc_buf_Q14, gain_Q16, length, &psCNG->rand_seed );
/* Convert CNG NLSF to filter representation */
......
......@@ -55,7 +55,7 @@ void silk_VQ_WMat_EC_c(
*rate_dist_Q14 = silk_int32_MAX;
cb_row_Q7 = cb_Q7;
for( k = 0; k < L; k++ ) {
gain_tmp_Q7 = cb_gain_Q7[k];
gain_tmp_Q7 = cb_gain_Q7[k];
diff_Q14[ 0 ] = in_Q14[ 0 ] - silk_LSHIFT( cb_row_Q7[ 0 ], 7 );
diff_Q14[ 1 ] = in_Q14[ 1 ] - silk_LSHIFT( cb_row_Q7[ 1 ], 7 );
......@@ -66,8 +66,8 @@ void silk_VQ_WMat_EC_c(
/* Weighted rate */
sum1_Q14 = silk_SMULBB( mu_Q9, cl_Q5[ k ] );
/* Penalty for too large gain */
sum1_Q14 = silk_ADD_LSHIFT32( sum1_Q14, silk_max( silk_SUB32( gain_tmp_Q7, max_gain_Q7 ), 0 ), 10 );
/* Penalty for too large gain */
sum1_Q14 = silk_ADD_LSHIFT32( sum1_Q14, silk_max( silk_SUB32( gain_tmp_Q7, max_gain_Q7 ), 0 ), 10 );
silk_assert( sum1_Q14 >= 0 );
......@@ -111,7 +111,7 @@ void silk_VQ_WMat_EC_c(
if( sum1_Q14 < *rate_dist_Q14 ) {
*rate_dist_Q14 = sum1_Q14;
*ind = (opus_int8)k;
*gain_Q7 = gain_tmp_Q7;
*gain_Q7 = gain_tmp_Q7;
}
/* Go to next cbk vector */
......
......@@ -73,13 +73,13 @@ void silk_burg_modified_c(
rshifts = 32 + 1 + N_BITS_HEAD_ROOM - lz;
if (rshifts > MAX_RSHIFTS) rshifts = MAX_RSHIFTS;
if (rshifts < MIN_RSHIFTS) rshifts = MIN_RSHIFTS;
if (rshifts > 0) {
C0 = (opus_int32)silk_RSHIFT64(C0_64, rshifts );
C0 = (opus_int32)silk_RSHIFT64(C0_64, rshifts );
} else {
C0 = silk_LSHIFT32((opus_int32)C0_64, -rshifts );
}
CAb[ 0 ] = CAf[ 0 ] = C0 + silk_SMMUL( SILK_FIX_CONST( FIND_LPC_COND_FAC, 32 ), C0 ) + 1; /* Q(-rshifts) */
silk_memset( C_first_row, 0, SILK_MAX_ORDER_LPC * sizeof( opus_int32 ) );
if( rshifts > 0 ) {
......
......@@ -289,7 +289,7 @@ opus_int silk_encode_frame_FIX(
for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) {
sEncCtrl.Gains_Q16[ i ] = silk_LSHIFT_SAT32( silk_SMULWB( sEncCtrl.GainsUnq_Q16[ i ], gainMult_Q8 ), 8 );
}
/* Quantize gains */
psEnc->sShape.LastGainIndex = sEncCtrl.lastGainIndexPrev;
silk_gains_quant( psEnc->sCmn.indices.GainsIndices, sEncCtrl.Gains_Q16,
......
......@@ -119,16 +119,16 @@ void silk_find_pred_coefs_FIX(
silk_memset( psEncCtrl->LTPCoef_Q14, 0, psEnc->sCmn.nb_subfr * LTP_ORDER * sizeof( opus_int16 ) );