summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/Makefile2
-rw-r--r--libavutil/bswap.h8
-rw-r--r--libavutil/common.h12
-rw-r--r--libavutil/integer.c30
-rw-r--r--libavutil/integer.h6
-rw-r--r--libavutil/intfloat_readwrite.c4
-rw-r--r--libavutil/mathematics.c12
-rw-r--r--libavutil/rational.c10
-rw-r--r--libavutil/rational.h2
9 files changed, 43 insertions, 43 deletions
diff --git a/libavutil/Makefile b/libavutil/Makefile
index 515bf95eca..d27a369ec6 100644
--- a/libavutil/Makefile
+++ b/libavutil/Makefile
@@ -45,7 +45,7 @@ else
endif
%.o: %.c
- $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
+ $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
depend: $(SRCS)
$(CC) -MM $(CFLAGS) $^ 1>.depend
diff --git a/libavutil/bswap.h b/libavutil/bswap.h
index 50fd571787..beaec232f7 100644
--- a/libavutil/bswap.h
+++ b/libavutil/bswap.h
@@ -48,7 +48,7 @@ static inline uint64_t bswap_64(uint64_t x)
"0" (x));
return x;
#else
- union {
+ union {
uint64_t ll;
struct {
uint32_t l,h;
@@ -78,7 +78,7 @@ static always_inline uint32_t bswap_32(uint32_t x) {
static inline uint64_t bswap_64(uint64_t x)
{
- union {
+ union {
uint64_t ll;
struct {
uint32_t l,h;
@@ -119,9 +119,9 @@ static inline uint64_t bswap_64(uint64_t x)
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 --git a/libavutil/common.h b/libavutil/common.h
index 5b2729cf9b..6b05997697 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -171,8 +171,8 @@ typedef uint64_t uint_fast64_t;
#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 @@ extern const uint32_t inverse[256];
#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 @@ static inline int ff_sqrt(int a)
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<<s)*2;
if(b<=a){
@@ -544,7 +544,7 @@ tend= read_time();\
}\
}
#else
-#define START_TIMER
+#define START_TIMER
#define STOP_TIMER(id) {}
#endif
diff --git a/libavutil/integer.c b/libavutil/integer.c
index 38a826f861..b0e766f781 100644
--- a/libavutil/integer.c
+++ b/libavutil/integer.c
@@ -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_add_i(AVInteger a, AVInteger b){
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 @@ AVInteger av_mul_i(AVInteger a, AVInteger b){
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 @@ AVInteger av_mul_i(AVInteger a, AVInteger b){
* 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 @@ AVInteger av_mod_i(AVInteger *quot, AVInteger a, AVInteger b){
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_div_i(AVInteger a, AVInteger b){
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 @@ AVInteger av_int2i(int64_t a){
/**
* 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 @@ main(){
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 --git a/libavutil/integer.h b/libavutil/integer.h
index ef1b2a089e..12edfff996 100644
--- a/libavutil/integer.h
+++ b/libavutil/integer.h
@@ -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 <michaelni@gmx.at>
*/
-
+
#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 --git a/libavutil/intfloat_readwrite.c b/libavutil/intfloat_readwrite.c
index 81d35dad96..998897ed7b 100644
--- a/libavutil/intfloat_readwrite.c
+++ b/libavutil/intfloat_readwrite.c
@@ -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 --git a/libavutil/mathematics.c b/libavutil/mathematics.c
index aa3fd74e0c..cc7dbe8bcf 100644
--- a/libavutil/mathematics.c
+++ b/libavutil/mathematics.c
@@ -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 @@ int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd){
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 @@ int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd){
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 --git a/libavutil/rational.c b/libavutil/rational.c
index 1044999291..f4e3f7e047 100644
--- a/libavutil/rational.c
+++ b/libavutil/rational.c
@@ -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 <math.h>
#include <limits.h>
-
+
#include "common.h"
#include "mathematics.h"
#include "rational.h"
@@ -42,7 +42,7 @@ int av_reduce(int *dst_nom, int *dst_den, int64_t nom, int64_t den, int64_t max)
a1= (AVRational){nom, den};
den=0;
}
-
+
while(den){
int64_t x = nom / den;
int64_t next_den= nom - den*x;
@@ -57,10 +57,10 @@ int av_reduce(int *dst_nom, int *dst_den, int64_t nom, int64_t den, int64_t max)
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 --git a/libavutil/rational.h b/libavutil/rational.h
index e4bfe5f7a6..189b3621e0 100644
--- a/libavutil/rational.h
+++ b/libavutil/rational.h
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-
+
/**
* @file rational.h
* Rational numbers.