summaryrefslogtreecommitdiff
path: root/libavfilter/vf_deshake.c
Commit message (Collapse)AuthorAge
* lavf, lavfi: Remove uses of sizeof(char).Carl Eugen Hoyos2020-04-04
| | | | The C standard requires sizeof(char) == 1.
* lavfi: modify avfilter_get_matrix to support separate scale factorsJarek Samic2019-08-22
|
* lavfi/deshake: fix deshake crash issue.Jun Zhao2018-10-06
| | | | | | | | | | | | | | | | | | | | | | | | Fixes ticket #7441. for block contrast calculate, the block is like this: |<---------------- stride-----------------------| +-----------------------------------------------> X | | w = 16 | (cx,cy)+------+ | | | |h=blocksize| | | | | | +------+ V Y so we calc the block contrast use: (cy + y) * stride + (cx + x) Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* lavfi/deshake: Check alignment before calling asm init function.Carl Eugen Hoyos2018-03-20
| | | | | | | Do this for every frame to make sure dynamic filters do not cause crashes. Fixes ticket #7078.
* lavu,lavfi,ffmpeg: Remove experimental OpenCL APIMark Thompson2017-11-22
| | | | | | | | | | | This was added in early 2013 and abandoned several months later; as far as I can tell, there are no external users. Future OpenCL use will be via hwcontext, which requires neither special OpenCL-only API nor global state in libavutil. All internal users are also deleted - this is just the unsharp filter (replaced by unsharp_opencl, which is more flexible) and the deshake filter (no replacement).
* avfilter/vf_deshake: Free out AVFrame on errorMichael Niedermayer2017-02-03
| | | | | | | Fixes memleak Fixes part of CID1197065 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPATDerek Buitenhuis2016-01-27
| | | | | | | | | | Libav, for some reason, merged this as a public API function. This will aid in future merges. A define is left for backwards compat, just in case some person used it, since it is in a public header. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* lavfi/deshake: use FF_CEIL_RSHIFT()Clément Bœsch2016-01-07
|
* all: use FFDIFFSIGN to resolve possible undefined behavior in comparatorsGanesh Ajjanagadde2015-11-03
| | | | | | | | | | | | | | | | | | | 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_deshake: replace qsort with AV_QSORTGanesh Ajjanagadde2015-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/vf_deshake: use a void * comparator for consistencyGanesh Ajjanagadde2015-10-24
| | | | | | | | | | | 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>
* avfilter/deshake: use AV_OPT_TYPE_BOOL for opencl optionClément Bœsch2015-09-08
|
* avfilter: handle error in query_formats() of a bunch of random video filtersClément Bœsch2015-03-16
|
* vf_deshake: rename Transform.vector to Transform.vec to avoid compiler confusionAndreas Cadhalpun2014-09-18
| | | | | | | | | The token 'vector' is a keyword in the Vector/SIMD Multimedia Extension data types and thus should not be used as a variable name. This fixes building on powerpc/ppc64el. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* vf_deshake: Avoid doing a malloc+free for every single frame.Reimar Döffinger2014-09-02
| | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* vf_deshake: reduce stack usage.Reimar Döffinger2014-09-02
| | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* avfilter/deshake: remove avcodec dependencyClément Bœsch2014-08-05
|
* reintroduce avpriv_dsputil_init() to maintain ABI until next soname bumpMichael Niedermayer2014-07-26
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '2d60444331fca1910510038dd3817bea885c2367'Michael Niedermayer2014-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | * commit '2d60444331fca1910510038dd3817bea885c2367': dsputil: Split motion estimation compare bits off into their own context Conflicts: configure libavcodec/Makefile libavcodec/arm/Makefile libavcodec/dvenc.c libavcodec/error_resilience.c libavcodec/h264.h libavcodec/h264_slice.c libavcodec/me_cmp.c libavcodec/me_cmp.h libavcodec/motion_est.c libavcodec/motion_est_template.c libavcodec/mpeg4videoenc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/x86/Makefile libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/vf_deshake: Use av_malloc_array()Michael Niedermayer2014-07-11
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/vf_deshake: fix macro ()Michael Niedermayer2014-06-24
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/vf_deshake: dont pass the wrong context into the SAD functionsMichael Niedermayer2014-05-03
| | | | | | | This fixes pointer type warnings The context should have been unused so this should not fix any real bug Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/vf_deshake: fix loss of precission with odd resolutionsMichael Niedermayer2014-04-16
| | | | | | Fixes part of Ticket3466 Found-by: Andrey_Karpov / PVS-Studio Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavfi: do not export the filters from shared objects Conflicts: libavfilter/af_amix.c libavfilter/af_anull.c libavfilter/asrc_anullsrc.c libavfilter/f_select.c libavfilter/f_settb.c libavfilter/split.c libavfilter/src_movie.c libavfilter/vf_aspect.c libavfilter/vf_blackframe.c libavfilter/vf_colorbalance.c libavfilter/vf_copy.c libavfilter/vf_crop.c libavfilter/vf_cropdetect.c libavfilter/vf_drawbox.c libavfilter/vf_format.c libavfilter/vf_framestep.c libavfilter/vf_frei0r.c libavfilter/vf_hflip.c libavfilter/vf_libopencv.c libavfilter/vf_lut.c libavfilter/vf_null.c libavfilter/vf_overlay.c libavfilter/vf_scale.c libavfilter/vf_transpose.c libavfilter/vf_unsharp.c libavfilter/vf_vflip.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/vf_deshake: fix block_contrast() lower brightness valueMichael Niedermayer2013-10-07
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/deshakeLenny Wang2013-10-07
| | | | | | The old row index looks weird and wrong to me Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/vf_deshake: check rxMichael Niedermayer2013-05-18
| | | | | | | | | | Fixes crash on SSE2 Fixes Ticket2443 Note, its possible to restructure the code to avoid the 16pixel limitation, and such change is welcome! Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* deshake: fix off by 2 errorMichael Niedermayer2013-04-15
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* vf_deshake: Fix crash with r*=64Michael Niedermayer2013-04-15
| | | | | | | | | Replace literal numbers by named R_MAX and correct their value Fixes half of Ticket2443 Based on patch by: João Bernardo <jbvsmo@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Add avpriv_dsputil_init() and use it in lavfi where relevant.Clément Bœsch2013-04-14
| | | | | | | | dsputil_init() is deprecated and not meant to be exported. ff_dsputil_init() is internal to libavcodec and thus can not be used. avpriv_dsputil_init() is the version shared between libraries. This commit fixes 3 unjustified libavfilter deprecated warnings.
* lavfi: remove now unused args parameter from AVFilter.init and init_opaqueMichael Niedermayer2013-04-12
| | | | | | | | | This is mostly automated global search and replace The deprecated aconvert filter is disabled, if it still has users it should be updated Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/deshake: switch to an AVOptions-based system.Clément Bœsch2013-04-11
|
* vf_deshake: Reorder constant arguments in an if() statement.Carl Eugen Hoyos2013-04-03
| | | | | | Fixes compilation with clang on netbsd with --disable-optimizations. Tested-by: Paul B Mahol
* deshake opencl based on comments on 20130402 3rdhighgod04012013-04-02
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/deshake: use standard options parsing.Clément Bœsch2013-03-24
|
* lavfi: remove remaining forgotten min/rej perms.Clément Bœsch2013-03-10
|
* Merge commit '7e350379f87e7f74420b4813170fe808e2313911'Michael Niedermayer2013-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7e350379f87e7f74420b4813170fe808e2313911': lavfi: switch to AVFrame. Conflicts: doc/filters.texi libavfilter/af_ashowinfo.c libavfilter/audio.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/buffersink.c libavfilter/buffersrc.c libavfilter/buffersrc.h libavfilter/f_select.c libavfilter/f_setpts.c libavfilter/fifo.c libavfilter/split.c libavfilter/src_movie.c libavfilter/version.h libavfilter/vf_aspect.c libavfilter/vf_bbox.c libavfilter/vf_blackframe.c libavfilter/vf_delogo.c libavfilter/vf_drawbox.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_fieldorder.c libavfilter/vf_fps.c libavfilter/vf_frei0r.c libavfilter/vf_gradfun.c libavfilter/vf_hqdn3d.c libavfilter/vf_lut.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vf_showinfo.c libavfilter/vf_transpose.c libavfilter/vf_vflip.c libavfilter/vf_yadif.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavfilter/yadif.h Following are notes about the merge authorship and various technical details. Michael Niedermayer: * Main merge operation, notably avfilter.c and video.c * Switch to AVFrame: - afade - anullsrc - apad - aresample - blackframe - deshake - idet - il - mandelbrot - mptestsrc - noise - setfield - smartblur - tinterlace * various merge changes and fixes in: - ashowinfo - blackdetect - field - fps - select - testsrc - yadif Nicolas George: * Switch to AVFrame: - make rawdec work with refcounted frames. Adapted from commit 759001c534287a96dc96d1e274665feb7059145d by Anton Khirnov. Also, fix the use of || instead of | in a flags check. - make buffer sink and src, audio and video work all together Clément Bœsch: * Switch to AVFrame: - aevalsrc - alphaextract - blend - cellauto - colormatrix - concat - earwax - ebur128 - edgedetect - geq - histeq - histogram - hue - kerndeint - life - movie - mp (with the help of Michael) - overlay - pad - pan - pp - pp - removelogo - sendcmd - showspectrum - showwaves - silencedetect - stereo3d - subtitles - super2xsai - swapuv - thumbnail - tile Hendrik Leppkes: * Switch to AVFrame: - aconvert - amerge - asetnsamples - atempo - biquads Matthieu Bouron: * Switch to AVFrame - alphamerge - decimate - volumedetect Stefano Sabatini: * Switch to AVFrame: - astreamsync - flite - framestep Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Clément Bœsch <ubitux@gmail.com> Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com> Signed-off-by: Stefano Sabatini <stefasab@gmail.com> Merged-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/deshake: support named options.Clément Bœsch2013-03-05
|
* vf_deshake: fix strict aliassing errorsMichael Niedermayer2012-12-29
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/deshake: remove usage of link->cur_buf.Clément Bœsch2012-12-26
|
* lavfi: declare arrays that never change as static constPaul B Mahol2012-12-21
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi/deshake: small align prettifying.Clément Bœsch2012-12-06
|
* lavfi/deshake: switch inverted comments.Clément Bœsch2012-12-06
|
* lavfi/deshake: remove unecessary check before unref.Clément Bœsch2012-12-06
|
* lavfi/deshake: switch to filter_frame.Clément Bœsch2012-12-06
|
* lavfi: convert remaining input/output list compound literals to named objects.Clément Bœsch2012-11-28
| | | | This is following 568c70e79ee267426c15ef4603c69703f6a5884a.
* Replace usage of the deprecated av_pix_fmt_descriptors array with ↵Hendrik Leppkes2012-10-20
| | | | | | av_pix_fmt_desc_get Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '716d413c13981da15323c7a3821860536eefdbbb'Michael Niedermayer2012-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '716d413c13981da15323c7a3821860536eefdbbb': Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat Conflicts: doc/examples/muxing.c ffmpeg.h ffmpeg_filter.c ffmpeg_opt.c ffplay.c ffprobe.c libavcodec/8bps.c libavcodec/aasc.c libavcodec/aura.c libavcodec/avcodec.h libavcodec/avs.c libavcodec/bfi.c libavcodec/bmp.c libavcodec/bmpenc.c libavcodec/c93.c libavcodec/cscd.c libavcodec/cyuv.c libavcodec/dpx.c libavcodec/dpxenc.c libavcodec/eatgv.c libavcodec/escape124.c libavcodec/ffv1.c libavcodec/flashsv.c libavcodec/fraps.c libavcodec/h264.c libavcodec/huffyuv.c libavcodec/iff.c libavcodec/imgconvert.c libavcodec/indeo3.c libavcodec/kmvc.c libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/libx264.c libavcodec/ljpegenc.c libavcodec/mjpegdec.c libavcodec/mjpegenc.c libavcodec/motionpixels.c libavcodec/mpeg12.c libavcodec/mpeg12enc.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo_enc.c libavcodec/pamenc.c libavcodec/pcxenc.c libavcodec/pgssubdec.c libavcodec/pngdec.c libavcodec/pngenc.c libavcodec/pnm.c libavcodec/pnmdec.c libavcodec/pnmenc.c libavcodec/ptx.c libavcodec/qdrw.c libavcodec/qpeg.c libavcodec/qtrleenc.c libavcodec/raw.c libavcodec/rawdec.c libavcodec/rl2.c libavcodec/sgidec.c libavcodec/sgienc.c libavcodec/snowdec.c libavcodec/snowenc.c libavcodec/sunrast.c libavcodec/targa.c libavcodec/targaenc.c libavcodec/tiff.c libavcodec/tiffenc.c libavcodec/tmv.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/vb.c libavcodec/vp3.c libavcodec/wnv1.c libavcodec/xl.c libavcodec/xwddec.c libavcodec/xwdenc.c libavcodec/yop.c libavdevice/v4l2.c libavdevice/x11grab.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/buffersrc.c libavfilter/drawutils.c libavfilter/formats.c libavfilter/src_movie.c libavfilter/vf_ass.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_format.c libavfilter/vf_hflip.c libavfilter/vf_lut.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vf_transpose.c libavfilter/vf_yadif.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavformat/movenc.c libavformat/mxf.h libavformat/utils.c libavformat/yuv4mpeg.c libavutil/imgutils.c libavutil/pixdesc.c libswscale/input.c libswscale/output.c libswscale/swscale_internal.h libswscale/swscale_unscaled.c libswscale/utils.c libswscale/x86/swscale_template.c libswscale/x86/yuv2rgb.c libswscale/x86/yuv2rgb_template.c libswscale/yuv2rgb.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* vf_deshake: fix permissions.Nicolas George2012-08-17
|
* vf_deshake: set cur_buf to NULL.Nicolas George2012-07-23
| | | | Fix a segfault.