[CELT-dev] Some additions to CELT_RESET_STATE for 0.7.1

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Tue Feb 16 21:20:50 PST 2010


Hi,

Sorry about the delay, it's pushed to the main git repo now.

	Jean-Marc

On 2010-01-28 09:46, John Ridges wrote:
> No problem:
>
> --- c:\git\celt\libcelt\celt.c Wed Jan 27 17:38:11 2010
> +++ c:\temp\celt.c Wed Jan 27 10:55:39 2010
> @@ -1040,6 +1040,16 @@ int celt_encoder_ctl(CELTEncoder * restr
> CELT_MEMSET(st->preemph_memE, 0, C);
> CELT_MEMSET(st->preemph_memD, 0, C);
> st->delayedIntra = 1;
> +
> + st->fold_decision = 1;
> + st->tonal_average = QCONST16(1.,8);
> + st->gain_prod = 0;
> + st->vbr_reservoir = 0;
> + st->vbr_drift = 0;
> + st->vbr_offset = 0;
> + st->vbr_count = 0;
> + st->xmem = 0;
> + CELT_MEMSET(st->pitch_buf, 0, (MAX_PERIOD>>1)+2);
> }
> break;
> default:
> @@ -1629,6 +1639,10 @@ int celt_decoder_ctl(CELTDecoder * restr
> CELT_MEMSET(st->preemph_memD, 0, C);
>
> st->loss_count = 0;
> +
> +#ifdef NEW_PLC
> + CELT_MEMSET(st->lpc, 0, C*LPC_ORDER);
> +#endif
> }
> break;
> default:
>
>
> Let me know if that's not what you were expecting,
>
> John Ridges
>
>
> Jean-Marc Valin wrote:
>> I think all of the changes you propose make sense. Can you submit this
>> as a patch if you have some time?
>>
>> Thanks,
>>
>> Jean-Marc
>>
>>
>> On 2010-01-27 13:32, John Ridges wrote:
>>> Hi Jean-Marc,
>>>
>>> As the self-appointed keeper of CELT_RESET_STATE (since I may be the
>>> only one actually using it) I've been kind of lax lately and have only
>>> now tried to reconcile it with the state structures in the 0.7.1 drop. I
>>> think (and feel free to contradict me here) that the following lines
>>> should be added to CELT_RESET_STATE in celt_encoder_ctl:
>>>
>>> st->fold_decision = 1;
>>> st->tonal_average = QCONST16(1.,8);
>>> st->gain_prod = 0;
>>> st->vbr_reservoir = 0;
>>> st->vbr_drift = 0;
>>> st->vbr_offset = 0;
>>> st->vbr_count = 0;
>>> st->xmem = 0;
>>> CELT_MEMSET(st->pitch_buf, 0, (MAX_PERIOD>>1)+2);
>>>
>>> and the following lines should be added to CELT_RESET_STATE in
>>> celt_decoder_ctl:
>>>
>>> #ifdef NEW_PLC
>>> CELT_MEMSET(st->lpc, 0, C*LPC_ORDER);
>>> #endif
>>>
>>> BTW 0.7.1 is working very nicely for me.
>>>
>>> Cheers,
>>>
>>> John Ridges
>>>
>>>
>>> _______________________________________________
>>> celt-dev mailing list
>>> celt-dev at xiph.org
>>> http://lists.xiph.org/mailman/listinfo/celt-dev
>>>
>>>
>>
>>
>
>



More information about the celt-dev mailing list