[FFmpeg-cvslog] libavutil: Remove pointless rational test program.

Diego Biurrun git at videolan.org
Mon Mar 26 21:10:17 CEST 2012


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Thu Jan 26 18:45:11 2012 +0100| [80391552c9a308222dd3c75ec4174f962b1bf627] | committer: Diego Biurrun

libavutil: Remove pointless rational test program.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=80391552c9a308222dd3c75ec4174f962b1bf627
---

 libavutil/Makefile   |    2 +-
 libavutil/rational.c |   25 -------------------------
 2 files changed, 1 insertions(+), 26 deletions(-)

diff --git a/libavutil/Makefile b/libavutil/Makefile
index 03a4625..009094d 100644
--- a/libavutil/Makefile
+++ b/libavutil/Makefile
@@ -76,7 +76,7 @@ OBJS-$(ARCH_PPC) += ppc/cpu.o
 OBJS-$(ARCH_X86) += x86/cpu.o
 
 TESTPROGS = adler32 aes avstring base64 cpu crc des eval fifo lfg lls \
-            md5 opt parseutils rational sha tree
+            md5 opt parseutils sha tree
 
 DIRS = arm avr32 bfin mips ppc sh4 tomi x86
 
diff --git a/libavutil/rational.c b/libavutil/rational.c
index 3e62e1b..4770c54 100644
--- a/libavutil/rational.c
+++ b/libavutil/rational.c
@@ -144,28 +144,3 @@ int av_find_nearest_q_idx(AVRational q, const AVRational* q_list)
 
     return nearest_q_idx;
 }
-
-#ifdef TEST
-int main(void)
-{
-    AVRational a,b;
-    for (a.num = -2; a.num <= 2; a.num++) {
-        for (a.den = -2; a.den <= 2; a.den++) {
-            for (b.num = -2; b.num <= 2; b.num++) {
-                for (b.den = -2; b.den <= 2; b.den++) {
-                    int c = av_cmp_q(a,b);
-                    double d = av_q2d(a) == av_q2d(b) ?
-                               0 : (av_q2d(a) - av_q2d(b));
-                    if (d > 0)       d = 1;
-                    else if (d < 0)  d = -1;
-                    else if (d != d) d = INT_MIN;
-                    if (c != d)
-                        av_log(0, AV_LOG_ERROR, "%d/%d %d/%d, %d %f\n", a.num,
-                               a.den, b.num, b.den, c,d);
-                }
-            }
-        }
-    }
-    return 0;
-}
-#endif



More information about the ffmpeg-cvslog mailing list