* all: added a new access_filter module: record + one hotkey to start/stop
[vlc.git] / modules / video_chroma / i422_yuy2.c
index 69976a2..b0ec75c 100644 (file)
@@ -2,7 +2,7 @@
  * i422_yuy2.c : YUV to YUV conversion module for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: i422_yuy2.c,v 1.4 2003/11/06 17:08:12 nitrox Exp $
+ * $Id$
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -60,7 +60,7 @@ static void I422_YV12           ( vout_thread_t *, picture_t *, picture_t * );
  *****************************************************************************/
 vlc_module_begin();
 #if defined (MODULE_NAME_IS_i422_yuy2)
-    set_description( _("conversions from " SRC_FOURCC " to " DEST_FOURCC) );
+    set_description( _("Conversions from " SRC_FOURCC " to " DEST_FOURCC) );
     set_capability( "chroma", 80 );
 #elif defined (MODULE_NAME_IS_i422_yuy2_mmx)
     set_description( _("MMX conversions from " SRC_FOURCC " to " DEST_FOURCC) );
@@ -162,12 +162,7 @@ static void I422_YUY2( vout_thread_t *p_vout, picture_t *p_source,
             __asm__( ".align 8" MMX_YUV422_YUYV
                      : : "r" (p_line), "r" (p_y), "r" (p_u), "r" (p_v) ); 
 
-            p_line += 8; p_y += 4; p_u += 2; p_v += 2;
-
-            __asm__( ".align 8" MMX_YUV422_YUYV
-                     : : "r" (p_line), "r" (p_y), "r" (p_u), "r" (p_v) ); 
-
-            p_line += 8; p_y += 4; p_u += 2; p_v += 2;
+            p_line += 16; p_y += 8; p_u += 4; p_v += 4;
 #endif
         }
     }
@@ -199,12 +194,7 @@ static void I422_YVYU( vout_thread_t *p_vout, picture_t *p_source,
             __asm__( ".align 8" MMX_YUV422_YVYU
                      : : "r" (p_line), "r" (p_y), "r" (p_u), "r" (p_v) ); 
 
-            p_line += 8; p_y += 4; p_u += 2; p_v += 2;
-
-            __asm__( ".align 8" MMX_YUV422_YVYU
-                     : : "r" (p_line), "r" (p_y), "r" (p_u), "r" (p_v) ); 
-
-            p_line += 8; p_y += 4; p_u += 2; p_v += 2;
+            p_line += 16; p_y += 8; p_u += 4; p_v += 4;
 #endif
         }
     }
@@ -236,12 +226,7 @@ static void I422_UYVY( vout_thread_t *p_vout, picture_t *p_source,
             __asm__( ".align 8" MMX_YUV422_UYVY
                      : : "r" (p_line), "r" (p_y), "r" (p_u), "r" (p_v) ); 
 
-            p_line += 8; p_y += 4; p_u += 2; p_v += 2;
-
-            __asm__( ".align 8" MMX_YUV422_UYVY
-                     : : "r" (p_line), "r" (p_y), "r" (p_u), "r" (p_v) ); 
-
-            p_line += 8; p_y += 4; p_u += 2; p_v += 2;
+            p_line += 16; p_y += 8; p_u += 4; p_v += 4;
 #endif
         }
     }
@@ -263,7 +248,7 @@ static void I422_IUYV( vout_thread_t *p_vout, picture_t *p_source,
 static void I422_cyuv( vout_thread_t *p_vout, picture_t *p_source,
                                               picture_t *p_dest )
 {
-    uint8_t *p_line = p_dest->p->p_pixels + p_dest->p->i_lines * p_dest->p->i_pitch;
+    uint8_t *p_line = p_dest->p->p_pixels + p_dest->p->i_visible_lines * p_dest->p->i_pitch;
     uint8_t *p_y = p_source->Y_PIXELS;
     uint8_t *p_u = p_source->U_PIXELS;
     uint8_t *p_v = p_source->V_PIXELS;
@@ -285,12 +270,7 @@ static void I422_cyuv( vout_thread_t *p_vout, picture_t *p_source,
             __asm__( ".align 8" MMX_YUV422_UYVY
                      : : "r" (p_line), "r" (p_y), "r" (p_u), "r" (p_v) ); 
 
-            p_line += 8; p_y += 4; p_u += 2; p_v += 2;
-
-            __asm__( ".align 8" MMX_YUV422_UYVY
-                     : : "r" (p_line), "r" (p_y), "r" (p_u), "r" (p_v) ); 
-
-            p_line += 8; p_y += 4; p_u += 2; p_v += 2;
+            p_line += 16; p_y += 8; p_u += 4; p_v += 4;
 #endif
         }
     }
@@ -303,7 +283,7 @@ static void I422_cyuv( vout_thread_t *p_vout, picture_t *p_source,
 static void I422_Y211( vout_thread_t *p_vout, picture_t *p_source,
                                               picture_t *p_dest )
 {
-    uint8_t *p_line = p_dest->p->p_pixels + p_dest->p->i_lines * p_dest->p->i_pitch;
+    uint8_t *p_line = p_dest->p->p_pixels + p_dest->p->i_visible_lines * p_dest->p->i_pitch;
     uint8_t *p_y = p_source->Y_PIXELS;
     uint8_t *p_u = p_source->U_PIXELS;
     uint8_t *p_v = p_source->V_PIXELS;