Commit Graph

16 Commits

Author SHA1 Message Date
Ray Simard
9ec39937f9 deshake: variable used uninitialized
Sometimes the scan finds nothing that qualifies for addition to
the array and pos is zero after the loops.  The code forces pos to
1 and the array is then processed as if it had one valid element in it,
producing some amusing but not very useful results.

I don't see the rationale for this.  If pos is zero coming out of the
loops, the only appropriate thing to do is set t->angle to zero.  The
attached patch does that.  It's worked properly in several tests so far.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-21 05:22:49 +01:00
Ray Simard
369befb41e vf_deshake: remove unused variable totalangles
Variable totalangles was created and assigned, but never used.

Signed-off-by: Ray Simard <rhs.ffmpeg@sylvan-glade.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2012-01-13 17:00:21 +01:00
Ray Simard
7f6004fc74 vf_deshake: zero-init Transform structs in end_frame()
Initialize Transform structs t and orig to zero.

Signed-off-by: Ray Simard <rhs.ffmpeg@sylvan-glade.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2012-01-13 16:59:50 +01:00
Reimar Döffinger
7cbb32e461 Use an int MotionVector for find_block_motion.
Using the double variant causes several pointless conversions between
double and int.
Worse, one of the conversions is in an inner loop together with a
function using MMX, resulting in undefined behaviour.
Based on debugging by Ray Simard.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Tested-by: Ray Simard <rhs.ffmpeg@sylvan-glade.com>
2012-01-12 20:09:16 +01:00
Reimar Döffinger
5af7daabc4 Mark AVFilterPad[] compound literals as const.
GCC 4.6.2 at least still seems to fail to put them in .rodata though,
see also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37303

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-11-06 00:05:14 +01:00
Paul Flinders
9ef714328c deshake: limit deshake to specific area to search for motion vectors. 2011-10-20 00:39:34 +02:00
Michael Niedermayer
5ed20cfeaf vf_deshake: Fix cast discards qualifiers from pointer target type warning.
And simplify the code in the process.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-19 00:03:13 +02:00
Clément Bœsch
073effb6e4 deshake: simplify filename check. 2011-10-04 21:36:54 +02:00
Clément Bœsch
d4005e22c3 deshake: misc style fixes. 2011-10-04 21:36:54 +02:00
Michael Niedermayer
b0f270fdef deshake: move angles from stack to heap.
Fixes Ticket530

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-04 18:32:36 +02:00
Michael Niedermayer
1e4da6031c deshake: Allow specifying the filename for statistics and disable them by default.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-04 17:20:42 +02:00
Michael Niedermayer
171a5b5d36 deshake: remove non const static
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-04 08:31:40 +02:00
Clément Bœsch
1912c215e0 doxygen: remove a few @file parameters.
It is not mandatory and prevents breakage on rename.
2011-10-04 08:04:17 +02:00
Clément Bœsch
136093236f deshake: fix doxygen comments. 2011-10-04 07:48:55 +02:00
Michael Niedermayer
2cdb5e1986 deshake: nicer looking defaults
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-04 02:15:18 +02:00
danielgtaylor
0cc2ed4a20 libavfilter: add deshake filter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-04 02:14:21 +02:00