diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-05-15 19:18:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-05-15 19:18:02 +0200 |
commit | d46aada5c2c71b9b0a259e62699cab25837053b2 (patch) | |
tree | ab474244a6fda04d8a10d25201620cdaee11c3c6 /libavutil/eval.c | |
parent | 66b1f210c024a08ba00e4a730e64940d248b8717 (diff) | |
parent | 5a153604c930792aa7f00c55cbf3c470f582dfb7 (diff) | |
download | ffmpeg-d46aada5c2c71b9b0a259e62699cab25837053b2.tar.gz |
Merge branch 'master' into oldabi
* master: (403 commits)
Initial caf muxer.
Support decoding of amr_nb and gsm in caf.
Fix decoding of msrle samples with 1bpp.
udp: remove resource.h inclusion, it breaks mingw compilation.
ffmpeg: Allow seting and cycling through debug modes.
Fix FSF address copy paste error in some license headers.
Add an aac sample which uses LTP to fate-aac.
ffmpeg: Help for interactive keys.
UDP: dont use thread_t as truth value.
swscale: fix compile on mingw32
[PATCH] Update pixdesc_be fate refs after adding 9/10bit YUV420P formats.
arm: properly mark external symbol call
ffmpeg: Interactivity support. Try pressing +-hs.
swscale: 10l forgot git add this change from ronald.
AVFrame: only set parameters from AVCodecContext in decode_video*() when no frame reordering is used.
avcodec_default_get_buffer: init picture parameters.
swscale: properly inline bits/endianness in yuv2yuvX16inC().
swscale: fix clipping of 9/10bit YUV420P.
Add av_clip_uintp2() function
Support more QT 1bpp rawvideo files.
...
Conflicts:
libavcodec/flacenc.c
libavcodec/h261dec.c
libavcodec/h263dec.c
libavcodec/mpeg12.c
libavcodec/msrle.c
libavcodec/options.c
libavcodec/qpeg.c
libavcodec/rv34.c
libavcodec/svq1dec.c
libavcodec/svq3.c
libavcodec/vc1dec.c
libavcodec/version.h
libavfilter/avfilter.h
libavformat/file.c
libavformat/options.c
libavformat/rtpproto.c
libavformat/udp.c
libavutil/avutil.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/eval.c')
-rw-r--r-- | libavutil/eval.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavutil/eval.c b/libavutil/eval.c index 494b936c4b..98b4e0ac52 100644 --- a/libavutil/eval.c +++ b/libavutil/eval.c @@ -122,6 +122,7 @@ struct AVExpr { e_mod, e_max, e_min, e_eq, e_gt, e_gte, e_pow, e_mul, e_div, e_add, e_last, e_st, e_while, e_floor, e_ceil, e_trunc, + e_sqrt, } type; double value; // is sign in other types union { @@ -148,6 +149,7 @@ static double eval_expr(Parser *p, AVExpr *e) case e_floor: return e->value * floor(eval_expr(p, e->param[0])); case e_ceil : return e->value * ceil (eval_expr(p, e->param[0])); case e_trunc: return e->value * trunc(eval_expr(p, e->param[0])); + case e_sqrt: return e->value * sqrt (eval_expr(p, e->param[0])); case e_while: { double d = NAN; while (eval_expr(p, e->param[0])) @@ -282,6 +284,7 @@ static int parse_primary(AVExpr **e, Parser *p) else if (strmatch(next, "floor" )) d->type = e_floor; else if (strmatch(next, "ceil" )) d->type = e_ceil; else if (strmatch(next, "trunc" )) d->type = e_trunc; + else if (strmatch(next, "sqrt" )) d->type = e_sqrt; else { for (i=0; p->func1_names && p->func1_names[i]; i++) { if (strmatch(next, p->func1_names[i])) { @@ -449,6 +452,7 @@ static int verify_expr(AVExpr *e) case e_floor: case e_ceil: case e_trunc: + case e_sqrt: return verify_expr(e->param[0]); default: return verify_expr(e->param[0]) && verify_expr(e->param[1]); } @@ -628,6 +632,8 @@ int main(void) "trunc(-123.123)", "ceil(123.123)", "ceil(-123.123)", + "sqrt(1764)", + "sqrt(-1)", NULL }; |