Commit Graph

30 Commits

Author SHA1 Message Date
Michael Niedermayer b50bd69516 avutil/eval-test: Check av_expr_parse_and_eval() for failure and also check it in the fate test
Fixes CID1361940

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-20 19:32:02 +02:00
Stefano Sabatini f3e886c7df lavu/eval: add clip function 2014-07-17 11:29:01 +02:00
Clément Bœsch 77f60f0011 lavu/eval: add between() function. 2013-03-22 09:20:45 +01:00
Stefano Sabatini 72a1257b5b tests/eval: fix reference after b2098d2417
+10l to me, I blame the aliens.
2013-03-17 02:04:45 +01:00
Stefano Sabatini b2098d2417 lavu/eval: add bitor and bitand functions
Warning note suggested by Reimar.
2013-03-17 00:22:47 +01:00
Michael Niedermayer 29c8619a49 fate: add print() to the tests of eval
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-17 17:36:27 +01:00
Stefano Sabatini 2ed0803c6c lavu/eval: extend if/ifnot functions to accept a third parameter
Add support to an if/else construct, simplify logic in expressions.
2013-01-24 12:19:01 +01:00
Michael Niedermayer 15784c2bab Merge commit '9d5c62ba5b586c80af508b5914934b1c439f6652'
* commit '9d5c62ba5b586c80af508b5914934b1c439f6652':
  lavu/opt: do not filter out the initial sign character except for flags
  eval: treat dB as decibels instead of decibytes
  float_dsp: add vector_dmul_scalar() to multiply a vector of doubles

Conflicts:
	libavutil/eval.c
	tests/ref/fate/eval

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-06 14:33:38 +01:00
Justin Ruggles 5312268b34 eval: treat dB as decibels instead of decibytes 2012-12-05 11:23:36 -05:00
Michael Niedermayer 25a21c587c eval-test: add some otherwise untested functions.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-01 00:32:15 +01:00
Michael Niedermayer 39afcf1d7e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  eval: add gt(), gte(), lt() and lte() fate tests
  eval: fix swapping of lt() and lte()
  imgconvert: deprecate avcodec_find_best_pix_fmt()
  imgconvert: add avcodec_find_best_pix_fmt2()
  imgconvert: avoid undefined left shift in avcodec_find_best_pix_fmt

Conflicts:
	libavcodec/imgconvert.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-15 01:23:16 +02:00
Janne Grunau 2d497c141d eval: add gt(), gte(), lt() and lte() fate tests 2012-07-14 13:43:10 +02:00
Max Lazarov caac3ab6ef eval: fix swapping of lt() and lte()
CC: libav-stable@libav.org
2012-07-14 13:33:25 +02:00
Michael Niedermayer 039e9fe01c Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  lavfi: reclassify showfiltfmts as a TESTPROG
  graph2dot: fix printf format specifier
  swscale: yuv2planeX 8bit >=sse2 functions need aligned stack on x86-32.
  vp8: loopfilter >=sse2 functions need aligned stack on x86-32.
  amr: remove shift out of the AMR_BIT() macro.
  dsputilenc: group yasm and inline asm function pointer assignment.
  mov: use forward declaration of a function instead of a table.
  Clarify Doxygen comment for FF_API_* #defines.
  configure: simplify get_version()
  Create version.h headers for libraries that lack them
  gitignore: Use full path instead of relative path to specify patterns
  mpegvideo: remove VLAs
  Add XTEA encryption support in libavutil
  Add Blowfish encryption support in libavutil
  eval: Add the isinf() function and tests for it
  flacdec: move lpc filter to flacdsp
  flacdec: split off channel decorrelation as flacdsp
  avplay: Add an option for not limiting the input buffer size
  FATE: add a test for WMA cover art.
  FATE: add a test for apetag cover art
  ...

Conflicts:
	.gitignore
	configure
	ffplay.c
	libavcodec/Makefile
	libavcodec/error_resilience.c
	libavcodec/mpegvideo.c
	libavcodec/ratecontrol.c
	libavdevice/avdevice.h
	libavfilter/Makefile
	libavfilter/filtfmts.c
	libavfilter/version.h
	libavformat/mov.c
	libavformat/version.h
	libavutil/Makefile
	libavutil/avutil.h
	libavutil/version.h
	libswscale/swscale.h
	libswscale/x86/swscale_mmx.c
	tests/fate/libavutil.mak
	tests/lavfi-regression.sh
	tools/graph2dot.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-04 21:03:28 +02:00
Martin Storsjö 143f1e9203 eval: Add the isinf() function and tests for it
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-04 15:10:56 +03:00
maxlazarov 7a3df014b9 The lt and lte functions were swapped. 2012-04-01 11:01:08 +02:00
Michael Niedermayer 59affed23c eval: add root() to solve f(x)=0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-27 00:00:55 +01:00
Michael Niedermayer 923092697a eval: Allow specifying the variable id.
Reviewed-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-26 22:12:17 +01:00
Michael Niedermayer 43b1943a55 eval: Add taylor series evaluation support.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-22 23:09:47 +01:00
Stefano Sabatini 999495734b lavu/eval: add if() and ifnot() eval functions
They allow to implement the if/then/else logic, which cannot be
implemented otherwise.

