[FFmpeg-devel] [PATCH 09/21] Rename ff_parse_eval() to ff_eval_expr().
Stefano Sabatini
stefano.sabatini-lala
Sun Apr 11 01:01:34 CEST 2010
The new name expresses better what the function does.
---
libavcodec/eval.c | 4 ++--
libavcodec/eval.h | 4 ++--
libavcodec/ratecontrol.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/libavcodec/eval.c b/libavcodec/eval.c
index b687209..9ca1b91 100644
--- a/libavcodec/eval.c
+++ b/libavcodec/eval.c
@@ -459,7 +459,7 @@ end:
return ret;
}
-double ff_parse_eval(AVExpr * e, const double *const_value, void *opaque) {
+double ff_eval_expr(AVExpr * e, const double *const_value, void *opaque) {
Parser p;
p.const_value= const_value;
@@ -478,7 +478,7 @@ double ff_eval2(const char *s, const double *const_value, const char * const *co
*error = "Error occurred during parsing, check log";
return NAN;
}
- d = ff_parse_eval(e, const_value, opaque);
+ d = ff_eval_expr(e, const_value, opaque);
ff_free_expr(e);
return d;
}
diff --git a/libavcodec/eval.h b/libavcodec/eval.h
index d2e7ac7..c66d9dc 100644
--- a/libavcodec/eval.h
+++ b/libavcodec/eval.h
@@ -32,7 +32,7 @@ typedef struct AVExpr AVExpr;
/**
* Parses and evaluates an expression.
- * Note, this is significantly slower than ff_parse_eval()
+ * Note, this is significantly slower than ff_eval_expr().
* @param s expression as a zero terminated string for example "1+2^3+5*5+sin(2/3)"
* @param func1 NULL terminated array of function pointers for functions which take 1 argument
* @param func2 NULL terminated array of function pointers for functions which take 2 arguments
@@ -73,7 +73,7 @@ int ff_parse_expr(AVExpr **expr, const char *s, const char * const *const_name,
* @param opaque a pointer which will be passed to all functions from func1 and func2
* @return the value of the expression
*/
-double ff_parse_eval(AVExpr * e, const double *const_value, void *opaque);
+double ff_eval_expr(AVExpr * e, const double *const_value, void *opaque);
/**
* Frees an expression previously parsed with ff_parse_expr().
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 2441728..3040967 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -338,7 +338,7 @@ static double get_qscale(MpegEncContext *s, RateControlEntry *rce, double rate_f
0
};
- bits= ff_parse_eval(rcc->rc_eq_eval, const_values, rce);
+ bits= ff_eval_expr(rcc->rc_eq_eval, const_values, rce);
if (isnan(bits)) {
av_log(s->avctx, AV_LOG_ERROR, "Error evaluating rc_eq \"%s\"\n", s->avctx->rc_eq);
return -1;
--
1.7.0
More information about the ffmpeg-devel
mailing list