* ALL: use i_visible_lines in plane_t.
authorGildas Bazin <gbazin@videolan.org>
Sat, 28 Aug 2004 17:36:02 +0000 (17:36 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sat, 28 Aug 2004 17:36:02 +0000 (17:36 +0000)
37 files changed:
modules/access/v4l/v4l.c
modules/codec/cinepak.c
modules/codec/dmo/dmo.c
modules/codec/ffmpeg/video.c
modules/codec/rawvideo.c
modules/codec/tarkin.c
modules/gui/beos/VideoOutput.cpp
modules/gui/macosx/voutqt.m
modules/gui/qnx/vout.c
modules/video_chroma/i420_ymga.c
modules/video_chroma/i420_yuy2.c
modules/video_chroma/i422_yuy2.c
modules/video_filter/adjust.c
modules/video_filter/clone.c
modules/video_filter/crop.c
modules/video_filter/deinterlace.c
modules/video_filter/distort.c
modules/video_filter/invert.c
modules/video_filter/logo.c
modules/video_filter/motionblur.c
modules/video_filter/transform.c
modules/video_filter/wall.c
modules/video_output/aa.c
modules/video_output/caca.c
modules/video_output/directx/directx.c
modules/video_output/fb.c
modules/video_output/ggi.c
modules/video_output/glide.c
modules/video_output/hd1000v.cpp
modules/video_output/mga.c
modules/video_output/opengl.c
modules/video_output/qte/qte.cpp
modules/video_output/sdl.c
modules/video_output/wingdi.c
modules/video_output/x11/xcommon.c
modules/visualization/visual/visual.c
src/video_output/vout_pictures.c

index 396612c..85d21f2 100644 (file)
@@ -438,6 +438,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             *pi64 = (int64_t)var_GetInteger( p_demux, "v4l-caching" ) * 1000;
             return VLC_SUCCESS;
 
+        case DEMUX_GET_TIME:
+            pi64 = (int64_t*)va_arg( args, int64_t * );
+            *pi64 = mdate();
+            return VLC_SUCCESS;
+
         /* TODO implement others */
         default:
             return VLC_EGENERIC;
@@ -1109,7 +1114,7 @@ static int OpenVideoDev( demux_t *p_demux, char *psz_device )
         p_sys->i_video_frame_size = 0;
         for( i = 0; i < p_sys->pic.i_planes; i++ )
         {
-            p_sys->i_video_frame_size += p_sys->pic.p[i].i_lines *
+            p_sys->i_video_frame_size += p_sys->pic.p[i].i_visible_lines *
               p_sys->pic.p[i].i_visible_pitch;
         }
 
index 86be917..c019101 100644 (file)
@@ -2,7 +2,7 @@
  * cinepak.c: cinepak video decoder
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: cinepak.c,v 1.6 2003/11/23 13:25:32 gbazin Exp $
+ * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -173,7 +173,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
             p_src = p_sys->context.p_pix[i_plane];
 
             i_lines = __MIN( p_sys->context.i_lines[i_plane],
-                             p_pic->p[i_plane].i_lines );
+                             p_pic->p[i_plane].i_visible_lines );
             for( i_line = 0; i_line < i_lines; i_line++ )
             {
                 memcpy( p_dst, p_src,
index 8bdade3..ad366a8 100644 (file)
@@ -883,7 +883,7 @@ static void CopyPicture( decoder_t *p_dec, picture_t *p_pic, uint8_t *p_in )
         i_width = p_pic->p[i_plane].i_visible_pitch;
         i_dst_stride  = p_pic->p[i_plane].i_pitch;
 
-        for( i_line = 0; i_line < p_pic->p[i_plane].i_lines; i_line++ )
+        for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ )
         {
             p_dec->p_vlc->pf_memcpy( p_dst, p_src, i_width );
             p_src += i_width;
@@ -1399,7 +1399,8 @@ static block_t *EncodeBlock( encoder_t *p_enc, void *p_data )
             i_width = p_pic->p[i_plane].i_visible_pitch;
             i_src_stride = p_pic->p[i_plane].i_pitch;
 
-            for( i_line = 0; i_line < p_pic->p[i_plane].i_lines; i_line++ )
+            for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines;
+                 i_line++ )
             {
                 p_enc->p_vlc->pf_memcpy( p_dst, p_src, i_width );
                 p_dst += i_width;
index 6847544..44cf3b0 100644 (file)
@@ -689,7 +689,8 @@ static void ffmpeg_CopyPicture( decoder_t *p_dec,
             i_dst_stride = p_pic->p[i_plane].i_pitch;
 
             i_size = __MIN( i_src_stride, i_dst_stride );
-            for( i_line = 0; i_line < p_pic->p[i_plane].i_lines; i_line++ )
+            for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines;
+                 i_line++ )
             {
                 p_dec->p_vlc->pf_memcpy( p_dst, p_src, i_size );
                 p_src += i_src_stride;
index 4fe833c..82be6aa 100644 (file)
@@ -2,7 +2,7 @@
  * rawvideo.c: Pseudo video decoder/packetizer for raw video data
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: rawvideo.c,v 1.13 2004/02/27 14:02:05 fenrir Exp $
+ * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -235,7 +235,7 @@ static void FillPicture( decoder_t *p_dec, block_t *p_block, picture_t *p_pic )
         p_dst = p_pic->p[i_plane].p_pixels;
         i_width = p_pic->p[i_plane].i_visible_pitch;
 
-        for( i_line = 0; i_line < p_pic->p[i_plane].i_lines; i_line++ )
+        for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ )
         {
             p_dec->p_vlc->pf_memcpy( p_dst, p_src, i_width );
             p_src += i_width;
index 3626bfa..62c8d30 100644 (file)
@@ -2,7 +2,7 @@
  * tarkin.c: tarkin decoder module making use of libtarkin.
  *****************************************************************************
  * Copyright (C) 2001-2003 VideoLAN
- * $Id: tarkin.c,v 1.11 2004/01/25 18:20:12 bigben Exp $
+ * $Id$
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -306,7 +306,7 @@ static void tarkin_CopyPicture( decoder_t *p_dec, picture_t *p_pic,
         i_dst_stride = p_pic->p[i_plane].i_pitch;
         i_src_stride = i_pitch;
 
-        for( i_line = 0; i_line < p_pic->p[i_plane].i_lines; i_line++ )
+        for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ )
         {
             p_dec->p_vlc->pf_memcpy( p_dst, p_src, i_src_stride );
 
index 0e6f903..bb9051e 100644 (file)
@@ -1468,6 +1468,7 @@ int Init( vout_thread_t *p_vout )
        }
        p_pic->p->p_pixels = (uint8_t*)p_vout->p_sys->p_window->bitmap[buffer_index]->Bits();
        p_pic->p->i_lines = p_vout->p_sys->i_height;
+       p_pic->p->i_visible_lines = p_vout->p_sys->i_height;
 
        p_pic->p->i_pixel_pitch = colspace[p_vout->p_sys->p_window->colspace_index].pixel_bytes;
        p_pic->i_planes = colspace[p_vout->p_sys->p_window->colspace_index].planes;
index f67ded1..e923c8e 100644 (file)
@@ -630,6 +630,7 @@ static int QTNewPicture( vout_thread_t *p_vout, picture_t *p_pic )
 
             p_pic->p[0].p_pixels = p_pic->p_data;
             p_pic->p[0].i_lines = p_vout->output.i_height;
+            p_pic->p[0].i_visible_lines = p_vout->output.i_height;
             p_pic->p[0].i_pitch = p_vout->output.i_width * 2;
             p_pic->p[0].i_pixel_pitch = 1;
             p_pic->p[0].i_visible_pitch = p_vout->output.i_width * 2;
index 1c5a3d6..3512361 100644 (file)
@@ -757,6 +757,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index )
 
         p_pic->p->p_pixels = p_pic->p_sys->p_image->image;
         p_pic->p->i_lines = p_pic->p_sys->p_image->size.h;
+        p_pic->p->i_visible_lines = p_pic->p_sys->p_image->size.h;
         p_pic->p->i_pitch = p_pic->p_sys->p_image->bpl;
         p_pic->p->i_pixel_pitch = p_vout->p_sys->i_bytes_per_pixel;
         p_pic->p->i_visible_pitch = p_vout->p_sys->i_bytes_per_pixel
@@ -792,6 +793,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index )
 
         p_pic->p->p_pixels = p_pic->p_sys->p_buf[0];
         p_pic->p->i_lines = p_pic->p_sys->p_ctx[0]->dim.h;
+        p_pic->p->i_visible_lines = p_pic->p_sys->p_ctx[0]->dim.h;
         p_pic->p->i_pitch = p_pic->p_sys->p_ctx[0]->pitch;
         p_pic->p->i_pixel_pitch = p_vout->p_sys->i_bytes_per_pixel;
         p_pic->p->i_visible_pitch = p_vout->p_sys->i_bytes_per_pixel
@@ -837,18 +839,21 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index )
 
                 p_pic->Y_PIXELS = p_pic->p_sys->p_buf[Y_PLANE];
                 p_pic->p[Y_PLANE].i_lines = p_pic->p_sys->p_ctx[Y_PLANE]->dim.h;
