ROHC compression/decompression library
|
00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 2 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * This program is distributed in the hope that it will be useful, 00008 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00009 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00010 * GNU General Public License for more details. 00011 * 00012 * You should have received a copy of the GNU General Public License 00013 * along with this program; if not, write to the Free Software 00014 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00015 */ 00016 00023 #ifndef TS_SC_DECOMP_H 00024 #define TS_SC_DECOMP_H 00025 00026 #include "rohc.h" 00027 00028 00035 struct ts_sc_decomp 00036 { 00038 int ts_stride; 00040 struct d_lsb_decode lsb_ts_stride; 00041 00043 int ts_scaled; 00045 struct d_lsb_decode lsb_ts_scaled; 00046 00048 int ts_offset; 00049 00051 unsigned int ts; 00053 unsigned int old_ts; 00054 00056 unsigned int sn; 00058 unsigned int old_sn; 00059 }; 00060 00061 00062 00063 /* 00064 * Function prototypes 00065 */ 00066 00067 void d_create_sc(struct ts_sc_decomp *ts_sc); 00068 00069 void d_add_ts(struct ts_sc_decomp *ts_sc, unsigned int ts, unsigned int sn); 00070 void d_add_ts_stride(struct ts_sc_decomp *ts_sc, int ts_stride); 00071 00072 unsigned int d_decode_ts(struct ts_sc_decomp *ts_sc, int ts_scaled, int nb_bits); 00073 unsigned int ts_deducted(struct ts_sc_decomp *ts_sc, unsigned int sn); 00074 00075 void update_ts_sc(struct ts_sc_decomp *ts_sc); 00076 00077 #endif 00078