summaryrefslogtreecommitdiffstats
path: root/libavfilter
Commit message (Collapse)AuthorAgeFilesLines
* lavfi/fifo: do not assume request_frame() returns a frame.Nicolas George2015-11-071-2/+4
|
* lavfi/avf_concat: return immediately after requesting a frame on input.Nicolas George2015-11-071-3/+2
|
* lavfi: remove astreamsync.Nicolas George2015-11-073-245/+0
| | | | | It was only useful for very specific testing purposes and appears to be currently partially broken.
* lavfi: add realtime filter.Nicolas George2015-11-073-0/+136
| | | | | Similar to the -re option in ffmpeg that only works for input files. Can be used at any place in the filter graph.
* lavfi: add testsrc2 test source.Nicolas George2015-11-073-0/+273
| | | | | | | | Similar to testsrc, but using drawutils and therefore supporting a lot of pixel formats instead of just rgb24. This allows using it as input for other tests without requiring a format conversion. It is also slightly faster than testsrc for some reason.
* avfilter/showcqt: remove yuv offsetMuhammad Faiz2015-11-031-36/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | this makes draw_bar faster slightly different result with old version check result (with ~3 minutes audio file): old: real 0m49.611s user 0m49.260s sys 0m0.073s new: real 0m47.606s user 0m47.378s sys 0m0.068s PSNR between old and new: yuv444p PSNR y:109.519298 u:107.506485 v:104.746878 average:106.816074 min:99.167305 max:inf yuv422p PSNR y:109.519298 u:108.025801 v:104.489734 average:107.279817 min:98.007467 max:inf yuv420p PSNR y:109.519298 u:108.363875 v:105.290200 average:108.261511 min:97.461812 max:inf Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* all: use FFDIFFSIGN to resolve possible undefined behavior in comparatorsGanesh Ajjanagadde2015-11-034-11/+5
| | | | | | | | | | | | | | | | | | | FFDIFFSIGN was created explicitly for this purpose, since the common return a - b idiom is unsafe regarding overflow on signed integers. It optimizes to branchless code on common compilers. FFDIFFSIGN also has the subjective benefit of being easier to read due to lack of ternary operators. Tested with FATE. Things not covered by this are unsigned integers, for which overflows are well defined, and also places where overflow is clearly impossible, e.g an instance where the a - b was being done on 24 bit values. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/vf_rotate: correct log messageGanesh Ajjanagadde2015-11-031-2/+2
| | | | | | | There seems to be some typos in the log messages that are fixed by this. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/vf_frei0r: use av_strtod instead of strtod for added flexibilityGanesh Ajjanagadde2015-11-021-1/+2
| | | | | | | | | This converts the usage of strtod to av_strtod in order to unify and make number parsing more consistent. This also adds support for SI postfixes. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* vf_boxblur: Templatize blur{8,16}Timothy Gu2015-11-011-66/+44
| | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_deshake: replace qsort with AV_QSORTGanesh Ajjanagadde2015-10-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qsort is called indirectly in filter_frame, suggesting its performance criticality. AV_QSORT is substantially faster due to the inlining of the comparison callback. Thus, the increase in performance should be worth the increase in binary size. This optimization is just a low hanging fruit. The trac ticket 1430 is a request for an improved deshake filter. Sample benchmark (x86-64, Haswell, GNU/Linux): File: original from https://trac.ffmpeg.org/ticket/1430 command: ffmpeg -stream_loop 8 -i file.webm -vf deshake=rx=64:ry=64 -f null - Timer truncated at 1024 runs. new: 28260 decicycles in qsort, 1 runs, 0 skips 35570 decicycles in qsort, 2 runs, 0 skips 39010 decicycles in qsort, 4 runs, 0 skips 46897 decicycles in qsort, 8 runs, 0 skips 40442 decicycles in qsort, 16 runs, 0 skips 41611 decicycles in qsort, 32 runs, 0 skips 40345 decicycles in qsort, 64 runs, 0 skips 38967 decicycles in qsort, 128 runs, 0 skips 38647 decicycles in qsort, 256 runs, 0 skips 40238 decicycles in qsort, 512 runs, 0 skips 39676 decicycles in qsort, 1024 runs, 0 skips old: 1740280 decicycles in qsort, 1 runs, 0 skips 923560 decicycles in qsort, 2 runs, 0 skips 511330 decicycles in qsort, 4 runs, 0 skips 309720 decicycles in qsort, 8 runs, 0 skips 194900 decicycles in qsort, 16 runs, 0 skips 142686 decicycles in qsort, 32 runs, 0 skips 112516 decicycles in qsort, 64 runs, 0 skips 98166 decicycles in qsort, 128 runs, 0 skips 88147 decicycles in qsort, 256 runs, 0 skips 88706 decicycles in qsort, 512 runs, 0 skips 86783 decicycles in qsort, 1024 runs, 0 skips Reviewed-by: Nicolas George <george@nsup.org> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/avf_showcqt: Replace all fmin* and fmax* by FFMIN/FFMAXMichael Niedermayer2015-10-311-8/+8
| | | | | | | | Should fix build on x86_32-msvc2012 The alternative of emulating fmin/fmax* turns out to be non trivial Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/showcqt: fix dependency with avformatMuhammad Faiz2015-10-301-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* vf_lut: Add support for RGB48 and RGBA64.Steven Robertson2015-10-301-2/+48
| | | | | | Signed-off-by: Steven Robertson <steven@strobe.cc> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/avf_showvolume: use log10 instead of log()/M_LN10Ganesh Ajjanagadde2015-10-291-1/+1
| | | | | | | This is likely more precise and conveys the intent better. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/vf_ssim: use log10 instead of log()/log(10)Ganesh Ajjanagadde2015-10-291-1/+1
| | | | | | | This is likely more precise and conveys the intent better. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/avf_showspectrum: use log10 instead of log()/...Ganesh Ajjanagadde2015-10-291-1/+1
| | | | | | | This is likely more precise and conveys the intent better. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/vf_psnr: use log10 instead of log()/log(10)Ganesh Ajjanagadde2015-10-291-1/+1
| | | | | | | This is likely more precise and conveys the intent better. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/af_volume: use log10 instead of log()/M_LN10Ganesh Ajjanagadde2015-10-291-1/+1
| | | | | | | This is likely more precise and conveys the intent better. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/tremolo: fix wavetable buffer sizeKyle Swanson2015-10-291-3/+3
| | | | | | Signed-off-by: Kyle Swanson <k@ylo.ph> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/asrc_sine: fix options typosKyle Swanson2015-10-291-2/+2
| | | | | | Signed-off-by: Kyle Swanson <k@ylo.ph> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/showcqt: fix compilation with libswscale disabledJames Almer2015-10-291-1/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/avf_showcqt: Fix ;;Michael Niedermayer2015-10-281-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/avf_showcqt: rewrite showcqt and add featuresMuhammad Faiz2015-10-283-486/+1174
| | | | | | | | | | | | | | | | | | | | | add yuv444p, yuv422p, and yuv420p output format (lower cpu usage on ffplay playback because it does not do format conversion) custom size with size/s option (fullhd option is deprecated) custom layout with bar_h, axis_h, and sono_h option support rational frame rate (within fps/r/rate option) relaxed frame rate restriction (support fractional sample step) support all input sample rates separate sonogram and bargraph volume (with volume/sono_v and volume2/bar_v) timeclamp option alias (timeclamp/tc) fcount option gamma option alias (gamma/sono_g and gamma2/bar_g) support custom frequency range (basefreq and endfreq) support drawing axis using external image file (axisfile option) alias for disabling drawing to axis (text/axis) possibility to optimize it using arch specific asm code Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Replace remaining occurances of av_free_packet with av_packet_unrefHendrik Leppkes2015-10-274-6/+6
|
* drawutils: ReindentTimothy Gu2015-10-261-2/+2
|
* avfilter: ReindentTimothy Gu2015-10-261-14/+13
|
* x86/vf_w3fdif: use aligned loads in w3fdif_complex_highJames Almer2015-10-271-4/+2
| | | | | Found-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter: add vibrato filterKyle Swanson2015-10-264-1/+213
| | | | Signed-off-by: Kyle Swanson <k@ylo.ph>
* avfilter/vf_removegrain: replace qsort with AV_QSORTGanesh Ajjanagadde2015-10-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | filter_slice calls qsort, so qsort is in a performance critical position. AV_QSORT is substantially faster due to the inlining of the comparison callback. Thus, the increase in performance is worth the increase in binary size. Sample benchmark (x86-64, Haswell, GNU/Linux), filter-removegrain-mode-02 (from FATE) new: 24060 decicycles in qsort, 1 runs, 0 skips 15690 decicycles in qsort, 2 runs, 0 skips 9307 decicycles in qsort, 4 runs, 0 skips 5572 decicycles in qsort, 8 runs, 0 skips 3485 decicycles in qsort, 16 runs, 0 skips 2517 decicycles in qsort, 32 runs, 0 skips 1979 decicycles in qsort, 64 runs, 0 skips 1911 decicycles in qsort, 128 runs, 0 skips 1568 decicycles in qsort, 256 runs, 0 skips 1596 decicycles in qsort, 512 runs, 0 skips 1614 decicycles in qsort, 1024 runs, 0 skips 1874 decicycles in qsort, 2046 runs, 2 skips 2186 decicycles in qsort, 4094 runs, 2 skips old: 246960 decicycles in qsort, 1 runs, 0 skips 135765 decicycles in qsort, 2 runs, 0 skips 70920 decicycles in qsort, 4 runs, 0 skips 37710 decicycles in qsort, 8 runs, 0 skips 20831 decicycles in qsort, 16 runs, 0 skips 12225 decicycles in qsort, 32 runs, 0 skips 8083 decicycles in qsort, 64 runs, 0 skips 6270 decicycles in qsort, 128 runs, 0 skips 5321 decicycles in qsort, 256 runs, 0 skips 4860 decicycles in qsort, 512 runs, 0 skips 4424 decicycles in qsort, 1024 runs, 0 skips 4191 decicycles in qsort, 2046 runs, 2 skips 4934 decicycles in qsort, 4094 runs, 2 skips Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* lavfi/drawutils: add const to blending mask.Nicolas George2015-10-252-5/+6
|
* avutil/tree: add additional const qualifier to the comparatorGanesh Ajjanagadde2015-10-241-1/+1
| | | | | | | | | | | | | libc's qsort comparator has a const qualifier on both arguments. This adds a missing const qualifier to exactly match the comparator API. Existing usages of av_tree_find, av_tree_insert are appropriately modified: type signature changes of the comparators, and removal of unnecessary void * casts of function pointers. Reviewed-by: Henrik Gramner <henrik@gramner.com> Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/vf_deshake: use a void * comparator for consistencyGanesh Ajjanagadde2015-10-241-3/+4
| | | | | | | | | | | For generality, qsort uses a comparator whose elements are void *. This makes the comparator have such a form, and thus makes the void * cast of the comparator pointer useless. Furthermore, this makes the code more consistent with other usages of qsort across the codebase. Reviewed-by: Henrik Gramner <henrik@gramner.com> Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* all: remove some casts of function pointer to void *Ganesh Ajjanagadde2015-10-242-4/+4
| | | | | | | | | | These casts are unnecessary, and may safely be removed. Found by enabling -Wpedantic on clang 3.7. Tested with FATE. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter: avoid zero arguments to variadic macroGanesh Ajjanagadde2015-10-242-11/+11
| | | | | | | | | ISO C requires at least one argument in the place of the ellipsis in a variadic macro. In particular, under -pedantic, this triggers the warning -Wgnu-zero-variadic-macro-arguments on clang 3.7. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* vf_psnr/ssim: don't crash if stats_file is NULL.Ronald S. Bultje2015-10-232-22/+26
|
* avfilter: add shuffleframes filterPaul B Mahol2015-10-234-1/+165
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* vf_ssim: print per-channel dB values.Ronald S. Bultje2015-10-221-1/+2
|
* vf_psnr: remove %0.2f format specifiers for stream summary line.Ronald S. Bultje2015-10-221-2/+2
| | | | This makes output equally precise as vf_ssim.
* avfilter,swresample,swscale: use fabs, fabsf instead of FFABSGanesh Ajjanagadde2015-10-229-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | It is well known that fabs and fabsf are at least as fast and sometimes faster than the FFABS macro, at least on the gcc+glibc combination. For instance, see the reference: http://patchwork.sourceware.org/patch/6735/. This was a patch to glibc in order to remove their usages of a macro. The reason essentially boils down to fabs using the __builtin_fabs of the compiler, while FFABS needs to infer to not use a branch and to simply change the sign bit. Usually the inference works, but sometimes it does not. This may be easily checked by looking at the asm. This also has the added benefit of reducing macro usage, which has problems with side-effects. Note that avcodec is not handled here, as it is huge and most things there are integer arithmetic anyway. Tested with FATE. Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/vf_zscale: fix typoLou Logan2015-10-221-1/+1
| | | | | | Fixes #4958 as found by nicol. Signed-off-by: Lou Logan <lou@lrcd.com>
* avfilter/vf_ssim: Add support for writing stats to stdoutTobias Rapp2015-10-211-2/+4
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_psnr: Add support for writing stats to stdoutTobias Rapp2015-10-211-2/+4
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/af_flanger: free frame on ENOMEMKyle Swanson2015-10-181-1/+3
| | | | | Signed-off-by: Kyle Swanson <k@ylo.ph> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter: add zscale filterPaul B Mahol2015-10-184-1/+739
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_ladspa: check functions return value in query_formatsPaul B Mahol2015-10-181-13/+37
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/internal: Doxygen for ff_fmt_is_inGanesh Ajjanagadde2015-10-171-1/+9
| | | | | | | This clarifies and adds Doxygen for ff_fmt_is_in. Reviewed-by: Timothy Gu <timothygu99@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/internal: add av_warn_unused_resultGanesh Ajjanagadde2015-10-171-0/+5
| | | | | | | | | av_warn_unused_result is added to functions whose return status should be checked. Currently does not trigger any warnings, but should be useful for future robustness. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* chromakey: Use the pixel descriptor API for chroma subsampling infoTimothy Gu2015-10-171-8/+17
|
* avfilter/selectivecolor: fix correction_method option rangeClément Bœsch2015-10-171-1/+1
|
OpenPOWER on IntegriCloud