OLD | NEW |
1 /*********************************************************************** | 1 /*********************************************************************** |
2 Copyright (c) 2006-2011, Skype Limited. All rights reserved. | 2 Copyright (c) 2006-2011, Skype Limited. All rights reserved. |
3 Redistribution and use in source and binary forms, with or without | 3 Redistribution and use in source and binary forms, with or without |
4 modification, are permitted provided that the following conditions | 4 modification, are permitted provided that the following conditions |
5 are met: | 5 are met: |
6 - Redistributions of source code must retain the above copyright notice, | 6 - Redistributions of source code must retain the above copyright notice, |
7 this list of conditions and the following disclaimer. | 7 this list of conditions and the following disclaimer. |
8 - Redistributions in binary form must reproduce the above copyright | 8 - Redistributions in binary form must reproduce the above copyright |
9 notice, this list of conditions and the following disclaimer in the | 9 notice, this list of conditions and the following disclaimer in the |
10 documentation and/or other materials provided with the distribution. | 10 documentation and/or other materials provided with the distribution. |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 silk_PLC( psDec, psDecCtrl, pOut, 0, arch ); | 90 silk_PLC( psDec, psDecCtrl, pOut, 0, arch ); |
91 | 91 |
92 psDec->lossCnt = 0; | 92 psDec->lossCnt = 0; |
93 psDec->prevSignalType = psDec->indices.signalType; | 93 psDec->prevSignalType = psDec->indices.signalType; |
94 silk_assert( psDec->prevSignalType >= 0 && psDec->prevSignalType <= 2 ); | 94 silk_assert( psDec->prevSignalType >= 0 && psDec->prevSignalType <= 2 ); |
95 | 95 |
96 /* A frame has been decoded without errors */ | 96 /* A frame has been decoded without errors */ |
97 psDec->first_frame_after_reset = 0; | 97 psDec->first_frame_after_reset = 0; |
98 } else { | 98 } else { |
99 /* Handle packet loss by extrapolation */ | 99 /* Handle packet loss by extrapolation */ |
| 100 psDec->indices.signalType = psDec->prevSignalType; |
100 silk_PLC( psDec, psDecCtrl, pOut, 1, arch ); | 101 silk_PLC( psDec, psDecCtrl, pOut, 1, arch ); |
101 } | 102 } |
102 | 103 |
103 /*************************/ | 104 /*************************/ |
104 /* Update output buffer. */ | 105 /* Update output buffer. */ |
105 /*************************/ | 106 /*************************/ |
106 silk_assert( psDec->ltp_mem_length >= psDec->frame_length ); | 107 silk_assert( psDec->ltp_mem_length >= psDec->frame_length ); |
107 mv_len = psDec->ltp_mem_length - psDec->frame_length; | 108 mv_len = psDec->ltp_mem_length - psDec->frame_length; |
108 silk_memmove( psDec->outBuf, &psDec->outBuf[ psDec->frame_length ], mv_len *
sizeof(opus_int16) ); | 109 silk_memmove( psDec->outBuf, &psDec->outBuf[ psDec->frame_length ], mv_len *
sizeof(opus_int16) ); |
109 silk_memcpy( &psDec->outBuf[ mv_len ], pOut, psDec->frame_length * sizeof( o
pus_int16 ) ); | 110 silk_memcpy( &psDec->outBuf[ mv_len ], pOut, psDec->frame_length * sizeof( o
pus_int16 ) ); |
(...skipping 10 matching lines...) Expand all Loading... |
120 | 121 |
121 /* Update some decoder state variables */ | 122 /* Update some decoder state variables */ |
122 psDec->lagPrev = psDecCtrl->pitchL[ psDec->nb_subfr - 1 ]; | 123 psDec->lagPrev = psDecCtrl->pitchL[ psDec->nb_subfr - 1 ]; |
123 | 124 |
124 /* Set output frame length */ | 125 /* Set output frame length */ |
125 *pN = L; | 126 *pN = L; |
126 | 127 |
127 RESTORE_STACK; | 128 RESTORE_STACK; |
128 return ret; | 129 return ret; |
129 } | 130 } |
OLD | NEW |