Commit 60096e11 authored by stefano's avatar stefano

Rename ff_parse() to ff_parse_expr().

The new name is more expressive and fits better in the overall naming
scheme for the revisited eval API.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22858 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 37869ae3
...@@ -369,7 +369,7 @@ static int verify_expr(AVExpr * e) { ...@@ -369,7 +369,7 @@ static int verify_expr(AVExpr * e) {
} }
} }
AVExpr * ff_parse(const char *s, const char * const *const_name, AVExpr *ff_parse_expr(const char *s, const char * const *const_name,
double (**func1)(void *, double), const char **func1_name, double (**func1)(void *, double), const char **func1_name,
double (**func2)(void *, double, double), const char **func2_name, double (**func2)(void *, double, double), const char **func2_name,
const char **error){ const char **error){
...@@ -416,7 +416,7 @@ double ff_parse_and_eval_expr(const char *s, const double *const_value, const ch ...@@ -416,7 +416,7 @@ double ff_parse_and_eval_expr(const char *s, const double *const_value, const ch
double (**func1)(void *, double), const char **func1_name, double (**func1)(void *, double), const char **func1_name,
double (**func2)(void *, double, double), const char **func2_name, double (**func2)(void *, double, double), const char **func2_name,
void *opaque, const char **error){ void *opaque, const char **error){
AVExpr * e = ff_parse(s, const_name, func1, func1_name, func2, func2_name, error); AVExpr * e = ff_parse_expr(s, const_name, func1, func1_name, func2, func2_name, error);
double d; double d;
if (!e) return NAN; if (!e) return NAN;
d = ff_eval_expr(e, const_value, opaque); d = ff_eval_expr(e, const_value, opaque);
......
...@@ -61,7 +61,7 @@ double ff_parse_and_eval_expr(const char *s, const double *const_value, const ch ...@@ -61,7 +61,7 @@ double ff_parse_and_eval_expr(const char *s, const double *const_value, const ch
* @return AVExpr which must be freed with ff_free_expr() by the user when it is not needed anymore * @return AVExpr which must be freed with ff_free_expr() by the user when it is not needed anymore
* NULL if anything went wrong * NULL if anything went wrong
*/ */
AVExpr * ff_parse(const char *s, const char * const *const_name, AVExpr *ff_parse_expr(const char *s, const char * const *const_name,
double (**func1)(void *, double), const char **func1_name, double (**func1)(void *, double), const char **func1_name,
double (**func2)(void *, double, double), const char **func2_name, double (**func2)(void *, double, double), const char **func2_name,
const char **error); const char **error);
......
...@@ -107,7 +107,7 @@ int ff_rate_control_init(MpegEncContext *s) ...@@ -107,7 +107,7 @@ int ff_rate_control_init(MpegEncContext *s)
}; };
emms_c(); emms_c();
rcc->rc_eq_eval = ff_parse(s->avctx->rc_eq ? s->avctx->rc_eq : "tex^qComp", const_names, func1, func1_names, NULL, NULL, &error); rcc->rc_eq_eval = ff_parse_expr(s->avctx->rc_eq ? s->avctx->rc_eq : "tex^qComp", const_names, func1, func1_names, NULL, NULL, &error);
if (!rcc->rc_eq_eval) { if (!rcc->rc_eq_eval) {
av_log(s->avctx, AV_LOG_ERROR, "Error parsing rc_eq \"%s\": %s\n", s->avctx->rc_eq, error? error : ""); av_log(s->avctx, AV_LOG_ERROR, "Error parsing rc_eq \"%s\": %s\n", s->avctx->rc_eq, error? error : "");
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment