search for: bytes_per_char

Displaying 20 results from an estimated 21 matches for "bytes_per_char".

2010 Jul 20
1
BYTES_PER_CHAR
...d as 16 bits. I now got the vocoder compiling but 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 attemp...
2006 Dec 09
1
A question about speex_bits_write function
...it is 2000 and in manual it is 200. For example, I set it to 200 but the length of bits->chars is 250 (bits->nbBits is 2000), is this right? If so, max_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 sho...
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
2008 Nov 07
1
Patch : Make speex_bits_read_from and speex_bits_read_whole_bytes const correct
...bspeex/bits.c @@ -106,7 +106,7 @@ EXPORT void speex_bits_rewind(SpeexBits *bits) bits->overflow=0; } -EXPORT void speex_bits_read_from(SpeexBits *bits, char *chars, int len) +EXPORT void speex_bits_read_from(SpeexBits *bits, const char *chars, int len) { int i; int nchars = len / BYTES_PER_CHAR; @@ -153,7 +153,7 @@ static void speex_bits_flush(SpeexBits *bits) bits->charPtr=0; } -EXPORT void speex_bits_read_whole_bytes(SpeexBits *bits, char *chars, int nbytes) +EXPORT void speex_bits_read_whole_bytes(SpeexBits *bits, const char *chars, int nbytes) { int i,pos; int nchar...
2006 Dec 11
0
A question about speex_bits_write function
...nual it is 200. > For example, I set it to 200 but the length of bits->chars is 250 > (bits->nbBits is 2000), is this right? If so, max_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); > > > >...
2010 Jul 25
0
notification: More than two wideband layers found. The stream is corrupted.
...} byte2word(inout_byte, in_short, 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_d...
2008 Mar 29
0
GCC/ELF Visibility patch
...mode (int mode) { if (mode < 0 || mode >= SPEEX_NB_MODES) return NULL; Index: libspeex/bits.c =================================================================== --- libspeex/bits.c (revision 14645) +++ libspeex/bits.c (working copy) @@ -45,7 +45,7 @@ #define MAX_CHARS_PER_FRAME (2000/BYTES_PER_CHAR) #endif -void speex_bits_init(SpeexBits *bits) +EXPORT void speex_bits_init(SpeexBits *bits) { bits->chars = (char*)speex_alloc(MAX_CHARS_PER_FRAME); if (!bits->chars) @@ -58,7 +58,7 @@ speex_bits_reset(bits); } -void speex_bits_init_buffer(SpeexBits *bits, void *buff, int...
2008 Mar 29
2
GCC/ELF Visibility patch (fwd)
...mode (int mode) { if (mode < 0 || mode >= SPEEX_NB_MODES) return NULL; Index: libspeex/bits.c =================================================================== --- libspeex/bits.c (revision 14645) +++ libspeex/bits.c (working copy) @@ -45,7 +45,7 @@ #define MAX_CHARS_PER_FRAME (2000/BYTES_PER_CHAR) #endif -void speex_bits_init(SpeexBits *bits) +EXPORT void speex_bits_init(SpeexBits *bits) { bits->chars = (char*)speex_alloc(MAX_CHARS_PER_FRAME); if (!bits->chars) @@ -58,7 +58,7 @@ speex_bits_reset(bits); } -void speex_bits_init_buffer(SpeexBits *bits, void *buff, int...
2007 Jan 22
1
Clicking noise using Speex built for TI C64+ DSP of DaVinci Processor
...fine. I don't know where that clicking noise is coming from. Any advice/comments/suggestions? Here's what's included in my config.h file for Speex (compiled with -DCONFIG_TI_C6X): #define FIXED_POINT #define FRAME_SIZE 160 #define DISABLE_WIDEBAND #define MAX_CHARS_PER_FRAME (42/BYTES_PER_CHAR) #define MANUAL_ALLOC #define USER_MISC Speex narrow band parameters I'm using: Quality: 2 /* 5950 bps */ Enhancement: 0 Vbr: disabled Complexity: 1 The DaVinci processor is relatively new and I can't seem to find anyone who has successfully used Speex on the DSP side....
2006 Apr 11
2
Major internal changes
Hi everyone, I've recently done some major internal changes in Speex aimed at reducing RAM (by nearly a factor of 2!) and improving quality of the fixed-point. In doing so, I might have accidently broken a few things. I'd like to hear feedback on the current svn code to make sure I fix any regression before the next release. I'm already aware that --enable-vorbis-psy is broken and
2004 Sep 16
3
speex on TI C5x fixed-point DSP
...the c5x is essentially big endian 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 i...
2007 Jan 23
1
Re: Clicking noise using Speex built for TI C64+ DSP of DaVinci Processor
...t clicking noise is coming from. Any advice/comments/suggestions? > > Here's what's included in my config.h file for Speex (compiled with -DCONFIG_TI_C6X): > > #define FIXED_POINT > #define FRAME_SIZE 160 > #define DISABLE_WIDEBAND > #define MAX_CHARS_PER_FRAME (42/BYTES_PER_CHAR) > #define MANUAL_ALLOC > #define USER_MISC > > Speex narrow band parameters I'm using: > Quality: 2 /* 5950 bps */ > Enhancement: 0 > Vbr: disabled > Complexity: 1 > > The DaVinci processor is relatively new and I can't seem to find anyone...
2004 Sep 16
0
speex on TI C5x fixed-point DSP
...dian > > 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 t...
2006 Apr 17
0
Major internal changes, TI DSP build change
...e the loopback application only uses speex_bits_write. Since this affects the Speex interface (just for these targets), I though I should ask for feedback before sending a patch. Does anybody care? Note that speex_bits_read_from is broken in other ways (the length checking is wrong for the if BYTES_PER_CHAR=2), so bits.c needs to be updated either way. Regards, Jim Crichton ----- Original Message ----- From: "Jean-Marc Valin" <jean-marc.valin@usherbrooke.ca> To: <speex-dev@xiph.org> Sent: Tuesday, April 11, 2006 9:34 PM Subject: [Speex-dev] Major internal changes > Hi e...
2011 Jul 26
3
More frames in one packet
After searching the mailing list archive (I forgot to do that before posting, sorry!) I found the solutions: 1) The documentation has a mistake: The bit terminator is NOT set automatically! (I'm using the latest speex version!) It has to be set manually using speex_bits_insert_terminator(&bits); 2) speex_decoder_int() has to be called as long, as it returns -1. After that, all frames
2007 Jan 23
0
Re: Clicking noise using Speex built for TI C64+ DSP ofDaVinci Processor
...t clicking noise is coming from. Any advice/comments/suggestions? > > Here's what's included in my config.h file for Speex (compiled with -DCONFIG_TI_C6X): > > #define FIXED_POINT > #define FRAME_SIZE 160 > #define DISABLE_WIDEBAND > #define MAX_CHARS_PER_FRAME (42/BYTES_PER_CHAR) > #define MANUAL_ALLOC > #define USER_MISC > > Speex narrow band parameters I'm using: > Quality: 2 /* 5950 bps */ > Enhancement: 0 > Vbr: disabled > Complexity: 1 > > The DaVinci processor is relatively new and I can't seem to find anyone...
2006 Apr 17
2
Major internal changes, TI DSP build change
...t's the case, then you're more than welcome to fix it. I think your judgement is much better than mine on this, so you can do it the way you like as long as the patch is clean enough. > Note that speex_bits_read_from is broken in other ways (the length checking > is wrong for the if BYTES_PER_CHAR=2), so bits.c needs to be updated either > way. Patch welcome :-) Jean-Marc > Regards, > > Jim Crichton > > ----- Original Message ----- > From: "Jean-Marc Valin" <jean-marc.valin@usherbrooke.ca> > To: <speex-dev@xiph.org> > Sent: Tuesday, Ap...
2005 May 25
3
Speex on TI C6x, Problem with TI C5x Patch
...) #define MULT16_16_Q13(a,b) ((a)*(b)) #define 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 operat...
2012 Nov 19
2
[PATCH 158/493] video: remove use of __devinit
...ght, int width) #define BMODE_RELOCATE(offset) offset = (offset) / 4; #define BMODE_LAST_ADDR_OFFS 0x50 -static void * __devinit -sti_bmode_font_raw(struct sti_cooked_font *f) +static void *sti_bmode_font_raw(struct sti_cooked_font *f) { unsigned char *n, *p, *q; int size = f->raw->bytes_per_char*256+sizeof(struct sti_rom_font); @@ -657,7 +656,7 @@ sti_bmode_font_raw(struct sti_cooked_font *f) return n + 3; } -static void __devinit +static void sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) { unsigned long dest_start = (unsigned long) dest; @@ -672,8 +671,7...
2012 Nov 19
2
[PATCH 158/493] video: remove use of __devinit
...ght, int width) #define BMODE_RELOCATE(offset) offset = (offset) / 4; #define BMODE_LAST_ADDR_OFFS 0x50 -static void * __devinit -sti_bmode_font_raw(struct sti_cooked_font *f) +static void *sti_bmode_font_raw(struct sti_cooked_font *f) { unsigned char *n, *p, *q; int size = f->raw->bytes_per_char*256+sizeof(struct sti_rom_font); @@ -657,7 +656,7 @@ sti_bmode_font_raw(struct sti_cooked_font *f) return n + 3; } -static void __devinit +static void sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) { unsigned long dest_start = (unsigned long) dest; @@ -672,8 +671,7...