![](/media/cache/profiles/98c39996bf1543e974747a2549b3107c.50x50_q85.png)
パラメータを適応変化させる事により圧縮率を向上させた動的ライス・ゴロム符号を利用した可逆圧縮方式。圧縮ソフト、圧縮率のMATLABシミュレーションは詳細はInterface誌2011年8月号に掲載されるRX62Nマイコン連動特集にて掲載予定。
Diff: Lossless_lib/_bitio.h
- Revision:
- 0:d920d64db582
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Lossless_lib/_bitio.h Wed Mar 30 06:05:24 2011 +0000 @@ -0,0 +1,33 @@ +#ifndef ___BITIO_H__ +#define ___BITIO_H__ +/* +#define TRUE 1 +#define FALSE 0 +*/ +#define rightbits(n, x) ((x) & ((1U << (n)) - 1U)) + +#define OVERRUN 0xffff +#define _lsb_k 0x0b // _lsb_k:0x09 to 0x0b? + +typedef unsigned int Uint; +typedef unsigned char Uchar; + +extern FILE *infp, *outfp; +extern int getcount, putcount; +extern int bitbuf; + +/* Rice Golomb en-decoding */ +extern void decode(void); +extern void encode(long int n); + + +void init_bit_o(void); +void init_bit_i(void); +Uint getbit(void); +Uint getbits(int n); +void putbit(Uint bit); +void putbits(int n, Uint x); + + + +#endif \ No newline at end of file