[FFmpeg-cvslog] eval: fix swapping of lt() and lte()

Max Lazarov git at videolan.org
Tue Oct 16 16:36:04 CEST 2012


ffmpeg | branch: release/0.10 | Max Lazarov <mlazarov at gmail.com> | Fri Mar 30 23:56:56 2012 -0700| [25a1a5b1b38ba86501cea51c961c10a46ecb49f1] | committer: Anton Khirnov

eval: fix swapping of lt() and lte()

CC: libav-stable at libav.org
(cherry picked from commit caac3ab6efde4fc9769e8a7472269356f262970a)

Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 libavutil/eval.c    |    4 ++--
 tests/ref/fate/eval |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavutil/eval.c b/libavutil/eval.c
index 9941ed7..44d1428 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -277,8 +277,8 @@ static int parse_primary(AVExpr **e, Parser *p)
     else if (strmatch(next, "eq"    )) d->type = e_eq;
     else if (strmatch(next, "gte"   )) d->type = e_gte;
     else if (strmatch(next, "gt"    )) d->type = e_gt;
-    else if (strmatch(next, "lte"   )) { AVExpr *tmp = d->param[1]; d->param[1] = d->param[0]; d->param[0] = tmp; d->type = e_gt; }
-    else if (strmatch(next, "lt"    )) { AVExpr *tmp = d->param[1]; d->param[1] = d->param[0]; d->param[0] = tmp; d->type = e_gte; }
+    else if (strmatch(next, "lte"   )) { AVExpr *tmp = d->param[1]; d->param[1] = d->param[0]; d->param[0] = tmp; d->type = e_gte; }
+    else if (strmatch(next, "lt"    )) { AVExpr *tmp = d->param[1]; d->param[1] = d->param[0]; d->param[0] = tmp; d->type = e_gt; }
     else if (strmatch(next, "ld"    )) d->type = e_ld;
     else if (strmatch(next, "isnan" )) d->type = e_isnan;
     else if (strmatch(next, "st"    )) d->type = e_st;
diff --git a/tests/ref/fate/eval b/tests/ref/fate/eval
index ef50292..c16527c 100644
--- a/tests/ref/fate/eval
+++ b/tests/ref/fate/eval
@@ -95,16 +95,16 @@ Evaluating 'st(1, 123); ld(1)'
 'st(1, 123); ld(1)' -> 123.000000
 
 Evaluating 'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)'
-'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)' -> 4950.000000
+'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)' -> 5050.000000
 
 Evaluating 'st(1, 1); st(2, 2); st(0, 1); while(lte(ld(0),10), st(3, ld(1)+ld(2)); st(1, ld(2)); st(2, ld(3)); st(0, ld(0)+1)); ld(3)'
-'st(1, 1); st(2, 2); st(0, 1); while(lte(ld(0),10), st(3, ld(1)+ld(2)); st(1, ld(2)); st(2, ld(3)); st(0, ld(0)+1)); ld(3)' -> 144.000000
+'st(1, 1); st(2, 2); st(0, 1); while(lte(ld(0),10), st(3, ld(1)+ld(2)); st(1, ld(2)); st(2, ld(3)); st(0, ld(0)+1)); ld(3)' -> 233.000000
 
 Evaluating 'while(0, 10)'
 'while(0, 10)' -> nan
 
 Evaluating 'st(0, 1); while(lte(ld(0),100), st(1, ld(1)+ld(0)); st(0, ld(0)+1))'
-'st(0, 1); while(lte(ld(0),100), st(1, ld(1)+ld(0)); st(0, ld(0)+1))' -> 100.000000
+'st(0, 1); while(lte(ld(0),100), st(1, ld(1)+ld(0)); st(0, ld(0)+1))' -> 101.000000
 
 Evaluating 'isnan(1)'
 'isnan(1)' -> 0.000000



More information about the ffmpeg-cvslog mailing list