Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/silk
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2013-02-07 08:48:09 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2013-02-07 08:48:09 +0400
commite51a3f33cf5a387eea3dff09d0ca04cf54d59e49 (patch)
treef5dd177a594b5d65c943e935c9ead709743bccb4 /silk
parent61e9eb15cc8e84a20eb1a7e5747b9a10e8caf0be (diff)
Fixes a minor CELT->SILK switching glitch in the decoder
By not reinitializing the stereo state during a switch, the old stereo memory would create a false impulse (i.e. single sample) in the decoded audio. This change affects the normative part of the decoder. Fortunately, the modified decoder is still compliant with the specification because it still easily passes the testvectors. For example, for the float decoder at 48 kHz, the opus_compare (arbitrary) "quality score" changes from from 99.9333% to 99.925%.
Diffstat (limited to 'silk')
-rw-r--r--silk/dec_API.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/silk/dec_API.c b/silk/dec_API.c
index 58b6b2b1..33146c04 100644
--- a/silk/dec_API.c
+++ b/silk/dec_API.c
@@ -69,6 +69,9 @@ opus_int silk_InitDecoder( /* O Returns error co
for( n = 0; n < DECODER_NUM_CHANNELS; n++ ) {
ret = silk_init_decoder( &channel_state[ n ] );
}
+ 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;
return ret;
}