Displaying 20 results from an estimated 23 matches for "speex_bits_pack".
2006 Nov 21
1
1.2beta1 speex_bits_pack realloc issue?
In bits.c\speex_bits_pack there is logic to reallocate the bits buffer.
In that section there is a call to speex_memset_bytes which appears to
wipe out all the old bytes. I found when I encoded a multi-frame message
that needed less than the default 2000 bytes for bits->chars, everything
worked fine. However, when I enco...
2004 Aug 06
1
speex_bits_pack optimizations...
another optimization you can do for packing bits together...
the original one is :
-------------------------------------------------------------------------------------------------------------
void speex_bits_pack(SpeexBits *bits, int data, int nbBits)
{
int i;
unsigned int d=data;
if (bits->bytePtr+((nbBits+bits->bitPtr)>>3) >= bits->buf_size)
{
//remain unchanged....
}
while(nbBits)
{
int bit;
bit = (d>>(nbBits-1))&1;
bits->byte...
2004 Aug 06
2
SPEEX_SET_USER_HANDLER once again
......
speex_encode(st, s, &bits); // encode
...
if (syncmsg == TRUE && synccount < 256){ // is there a sync
message?
syncstruct[synccount].sync_value = syncvalue; //fill the
sync structure
...
speex_bits_pack(&bits, 13, 5); //custom in-band messages
// write the array index of the sync structure into the
stream (max. 256
sync points)
speex_bits_pack(&bits, synccount, 8);
synccount++
}
nbBytes = speex_bits_write(&bits, cbit...
2006 Sep 18
2
Exc CB Search very little Question
...search, we iterate nb_subvect times over a codebook, finding
nb_subvect codebook entries to quantize the excitation signal. After
finding these nb_subvect codebook entries, they're written into the stream:
/*save indices*/
for (i=0;i<nb_subvect;i++)
{
ind[i]=nind[0][i];
speex_bits_pack(bits,ind[i],params->shape_bits+have_sign);
}
I want to know if I'm correct in that I can just do sth like this
without any effect on the encoded signal:
/*put optimal values into array*/
for (i=0;i<nb_subvect;i++)
{
ind[i]=nind[0][i];
}
/*Change the order of the...
2007 Jul 06
2
bitpack error message
Hi,
i have some code that gives me a "warning: Buffer too small to pack bits"
mesage. looking at the libspeex source/bits.c i see the warning in a
a function named speex_bits_pack. i'm not using this function.
can someone tell me where this may be coming from since i've had a
similiar problem before and had that fixed. i can't seem to pinpoint this
one.
thanks
Greg
---------------------------------
It's here! Your new message!
Get new email alerts with...
2004 Aug 06
2
AW: SPEEX_SET_USER_HANDLER once again
...ncode(st, s, &bits); // encode
if (syncmsg == TRUE && synccount < 256){ // is there a sync
message?
syncstruct[synccount].sync_value = syncvalue; //fill the sync
structure
...
//custom in-band messages
speex_bits_pack(&bits, 13, 5);
// write the length of the message
speex_bits_pack(&bits, 1, 4);
// write the array index of the sync structure into the
stream (max. 256 sync points)
speex_bits_pack(&bits, synccount, 8);...
2006 Sep 18
2
Exc CB Search very little Question
Hello,
just to make sure I haven't gotten anything wrong:
In cb_search.c (function split_cb_search_shape_sign) after all that
searching nb_subvect CB entries are being written into the stream. These
are all taken from the same codebook.
If I wanted to, I could just change their order, couldn't I?
Because important is only the linear combination of them all together,
which I keep
2005 Sep 03
2
Library export file for Win32 (patch)
...-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_bits_unpack_unsigned
-speex_bits_nbytes
-speex_bits_peek_unsigned
-speex_bits_peek
-speex_bits_advance
-speex_bits_remaining
-speex_bits_insert_terminator
-speex_inband_handler
-speex_std_mode_request_handler
-speex_std_high_mode_request_handler
-speex_s...
2004 Aug 06
0
SPEEX_SET_USER_HANDLER once again
...ncode
>
> ...
>
> if (syncmsg == TRUE && synccount < 256){ // is there a sync
> message?
>
> syncstruct[synccount].sync_value = syncvalue; //fill
> the sync structure
>
> ...
>
> speex_bits_pack(&bits, 13, 5); //custom in-band
> messages
>
> // write the array index of the sync structure into
> the stream (max. 256
> sync points)
> speex_bits_pack(&bits, synccount, 8);
>
> synccount++
> }
>...
2007 Jul 07
3
In-band user data
...section 5.10 (bottom of page 21)
states that:
"Finally, applications may define custom in-band messages using mode 13.
The size of the message in bytes is encoded with
5 bits, so that the decoder can skip it if it doesn?t know how to
interpret it."
Ok, so I prepend my data as such:
speex_bits_pack(&sbBits, 13, 5);
speex_bits_pack(&sbBits, length, 5);
// bla bla insert my stuff then encode the packet.
And this works :) My custom handler, set with SPEEX_SET_USER_HANDLER is
called and everything is good.
However, I kinda wondered what would happen if that handler WASN'T
installe...
2007 Jul 06
1
bitpack error message
...ng frames one after the other without reseting the
bit-packer by any chance?
Jean-Marc
Greg a ?crit :
> Hi,
> i have some code that gives me a "warning: Buffer too small to pack bits"
> mesage. looking at the libspeex source/bits.c i see the warning in a
> a function named speex_bits_pack. i'm not using this function.
>
> can someone tell me where this may be coming from since i've had a
> similiar problem before and had that fixed. i can't seem to pinpoint this
> one.
>
> thanks
> Greg
>
>
> ---------------------------------
> It...
2009 Jun 14
1
Resampler saturation, blackfin performance
...4%
inner_prod 4.07%
iir_mem16 2.75%
qmf_synth 2.32%
lsp_to_lpc 2.32%
open_loop_nbest_pitch 1.41%
compute_impulse_response 1.37%
qmf_decomp 1.28%
lpc_to_lsp 1.26%
fir_mem16 1.16%
speex_bits_pack 1.07%
speex_bits_unpack_unsigned 0.86%
compute_rms16 0.79%
4. I'm using the echo-canceller + preprocessor,
I'd really like to improve performance here:
- I would like to use ADI's FFT, but it's limited to powers of 2,
is it safe to enable "Round ps_size...
2005 May 25
3
Speex on TI C6x, Problem with TI C5x Patch
...}
/*speex_encoder_ctl(state, SPEEX_SET_MODE, &mode);*/
st->submodeID=mode;
}
} else {
st->relative_quality = -1;
}
if (st->encode_submode)
{
#ifdef EPIC_48K
if (!st->lbr_48k) {
#endif
/* First, transmit a zero for narrowband */
speex_bits_pack(bits, 0, 1);
/* Transmit the sub-mode we use for this frame */
speex_bits_pack(bits, st->submodeID, NB_SUBMODE_BITS);
#ifdef EPIC_48K
}
#endif
}
/* If null mode (no transmission), just set a couple things to zero*/
if (st->submodes[st->submodeID] == NULL)
{
fo...
2004 Aug 06
2
speed and memory
hello,
i switched to use the encoder.processData() and
encoder.getProcessedData() of jspeex. however it looks to me like a
memory leak ... memory usage is increasing very fast and there is no
visible stop ... after about five minutes java.lang.OutOfMemory occurs.
I think it must be the jspeex component, because before i added jspeex
to my app usage was constant at about 5mb.
is it possible
2004 Nov 17
0
Jitter buffer
...e jitterbuffer is concerned, and then handle
> additional framing for packets at a higher level.
Right now, my jitter buffer assumes a fixed amount of time per frame
(but not per packet). I'm not sure if that's possible.
> Even if we use the "terminator" submode (i.e.
> speex_bits_pack(&encstate->bits, 15, 5); ), it seems hard to find that
> in the bitstream, no?
Well, you just have to know the number of bits for each mode (that's
already in the mode struct, since I use it to skip wideband in some
cases) and do some jumping.
> Because we need to synchronize mul...
2006 Jul 23
0
Double codebook
...one at different bit-rate. In practice,
it's only enabled at very high bit-rate.
> The second thing you immediately see when using none of these fancy
> options is that the codebook entries found in
> libspeex/cb_search.c::split_cb_search_shape_sign and written into the
> stream by speex_bits_pack are (in one subframe) very often the same
> (I've seen the numbers 63, 45 and 171 being written into the stream very
> often
I do expect some to be more common than others, but I don't think it's
only a handful of entries that get used.
> Has anybody ever examined this statis...
2004 Nov 17
3
Jitter buffer
...termine
the number of frames in a packet.
I think the easiest thing for me is to just stick to one frame per
"thing" as far as the jitterbuffer is concerned, and then handle
additional framing for packets at a higher level.
Even if we use the "terminator" submode (i.e.
speex_bits_pack(&encstate->bits, 15, 5); ), it seems hard to find that
in the bitstream, no?
>>For example, I will be running this in front of a conferencing
>>application. This conferencing application handles participants, each
>>of which can use a different codec. Often, we "o...
2006 Jul 19
2
Double codebook
Skipped content of type multipart/mixed-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20060719/1f7ff5c0/signature.pgp
2008 Mar 29
0
GCC/ELF Visibility patch
...-int speex_bits_write_whole_bytes(SpeexBits *bits, char *chars, int max_nbytes)
+EXPORT int speex_bits_write_whole_bytes(SpeexBits *bits, char *chars, int max_nbytes)
{
int max_nchars = max_nbytes/BYTES_PER_CHAR;
int i;
@@ -226,7 +226,7 @@
return max_nchars*BYTES_PER_CHAR;
}
-void speex_bits_pack(SpeexBits *bits, int data, int nbBits)
+EXPORT void speex_bits_pack(SpeexBits *bits, int data, int nbBits)
{
unsigned int d=data;
@@ -269,7 +269,7 @@
}
}
-int speex_bits_unpack_signed(SpeexBits *bits, int nbBits)
+EXPORT int speex_bits_unpack_signed(SpeexBits *bits, int nbBits)
{...
2008 Mar 29
2
GCC/ELF Visibility patch (fwd)
...-int speex_bits_write_whole_bytes(SpeexBits *bits, char *chars, int max_nbytes)
+EXPORT int speex_bits_write_whole_bytes(SpeexBits *bits, char *chars, int max_nbytes)
{
int max_nchars = max_nbytes/BYTES_PER_CHAR;
int i;
@@ -226,7 +226,7 @@
return max_nchars*BYTES_PER_CHAR;
}
-void speex_bits_pack(SpeexBits *bits, int data, int nbBits)
+EXPORT void speex_bits_pack(SpeexBits *bits, int data, int nbBits)
{
unsigned int d=data;
@@ -269,7 +269,7 @@
}
}
-int speex_bits_unpack_signed(SpeexBits *bits, int nbBits)
+EXPORT int speex_bits_unpack_signed(SpeexBits *bits, int nbBits)
{...