]> git.sesse.net Git - vlc/commitdiff
* all: fix some gcc warnings and removed all u8/u16/u32.
authorLaurent Aimar <fenrir@videolan.org>
Fri, 29 Aug 2003 18:58:05 +0000 (18:58 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Fri, 29 Aug 2003 18:58:05 +0000 (18:58 +0000)
modules/video_chroma/i420_rgb.c
modules/video_chroma/i420_rgb.h
modules/video_chroma/i420_rgb16.c
modules/video_chroma/i420_rgb8.c
modules/video_chroma/i420_rgb_mmx.h
modules/video_chroma/i420_ymga.c
modules/video_chroma/i420_yuy2.c
modules/video_chroma/i420_yuy2.h
modules/video_chroma/i422_yuy2.c
modules/video_chroma/i422_yuy2.h

index 00ce159b1d9f35703c2a28b97c01e87f7c8c3bf7..4bf0342d409890272f1262f5009f548a8f6a9fe0 100644 (file)
@@ -2,7 +2,7 @@
  * i420_rgb.c : YUV to bitmap RGB conversion module for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: i420_rgb.c,v 1.3 2002/11/25 19:29:10 sam Exp $
+ * $Id: i420_rgb.c,v 1.4 2003/08/29 18:58:05 fenrir Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -56,7 +56,7 @@ static void Deactivate ( vlc_object_t * );
 #if defined (MODULE_NAME_IS_i420_rgb)
 static void SetGammaTable       ( int *pi_table, double f_gamma );
 static void SetYUV              ( vout_thread_t * );
-static void Set8bppPalette      ( vout_thread_t *, u8 * );
+static void Set8bppPalette      ( vout_thread_t *, uint8_t * );
 #endif
 
 /*****************************************************************************
@@ -195,14 +195,14 @@ static int Activate( vlc_object_t *p_this )
     switch( p_vout->output.i_chroma )
     {
     case VLC_FOURCC('R','G','B','2'):
-        i_tables_size = sizeof( u8 ) * PALETTE_TABLE_SIZE;
+        i_tables_size = sizeof( uint8_t ) * PALETTE_TABLE_SIZE;
         break;
     case VLC_FOURCC('R','V','1','5'):
     case VLC_FOURCC('R','V','1','6'):
-        i_tables_size = sizeof( u16 ) * RGB_TABLE_SIZE;
+        i_tables_size = sizeof( uint16_t ) * RGB_TABLE_SIZE;
         break;
     default: /* RV24, RV32 */
-        i_tables_size = sizeof( u32 ) * RGB_TABLE_SIZE;
+        i_tables_size = sizeof( uint32_t ) * RGB_TABLE_SIZE;
         break;
     }
 
