changeset 8611:a637db9f59b1 libavcodec

export gcd function as av_gcd()
author aurel
date Sat, 17 Jan 2009 11:13:33 +0000
parents 2ca51be7dad8
children b20c590170cc
files h263.c libxvidff.c mpegvideo_enc.c snow.c utils.c
diffstat 5 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/h263.c	Sat Jan 17 01:17:04 2009 +0000
+++ b/h263.c	Sat Jan 17 11:13:33 2009 +0000
@@ -5156,7 +5156,7 @@
                     av_log(s, AV_LOG_ERROR, "zero framerate\n");
                     return -1;
                 }
-                gcd= ff_gcd(s->avctx->time_base.den, s->avctx->time_base.num);
+                gcd= av_gcd(s->avctx->time_base.den, s->avctx->time_base.num);
                 s->avctx->time_base.den /= gcd;
                 s->avctx->time_base.num /= gcd;
 //                av_log(s->avctx, AV_LOG_DEBUG, "%d/%d\n", s->avctx->time_base.den, s->avctx->time_base.num);
--- a/libxvidff.c	Sat Jan 17 01:17:04 2009 +0000
+++ b/libxvidff.c	Sat Jan 17 11:13:33 2009 +0000
@@ -557,7 +557,7 @@
     frate = avctx->time_base.den;
     fbase = avctx->time_base.num;
 
-    gcd = ff_gcd(frate, fbase);
+    gcd = av_gcd(frate, fbase);
     if( gcd > 1 ) {
         frate /= gcd;
         fbase /= gcd;
@@ -579,7 +579,7 @@
     } else
         est_fbase = 1;
 
-    gcd = ff_gcd(est_frate, est_fbase);
+    gcd = av_gcd(est_frate, est_fbase);
     if( gcd > 1 ) {
         est_frate /= gcd;
         est_fbase /= gcd;
--- a/mpegvideo_enc.c	Sat Jan 17 01:17:04 2009 +0000
+++ b/mpegvideo_enc.c	Sat Jan 17 11:13:33 2009 +0000
@@ -464,7 +464,7 @@
         avctx->b_frame_strategy = 0;
     }
 
-    i= ff_gcd(avctx->time_base.den, avctx->time_base.num);
+    i= av_gcd(avctx->time_base.den, avctx->time_base.num);
     if(i > 1){
         av_log(avctx, AV_LOG_INFO, "removing common factors from framerate\n");
         avctx->time_base.den /= i;
--- a/snow.c	Sat Jan 17 01:17:04 2009 +0000
+++ b/snow.c	Sat Jan 17 11:13:33 2009 +0000
@@ -4773,7 +4773,7 @@
                 }
                 error= (int)(sqrt(error)+0.5);
                 errors[level][orientation]= error;
-                if(g) g=ff_gcd(g, error);
+                if(g) g=av_gcd(g, error);
                 else g= error;
             }
         }
--- a/utils.c	Sat Jan 17 01:17:04 2009 +0000
+++ b/utils.c	Sat Jan 17 11:13:33 2009 +0000
@@ -694,7 +694,7 @@
                          display_aspect_ratio.num, display_aspect_ratio.den);
             }
             if(av_log_get_level() >= AV_LOG_DEBUG){
-                int g= ff_gcd(enc->time_base.num, enc->time_base.den);
+                int g= av_gcd(enc->time_base.num, enc->time_base.den);
                 snprintf(buf + strlen(buf), buf_size - strlen(buf),
                      ", %d/%d",
                      enc->time_base.num/g, enc->time_base.den/g);