]> git.sesse.net Git - vlc/commitdiff
* modules/video_filter/*: use p_vout->fmt_in/out.
authorGildas Bazin <gbazin@videolan.org>
Tue, 25 Oct 2005 19:24:21 +0000 (19:24 +0000)
committerGildas Bazin <gbazin@videolan.org>
Tue, 25 Oct 2005 19:24:21 +0000 (19:24 +0000)
modules/video_filter/clone.c
modules/video_filter/distort.c
modules/video_filter/invert.c
modules/video_filter/logo.c
modules/video_filter/motionblur.c
modules/video_filter/motiondetect.c
modules/video_filter/transform.c

index 78533feaa31eb848a1044cb2930cf48f82138b18..108ee84cb284b774e125109ba7d3c19cbb039199 100644 (file)
@@ -214,14 +214,8 @@ static int Init( vout_thread_t *p_vout )
     p_vout->output.i_width  = p_vout->render.i_width;
     p_vout->output.i_height = p_vout->render.i_height;
     p_vout->output.i_aspect = p_vout->render.i_aspect;
-
-    fmt.i_width = fmt.i_visible_width = p_vout->render.i_width;
-    fmt.i_height = fmt.i_visible_height = p_vout->render.i_height;
-    fmt.i_x_offset = fmt.i_y_offset = 0;
-    fmt.i_chroma = p_vout->render.i_chroma;
-    fmt.i_aspect = p_vout->render.i_aspect;
-    fmt.i_sar_num = p_vout->render.i_aspect * fmt.i_height / fmt.i_width;
-    fmt.i_sar_den = VOUT_ASPECT_FACTOR;
+    p_vout->fmt_out = p_vout->fmt_in;
+    fmt = p_vout->fmt_out;
 
     /* Try to open the real video output */
     msg_Dbg( p_vout, "spawning the real video outputs" );
index e370ea35a09f4742a093d8a9d9181381c74a9ee0..61bd9f4dd3df09fd7baab8dbbe1eb5890921cf15 100644 (file)
@@ -174,14 +174,8 @@ static int Init( vout_thread_t *p_vout )
     p_vout->output.i_width  = p_vout->render.i_width;
     p_vout->output.i_height = p_vout->render.i_height;
     p_vout->output.i_aspect = p_vout->render.i_aspect;
-
-    fmt.i_width = fmt.i_visible_width = p_vout->render.i_width;
-    fmt.i_height = fmt.i_visible_height = p_vout->render.i_height;
-    fmt.i_x_offset = fmt.i_y_offset = 0;
-    fmt.i_chroma = p_vout->render.i_chroma;
-    fmt.i_aspect = p_vout->render.i_aspect;
-    fmt.i_sar_num = p_vout->render.i_aspect * fmt.i_height / fmt.i_width;
-    fmt.i_sar_den = VOUT_ASPECT_FACTOR;
+    p_vout->fmt_out = p_vout->fmt_in;
+    fmt = p_vout->fmt_out;
 
     /* Try to open the real video output */
     msg_Dbg( p_vout, "spawning the real video output" );
index 05ccb93b26ffc12e363970f5176e0ad0f1585809..e79ce2373f7d1ae684da3687ec65ddc992c2605f 100644 (file)
@@ -120,14 +120,8 @@ static int Init( vout_thread_t *p_vout )
     p_vout->output.i_width  = p_vout->render.i_width;
     p_vout->output.i_height = p_vout->render.i_height;
     p_vout->output.i_aspect = p_vout->render.i_aspect;
-
-    fmt.i_width = fmt.i_visible_width = p_vout->render.i_width;
-    fmt.i_height = fmt.i_visible_height = p_vout->render.i_height;
-    fmt.i_x_offset = fmt.i_y_offset = 0;
-    fmt.i_chroma = p_vout->render.i_chroma;
-    fmt.i_aspect = p_vout->render.i_aspect;
-    fmt.i_sar_num = p_vout->render.i_aspect * fmt.i_height / fmt.i_width;
-    fmt.i_sar_den = VOUT_ASPECT_FACTOR;
+    p_vout->fmt_out = p_vout->fmt_in;
+    fmt = p_vout->fmt_out;
 
     /* Try to open the real video output */
     msg_Dbg( p_vout, "spawning the real video output" );
index 19b34bf2d31ff08ed0e4a6eac3cfa34a8469cdf5..aaa3c6b1475d360616659d9cd36b0ae5d6f47e85 100644 (file)
@@ -220,14 +220,8 @@ static int Init( vout_thread_t *p_vout )
     p_vout->output.i_width  = p_vout->render.i_width;
     p_vout->output.i_height = p_vout->render.i_height;
     p_vout->output.i_aspect = p_vout->render.i_aspect;
-
-    fmt.i_width = fmt.i_visible_width = p_vout->render.i_width;
-    fmt.i_height = fmt.i_visible_height = p_vout->render.i_height;
-    fmt.i_x_offset = fmt.i_y_offset = 0;
-    fmt.i_chroma = p_vout->render.i_chroma;
-    fmt.i_aspect = p_vout->render.i_aspect;
-    fmt.i_sar_num = p_vout->render.i_aspect * fmt.i_height / fmt.i_width;
-    fmt.i_sar_den = VOUT_ASPECT_FACTOR;
+    p_vout->fmt_out = p_vout->fmt_in;
+    fmt = p_vout->fmt_out;
 
     /* Load the video blending filter */
     p_sys->p_blend = vlc_object_create( p_vout, sizeof(filter_t) );
