[speex-dev] SPEEX_GET_QUALITY not working?
Jean-Marc Valin
Jean-Marc.Valin at USherbrooke.ca
Wed Mar 31 11:15:44 PST 2004
> 1) I was interested in fetching the default quality setting
> fornarrowband:
> speex_encoder_ctl(_encodeState, SPEEX_GET_QUALITY, &value);
>
> Unfortunately, the above fails with libspeex 1.1.4. The console
> shows:
>
> warning: Unknown nb_ctl request: 5
Actually, I never implemented SPEEX_GET_QUALITY. It's not that usefule
anyway, but I might do it in the future.
> 2) Let's say I wish to encode some data. Speex can tell me
> theuncompressed frame size (for narrowband, 160 * sizeof(short)),
> butwhat about the size of the compressed data? If I'm not using VBR,
> Iassume that size is going to be constant, yes? But is there a way
> forSpeex to tell me what that value is before I begin encoding?
Use speex_mode_query with SPEEX_SUBMODE_BITS_PER_FRAME
You need to pass the submode number with the pointer and the number of
bits per frame is returned using the same pointer. Note that with
speex_mode_query, the first argument is the mode (e.g. &speex_nb_mode),
not the encoder/decoder state.
Jean-Marc
--
Jean-Marc Valin
http://www.xiph.org/~jm/
LABORIUS
Université de Sherbrooke, Québec, Canada
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Ceci est une partie de message numériquement signée.
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20040331/19c6b6e0/signature.pgp
More information about the Speex-dev
mailing list