Patch #1203309 by David Bryant - WavPack codec fix and performance enhancement

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6481 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2005-05-17 06:32:49 +00:00
parent fe1ce9d842
commit 6705a88347
6 changed files with 512 additions and 271 deletions

View file

@ -17,28 +17,6 @@
#include "wavpack.h"
#include <string.h>
#include <ctype.h>
/* dirty fix */
const char _ctype_[257]={
0,
_C, _C, _C, _C, _C, _C, _C, _C,
_C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C,
_C, _C, _C, _C, _C, _C, _C, _C,
_C, _C, _C, _C, _C, _C, _C, _C,
_S|_B, _P, _P, _P, _P, _P, _P, _P,
_P, _P, _P, _P, _P, _P, _P, _P,
_N, _N, _N, _N, _N, _N, _N, _N,
_N, _N, _P, _P, _P, _P, _P, _P,
_P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U,
_U, _U, _U, _U, _U, _U, _U, _U,
_U, _U, _U, _U, _U, _U, _U, _U,
_U, _U, _U, _P, _P, _P, _P, _P,
_P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L,
_L, _L, _L, _L, _L, _L, _L, _L,
_L, _L, _L, _L, _L, _L, _L, _L,
_L, _L, _L, _P, _P, _P, _P, _C
};
////////////////////////// Bitstream functions ////////////////////////////////
@ -118,7 +96,7 @@ void little_endian_to_native (void *data, char *format)
break;
default:
if (isdigit (*format))
if (*format >= '0' && *format <= '9')
cp += *format - '0';
break;
@ -150,7 +128,7 @@ void native_to_little_endian (void *data, char *format)
break;
default:
if (isdigit (*format))
if (*format >= '0' && *format <= '9')
cp += *format - '0';
break;