Commit Graph

3808 Commits

Author SHA1 Message Date
Michael Niedermayer
10336ca640 Merge commit '50612484e058e8b241f0528584d64d9d2ccebf12'
* commit '50612484e058e8b241f0528584d64d9d2ccebf12':
  pthread: Rename thread_init to avoid symbol collision

Conflicts:
	libavcodec/pthread.c
	libavfilter/pthread.c

See: 674d8a9629
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-17 10:40:15 +02:00
Sean McGovern
50612484e0 pthread: Rename thread_init to avoid symbol collision
The AIX threads library exposes a function with the same name.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-17 00:13:31 +03:00
Paul B Mahol
5999db97cf lavfi/scale: remove av_opt_free()
Generic code calls it already.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-15 15:27:19 +00:00
Michael Niedermayer
3ea765b033 avfilter/avf_concat: fix AVOption flags typo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-15 14:15:15 +02:00
Paul B Mahol
85a22099a7 lavfi/stereo3d: subsampled yuv support for non-anaglyph outputs
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-14 21:57:03 +00:00
Paul B Mahol
d5598c0963 lavfi/drawutils: set subsampling for rgb too
Otherwise it is incorrectly set to 1.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-14 17:59:25 +00:00
Paul B Mahol
ed448efe61 lavfi/mp: remove mp=perspective
The filter was ported to a native libavfilter filter.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-14 16:27:18 +00:00
Paul B Mahol
80c6445932 lavfi: port perspective filter from libmpcodecs
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-14 16:27:17 +00:00
Paul B Mahol
fc6ca37316 lavfi/aecho: fix invalid free
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-13 23:45:05 +00:00
Paul B Mahol
f486d7e924 lavfi/silencedetect: unbreak for unknown channel layouts
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-13 22:23:09 +00:00
Paul B Mahol
099dfcaa0e lavfi/ashowinfo: unbreak for >8 channels
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-13 22:04:14 +00:00
Paul B Mahol
729709b890 lavfi/asetnsamples: unbreak for >8 channels
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-13 21:59:13 +00:00
Paul B Mahol
e9678631f1 lavfi/trim: fix sample copy for >8 channels
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-13 21:54:02 +00:00
Paul B Mahol
6347824d53 lavfi/showwaves: fix floating exception with >8 channels
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-13 21:46:27 +00:00
Michael Niedermayer
aac57c765f avfilter/asrc_aevalsrc: fix cases of unknown channel layout
Fixes >8 channels

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-13 23:10:15 +02:00
Jean Delvare
b6d0bb6086 lavfi/delogo: Fix sign extension issue
Coverity complains about a possible sign extension issue in
apply_delogo(). While it is extremely unlikely to happen, it is easy
to fix so let's just do that. Using unsigned variables even makes the
binary code smaller.

Fixes Coverity CID 1046439.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-13 17:05:03 +02:00
Michael Niedermayer
9219ec93b1 avfilter/trim: add compatibility layer to not break ABI used by ffmpeg
This is a hotfix to fix -t / -ss
a different solution might be choosen later, i just dont want to leave
this broken

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-12 21:27:26 +02:00
Paul B Mahol
b3405b1bda lavfi/trim: use AV_OPT_TYPE_DURATION
Workarounds for rounding differences between platforms should not be
needed any more.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-12 15:58:22 +00:00
Paul B Mahol
937cfebd72 lavfi/aevalsrc: remove hard limit on number of channels
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-12 15:51:47 +00:00
Michael Niedermayer
86d1a5d80f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vf_interlace: better handling of odd video size

Conflicts:
	libavfilter/vf_interlace.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-12 14:58:41 +02:00
