TurboPFor: TurboPFor encode c/c++ header
This commit is contained in:
11
vp4c.h
11
vp4c.h
@ -23,10 +23,6 @@
|
|||||||
**/
|
**/
|
||||||
// "Integer Compression" TurboPfor (see vp4dd.h for decompression)
|
// "Integer Compression" TurboPfor (see vp4dd.h for decompression)
|
||||||
|
|
||||||
#define P4EB(_b_) (_b_ << 1)
|
|
||||||
#define P4EBX(_b_, _bx_) (_bx_ << 8 | _b_ << 1 | 1)
|
|
||||||
#define P4SAVE(_out_, _b_, _bx_) do { if(!_bx_) *_out_++ = P4EB(_b_);else *(unsigned short *)_out_ = P4EBX(_b_, _bx_), _out_ += 2; } while(0)
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@ -54,3 +50,10 @@ unsigned _p4bits64( uint64_t *__restrict in, unsigned n, unsigned
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define P4D_MAX 256
|
||||||
|
|
||||||
|
#define P4EB(_b_) (_b_ << 1)
|
||||||
|
#define P4EBX(_b_, _bx_) (_bx_ << 8 | _b_ << 1 | 1)
|
||||||
|
#define P4SAVE(_out_, _b_, _bx_) do { if(!_bx_) *_out_++ = P4EB(_b_);else *(unsigned short *)_out_ = P4EBX(_b_, _bx_), _out_ += 2; } while(0)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user