[xiph-commits] r12143 - trunk/speex/libspeex
jm at svn.xiph.org
jm at svn.xiph.org
Sat Nov 25 18:30:36 PST 2006
Author: jm
Date: 2006-11-25 18:30:33 -0800 (Sat, 25 Nov 2006)
New Revision: 12143
Modified:
trunk/speex/libspeex/misc.c
trunk/speex/libspeex/misc.h
Log:
memset and memcpy are no longer required.
Modified: trunk/speex/libspeex/misc.c
===================================================================
--- trunk/speex/libspeex/misc.c 2006-11-24 21:47:49 UTC (rev 12142)
+++ trunk/speex/libspeex/misc.c 2006-11-26 02:30:33 UTC (rev 12143)
@@ -87,50 +87,6 @@
return ret;
}
-#if BYTES_PER_CHAR == 2
-void speex_memcpy_bytes(char *dst, char *src, int nbytes)
-{
- int i;
- int nchars = nbytes/BYTES_PER_CHAR;
- for (i=0;i<nchars;i++)
- dst[i]=src[i];
- if (nbytes & 1) {
- /* copy in the last byte */
- int last_i = nchars;
- char last_dst_char = dst[last_i];
- char last_src_char = src[last_i];
- last_dst_char &= 0xff00;
- last_dst_char |= (last_src_char & 0x00ff);
- dst[last_i] = last_dst_char;
- }
-}
-void speex_memset_bytes(char *dst, char c, int nbytes)
-{
- int i;
- spx_int16_t cc = ((c << 8) | c);
- int nchars = nbytes/BYTES_PER_CHAR;
- for (i=0;i<nchars;i++)
- dst[i]=cc;
- if (nbytes & 1) {
- /* copy in the last byte */
- int last_i = nchars;
- char last_dst_char = dst[last_i];
- last_dst_char &= 0xff00;
- last_dst_char |= (c & 0x00ff);
- dst[last_i] = last_dst_char;
- }
-}
-#else
-void speex_memcpy_bytes(char *dst, char *src, int nbytes)
-{
- memcpy(dst, src, nbytes);
-}
-void speex_memset_bytes(char *dst, char src, int nbytes)
-{
- memset(dst, src, nbytes);
-}
-#endif
-
#ifndef OVERRIDE_SPEEX_ALLOC
void *speex_alloc (int size)
{
Modified: trunk/speex/libspeex/misc.h
===================================================================
--- trunk/speex/libspeex/misc.h 2006-11-24 21:47:49 UTC (rev 12142)
+++ trunk/speex/libspeex/misc.h 2006-11-26 02:30:33 UTC (rev 12143)
@@ -98,12 +98,6 @@
/** Speex wrapper for mem_move */
void *speex_move (void *dest, void *src, int n);
-/** Speex wrapper for memcpy */
-void speex_memcpy_bytes(char *dst, char *src, int nbytes);
-
-/** Speex wrapper for memset */
-void speex_memset_bytes(char *dst, char src, int nbytes);
-
/** Print error message to stderr */
void speex_error(const char *str);
More information about the commits
mailing list