summaryrefslogtreecommitdiff
path: root/libavfilter
Commit message (Collapse)AuthorAge
* replace some deprecated definesPaul B Mahol2013-07-06
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi/blend: use dual input helpersPaul B Mahol2013-07-06
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi/delogo: band width must be at least 1Jean Delvare2013-07-05
| | | | | | | | | | We need at least one pixel around the logo to use as known points to interpolate from. So properly declare the band/t attribute has having a minimum value of 1. Signed-off-by: Jean Delvare <khali@linux-fr.org> Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/delogo: option show shouldn't affect bandJean Delvare2013-07-05
| | | | | | | | | | | | | | Options "show" and "band" are unrelated and should thus be independent. However, setting "show" to 1 currently resets "band" to its default value of 4. While this is documented, this still surprising and confusing IMHO. Change this behavior and make "show" and "band" independent from each other. Update the documentation accordingly. Signed-off-by: Jean Delvare <khali@linux-fr.org> Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/blackdetect: support 2 more pixels formatsPaul B Mahol2013-07-05
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi/cropdetect: export cropdetect info to frame metadataPaul B Mahol2013-07-05
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi/delogo: remember left and right samples when interpolatingJean Delvare2013-07-05
| | | | | | | | | | | | | | The left and right samples are the same for the whole line, so store their values and don't recompute them for every iteration of "y". This simple optimization results in a speed improvement between 15% and 20% in my tests (depending on the logo geometry.) Result is obviously the same. Signed-off-by: Jean Delvare <khali@linux-fr.org> Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/delogo: don't recompute the same difference again and againJean Delvare2013-07-05
| | | | | | | | | | | | | | The top left hand corner pixel coordinates are already stored in logo_x1 and logo_y1 so don't recompute each of them 6 times for every iteration. This is a simple code optimization, result is obviously the same. The performance gain is small (about 2% in my tests) but still good to have, and the new code is clearer. Signed-off-by: Jean Delvare <khali@linux-fr.org> Reviewed-by; Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/crop: support more pixel formatsPaul B Mahol2013-07-04
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi/delogo: avoid propagation of rounding errors in chroma planesJean Delvare2013-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | When operating on subsampled chroma planes, some rounding is taking place. The left and top borders are rounded down while the width and height are rounded up, so all rounding is done outward to guarantee the logo area is fully covered. The problem is that the width and height are counted from the unrounded left and top borders, respectively. So if the left or top border position has indeed been rounded down, and the width or height needs no rounding (up), the position of the the right or bottom border will be effectively rounded down, i.e. inward. The issue can easily be seen with a yuv240p input and -vf delogo=45:45:60:40:show=1 -vframes 1 delogo-bug.png (or virtually any logo area with odd x and y and even width and height.) The right and bottom chroma borders (in green) are clearly off. In order to fix this, the width and height must be adjusted to include the bits lost in the rounding of the left and top border positions, respectively, prior to being themselves rounded up. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/delogo: take SAR into accountJean Delvare2013-07-03
| | | | | | | | | | | When interpolating, weights are based on relative distances, which assume square pixels. If a non-1:1 sample aspect ratio is used, it should be taken into account when comparing distances, because the human eye and brain care about the picture as it is displayed, not stored. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi: create Libav-API compatibility layer for avfilter_graph_parse() at ↵Stefano Sabatini2013-07-03
| | | | | | | | | | | | | | | | | the next bump Add function avfilter_graph_parse_ptr() and favor it in place of avfilter_graph_parse(), which will be restored with the old/Libav signature at the next bump. If HAVE_INCOMPATIBLE_LIBAV_API is enabled it will use the Libav-compatible signature for avfilter_graph_parse(). At the next major bump the current implementation of avfilter_graph_parse() should be dropped in favor of the Libav/old implementation. Should address trac ticket #2672.
* lavfi/delogo: use weighted interpolationJean Delvare2013-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original delogo algorithm interpolates both horizontally and vertically and uses the average to compute the resulting sample. This works reasonably well when the logo area is almost square. However when the logo area is significantly larger than high or higher than large, the result is largely suboptimal. The issue can be clearly seen by testing the delogo filter with a fake logo area that is 200 pixels large and 2 pixels high. Vertical interpolation gives a very good result in that case, horizontal interpolation gives a very bad result, and the overall result is poor, because both are given the same weight. Even when the logo is roughly square, the current algorithm gives poor results on the borders of the logo area, because it always gives horizontal and vertical interpolations an equal weight, and this is suboptimal on borders. For example, in the middle of the left hand side border of the logo, you want to trust the left known point much more than the right known point (which the current algorithm already does) but also much more than the top and bottom known points (which the current algorithm doesn't do.) By properly weighting each known point when computing the value of each interpolated pixel, the visual result is much better, especially on borders and/or for high or large logo areas. The algorithm I implemented guarantees that the weight of each of the 4 known points directly depends on its distance to the interpolated point. It is largely inspired from the original algorithm, the key difference being that it computes the relative weights globally instead of separating the vertical and horizontal interpolations and combining them afterward. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
* Rename thread_init() in libavcodec and libavfilter as library_thread_init().Carl Eugen Hoyos2013-06-30
| | | | The aix header sys/thread.h contains a definition for thread_init().
* Rename constant HZ in af_biquads.c as HERTZ.Carl Eugen Hoyos2013-06-30
| | | | The aix header sys/m_param.h defines HZ as _HZ.
* avfilter/avfilter: Make avfilter_register() thread safeMichael Niedermayer2013-06-28
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/vf_mp: preserve pixel format when possibleMichael Niedermayer2013-06-28
| | | | | | Fixes Ticket2577 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/src_movie: Fix handling of packet size for videoMichael Niedermayer2013-06-26
| | | | | | See Ticket2556 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* libavfilter/src_movie: fix which packet is resetMichael Niedermayer2013-06-26
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* vf_drawbox: give all v_log() a contextMichael Niedermayer2013-06-26
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* vf_drawbox: avoid declaration in for() argumentsMichael Niedermayer2013-06-26
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge branch 'drawbox_exprs' of https://github.com/mjmvisser/FFmpegMichael Niedermayer2013-06-26
|\ | | | | | | | | | | | | | | * 'drawbox_exprs' of https://github.com/mjmvisser/FFmpeg: enabled expressions on x, y, w, h and t parameters for drawgrid and drawbox, added examples Reviewed-by: Andrey Utkin Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * enabled expressions on x, y, w, h and t parameters for drawgrid and drawbox, ↵Mark Visser2013-06-25
| | | | | | | | added examples
* | lavfi/movie: free packet on decoder errorMichael Niedermayer2013-06-25
| | | | | | | | | | | | Prevents infinite loop, see Ticket2556 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avfilter/vsrc_testsrc: fix artifacts with odd heightMichael Niedermayer2013-06-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'eeeb5c291d3f78eaade5b99c2614c7cab0e9be79'Michael Niedermayer2013-06-21
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'eeeb5c291d3f78eaade5b99c2614c7cab0e9be79': vsrc_movie: do not free avoption variables in uninit() Conflicts: libavfilter/src_movie.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * | vsrc_movie: do not free avoption variables in uninit()Anton Khirnov2013-06-20
| | | | | | | | | | | | | | | The generic code frees them as well. Since av_free was used to free them instead of av_freep, this would result in a double free.
* | | delogo: Fix function descriptionJean Delvare2013-06-19
| | | | | | | | | | | | | | | | | | | | | | | | The algorithm works on src and writes to dst, not the other way around. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-06-19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavfi: switch ff_default_get_audio_buffer() to av_frame_get_buffer() Conflicts: libavfilter/audio.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * | lavfi: switch ff_default_get_audio_buffer() to av_frame_get_buffer()Anton Khirnov2013-06-18
| | | | | | | | | | | | | | | This simplifies the code and avoids using libavcodec-specific avcodec_fill_audio_frame().
* | | Merge branch 'frame_num_offset' of https://github.com/mjmvisser/FFmpegMichael Niedermayer2013-06-19
|\ \ \ | | | | | | | | | | | | Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * | | add the start_number offset to var_values[VAR_N] directly, instead of adding ↵Mark Visser2013-06-18
| | | | | | | | | | | | | | | | it in func_frame_num
| * | | added start_number parameter to drawtext to permit an offset to n/frame_num varMark Visser2013-06-14
| | |/ | |/|
* | | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-06-18
|\ \ \ | | |/ | |/| | | | | | | | | | | | | * qatar/master: lavfi: math typo in interlace filter Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * | lavfi: math typo in interlace filterVittorio Giovara2013-06-17
| | | | | | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | | lavfi/src_movie: Use movie_common_init instead individual wrappersAlexander Strasser2013-06-18
| | | | | | | | | | | | | | | | | | | | | Makes it easier to understand that there is no difference in init callback for movie and amovie. Also saves a few lines of code. Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
* | | lavfi/src_movie: Check pointer is not NULL before derefAlexander Strasser2013-06-18
| |/ |/| | | | | | | | | | | Also do not check against empty string, the lower levels should be able to deal with it. Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
* | lavfi/spp: fix description.Clément Bœsch2013-06-14
| |
* | drawbox: Respect thickness parameterJean Delvare2013-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The drawbox video filter is drawing lines one pixel thinner than requested. The default thickness is 4 pixel but in fact the lines drawn by default are only 3 pixel wide. Change the comparisons in the code to fix this off-by-one bug. Also change the default thickness from 4 to 3 to minimize the unexpected changes from the user's perspective. As I was already touching these lines, I also removed the "maximum" in the thickness parameter description, as I don't think it was adding any value and I even found it confusing. Reviewed-by: Andrey Utkin <andrey.krieger.utkin@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavfi/mp: remove mp=spp.Clément Bœsch2013-06-14
| | | | | | | | The filter was ported to a native libavfilter filter.
* | lavfi: add spp filter.Clément Bœsch2013-06-14
| |
* | lavfi/rotate: add angle commandStefano Sabatini2013-06-13
| |
* | lavfi: add rotate filterStefano Sabatini2013-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the libavfilter SOC filter by Vitor Sessak, with the following additions: * integer arithmetic * bilinear interpolation * RGB path * configurable parametric angle, output width and height Address trac issue #1500. See thread: Subject: [FFmpeg-devel] [WIP] rotate filter(s) Date: 2010-10-03 17:35:49 GMT
* | vf_sab: Fix memleakMichael Niedermayer2013-06-10
| | | | | | | | | | Fixes CID1030353 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavfi/pp: set out frame size.Clément Bœsch2013-06-08
| | | | | | | | | | | | w/h from input frame are not copied in av_frame_copy_props(). This commit avoids a mismatch between aligned_[wh] and outbuf->{width,height} (and thus avoids triggering an assert in avfilter because of this).
* | lavfi/lut3d: add sanity checks.Clément Bœsch2013-06-07
| | | | | | | | Should fix CID1026775 and CID1026774.
* | lavfi/il: add timeline supportPaul B Mahol2013-06-06
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | lavfi/framestep: cosmetics: reindent AVFilterPaul B Mahol2013-06-06
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | lavfi/framestep: add timeline supportPaul B Mahol2013-06-06
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '8b7dffc2d6c6c19f8e0a1fedcd0e95dce7a273ff'Michael Niedermayer2013-06-05
|\| | | | | | | | | | | | | | | | | | | * commit '8b7dffc2d6c6c19f8e0a1fedcd0e95dce7a273ff': lavfi doxy: improve/extend AVFilter doxy. Conflicts: libavfilter/avfilter.h Merged-by: Michael Niedermayer <michaelni@gmx.at>