From 5c5f643aa46cb7a2af2794ba98327d4114fe09d0 Mon Sep 17 00:00:00 2001 From: powturbo Date: Sun, 24 Apr 2016 21:21:04 +0200 Subject: [PATCH] Variable byte --- vint.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/vint.c b/vint.c index a52c9be..bafc6d6 100644 --- a/vint.c +++ b/vint.c @@ -29,10 +29,6 @@ #include "vint.h" #include "bitutil.h" -//------------- 32 bits ---------------------------------------------------------------- - //0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 -unsigned char vtab[] = { 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 3, 3, 2, 2, 2, 2 }; - #define UN 8 #define USIZE 32 @@ -79,7 +75,7 @@ unsigned char *TEMPLATE2(vbdec, USIZE)(unsigned char *__restrict in, unsigned n return in; } -unsigned char *TEMPLATE2(vbenc, USIZE)(uint_t *__restrict in, unsigned n, unsigned char *__restrict out) { +unsigned char *TEMPLATE2(vbenc, USIZE)(uint_t *__restrict in, unsigned n, unsigned char *__restrict out) { register uint_t x, *ip; for(ip = in; ip != in+(n&~(UN-1)); ip += UN) { __builtin_prefetch(ip+USIZE*8, 0); x = ip[0]; TEMPLATE2(_vbput, USIZE)(out, x, ;);