Displaying 18 results from an estimated 18 matches for "speex_mode_query".
2004 Aug 06
4
Framesize for UWB vs. WB encoding
...ng 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);
<p>testenc_wb.c from the speex-1.0 source distribution has a framesize
of 320 hardcoded and makes use of this value exclusively.
However, a mode query on the actual codec returns 160 as a framesize
for this mode.
int tmp;
speex_m...
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 12
2
Determine number of 20ms frames in packet - without decoding
Hi Alexander,
> Here is first attempt. I'm sending it here for review - am I understand
> you correctly? If general approach is correct, I'll change code to use
> modes from modes.c.
I haven't tested, but it looks sane. Just a few comments:
- printf("\tERROR not enough bits left after wb\n"); this is actually
now an error. It just means you got to the end of the
2004 Aug 06
0
Framesize for UWB vs. WB encoding
...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);
>
>
> testenc_wb.c from the speex-1.0 source distribution has a framesize
> of 320 hardcoded and makes use of this value exclusively.
>
> However, a mode query on the actual codec returns 160 as a framesize
> for this mo...
2004 Aug 06
0
SPEEX_GET_QUALITY not working?
...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...
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....
2008 Feb 13
0
Determine number of 20ms frames in packet - without decoding
Hi,
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().
I've tested it with testenc in NB, WB and UWB modes with VBR enabled
to test in as many cases as possible. It seems to work fine.
Though, while testing I discovered possible bug - original version
of wb_skip_table[] (nb_celp.c:1081) does not seem to be correct.
Element 0 should be 4 instead...
2005 Sep 03
2
Library export file for Win32 (patch)
...speex.def (revision 9882)
+++ speex.def (working copy)
@@ -2,49 +2,71 @@
; speex.def
;
LIBRARY
+NAME libspeex.dll
EXPORTS
;
-speex_encoder_init
-speex_encoder_destroy
-speex_encode
-speex_encoder_ctl
-speex_decoder_init
-speex_decoder_destroy
-speex_decode
-speex_decoder_ctl
-speex_mode_query
-speex_lib_ctl
-speex_lib_get_mode
-speex_bits_init
-speex_bits_init_buffer
-speex_bits_destroy
-speex_bits_reset
-speex_bits_rewind
-speex_bits_read_from
-speex_bits_read_whole_bytes
-speex_bits_write
-speex_bits_write_whole_bytes
-speex_bits_pack
-speex_bits_unpack_signed
-speex_bit...
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 tested it with testenc in NB, WB and UWB modes with VBR enabled
> to test in as many cases as possible. It seems to work fine.
> Though, while testing I discovered possible...
2008 Feb 12
1
Re: Problem with Blackfin assembly optimizations -- bug in fixed_bfin.h / resampler saturation???
..._bits_set_bit_buffer':
/home/lorenz/Blackfin/speex-1.2beta3/libspeex/bits.c:72: multiple definition of `_spx_mips'
/home/lorenz/lib/libspeex_debug.a(speex.o):/home/lorenz/Blackfin/speex-1.2beta3/libspeex/speex.c:52: first defined here
/home/lorenz/lib/libspeex_debug.a(modes.o): In function `speex_mode_query':
/home/lorenz/Blackfin/speex-1.2beta3/libspeex/modes.c:359: multiple definition of `_spx_mips'
/home/lorenz/lib/libspeex_debug.a(speex.o):/home/lorenz/Blackfin/speex-1.2beta3/libspeex/speex.c:52: first defined here
/home/lorenz/lib/libspeex_debug.a(modes_wb.o): In function `speex_lib_get_m...
2007 Jul 24
0
Shoehorning speex is confusing a newbie
...return -1;
wideband = 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_notify("Invalid mode encountered. The stream is
corrupted.");
return -2; //<----------------------*this is where I
drop out*
}...
2007 Jul 24
0
Shoehorning speex is confusing a newbie
...wideband = 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_notify("Invalid mode encountered. The stream is corrupted.");
return -2; //<----------------------*this is where I drop out*...
2008 Mar 29
0
GCC/ELF Visibility patch
...bspeex/modes.c (revision 14645)
+++ libspeex/modes.c (working copy)
@@ -337,7 +337,7 @@
/* Default mode for narrowband */
-const SpeexMode speex_nb_mode = {
+EXPORT const SpeexMode speex_nb_mode = {
&nb_mode,
nb_mode_query,
"narrowband",
@@ -355,7 +355,7 @@
-int speex_mode_query(const SpeexMode *mode, int request, void *ptr)
+EXPORT int speex_mode_query(const SpeexMode *mode, int request, void *ptr)
{
return mode->query(mode->mode, request, ptr);
}
Index: libspeex/resample.c
===================================================================
--- libspeex/resamp...
2007 Jul 24
0
Shoehorning speex is confusing a newbie
...return -1;
wideband = 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_notify("Invalid mode encountered. The stream is
corrupted.");
return -2; //<----------------------*this is where I
drop out*
}...
2008 Feb 22
1
Re: Problem with Blackfin assembly optimizations -- bug in fixed_bfin.h / resampler saturation???
...uffer':
> /home/lorenz/Blackfin/speex-1.2beta3/libspeex/bits.c:72: multiple definition of `_spx_mips'
> /home/lorenz/lib/libspeex_debug.a(speex.o):/home/lorenz/Blackfin/speex-1.2beta3/libspeex/speex.c:52: first defined here
> /home/lorenz/lib/libspeex_debug.a(modes.o): In function `speex_mode_query':
> /home/lorenz/Blackfin/speex-1.2beta3/libspeex/modes.c:359: multiple definition of `_spx_mips'
> /home/lorenz/lib/libspeex_debug.a(speex.o):/home/lorenz/Blackfin/speex-1.2beta3/libspeex/speex.c:52: first defined here
> /home/lorenz/lib/libspeex_debug.a(modes_wb.o): In function `...
2008 Mar 29
2
GCC/ELF Visibility patch (fwd)
...bspeex/modes.c (revision 14645)
+++ libspeex/modes.c (working copy)
@@ -337,7 +337,7 @@
/* Default mode for narrowband */
-const SpeexMode speex_nb_mode = {
+EXPORT const SpeexMode speex_nb_mode = {
&nb_mode,
nb_mode_query,
"narrowband",
@@ -355,7 +355,7 @@
-int speex_mode_query(const SpeexMode *mode, int request, void *ptr)
+EXPORT int speex_mode_query(const SpeexMode *mode, int request, void *ptr)
{
return mode->query(mode->mode, request, ptr);
}
Index: libspeex/resample.c
===================================================================
--- libspeex/resamp...
2008 Mar 05
1
Problem with Blackfin assembly optimizations -- bug in fixed_bfin.h / resampler saturation???
...nz/Blackfin/speex-1.2beta3/libspeex/bits.c:72: multiple
>> definition of `_spx_mips'
>> /home/lorenz/lib/libspeex_debug.a(speex.o):/home/lorenz/Blackfin/speex-1.2beta3/libspeex/speex.c:52:
>> first defined here /home/lorenz/lib/libspeex_debug.a(modes.o): In
>> function `speex_mode_query':
>> /home/lorenz/Blackfin/speex-1.2beta3/libspeex/modes.c:359: multiple
>> definition of `_spx_mips'
>> /home/lorenz/lib/libspeex_debug.a(speex.o):/home/lorenz/Blackfin/speex-1.2beta3/libspeex/speex.c:52:
>> first defined here /home/lorenz/lib/libspeex_debug.a(mod...
2005 May 25
3
Speex on TI C6x, Problem with TI C5x Patch
...return -1;
wideband = 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);...