Displaying 12 results from an estimated 12 matches for "speex_bits_rewind".
2008 Nov 07
1
Patch : Make speex_bits_read_from and speex_bits_read_whole_bytes const correct
...atch makes the above two read functions const correct.
Cheers,
Erik
diff --git a/include/speex/speex_bits.h b/include/speex/speex_bits.h
index a26fb4c..234ec53 100644
--- a/include/speex/speex_bits.h
+++ b/include/speex/speex_bits.h
@@ -77,7 +77,7 @@ void speex_bits_reset(SpeexBits *bits);
void speex_bits_rewind(SpeexBits *bits);
/** Initializes the bit-stream from the data in an area of memory */
-void speex_bits_read_from(SpeexBits *bits, char *bytes, int len);
+void speex_bits_read_from(SpeexBits *bits, const char *bytes, int len);
/** Append bytes to the bit-stream
*
@@ -85,7 +85,7 @@ void spe...
2007 Aug 06
2
Attempting to shrink speex: Are these functions necessary?
...fine.
I did get a .patch file from Jim Crichton as well to shrink nb_celp,
but is there anything else I can do to shrink the code or am I reaching
my limit? Thanks.
these are the functions that I removed:
In bits.c:
speex_bits_init
speex_bits_init_buffer
speex_bits_destroy
speex_bits_reset
speex_bits_rewind
speex_bits_read_from
speex_bits_flush
speex_bits_read_whole_bytes
speex_bits_write
speex_bits_write_whole_bytes
speex_bits_unpack_signed
speex_bits_peek_unsigned
speex_bits_peek
speex_bits_nbytes
speex_bits_insert_terminator
In cd_search.c:
noise_codebook_quant
noise_codebook_unquant
In filters...
2007 Apr 25
0
echo cancellation on Blackfin DSK
...{
*in_left++ = *in++; // channel 1
in++; // channel 2
}
in_left = in_buffer_calc;
speex_bits_reset(&g_Bits);
// Encode the frame
speex_encode_int(g_pvEnc, (spx_int16_t *)in_left, &g_Bits);
nbBits = speex_bits_write(&g_Bits, cbits, 200);
speex_bits_rewind(&g_Bits);
SpeexEchoState *st=
speex_echo_state_init(SPEEX_FRAME_SIZE,filter_length);
speex_echo_cancel(st,(spx_int16_t *)in_left,(spx_int16_t
*)out_left,(spx_int16_t *)out2,NULL);
speex_echo_state_destroy(st);
// Decode the frame
speex_decode_int(g_pvDec, &g_Bits,...
2005 Aug 12
1
Encode/Decode problem
...eex_decoder_init(&speex_nb_mode);
speex_bits_init(&bits);
//code simplified to just read in the first frame
for (int i = 0; i < 320; i +=2)
{
tempShort = *((short*)(data + i));
tempPtr[i / 2] = tempShort;
}
speex_bits_reset(&bits);
speex_encode_int(state, tempPtr, &bits);
speex_bits_rewind(&bits);
speex_decode_int(state2, &bits, tempPtrDecode);
//tempPtr != tempPtrDecode, it's not even close.
}
2010 Jan 28
1
Trouble in decoding speex on PC
...how do I calculate the number of speex bytes to be decoded at a given time.. Any help will be appreciated..
while (!feof(fin))
?? {
??? ? fread(tempd, 1, 26, fin);
????? if (feof(fin))
???????? break;
????? speex_bits_reset(&bits);
??? ?speex_bits_read_from(&bits, tempd, 26);??? ?
????? speex_bits_rewind(&bits);
????? speex_decode_int(dec, &bits, out_short);
fwrite(&out_short[skip_group_delay], sizeof(short), FRAME_SIZE-skip_group_delay, fout);
????? skip_group_delay = 0;
Regards,
Kumar
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo...
2005 Sep 03
2
Library export file for Win32 (patch)
...-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_bits_unpack_unsigned
-speex_bits_nbytes
-speex_bits_peek_unsigned
-speex_bits_peek
-speex_bits_advance
-speex_bits_remaining
-speex_bits_...
2007 Aug 07
1
Attempting to shrink speex: Are these functions necessary?
...ot; (either it is every time, or it's not).
The only exception might be the packet loss concealment function
(nb_decode_lost).
> these are the functions that I removed:
>
> In bits.c:
> speex_bits_init
> speex_bits_init_buffer
> speex_bits_destroy
> speex_bits_reset
> speex_bits_rewind
> speex_bits_read_from
> speex_bits_flush
> speex_bits_read_whole_bytes
> speex_bits_write
> speex_bits_write_whole_bytes
> speex_bits_unpack_signed
> speex_bits_peek_unsigned
> speex_bits_peek
> speex_bits_nbytes
> speex_bits_insert_terminator
You probably don't...
2007 Aug 07
1
Attempting to shrink speex: Are these functions necessary?
...o shrink nb_celp,
> but is there anything else I can do to shrink the code or am I reaching
> my limit? Thanks.
>
>
> these are the functions that I removed:
>
> In bits.c:
> speex_bits_init
> speex_bits_init_buffer
> speex_bits_destroy
> speex_bits_reset
> speex_bits_rewind
> speex_bits_read_from
> speex_bits_flush
> speex_bits_read_whole_bytes
> speex_bits_write
> speex_bits_write_whole_bytes
> speex_bits_unpack_signed
> speex_bits_peek_unsigned
> speex_bits_peek
> speex_bits_nbytes
> speex_bits_insert_terminator
>
> In cd_search...
2010 Jul 25
0
notification: More than two wideband layers found. The stream is corrupted.
...t, FRAME_SIZE);
speex_bits_reset(&bits);
returnVal = speex_encode_int(encoderState, (spx_int16_t
*) in_short, &bits);
nbChars = speex_bits_write(&bits, cbits,
sizeof(cbits)*BYTES_PER_CHAR) /BYTES_PER_CHAR;
speex_bits_rewind(&bits);
speex_bits_read_from(&bits, cbits,
TESTENC_BYTES_PER_FRAME);
* //printf("%d\n",counterDecode++);
counterDecode++; *
returnVal = speex_decode_int(decoderState, &bits,
(spx_int16_t *)out_sh...
2007 Aug 07
0
Attempting to shrink speex: Are these functions necessary?
...gt;> nb_celp, but is there anything else I can do to shrink the code or
>> am I reaching my limit? Thanks.
>>
>>
>> these are the functions that I removed:
>>
>> In bits.c: speex_bits_init speex_bits_init_buffer
>> speex_bits_destroy speex_bits_reset speex_bits_rewind
>> speex_bits_read_from speex_bits_flush speex_bits_read_whole_bytes
>> speex_bits_write speex_bits_write_whole_bytes
>> speex_bits_unpack_signed speex_bits_peek_unsigned speex_bits_peek
>> speex_bits_nbytes speex_bits_insert_terminator
>>
>> In cd_search.c:...
2008 Mar 29
0
GCC/ELF Visibility patch
...s->chars);
/* Will do something once the allocation is dynamic */
}
-void speex_bits_reset(SpeexBits *bits)
+EXPORT void speex_bits_reset(SpeexBits *bits)
{
/* We only need to clear the first byte now */
bits->chars[0]=0;
@@ -99,14 +99,14 @@
bits->overflow=0;
}
-void speex_bits_rewind(SpeexBits *bits)
+EXPORT void speex_bits_rewind(SpeexBits *bits)
{
bits->charPtr=0;
bits->bitPtr=0;
bits->overflow=0;
}
-void speex_bits_read_from(SpeexBits *bits, char *chars, int len)
+EXPORT void speex_bits_read_from(SpeexBits *bits, char *chars, int len)
{
int i;...
2008 Mar 29
2
GCC/ELF Visibility patch (fwd)
...s->chars);
/* Will do something once the allocation is dynamic */
}
-void speex_bits_reset(SpeexBits *bits)
+EXPORT void speex_bits_reset(SpeexBits *bits)
{
/* We only need to clear the first byte now */
bits->chars[0]=0;
@@ -99,14 +99,14 @@
bits->overflow=0;
}
-void speex_bits_rewind(SpeexBits *bits)
+EXPORT void speex_bits_rewind(SpeexBits *bits)
{
bits->charPtr=0;
bits->bitPtr=0;
bits->overflow=0;
}
-void speex_bits_read_from(SpeexBits *bits, char *chars, int len)
+EXPORT void speex_bits_read_from(SpeexBits *bits, char *chars, int len)
{
int i;...