Commit aea6698d authored by Sam Hocevar's avatar Sam Hocevar

  * ./include/common.h: hton64 is now an inline function.
  * ./src/video_output/vout_pictures.c et al.: vout4 now automatically
    detects when two chroma formats are the same, such as UYVY/Y422, or
    roughly equivalent, such as I420/YV12. Plugins need not worry about
    conversion anymore.
parent 53b978f8
List of known vlc bugs
$Id: BUGS,v 1.1 2002/01/04 14:01:33 sam Exp $
$Id: BUGS,v 1.2 2002/01/05 02:22:02 sam Exp $
Please try to keep this file up to date. Also, grep for FIXME in the
source files for more and more bugs to fix.
......@@ -23,10 +23,18 @@ Input:
* vlc:foo targets don't work anymore.
Audio output:
* Audio output stutters on some audio cards. For instance kwyxz's SB
128 with an es1371 chip.
Video output:
* We don't render subtitles on RGB surfaces.
* Subtitle colors are just plain wrong.
* The DirectX video output plugin is broken because of vout4.
* The GGI video output plugin is broken because of vout4.
......
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.64 2002/01/04 14:01:34 sam Exp $
* $Id: common.h,v 1.65 2002/01/05 02:22:02 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -286,8 +286,6 @@ struct probedata_s;
* byte orders other than little and big endians are not supported, but only
* the VAX seems to have such exotic properties - note that these 'functions'
* needs <netinet/in.h> or the local equivalent. */
/* FIXME: hton64 should be declared as an extern inline function to avoid
* border effects (see byteorder.h) */
#if WORDS_BIGENDIAN
# define hton16 htons
# define hton32 htonl
......@@ -298,7 +296,12 @@ struct probedata_s;
#else
# define hton16 htons
# define hton32 htonl
# define hton64(i) ( ((u64)(htonl((i) & 0xffffffff)) << 32) | htonl(((i) >> 32) & 0xffffffff ) )
static __inline__ u64 __hton64( u64 i )
{
return ((u64)(htonl((i) & 0xffffffff)) << 32)
| htonl(((i) >> 32) & 0xffffffff );
}
# define hton64(i) __hton64( i )
# define ntoh16 ntohs
# define ntoh32 ntohl
# define ntoh64 hton64
......
......@@ -4,7 +4,7 @@
* includes all common video types and constants.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video.h,v 1.39 2002/01/04 14:01:34 sam Exp $
* $Id: video.h,v 1.40 2002/01/05 02:22:03 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -174,6 +174,62 @@ typedef struct picture_heap_s
#define U_PIXELS p[U_PLANE].p_pixels
#define V_PIXELS p[V_PLANE].p_pixels
static __inline__ int vout_ChromaCmp( u32 i_chroma, u32 i_amorhc )
{
/* If they are the same, they are the same ! */
if( i_chroma == i_amorhc )
{
return 1;
}
/* Check for equivalence classes */
switch( i_chroma )
{
case FOURCC_I420:
case FOURCC_IYUV:
case FOURCC_YV12:
switch( i_amorhc )
{
case FOURCC_I420:
case FOURCC_IYUV:
case FOURCC_YV12:
return 1;
default:
return 0;
}
case FOURCC_UYVY:
case FOURCC_UYNV:
case FOURCC_Y422:
switch( i_amorhc )
{
case FOURCC_UYVY:
case FOURCC_UYNV:
case FOURCC_Y422:
return 1;
default:
return 0;
}
case FOURCC_YUY2:
case FOURCC_YUNV:
switch( i_amorhc )
{
case FOURCC_YUY2:
case FOURCC_YUNV:
return 1;
default:
return 0;
}
default:
return 0;
}
}
/*****************************************************************************
* vout_CopyPicture: copy a picture to another one
*****************************************************************************
......
This diff is collapsed.
This diff is collapsed.
......@@ -5,7 +5,7 @@
* thread, and destroy a previously oppened video output thread.
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: video_output.c,v 1.152 2002/01/04 14:01:35 sam Exp $
* $Id: video_output.c,v 1.153 2002/01/05 02:22:03 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -279,24 +279,26 @@ static int InitThread( vout_thread_t *p_vout )
intf_WarnMsg( 1, "vout info: got %i direct buffer(s)", I_OUTPUTPICTURES );
i_pgcd = ReduceHeight( p_vout->render.i_aspect );
intf_WarnMsg( 1, "vout info: picture in %ix%i, chroma 0x%.8x, "
intf_WarnMsg( 1, "vout info: picture in %ix%i, chroma 0x%.8x (%4.4s), "
"aspect ratio %i:%i",
p_vout->render.i_width, p_vout->render.i_height,
p_vout->render.i_chroma, p_vout->render.i_aspect / i_pgcd,
p_vout->render.i_chroma, (char*)&p_vout->render.i_chroma,
p_vout->render.i_aspect / i_pgcd,
VOUT_ASPECT_FACTOR / i_pgcd );
i_pgcd = ReduceHeight( p_vout->output.i_aspect );
intf_WarnMsg( 1, "vout info: picture out %ix%i, chroma 0x%.8x, "
intf_WarnMsg( 1, "vout info: picture out %ix%i, chroma 0x%.8x (%4.4s), "
"aspect ratio %i:%i",
p_vout->output.i_width, p_vout->output.i_height,
p_vout->output.i_chroma, p_vout->output.i_aspect / i_pgcd,
p_vout->output.i_chroma, (char*)&p_vout->output.i_chroma,
p_vout->output.i_aspect / i_pgcd,
VOUT_ASPECT_FACTOR / i_pgcd );
/* Check whether we managed to create direct buffers similar to
* the render buffers, ie same size, chroma and aspect ratio */
if( ( p_vout->output.i_width == p_vout->render.i_width )
&& ( p_vout->output.i_height == p_vout->render.i_height )
&& ( p_vout->output.i_chroma == p_vout->render.i_chroma )
&& ( vout_ChromaCmp( p_vout->output.i_chroma, p_vout->render.i_chroma ) )
&& ( p_vout->output.i_aspect == p_vout->render.i_aspect ) )
{
/* Cool ! We have direct buffers, we can ask the decoder to
......@@ -305,7 +307,7 @@ static int InitThread( vout_thread_t *p_vout )
* for memcpy operations */
p_vout->b_direct = 1;
intf_WarnMsg( 2, "vout info: mapping "
intf_WarnMsg( 2, "vout info: direct render, mapping "
"render pictures 0-%i to system pictures 1-%i",
VOUT_MAX_PICTURES - 2, VOUT_MAX_PICTURES - 1 );
......@@ -351,7 +353,7 @@ static int InitThread( vout_thread_t *p_vout )
return( 1 );
}
intf_WarnMsg( 2, "vout info: mapping "
intf_WarnMsg( 2, "vout info: indirect render, mapping "
"render pictures %i-%i to system pictures %i-%i",
I_OUTPUTPICTURES - 1, VOUT_MAX_PICTURES - 2,
I_OUTPUTPICTURES, VOUT_MAX_PICTURES - 1 );
......
......@@ -2,7 +2,7 @@
* vout_pictures.c : picture management functions
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: vout_pictures.c,v 1.8 2002/01/04 14:01:35 sam Exp $
* $Id: vout_pictures.c,v 1.9 2002/01/05 02:22:03 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -487,6 +487,7 @@ void vout_AllocatePicture( picture_t *p_pic,
case FOURCC_Y211:
p_pic->p->i_lines = i_height;
p_pic->p->i_pitch = i_width;
p_pic->p->i_pixel_bytes = 4;
p_pic->i_planes = 1;
break;
......@@ -511,7 +512,8 @@ void vout_AllocatePicture( picture_t *p_pic,
break;
default:
intf_ErrMsg( "vout error: unknown chroma type %.8x", i_chroma );
intf_ErrMsg( "vout error: unknown chroma type 0x%.8x (%4.4s)",
i_chroma, (char*)&i_chroma );
p_pic->i_planes = 0;
return;
}
......
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