Commit 00ac3ff5 authored by Sam Hocevar's avatar Sam Hocevar

  * ./plugins/chroma/i420_rgb16.c: 24/32 bpp software YUV.
  * ./plugins/ggi/ggi.c: activated double buffering.
  * ./src/video_output/vout_pictures.c: we create more Xv pictures to
    get smoother rendering.
parent 38573f3b
...@@ -3,7 +3,7 @@ Section: graphics ...@@ -3,7 +3,7 @@ Section: graphics
Priority: optional Priority: optional
Maintainer: Samuel Hocevar <sam@zoy.org> Maintainer: Samuel Hocevar <sam@zoy.org>
Build-Depends: debhelper (>=2.2.0), Build-Depends: debhelper (>=2.2.0),
xlibs-dev, xlibs-dev, xlibs-pic
libgnome-dev, libgnome-dev,
libggi2-dev, libggi2-dev,
libglide2-dev [i386], libglide2-dev [i386],
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* i420_rgb.c : YUV to bitmap RGB conversion module for vlc * i420_rgb.c : YUV to bitmap RGB conversion module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: i420_rgb.c,v 1.1 2002/01/04 14:01:34 sam Exp $ * $Id: i420_rgb.c,v 1.2 2002/01/12 01:25:57 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -151,7 +151,6 @@ static int chroma_Init( vout_thread_t *p_vout ) ...@@ -151,7 +151,6 @@ static int chroma_Init( vout_thread_t *p_vout )
break; break;
case FOURCC_BI_BITFIELDS: case FOURCC_BI_BITFIELDS:
//p_vout->chroma.pf_convert = _M( I420_RGB24 );
p_vout->chroma.pf_convert = _M( I420_RGB32 ); p_vout->chroma.pf_convert = _M( I420_RGB32 );
break; break;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* i420_rgb.h : YUV to bitmap RGB conversion module for vlc * i420_rgb.h : YUV to bitmap RGB conversion module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * Copyright (C) 2000 VideoLAN
* $Id: i420_rgb.h,v 1.1 2002/01/04 14:01:34 sam Exp $ * $Id: i420_rgb.h,v 1.2 2002/01/12 01:25:57 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -41,7 +41,6 @@ typedef struct chroma_sys_s ...@@ -41,7 +41,6 @@ typedef struct chroma_sys_s
void _M( I420_RGB8 ) ( vout_thread_t *, picture_t *, picture_t * ); void _M( I420_RGB8 ) ( vout_thread_t *, picture_t *, picture_t * );
#endif #endif
void _M( I420_RGB16 )( vout_thread_t *, picture_t *, picture_t * ); void _M( I420_RGB16 )( vout_thread_t *, picture_t *, picture_t * );
void _M( I420_RGB24 )( vout_thread_t *, picture_t *, picture_t * );
void _M( I420_RGB32 )( vout_thread_t *, picture_t *, picture_t * ); void _M( I420_RGB32 )( vout_thread_t *, picture_t *, picture_t * );
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* i420_rgb16.c : YUV to bitmap RGB conversion module for vlc * i420_rgb16.c : YUV to bitmap RGB conversion module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * Copyright (C) 2000 VideoLAN
* $Id: i420_rgb16.c,v 1.1 2002/01/04 14:01:34 sam Exp $ * $Id: i420_rgb16.c,v 1.2 2002/01/12 01:25:57 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -171,24 +171,132 @@ void _M( I420_RGB16 )( vout_thread_t *p_vout, picture_t *p_src, ...@@ -171,24 +171,132 @@ void _M( I420_RGB16 )( vout_thread_t *p_vout, picture_t *p_src,
} }
} }
/*****************************************************************************
* I420_RGB24: color YUV 4:2:0 to RGB 24 bpp
*****************************************************************************/
void _M( I420_RGB24 )( vout_thread_t *p_vout, picture_t *p_src,
picture_t *p_dest )
{
intf_ErrMsg( "vout error: I420_RGB24 unimplemented, "
"please harass sam@zoy.org" );
}
/***************************************************************************** /*****************************************************************************
* I420_RGB32: color YUV 4:2:0 to RGB 32 bpp * I420_RGB32: color YUV 4:2:0 to RGB 32 bpp
*****************************************************************************
* Horizontal alignment needed:
* - input: 8 pixels (8 Y bytes, 4 U/V bytes), margins not allowed
* - output: 1 pixel (2 bytes), margins allowed
* Vertical alignment needed:
* - input: 2 lines (2 Y lines, 1 U/V line)
* - output: 1 line
*****************************************************************************/ *****************************************************************************/
void _M( I420_RGB32 )( vout_thread_t *p_vout, picture_t *p_src, void _M( I420_RGB32 )( vout_thread_t *p_vout, picture_t *p_src,
picture_t *p_dest ) 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;
boolean_t b_hscale; /* horizontal scaling type */
int i_vscale; /* vertical scaling type */
int i_x, i_y; /* horizontal and vertical indexes */
int i_right_margin;
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 */
/* Conversion buffer pointer */
u32 * p_buffer_start = (u32*)p_vout->chroma.p_sys->p_buffer;
u32 * p_buffer;
/* Offset array pointer */
int * p_offset_start = p_vout->chroma.p_sys->p_offset;
int * p_offset;
if( p_dest->p->b_margin )
{
i_right_margin = (p_dest->p->i_pitch - p_dest->p->i_visible_bytes) / 2;
}
else
{
i_right_margin = 0;
}
if( p_vout->render.i_width & 7 )
{
i_rewind = 8 - ( p_vout->render.i_width & 7 );
}
else
{
i_rewind = 0;
}
/* Rule: when a picture of size (x1,y1) with aspect ratio r1 is rendered
* on a picture of size (x2,y2) with aspect ratio r2, if x1 grows to x1'
* then y1 grows to y1' = x1' * y2/x2 * r2/r1 */
SetOffset( p_vout->render.i_width, p_vout->render.i_height,
p_vout->output.i_width, p_vout->output.i_height,
&b_hscale, &i_vscale, p_offset_start );
#if defined (MODULE_NAME_IS_chroma_i420_rgb)
intf_ErrMsg( "vout error: I420_RGB32 unimplemented, " intf_ErrMsg( "vout error: I420_RGB32 unimplemented, "
"please harass sam@zoy.org" ); "please harass sam@zoy.org" );
#endif
/*
* Perform conversion
*/
i_scale_count = ( i_vscale == 1 ) ?
p_vout->output.i_height : p_vout->render.i_height;
for( i_y = 0; i_y < p_vout->render.i_height; i_y++ )
{
p_pic_start = p_pic;
p_buffer = b_hscale ? p_buffer_start : p_pic;
for ( i_x = p_vout->render.i_width / 8; i_x--; )
{
#if defined (MODULE_NAME_IS_chroma_i420_rgb)
/* FIXME: TODO */
#elif defined (MODULE_NAME_IS_chroma_i420_rgb_mmx)
__asm__( MMX_INIT_32
: : "r" (p_y), "r" (p_u), "r" (p_v), "r" (p_buffer) );
__asm__( ".align 8"
MMX_YUV_MUL
MMX_YUV_ADD
MMX_UNPACK_32
: : "r" (p_y), "r" (p_u), "r" (p_v), "r" (p_buffer) );
p_y += 8;
p_u += 4;
p_v += 4;
p_buffer += 8;
#endif
}
/* Here we do some unaligned reads and duplicate conversions, but
* at least we have all the pixels */
if( i_rewind )
{
p_y -= i_rewind;
p_u -= i_rewind >> 1;
p_v -= i_rewind >> 1;
p_buffer -= i_rewind;
#if defined (MODULE_NAME_IS_chroma_i420_rgb)
/* FIXME: TODO */
#elif defined (MODULE_NAME_IS_chroma_i420_rgb_mmx)
__asm__( MMX_INIT_32
: : "r" (p_y), "r" (p_u), "r" (p_v), "r" (p_buffer) );
__asm__( ".align 8"
MMX_YUV_MUL
MMX_YUV_ADD
MMX_UNPACK_32
: : "r" (p_y), "r" (p_u), "r" (p_v), "r" (p_buffer) );
p_y += 8;
p_u += 4;
p_v += 4;
p_buffer += 8;
#endif
}
SCALE_WIDTH;
SCALE_HEIGHT( 420, 4 );
}
} }
/* Following functions are local */ /* Following functions are local */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* i420_rgb8.c : YUV to bitmap RGB conversion module for vlc * i420_rgb8.c : YUV to bitmap RGB conversion module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * Copyright (C) 2000 VideoLAN
* $Id: i420_rgb8.c,v 1.1 2002/01/04 14:01:34 sam Exp $ * $Id: i420_rgb8.c,v 1.2 2002/01/12 01:25:57 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -76,6 +76,7 @@ void _M( I420_RGB8 )( vout_thread_t *p_vout, picture_t *p_source, ...@@ -76,6 +76,7 @@ void _M( I420_RGB8 )( vout_thread_t *p_vout, picture_t *p_source,
&b_hscale, &i_vscale, p_offset_start ); &b_hscale, &i_vscale, p_offset_start );
/* FIXME */ /* FIXME */
#warning "Please ignore the following warnings, I already know about them"
intf_ErrMsg( "vout error: I420_RGB8 unimplemented, " intf_ErrMsg( "vout error: I420_RGB8 unimplemented, "
"please harass sam@zoy.org" ); "please harass sam@zoy.org" );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_dummy.c: Dummy video output display method for testing purposes * vout_dummy.c: Dummy video output display method for testing purposes
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: vout_dummy.c,v 1.16 2002/01/05 03:49:18 sam Exp $ * $Id: vout_dummy.c,v 1.17 2002/01/12 01:25:57 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#define DUMMY_WIDTH 16 #define DUMMY_WIDTH 16
#define DUMMY_HEIGHT 16 #define DUMMY_HEIGHT 16
#define DUMMY_MAX_DIRECTBUFFERS 5 #define DUMMY_MAX_DIRECTBUFFERS 10
/***************************************************************************** /*****************************************************************************
* vout_sys_t: dummy video output method descriptor * vout_sys_t: dummy video output method descriptor
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* fb.c : framebuffer plugin for vlc * fb.c : framebuffer plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: fb.c,v 1.11 2002/01/06 00:07:37 sam Exp $ * $Id: fb.c,v 1.12 2002/01/12 01:25:57 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -60,7 +60,6 @@ static void vout_End ( vout_thread_t * ); ...@@ -60,7 +60,6 @@ static void vout_End ( vout_thread_t * );
static int OpenDisplay ( vout_thread_t * ); static int OpenDisplay ( vout_thread_t * );
static void CloseDisplay ( vout_thread_t * ); static void CloseDisplay ( vout_thread_t * );
static int NewPicture ( vout_thread_t *, picture_t * );
static void SwitchDisplay ( int i_signal ); static void SwitchDisplay ( int i_signal );
static void TextMode ( int i_tty ); static void TextMode ( int i_tty );
static void GfxMode ( int i_tty ); static void GfxMode ( int i_tty );
...@@ -292,7 +291,7 @@ static int vout_Init( vout_thread_t *p_vout ) ...@@ -292,7 +291,7 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->output.i_chroma = FOURCC_BI_BITFIELDS; break; p_vout->output.i_chroma = FOURCC_BI_BITFIELDS; break;
default: default:
intf_ErrMsg( "vout error: unknown screen depth" ); intf_ErrMsg( "vout error: unknown screen depth" );
return( 0 ); return 0;
} }
p_vout->output.i_width = p_vout->p_sys->i_width; p_vout->output.i_width = p_vout->p_sys->i_width;
...@@ -305,35 +304,64 @@ static int vout_Init( vout_thread_t *p_vout ) ...@@ -305,35 +304,64 @@ static int vout_Init( vout_thread_t *p_vout )
/* Clear the screen */ /* Clear the screen */
memset( p_vout->p_sys->p_video, 0, p_vout->p_sys->i_page_size ); memset( p_vout->p_sys->p_video, 0, p_vout->p_sys->i_page_size );
/* Try to initialize up to 1 direct buffers */ /* Try to initialize 1 direct buffer */
while( I_OUTPUTPICTURES < 1 ) p_pic = NULL;
{
p_pic = NULL;
/* Find an empty picture slot */ /* Find an empty picture slot */
for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ ) for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ )
{ {
if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE ) if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE )
{
p_pic = p_vout->p_picture + i_index;
break;
}
}
/* Allocate the picture */
if( p_pic == NULL || NewPicture( p_vout, p_pic ) )
{ {
p_pic = p_vout->p_picture + i_index;
break; break;
} }
}
p_pic->i_status = DESTROYED_PICTURE; /* Allocate the picture */
p_pic->i_type = DIRECT_PICTURE; if( p_pic == NULL )
{
return 0;
}
PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic; /* We know the chroma, allocate a buffer which will be used
* directly by the decoder */
p_pic->p->p_pixels = p_vout->p_sys->p_video;
p_pic->p->i_pixel_bytes = p_vout->p_sys->i_bytes_per_pixel;
p_pic->p->i_lines = p_vout->p_sys->var_info.yres;
I_OUTPUTPICTURES++; if( p_vout->p_sys->var_info.xres_virtual )
{
p_pic->p->b_margin = 1;
p_pic->p->b_hidden = 1;
p_pic->p->i_pitch = p_vout->p_sys->var_info.xres_virtual
* p_vout->p_sys->i_bytes_per_pixel;
p_pic->p->i_visible_bytes = p_vout->p_sys->var_info.xres
* p_vout->p_sys->i_bytes_per_pixel;
}
else
{
p_pic->p->b_margin = 0;
p_pic->p->i_pitch = p_vout->p_sys->var_info.xres
* p_vout->p_sys->i_bytes_per_pixel;
} }
/* Only useful for p_vout->p_sys->var_info.bits_per_pixel != 8 */
p_pic->p->i_red_mask = ( (1 << p_vout->p_sys->var_info.red.length) - 1 )
<< p_vout->p_sys->var_info.red.offset;
p_pic->p->i_green_mask = ( (1 << p_vout->p_sys->var_info.green.length) - 1 )
<< p_vout->p_sys->var_info.green.offset;
p_pic->p->i_blue_mask = ( (1 << p_vout->p_sys->var_info.blue.length) - 1 )
<< p_vout->p_sys->var_info.blue.offset;
p_pic->i_planes = 1;
p_pic->i_status = DESTROYED_PICTURE;
p_pic->i_type = DIRECT_PICTURE;
PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic;
I_OUTPUTPICTURES++;
return( 0 ); return( 0 );
} }
...@@ -647,48 +675,6 @@ static void CloseDisplay( vout_thread_t *p_vout ) ...@@ -647,48 +675,6 @@ static void CloseDisplay( vout_thread_t *p_vout )
close( p_vout->p_sys->i_fd ); close( p_vout->p_sys->i_fd );
} }
/*****************************************************************************
* NewPicture: allocate a picture
*****************************************************************************
* Returns 0 on success, -1 otherwise
*****************************************************************************/
static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
{
/* We know the chroma, allocate a buffer which will be used
* directly by the decoder */
p_pic->p->p_pixels = p_vout->p_sys->p_video;
p_pic->p->i_pixel_bytes = p_vout->p_sys->i_bytes_per_pixel;
p_pic->p->i_lines = p_vout->p_sys->var_info.yres;
if( p_vout->p_sys->var_info.xres_virtual )
{
p_pic->p->b_margin = 1;
p_pic->p->b_hidden = 1;
p_pic->p->i_pitch = p_vout->p_sys->var_info.xres_virtual
* p_vout->p_sys->i_bytes_per_pixel;
p_pic->p->i_visible_bytes = p_vout->p_sys->var_info.xres
* p_vout->p_sys->i_bytes_per_pixel;
}
else
{
p_pic->p->b_margin = 0;
p_pic->p->i_pitch = p_vout->p_sys->var_info.xres
* p_vout->p_sys->i_bytes_per_pixel;
}
/* Only useful for p_vout->p_sys->var_info.bits_per_pixel != 8 */
p_pic->p->i_red_mask = ( (1 << p_vout->p_sys->var_info.red.length) - 1 )
<< p_vout->p_sys->var_info.red.offset;
p_pic->p->i_green_mask = ( (1 << p_vout->p_sys->var_info.green.length) - 1 )
<< p_vout->p_sys->var_info.green.offset;
p_pic->p->i_blue_mask = ( (1 << p_vout->p_sys->var_info.blue.length) - 1 )
<< p_vout->p_sys->var_info.blue.offset;
p_pic->i_planes = 1;
return 0;
}
/***************************************************************************** /*****************************************************************************
* SwitchDisplay: VT change signal handler * SwitchDisplay: VT change signal handler
***************************************************************************** *****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ggi.c : GGI plugin for vlc * ggi.c : GGI plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: ggi.c,v 1.11 2002/01/07 02:12:29 sam Exp $ * $Id: ggi.c,v 1.12 2002/01/12 01:25:57 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -55,7 +55,6 @@ static void vout_Display ( vout_thread_t *, picture_t * ); ...@@ -55,7 +55,6 @@ static void vout_Display ( vout_thread_t *, picture_t * );
static int OpenDisplay ( vout_thread_t * ); static int OpenDisplay ( vout_thread_t * );
static void CloseDisplay ( vout_thread_t * ); static void CloseDisplay ( vout_thread_t * );
static int NewPicture ( vout_thread_t *, picture_t * );
/***************************************************************************** /*****************************************************************************
* Building configuration tree * Building configuration tree
...@@ -91,7 +90,7 @@ typedef struct vout_sys_s ...@@ -91,7 +90,7 @@ typedef struct vout_sys_s
int i_bits_per_pixel; int i_bits_per_pixel;
/* Buffer information */ /* Buffer information */
ggi_directbuffer * p_buffer[2]; /* buffers */ ggi_directbuffer * pp_buffer[2]; /* buffers */
int i_index; int i_index;
boolean_t b_must_acquire; /* must be acquired before writing */ boolean_t b_must_acquire; /* must be acquired before writing */
...@@ -162,6 +161,8 @@ int vout_Init( vout_thread_t *p_vout ) ...@@ -162,6 +161,8 @@ int vout_Init( vout_thread_t *p_vout )
int i_index; int i_index;
picture_t *p_pic; picture_t *p_pic;
I_OUTPUTPICTURES = 0;
p_vout->output.i_width = p_vout->p_sys->mode.visible.x; p_vout->output.i_width = p_vout->p_sys->mode.visible.x;
p_vout->output.i_height = p_vout->p_sys->mode.visible.y; p_vout->output.i_height = p_vout->p_sys->mode.visible.y;
p_vout->output.i_aspect = p_vout->p_sys->mode.visible.x p_vout->output.i_aspect = p_vout->p_sys->mode.visible.x
...@@ -182,43 +183,64 @@ int vout_Init( vout_thread_t *p_vout ) ...@@ -182,43 +183,64 @@ int vout_Init( vout_thread_t *p_vout )
p_vout->output.i_chroma = FOURCC_BI_BITFIELDS; break; p_vout->output.i_chroma = FOURCC_BI_BITFIELDS; break;
default: default:
intf_ErrMsg( "vout error: unknown screen depth" ); intf_ErrMsg( "vout error: unknown screen depth" );
return( 0 ); return 0;
} }
I_OUTPUTPICTURES = 0; p_pic = NULL;
/* Try to initialize up to 1 direct buffers */ /* Find an empty picture slot */
while( I_OUTPUTPICTURES < 1 ) for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ )
{ {
p_pic = NULL; if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE )
/* Find an empty picture slot */
for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ )
{
if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE )
{
p_pic = p_vout->p_picture + i_index;
break;
}
}
/* Allocate the picture */
if( p_pic == NULL || NewPicture( p_vout, p_pic ) )
{ {
p_pic = p_vout->p_picture + i_index;
break; break;
} }
}
p_pic->i_status = DESTROYED_PICTURE; if( p_pic == NULL )
p_pic->i_type = DIRECT_PICTURE; {
return 0;
}
PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic; #define p_b p_vout->p_sys->pp_buffer
/* We know the chroma, allocate a buffer which will be used
* directly by the decoder */
p_vout->p_sys->i_index = 0;
p_pic->p->p_pixels = p_b[ 0 ]->write;
p_pic->p->i_pixel_bytes = p_b[ 0 ]->buffer.plb.pixelformat->size / 8;
p_pic->p->i_lines = p_vout->p_sys->mode.visible.y;
I_OUTPUTPICTURES++; if( p_b[ 0 ]->buffer.plb.pixelformat->size / 8
* p_vout->p_sys->mode.visible.x
!= p_b[ 0 ]->buffer.plb.stride )
{
p_pic->p->b_margin = 1;
p_pic->p->b_hidden = 1;
p_pic->p->i_pitch = p_b[ 0 ]->buffer.plb.stride;
p_pic->p->i_visible_bytes = p_b[ 0 ]->buffer.plb.pixelformat->size
/ 8 * p_vout->p_sys->mode.visible.x;
}
else
{
p_pic->p->b_margin = 0;
p_pic->p->i_pitch = p_b[ 0 ]->buffer.plb.stride;
} }
return( 0 ); /* Only useful for bits_per_pixel != 8 */
#if 0 p_pic->p->i_red_mask = p_b[ 0 ]->buffer.plb.pixelformat->red_mask;
#define p_b p_vout->p_sys->p_buffer p_pic->p->i_green_mask = p_b[ 0 ]->buffer.plb.pixelformat->green_mask;
p_pic->p->i_blue_mask = p_b[ 0 ]->buffer.plb.pixelformat->blue_mask;
p_pic->i_planes = 1;
p_pic->i_status = DESTROYED_PICTURE;
p_pic->i_type = DIRECT_PICTURE;
PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic;
I_OUTPUTPICTURES++;