+                p_pic->p[Y_PLANE].i_visible_lines = p_pic->p_sys->p_ctx[Y_PLANE]->dim.h;
                 p_pic->p[Y_PLANE].i_pitch = p_pic->p_sys->p_ctx[Y_PLANE]->pitch;
                 p_pic->p[Y_PLANE].i_pixel_pitch = 1;
                 p_pic->p[Y_PLANE].i_visible_pitch = p_pic->p[Y_PLANE].i_pitch;
 
                 p_pic->U_PIXELS = p_pic->p_sys->p_buf[U_PLANE];
                 p_pic->p[U_PLANE].i_lines = p_pic->p_sys->p_ctx[U_PLANE]->dim.h;
+                p_pic->p[U_PLANE].i_visible_lines = p_pic->p_sys->p_ctx[U_PLANE]->dim.h;
                 p_pic->p[U_PLANE].i_pitch = p_pic->p_sys->p_ctx[U_PLANE]->pitch;
                 p_pic->p[U_PLANE].i_pixel_pitch = 1;
                 p_pic->p[U_PLANE].i_visible_pitch = p_pic->p[U_PLANE].i_pitch;
 
                 p_pic->V_PIXELS = p_pic->p_sys->p_buf[V_PLANE];
                 p_pic->p[V_PLANE].i_lines = p_pic->p_sys->p_ctx[V_PLANE]->dim.h;
+                p_pic->p[V_PLANE].i_visible_lines = p_pic->p_sys->p_ctx[V_PLANE]->dim.h;
                 p_pic->p[V_PLANE].i_pitch = p_pic->p_sys->p_ctx[V_PLANE]->pitch;
                 p_pic->p[V_PLANE].i_pixel_pitch = 1;
                 p_pic->p[V_PLANE].i_visible_pitch = p_pic->p[V_PLANE].i_pitch;
@@ -871,18 +876,21 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index )
 
                 p_pic->Y_PIXELS = p_pic->p_sys->p_buf[Y_PLANE];
                 p_pic->p[Y_PLANE].i_lines = p_pic->p_sys->p_ctx[Y_PLANE]->dim.h;
+                p_pic->p[Y_PLANE].i_visible_lines = p_pic->p_sys->p_ctx[Y_PLANE]->dim.h;
                 p_pic->p[Y_PLANE].i_pitch = p_pic->p_sys->p_ctx[Y_PLANE]->pitch;
                 p_pic->p[Y_PLANE].i_pixel_pitch = 1;
                 p_pic->p[Y_PLANE].i_visible_pitch = p_pic->p[Y_PLANE].i_pitch;
 
                 p_pic->U_PIXELS = p_pic->p_sys->p_buf[U_PLANE];
                 p_pic->p[U_PLANE].i_lines = p_pic->p_sys->p_ctx[U_PLANE]->dim.h;
+                p_pic->p[U_PLANE].i_visible_lines = p_pic->p_sys->p_ctx[U_PLANE]->dim.h;
                 p_pic->p[U_PLANE].i_pitch = p_pic->p_sys->p_ctx[U_PLANE]->pitch;
                 p_pic->p[U_PLANE].i_pixel_pitch = 1;
                 p_pic->p[U_PLANE].i_visible_pitch = p_pic->p[U_PLANE].i_pitch;
 
                 p_pic->V_PIXELS = p_pic->p_sys->p_buf[V_PLANE];
                 p_pic->p[V_PLANE].i_lines = p_pic->p_sys->p_ctx[V_PLANE]->dim.h;
+                p_pic->p[V_PLANE].i_visible_lines = p_pic->p_sys->p_ctx[V_PLANE]->dim.h;
                 p_pic->p[V_PLANE].i_pitch = p_pic->p_sys->p_ctx[V_PLANE]->pitch;
                 p_pic->p[V_PLANE].i_pixel_pitch = 1;
                 p_pic->p[V_PLANE].i_visible_pitch = p_pic->p[V_PLANE].i_pitch;
@@ -903,6 +911,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index )
 
                 p_pic->p->p_pixels = p_pic->p_sys->p_buf[Y_PLANE];
                 p_pic->p->i_lines = p_pic->p_sys->p_ctx[Y_PLANE]->dim.h;
+                p_pic->p->i_visible_lines = p_pic->p_sys->p_ctx[Y_PLANE]->dim.h;
                 p_pic->p->i_pitch = p_pic->p_sys->p_ctx[Y_PLANE]->pitch;
                 p_pic->p->i_pixel_pitch = 4;
                 p_pic->p->i_visible_pitch = p_pic->p->i_pitch;
@@ -918,6 +927,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index )
 
                 p_pic->p->p_pixels = p_pic->p_sys->p_buf[Y_PLANE];
                 p_pic->p->i_lines = p_pic->p_sys->p_ctx[Y_PLANE]->dim.h;
+                p_pic->p->i_visible_lines = p_pic->p_sys->p_ctx[Y_PLANE]->dim.h;
                 p_pic->p->i_pitch = p_pic->p_sys->p_ctx[Y_PLANE]->pitch;
                 p_pic->p->i_pixel_pitch = 2;
                 p_pic->p->i_visible_pitch = 2 * p_pic->p_sys->p_ctx[Y_PLANE]->dim.w;
@@ -933,6 +943,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index )
 
                 p_pic->p->p_pixels = p_pic->p_sys->p_buf[Y_PLANE];
                 p_pic->p->i_lines = p_pic->p_sys->p_ctx[Y_PLANE]->dim.h;
+                p_pic->p->i_visible_lines = p_pic->p_sys->p_ctx[Y_PLANE]->dim.h;
                 p_pic->p->i_pitch = p_pic->p_sys->p_ctx[Y_PLANE]->pitch;
                 p_pic->p->i_pixel_pitch = 4;
                 p_pic->p->i_visible_pitch = 4 * p_pic->p_sys->p_ctx[Y_PLANE]->dim.w;
@@ -948,6 +959,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index )
 
                 p_pic->p->p_pixels = p_pic->p_sys->p_buf[Y_PLANE];
                 p_pic->p->i_lines = p_pic->p_sys->p_ctx[Y_PLANE]->dim.h;