@@ -277,13 +277,13 @@ static void SetYUV( vout_thread_t *p_vout )
     switch( p_vout->output.i_chroma )
     {
     case VLC_FOURCC('R','G','B','2'):
-        p_vout->chroma.p_sys->p_rgb8 = (u8 *)p_vout->chroma.p_sys->p_base;
+        p_vout->chroma.p_sys->p_rgb8 = (uint8_t *)p_vout->chroma.p_sys->p_base;
         Set8bppPalette( p_vout, p_vout->chroma.p_sys->p_rgb8 );
         break;
 
     case VLC_FOURCC('R','V','1','5'):
     case VLC_FOURCC('R','V','1','6'):
-        p_vout->chroma.p_sys->p_rgb16 = (u16 *)p_vout->chroma.p_sys->p_base;
+        p_vout->chroma.p_sys->p_rgb16 = (uint16_t *)p_vout->chroma.p_sys->p_base;
         for( i_index = 0; i_index < RED_MARGIN; i_index++ )
         {
             p_vout->chroma.p_sys->p_rgb16[RED_OFFSET - RED_MARGIN + i_index] = RGB2PIXEL( p_vout, pi_gamma[0], 0, 0 );
@@ -309,7 +309,7 @@ static void SetYUV( vout_thread_t *p_vout )
 
     case VLC_FOURCC('R','V','2','4'):
     case VLC_FOURCC('R','V','3','2'):
-        p_vout->chroma.p_sys->p_rgb32 = (u32 *)p_vout->chroma.p_sys->p_base;
+        p_vout->chroma.p_sys->p_rgb32 = (uint32_t *)p_vout->chroma.p_sys->p_base;
         for( i_index = 0; i_index < RED_MARGIN; i_index++ )
         {
             p_vout->chroma.p_sys->p_rgb32[RED_OFFSET - RED_MARGIN + i_index] = RGB2PIXEL( p_vout, pi_gamma[0], 0, 0 );
@@ -335,14 +335,14 @@ static void SetYUV( vout_thread_t *p_vout )
     }
 }
 
-static void Set8bppPalette( vout_thread_t *p_vout, u8 *p_rgb8 )
+static void Set8bppPalette( vout_thread_t *p_vout, uint8_t *p_rgb8 )
 {
     #define CLIP( x ) ( ((x < 0) ? 0 : (x > 255) ? 255 : x) << 8 )
 
     int y,u,v;
     int r,g,b;
     int i = 0, j = 0;
-    u16 red[ 256 ], green[ 256 ], blue[ 256 ];
+    uint16_t red[ 256 ], green[ 256 ], blue[ 256 ];
     unsigned char p_lookup[PALETTE_TABLE_SIZE];
 
     /* This loop calculates the intersection of an YUV box and the RGB cube. */
index b6d8e2f435e60b089a9d17b861c3390f4b553740..e90cbab92a989ab1d4832e8e69678bf577ddb2d1 100644 (file)
@@ -2,7 +2,7 @@
  * i420_rgb.h : YUV to bitmap RGB conversion module for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: i420_rgb.h,v 1.3 2002/11/26 20:04:33 sam Exp $
+ * $Id: i420_rgb.h,v 1.4 2003/08/29 18:58:05 fenrir Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  *****************************************************************************/
 struct chroma_sys_t
 {
-    u8  *p_buffer;
+    uint8_t  *p_buffer;
     int *p_offset;
 
 #ifdef MODULE_NAME_IS_i420_rgb
     /* Pre-calculated conversion tables */
     void *p_base;                          /* base for all conversion tables */
-    u8   *p_rgb8;                                        /* RGB 8 bits table */
-    u16  *p_rgb16;                                      /* RGB 16 bits table */
-    u32  *p_rgb32;                                      /* RGB 32 bits table */
+    uint8_t   *p_rgb8;                                   /* RGB 8 bits table */
+    uint16_t  *p_rgb16;                                 /* RGB 16 bits table */
+    uint32_t  *p_rgb32;                                 /* RGB 32 bits table */
 #endif
 };
 
@@ -175,13 +175,13 @@ void E_(I420_RGB32)        ( vout_thread_t *, picture_t *, picture_t * );
         {                                                                     \
             *p_pic++ = *p_buffer;   p_buffer += *p_offset++;                  \
         }                                                                     \
-        (u8*)p_pic += i_right_margin;                                         \
+        (uint8_t*)p_pic += i_right_margin;                                    \
     }                                                                         \
     else                                                                      \
     {                                                                         \
         /* No scaling, conversion has been done directly in picture memory.   \
          * Increment of picture pointer to end of line is still needed */     \
-        (u8*)p_pic += p_dest->p->i_pitch;                                     \
+        (uint8_t*)p_pic += p_dest->p->i_pitch;                                \
     }                                                                         \
 
 /*****************************************************************************
@@ -213,7 +213,7 @@ void E_(I420_RGB32)        ( vout_thread_t *, picture_t *, picture_t * );
         }                                                                     \
     }                                                                         \
     /* Increment of picture pointer to end of line is still needed */         \
-    (u8*)p_pic += i_right_margin;                                             \
+    (uint8_t*)p_pic += i_right_margin;                                        \
                                                                               \
     /* Increment the Y coordinate in the matrix, modulo 4 */                  \
     i_real_y = (i_real_y + 1) & 0x3;                                          \
@@ -267,7 +267,7 @@ void E_(I420_RGB32)        ( vout_thread_t *, picture_t *, picture_t * );
             /* Height increment: copy previous picture line */                \
             p_vout->p_vlc->pf_memcpy( p_pic, p_pic_start,                     \
                                       p_vout->output.i_width * BPP );         \
-            (u8*)p_pic += p_dest->p->i_pitch;                                 \
+            (uint8_t*)p_pic += p_dest->p->i_pitch;                            \
         }                                                                     \
         i_scale_count += p_vout->output.i_height;                             \
         break;                                                                \
