[vlc-commits] rotate: simplify angle stuff

Pierre Ynard git at videolan.org
Fri Oct 12 02:14:19 CEST 2012


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Fri Oct 12 02:13:56 2012 +0200| [f5ab870fb88f9a70117dd14ef8d2bf4062199581] | committer: Pierre Ynard

rotate: simplify angle stuff

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f5ab870fb88f9a70117dd14ef8d2bf4062199581
---

 modules/video_filter/rotate.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/video_filter/rotate.c b/modules/video_filter/rotate.c
index 734bb5c..6c8dfbe 100644
--- a/modules/video_filter/rotate.c
+++ b/modules/video_filter/rotate.c
@@ -211,11 +211,10 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
 
     if( p_sys->p_motion != NULL )
     {
-        int i_angle = motion_get_angle( p_sys->p_motion );
+        int i_angle = motion_get_angle( p_sys->p_motion ) / 2;
         if( p_sys->i_angle != i_angle )
         {
             p_sys->i_angle = i_angle;
-            i_angle = ((3600+i_angle/2)%3600);
             cache_trigo( i_angle, &p_sys->i_sin, &p_sys->i_cos );
         }
     }
@@ -376,11 +375,10 @@ static picture_t *FilterPacked( filter_t *p_filter, picture_t *p_pic )
 
     if( p_sys->p_motion != NULL )
     {
-        int i_angle = motion_get_angle( p_sys->p_motion );
+        int i_angle = motion_get_angle( p_sys->p_motion ) / 2;
         if( p_sys->i_angle != i_angle )
         {
             p_sys->i_angle = i_angle;
-            i_angle = ((3600+i_angle/2)%3600);
             cache_trigo( i_angle, &p_sys->i_sin, &p_sys->i_cos );
         }
     }



More information about the vlc-commits mailing list