diff integer.c @ 12:ce8f9f4390c3 libavutil

COSMETICS: Remove all trailing whitespace.
author diego
date Sat, 17 Dec 2005 18:14:38 +0000
parents ee8f44bb7c4d
children af59e84e283d
line wrap: on
line diff
--- a/integer.c	Tue Dec 13 20:24:31 2005 +0000
+++ b/integer.c	Sat Dec 17 18:14:38 2005 +0000
@@ -17,7 +17,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
- 
+
 /**
  * @file integer.c
  * arbitrary precision integers.
@@ -29,7 +29,7 @@
 
 AVInteger av_add_i(AVInteger a, AVInteger b){
     int i, carry=0;
-    
+
     for(i=0; i<AV_INTEGER_SIZE; i++){
         carry= (carry>>16) + a.v[i] + b.v[i];
         a.v[i]= carry;
@@ -39,7 +39,7 @@
 
 AVInteger av_sub_i(AVInteger a, AVInteger b){
     int i, carry=0;
-    
+
     for(i=0; i<AV_INTEGER_SIZE; i++){
         carry= (carry>>16) + a.v[i] - b.v[i];
         a.v[i]= carry;
@@ -66,12 +66,12 @@
     int i, j;
     int na= (av_log2_i(a)+16) >> 4;
     int nb= (av_log2_i(b)+16) >> 4;
-    
+
     memset(&out, 0, sizeof(out));
-    
+
     for(i=0; i<na; i++){
         unsigned int carry=0;
-        
+
         if(a.v[i])
             for(j=i; j<AV_INTEGER_SIZE && j-i<=nb; j++){
                 carry= (carry>>16) + out.v[j] + a.v[i]*b.v[j-i];
@@ -86,10 +86,10 @@
  * returns 0 if a==b, 1 if a>b and -1 if a<b.
  */
 int av_cmp_i(AVInteger a, AVInteger b){
-    int i; 
+    int i;
     int v= (int16_t)a.v[AV_INTEGER_SIZE-1] - (int16_t)b.v[AV_INTEGER_SIZE-1];
     if(v) return (v>>16)|1;
-    
+
     for(i=AV_INTEGER_SIZE-2; i>=0; i--){
         int v= a.v[i] - b.v[i];
         if(v) return (v>>16)|1;
@@ -123,13 +123,13 @@
     int i= av_log2_i(a) - av_log2_i(b);
     AVInteger quot_temp;
     if(!quot) quot = &quot_temp;
-    
+
     assert((int16_t)a[AV_INTEGER_SIZE-1] >= 0 && (int16_t)b[AV_INTEGER_SIZE-1] >= 0);
     assert(av_log2(b)>=0);
-    
+
     if(i > 0)
         b= av_shr_i(b, -i);
-        
+
     memset(quot, 0, sizeof(AVInteger));
 
     while(i-- >= 0){
@@ -158,7 +158,7 @@
 AVInteger av_int2i(int64_t a){
     AVInteger out;
     int i;
-    
+
     for(i=0; i<AV_INTEGER_SIZE; i++){
         out.v[i]= a;
         a>>=16;
@@ -168,13 +168,13 @@
 
 /**
  * converts the given AVInteger to an int64_t.
- * if the AVInteger is too large to fit into an int64_t, 
+ * if the AVInteger is too large to fit into an int64_t,
  * then only the least significant 64bit will be used
  */
 int64_t av_i2int(AVInteger a){
     int i;
     int64_t out=(int8_t)a.v[AV_INTEGER_SIZE-1];
-    
+
     for(i= AV_INTEGER_SIZE-2; i>=0; i--){
         out = (out<<16) + a.v[i];
     }
@@ -203,7 +203,7 @@
         for(b=3; b<256*256*256; b+=27118){
             AVInteger ai= av_int2i(a);
             AVInteger bi= av_int2i(b);
-            
+
             assert(av_i2int(ai) == a);
             assert(av_i2int(bi) == b);
             assert(av_i2int(av_add_i(ai,bi)) == a+b);