1 /* rice.h 2 * Pseudo Rice encoding of an integer stream 3 * Copyright (C) 2000 Wayde Milas (wmilas@rarcoa.com) 4 * 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 2 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 */ 19 20 /* Functions 21 */ 22 23 void rice_decode(KEXISBLOCKSTRUCT *kexisBlock, long *data, 24 OPTIONSTRUCT *options, PCMBLOCKSTRUCT *pcmBlock, int kType); 25 void rice_encode(KEXISBLOCKSTRUCT *kexisBlock, long data, 26 OPTIONSTRUCT *options, PCMBLOCKSTRUCT *pcmBlock, int kType); 27 void collect_K_stats(PREDICTORTABLE *pred, long newK, int kType, 28 unsigned short encoderVersion); 29 long get_K(PREDICTORTABLE *pred, int kType, unsigned short encoderVersion, 30 int kHist); 31 long calc_newK(long newData, PREDICTORTABLE *pred); 32 void update_K(PREDICTORTABLE *pred, long newK, int kType, 33 unsigned short encoderVersion, int kHist); 34 int block_ave_K(int table[], int kHist); 35 long lookup_newK(long holdData, PREDICTORTABLE *pred); 36