Michael Niedermayer
bec509db43 vf_interlace: better handling of odd video size
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-12 11:40:56 +03:00
Paul B Mahol
db4e191d88 lavfi/aevalsrc: do not free AVOption variables in uninit()
The generic code frees them already.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-10 19:22:07 +00:00
Paul B Mahol
badbd2414d lavfi/aevalsrc: use AV_OPT_TYPE_DURATION
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-10 19:16:00 +00:00
Paul B Mahol
1e89f74902 lavfi/afade: use av_rescale()
Should not make a difference, but its good idea.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-10 19:13:28 +00:00
Michael Niedermayer
0a3a0edd52 avfilter/af_earwax: Fix out of array accesses on odd packets
Found-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-10 16:46:13 +02:00
Paul B Mahol
bc95b94289 lavfi/aconvert: unbreak
Even if its deprecated, it should still work correctly.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-10 13:16:24 +00:00
Paul B Mahol
884c890535 lavfi: add aecho filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-10 12:10:58 +00:00
Michael Niedermayer
d5de123195 avfilter/graphparse: Fix build with --enable-incompatible-fork-abi
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-09 19:06:32 +02:00
Paul B Mahol
c5a1b18f18 lavfi/drawtext: add support for printing frame metadata
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-09 15:21:01 +00:00
Paul B Mahol
3c5071db88 lavfi/psnr: rename 's' parameter to match documentation
Also removes some irrelevant lines in documentation.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-09 09:40:53 +00:00
Paul B Mahol
a03e79ed5a lavfi: fix broken logic in metadata handling
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-08 20:13:56 +00:00
Paul B Mahol
19c8f22714 lavfi/rotate: switch to new drawutils
Get rid of ugly hacks, also add support for more pixel formats.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-08 16:40:49 +00:00
Paul B Mahol
55c94f48ce lavfi/drawutils: fix planar rgb
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-08 16:40:49 +00:00
Paul B Mahol
d2dd1e075c lavfi/pad: use FFSIGN
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-08 16:40:48 +00:00
Paul B Mahol
6150bec3f8 lavfi: add psnr filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-08 14:58:04 +00:00
Paul B Mahol
d64f3b72e0 replace some deprecated defines
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-06 05:43:24 +00:00
Paul B Mahol
9635806265 lavfi/blend: use dual input helpers
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-06 04:58:34 +00:00
Jean Delvare
4e10d87f38 lavfi/delogo: band width must be at least 1
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>
2013-07-05 18:02:11 +02:00
Jean Delvare
72abce3c46 lavfi/delogo: option show shouldn't affect band
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>
2013-07-05 18:02:11 +02:00
Paul B Mahol
413f865a9a lavfi/blackdetect: support 2 more pixels formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-05 15:30:37 +00:00
Paul B Mahol
9dd1447788 lavfi/cropdetect: export cropdetect info to frame metadata
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-05 15:07:33 +00:00
Jean Delvare
4e8d6b315c lavfi/delogo: remember left and right samples when interpolating
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>
2013-07-05 13:53:37 +02:00
Jean Delvare
6fc8c4cc0e lavfi/delogo: don't recompute the same difference again and again
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>
2013-07-05 13:52:59 +02:00
Paul B Mahol
253e155251 lavfi/crop: support more pixel formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-04 11:46:06 +00:00
Jean Delvare
f0bcb13aed lavfi/delogo: avoid propagation of rounding errors in chroma planes
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>
2013-07-03 23:10:57 +02:00
Jean Delvare
99f1d74933 lavfi/delogo: take SAR into account
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>
2013-07-03 23:10:46 +02:00
Stefano Sabatini
838bd73139 lavfi: create Libav-API compatibility layer for avfilter_graph_parse() at 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.
2013-07-03 13:21:42 +02:00
Jean Delvare
16fd75ceec lavfi/delogo: use weighted interpolation
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>
2013-07-01 09:33:33 +02:00
Carl Eugen Hoyos
674d8a9629 Rename thread_init() in libavcodec and libavfilter as library_thread_init().
The aix header sys/thread.h contains a definition for thread_init().
2013-06-30 13:47:45 +02:00
Carl Eugen Hoyos
33f5d70df5 Rename constant HZ in af_biquads.c as HERTZ.
The aix header sys/m_param.h defines HZ as _HZ.
2013-06-30 13:47:45 +02:00