Commit 56b5483c authored by gbazin's avatar gbazin
Browse files

* ALL: use i_visible_lines in plane_t.

parent 56d76ed1
......@@ -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;
}
......
......@@ -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,
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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 );
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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)
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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 )
{
......
......@@ -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 */
......
......@@ -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 )
{
......
......@@ -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;
......
......@@ -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;
......
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment