パラメータを適応変化させる事により圧縮率を向上させた動的ライス・ゴロム符号を利用した可逆圧縮方式。圧縮ソフト、圧縮率のMATLABシミュレーションは詳細はInterface誌2011年8月号に掲載されるRX62Nマイコン連動特集にて掲載予定。

Dependencies:   mbed

Committer:
lynxeyed_atsu
Date:
Wed Mar 30 06:05:24 2011 +0000
Revision:
0:d920d64db582
alpha

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lynxeyed_atsu 0:d920d64db582 1 #ifndef ___BITIO_H__
lynxeyed_atsu 0:d920d64db582 2 #define ___BITIO_H__
lynxeyed_atsu 0:d920d64db582 3 /*
lynxeyed_atsu 0:d920d64db582 4 #define TRUE 1
lynxeyed_atsu 0:d920d64db582 5 #define FALSE 0
lynxeyed_atsu 0:d920d64db582 6 */
lynxeyed_atsu 0:d920d64db582 7 #define rightbits(n, x) ((x) & ((1U << (n)) - 1U))
lynxeyed_atsu 0:d920d64db582 8
lynxeyed_atsu 0:d920d64db582 9 #define OVERRUN 0xffff
lynxeyed_atsu 0:d920d64db582 10 #define _lsb_k 0x0b // _lsb_k:0x09 to 0x0b?
lynxeyed_atsu 0:d920d64db582 11
lynxeyed_atsu 0:d920d64db582 12 typedef unsigned int Uint;
lynxeyed_atsu 0:d920d64db582 13 typedef unsigned char Uchar;
lynxeyed_atsu 0:d920d64db582 14
lynxeyed_atsu 0:d920d64db582 15 extern FILE *infp, *outfp;
lynxeyed_atsu 0:d920d64db582 16 extern int getcount, putcount;
lynxeyed_atsu 0:d920d64db582 17 extern int bitbuf;
lynxeyed_atsu 0:d920d64db582 18
lynxeyed_atsu 0:d920d64db582 19 /* Rice Golomb en-decoding */
lynxeyed_atsu 0:d920d64db582 20 extern void decode(void);
lynxeyed_atsu 0:d920d64db582 21 extern void encode(long int n);
lynxeyed_atsu 0:d920d64db582 22
lynxeyed_atsu 0:d920d64db582 23
lynxeyed_atsu 0:d920d64db582 24 void init_bit_o(void);
lynxeyed_atsu 0:d920d64db582 25 void init_bit_i(void);
lynxeyed_atsu 0:d920d64db582 26 Uint getbit(void);
lynxeyed_atsu 0:d920d64db582 27 Uint getbits(int n);
lynxeyed_atsu 0:d920d64db582 28 void putbit(Uint bit);
lynxeyed_atsu 0:d920d64db582 29 void putbits(int n, Uint x);
lynxeyed_atsu 0:d920d64db582 30
lynxeyed_atsu 0:d920d64db582 31
lynxeyed_atsu 0:d920d64db582 32
lynxeyed_atsu 0:d920d64db582 33 #endif