diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-16 02:06:37 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-09 01:50:04 +0200 |
commit | 363cf196c90401f017a2ba8c7bdfa0321b7ed947 (patch) | |
tree | f9af6ddfbbec774ef5900cb516e7fe8ba9698bed | |
parent | 90b69d1d020bde80a2b24c4a40c17363e482fc9b (diff) | |
download | ffmpeg-363cf196c90401f017a2ba8c7bdfa0321b7ed947.tar.gz |
avfilter/vf_deshake: fix loss of precission with odd resolutions
Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 73734282e0e4df92269984ee1671424e39249481)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavfilter/vf_deshake.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c index bb20551bc9..bf605d37ff 100644 --- a/libavfilter/vf_deshake.c +++ b/libavfilter/vf_deshake.c @@ -315,8 +315,8 @@ static void find_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2, //av_log(NULL, AV_LOG_ERROR, "\n"); } - p_x = (center_x - width / 2); - p_y = (center_y - height / 2); + p_x = (center_x - width / 2.0); + p_y = (center_y - height / 2.0); t->vector.x += (cos(t->angle)-1)*p_x - sin(t->angle)*p_y; t->vector.y += sin(t->angle)*p_x + (cos(t->angle)-1)*p_y; |