+                p_pic->p->i_visible_lines = p_pic->p_sys->p_ctx[Y_PLANE]->dim.h;
                 p_pic->p->i_pitch = p_pic->p_sys->p_ctx[Y_PLANE]->pitch;
                 p_pic->p->i_pixel_pitch = 4;
                 p_pic->p->i_visible_pitch = 4 * p_pic->p_sys->p_ctx[Y_PLANE]->dim.w;
@@ -965,6 +977,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index )
             p_pic->p->p_pixels = p_pic->p_sys->p_image->data
                                   + p_pic->p_sys->p_image->offsets[0];
             p_pic->p->i_lines = p_vout->output.i_height;
+            p_pic->p->i_visible_lines = p_vout->output.i_height;
             /* XXX: this just looks so plain wrong... check it out ! */
             p_pic->p->i_pitch = p_pic->p_sys->p_image->pitches[0] / 4;
             p_pic->p->i_pixel_pitch = 4;
index 3071846..4200f91 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.3 2004/01/25 17:20:18 kuehne Exp $
+ * $Id$
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -108,10 +108,10 @@ static void I420_YMGA( vout_thread_t *p_vout, picture_t *p_source,
 
     /* Copy the Y part */
     p_vout->p_vlc->pf_memcpy( p_dest->Y_PIXELS, p_source->Y_PIXELS,
-                 p_dest->p[Y_PLANE].i_pitch * p_dest->p[Y_PLANE].i_lines );
+                 p_dest->p[Y_PLANE].i_pitch * p_dest->p[Y_PLANE].i_visible_lines );
 
     /* Copy the U:V part */