index bd93662cc50924e624108b68f5ebfbdcdb73cfe4..df36717c5223d09471ebec95e901d8e4db13546d 100644 (file)
@@ -148,6 +148,8 @@ static int Init( vout_thread_t *p_vout )
             p_vout->output.i_width  = p_vout->render.i_width;
             p_vout->output.i_height = p_vout->render.i_height;
             p_vout->output.i_aspect = p_vout->render.i_aspect;
+            p_vout->fmt_out = p_vout->fmt_in;
+            fmt = p_vout->fmt_out;
             break;
 
         default:
@@ -157,14 +159,6 @@ static int Init( vout_thread_t *p_vout )
 
     msg_Dbg( p_vout, "spawning the real video output" );
 
-    fmt.i_width = fmt.i_visible_width = p_vout->output.i_width;
-    fmt.i_height = fmt.i_visible_height = p_vout->output.i_height;
-    fmt.i_x_offset = fmt.i_y_offset = 0;
-    fmt.i_chroma = p_vout->output.i_chroma;
-    fmt.i_aspect = p_vout->output.i_aspect;
-    fmt.i_sar_num = p_vout->output.i_aspect * fmt.i_height / fmt.i_width;
-    fmt.i_sar_den = VOUT_ASPECT_FACTOR;
-
     switch( p_vout->render.i_chroma )
     {
     case VLC_FOURCC('I','4','2','0'):
index e0f65805eb3dc4cee791c5c01b5d5cc5b18ce6e1..b744333e5cc10d58a5575e7393192f2f1871ab5d 100644 (file)
@@ -2,7 +2,7 @@
  * motiondetect.c : Motion detect video effect plugin for vlc
  *****************************************************************************
  * Copyright (C) 2005 the VideoLAN team
- * $Id$
+ * $Id$
  *
  * Authors: Jérôme Decoodt <djc@videolan.org>
  *
@@ -222,14 +222,8 @@ static int Init( vout_thread_t *p_vout )
     p_vout->output.i_width  = p_vout->render.i_width;
     p_vout->output.i_height = p_vout->render.i_height;
     p_vout->output.i_aspect = p_vout->render.i_aspect;
-
-    fmt.i_width = fmt.i_visible_width = p_vout->render.i_width;
-    fmt.i_height = fmt.i_visible_height = p_vout->render.i_height;
-    fmt.i_x_offset = fmt.i_y_offset = 0;
-    fmt.i_chroma = p_vout->render.i_chroma;
-    fmt.i_aspect = p_vout->render.i_aspect;
-    fmt.i_sar_num = p_vout->render.i_aspect * fmt.i_height / fmt.i_width;
-    fmt.i_sar_den = VOUT_ASPECT_FACTOR;
+    p_vout->fmt_out = p_vout->fmt_in;
+    fmt = p_vout->fmt_out;
 
     /* Try to open the real video output */
     msg_Dbg( p_vout, "spawning the real video output" );
index 5886f41569b141669c3cbc1ab38970a9196f9e43..72cddfa7f87414983198f103af504cdfc6173c07 100644 (file)
@@ -189,26 +189,27 @@ static int Init( vout_thread_t *p_vout )
     p_vout->output.i_width  = p_vout->render.i_width;
     p_vout->output.i_height = p_vout->render.i_height;
     p_vout->output.i_aspect = p_vout->render.i_aspect;
-
-    fmt.i_width = fmt.i_visible_width = p_vout->render.i_width;
-    fmt.i_height = fmt.i_visible_height = p_vout->render.i_height;
-    fmt.i_x_offset = fmt.i_y_offset = 0;
-    fmt.i_chroma = p_vout->render.i_chroma;
-    fmt.i_aspect = p_vout->render.i_aspect;
-    fmt.i_sar_num = p_vout->render.i_aspect * fmt.i_height / fmt.i_width;
-    fmt.i_sar_den = VOUT_ASPECT_FACTOR;
+    p_vout->fmt_out = p_vout->fmt_in;
+    fmt = p_vout->fmt_out;
 
     /* Try to open the real video output */
     msg_Dbg( p_vout, "spawning the real video output" );
 
     if( p_vout->p_sys->b_rotation )
     {
-        fmt.i_width = fmt.i_visible_width = p_vout->render.i_height;
-        fmt.i_height = fmt.i_visible_height = p_vout->render.i_width;
+        fmt.i_width = p_vout->fmt_out.i_height;
+        fmt.i_visible_width = p_vout->fmt_out.i_visible_height;
+        fmt.i_x_offset = p_vout->fmt_out.i_y_offset;
+
+        fmt.i_height = p_vout->fmt_out.i_width;
+        fmt.i_visible_height = p_vout->fmt_out.i_visible_width;
+        fmt.i_y_offset = p_vout->fmt_out.i_x_offset;
+
         fmt.i_aspect = VOUT_ASPECT_FACTOR *
-            (uint64_t)VOUT_ASPECT_FACTOR / p_vout->render.i_aspect;
-        fmt.i_sar_num = VOUT_ASPECT_FACTOR;
-        fmt.i_sar_den = p_vout->render.i_aspect * fmt.i_height / fmt.i_width;
+            (uint64_t)VOUT_ASPECT_FACTOR / fmt.i_aspect;
+
+        fmt.i_sar_num = p_vout->fmt_out.i_sar_den;
+        fmt.i_sar_den = p_vout->fmt_out.i_sar_num;
 
         p_vout->p_sys->p_vout = vout_Create( p_vout, &fmt );
     }