00001 /* 00002 * arbitrary precision integers 00003 * Copyright (c) 2004 Michael Niedermayer <michaelni@gmx.at> 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 * 00019 */ 00020 00027 #ifndef INTEGER_H 00028 #define INTEGER_H 00029 00030 #define AV_INTEGER_SIZE 8 00031 00032 typedef struct AVInteger{ 00033 uint16_t v[AV_INTEGER_SIZE]; 00034 } AVInteger; 00035 00036 AVInteger av_add_i(AVInteger a, AVInteger b); 00037 AVInteger av_sub_i(AVInteger a, AVInteger b); 00038 int av_log2_i(AVInteger a); 00039 AVInteger av_mul_i(AVInteger a, AVInteger b); 00040 int av_cmp_i(AVInteger a, AVInteger b); 00041 AVInteger av_shr_i(AVInteger a, int s); 00042 AVInteger av_mod_i(AVInteger *quot, AVInteger a, AVInteger b); 00043 AVInteger av_div_i(AVInteger a, AVInteger b); 00044 AVInteger av_int2i(int64_t a); 00045 int64_t av_i2int(AVInteger a); 00046 00047 #endif // INTEGER_H
1.5.5