[vlc-commits] motion: fix orientation of transform filter

Pierre Ynard git at videolan.org
Thu Nov 22 02:18:09 CET 2012


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Thu Nov 22 02:02:11 2012 +0100| [d7bb5d8230792056223d3d9053c4f6ccc77fdfcf] | committer: Pierre Ynard

motion: fix orientation of transform filter

The goal of the motion interface is to keep the video upside up. The
angles of the rotate and transform filters are oriented in opposite
directions, yet both filters are treated in the same way by the motion
code: this is incoherent and at least one code path is wrong, regardless
of the orientation of the motion sensors. On my HDAPS T42, the transform
path would turn the video upside down... my take is that its orientation
got flipped somewhere along the way. This fixes that.

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

 modules/control/motion.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/control/motion.c b/modules/control/motion.c
index 27255df..2291f52 100644
--- a/modules/control/motion.c
+++ b/modules/control/motion.c
@@ -133,7 +133,7 @@ static void RunIntf( intf_thread_t *p_intf )
         if( i_x < -HIGH_THRESHOLD && i_oldx > -LOW_THRESHOLD )
         {
             b_change = true;
-            psz_type = "270";
+            psz_type = "90";
         }
         else if( ( i_x > -LOW_THRESHOLD && i_oldx < -HIGH_THRESHOLD )
                  || ( i_x < LOW_THRESHOLD && i_oldx > HIGH_THRESHOLD ) )
@@ -144,7 +144,7 @@ static void RunIntf( intf_thread_t *p_intf )
         else if( i_x > HIGH_THRESHOLD && i_oldx < LOW_THRESHOLD )
         {
             b_change = true;
-            psz_type = "90";
+            psz_type = "270";
         }
 
         if( b_change )



More information about the vlc-commits mailing list