-    for( i_x = p_dest->p[U_PLANE].i_pitch * p_dest->p[U_PLANE].i_lines / 64;
+    for( i_x = p_dest->p[U_PLANE].i_pitch * p_dest->p[U_PLANE].i_visible_lines / 64;
          i_x--; )
     {
 #if defined (MODULE_NAME_IS_i420_ymga)
index 16c72e7..d137b83 100644 (file)
@@ -397,10 +397,10 @@ static void I420_cyuv( vout_thread_t *p_vout, picture_t *p_source,
                                               picture_t *p_dest )
 {
     uint8_t *p_line1 = p_dest->p->p_pixels +
-                       p_dest->p->i_lines * p_dest->p->i_pitch
+                       p_dest->p->i_visible_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;
+                       p_dest->p->i_visible_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;
index 15df436..b0ec75c 100644 (file)
@@ -248,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;
@@ -283,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;
index 56d9c47..5b4909c 100644 (file)
@@ -286,7 +286,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
      */
 
     p_in = p_pic->p[0].p_pixels;
-    p_in_end = p_in + p_pic->p[0].i_lines * p_pic->p[0].i_pitch - 8;
+    p_in_end = p_in + p_pic->p[0].i_visible_lines * p_pic->p[0].i_pitch - 8;
 
     p_out = p_outpic->p[0].p_pixels;
 
@@ -320,7 +320,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
 
     p_in = p_pic->p[1].p_pixels;
     p_in_v = p_pic->p[2].p_pixels;
-    p_in_end = p_in + p_pic->p[1].i_lines * p_pic->p[1].i_pitch - 8;
+    p_in_end = p_in + p_pic->p[1].i_visible_lines * p_pic->p[1].i_pitch - 8;
 
     p_out = p_outpic->p[1].p_pixels;
     p_out_v = p_outpic->p[2].p_pixels;
index 6172289..f3e4a42 100644 (file)
@@ -341,11 +341,12 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
                  && i_out_pitch == i_copy_pitch )
             {
                 p_vout->p_vlc->pf_memcpy( p_out, p_in, i_in_pitch
-                                           * p_outpic->p[i_plane].i_lines );
+                                     * p_outpic->p[i_plane].i_visible_lines );
             }
             else
             {
-                p_in_end = p_in + i_in_pitch * p_outpic->p[i_plane].i_lines;
+                p_in_end = p_in + i_in_pitch *
+                    p_outpic->p[i_plane].i_visible_lines;
 
                 while( p_in < p_in_end )
                 {
index 91716b4..83b0094 100644 (file)
@@ -371,13 +371,13 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
 
         p_in = p_pic->p[i_plane].p_pixels
                 /* Skip the right amount of lines */
-                + i_in_pitch * ( p_pic->p[i_plane].i_lines * p_vout->p_sys->i_y
-                                  / p_vout->output.i_height )
+                + i_in_pitch * ( p_pic->p[i_plane].i_visible_lines *
+                                 p_vout->p_sys->i_y / p_vout->output.i_height )
                 /* Skip the right amount of columns */
                 + i_in_pitch * p_vout->p_sys->i_x / p_vout->output.i_width;
 
         p_out = p_outpic->p[i_plane].p_pixels;
-        p_out_end = p_out + i_out_pitch * p_outpic->p[i_plane].i_lines;
+        p_out_end = p_out + i_out_pitch * p_outpic->p[i_plane].i_visible_lines;
 
         while( p_out < p_out_end )
         {
@@ -402,7 +402,7 @@ static void UpdateStats( vout_thread_t *p_vout, picture_t *p_pic )
     uint8_t *p_in = p_pic->p[0].p_pixels;
     int i_pitch = p_pic->p[0].i_pitch;
     int i_visible_pitch = p_pic->p[0].i_visible_pitch;
-    int i_lines = p_pic->p[0].i_lines;
+    int i_lines = p_pic->p[0].i_visible_lines;
     int i_firstwhite = -1, i_lastwhite = -1, i;
 
     /* Determine where black borders are */
index 041716f..47d3234 100644 (file)
@@ -508,7 +508,7 @@ static void RenderDiscard( vout_thread_t *p_vout,
 
         p_out = p_outpic->p[i_plane].p_pixels;
         p_out_end = p_out + p_outpic->p[i_plane].i_pitch
-                             * p_outpic->p[i_plane].i_lines;
+                             * p_outpic->p[i_plane].i_visible_lines;
 
         switch( p_vout->render.i_chroma )
         {
@@ -577,7 +577,7 @@ static void RenderBob( vout_thread_t *p_vout,
         p_in = p_pic->p[i_plane].p_pixels;
         p_out = p_outpic->p[i_plane].p_pixels;
         p_out_end = p_out + p_outpic->p[i_plane].i_pitch
-                             * p_outpic->p[i_plane].i_lines;
+                             * p_outpic->p[i_plane].i_visible_lines;
 
         switch( p_vout->render.i_chroma )
         {
@@ -697,7 +697,7 @@ static void RenderLinear( vout_thread_t *p_vout,
         p_in = p_pic->p[i_plane].p_pixels;
         p_out = p_outpic->p[i_plane].p_pixels;
         p_out_end = p_out + p_outpic->p[i_plane].i_pitch
-                             * p_outpic->p[i_plane].i_lines;
+                             * p_outpic->p[i_plane].i_visible_lines;
 
         /* For BOTTOM field we need to add the first line */
         if( i_field == 1 )
@@ -753,7 +753,7 @@ static void RenderMean( vout_thread_t *p_vout,
 
         p_out = p_outpic->p[i_plane].p_pixels;
         p_out_end = p_out + p_outpic->p[i_plane].i_pitch
-                             * p_outpic->p[i_plane].i_lines;
+                             * p_outpic->p[i_plane].i_visible_lines;
 
         /* All lines: mean value */
         for( ; p_out < p_out_end ; )
@@ -782,7 +782,7 @@ static void RenderBlend( vout_thread_t *p_vout,
 
         p_out = p_outpic->p[i_plane].p_pixels;
         p_out_end = p_out + p_outpic->p[i_plane].i_pitch
-                             * p_outpic->p[i_plane].i_lines;
+                             * p_outpic->p[i_plane].i_visible_lines;
 
         switch( p_vout->render.i_chroma )
         {
index f36bdcb..10a5702 100644 (file)
@@ -297,7 +297,7 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic,
         p_in = p_inpic->p[i_index].p_pixels;
         p_out = p_outpic->p[i_index].p_pixels;
 
-        i_num_lines = p_inpic->p[i_index].i_lines;
+        i_num_lines = p_inpic->p[i_index].i_visible_lines;
 
         black_pixel = ( i_index == Y_PLANE ) ? 0x00 : 0x80;
 
@@ -363,7 +363,7 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
 
         black_pixel = ( i_index == Y_PLANE ) ? 0x00 : 0x80;
 
-        i_num_lines = p_inpic->p[i_index].i_lines;
+        i_num_lines = p_inpic->p[i_index].i_visible_lines;
 
         i_first_line = i_num_lines * 4 / 5;
 
index 64fa0a2..5c10f77 100644 (file)
@@ -208,7 +208,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
         uint8_t *p_in, *p_in_end, *p_line_end, *p_out;
 
         p_in = p_pic->p[i_index].p_pixels;
-        p_in_end = p_in + p_pic->p[i_index].i_lines
+        p_in_end = p_in + p_pic->p[i_index].i_visible_lines
                            * p_pic->p[i_index].i_pitch;
 
         p_out = p_outpic->p[i_index].p_pixels;
index b009aab..58fb5b4 100644 (file)
@@ -382,7 +382,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
     {
         memcpy( p_outpic->p[i_index].p_pixels,
                 p_pic->p[i_index].p_pixels,
-                p_pic->p[i_index].i_lines * p_pic->p[i_index].i_pitch);
+                p_pic->p[i_index].i_visible_lines * p_pic->p[i_index].i_pitch);
 
 
         if (p_vout->p_sys->error == 0)
index 4d2784f..015ba58 100644 (file)
@@ -293,7 +293,7 @@ static void CopyPicture( vout_thread_t * p_vout,
             /* There are margins, but with the same width : perfect ! */
             p_vout->p_vlc->pf_memcpy(
                          p_dest->p[i].p_pixels, p_src->p[i].p_pixels,
-                         p_src->p[i].i_pitch * p_src->p[i].i_lines );
+                         p_src->p[i].i_pitch * p_src->p[i].i_visible_lines );
         }
         else
         {
@@ -302,7 +302,7 @@ static void CopyPicture( vout_thread_t * p_vout,
             uint8_t *p_out = p_dest->p[i].p_pixels;
             int i_line;
 
-            for( i_line = p_src->p[i].i_lines; i_line--; )
+            for( i_line = p_src->p[i].i_visible_lines; i_line--; )
             {
                 p_vout->p_vlc->pf_memcpy( p_out, p_in,
                                           p_src->p[i].i_visible_pitch );
@@ -329,7 +329,7 @@ static void RenderBlur( vout_thread_t *p_vout, picture_t *p_oldpic,
         p_new = p_newpic->p[i_plane].p_pixels;
         p_old = p_oldpic->p[i_plane].p_pixels;
         p_out_end = p_out + p_outpic->p[i_plane].i_pitch *
-                             p_outpic->p[i_plane].i_lines;
+                             p_outpic->p[i_plane].i_visible_lines;
         while ( p_out < p_out_end )
         {
             p_out_line_end = p_out + p_outpic->p[i_plane].i_visible_pitch;
index 2957797..0e1ec78 100644 (file)
@@ -293,8 +293,9 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
                 uint8_t *p_in = p_pic->p[i_index].p_pixels;
 
                 uint8_t *p_out = p_outpic->p[i_index].p_pixels;
-                uint8_t *p_out_end = p_out + p_outpic->p[i_index].i_lines
-                                              * p_outpic->p[i_index].i_pitch;
+                uint8_t *p_out_end = p_out +
+                    p_outpic->p[i_index].i_visible_lines *
+                    p_outpic->p[i_index].i_pitch;
 
                 for( ; p_out < p_out_end ; )
                 {
@@ -302,7 +303,8 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
 
                     p_out_end -= p_outpic->p[i_index].i_pitch
                                   - p_outpic->p[i_index].i_visible_pitch;
-                    p_line_end = p_in + p_pic->p[i_index].i_lines * i_pitch;
+                    p_line_end = p_in + p_pic->p[i_index].i_visible_lines *
+                        i_pitch;
 
                     for( ; p_in < p_line_end ; )
                     {
@@ -319,7 +321,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
             for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
             {
                 uint8_t *p_in = p_pic->p[i_index].p_pixels;
-                uint8_t *p_in_end = p_in + p_pic->p[i_index].i_lines
+                uint8_t *p_in_end = p_in + p_pic->p[i_index].i_visible_lines
                                             * p_pic->p[i_index].i_pitch;
 
                 uint8_t *p_out = p_outpic->p[i_index].p_pixels;
@@ -350,14 +352,16 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
                 uint8_t *p_in = p_pic->p[i_index].p_pixels;
 
                 uint8_t *p_out = p_outpic->p[i_index].p_pixels;
-                uint8_t *p_out_end = p_out + p_outpic->p[i_index].i_lines
-                                              * p_outpic->p[i_index].i_pitch;
+                uint8_t *p_out_end = p_out +
+                    p_outpic->p[i_index].i_visible_lines *
+                    p_outpic->p[i_index].i_pitch;
 
                 for( ; p_out < p_out_end ; )
                 {
                     uint8_t *p_in_end;
 
-                    p_in_end = p_in + p_pic->p[i_index].i_lines * i_pitch;
+                    p_in_end = p_in + p_pic->p[i_index].i_visible_lines *
+                        i_pitch;
 
                     for( ; p_in < p_in_end ; )
                     {
@@ -376,7 +380,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
             for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
             {
                 uint8_t *p_in = p_pic->p[i_index].p_pixels;
-                uint8_t *p_in_end = p_in + p_pic->p[i_index].i_lines
+                uint8_t *p_in_end = p_in + p_pic->p[i_index].i_visible_lines
                                             * p_pic->p[i_index].i_pitch;
 
                 uint8_t *p_out = p_outpic->p[i_index].p_pixels;
@@ -395,7 +399,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
             for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
             {
                 uint8_t *p_in = p_pic->p[i_index].p_pixels;
-                uint8_t *p_in_end = p_in + p_pic->p[i_index].i_lines
+                uint8_t *p_in_end = p_in + p_pic->p[i_index].i_visible_lines
                                             * p_pic->p[i_index].i_pitch;
 
                 uint8_t *p_out = p_outpic->p[i_index].p_pixels;
index 0d4a18d..28ec64e 100644 (file)
@@ -402,7 +402,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
                 p_in = p_pic->p[i_plane].p_pixels
                         + pi_top_skip[i_plane] + pi_left_skip[i_plane];
 
-                p_in_end = p_in + p_outpic->p[i_plane].i_lines
+                p_in_end = p_in + p_outpic->p[i_plane].i_visible_lines
                                    * p_pic->p[i_plane].i_pitch;
 
                 p_out = p_outpic->p[i_plane].p_pixels;
@@ -428,7 +428,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
         for( i_plane = 0 ; i_plane < p_pic->i_planes ; i_plane++ )
         {
             pi_top_skip[i_plane] += p_vout->p_sys->pp_vout[ i_vout ].i_height
-                                     * p_pic->p[i_plane].i_lines
+                                     * p_pic->p[i_plane].i_visible_lines
                                      / p_vout->output.i_height
                                      * p_pic->p[i_plane].i_pitch;
         }
index b3ceaa1..9db0342 100644 (file)
@@ -2,7 +2,7 @@
  * vout_aa.c: Aa video output display method for testing purposes
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: aa.c,v 1.3 2003/10/25 00:49:14 sam Exp $
+ * $Id$
  *
  * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
  *
@@ -147,6 +147,7 @@ static int Init( vout_thread_t *p_vout )
     /* Allocate the picture */
     p_pic->p->p_pixels = aa_image( p_vout->p_sys->aa_context );
     p_pic->p->i_lines = p_vout->p_sys->i_height;
+    p_pic->p->i_visible_lines = p_vout->p_sys->i_height;
     p_pic->p->i_pitch = p_vout->p_sys->i_width;
     p_pic->p->i_pixel_pitch = 1;
     p_pic->p->i_visible_pitch = p_vout->p_sys->i_width;
index ee0ec51..6b8d877 100644 (file)
@@ -209,6 +209,7 @@ static int Init( vout_thread_t *p_vout )
 
     /* Allocate the picture */
     p_pic->p->i_lines = p_vout->output.i_height;
+    p_pic->p->i_visible_lines = p_vout->output.i_height;
     p_pic->p->i_pitch = 4 * ((p_vout->output.i_width + 15) & ~15);
     p_pic->p->i_pixel_pitch = 4;
     p_pic->p->i_visible_pitch = 4 * p_vout->output.i_width;
index 50db94c..eab877d 100644 (file)
@@ -1392,7 +1392,7 @@ static int NewPictureVec( vout_thread_t *p_vout, picture_t *p_pic,
             {
                 int i,j;
                 for( i = 0; i < front_pic.i_planes; i++ )
-                    for( j = 0; j < front_pic.p[i].i_lines; j++)
+                    for( j = 0; j < front_pic.p[i].i_visible_lines; j++)
                         memset( front_pic.p[i].p_pixels + j *
                                 front_pic.p[i].i_pitch, 127,
                                 front_pic.p[i].i_visible_pitch );
@@ -1597,6 +1597,7 @@ static int UpdatePictureStruct( vout_thread_t *p_vout, picture_t *p_pic,
         case VLC_FOURCC('R','V','3','2'):
             p_pic->p->p_pixels = p_pic->p_sys->ddsd.lpSurface;
             p_pic->p->i_lines = p_vout->output.i_height;
+            p_pic->p->i_visible_lines = p_vout->output.i_height;
             p_pic->p->i_pitch = p_pic->p_sys->ddsd.lPitch;
             switch( p_vout->output.i_chroma )
             {
@@ -1625,6 +1626,7 @@ static int UpdatePictureStruct( vout_thread_t *p_vout, picture_t *p_pic,
 
             p_pic->Y_PIXELS = p_pic->p_sys->ddsd.lpSurface;
             p_pic->p[Y_PLANE].i_lines = p_vout->output.i_height;
+            p_pic->p[Y_PLANE].i_visible_lines = p_vout->output.i_height;
             p_pic->p[Y_PLANE].i_pitch = p_pic->p_sys->ddsd.lPitch;
             p_pic->p[Y_PLANE].i_pixel_pitch = 1;
             p_pic->p[Y_PLANE].i_visible_pitch = p_vout->output.i_width *
@@ -1633,6 +1635,7 @@ static int UpdatePictureStruct( vout_thread_t *p_vout, picture_t *p_pic,
             p_pic->V_PIXELS =  p_pic->Y_PIXELS
               + p_pic->p[Y_PLANE].i_lines * p_pic->p[Y_PLANE].i_pitch;
             p_pic->p[V_PLANE].i_lines = p_vout->output.i_height / 2;
+            p_pic->p[V_PLANE].i_visible_lines = p_vout->output.i_height / 2;
             p_pic->p[V_PLANE].i_pitch = p_pic->p[Y_PLANE].i_pitch / 2;
             p_pic->p[V_PLANE].i_pixel_pitch = 1;
             p_pic->p[V_PLANE].i_visible_pitch = p_vout->output.i_width / 2 *
@@ -1641,6 +1644,7 @@ static int UpdatePictureStruct( vout_thread_t *p_vout, picture_t *p_pic,
             p_pic->U_PIXELS = p_pic->V_PIXELS
               + p_pic->p[V_PLANE].i_lines * p_pic->p[V_PLANE].i_pitch;
             p_pic->p[U_PLANE].i_lines = p_vout->output.i_height / 2;
+            p_pic->p[U_PLANE].i_visible_lines = p_vout->output.i_height / 2;
             p_pic->p[U_PLANE].i_pitch = p_pic->p[Y_PLANE].i_pitch / 2;
             p_pic->p[U_PLANE].i_pixel_pitch = 1;
             p_pic->p[U_PLANE].i_visible_pitch = p_vout->output.i_width / 2 *
@@ -1653,6 +1657,7 @@ static int UpdatePictureStruct( vout_thread_t *p_vout, picture_t *p_pic,
 
             p_pic->Y_PIXELS = p_pic->p_sys->ddsd.lpSurface;
             p_pic->p[Y_PLANE].i_lines = p_vout->output.i_height;
+            p_pic->p[Y_PLANE].i_visible_lines = p_vout->output.i_height;
             p_pic->p[Y_PLANE].i_pitch = p_pic->p_sys->ddsd.lPitch;
             p_pic->p[Y_PLANE].i_pixel_pitch = 1;
             p_pic->p[Y_PLANE].i_visible_pitch = p_vout->output.i_width *
@@ -1661,6 +1666,7 @@ static int UpdatePictureStruct( vout_thread_t *p_vout, picture_t *p_pic,
             p_pic->U_PIXELS = p_pic->Y_PIXELS
               + p_pic->p[Y_PLANE].i_lines * p_pic->p[Y_PLANE].i_pitch;
             p_pic->p[U_PLANE].i_lines = p_vout->output.i_height / 2;
+            p_pic->p[U_PLANE].i_visible_lines = p_vout->output.i_height / 2;
             p_pic->p[U_PLANE].i_pitch = p_pic->p[Y_PLANE].i_pitch / 2;
             p_pic->p[U_PLANE].i_pixel_pitch = 1;
             p_pic->p[U_PLANE].i_visible_pitch = p_vout->output.i_width / 2 *
@@ -1669,6 +1675,7 @@ static int UpdatePictureStruct( vout_thread_t *p_vout, picture_t *p_pic,
             p_pic->V_PIXELS =  p_pic->U_PIXELS
               + p_pic->p[U_PLANE].i_lines * p_pic->p[U_PLANE].i_pitch;
             p_pic->p[V_PLANE].i_lines = p_vout->output.i_height / 2;
+            p_pic->p[V_PLANE].i_visible_lines = p_vout->output.i_height / 2;
             p_pic->p[V_PLANE].i_pitch = p_pic->p[Y_PLANE].i_pitch / 2;
             p_pic->p[V_PLANE].i_pixel_pitch = 1;
             p_pic->p[V_PLANE].i_visible_pitch = p_vout->output.i_width / 2 *
@@ -1682,6 +1689,7 @@ static int UpdatePictureStruct( vout_thread_t *p_vout, picture_t *p_pic,
 
             p_pic->p->p_pixels = p_pic->p_sys->ddsd.lpSurface;
             p_pic->p->i_lines = p_vout->output.i_height;
+            p_pic->p->i_visible_lines = p_vout->output.i_height;
             p_pic->p->i_pitch = p_pic->p_sys->ddsd.lPitch;
             p_pic->p->i_pixel_pitch = 2;
             p_pic->p->i_visible_pitch = p_vout->output.i_width *
index b21fdfc..70eedc9 100644 (file)
@@ -298,6 +298,7 @@ static int Init( vout_thread_t *p_vout )
     p_pic->p->p_pixels = p_vout->p_sys->p_video;
     p_pic->p->i_pixel_pitch = p_vout->p_sys->i_bytes_per_pixel;
     p_pic->p->i_lines = p_vout->p_sys->var_info.yres;
+    p_pic->p->i_visible_lines = p_vout->p_sys->var_info.yres;
 
     if( p_vout->p_sys->var_info.xres_virtual )
     {
index 01a3ccd..1124919 100644 (file)
@@ -190,6 +190,7 @@ static int Init( vout_thread_t *p_vout )
     p_pic->p->p_pixels = p_b[ 0 ]->write;
     p_pic->p->i_pixel_pitch = p_b[ 0 ]->buffer.plb.pixelformat->size / 8;
     p_pic->p->i_lines = p_vout->p_sys->mode.visible.y;
+    p_pic->p->i_visible_lines = p_vout->p_sys->mode.visible.y;
 
     p_pic->p->i_pitch = p_b[ 0 ]->buffer.plb.stride;
 
index 28b2dd5..ec88455 100644 (file)
@@ -2,7 +2,7 @@
  * glide.c : 3dfx Glide plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: glide.c,v 1.3 2003/10/25 00:49:14 sam Exp $
+ * $Id$
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -153,6 +153,7 @@ static int Init( vout_thread_t *p_vout )
 
     p_pic->p->p_pixels = p_vout->p_sys->pp_buffer[p_vout->p_sys->i_index];
     p_pic->p->i_lines = GLIDE_HEIGHT;
+    p_pic->p->i_visible_lines = GLIDE_HEIGHT;
     p_pic->p->i_pitch = p_vout->p_sys->p_buffer_info.strideInBytes;
                          /*1024 * GLIDE_BYTES_PER_PIXEL*/
     p_pic->p->i_pixel_pitch = GLIDE_BYTES_PER_PIXEL;
index ceb7e69..df8abcf 100644 (file)
@@ -213,6 +213,7 @@ static int Init( vout_thread_t *p_vout )
 
     /* Allocate the picture */
     p_pic->p->i_lines = p_vout->p_sys->i_height;
+    p_pic->p->i_visible_lines = p_vout->p_sys->i_height;
     p_pic->p->i_pitch = p_vout->p_sys->i_width;
     p_pic->p->i_pixel_pitch = 1;
     p_pic->p->i_visible_pitch = p_vout->p_sys->i_width;
@@ -277,6 +278,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
     }
     
     p_pic->p->i_lines = p_vout->output.i_height;
+    p_pic->p->i_visible_lines = p_vout->output.i_height;
     p_pic->p->p_pixels = (uint8_t*) p_pic->p_sys->p_image->MapLock();
     p_pic->p->i_pitch = p_vout->p_sys->i_screen_depth;
     p_pic->p->i_visible_pitch = p_pic->p->i_pixel_pitch
index dc2d321..08288f4 100644 (file)
@@ -318,18 +318,21 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
 
     p_pic->Y_PIXELS = p_pic->p_data;
     p_pic->p[Y_PLANE].i_lines = p_vout->output.i_height;
+    p_pic->p[Y_PLANE].i_visible_lines = p_vout->output.i_height;
     p_pic->p[Y_PLANE].i_pitch = CEIL32( p_vout->output.i_width );
     p_pic->p[Y_PLANE].i_pixel_pitch = 1;
     p_pic->p[Y_PLANE].i_visible_pitch = p_vout->output.i_width;
 
     p_pic->U_PIXELS = p_pic->p_data + p_vout->p_sys->mga.frame_size * 2/4;
     p_pic->p[U_PLANE].i_lines = p_vout->output.i_height / 2;
+    p_pic->p[U_PLANE].i_visible_lines = p_vout->output.i_height / 2;
     p_pic->p[U_PLANE].i_pitch = CEIL32( p_vout->output.i_width ) / 2;
     p_pic->p[U_PLANE].i_pixel_pitch = 1;
     p_pic->p[U_PLANE].i_visible_pitch = p_pic->p[U_PLANE].i_pitch;
 
     p_pic->V_PIXELS = p_pic->p_data + p_vout->p_sys->mga.frame_size * 3/4;
     p_pic->p[V_PLANE].i_lines = p_vout->output.i_height / 2;
+    p_pic->p[V_PLANE].i_visible_lines = p_vout->output.i_height / 2;
     p_pic->p[V_PLANE].i_pitch = CEIL32( p_vout->output.i_width ) / 2;
     p_pic->p[V_PLANE].i_pixel_pitch = 1;
     p_pic->p[V_PLANE].i_visible_pitch = p_pic->p[V_PLANE].i_pitch;
index fbfe1f5..2f63f3f 100644 (file)
@@ -275,6 +275,7 @@ static int Init( vout_thread_t *p_vout )
     p_vout->p_picture[0].i_planes = 1;
     p_vout->p_picture[0].p->p_pixels = p_sys->pp_buffer[0];
     p_vout->p_picture[0].p->i_lines = p_vout->output.i_height;
+    p_vout->p_picture[0].p->i_visible_lines = p_vout->output.i_height;
     p_vout->p_picture[0].p->i_pixel_pitch = i_pixel_pitch;
     p_vout->p_picture[0].p->i_pitch = p_vout->output.i_width *
         p_vout->p_picture[0].p->i_pixel_pitch;
index 1be40e8..af2b388 100644 (file)
@@ -2,7 +2,7 @@
  * qte.cpp : QT Embedded plugin for vlc
  *****************************************************************************
  * Copyright (C) 1998-2003 VideoLAN
- * $Id: qte.cpp,v 1.22 2004/03/03 20:39:52 gbazin Exp $
+ * $Id$
  *
  * Authors: Gerald Hansink <gerald.hansink@ordain.nl>
  *          Jean-Paul Saman <jpsaman@wxs.nl>
@@ -462,6 +462,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
     p_pic->p->p_pixels = (p_pic->p_sys->pQImage->jumpTable())[0];
     p_pic->p->i_pitch = p_pic->p_sys->pQImage->bytesPerLine();
     p_pic->p->i_lines = p_vout->output.i_height;
+    p_pic->p->i_visible_lines = p_vout->output.i_height;
     p_pic->p->i_visible_pitch =
             p_pic->p->i_pixel_pitch * p_vout->output.i_width;
 
index b0c5108..5935745 100644 (file)
@@ -814,6 +814,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
 
         p_pic->p->p_pixels = p_vout->p_sys->p_display->pixels;
         p_pic->p->i_lines = p_vout->p_sys->p_display->h;
+        p_pic->p->i_visible_lines = p_vout->p_sys->p_display->h;
         p_pic->p->i_pitch = p_vout->p_sys->p_display->pitch;
         p_pic->p->i_visible_pitch =
             p_pic->p->i_pixel_pitch * p_vout->p_sys->p_display->w;
@@ -846,6 +847,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
 
         p_pic->Y_PIXELS = p_pic->p_sys->p_overlay->pixels[0];
         p_pic->p[Y_PLANE].i_lines = p_pic->p_sys->p_overlay->h;
+        p_pic->p[Y_PLANE].i_visible_lines = p_pic->p_sys->p_overlay->h;
         p_pic->p[Y_PLANE].i_pitch = p_pic->p_sys->p_overlay->pitches[0];
 
         switch( p_vout->output.i_chroma )
@@ -856,12 +858,14 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
 
             p_pic->U_PIXELS = p_pic->p_sys->p_overlay->pixels[2];
             p_pic->p[U_PLANE].i_lines = p_pic->p_sys->p_overlay->h / 2;
+            p_pic->p[U_PLANE].i_visible_lines = p_pic->p_sys->p_overlay->h / 2;
             p_pic->p[U_PLANE].i_pitch = p_pic->p_sys->p_overlay->pitches[2];
             p_pic->p[U_PLANE].i_pixel_pitch = 1;
             p_pic->p[U_PLANE].i_visible_pitch = p_pic->p_sys->p_overlay->w / 2;
 
             p_pic->V_PIXELS = p_pic->p_sys->p_overlay->pixels[1];
             p_pic->p[V_PLANE].i_lines = p_pic->p_sys->p_overlay->h / 2;
+            p_pic->p[V_PLANE].i_visible_lines = p_pic->p_sys->p_overlay->h / 2;
             p_pic->p[V_PLANE].i_pitch = p_pic->p_sys->p_overlay->pitches[1];
             p_pic->p[V_PLANE].i_pixel_pitch = 1;
             p_pic->p[V_PLANE].i_visible_pitch = p_pic->p_sys->p_overlay->w / 2;
@@ -875,12 +879,14 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
 
             p_pic->U_PIXELS = p_pic->p_sys->p_overlay->pixels[1];
             p_pic->p[U_PLANE].i_lines = p_pic->p_sys->p_overlay->h / 2;
+            p_pic->p[U_PLANE].i_visible_lines = p_pic->p_sys->p_overlay->h / 2;
             p_pic->p[U_PLANE].i_pitch = p_pic->p_sys->p_overlay->pitches[1];
             p_pic->p[U_PLANE].i_pixel_pitch = 1;
             p_pic->p[U_PLANE].i_visible_pitch = p_pic->p_sys->p_overlay->w / 2;
 
             p_pic->V_PIXELS = p_pic->p_sys->p_overlay->pixels[2];
             p_pic->p[V_PLANE].i_lines = p_pic->p_sys->p_overlay->h / 2;
+            p_pic->p[V_PLANE].i_visible_lines = p_pic->p_sys->p_overlay->h / 2;
             p_pic->p[V_PLANE].i_pitch = p_pic->p_sys->p_overlay->pitches[2];
             p_pic->p[V_PLANE].i_pixel_pitch = 1;
             p_pic->p[V_PLANE].i_visible_pitch = p_pic->p_sys->p_overlay->w / 2;
index c08b9ef..baca573 100755 (executable)
@@ -2,7 +2,7 @@
  * wingdi.c : Win32 / WinCE GDI video output plugin for vlc
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: wingdi.c,v 1.8 2003/12/04 14:48:24 gbazin Exp $
+ * $Id$
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -271,7 +271,7 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic )
     SelectObject( p_vout->p_sys->off_dc, p_vout->p_sys->off_bitmap );
 
     /* Stupid GDI is upside-down */
-    i_src_bytes = p_pic->p->i_lines * p_pic->p->i_pitch;
+    i_src_bytes = p_pic->p->i_visible_lines * p_pic->p->i_pitch;
     i_dest_bytes = 0;
 
     while( i_src_bytes )
index f7cd860..c2cbddc 100644 (file)
@@ -1252,6 +1252,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
         case VLC_FOURCC('R','V','3','2'):
 
             p_pic->p->i_lines = p_pic->p_sys->p_image->height;
+            p_pic->p->i_visible_lines = p_pic->p_sys->p_image->height;
             p_pic->p->p_pixels = p_pic->p_sys->p_image->data
                                   + p_pic->p_sys->p_image->xoffset;
             p_pic->p->i_pitch = p_pic->p_sys->p_image->bytes_per_line;
index 930306c..a0570bd 100644 (file)
@@ -291,7 +291,7 @@ static void DoWork( aout_instance_t *p_aout, aout_filter_t *p_filter,
     for( i = 0 ; i < p_outpic->i_planes ; i++ )
     {
         memset( p_outpic->p[i].p_pixels, i > 0 ? 0x80 : 0x00,
-                p_outpic->p[i].i_lines * p_outpic->p[i].i_pitch );
+                p_outpic->p[i].i_visible_lines * p_outpic->p[i].i_pitch );
     }
 
     /* We can now call our visualization effects */
index 9af5cc8..4611405 100644 (file)
@@ -524,9 +524,8 @@ void vout_AllocatePicture( vlc_object_t *p_this, picture_t *p_pic,
 
     for( i_index = 1; i_index < p_pic->i_planes; i_index++ )
     {
-        p_pic->p[i_index].p_pixels = p_pic->p[i_index-1].p_pixels
-                                          + p_pic->p[i_index-1].i_lines
-                                             * p_pic->p[i_index-1].i_pitch;
+        p_pic->p[i_index].p_pixels = p_pic->p[i_index-1].p_pixels +
+            p_pic->p[i_index-1].i_lines * p_pic->p[i_index-1].i_pitch;
     }
 }
 
@@ -655,12 +654,15 @@ void vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
     {
         case FOURCC_I411:
             p_pic->p[ Y_PLANE ].i_lines = i_height;
+            p_pic->p[ Y_PLANE ].i_visible_lines = i_height_aligned;
             p_pic->p[ Y_PLANE ].i_pitch = i_width_aligned;
             p_pic->p[ Y_PLANE ].i_visible_pitch = i_width;
             p_pic->p[ U_PLANE ].i_lines = i_height;
+            p_pic->p[ U_PLANE ].i_visible_lines = i_height_aligned;
             p_pic->p[ U_PLANE ].i_pitch = i_width_aligned / 4;
             p_pic->p[ U_PLANE ].i_visible_pitch = i_width / 4;
             p_pic->p[ V_PLANE ].i_lines = i_height;
+            p_pic->p[ V_PLANE ].i_visible_lines = i_height_aligned;
             p_pic->p[ V_PLANE ].i_pitch = i_width_aligned / 4;
             p_pic->p[ V_PLANE ].i_visible_pitch = i_width / 4;
             p_pic->i_planes = 3;
@@ -669,12 +671,15 @@ void vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
         case FOURCC_I410:
         case FOURCC_YVU9:
             p_pic->p[ Y_PLANE ].i_lines = i_height;
+            p_pic->p[ Y_PLANE ].i_visible_lines = i_height_aligned;
             p_pic->p[ Y_PLANE ].i_pitch = i_width_aligned;
             p_pic->p[ Y_PLANE ].i_visible_pitch = i_width;
             p_pic->p[ U_PLANE ].i_lines = i_height / 4;
+            p_pic->p[ U_PLANE ].i_visible_lines = i_height_aligned / 4;
             p_pic->p[ U_PLANE ].i_pitch = i_width_aligned / 4;
             p_pic->p[ U_PLANE ].i_visible_pitch = i_width / 4;
             p_pic->p[ V_PLANE ].i_lines = i_height / 4;
+            p_pic->p[ V_PLANE ].i_visible_lines = i_height_aligned / 4;
             p_pic->p[ V_PLANE ].i_pitch = i_width_aligned / 4;
             p_pic->p[ V_PLANE ].i_visible_pitch = i_width / 4;
             p_pic->i_planes = 3;
@@ -684,12 +689,15 @@ void vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
         case FOURCC_I420:
         case FOURCC_IYUV:
             p_pic->p[ Y_PLANE ].i_lines = i_height;
+            p_pic->p[ Y_PLANE ].i_visible_lines = i_height_aligned;
             p_pic->p[ Y_PLANE ].i_pitch = i_width_aligned;
             p_pic->p[ Y_PLANE ].i_visible_pitch = i_width;
             p_pic->p[ U_PLANE ].i_lines = i_height / 2;
+            p_pic->p[ U_PLANE ].i_visible_lines = i_height_aligned / 2;
             p_pic->p[ U_PLANE ].i_pitch = i_width_aligned / 2;
             p_pic->p[ U_PLANE ].i_visible_pitch = i_width / 2;
             p_pic->p[ V_PLANE ].i_lines = i_height / 2;
+            p_pic->p[ V_PLANE ].i_visible_lines = i_height_aligned / 2;
             p_pic->p[ V_PLANE ].i_pitch = i_width_aligned / 2;
             p_pic->p[ V_PLANE ].i_visible_pitch = i_width / 2;
             p_pic->i_planes = 3;
@@ -697,12 +705,15 @@ void vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
 
         case FOURCC_I422:
             p_pic->p[ Y_PLANE ].i_lines = i_height;
+            p_pic->p[ Y_PLANE ].i_visible_lines = i_height_aligned;
             p_pic->p[ Y_PLANE ].i_pitch = i_width_aligned;
             p_pic->p[ Y_PLANE ].i_visible_pitch = i_width;
             p_pic->p[ U_PLANE ].i_lines = i_height;
+            p_pic->p[ U_PLANE ].i_visible_lines = i_height_aligned;
             p_pic->p[ U_PLANE ].i_pitch = i_width_aligned / 2;
             p_pic->p[ U_PLANE ].i_visible_pitch = i_width / 2;
             p_pic->p[ V_PLANE ].i_lines = i_height;
+            p_pic->p[ V_PLANE ].i_visible_lines = i_height_aligned;
             p_pic->p[ V_PLANE ].i_pitch = i_width_aligned / 2;
             p_pic->p[ V_PLANE ].i_visible_pitch = i_width / 2;
             p_pic->i_planes = 3;
@@ -710,12 +721,15 @@ void vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
 
         case FOURCC_I444:
             p_pic->p[ Y_PLANE ].i_lines = i_height;
+            p_pic->p[ Y_PLANE ].i_visible_lines = i_height_aligned;
             p_pic->p[ Y_PLANE ].i_pitch = i_width_aligned;
             p_pic->p[ Y_PLANE ].i_visible_pitch = i_width;
             p_pic->p[ U_PLANE ].i_lines = i_height;
+            p_pic->p[ U_PLANE ].i_visible_lines = i_height_aligned;
             p_pic->p[ U_PLANE ].i_pitch = i_width_aligned;
             p_pic->p[ U_PLANE ].i_visible_pitch = i_width;
             p_pic->p[ V_PLANE ].i_lines = i_height;
+            p_pic->p[ V_PLANE ].i_visible_lines = i_height_aligned;
             p_pic->p[ V_PLANE ].i_pitch = i_width_aligned;
             p_pic->p[ V_PLANE ].i_visible_pitch = i_width;
             p_pic->i_planes = 3;
@@ -723,15 +737,19 @@ void vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
 
         case FOURCC_YUVA:
             p_pic->p[ Y_PLANE ].i_lines = i_height;
+            p_pic->p[ Y_PLANE ].i_visible_lines = i_height_aligned;
             p_pic->p[ Y_PLANE ].i_pitch = i_width_aligned;
             p_pic->p[ Y_PLANE ].i_visible_pitch = i_width;
             p_pic->p[ U_PLANE ].i_lines = i_height;
+            p_pic->p[ U_PLANE ].i_visible_lines = i_height_aligned;
             p_pic->p[ U_PLANE ].i_pitch = i_width_aligned;
             p_pic->p[ U_PLANE ].i_visible_pitch = i_width;
             p_pic->p[ V_PLANE ].i_lines = i_height;
+            p_pic->p[ V_PLANE ].i_visible_lines = i_height_aligned;
             p_pic->p[ V_PLANE ].i_pitch = i_width_aligned;
             p_pic->p[ V_PLANE ].i_visible_pitch = i_width;
             p_pic->p[ A_PLANE ].i_lines = i_height;
+            p_pic->p[ A_PLANE ].i_visible_lines = i_height_aligned;
             p_pic->p[ A_PLANE ].i_pitch = i_width_aligned;
             p_pic->p[ A_PLANE ].i_visible_pitch = i_width;
             p_pic->i_planes = 4;
@@ -739,6 +757,7 @@ void vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
 
         case FOURCC_YUVP:
             p_pic->p->i_lines = i_height;
+            p_pic->p->i_visible_lines = i_height_aligned;
             p_pic->p->i_pitch = i_width_aligned;
             p_pic->p->i_visible_pitch = i_width;
             p_pic->p->i_pixel_pitch = 8;
@@ -747,6 +766,7 @@ void vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
 
         case FOURCC_Y211:
             p_pic->p->i_lines = i_height;
+            p_pic->p->i_visible_lines = i_height_aligned;
             p_pic->p->i_pitch = i_width_aligned;
             p_pic->p->i_visible_pitch = i_width;
             p_pic->p->i_pixel_pitch = 4;
@@ -756,6 +776,7 @@ void vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
         case FOURCC_UYVY:
         case FOURCC_YUY2:
             p_pic->p->i_lines = i_height;
+            p_pic->p->i_visible_lines = i_height_aligned;
             p_pic->p->i_pitch = i_width_aligned * 2;
             p_pic->p->i_visible_pitch = i_width * 2;
             p_pic->p->i_pixel_pitch = 4;
@@ -764,6 +785,7 @@ void vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
 
         case FOURCC_RGB2:
             p_pic->p->i_lines = i_height;
+            p_pic->p->i_visible_lines = i_height_aligned;
             p_pic->p->i_pitch = i_width_aligned;
             p_pic->p->i_visible_pitch = i_width;
             p_pic->p->i_pixel_pitch = 1;
@@ -772,6 +794,7 @@ void vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
 
         case FOURCC_RV15:
             p_pic->p->i_lines = i_height;
+            p_pic->p->i_visible_lines = i_height_aligned;
             p_pic->p->i_pitch = i_width_aligned * 2;
             p_pic->p->i_visible_pitch = i_width * 2;
             p_pic->p->i_pixel_pitch = 2;
@@ -780,6 +803,7 @@ void vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
 
         case FOURCC_RV16:
             p_pic->p->i_lines = i_height;
+            p_pic->p->i_visible_lines = i_height_aligned;
             p_pic->p->i_pitch = i_width_aligned * 2;
             p_pic->p->i_visible_pitch = i_width * 2;
             p_pic->p->i_pixel_pitch = 2;
@@ -788,23 +812,16 @@ void vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
 
         case FOURCC_RV24:
             p_pic->p->i_lines = i_height;
-
-            /* FIXME: Should be 3 here but x11 and our chroma conversion
-             * routines assume 4. */
-#ifdef WIN32
+            p_pic->p->i_visible_lines = i_height_aligned;
             p_pic->p->i_pitch = i_width_aligned * 3;
             p_pic->p->i_visible_pitch = i_width * 3;
             p_pic->p->i_pixel_pitch = 3;
-#else
-            p_pic->p->i_pitch = i_width_aligned * 4;
-            p_pic->p->i_visible_pitch = i_width * 4;
-            p_pic->p->i_pixel_pitch = 4;
-#endif
             p_pic->i_planes = 1;
             break;
 
         case FOURCC_RV32:
             p_pic->p->i_lines = i_height;
+            p_pic->p->i_visible_lines = i_height_aligned;
             p_pic->p->i_pitch = i_width_aligned * 4;
             p_pic->p->i_visible_pitch = i_width * 4;
             p_pic->p->i_pixel_pitch = 4;
@@ -902,7 +919,7 @@ static void CopyPicture( vout_thread_t * p_vout,
             /* There are margins, but with the same width : perfect ! */
             p_vout->p_vlc->pf_memcpy(
                          p_dest->p[i].p_pixels, p_src->p[i].p_pixels,
-                         p_src->p[i].i_pitch * p_src->p[i].i_lines );
+                         p_src->p[i].i_pitch * p_src->p[i].i_visible_lines );
         }
         else
         {
@@ -911,7 +928,7 @@ static void CopyPicture( vout_thread_t * p_vout,
             uint8_t *p_out = p_dest->p[i].p_pixels;
             int i_line;
 
-            for( i_line = p_src->p[i].i_lines; i_line--; )
+            for( i_line = p_src->p[i].i_visible_lines; i_line--; )
             {
                 p_vout->p_vlc->pf_memcpy( p_out, p_in,
                                           p_src->p[i].i_visible_pitch );