git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a8ef3c
)
avfilter/vf_deshake: fix loss of precission with odd resolutions
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 16 Apr 2014 00:06:37 +0000
(
02:06
+0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 16 Apr 2014 01:44:57 +0000
(
03:44
+0200)
Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/vf_deshake.c
patch
|
blob
|
history
diff --git
a/libavfilter/vf_deshake.c
b/libavfilter/vf_deshake.c
index
1d62c44
..
f77a9bd
100644
(file)
--- a/
libavfilter/vf_deshake.c
+++ b/
libavfilter/vf_deshake.c
@@
-306,8
+306,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;