]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/eval.h
mpeg4videoenc: restore macro parentheses
[ffmpeg] / libavutil / eval.h
index 38b4c25ce5ded88ee34c2838cfa1b9b78f956848..ccb29e7a336f1df7ecab71bd63d83f929d8ad0fe 100644 (file)
@@ -1,20 +1,20 @@
 /*
  * Copyright (c) 2002 Michael Niedermayer <michaelni@gmx.at>
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #ifndef AVUTIL_EVAL_H
 #define AVUTIL_EVAL_H
 
+#include "avutil.h"
+
 typedef struct AVExpr AVExpr;
 
 /**
- * Parses and evaluates an expression.
- * Note, this is significantly slower than av_eval_expr().
+ * Parse and evaluate an expression.
+ * Note, this is significantly slower than av_expr_eval().
  *
  * @param res a pointer to a double where is put the result value of
  * the expression, or NAN in case of error
@@ -46,18 +48,18 @@ typedef struct AVExpr AVExpr;
  * @return 0 in case of success, a negative value corresponding to an
  * AVERROR code otherwise
  */
-int av_parse_and_eval_expr(double *res, const char *s,
+int av_expr_parse_and_eval(double *res, const char *s,
                            const char * const *const_names, const double *const_values,
                            const char * const *func1_names, double (* const *funcs1)(void *, double),
                            const char * const *func2_names, double (* const *funcs2)(void *, double, double),
                            void *opaque, int log_offset, void *log_ctx);
 
 /**
- * Parses an expression.
+ * Parse an expression.
  *
  * @param expr a pointer where is put an AVExpr containing the parsed
- * value in case of successfull parsing, or NULL otherwise.
- * The pointed to AVExpr must be freed with av_free_expr() by the user
+ * value in case of successful parsing, or NULL otherwise.
+ * The pointed to AVExpr must be freed with av_expr_free() by the user
  * when it is not needed anymore.
  * @param s expression as a zero terminated string, for example "1+2^3+5*5+sin(2/3)"
  * @param const_names NULL terminated array of zero terminated strings of constant identifiers, for example {"PI", "E", 0}
@@ -69,28 +71,28 @@ int av_parse_and_eval_expr(double *res, const char *s,
  * @return 0 in case of success, a negative value corresponding to an
  * AVERROR code otherwise
  */
-int av_parse_expr(AVExpr **expr, const char *s,
+int av_expr_parse(AVExpr **expr, const char *s,
                   const char * const *const_names,
                   const char * const *func1_names, double (* const *funcs1)(void *, double),
                   const char * const *func2_names, double (* const *funcs2)(void *, double, double),
                   int log_offset, void *log_ctx);
 
 /**
- * Evaluates a previously parsed expression.
+ * Evaluate a previously parsed expression.
  *
- * @param const_values a zero terminated array of values for the identifiers from av_parse_expr() const_names
+ * @param const_values a zero terminated array of values for the identifiers from av_expr_parse() const_names
  * @param opaque a pointer which will be passed to all functions from funcs1 and funcs2
  * @return the value of the expression
  */
-double av_eval_expr(AVExpr *e, const double *const_values, void *opaque);
+double av_expr_eval(AVExpr *e, const double *const_values, void *opaque);
 
 /**
- * Frees a parsed expression previously created with av_parse_expr().
+ * Free a parsed expression previously created with av_expr_parse().
  */
-void av_free_expr(AVExpr *e);
+void av_expr_free(AVExpr *e);
 
 /**
- * Parses the string in numstr and returns its value as a double. If
+ * Parse the string in numstr and return its value as a double. If
  * the string is empty, contains only whitespaces, or does not contain
  * an initial substring that has the expected syntax for a
  * floating-point number, no conversion is performed. In this case,