[FFmpeg-cvslog] The lt and lte functions were swapped.

maxlazarov git at videolan.org
Sun Apr 1 11:18:24 CEST 2012


ffmpeg | branch: master | maxlazarov <mlazarov at gmail.com> | Fri Mar 30 11:23:36 2012 -0700| [7a3df014b9ba134aff85cb2778daebd497d8c79a] | committer: Michael Niedermayer

The lt and lte functions were swapped.

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

 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 43c70f3..ceae2ed 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -378,8 +378,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 67b107a..1931650 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