# HG changeset patch # User diego # Date 1134843278 0 # Node ID ce8f9f4390c3a0a98c5d6a088ee8b333b51af535 # Parent b5bd7d00de0fccb2c655cb22bacba3016b1125a9 COSMETICS: Remove all trailing whitespace. diff -r b5bd7d00de0f -r ce8f9f4390c3 Makefile --- a/Makefile Tue Dec 13 20:24:31 2005 +0000 +++ b/Makefile Sat Dec 17 18:14:38 2005 +0000 @@ -45,7 +45,7 @@ endif %.o: %.c - $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< depend: $(SRCS) $(CC) -MM $(CFLAGS) $^ 1>.depend diff -r b5bd7d00de0f -r ce8f9f4390c3 bswap.h --- a/bswap.h Tue Dec 13 20:24:31 2005 +0000 +++ b/bswap.h Sat Dec 17 18:14:38 2005 +0000 @@ -48,7 +48,7 @@ "0" (x)); return x; #else - union { + union { uint64_t ll; struct { uint32_t l,h; @@ -78,7 +78,7 @@ static inline uint64_t bswap_64(uint64_t x) { - union { + union { uint64_t ll; struct { uint32_t l,h; @@ -119,9 +119,9 @@ x= ((x<<16)&0xFFFF0000FFFF0000ULL) | ((x>>16)&0x0000FFFF0000FFFFULL); return (x>>32) | (x<<32); #else - union { + union { uint64_t ll; - uint32_t l[2]; + uint32_t l[2]; } w, r; w.ll = x; r.l[0] = bswap_32 (w.l[1]); diff -r b5bd7d00de0f -r ce8f9f4390c3 common.h --- a/common.h Tue Dec 13 20:24:31 2005 +0000 +++ b/common.h Sat Dec 17 18:14:38 2005 +0000 @@ -171,8 +171,8 @@ #endif #if defined(CONFIG_OS2) || defined(CONFIG_SUNOS) -static inline float floorf(float f) { - return floor(f); +static inline float floorf(float f) { + return floor(f); } #endif @@ -311,7 +311,7 @@ #else # define FASTDIV(a,b) ((a)/(b)) #endif - + /* define it to include statistics code (useful only for optimizing codec efficiency */ //#define STATS @@ -424,9 +424,9 @@ int ret=0; int s; int ret_sq=0; - + if(a<128) return ff_sqrt_tab[a]; - + for(s=15; s>=0; s--){ int b= ret_sq + (1<<(s*2)) + (ret<>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>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>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>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 = "_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>=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); diff -r b5bd7d00de0f -r ce8f9f4390c3 integer.h --- a/integer.h Tue Dec 13 20:24:31 2005 +0000 +++ b/integer.h Sat Dec 17 18:14:38 2005 +0000 @@ -17,20 +17,20 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ - + /** * @file integer.h * arbitrary precision integers * @author Michael Niedermayer */ - + #ifndef INTEGER_H #define INTEGER_H #define AV_INTEGER_SIZE 8 typedef struct AVInteger{ - uint16_t v[AV_INTEGER_SIZE]; + uint16_t v[AV_INTEGER_SIZE]; } AVInteger; AVInteger av_add_i(AVInteger a, AVInteger b); diff -r b5bd7d00de0f -r ce8f9f4390c3 intfloat_readwrite.c --- a/intfloat_readwrite.c Tue Dec 13 20:24:31 2005 +0000 +++ b/intfloat_readwrite.c Sat Dec 17 18:14:38 2005 +0000 @@ -17,12 +17,12 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - + /** * @file intfloat_readwrite.c * Portable IEEE float/double read/write functions. */ - + #include "common.h" double av_int2dbl(int64_t v){ diff -r b5bd7d00de0f -r ce8f9f4390c3 mathematics.c --- a/mathematics.c Tue Dec 13 20:24:31 2005 +0000 +++ b/mathematics.c Sat Dec 17 18:14:38 2005 +0000 @@ -15,7 +15,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - + /** * @file mathematics.c * Miscellaneous math routines and tables. @@ -54,9 +54,9 @@ assert(c > 0); assert(b >=0); assert(rnd >=0 && rnd<=5 && rnd!=4); - - if(a<0 && a != INT64_MIN) return -av_rescale_rnd(-a, b, c, rnd ^ ((rnd>>1)&1)); - + + if(a<0 && a != INT64_MIN) return -av_rescale_rnd(-a, b, c, rnd ^ ((rnd>>1)&1)); + if(rnd==AV_ROUND_NEAR_INF) r= c/2; else if(rnd&1) r= c-1; @@ -66,10 +66,10 @@ else return a/c*b + (a%c*b + r)/c; } - + ai= av_mul_i(av_int2i(a), av_int2i(b)); ai= av_add_i(ai, av_int2i(r)); - + return av_i2int(av_div_i(ai, av_int2i(c))); } diff -r b5bd7d00de0f -r ce8f9f4390c3 rational.c --- a/rational.c Tue Dec 13 20:24:31 2005 +0000 +++ b/rational.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 rational.c * Rational numbers @@ -26,7 +26,7 @@ //#include #include - + #include "common.h" #include "mathematics.h" #include "rational.h" @@ -42,7 +42,7 @@ a1= (AVRational){nom, den}; den=0; } - + while(den){ int64_t x = nom / den; int64_t next_den= nom - den*x; @@ -57,10 +57,10 @@ den= next_den; } assert(ff_gcd(a1.num, a1.den) == 1); - + *dst_nom = sign ? -a1.num : a1.num; *dst_den = a1.den; - + return den==0; } diff -r b5bd7d00de0f -r ce8f9f4390c3 rational.h --- a/rational.h Tue Dec 13 20:24:31 2005 +0000 +++ b/rational.h 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 rational.h * Rational numbers.