Skip to content

Commit

Permalink
* ALL: use i_visible_lines in plane_t.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gildas Bazin committed Aug 28, 2004
1 parent 56d76ed commit 56b5483
Show file tree
Hide file tree
Showing 37 changed files with 140 additions and 69 deletions.
7 changes: 6 additions & 1 deletion modules/access/v4l/v4l.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions modules/codec/cinepak.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
*
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions modules/codec/dmo/dmo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion modules/codec/ffmpeg/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions modules/codec/rawvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
*
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions modules/codec/tarkin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
*
Expand Down Expand Up @@ -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 );

Expand Down
1 change: 1 addition & 0 deletions modules/gui/beos/VideoOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions modules/gui/macosx/voutqt.m
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ case VLC_FOURCC('Y','U','Y','2'):

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;
Expand Down
13 changes: 13 additions & 0 deletions modules/gui/qnx/vout.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions modules/video_chroma/i420_ymga.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
*
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions modules/video_chroma/i420_yuy2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions modules/video_chroma/i422_yuy2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions modules/video_filter/adjust.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions modules/video_filter/clone.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down
8 changes: 4 additions & 4 deletions modules/video_filter/crop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand All @@ -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 */
Expand Down
10 changes: 5 additions & 5 deletions modules/video_filter/deinterlace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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 )
Expand Down Expand Up @@ -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 ; )
Expand Down Expand Up @@ -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 )
{
Expand Down
4 changes: 2 additions & 2 deletions modules/video_filter/distort.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down
Loading

0 comments on commit 56b5483

Please sign in to comment.