Displaying 14 results from an estimated 14 matches for "speex_submode_bits_per_frame".
2008 Jan 25
2
How to get size of WB frame in bits/bytes?
Hi,
Is there any way to determine frame size in bits or bytes of
encoded frame in WB mode for given quality? That is I need
to know how many bits encoded frame will occupy in RTP
packet. I see SPEEX_SUBMODE_BITS_PER_FRAME request,
but it works like this only for NB mode, and for WB mode
it return size of WB "subframe" (?) only.
--
Regards,
Alexander Chemeris.
SIPez LLC.
SIP VoIP, IM and Presence Consulting
http://www.SIPez.com
tel: +1 (617) 273-4000
2004 Aug 06
4
Framesize for UWB vs. WB encoding
Hi there.
I am having a little trouble understanding the frame sizes chosen
by the codec.
testenc_uwb.c from the speex-1.0 source distribution has a framesize
of 640 hardcoded and makes use of this value exclusively.
However, a mode query on the actual codec returns 320 as a framesize
for this mode.
int tmp;
speex_mode_query(&speex_uwb_mode, SPEEX_MODE_FRAME_SIZE, &tmp);
2004 Aug 06
2
SPEEX_GET_QUALITY not working?
Hello everyone,
I'm finally beginning to use Speex for a project. As expected, the
implementation so far has been very easy and I am thrilled with the
capabilities and flexibility of Speex, especially the new features in
1.1. My efforts so far have resulted in a couple of questions:
1) I was interested in fetching the default quality setting for
narrowband:
2008 Feb 13
2
Determine number of 20ms frames in packet - without decoding
> Ok, here is cleaned up and fixed version.
>
> * Function is named speex_get_num_frames() now and return
> number of frames, as you suggested.
> * WB layers sizes are taken from wb_skip_table[], while NB frame
> sizes are calculated with speex_mode_query().
Looking better. Just make sure to remove the stuff that isn't
C99-compatible (e.g. // comments).
> I've
2008 Feb 16
2
Determine number of 20ms frames in packet - without decoding
...RY.
Well, let's first merge your code and then we'll see about possible
simplifications.
>> frame: 20 ms encoding
>> sub-frame: 5 ms encoding (internal)
>> layer: one frame of nb or sb
>> sb: sub-band
>> wb: nb+sb
>> uwb: nb+sb+sb
>
> Hum... Then SPEEX_SUBMODE_BITS_PER_FRAME macro have
> wrong name.
Well, I haven't quite defined whether a frame includes all "layers" or
just one...
> This is what I was trying to ask in my previous mail.
> Now it return number of bits in one layer (nb or sb), while I expected
> it to return number of bits in...
2004 Aug 06
0
SPEEX_GET_QUALITY not working?
...d 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.xip...
2004 Aug 06
1
querying submodes
> 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.
Thank you Jean-Marc,
This works w...
2005 Jan 17
0
Programming questions
...determined by the selected mode of
> compression. SPEEX_MODE_FRAME_SIZE returns the size of the compressed
> frame. and it will vary depending upon the mode selected.
No. SPEEX_MODE_FRAME_SIZE returns the number of samples in a frame, not
the encoded size. Encoded size can be obtained with
SPEEX_SUBMODE_BITS_PER_FRAME
Jean-Marc
--
Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca>
Universit? de Sherbrooke
2008 Feb 13
0
Determine number of 20ms frames in packet - without decoding
...ght, inband handling is different, but it's a matter of one
flag, passed to functioin. Probably not that much to keep code DRY.
> frame: 20 ms encoding
> sub-frame: 5 ms encoding (internal)
> layer: one frame of nb or sb
> sb: sub-band
> wb: nb+sb
> uwb: nb+sb+sb
Hum... Then SPEEX_SUBMODE_BITS_PER_FRAME macro have
wrong name. This is what I was trying to ask in my previous mail.
Now it return number of bits in one layer (nb or sb), while I expected
it to return number of bits in one frame (nb or wb or uwb). I want
to get information about frame sizes to estimate bitrate for CBR
operation and bitra...
2008 Feb 19
0
Determine number of 20ms frames in packet - without decoding
...e fact you need to check my statement
about wb_skip_table?
> >> frame: 20 ms encoding
> >> sub-frame: 5 ms encoding (internal)
> >> layer: one frame of nb or sb
> >> sb: sub-band
> >> wb: nb+sb
> >> uwb: nb+sb+sb
> >
> > Hum... Then SPEEX_SUBMODE_BITS_PER_FRAME macro have
> > wrong name.
>
> Well, I haven't quite defined whether a frame includes all "layers" or
> just one...
It would be good to define - it is very misleading for newcomers
as it is now. And I would like to say, that from user point of view
"frame" me...
2007 Jul 24
0
Shoehorning speex is confusing a newbie
..._bits_unpack_unsigned(bits, 1);
if (wideband) /* Skip wideband block (for compatibility) */
{
//int submode;
int advance;
advance = /*submode =*/ speex_bits_unpack_unsigned(bits,
SB_SUBMODE_BITS);
speex_mode_query(&speex_wb_mode,
SPEEX_SUBMODE_BITS_PER_FRAME, &advance);
if (advance < 0)
{
speex_notify("Invalid mode encountered. The stream is
corrupted.");
return -2; //<----------------------*this is where I
drop out*
}
and drops out with a return of -2 because advanc...
2007 Jul 24
0
Shoehorning speex is confusing a newbie
..._unsigned(bits, 1);
if (wideband) /* Skip wideband block (for compatibility) */
{
//int submode;
int advance;
advance = /*submode =*/ speex_bits_unpack_unsigned(bits, SB_SUBMODE_BITS);
speex_mode_query(&speex_wb_mode, SPEEX_SUBMODE_BITS_PER_FRAME, &advance);
if (advance < 0)
{
speex_notify("Invalid mode encountered. The stream is corrupted.");
return -2; //<----------------------*this is where I drop out*
}
and drops out with a return of -2 be...
2007 Jul 24
0
Shoehorning speex is confusing a newbie
..._bits_unpack_unsigned(bits, 1);
if (wideband) /* Skip wideband block (for compatibility) */
{
//int submode;
int advance;
advance = /*submode =*/ speex_bits_unpack_unsigned(bits,
SB_SUBMODE_BITS);
speex_mode_query(&speex_wb_mode,
SPEEX_SUBMODE_BITS_PER_FRAME, &advance);
if (advance < 0)
{
speex_notify("Invalid mode encountered. The stream is
corrupted.");
return -2; //<----------------------*this is where I
drop out*
}
and drops out with a return of -2 because advanc...
2005 May 25
3
Speex on TI C6x, Problem with TI C5x Patch
...speex_bits_unpack_unsigned(bits, 1);
if (wideband) /* Skip wideband block (for compatibility) */
{
int submode;
int advance;
advance = submode = speex_bits_unpack_unsigned(bits,
SB_SUBMODE_BITS);
speex_mode_query(&speex_wb_mode, SPEEX_SUBMODE_BITS_PER_FRAME,
&advance);
if (advance < 0)
{
speex_warning ("Invalid wideband mode encountered. Corrupted
stream?");
return -2;
}
advance -= (SB_SUBMODE_BITS+1);
speex_bits_advance(bits, advance);...