[Speex-dev] Need some clarifications about "speex_preprocess_run"

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Thu Sep 27 02:33:59 PDT 2007


If you want to use the preprocessor (it's not required), then you need
to run it on the audio before encoding.

	Jean-Marc

Hai Yun Tao wrote:
> Simple questions:1. when this method is called for each frame, do I have to call them twice for both the encode process and the decode process?2. does preprocessor do preprocessing on raw PCM data or on encoded speex data? I need to clarify this because i want to know when should I call this function, before the encoding process (i.e. preprocess the pcm data) or after the encoding process (i.e. the speex data)3. and if my questions is still not well understood, here is the encoding snippet and decoding snippet I have, which line should I insert "speex_preprocess_run", assume init and destroy are handled properly?encode part.
> .
> .speex_bits_reset(&bits);speex_encode_int(encoder, (spx_int16_t* )bytes, &bits);count = speex_bits_write(&bits, bytes, len);.
> .
> .decode part.
> .
> .speex_bits_read_from(&bits2, bytes, enc_count);speex_decode_int(decoder, &bits2, bytes);.
> .
> .Thanks in advanceHAI YUN TAO
> _________________________________________________________________
> Connect to the next generation of MSN Messenger 
> http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev


More information about the Speex-dev mailing list