TurboPFor: TurboPFor decode
This commit is contained in:
114
vp4d.c
114
vp4d.c
@ -22,6 +22,7 @@
|
||||
- email : powturbo [_AT_] gmail [_DOT_] com
|
||||
**/
|
||||
// "Integer Compression" TurboPFor - Pfor/PforDelta
|
||||
|
||||
#ifndef USIZE
|
||||
#pragma warning( disable : 4005)
|
||||
#pragma warning( disable : 4090)
|
||||
@ -41,13 +42,60 @@
|
||||
|
||||
#define P4DELTA(a)
|
||||
#define P4DELTA_(a)
|
||||
|
||||
#if defined(__SSSE3__) || defined(__ARM_NEON)
|
||||
extern char _shuffle_32[16][16]; // defined in bitunpack.c
|
||||
extern char _shuffle_16[256][16];
|
||||
#endif
|
||||
|
||||
#if !defined(SSE2_ON) && !defined(AVX2_ON)
|
||||
|
||||
#ifdef __AVX2__
|
||||
#define VSIZE 256
|
||||
#define P4DELTA(a)
|
||||
#define P4DELTA_(a)
|
||||
|
||||
#define _P4DEC _p4dec256v
|
||||
#define P4DEC p4dec256v
|
||||
#define P4NDEC p4ndec256v
|
||||
#define P4NDECS p4dec
|
||||
#define BITUNPACK bitunpack256v
|
||||
#define BITUNPACKD bitunpack256v
|
||||
#define _BITUNPACKD _bitunpack256v
|
||||
#define USIZE 32
|
||||
#include "vp4d.c"
|
||||
|
||||
#define P4DELTA(a) ,a
|
||||
#define P4DELTA_(a) a
|
||||
#define DELTA
|
||||
|
||||
#define _P4DEC _p4ddec256v
|
||||
#define P4DEC p4ddec256v
|
||||
#define P4NDEC p4nddec256v
|
||||
#define P4NDECS p4ddec
|
||||
#define BITUNPACKD bitdunpack256v
|
||||
#define _BITUNPACKD _bitdunpack256v
|
||||
#define BITUNDD bitddec
|
||||
#include "vp4d.c"
|
||||
|
||||
#define _P4DEC _p4d1dec256v
|
||||
#define P4DEC p4d1dec256v
|
||||
#define P4NDEC p4nd1dec256v
|
||||
#define P4NDECS p4d1dec
|
||||
#define BITUNPACKD bitd1unpack256v
|
||||
#define _BITUNPACKD _bitd1unpack256v
|
||||
#define BITUNDD bitd1dec
|
||||
#include "vp4d.c"
|
||||
|
||||
#define _P4DEC _p4zdec256v
|
||||
#define P4DEC p4zdec256v
|
||||
#define P4NDEC p4nzdec256v
|
||||
#define P4NDECS p4zdec
|
||||
#define BITUNPACKD bitzunpack256v
|
||||
#define _BITUNPACKD _bitzunpack256v
|
||||
#define BITUNDD bitzdec
|
||||
#define USIZE 32
|
||||
#include "vp4d.c"
|
||||
|
||||
#undef BITUNDD
|
||||
#elif defined(PLAIN)
|
||||
|
||||
#define _P4DEC _p4dec
|
||||
#define P4DEC p4dec
|
||||
@ -126,13 +174,10 @@ extern char _shuffle_16[256][16];
|
||||
#undef BITUNPACK
|
||||
#undef BITUNDD
|
||||
#undef P4DELTA
|
||||
#endif
|
||||
|
||||
#undef USIZE
|
||||
#undef DELTA
|
||||
|
||||
#if (defined(__SSSE3__) || defined(__ARM_NEON)) && defined(SSE2_ON)
|
||||
|
||||
#elif defined(__SSSE3__) || defined(__ARM_NEON)
|
||||
#define VSIZE 128
|
||||
#define P4DELTA(a)
|
||||
#define P4DELTA_(a)
|
||||
@ -210,59 +255,8 @@ extern char _shuffle_16[256][16];
|
||||
#define _BITUNPACKD _bitunpack256w
|
||||
#include "vp4d.c"
|
||||
#endif
|
||||
|
||||
#undef DELTA
|
||||
|
||||
#if defined(__AVX2__) && defined(AVX2_ON)
|
||||
#define VSIZE 256
|
||||
#define P4DELTA(a)
|
||||
#define P4DELTA_(a)
|
||||
|
||||
#define _P4DEC _p4dec256v
|
||||
#define P4DEC p4dec256v
|
||||
#define P4NDEC p4ndec256v
|
||||
#define P4NDECS p4dec
|
||||
#define BITUNPACK bitunpack256v
|
||||
#define BITUNPACKD bitunpack256v
|
||||
#define _BITUNPACKD _bitunpack256v
|
||||
#define USIZE 32
|
||||
#include "vp4d.c"
|
||||
|
||||
#define P4DELTA(a) ,a
|
||||
#define P4DELTA_(a) a
|
||||
#define DELTA
|
||||
|
||||
#define _P4DEC _p4ddec256v
|
||||
#define P4DEC p4ddec256v
|
||||
#define P4NDEC p4nddec256v
|
||||
#define P4NDECS p4ddec
|
||||
#define BITUNPACKD bitdunpack256v
|
||||
#define _BITUNPACKD _bitdunpack256v
|
||||
#define BITUNDD bitddec
|
||||
#include "vp4d.c"
|
||||
|
||||
#define _P4DEC _p4d1dec256v
|
||||
#define P4DEC p4d1dec256v
|
||||
#define P4NDEC p4nd1dec256v
|
||||
#define P4NDECS p4d1dec
|
||||
#define BITUNPACKD bitd1unpack256v
|
||||
#define _BITUNPACKD _bitd1unpack256v
|
||||
#define BITUNDD bitd1dec
|
||||
#include "vp4d.c"
|
||||
|
||||
#define _P4DEC _p4zdec256v
|
||||
#define P4DEC p4zdec256v
|
||||
#define P4NDEC p4nzdec256v
|
||||
#define P4NDECS p4zdec
|
||||
#define BITUNPACKD bitzunpack256v
|
||||
#define _BITUNPACKD _bitzunpack256v
|
||||
#define BITUNDD bitzdec
|
||||
#define USIZE 32
|
||||
#include "vp4d.c"
|
||||
|
||||
#undef BITUNDD
|
||||
#endif
|
||||
|
||||
|
||||
#else
|
||||
#define uint_t TEMPLATE3(uint, USIZE, _t)
|
||||
|
||||
@ -537,4 +531,4 @@ unsigned char *TEMPLATE2(p4fdecx, USIZE)(unsigned char *in, unsigned n, uint_t *
|
||||
return in + PAD8(n*b);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user