BitPack
This commit is contained in:
14
bitpack.c
14
bitpack.c
@ -24,7 +24,9 @@
|
|||||||
// bitpack.c - "Integer Compression" bit packing
|
// bitpack.c - "Integer Compression" bit packing
|
||||||
#ifndef IPPB
|
#ifndef IPPB
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "bitpack.h"
|
#include "bitpack.h"
|
||||||
|
#include "bitutil.h"
|
||||||
|
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Wunsequenced"
|
#pragma clang diagnostic ignored "-Wunsequenced"
|
||||||
|
|
||||||
@ -79,6 +81,16 @@ unsigned char *bitf1pack32(unsigned *__restrict in, unsigned n, unsigned c
|
|||||||
#undef IPPB
|
#undef IPPB
|
||||||
#undef SRC
|
#undef SRC
|
||||||
#undef SRC1
|
#undef SRC1
|
||||||
|
|
||||||
|
#define IPPB( __ip,__x, __parm) as = zigzagenc32(*__ip-start); start=*__ip++
|
||||||
|
#define SRC( __ip,__x) as
|
||||||
|
#define SRC1(__ip,__x) zigzagenc32(*__ip - start)
|
||||||
|
#include __FILE__
|
||||||
|
|
||||||
|
unsigned char *bitzpack32(unsigned *__restrict in, unsigned n, unsigned char *__restrict out, unsigned start, unsigned nb) { unsigned char *pout = out+PAD8(n*nb); unsigned as; BITPACK32(in, n, nb, out, start); return pout; }
|
||||||
|
#undef IPPB
|
||||||
|
#undef SRC
|
||||||
|
#undef SRC1
|
||||||
//-----------------------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------------------------
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user