[Speex-dev] DTX mode using preprocessor?

Jean-Marc Valin Jean-Marc.Valin at USherbrooke.ca
Sun Sep 4 17:54:44 PDT 2005


Hi,

It could (and should) definitely be done, but it's somewhere
(unfortunately not on top) on my TODO list. I think the simplest way
(until I really integrate the preprocessor with the codec, which will
take a while) to do it is to add a speex_encoder_ctl() call as you
proposed. I'd call it SPEEX_SET_EXT_VAD_STATUS and I'm willing to merge
a patch :-)

	Jean-Marc

Le samedi 03 septembre 2005 à 00:47 +0200, Thorvald Natvig a écrit :
> Could a method be added to use the VAD from the preprocessor to send the 
> packet with the 'dtx_enable' flag in it, so the decoder on the other end 
> knows it's in dtx mode? (and SPEEX_GET_DTX_STATUS returns 1)
> 
> At the moment, I can hack around it by doing something like:
> 
> if (VAD for prev frame && ! VAD for this frame) {
>  		iArg = 0;
>  		speex_encoder_ctl(m_esEncState,SPEEX_SET_VBR, &iArg);
>  		speex_encoder_ctl(m_esEncState,SPEEX_SET_QUALITY, &iArg);
> 
>  		SBEncState *sbe = static_cast<SBEncState *>(m_esEncState);
>  		EncState *es = static_cast<EncState *>(sbe->st_low);
>  		es->dtx_count = 1;
> }
> 
> (in wideband)
> 
> .. which forces speex to send the DTX packet and the remote side knows it 
> can safely ignore that stream for the time being -- the lack of packets is 
> completely intentional.
> 
> While this works, it's an incredibly ugly hack, and I have to include a 
> lot of the internal speex header files to compile.
> 
> 
> I've pondered adding a forced_vad flag to the encoder states, so you can 
> write
> speex_encoder_ctl(state, SPEEX_SET_FORCED_VAD, <whatever>)
> but I'm not sure that's the right way to proceed.
> 
> Any ideas?
> 
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
> 
-- 
Jean-Marc Valin <Jean-Marc.Valin at USherbrooke.ca>
Université de Sherbrooke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20050905/eb01ae2c/attachment-0001.pgp


More information about the Speex-dev mailing list