summaryrefslogtreecommitdiff
path: root/libavcodec/eval.c
Commit message (Collapse)AuthorAge
* Move eval.c and eval.h from libavcodec to libavutil, and make the evalStefano Sabatini2010-06-05
| | | | | | API public. Originally committed as revision 23485 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix eval-test compilation.Stefano Sabatini2010-06-01
| | | | Originally committed as revision 23406 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Cosmetics: reindent and break some overly long line.Stefano Sabatini2010-06-01
| | | | Originally committed as revision 23405 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Cosmetics: consistently apply K&R style.Stefano Sabatini2010-06-01
| | | | | | Make me and Diego happy. Originally committed as revision 23404 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Cosmetics: rename ff_parse_expr() and ff_parse_and_eval_expr() parameters:Stefano Sabatini2010-06-01
| | | | | | | | | | | | const_name -> const_names const_value -> const_values func[12]_name -> func[12]_names func[12] -> funcs[12] All these parameters contain a list of values, using plural names for them help understanding a little. Originally committed as revision 23403 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make ff_parse_expr() and ff_parse_and_eval_expr() return an intStefano Sabatini2010-06-01
| | | | | | | | | | | | containing an error code. Allow these functions to convey the reason of the failure to the calling function, failure which is not always due to a parsing error but it may depend for example on a memory problem. Also fix several potential memleaks. Originally committed as revision 23402 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change eval API to take parent log context and log level offset.Michael Niedermayer2010-05-19
| | | | | | this is based on stefanos work, especially all bugs are his fault ;) Originally committed as revision 23201 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change the order of parameters for ff_eval_expr() andStefano Sabatini2010-05-16
| | | | | | | | | | ff_parse_and_eval_expr(), place the names for constants/functions before the corresponding values. This looks more readable, as the user is expected to know the names before the values. Originally committed as revision 23149 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove explicit filename from Doxygen @file commands.Diego Biurrun2010-04-20
| | | | | | | | Passing an explicit filename to this command is only necessary if the documentation in the @file block refers to a file different from the one the block resides in. Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix constness for func[12] parameters in ff_parse_expr() andStefano Sabatini2010-04-12
| | | | | | | | | | | | | | | | | ff_parse_and_eval_expr(). Change func[12] attributes from "** func" to "* const * func". This is consistent with the semantics of the provided arrays of functions, which are not supposed to be changed by the ff_parse_* functions. Also fix the GCC compilation warnings: libavcodec/ratecontrol.c: In function ‘ff_rate_control_init’: libavcodec/ratecontrol.c:109: warning: passing argument 3 of ‘ff_parse_expr’ discards qualifiers from pointer target type libavcodec/eval.h:69: note: expected ‘double (**)(void *, double)’ but argument is of type ‘double (* const*)(void *, double)’ Originally committed as revision 22860 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change constness for func[12]_name parameters of ff_parse_expr() andStefano Sabatini2010-04-12
| | | | | | | | | ff_parse_and_eval_expr(). Change attribute from "const char **" to "const char * const *". The name arrays are not supposed to be changed by the function. Originally committed as revision 22859 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename ff_parse() to ff_parse_expr().Stefano Sabatini2010-04-12
| | | | | | | The new name is more expressive and fits better in the overall naming scheme for the revisited eval API. Originally committed as revision 22858 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove unnecessary header inclusion directives.Stefano Sabatini2010-04-12
| | | | Originally committed as revision 22857 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename ff_eval2() to ff_parse_and_eval_expr().Stefano Sabatini2010-04-11
| | | | | | The new name better expresses what the function does. Originally committed as revision 22845 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename ff_parse_eval() to ff_eval_expr().Stefano Sabatini2010-04-11
| | | | | | The new name expresses better what the function does. Originally committed as revision 22844 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove redundant file descriptions from copyright headers.Stefano Sabatini2010-04-11
| | | | | | File description is only kept in the @file doxy. Originally committed as revision 22840 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Avoid the use of the symbol ff_expr_s for referencing AVExpr.Stefano Sabatini2010-04-11
| | | | | | | | This way we have to deal only with struct AVExpr and AVExpr, which is slightly less confusing as the association between the two symbols is obvious. Originally committed as revision 22839 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename ff_eval_free() to ff_free_expr().Stefano Sabatini2010-04-11
| | | | Originally committed as revision 22834 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename AVEvalExpr to AVExpr, as suggested by Michael.Stefano Sabatini2010-04-11
| | | | | | The new name is shorter and less confusing. Originally committed as revision 22833 to svn://svn.ffmpeg.org/ffmpeg/trunk
* eval: Check for return value of memory allocations.Ramiro Polla2009-09-12
| | | | Originally committed as revision 19827 to svn://svn.ffmpeg.org/ffmpeg/trunk
* eval: replace variable-length array with av_malloc/freeMåns Rullgård2009-08-19
| | | | | | | | There is a theoretical possibility to pass a very long string to ff_parse, which could crash if allocated from the stack. This allows the allocation to be checked properly. Originally committed as revision 19670 to svn://svn.ffmpeg.org/ffmpeg/trunk
* eval: include libavutil/mathematics.h for NAN and M_PIMåns Rullgård2009-08-10
| | | | Originally committed as revision 19613 to svn://svn.ffmpeg.org/ffmpeg/trunk
* eval: include our headers after system headersMåns Rullgård2009-08-10
| | | | Originally committed as revision 19612 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Export av_strtod() to eval.h.Stefano Sabatini2009-06-22
| | | | Originally committed as revision 19252 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Cosmetics: rename 'name' av_strtod() param to 'numstr'. The new nameStefano Sabatini2009-06-21
| | | | | | is more expressive. Originally committed as revision 19249 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use full internal pathname in doxygen @file directives.Diego Biurrun2009-02-01
| | | | | | | Otherwise doxygen complains about ambiguous filenames when files exist under the same name in different subdirectories. Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add a few const qualifiers in appropriate places.Anders Grönberg2008-12-14
| | | | | | patch by Anders Grönberg, galileo.m2 gmail com Originally committed as revision 16120 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix test program build: ff_eval was replaced by ff_eval2.Diego Biurrun2008-11-05
| | | | Originally committed as revision 15775 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove stuff under #if LIBAVCODEC_VERSION_INT.Michael Niedermayer2008-09-08
| | | | Originally committed as revision 15263 to svn://svn.ffmpeg.org/ffmpeg/trunk
* mark read-only data as constStefan Gehrer2008-06-24
| | | | Originally committed as revision 13947 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Improve parse_primary() error message.Stefano Sabatini2008-05-21
| | | | | | Patch by Stefano Sabatini and Michael Niedermayer Originally committed as revision 13218 to svn://svn.ffmpeg.org/ffmpeg/trunk
* remove more useless mpegvideo.h includesAurelien Jacobs2008-03-05
| | | | Originally committed as revision 12323 to svn://svn.ffmpeg.org/ffmpeg/trunk
* FixLuca Abeni2008-02-15
| | | | | | | utils.c: In function ‘avcodec_get_context_defaults2’: utils.c:793: warning: assignment discards qualifiers from pointer target type Originally committed as revision 11938 to svn://svn.ffmpeg.org/ffmpeg/trunk
* constMichael Niedermayer2008-02-03
| | | | Originally committed as revision 11840 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix warnings in test code:Diego Biurrun2008-01-22
| | | | | | | eval.c:454: warning: return type defaults to 'int' eval.c:464: warning: control reaches end of non-void function Originally committed as revision 11594 to svn://svn.ffmpeg.org/ffmpeg/trunk
* main() --> main(void)Diego Biurrun2007-11-23
| | | | Originally committed as revision 11079 to svn://svn.ffmpeg.org/ffmpeg/trunk
* license header consistency cosmeticsDiego Biurrun2007-07-05
| | | | Originally committed as revision 9484 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add av_ prefix to clip functionsReimar Döffinger2007-02-25
| | | | Originally committed as revision 8122 to svn://svn.ffmpeg.org/ffmpeg/trunk
* fix a gcc warning, avoid an unnecessary operationLuca Barbato2007-01-16
| | | | Originally committed as revision 7555 to svn://svn.ffmpeg.org/ffmpeg/trunk
* update copyright year, it looks odd otherwise :)Michael Niedermayer2006-10-28
| | | | Originally committed as revision 6830 to svn://svn.ffmpeg.org/ffmpeg/trunk
* I hope noone minds, adding myself to eval.c copyright...Oded Shimon2006-10-28
| | | | Originally committed as revision 6827 to svn://svn.ffmpeg.org/ffmpeg/trunk
* ignore whitespace in ff_evalOded Shimon2006-10-28
| | | | Originally committed as revision 6821 to svn://svn.ffmpeg.org/ffmpeg/trunk
* add missing 'e->value * 'Oded Shimon2006-10-28
| | | | Originally committed as revision 6819 to svn://svn.ffmpeg.org/ffmpeg/trunk
* shut gcc warning, also makes sense for NAN to be returned if the loop was ↵Oded Shimon2006-10-28
| | | | | | never executed Originally committed as revision 6818 to svn://svn.ffmpeg.org/ffmpeg/trunk
* add support for while() loops again ugly syntax while(condition, statements) ↵Michael Niedermayer2006-10-27
| | | | | | but very simple implementation Originally committed as revision 6814 to svn://svn.ffmpeg.org/ffmpeg/trunk
* support seperating expressons by ;Michael Niedermayer2006-10-27
| | | | | | support variables, the syntax isnt beautifull (st(a,b) means var[a]=b and ld(a) var[a]) but for a mere 19 lines of code its fairly simple, if anyone wants to write real variables support with names for variables and = and [] then that would of course be welcome but only if it doesnt bloat the code up terribly...) Originally committed as revision 6813 to svn://svn.ffmpeg.org/ffmpeg/trunk
* possible bug of 'gte' being read as 'gt', same with 'lte'Oded Shimon2006-10-27
| | | | Originally committed as revision 6811 to svn://svn.ffmpeg.org/ffmpeg/trunk
* minor simplificationMichael Niedermayer2006-10-27
| | | | Originally committed as revision 6810 to svn://svn.ffmpeg.org/ffmpeg/trunk
* factorize AVEvalExpr alloc and initMichael Niedermayer2006-10-27
| | | | Originally committed as revision 6809 to svn://svn.ffmpeg.org/ffmpeg/trunk
* new optimized eval method, by seperating parsing and runtimeOded Shimon2006-10-27
| | | | Originally committed as revision 6803 to svn://svn.ffmpeg.org/ffmpeg/trunk