search for: log2_bits_per_char

Displaying 10 results from an estimated 10 matches for "log2_bits_per_char".

2009 Oct 29
1
speex_bits_write_whole_bytes problem
An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20091029/e587399d/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: tmezo.vcf Type: text/x-vcard Size: 345 bytes Desc: not available Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20091029/e587399d/attachment.vcf
2006 Dec 09
1
A question about speex_bits_write function
..._nchars gets 200 value because following statement in speex_bits_write and the condition of if statement does not achieve. (in my environment, BYTES_PER_CHAR=1, speex_nb_mode, 8 kHz, 15 kbps) int max_nchars = max_nbytes/BYTES_PER_CHAR; if (max_nchars > ((bits->nbBits+BITS_PER_CHAR-1)>>LOG2_BITS_PER_CHAR)) max_nchars = ((bits->nbBits+BITS_PER_CHAR-1)>>LOG2_BITS_PER_CHAR); Excuse me if I make longer my question. Which value should I set to MAX_FRAME_BYTES and why? Can you please help me? Thanks in advance Sincerely Yasemin -------------- next part -------------- An HTML attach...
2006 Dec 11
0
A question about speex_bits_write function
...following statement in speex_bits_write and the condition of if > statement does not achieve. (in my environment, BYTES_PER_CHAR=1, > speex_nb_mode, 8 kHz, 15 kbps) > > int max_nchars = max_nbytes/BYTES_PER_CHAR; > > if (max_nchars > ((bits->nbBits+BITS_PER_CHAR-1)>>LOG2_BITS_PER_CHAR)) > > max_nchars = ((bits->nbBits+BITS_PER_CHAR-1)>>LOG2_BITS_PER_CHAR); > > > > Excuse me if I make longer my question. Which value should I set to > MAX_FRAME_BYTES and why? > > Can you please help me? > > Thanks in advance > > Sincerely &gt...
2006 Aug 01
2
bits.c problem
...//////////// for (i=0;i<len;i++) bits->chars[i]=chars[i]; bits->nbBits=len<<3; //!!!!!!!!!!!!!!!!!!! bits->charPtr=0; bits->bitPtr=0; bits->overflow=0; } What is bits->nbBits=len<<3 ? Shouldn't it be bits->nbBits=len<<3 LOG2_BITS_PER_CHAR ? And another question. What is the difference between functions speex_bits_read_from and speex_bits_read_whole_bytes ? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20060802/cadc2ff2/attachment.ht...
2010 Jul 20
1
BYTES_PER_CHAR
...when i compare the encoded output with a windows build, they don't match. Among the other problems i think that the char definition is one of the biggest players. I've seen in arch.h the following definitions: /* 2 on TI C5x DSP */ #define BYTES_PER_CHAR 2 #define BITS_PER_CHAR 16 #define LOG2_BITS_PER_CHAR 4 That makes me think the code is in someway ready to work on these kind of platforms. I don't see the above definition used anywhere in the code though. Does anybody know if CELT could work on platform with 16 bits char or if any attempt has been already tried? Thanks! Regards Riccardo...
2008 Mar 29
0
GCC/ELF Visibility patch
...bits->charPtr=0; } -void speex_bits_read_whole_bytes(SpeexBits *bits, char *chars, int nbytes) +EXPORT void speex_bits_read_whole_bytes(SpeexBits *bits, char *chars, int nbytes) { int i,pos; int nchars = nbytes/BYTES_PER_CHAR; @@ -185,7 +185,7 @@ bits->nbBits+=nchars<<LOG2_BITS_PER_CHAR; } -int speex_bits_write(SpeexBits *bits, char *chars, int max_nbytes) +EXPORT int speex_bits_write(SpeexBits *bits, char *chars, int max_nbytes) { int i; int max_nchars = max_nbytes/BYTES_PER_CHAR; @@ -208,7 +208,7 @@ return max_nchars*BYTES_PER_CHAR; } -int speex_bits_write_who...
2008 Mar 29
2
GCC/ELF Visibility patch (fwd)
...bits->charPtr=0; } -void speex_bits_read_whole_bytes(SpeexBits *bits, char *chars, int nbytes) +EXPORT void speex_bits_read_whole_bytes(SpeexBits *bits, char *chars, int nbytes) { int i,pos; int nchars = nbytes/BYTES_PER_CHAR; @@ -185,7 +185,7 @@ bits->nbBits+=nchars<<LOG2_BITS_PER_CHAR; } -int speex_bits_write(SpeexBits *bits, char *chars, int max_nbytes) +EXPORT int speex_bits_write(SpeexBits *bits, char *chars, int max_nbytes) { int i; int max_nchars = max_nbytes/BYTES_PER_CHAR; @@ -208,7 +208,7 @@ return max_nchars*BYTES_PER_CHAR; } -int speex_bits_write_who...
2004 Sep 16
3
speex on TI C5x fixed-point DSP
...My plan is to change int and unsigned int to int32_t and uint32_t where 32 bit ints are needed, such as in the stream header. I'm attaching a patch that updates bits.c to work with 16bit chars, renaming "byte" to "char" and using macros BYTES_PER_CHAR, BITS_PER_CHAR, and LOG2_BITS_PER_CHAR to keep the code portable between 8-bit chars and 16-bit chars. Other than compiling, I have not tested this code but I wanted a style check before going too far down this path. I hope that these changes or suitable reworking of them will be acceptable into the Speex code. Jamey Hicks HP Labs...
2004 Sep 16
0
speex on TI C5x fixed-point DSP
...and unsigned int to int32_t and uint32_t where > 32 bit ints are needed, such as in the stream header. > > I'm attaching a patch that updates bits.c to work with 16bit chars, > renaming "byte" to "char" and using macros BYTES_PER_CHAR, > BITS_PER_CHAR, and LOG2_BITS_PER_CHAR to keep the code portable between > 8-bit chars and 16-bit chars. Other than compiling, I have not tested > this code but I wanted a style check before going too far down this path. > > I hope that these changes or suitable reworking of them will be > acceptable into the Speex c...
2005 May 25
3
Speex on TI C6x, Problem with TI C5x Patch
...MULT16_16_Q14(a,b) ((a)*(b)) #define MULT16_16_Q15(a,b) ((a)*(b)) #define MULT16_16_P15(a,b) ((a)*(b)) #define DIV32_16(a,b) ((a)/(b)) #define DIV32(a,b) ((a)/(b)) #endif #ifdef CONFIG_TI_C55X /* 2 on TI C5x DSP */ #define BYTES_PER_CHAR 2 #define BITS_PER_CHAR 16 #define LOG2_BITS_PER_CHAR 4 #else #define BYTES_PER_CHAR 1 #define BITS_PER_CHAR 8 #define LOG2_BITS_PER_CHAR 3 #endif #endif -------------- next part -------------- /* Copyright (C) 2004 Jean-Marc Valin */ /** @file fixed_c55x.h @brief C55x fixed-point operations */ /* Redistribution and use in source and bin...