Currently we are using an array with a static data size.
Similar to a patch with the same purpose by Michael Niedermayer.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
I volunteer to maintain the delogo filter for at least the year to
come.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
patch/commit split by commiter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The sample from ticket #2691 currently does not trigger "Consider increasing
the value for analzeduration and probesize" because the audio streams are
only added after calling estimate_timings(). Attached patch moves the message
below this function call.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
oggdec: do not fall back on binary search in the generic code.
Conflicts:
libavformat/oggdec.c
tests/ref/seek/lavf-ogg
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Allow applications to request reading streamcast metadata. This uses
AVOptions as API, and requires the application to explicitly request
and read metadata. Metadata can be updated mid-stream; if an
application is interested in that, it has to poll for the data by
reading the "icy_metadata_packet" option in regular intervals.
There doesn't seem to be a nice way to transfer the metadata in a nicer
way. Converting the metadata to ID3v2 tags might be a nice idea, but
the libavformat mp3 demuxer doesn't seem to read these tags mid-stream,
and even then we couldn't guarantee that tags are not inserted in the
middle of mp3 packet data.
This commit provides the minimum to enable applications to retrieve
this information at all.
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
* commit '1194a410807bac3eafbeb632578b937656d273e7':
indeo5: reject negative motion vectors
The added check is wrong and thus not merged.
A correct check already exists in avcodec.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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>