index caa4f92f2fd469601cf78e7333bea3a17deee126..8cc3ebafbe63db89e25b4b11d0cbcb03b96fba8e 100644 (file)
@@ -2,7 +2,7 @@
  * i420_rgb16.c : YUV to bitmap RGB conversion module for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: i420_rgb16.c,v 1.4 2002/11/25 19:29:10 sam Exp $
+ * $Id: i420_rgb16.c,v 1.5 2003/08/29 18:58:05 fenrir Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -54,10 +54,10 @@ void E_(I420_RGB16_dithering)( vout_thread_t *p_vout, picture_t *p_src,
                                                       picture_t *p_dest )
 {
     /* We got this one from the old arguments */
-    u16 *p_pic = (u16*)p_dest->p->p_pixels;
-    u8  *p_y   = p_src->Y_PIXELS;
-    u8  *p_u   = p_src->U_PIXELS;
-    u8  *p_v   = p_src->V_PIXELS;
+    uint16_t *p_pic = (uint16_t*)p_dest->p->p_pixels;
+    uint8_t  *p_y   = p_src->Y_PIXELS;
+    uint8_t  *p_u   = p_src->U_PIXELS;
+    uint8_t  *p_v   = p_src->V_PIXELS;
 
     vlc_bool_t   b_hscale;                        /* horizontal scaling type */
     int          i_vscale;                          /* vertical scaling type */
@@ -68,15 +68,15 @@ void E_(I420_RGB16_dithering)( vout_thread_t *p_vout, picture_t *p_src,
     int         i_rewind;
     int         i_scale_count;                       /* scale modulo counter */
     int         i_chroma_width = p_vout->render.i_width / 2; /* chroma width */
-    u16 *       p_pic_start;       /* beginning of the current line for copy */
+    uint16_t *  p_pic_start;       /* beginning of the current line for copy */
     int         i_uval, i_vval;                           /* U and V samples */
     int         i_red, i_green, i_blue;          /* U and V modified samples */
-    u16 *       p_yuv = p_vout->chroma.p_sys->p_rgb16;
-    u16 *       p_ybase;                     /* Y dependant conversion table */
+    uint16_t *  p_yuv = p_vout->chroma.p_sys->p_rgb16;
+    uint16_t *  p_ybase;                     /* Y dependant conversion table */
 
     /* Conversion buffer pointer */
-    u16 *       p_buffer_start = (u16*)p_vout->chroma.p_sys->p_buffer;
-    u16 *       p_buffer;
+    uint16_t *  p_buffer_start = (uint16_t*)p_vout->chroma.p_sys->p_buffer;
+    uint16_t *  p_buffer;
 
     /* Offset array pointer */
     int *       p_offset_start = p_vout->chroma.p_sys->p_offset;
@@ -190,10 +190,10 @@ void E_(I420_RGB16)( vout_thread_t *p_vout, picture_t *p_src,
                                             picture_t *p_dest )
 {
     /* We got this one from the old arguments */
-    u16 *p_pic = (u16*)p_dest->p->p_pixels;
-    u8  *p_y   = p_src->Y_PIXELS;
-    u8  *p_u   = p_src->U_PIXELS;
-    u8  *p_v   = p_src->V_PIXELS;
+    uint16_t *p_pic = (uint16_t*)p_dest->p->p_pixels;
+    uint8_t  *p_y   = p_src->Y_PIXELS;
+    uint8_t  *p_u   = p_src->U_PIXELS;
+    uint8_t  *p_v   = p_src->V_PIXELS;
 
     vlc_bool_t  b_hscale;                         /* horizontal scaling type */
     unsigned int i_vscale;                          /* vertical scaling type */
@@ -203,17 +203,17 @@ void E_(I420_RGB16)( vout_thread_t *p_vout, picture_t *p_src,
     int         i_rewind;
     int         i_scale_count;                       /* scale modulo counter */
     int         i_chroma_width = p_vout->render.i_width / 2; /* chroma width */
-    u16 *       p_pic_start;       /* beginning of the current line for copy */
+    uint16_t *  p_pic_start;       /* beginning of the current line for copy */
 #if defined (MODULE_NAME_IS_i420_rgb)
     int         i_uval, i_vval;                           /* U and V samples */
     int         i_red, i_green, i_blue;          /* U and V modified samples */
-    u16 *       p_yuv = p_vout->chroma.p_sys->p_rgb16;
-    u16 *       p_ybase;                     /* Y dependant conversion table */
+    uint16_t *  p_yuv = p_vout->chroma.p_sys->p_rgb16;
+    uint16_t *  p_ybase;                     /* Y dependant conversion table */
 #endif
 
     /* Conversion buffer pointer */
-    u16 *       p_buffer_start = (u16*)p_vout->chroma.p_sys->p_buffer;
-    u16 *       p_buffer;
+    uint16_t *  p_buffer_start = (uint16_t*)p_vout->chroma.p_sys->p_buffer;
+    uint16_t *  p_buffer;
 
     /* Offset array pointer */
     int *       p_offset_start = p_vout->chroma.p_sys->p_offset;
@@ -359,10 +359,10 @@ void E_(I420_RGB32)( vout_thread_t *p_vout, picture_t *p_src,
                                             picture_t *p_dest )
 {
     /* We got this one from the old arguments */
-    u32 *p_pic = (u32*)p_dest->p->p_pixels;
-    u8  *p_y   = p_src->Y_PIXELS;
-    u8  *p_u   = p_src->U_PIXELS;
-    u8  *p_v   = p_src->V_PIXELS;
+    uint32_t *p_pic = (uint32_t*)p_dest->p->p_pixels;
+    uint8_t  *p_y   = p_src->Y_PIXELS;
+    uint8_t  *p_u   = p_src->U_PIXELS;
+    uint8_t  *p_v   = p_src->V_PIXELS;
 
     vlc_bool_t  b_hscale;                         /* horizontal scaling type */
     unsigned int i_vscale;                          /* vertical scaling type */
@@ -372,17 +372,17 @@ void E_(I420_RGB32)( vout_thread_t *p_vout, picture_t *p_src,
     int         i_rewind;
     int         i_scale_count;                       /* scale modulo counter */
     int         i_chroma_width = p_vout->render.i_width / 2; /* chroma width */
-    u32 *       p_pic_start;       /* beginning of the current line for copy */
+    uint32_t *  p_pic_start;       /* beginning of the current line for copy */
 #if defined (MODULE_NAME_IS_i420_rgb)
     int         i_uval, i_vval;                           /* U and V samples */
     int         i_red, i_green, i_blue;          /* U and V modified samples */
-    u32 *       p_yuv = p_vout->chroma.p_sys->p_rgb32;
-    u32 *       p_ybase;                     /* Y dependant conversion table */
+    uint32_t *  p_yuv = p_vout->chroma.p_sys->p_rgb32;
+    uint32_t *  p_ybase;                     /* Y dependant conversion table */
 #endif
 
     /* Conversion buffer pointer */
-    u32 *       p_buffer_start = (u32*)p_vout->chroma.p_sys->p_buffer;
-    u32 *       p_buffer;
+    uint32_t *  p_buffer_start = (uint32_t*)p_vout->chroma.p_sys->p_buffer;
+    uint32_t *  p_buffer;
 
     /* Offset array pointer */
     int *       p_offset_start = p_vout->chroma.p_sys->p_offset;
index ce2e0d5f5a31e2f9b0f5d6ca430ab8b3d46aae2f..3d843f7720170dc38e2e347f168ac63f9c690ed0 100644 (file)
@@ -2,7 +2,7 @@
  * i420_rgb8.c : YUV to bitmap RGB conversion module for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: i420_rgb8.c,v 1.2 2002/11/20 13:37:36 sam Exp $
+ * $Id: i420_rgb8.c,v 1.3 2003/08/29 18:58:05 fenrir Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -41,10 +41,10 @@ static void SetOffset( int, int, int, int, vlc_bool_t *, int *, int * );
 void E_(I420_RGB8)( vout_thread_t *p_vout, picture_t *p_src, picture_t *p_dest )
 {
     /* We got this one from the old arguments */
-    u8 *p_pic = (u8*)p_dest->p->p_pixels;
-    u8 *p_y   = p_src->Y_PIXELS;
-    u8 *p_u   = p_src->U_PIXELS;
-    u8 *p_v   = p_src->V_PIXELS;
+    uint8_t *p_pic = (uint8_t*)p_dest->p->p_pixels;
+    uint8_t *p_y   = p_src->Y_PIXELS;
+    uint8_t *p_u   = p_src->U_PIXELS;
+    uint8_t *p_v   = p_src->V_PIXELS;
 
     vlc_bool_t  b_hscale;                         /* horizontal scaling type */
     unsigned int i_vscale;                          /* vertical scaling type */
@@ -55,7 +55,7 @@ void E_(I420_RGB8)( vout_thread_t *p_vout, picture_t *p_src, picture_t *p_dest )
     unsigned int i_chroma_width = p_vout->render.i_width / 2;/* chroma width */
 
     /* Lookup table */
-    u8 *        p_lookup = p_vout->chroma.p_sys->p_base;
+    uint8_t *        p_lookup = p_vout->chroma.p_sys->p_base;
 
     /* Offset array pointer */
     int *       p_offset_start = p_vout->chroma.p_sys->p_offset;
index d021dd49e0e79e3760f675a9a149d95d74af3007..998e96f8b5a221b62fa81bbe5555e9cffeea8c15 100644 (file)
@@ -2,7 +2,7 @@
  * transforms_yuvmmx.h: MMX YUV transformation assembly
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: i420_rgb_mmx.h,v 1.2 2002/08/08 00:35:11 sam Exp $
+ * $Id: i420_rgb_mmx.h,v 1.3 2003/08/29 18:58:05 fenrir Exp $
  *
  * Authors: Olie Lho <ollie@sis.com.tw>
  *          GaĆ«l Hendryckx <jimmy@via.ecp.fr>
 
 /* hope these constant values are cache line aligned */
 #define UNUSED_U64(foo) \
-    static const u64 foo __asm__ (#foo) __attribute__((unused))
-UNUSED_U64(mmx_80w)     = 0x0080008000800080;
-UNUSED_U64(mmx_10w)     = 0x1010101010101010;
-UNUSED_U64(mmx_00ffw)   = 0x00ff00ff00ff00ff;
-UNUSED_U64(mmx_Y_coeff) = 0x253f253f253f253f;
+    static const uint64_t foo __asm__ (#foo) __attribute__((unused))
+UNUSED_U64(mmx_80w)     = 0x0080008000800080ULL;
+UNUSED_U64(mmx_10w)     = 0x1010101010101010ULL;
+UNUSED_U64(mmx_00ffw)   = 0x00ff00ff00ff00ffULL;
+UNUSED_U64(mmx_Y_coeff) = 0x253f253f253f253fULL;
 
-UNUSED_U64(mmx_U_green) = 0xf37df37df37df37d;
-UNUSED_U64(mmx_U_blue)  = 0x4093409340934093;
-UNUSED_U64(mmx_V_red)   = 0x3312331233123312;
-UNUSED_U64(mmx_V_green) = 0xe5fce5fce5fce5fc;
+UNUSED_U64(mmx_U_green) = 0xf37df37df37df37dULL;
+UNUSED_U64(mmx_U_blue)  = 0x4093409340934093ULL;
+UNUSED_U64(mmx_V_red)   = 0x3312331233123312ULL;
+UNUSED_U64(mmx_V_green) = 0xe5fce5fce5fce5fcULL;
 
-UNUSED_U64(mmx_mask_f8) = 0xf8f8f8f8f8f8f8f8;
-UNUSED_U64(mmx_mask_fc) = 0xfcfcfcfcfcfcfcfc;
+UNUSED_U64(mmx_mask_f8) = 0xf8f8f8f8f8f8f8f8ULL;
+UNUSED_U64(mmx_mask_fc) = 0xfcfcfcfcfcfcfcfcULL;
 #undef UNUSED_U64
 
 #define MMX_INIT_16 "                                                       \n\
index 14341bfd4749551ee4f076976fca83d8cdb6151d..6ba1174bbf54379aa858bc62d59a7f53add7ca46 100644 (file)
@@ -2,7 +2,7 @@
  * i420_ymga.c : YUV to YUV conversion module for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: i420_ymga.c,v 1.1 2002/08/04 17:23:43 sam Exp $
+ * $Id: i420_ymga.c,v 1.2 2003/08/29 18:58:05 fenrir Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -88,8 +88,8 @@ static int Activate( vlc_object_t *p_this )
         default:
             return -1;
     }
-    
-    return 0; 
+
+    return 0;
 }
 
 /* Following functions are local */
@@ -100,9 +100,9 @@ static int Activate( vlc_object_t *p_this )
 static void I420_YMGA( vout_thread_t *p_vout, picture_t *p_source,
                                               picture_t *p_dest )
 {
-    u8 *p_uv = p_dest->U_PIXELS;
-    u8 *p_u = p_source->U_PIXELS;
-    u8 *p_v = p_source->V_PIXELS;
+    uint8_t *p_uv = p_dest->U_PIXELS;
+    uint8_t *p_u = p_source->U_PIXELS;
+    uint8_t *p_v = p_source->V_PIXELS;
 
     int i_x;
 
index ea4158ba5f9ac4f0059938a06626138968d8d20e..03ac21ff484109528abd10c1d2705738cb767892 100644 (file)
@@ -2,7 +2,7 @@
  * i420_yuy2.c : YUV to YUV conversion module for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: i420_yuy2.c,v 1.2 2002/11/20 13:37:36 sam Exp $
+ * $Id: i420_yuy2.c,v 1.3 2003/08/29 18:58:05 fenrir Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -71,8 +71,8 @@ vlc_module_begin();
     set_capability( "chroma", 100 );
     add_requirement( MMX );
     /* Initialize MMX-specific constants */
-    i_00ffw = 0x00ff00ff00ff00ff;
-    i_80w   = 0x0000000080808080;
+    i_00ffw = 0x00ff00ff00ff00ffULL;
+    i_80w   = 0x0000000080808080ULL;
 #endif
     set_callbacks( Activate, NULL );
 vlc_module_end();
@@ -147,10 +147,10 @@ static int Activate( vlc_object_t *p_this )
 static void I420_YUY2( vout_thread_t *p_vout, picture_t *p_source,
                                               picture_t *p_dest )
 {
-    u8 *p_line1, *p_line2 = p_dest->p->p_pixels;
-    u8 *p_y1, *p_y2 = p_source->Y_PIXELS;
-    u8 *p_u = p_source->U_PIXELS;
-    u8 *p_v = p_source->V_PIXELS;
+    uint8_t *p_line1, *p_line2 = p_dest->p->p_pixels;
+    uint8_t *p_y1, *p_y2 = p_source->Y_PIXELS;
+    uint8_t *p_u = p_source->U_PIXELS;
+    uint8_t *p_v = p_source->V_PIXELS;
 
     int i_x, i_y;
 
@@ -192,10 +192,10 @@ static void I420_YUY2( vout_thread_t *p_vout, picture_t *p_source,
 static void I420_YVYU( vout_thread_t *p_vout, picture_t *p_source,
                                               picture_t *p_dest )
 {
-    u8 *p_line1, *p_line2 = p_dest->p->p_pixels;
-    u8 *p_y1, *p_y2 = p_source->Y_PIXELS;
-    u8 *p_u = p_source->U_PIXELS;
-    u8 *p_v = p_source->V_PIXELS;
+    uint8_t *p_line1, *p_line2 = p_dest->p->p_pixels;
+    uint8_t *p_y1, *p_y2 = p_source->Y_PIXELS;
+    uint8_t *p_u = p_source->U_PIXELS;
+    uint8_t *p_v = p_source->V_PIXELS;
 
     int i_x, i_y;
 
@@ -237,10 +237,10 @@ static void I420_YVYU( vout_thread_t *p_vout, picture_t *p_source,
 static void I420_UYVY( vout_thread_t *p_vout, picture_t *p_source,
                                               picture_t *p_dest )
 {
-    u8 *p_line1, *p_line2 = p_dest->p->p_pixels;
-    u8 *p_y1, *p_y2 = p_source->Y_PIXELS;
-    u8 *p_u = p_source->U_PIXELS;
-    u8 *p_v = p_source->V_PIXELS;
+    uint8_t *p_line1, *p_line2 = p_dest->p->p_pixels;
+    uint8_t *p_y1, *p_y2 = p_source->Y_PIXELS;
+    uint8_t *p_u = p_source->U_PIXELS;
+    uint8_t *p_v = p_source->V_PIXELS;
 
     int i_x, i_y;
 
@@ -292,12 +292,14 @@ static void I420_IUYV( vout_thread_t *p_vout, picture_t *p_source,
 static void I420_cyuv( vout_thread_t *p_vout, picture_t *p_source,
                                               picture_t *p_dest )
 {
-    u8 *p_line1 = p_dest->p->p_pixels + p_dest->p->i_lines * p_dest->p->i_pitch
-                                      + p_dest->p->i_pitch;
-    u8 *p_line2 = p_dest->p->p_pixels + p_dest->p->i_lines * p_dest->p->i_pitch;
-    u8 *p_y1, *p_y2 = p_source->Y_PIXELS;
-    u8 *p_u = p_source->U_PIXELS;
-    u8 *p_v = p_source->V_PIXELS;
+    uint8_t *p_line1 = p_dest->p->p_pixels +
+                       p_dest->p->i_lines * p_dest->p->i_pitch
+                       + p_dest->p->i_pitch;
+    uint8_t *p_line2 = p_dest->p->p_pixels +
+                       p_dest->p->i_lines * p_dest->p->i_pitch;
+    uint8_t *p_y1, *p_y2 = p_source->Y_PIXELS;
+    uint8_t *p_u = p_source->U_PIXELS;
+    uint8_t *p_v = p_source->V_PIXELS;
 
     int i_x, i_y;
 
@@ -340,10 +342,10 @@ static void I420_cyuv( vout_thread_t *p_vout, picture_t *p_source,
 static void I420_Y211( vout_thread_t *p_vout, picture_t *p_source,
                                               picture_t *p_dest )
 {
-    u8 *p_line1, *p_line2 = p_dest->p->p_pixels;
-    u8 *p_y1, *p_y2 = p_source->Y_PIXELS;
-    u8 *p_u = p_source->U_PIXELS;
-    u8 *p_v = p_source->V_PIXELS;
+    uint8_t *p_line1, *p_line2 = p_dest->p->p_pixels;
+    uint8_t *p_y1, *p_y2 = p_source->Y_PIXELS;
+    uint8_t *p_u = p_source->U_PIXELS;
+    uint8_t *p_v = p_source->V_PIXELS;
 
     int i_x, i_y;
 
index f56f6c5e645b0a0d8255926a1581f782be9332ba..1cac064732c5c6de909375f7d2eaf7019eca58c6 100644 (file)
@@ -2,7 +2,7 @@
  * i420_yuy2.h : YUV to YUV conversion module for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: i420_yuy2.h,v 1.1 2002/08/04 17:23:43 sam Exp $
+ * $Id: i420_yuy2.h,v 1.2 2003/08/29 18:58:05 fenrir Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -132,12 +132,12 @@ movq      %%mm1, (%1)   # Store YUYV                                      \n\
     *(p_line1)++ = *(p_y1)++; *(p_line2)++ = *(p_y2)++;                     \
 
 #define C_YUV420_Y211( )                                                    \
-    *(p_line1)++ = *(p_y1); ((u16*)p_y1)++;                                 \
-    *(p_line2)++ = *(p_y2); ((u16*)p_y2)++;                                 \
-    *(p_line1)++ = *(p_line2)++ = *(p_u) - 0x80; ((u16*)p_u)++;             \
-    *(p_line1)++ = *(p_y1); ((u16*)p_y1)++;                                 \
-    *(p_line2)++ = *(p_y2); ((u16*)p_y2)++;                                 \
-    *(p_line1)++ = *(p_line2)++ = *(p_v) - 0x80; ((u16*)p_v)++;             \
+    *(p_line1)++ = *(p_y1); ((uint16_t*)p_y1)++;                            \
+    *(p_line2)++ = *(p_y2); ((uint16_t*)p_y2)++;                            \
+    *(p_line1)++ = *(p_line2)++ = *(p_u) - 0x80; ((uint16_t*)p_u)++;        \
+    *(p_line1)++ = *(p_y1); ((uint16_t*)p_y1)++;                            \
+    *(p_line2)++ = *(p_y2); ((uint16_t*)p_y2)++;                            \
+    *(p_line1)++ = *(p_line2)++ = *(p_v) - 0x80; ((uint16_t*)p_v)++;        \
 
 #endif
 
index 6bf6031e623d9e4e82fa985a194c4cce809b3e47..1e0dcff8a1e99724a1a7827f5deaa5f769a26ab1 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.2 2002/11/20 13:37:36 sam Exp $
+ * $Id: i422_yuy2.c,v 1.3 2003/08/29 18:58:05 fenrir Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -136,10 +136,10 @@ static int Activate( vlc_object_t *p_this )
 static void I422_YUY2( vout_thread_t *p_vout, picture_t *p_source,
                                               picture_t *p_dest )
 {
-    u8 *p_line = p_dest->p->p_pixels;
-    u8 *p_y = p_source->Y_PIXELS;
-    u8 *p_u = p_source->U_PIXELS;
-    u8 *p_v = p_source->V_PIXELS;
+    uint8_t *p_line = p_dest->p->p_pixels;
+    uint8_t *p_y = p_source->Y_PIXELS;
+    uint8_t *p_u = p_source->U_PIXELS;
+    uint8_t *p_v = p_source->V_PIXELS;
 
     int i_x, i_y;
 
@@ -173,10 +173,10 @@ static void I422_YUY2( vout_thread_t *p_vout, picture_t *p_source,
 static void I422_YVYU( vout_thread_t *p_vout, picture_t *p_source,
                                               picture_t *p_dest )
 {
-    u8 *p_line = p_dest->p->p_pixels;
-    u8 *p_y = p_source->Y_PIXELS;
-    u8 *p_u = p_source->U_PIXELS;
-    u8 *p_v = p_source->V_PIXELS;
+    uint8_t *p_line = p_dest->p->p_pixels;
+    uint8_t *p_y = p_source->Y_PIXELS;
+    uint8_t *p_u = p_source->U_PIXELS;
+    uint8_t *p_v = p_source->V_PIXELS;
 
     int i_x, i_y;
 
@@ -210,10 +210,10 @@ static void I422_YVYU( vout_thread_t *p_vout, picture_t *p_source,
 static void I422_UYVY( vout_thread_t *p_vout, picture_t *p_source,
                                               picture_t *p_dest )
 {
-    u8 *p_line = p_dest->p->p_pixels;
-    u8 *p_y = p_source->Y_PIXELS;
-    u8 *p_u = p_source->U_PIXELS;
-    u8 *p_v = p_source->V_PIXELS;
+    uint8_t *p_line = p_dest->p->p_pixels;
+    uint8_t *p_y = p_source->Y_PIXELS;
+    uint8_t *p_u = p_source->U_PIXELS;
+    uint8_t *p_v = p_source->V_PIXELS;
 
     int i_x, i_y;
 
@@ -257,10 +257,10 @@ 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 )
 {
-    u8 *p_line = p_dest->p->p_pixels + p_dest->p->i_lines * p_dest->p->i_pitch;
-    u8 *p_y = p_source->Y_PIXELS;
-    u8 *p_u = p_source->U_PIXELS;
-    u8 *p_v = p_source->V_PIXELS;
+    uint8_t *p_line = p_dest->p->p_pixels + p_dest->p->i_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;
 
     int i_x, i_y;
 
@@ -297,10 +297,10 @@ 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 )
 {
-    u8 *p_line = p_dest->p->p_pixels + p_dest->p->i_lines * p_dest->p->i_pitch;
-    u8 *p_y = p_source->Y_PIXELS;
-    u8 *p_u = p_source->U_PIXELS;
-    u8 *p_v = p_source->V_PIXELS;
+    uint8_t *p_line = p_dest->p->p_pixels + p_dest->p->i_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;
 
     int i_x, i_y;
 
index 1ce334eb88bc0566f7729e53e4918bf66d18705d..3e20357924651339d9a199a6a4256ad3e482a0f7 100644 (file)
@@ -2,7 +2,7 @@
  * i422_yuy2.h : YUV to YUV conversion module for vlc
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: i422_yuy2.h,v 1.1 2002/08/04 17:23:43 sam Exp $
+ * $Id: i422_yuy2.h,v 1.2 2003/08/29 18:58:05 fenrir Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -83,10 +83,10 @@ movq      %%mm1, 8(%0)  # Store high UYVY                                 \n\
     *(p_line)++ = *(p_y)++;                                                 \
 
 #define C_YUV422_Y211( p_line, p_y, p_u, p_v )                              \
-    *(p_line)++ = *(p_y); ((u16*)p_y)++;                                    \
-    *(p_line)++ = *(p_u) - 0x80; ((u16*)p_u)++;                             \
-    *(p_line)++ = *(p_y); ((u16*)p_y)++;                                    \
-    *(p_line)++ = *(p_v) - 0x80; ((u16*)p_v)++;                             \
+    *(p_line)++ = *(p_y); ((uint16_t*)p_y)++;                               \
+    *(p_line)++ = *(p_u) - 0x80; ((uint16_t*)p_u)++;                        \
+    *(p_line)++ = *(p_y); ((uint16_t*)p_y)++;                               \
+    *(p_line)++ = *(p_v) - 0x80; ((uint16_t*)p_v)++;                        \
 
 #endif