Commit Graph

70 Commits

Author SHA1 Message Date
Diego Biurrun ba87f0801d Remove explicit filename from Doxygen @file commands.
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
2010-04-20 14:45:34 +00:00
Stefano Sabatini fc7e2d34cf Fix constness for func[12] parameters in ff_parse_expr() and
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
2010-04-12 20:22:55 +00:00
Stefano Sabatini 82fdcd449c Change constness for func[12]_name parameters of ff_parse_expr() and
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
2010-04-12 19:21:19 +00:00
Stefano Sabatini 1235429c27 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.

Originally committed as revision 22858 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-12 19:21:15 +00:00
Stefano Sabatini 6c71d2c135 Remove unnecessary header inclusion directives.
Originally committed as revision 22857 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-12 19:21:08 +00:00
Stefano Sabatini a367be1e88 Rename ff_eval2() to ff_parse_and_eval_expr().
The new name better expresses what the function does.

Originally committed as revision 22845 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-11 22:32:04 +00:00
Stefano Sabatini 4565caf120 Rename ff_parse_eval() to ff_eval_expr().
The new name expresses better what the function does.

Originally committed as revision 22844 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-11 22:32:01 +00:00
Stefano Sabatini 8c21647382 Remove redundant file descriptions from copyright headers.
File description is only kept in the @file doxy.

Originally committed as revision 22840 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-11 20:04:11 +00:00
Stefano Sabatini a3731cadfc Avoid the use of the symbol ff_expr_s for referencing AVExpr.
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
2010-04-11 18:44:51 +00:00
Stefano Sabatini f8fea468b2 Rename ff_eval_free() to ff_free_expr().
Originally committed as revision 22834 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-11 11:47:33 +00:00
Stefano Sabatini 073f6d5b96 Rename AVEvalExpr to AVExpr, as suggested by Michael.
The new name is shorter and less confusing.

Originally committed as revision 22833 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-11 11:47:29 +00:00
Ramiro Polla 0345f36bbd eval: Check for return value of memory allocations.
Originally committed as revision 19827 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-12 17:59:19 +00:00
Måns Rullgård 0314dead4e eval: replace variable-length array with av_malloc/free
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
2009-08-19 21:59:40 +00:00
Måns Rullgård 87a920c6bf eval: include libavutil/mathematics.h for NAN and M_PI
Originally committed as revision 19613 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-10 01:27:33 +00:00
Måns Rullgård 9a88c1dfa8 eval: include our headers after system headers
Originally committed as revision 19612 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-10 01:27:30 +00:00
Stefano Sabatini 1c2744d139 Export av_strtod() to eval.h.
Originally committed as revision 19252 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-22 22:22:40 +00:00
Stefano Sabatini e877eaacf3 Cosmetics: rename 'name' av_strtod() param to 'numstr'. The new name
is more expressive.

Originally committed as revision 19249 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-21 21:37:05 +00:00
Diego Biurrun bad5537e2c Use full internal pathname in doxygen @file directives.
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
2009-02-01 02:00:19 +00:00
Anders Grönberg cac55c9196 Add a few const qualifiers in appropriate places.
patch by Anders Grönberg, galileo.m2 gmail com

Originally committed as revision 16120 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-14 12:24:50 +00:00
Diego Biurrun c2dec19420 Fix test program build: ff_eval was replaced by ff_eval2.
Originally committed as revision 15775 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-11-05 13:32:06 +00:00
Michael Niedermayer d578432db8 Remove stuff under #if LIBAVCODEC_VERSION_INT.
Originally committed as revision 15263 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-08 15:03:17 +00:00
Stefan Gehrer cf2baeb338 mark read-only data as const
Originally committed as revision 13947 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-06-24 20:01:31 +00:00
Stefano Sabatini cad2af9760 Improve parse_primary() error message.
Patch by Stefano Sabatini and Michael Niedermayer

