Loading media/webrtc/trunk/src/modules/audio_coding/codecs/pcm16b/pcm16b.c +2 −6 Original line number Diff line number Diff line Loading @@ -15,10 +15,6 @@ #include "typedefs.h" #ifdef WEBRTC_BIG_ENDIAN #include "signal_processing_library.h" #endif #define HIGHEND 0xFF00 #define LOWEND 0xFF Loading @@ -30,7 +26,7 @@ WebRtc_Word16 WebRtcPcm16b_EncodeW16(WebRtc_Word16 *speechIn16b, WebRtc_Word16 *speechOut16b) { #ifdef WEBRTC_BIG_ENDIAN WEBRTC_SPL_MEMCPY_W16(speechOut16b, speechIn16b, len); memcpy(speechOut16b, speechIn16b, len * sizeof(WebRtc_Word16)); #else int i; for (i=0;i<len;i++) { Loading Loading @@ -69,7 +65,7 @@ WebRtc_Word16 WebRtcPcm16b_DecodeW16(void *inst, WebRtc_Word16* speechType) { #ifdef WEBRTC_BIG_ENDIAN WEBRTC_SPL_MEMCPY_W8(speechOut16b, speechIn16b, ((len*sizeof(WebRtc_Word16)+1)>>1)); memcpy(speechOut16b, speechIn16b, ((len*sizeof(WebRtc_Word16)+1)>>1)); #else int i; int samples=len>>1; Loading media/webrtc/trunk/src/typedefs.h +64 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,70 @@ #define WEBRTC_ARCH_32_BITS #define WEBRTC_ARCH_LITTLE_ENDIAN #define WEBRTC_LITTLE_ENDIAN #elif defined(__powerpc64__) #define WEBRTC_ARCH_PPC64 1 #define WEBRTC_ARCH_64_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #elif defined(__ppc__) || defined(__powerpc__) #define WEBRTC_ARCH_PPC 1 #define WEBRTC_ARCH_32_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #elif defined(__sparc64__) #define WEBRTC_ARCH_SPARC 1 #define WEBRTC_ARCH_64_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #elif defined(__sparc__) #define WEBRTC_ARCH_SPARC 1 #define WEBRTC_ARCH_32_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #elif defined(__mips__) #define WEBRTC_ARCH_MIPS 1 #if defined(_ABI64) && _MIPS_SIM == _ABI64 #define WEBRTC_ARCH_64_BITS 1 #else #define WEBRTC_ARCH_32_BITS 1 #endif #if defined(__MIPSEB__) #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #else #define WEBRTC_ARCH_LITTLE_ENDIAN #define WEBRTC_LITTLE_ENDIAN #endif #elif defined(__hppa__) #define WEBRTC_ARCH_HPPA 1 #define WEBRTC_ARCH_32_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #elif defined(__ia64__) #define WEBRTC_ARCH_IA64 1 #define WEBRTC_ARCH_64_BITS 1 #define WEBRTC_ARCH_LITTLE_ENDIAN #define WEBRTC_LITTLE_ENDIAN #elif defined(__s390x__) #define WEBRTC_ARCH_S390X 1 #define WEBRTC_ARCH_64_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #elif defined(__s390__) #define WEBRTC_ARCH_S390 1 #define WEBRTC_ARCH_32_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #elif defined(__alpha__) #define WEBRTC_ARCH_ALPHA 1 #define WEBRTC_ARCH_64_BITS 1 #define WEBRTC_ARCH_LITTLE_ENDIAN #define WEBRTC_LITTLE_ENDIAN #elif defined(__avr32__) #define WEBRTC_ARCH_AVR32 1 #define WEBRTC_ARCH_32_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #else #error Please add support for your architecture in typedefs.h #endif Loading Loading
media/webrtc/trunk/src/modules/audio_coding/codecs/pcm16b/pcm16b.c +2 −6 Original line number Diff line number Diff line Loading @@ -15,10 +15,6 @@ #include "typedefs.h" #ifdef WEBRTC_BIG_ENDIAN #include "signal_processing_library.h" #endif #define HIGHEND 0xFF00 #define LOWEND 0xFF Loading @@ -30,7 +26,7 @@ WebRtc_Word16 WebRtcPcm16b_EncodeW16(WebRtc_Word16 *speechIn16b, WebRtc_Word16 *speechOut16b) { #ifdef WEBRTC_BIG_ENDIAN WEBRTC_SPL_MEMCPY_W16(speechOut16b, speechIn16b, len); memcpy(speechOut16b, speechIn16b, len * sizeof(WebRtc_Word16)); #else int i; for (i=0;i<len;i++) { Loading Loading @@ -69,7 +65,7 @@ WebRtc_Word16 WebRtcPcm16b_DecodeW16(void *inst, WebRtc_Word16* speechType) { #ifdef WEBRTC_BIG_ENDIAN WEBRTC_SPL_MEMCPY_W8(speechOut16b, speechIn16b, ((len*sizeof(WebRtc_Word16)+1)>>1)); memcpy(speechOut16b, speechIn16b, ((len*sizeof(WebRtc_Word16)+1)>>1)); #else int i; int samples=len>>1; Loading
media/webrtc/trunk/src/typedefs.h +64 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,70 @@ #define WEBRTC_ARCH_32_BITS #define WEBRTC_ARCH_LITTLE_ENDIAN #define WEBRTC_LITTLE_ENDIAN #elif defined(__powerpc64__) #define WEBRTC_ARCH_PPC64 1 #define WEBRTC_ARCH_64_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #elif defined(__ppc__) || defined(__powerpc__) #define WEBRTC_ARCH_PPC 1 #define WEBRTC_ARCH_32_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #elif defined(__sparc64__) #define WEBRTC_ARCH_SPARC 1 #define WEBRTC_ARCH_64_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #elif defined(__sparc__) #define WEBRTC_ARCH_SPARC 1 #define WEBRTC_ARCH_32_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #elif defined(__mips__) #define WEBRTC_ARCH_MIPS 1 #if defined(_ABI64) && _MIPS_SIM == _ABI64 #define WEBRTC_ARCH_64_BITS 1 #else #define WEBRTC_ARCH_32_BITS 1 #endif #if defined(__MIPSEB__) #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #else #define WEBRTC_ARCH_LITTLE_ENDIAN #define WEBRTC_LITTLE_ENDIAN #endif #elif defined(__hppa__) #define WEBRTC_ARCH_HPPA 1 #define WEBRTC_ARCH_32_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #elif defined(__ia64__) #define WEBRTC_ARCH_IA64 1 #define WEBRTC_ARCH_64_BITS 1 #define WEBRTC_ARCH_LITTLE_ENDIAN #define WEBRTC_LITTLE_ENDIAN #elif defined(__s390x__) #define WEBRTC_ARCH_S390X 1 #define WEBRTC_ARCH_64_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #elif defined(__s390__) #define WEBRTC_ARCH_S390 1 #define WEBRTC_ARCH_32_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #elif defined(__alpha__) #define WEBRTC_ARCH_ALPHA 1 #define WEBRTC_ARCH_64_BITS 1 #define WEBRTC_ARCH_LITTLE_ENDIAN #define WEBRTC_LITTLE_ENDIAN #elif defined(__avr32__) #define WEBRTC_ARCH_AVR32 1 #define WEBRTC_ARCH_32_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #else #error Please add support for your architecture in typedefs.h #endif Loading