libavcodec/eval.h File Reference

eval header. More...

Go to the source code of this file.

Typedefs

typedef struct ff_expr_s AVEvalExpr

Functions

double ff_eval2 (const char *s, const double *const_value, const char *const *const_name, double(**func1)(void *, double), const char **func1_name, double(**func2)(void *, double, double), const char **func2_name, void *opaque, const char **error)
 Parses and evaluates an expression.
AVEvalExprff_parse (const char *s, const char *const *const_name, double(**func1)(void *, double), const char **func1_name, double(**func2)(void *, double, double), const char **func2_name, const char **error)
 Parses a expression.
double ff_parse_eval (AVEvalExpr *e, const double *const_value, void *opaque)
 Evaluates a previously parsed expression.
void ff_eval_free (AVEvalExpr *e)


Detailed Description

eval header.

Definition in file eval.h.


Typedef Documentation

typedef struct ff_expr_s AVEvalExpr

Definition at line 50 of file eval.h.


Function Documentation

double ff_eval2 ( const char *  s,
const double *  const_value,
const char *const *  const_name,
double(**)(void *, double)  func1,
const char **  func1_name,
double(**)(void *, double, double)  func2,
const char **  func2_name,
void *  opaque,
const char **  error 
)

Parses and evaluates an expression.

Note, this is significantly slower than ff_parse_eval()

Parameters:
s expression as a zero terminated string for example "1+2^3+5*5+sin(2/3)"
func1 NULL terminated array of function pointers for functions which take 1 argument
func2 NULL terminated array of function pointers for functions which take 2 arguments
const_name NULL terminated array of zero terminated strings of constant identifers for example {"PI", "E", 0}
func1_name NULL terminated array of zero terminated strings of func1 identifers
func2_name NULL terminated array of zero terminated strings of func2 identifers
error pointer to a char* which is set to an error message if something goes wrong
const_value a zero terminated array of values for the identifers from const_name
opaque a pointer which will be passed to all functions from func1 and func2
Returns:
the value of the expression

Definition at line 415 of file eval.c.

Referenced by av_set_string3().

void ff_eval_free ( AVEvalExpr e  ) 

Definition at line 187 of file eval.c.

Referenced by ff_eval2(), ff_eval_free(), ff_parse(), ff_rate_control_uninit(), parse_primary(), and Release().

AVEvalExpr* ff_parse ( const char *  s,
const char *const *  const_name,
double(**)(void *, double)  func1,
const char **  func1_name,
double(**)(void *, double, double)  func2,
const char **  func2_name,
const char **  error 
)

Parses a expression.

Parameters:
s expression as a zero terminated string for example "1+2^3+5*5+sin(2/3)"
func1 NULL terminated array of function pointers for functions which take 1 argument
func2 NULL terminated array of function pointers for functions which take 2 arguments
const_name NULL terminated array of zero terminated strings of constant identifers for example {"PI", "E", 0}
func1_name NULL terminated array of zero terminated strings of func1 identifers
func2_name NULL terminated array of zero terminated strings of func2 identifers
error pointer to a char* which is set to an error message if something goes wrong
Returns:
AVEvalExpr which must be freed with ff_eval_free by the user when it is not needed anymore NULL if anything went wrong

Definition at line 378 of file eval.c.

Referenced by Configure(), ff_eval2(), and ff_rate_control_init().

double ff_parse_eval ( AVEvalExpr e,
const double *  const_value,
void *  opaque 
)

Evaluates a previously parsed expression.

Parameters:
const_value a zero terminated array of values for the identifers from ff_parse const_name
opaque a pointer which will be passed to all functions from func1 and func2
Returns:
the value of the expression

Definition at line 407 of file eval.c.

Referenced by ff_eval2(), get_qscale(), and Process().


Generated on Fri Oct 26 02:35:43 2012 for FFmpeg by  doxygen 1.5.8