Originally committed as revision 13218 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-21 17:50:42 +00:00
Aurelien Jacobs fbd4293df9 remove more useless mpegvideo.h includes
Originally committed as revision 12323 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-03-05 00:43:11 +00:00
Luca Abeni 6881b8e567 Fix
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
2008-02-15 12:04:35 +00:00
Michael Niedermayer 20e4beaef7 const
Originally committed as revision 11840 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-03 23:25:35 +00:00
Diego Biurrun e5b10e3174 Fix warnings in test code:
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
2008-01-22 09:20:25 +00:00
Diego Biurrun f8a80fd69d main() --> main(void)
Originally committed as revision 11079 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-11-23 00:52:56 +00:00
Diego Biurrun e5a389a1b7 license header consistency cosmetics
Originally committed as revision 9484 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-05 10:40:25 +00:00
Reimar Döffinger f66e4f5f9e Add av_ prefix to clip functions
Originally committed as revision 8122 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-02-25 10:27:12 +00:00
Luca Barbato a02142a50a fix a gcc warning, avoid an unnecessary operation
Originally committed as revision 7555 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-01-16 22:07:49 +00:00
Michael Niedermayer 3cedeeca02 update copyright year, it looks odd otherwise :)
Originally committed as revision 6830 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-28 20:18:18 +00:00
Oded Shimon b5c5a86bb7 I hope noone minds, adding myself to eval.c copyright...
Originally committed as revision 6827 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-28 18:30:20 +00:00
Oded Shimon 8cd68d8056 ignore whitespace in ff_eval
Originally committed as revision 6821 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-28 09:49:13 +00:00
Oded Shimon 72523c7a20 add missing 'e->value * '
Originally committed as revision 6819 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-28 08:03:30 +00:00
Oded Shimon 63a547eabc shut gcc warning, also makes sense for NAN to be returned if the loop was never executed
Originally committed as revision 6818 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-28 07:03:24 +00:00
Michael Niedermayer 45ee0e3282 add support for while() loops again ugly syntax while(condition, statements) but very simple implementation
Originally committed as revision 6814 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-27 22:35:55 +00:00
Michael Niedermayer 835954e3a4 support seperating expressons by ;
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
2006-10-27 22:16:25 +00:00
Oded Shimon d024359a36 possible bug of 'gte' being read as 'gt', same with 'lte'
Originally committed as revision 6811 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-27 21:37:47 +00:00
Michael Niedermayer 577eab6b62 minor simplification
Originally committed as revision 6810 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-27 21:13:31 +00:00
Michael Niedermayer a98f4515cf factorize AVEvalExpr alloc and init
Originally committed as revision 6809 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-27 20:38:10 +00:00
Oded Shimon 85b4eb08cc new optimized eval method, by seperating parsing and runtime
Originally committed as revision 6803 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-27 16:42:16 +00:00
Michael Niedermayer 2c409cc7af fix -a^b which was interpreted as (-a)^b
Originally committed as revision 6713 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-16 19:06:56 +00:00
Michael Niedermayer cacb17b47f asin() acos() atan()
Originally committed as revision 6712 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-16 18:36:44 +00:00
Michael Niedermayer 212d84881a mod()
Originally committed as revision 6710 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-16 15:01:12 +00:00
Diego Biurrun b78e7197a8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
and fix GPL/LGPL version mismatches.

Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-07 15:30:46 +00:00
Diego Biurrun 36c32bdddf Remove unused variables and the corresponding warnings along with them.
Originally committed as revision 6536 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-03 17:12:48 +00:00
Panagiotis Issaris 0ec6065a34 Break compatibility only when first part of version number changes, in this
specific case for ff_eval deprecation.

Originally committed as revision 6358 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-09-27 20:08:36 +00:00
Panagiotis Issaris 95c9943081 Make AVOption parsign code use ff_eval2()
Originally committed as revision 6357 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-09-27 20:01:39 +00:00
Panagiotis Issaris a2eb288ac7 Fix compilation by postponing deprecation of ff_eval() until the next version
increment.

Originally committed as revision 6352 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-09-27 11:09:35 +00:00