For example the expression:
A*B + not(A)*C

always evaluates to NaN if B is NaN, even in the case where A is 0.
2012-01-17 12:03:30 +01:00
Michael Niedermayer 28d3738428 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Add LATM demuxer
  avplay: flush audio decoder with empty packets at EOF if the decoder has CODEC_CAP_DELAY set.
  8svx/iff: fix decoding of compressed stereo 8svx files.
  8svx: log an error message if output buffer is too small
  8svx: check packet size before reading the initial sample value.
  8svx: output 8-bit samples instead of 16-bit.
  8svx: split delta decoding into a separate function.
  mp4: Don't read an empty Decoder Config Descriptor
  fate.sh: Ignore errors from rm command during cleanup.
  fate.sh: Run git-pull in quiet mode to avoid console spam.
  Apple ProRes decoder
  rtmp: Make the input FLV parser handle data cut at any point
  rv34: Check for invalid slices offsets
  eval: test isnan(sqrt(-1)) instead of just sqrt(-1)

Conflicts:
	Changelog
	libavcodec/8svx.c
	libavcodec/proresdec.c
	libavcodec/version.h
	libavformat/iff.c
	libavformat/version.h
	tests/ref/fate/eval

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 00:35:31 +02:00
Anton Khirnov 775af761a0 eval: test isnan(sqrt(-1)) instead of just sqrt(-1)
sqrt(-1) returns "some NaN", it's not specified which exactly.
2011-09-22 08:13:55 +02:00
Stefano Sabatini 8cee38a298 eval: implement not() expression 2011-09-19 12:38:34 +02:00
Stefano Sabatini 9bc393908a eval: add sqrt function for computing the square root 2011-09-19 12:38:14 +02:00
Michael Niedermayer c3b6cc61e5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ffserver: remove unused variable.
  Remove unused and outdated TODO file.
  gitignore: Drop individual .d ignore; it is already covered by a wildcard.
  lavf: deprecate AVStream.quality.
  bink: pass Bink version to audio decoder through extradata instead of codec_tag.
  libpostproc: Remove disabled code.
  flashsv: improve some comments and fix some wrong ones
  flashsv: Eliminate redundant variable indirection.
  flashsv: set reference frame type to full frame
  flashsv: replace bitstream description by a link to the specification
  flashsv: convert a debug av_log into av_dlog
  flashsv: simplify condition
  flashsv: return more meaningful error values
  flashsv: cosmetics: break some overly long lines
  flashsv: cosmetics: drop some unnecessary parentheses
  swscale: amend documentation to mention use of native depth for scaling.
  eval: add missing comma to tests.
  eval: fix memleak.
  H.264: make loopfilter bS const where applicable

Conflicts:
	libavcodec/binkaudio.c
	libavformat/bink.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-06 23:57:11 +02:00
Ronald S. Bultje dfd8116986 eval: add missing comma to tests. 2011-07-05 18:18:11 -07:00
Michael Niedermayer 16a565d0cb eval/fate: try to fix nan printing format failures.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-05 10:46:11 +02:00
Michael Niedermayer 5d4fd1d1ad Merge remote-tracking branch 'qatar/master'
* qatar/master: (36 commits)
  ARM: allow unaligned buffer in fixed-point NEON FFT4
  fate: test more FFT etc sizes
  dca: set AVCodecContext frame_size for DTS audio
  YASM: Shut up unused variable compiler warning with --disable-yasm.
  x86_32: Fix build on x86_32 with --disable-yasm.
  iirfilter: add fate test
  doxygen: Add qmul docs.
  ogg: propagate return values and return more meaningful error values
  H.264: fix overreads of qscale_table
  Remove unused static tables and static inline functions.
  eval: clear Parser instances before using
  dct-test: remove 'ref' function pointer from tables
  build: Remove deleted 'check' target from .PHONY list.
  oggdec: Abort Ogg header parsing when encountering a data packet.
  Add LGPL license boilerplate to files lacking it.
  mxfenc: small typo fix
  doxygen: Fix documentation for some VP8 functions.
  sha: use AV_RB32() instead of assuming buffer can be cast to uint32_t*
  des: allow unaligned input and output buffers
  aes: allow unaligned input and output buffers
  ...

Conflicts:
	libavcodec/dct-test.c
	libavcodec/libvpxenc.c
	libavcodec/x86/dsputil_mmx.c
	libavcodec/x86/h264_qpel_mmx.c
	libavfilter/x86/gradfun.c
	libavformat/oggdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-05 02:26:17 +02:00
Mans Rullgard 94350ab986 eval: clear Parser instances before using
This prevents random values from the stack being used as
"variables" in expressions.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 12:31:47 +01:00
Mans Rullgard 883fd9e393 eval: add fate test
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 10:26:24 +01:00