mirror of
https://github.com/xiph/opus.git
synced 2025-05-28 22:29:14 +00:00
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%.
This commit is contained in:
parent
61e9eb15cc
commit
e51a3f33cf
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue