Commit bf7ee74f authored by Sam Hocevar's avatar Sam Hocevar

  * ./ChangeLog: imported the 0.2.92 changes, unrolled current CVS changes.
  * ./include/config.h et al.: this file is no longer generated.
  * ./include/video.h: we use the FOURCC definition of a chroma format to
    describe picture types (see http://www.webartz.com/fourcc/).
  * ./plugins/dvdread/input_dvdread.c: compilation fix by Eyal Lebedinsky.
  * ./plugins/x11/xcommon.c: fixed the XShm operations order.
parent f023ebc5
......@@ -3,11 +3,163 @@
#===================#
HEAD
* Nothing yet
* Fixed detection of the esd plugin.
* Fixed the ts plugin's input type detection.
* Fixed the BadCursor error in the x11 and xvideo plugins. For real this
time (unlike my 2001/08/03 fix :p).
* Made the wall filter work a bit better. It now spawns a 3x2 mosaic,
but this will eventually be configurable, à la `--filter wall:3x3'.
* Removed duplicate function checks from configure.in.
* Added extra magic to Makefile.modules so that the module Makefiles
are now ridiculously simple. And I mean *simple*. Check it! This will
make a possible switch to full autoconf/automake a lot easier.
* Added the vlc version name to the plugin symbols, to be sure we only load
plugins with the same version number. A nasty consequence is that you
need to rebuild your tree after midnight if you are using a CVS tree :-)
* Got rid of modules_export.h by #defining exported functions in the same
header as their prototype.
* Added modules_inner.h and other commonly used .h files to common.h so
there are less and less files to include, and renamed common.h to
<videolan/vlc.h>.
* First modifications to the module handling system towards my ultimate
goal to get rid of the *_Probe functions. Got rid of TestMethod and
TestCPU, as well as src/misc/tests.c.
* Wrote the chroma plugin handling functions. No YUV functions have been
ported yet because it'ls a lot of work, but the core system works, I
tried it with a naive yv12->rgb16 plugin (which will disappear when the
real functions are ready).
* Made a lot of functions in dvd_summary.c one-liners to avoid wasting
too many output lines.
* Fixed a segfault in input_dvd.c:DVDInit.
* Added a fixfiles.sh script in plugins/gtk to be run after Glade has
generated its C files.
* Did some work on the KDE interface to make it suck a bit less. It still
segfaults, but at least it runs and it looks less ugly.
* RGB SDL rendering works again, though in 16bpp only.
* Made plugins/vcd/linux_cdrom_tools.c independent of any vlc structure
so that it'll be easily put in a library. Maybe libdvdcss?
* Fixed VCD date display.
* Merged vout_xvideo.c, vout_x11.c and vout_common.c into xcommon.c.
* Wrote non-Shm XVideo output.
* Made X11 output work again. Still pretty unstable, only works for 16bpp.
* Additional french translation in po/fr.po. Any taker for the rest?
* Fixed a segfault in video_output.c when the allocated pictures were
not direct buffers.
* Replaced 48x48 .xpm images with 32x32 ones to conform to Debian policy
(Closes Debian bug #126939).
* Removed the automatic ./configure launch when running `make all' for
the first time.
* --filter distort:ripple (Ok, ok, I promise it's the last one !! :-)
* Fixed compilation with dvdcss disabled.
* Fixed compilation with plugins disabled.
* Removed useless variables in the VCD and DVD plugins.
* Fixed a function which was returning "struct foo" in the VCD plugin.
* Fixed the old « XVideo eats more and more CPU » bug I mistakenly
reintroduced in my first vout4 commit.
* We now stop at the first ':' when looking for a module name, to easily
pass information to the modules. Possible example: --vout sdl:software,
implementation of such an option is left as an exercise.
* Merged filter_bob and filter_bob422 into filter_bob. Use --filter bob
to deinterlace 422 into 420 as well.
* Factorized code common to most filters and the video output, optimized
a few filters by aligning data and reading 64 bits at a time.
* Two new absolutely useless, CPU-eating, resource-wasting, but fun
filters: enjoy `transform', which performs flips and 90° rotations, and
`distort', which performs animated image effects (currently only a naive
sine wave is implemented). Usage examples: --filter transform:hflip,
--filter transform:vflip, --filter transform:90, --filter transform:180,
--filter transform:270, --filter distort:wave.
* Added missing XSync() in the XVideo plugin.
* Pathetic attempt at a 4:2:2 renderer and deinterlacer, combining the
most awful line dropping techniques of both BOB and 422 to 420
downscaling. Don't worry, it should only survive for a couple of days.
* New stupid plugin: "--filter wall" for split-image playback :-)
(will evolve into a real image wall plugin when I have time)
* Filter plugins. Not very polished (please don't look at how the dates are
calculated!), but worth a try. Use the following flags:
"--filter invert" for inverse video
"--filter bob" for BOB deinterlacing
* Buffer choice optimizations - vout4 should eat even less CPU now.
* Fixed aspect ratio handling.
* Additional fixes for OSes with no gettext (thanks to ej0).
* Don't try to use gettext if we don't have GNU gettext. This may change
in the future though (most GNU software seems to include a local copy of
gettext in case the operating system doesn't provide it).
* Added vlc-arts to the debian package generation.
* (very old) russian translation courtesy of Valek Filippov <frob@df.ru>.
* Fixed a charset issue in the french translation.
* Updated config.guess and config.sub from GNU's latest versions.
* Added vlc.pot skeleton for translators.
* Removed unused code (intf_channels.c, keystrokes.h).
* Put common_win32.h back into common.h -- it wasn't that big and we
should not multiply header files.
* Added gettext support by Thomas Graf <reeler@reeler.org>, may be
broken on other platforms but we'll only see it when I'm finished
with vout 4 :-)
* New video output version 4, featuring direct to YUV buffer decoding,
non-ugly subtitle blending, XVideo and SDL video output.
* Renamed spu_dec to spudec and mad_adec to mad to stay coherent with
other plugins. Also, renamed mpeg to mpeg_system.
* Added jobi to the AUTHORS file.
* Factored code common to vout_x11.c and vout_xvideo.c.
0.2.92
Fri, 7 Dec 2001 20:18:56 +0100
Mon, 31 Dec 2001 19:50:40 +0100
* Added a missing call to DecoderError() in mpeg_adec.c.
* Fixed a segfault in the aRts plugin.
* Fixed a bug in DecoderError.
* Next Generation Buffer Manager.
* All decoders enter DecoderError() in case of error, even if they
haven't allocated all their data. This prevents the input from getting
stuck if a decoder has failed its initialization.
* Backported lool's fix for the Gtk+ playlist crash.
* If $DISPLAY isn't set, don't try to run the Gtk+ interface.
* Fixed a segfault in input_dvd.c:DVDInit.
* Fixed a PPC compilation issue.
* Mouse wheel seek patch for XVideo courtesy of Peter Surda.
* Ported to SDL.
* Backported a VCD crash fix from the main branch.
* Fixed compilation with dvdcss disabled.
* Bug fixes in the VCD input.
* The SDL plugin now says whether we are using software or hardware YUV
in its window title.
* Added --with-dll-path option for my automated Win32 package builds.
* Initialize SDL before opening the SDL audio output.
* Prevent two SDL video outputs or audio outputs to be spawned at the
same time to avoid ugly crashes.
* TS input: bugfix in DecodePAT and minor optimizations elsewhere.
* TS input: we now check that the contents of the PAT has changed
before updating it, instead of just relying on its version number.
* Disabled broken ALSA audio output. Closes Debian bugs #110869 and #119846.
* Fixed build dependencies on libasound2-dev. Closes Debian bug #121057.
* Changed configure.in so that libXv_pic is used instead of libXv.a when
available. Closes Debian bug #111790.
* CPU detection under BeOS.
* Fixed XVideo port selection.
* Fixed 4:2:2 software rendering.
* Removed cruft I forgot in aout_alsa.c.
* Minor compile fix under Hurd.
* Fixed a potential segfault if the subtitle stream was encountered
before the video stream.
* Fixed potential compilation issues under eg. BSD/OS.
* Fixed unnecessary target remake (recursive make is harmful !).
* Fixed a potential BeOS linking issue.
* Fixed a minor bug in input.c.
* Fixed an issue in Makefile.dep causing to rebuild unnecessary files
in the gtk/gnome plugins.
* Removed cruft from configure.in.
* Fixed major bugs in the PSI decoder.
* Fixed possible segfault with --input.
* Fix for EOF of ES-only streams.
* MPEG-1 aspect ratio patch, courtesy of Vladimir Chernyshov
<greengrass@writeme.com>.
* Seeking patch for X11, courtesy of Peter Surda
<shurdeek@panorama.sth.ac.at>.
* Fixed a segfault on exit when no fast_memcpy module was found.
* Workaround for a bug in the GLIBC dlopen() code.
* Fixed win32 compilation.
* New libmad plug-in, courtesy of Jean-Paul Saman. We now have sound on
iPAQ Familiar Linux.
* Borrowed MPlayer's fast memcpy() routines. Best is autodetected, choose
......
......@@ -244,7 +244,7 @@ distclean: clean
-cd po && $(MAKE) maintainer-clean
rm -f **/*.o **/*~ *.log
rm -f Makefile.opts
rm -f include/defs.h include/config.h include/modules_builtin.h
rm -f include/defs.h include/modules_builtin.h
rm -f src/misc/modules_builtin.h
rm -f config*status config*cache config*log
rm -f gmon.out core build-stamp
......@@ -432,7 +432,7 @@ package-beos:
mv tmp/vlc tmp/vlc-${VLC_QUICKVERSION}
(cd tmp ; find vlc-${VLC_QUICKVERSION} | \
zip -9 -@ vlc-${VLC_QUICKVERSION}-beos.zip )
mv tmp/vlc-${VLC_QUICKVERSION}-beos.zip .
mv tmp/vlc-${VLC_QUICKVERSION}-BeOS-x86.zip .
# Clean up
rm -Rf tmp
......@@ -444,7 +444,7 @@ libdvdcss-snapshot: snapshot-common
rm -Rf tmp/vlc/ipkg
# Remove useless headers
rm -f tmp/vlc/include/*
for file in defs.h.in config.h.in common.h int_types.h ; \
for file in defs.h.in config.h common.h int_types.h ; \
do cp include/$$file tmp/vlc/include/ ; done
# Remove misc files (??? - maybe not really needed)
rm -f tmp/vlc/vlc.spec tmp/vlc/INSTALL-win32.txt
......
......@@ -182,6 +182,10 @@ DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
# Gettext support
DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
# Data and plugin location
DEFINE += -DDATA_PATH=\"@prefix@/share/videolan\"
DEFINE += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\"
###############################################################################
# Tuning and other variables - do not change anything except if you know
# exactly what you are doing
......
......@@ -2,3 +2,7 @@
#undef VERSION
#undef DVD_DEVICE
#undef VCD_DEVICE
#undef COPYRIGHT_MESSAGE
#undef MODULE_SUFFIX
#undef MODULE_SYMBOL
#undef VERSION_MESSAGE
This diff is collapsed.
......@@ -8,9 +8,7 @@ HAVE_VLC=0
if test -r src/interface/main.c; then
HAVE_VLC=1
VLC_VERSION="0.2.92-dev"
AC_SUBST(VLC_VERSION)
VLC_CODENAME=Ourumov
AC_SUBST(VLC_CODENAME)
fi
HAVE_LIBDVDCSS=0
......@@ -34,11 +32,9 @@ AC_PROG_CPP
dnl Gettext stuff
ALL_LINGUAS="de fr ru"
PACKAGE="vlc"
VERSION="$VLC_VERSION"
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_DEFINE_UNQUOTED(PACKAGE, "vlc")
AC_DEFINE_UNQUOTED(VERSION, "$VLC_VERSION")
AM_GNU_GETTEXT
dnl AM_PROG_LIBTOOL
......@@ -579,9 +575,6 @@ AC_ARG_ENABLE(release,
[ VLC_VERSION="${VLC_VERSION}_`date +%Y-%m-%d`";
LIBDVDCSS_VERSION="${LIBDVDCSS_VERSION}_`date +%Y-%m-%d`"; ])
VLC_SYMBOL="`echo ${VLC_VERSION} | tr .- __`"
AC_SUBST(VLC_SYMBOL)
dnl
dnl MMX acceleration
dnl
......@@ -1256,6 +1249,21 @@ AC_ARG_WITH(dll-path,
DLL_PATH=$withval
fi ])
dnl
dnl Stuff used by the program
dnl
AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "vlc $VLC_VERSION $VLC_CODENAME Copyright 1996-2001 VideoLAN\n")
AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VideoLAN Client - version $VLC_VERSION $VLC_CODENAME - (c) 1996-2002 VideoLAN")
VLC_SYMBOL="`echo ${VLC_VERSION} | tr .- __`"
AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__MODULE_$VLC_SYMBOL")
AC_DEFINE_UNQUOTED(MODULE_SYMBOL, $VLC_SYMBOL)
DATA_PATH="${ac_tool_prefix}/share/videolan"
AC_SUBST(DATA_PATH)
PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
AC_SUBST(PLUGIN_PATH)
dnl
dnl Configuration is finished
dnl
......@@ -1345,7 +1353,7 @@ AC_SUBST(SRC_DVDCSS_EXTRA)
AC_SUBST(NEED_GETOPT)
AC_SUBST(NEED_LIBDVDCSS)
AC_OUTPUT([Makefile.opts include/config.h po/Makefile.in])
AC_OUTPUT([Makefile.opts po/Makefile.in])
echo "
global configuration
......
......@@ -36,21 +36,6 @@
*
*/
/*****************************************************************************
* Program information
*****************************************************************************/
/* Program version and copyright message */
#define VERSION_MESSAGE "vlc @VLC_VERSION@ @VLC_CODENAME@ " \
/* "(" PROGRAM_BUILD ") (" PROGRAM_OPTIONS ")\n" */ \
"Copyright 1996-2001 VideoLAN\n"
#define COPYRIGHT_MESSAGE "VideoLAN Client - version @VLC_VERSION@" \
" @VLC_CODENAME@ - (C)1996-2001 VideoLAN"
#define VLC_VERSION "@VLC_VERSION@"
#define MODULE_SUFFIX "__MODULE_@VLC_SYMBOL@"
#define MODULE_SYMBOL @VLC_SYMBOL@
/*****************************************************************************
* Debugging options - define or undefine symbols
*****************************************************************************/
......@@ -99,9 +84,6 @@
* Paths
*/
#define DATA_PATH "@prefix@/share/videolan"
#define PLUGIN_PATH "@prefix@/lib/videolan/vlc"
#define MAX_PLUGIN_COUNT 32
/*****************************************************************************
......@@ -218,7 +200,6 @@
/* DVD defaults */
#define INPUT_DVD_DEVICE_VAR "vlc_dvd_device"
#define INPUT_DVD_DEVICE_DEFAULT "@DVD_DEVICE@"
#define INPUT_TITLE_VAR "vlc_input_title"
#define INPUT_CHAPTER_VAR "vlc_input_chapter"
......@@ -229,7 +210,6 @@
/* VCD defaults */
#define INPUT_VCD_DEVICE_VAR "vlc_vcd_device"
#define INPUT_VCD_DEVICE_DEFAULT "@VCD_DEVICE@"
/*****************************************************************************
* Audio configuration
......@@ -419,7 +399,7 @@
#define VOUT_OUTMEM_SLEEP ((int)(0.020*CLOCK_FREQ))
/* The default video output window title */
#define VOUT_TITLE "VideoLAN Client @VLC_VERSION@"
#define VOUT_TITLE "VideoLAN Client " VERSION
/* Environment variable for framebuffer device, and default value */
#define VOUT_FB_DEV_VAR "vlc_fb_dev"
......
......@@ -50,6 +50,10 @@
#undef VERSION
#undef DVD_DEVICE
#undef VCD_DEVICE
#undef COPYRIGHT_MESSAGE
#undef MODULE_SUFFIX
#undef MODULE_SYMBOL
#undef VERSION_MESSAGE
/* Define if you have the __argz_count function. */
#undef HAVE___ARGZ_COUNT
......
......@@ -4,7 +4,7 @@
* includes all common video types and constants.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video.h,v 1.37 2001/12/31 04:53:33 sam Exp $
* $Id: video.h,v 1.38 2002/01/02 14:37:42 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -105,7 +105,7 @@ typedef struct picture_heap_s
* and should NOT be modified */
int i_width; /* picture width */
int i_height; /* picture height */
int i_chroma; /* picture chroma */
u64 i_chroma; /* picture chroma */
int i_aspect; /* aspect ratio */
/* Real pictures */
......@@ -113,6 +113,10 @@ typedef struct picture_heap_s
} picture_heap_t;
/*****************************************************************************
* Flags used to describe the status of a picture
*****************************************************************************/
/* Picture type */
#define EMPTY_PICTURE 0 /* empty buffer */
#define MEMORY_PICTURE 100 /* heap-allocated buffer */
......@@ -127,24 +131,34 @@ typedef struct picture_heap_s
#define DISPLAYED_PICTURE 5 /* been displayed but is linked */
#define DESTROYED_PICTURE 6 /* allocated but no more used */
/* Picture chroma */
#define EMPTY_PICTURE 0 /* picture slot is empty and available */
#define YUV_420_PICTURE 100 /* 4:2:0 YUV picture */
#define YUV_422_PICTURE 101 /* 4:2:2 YUV picture */
#define YUV_444_PICTURE 102 /* 4:4:4 YUV picture */
#define RGB_8BPP_PICTURE 200 /* RGB 8bpp picture */
#define RGB_16BPP_PICTURE 201 /* RGB 16bpp picture */
#define RGB_32BPP_PICTURE 202 /* RGB 32bpp picture */
/* Aspect ratio (ISO/IEC 13818-2 section 6.3.3, table 6-3) */
#define AR_SQUARE_PICTURE 1 /* square pixels */
#define AR_3_4_PICTURE 2 /* 3:4 picture (TV) */
#define AR_16_9_PICTURE 3 /* 16:9 picture (wide screen) */
#define AR_221_1_PICTURE 4 /* 2.21:1 picture (movie) */
/*****************************************************************************
* Flags used to describe the format of a picture
*****************************************************************************/
#define ONLY_FOURCC(i_chroma) ((i_chroma)&0x00000000ffffffff)
#define ONLY_EXTRA(i_chroma) ((i_chroma)&0xffffffff00000000)
/* Picture chroma - see http://www.webartz.com/fourcc/ */
#define FOURCC_BI_RGB 0x00000000 /* Planar RGB, for 8bpp */
#define FOURCC_RGB 0x32424752 /* alias for BI_RGB */
#define FOURCC_BI_BITFIELDS 0x00000003 /* Planar RGB, for 16, 24, 32bpp */
#define FOURCC_I420 0x30323449 /* Planar 4:2:0, Y:U:V */
#define FOURCC_IYUV 0x56555949 /* alias for I420 */
#define FOURCC_YV12 0x32315659 /* Planar 4:2:0, Y:V:U */
/* Custom formats which we use but which don't exist in the fourcc database */
#define FOURCC_I422 0x32323449
#define FOURCC_I444 0x34343449
/* Picture format - gives more precise information than the chroma */
#define DEPTH_8BPP ((u64)0x00000008<<32)
#define DEPTH_15BPP ((u64)0x00000015<<32)
#define DEPTH_16BPP ((u64)0x00000016<<32)
#define DEPTH_24BPP ((u64)0x00000024<<32)
#define DEPTH_32BPP ((u64)0x00000032<<32)
/* Plane indices */
#define YUV_PLANE 0
#define RGB_PLANE 0
#define MAIN_PLANE 0
#define Y_PLANE 0
#define U_PLANE 1
#define V_PLANE 2
......@@ -155,6 +169,7 @@ typedef struct picture_heap_s
#define B_PLANE 2
/* Shortcuts */
#define P_MAIN planes[ MAIN_PLANE ].p_data
#define P_Y planes[ Y_PLANE ].p_data
#define P_U planes[ U_PLANE ].p_data
#define P_V planes[ V_PLANE ].p_data
......
......@@ -5,7 +5,7 @@
* thread, and destroy a previously oppenned video output thread.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_output.h,v 1.68 2001/12/30 07:09:54 sam Exp $
* $Id: video_output.h,v 1.69 2002/01/02 14:37:42 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -191,7 +191,7 @@ typedef struct vout_thread_s
void vout_InitBank ( void );
void vout_EndBank ( void );
vout_thread_t * vout_CreateThread ( int *pi_status, int, int, int, int );
vout_thread_t * vout_CreateThread ( int *pi_status, int, int, u64, int );
void vout_DestroyThread ( vout_thread_t *, int *pi_status );
vout_fifo_t * vout_CreateFifo ( void );
......
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc.h,v 1.1 2001/12/30 07:09:54 sam Exp $
* $Id: vlc.h,v 1.2 2002/01/02 14:37:42 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -147,6 +147,7 @@ typedef struct aout_sys_s * p_aout_sys_t;
struct vout_thread_s;
struct vout_font_s;
struct vout_sys_s;
struct chroma_sys_s;
struct vdec_thread_s;
struct vpar_thread_s;
struct video_parser_s;
......@@ -547,7 +548,7 @@ typedef struct module_symbols_s
( int, int, long, long, long, void * );
void ( * aout_DestroyFifo ) ( struct aout_fifo_s * );
struct vout_thread_s * (* vout_CreateThread) ( int *, int, int, int, int );
struct vout_thread_s * (* vout_CreateThread) ( int *, int, int, u64, int );
void ( * vout_DestroyThread ) ( struct vout_thread_s *, int * );
struct picture_s * ( * vout_CreatePicture )
......
......@@ -2,7 +2,7 @@
* yv12_rgb16.c : YUV to paletted RGB16 conversion module for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: yv12_rgb16.c,v 1.2 2001/12/31 04:53:33 sam Exp $
* $Id: yv12_rgb16.c,v 1.3 2002/01/02 14:37:42 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -100,13 +100,26 @@ void _M( chroma_getfunctions )( function_list_t * p_function_list )
*****************************************************************************/
static int chroma_Probe( probedata_t *p_data )
{
if( p_data->chroma.p_render->i_chroma != YUV_420_PICTURE
|| p_data->chroma.p_output->i_chroma != RGB_16BPP_PICTURE )
switch( p_data->chroma.p_render->i_chroma )
{
return 0;
case FOURCC_YV12:
case FOURCC_I420:
case FOURCC_IYUV:
switch( ONLY_FOURCC( p_data->chroma.p_output->i_chroma ) )
{
case FOURCC_BI_BITFIELDS:
break;
default:
return 0;
}
break;
default:
return 0;
}
return( 100 );
return 100;
}
/*****************************************************************************
......@@ -116,12 +129,34 @@ static int chroma_Probe( probedata_t *p_data )
*****************************************************************************/
static int chroma_Init( vout_thread_t *p_vout )
{
if( p_vout->render.i_chroma != YUV_420_PICTURE
|| p_vout->output.i_chroma != RGB_16BPP_PICTURE )
switch( p_vout->render.i_chroma )
{
return -1;
}
case FOURCC_YV12:
case FOURCC_I420:
case FOURCC_IYUV:
switch( ONLY_FOURCC( p_vout->output.i_chroma ) )
{
case FOURCC_BI_BITFIELDS:
switch( ONLY_EXTRA( p_vout->output.i_chroma ) )
{
case DEPTH_16BPP:
p_vout->chroma.pf_convert = ConvertYUV420RGB16;
break;
default:
return -1;
}
break;
default:
return -1;
}
break;
default:
return -1;
}
#if 0
p_vout->chroma.p_sys = malloc( sizeof( chroma_sys_t ) );
if( p_vout->chroma.p_sys == NULL )
......@@ -131,7 +166,6 @@ static int chroma_Init( vout_thread_t *p_vout )
#endif
/* FIXME: this is really suboptimal ! */
p_vout->chroma.pf_convert = ConvertYUV420RGB16;
return 0;
}
......@@ -170,16 +204,16 @@ static void ConvertYUV420RGB16( vout_thread_t *p_vout, picture_t *p_source,
pixel_data_t *p_in, *p_in_end, *p_out, *p_out_end;
p_in = p_source->planes[ Y_PLANE ].p_data;
p_in = p_source->P_Y;
p_in_end = p_in + p_source->planes[ Y_PLANE ].i_bytes;
p_out = p_dest->planes[ RGB_PLANE ].p_data;
p_out_end = p_out + p_dest->planes[ RGB_PLANE ].i_bytes;
p_out = p_dest->P_MAIN;
p_out_end = p_out + p_dest->planes[ MAIN_PLANE ].i_bytes;
while( p_in < p_in_end && p_out < p_out_end )
{
int i_src = p_source->planes[ Y_PLANE ].i_line_bytes;
int i_dst = p_dest->planes[ RGB_PLANE ].i_line_bytes / 2;
int i_dst = p_dest->planes[ MAIN_PLANE ].i_line_bytes / 2;
/* Masks: 0xf800 0x07e0 0x001f */
#define RED ((u16*)p_out)[--i_dst] = (u16)(p_in[--i_src]>>3) << 11;
......@@ -195,7 +229,7 @@ static void ConvertYUV420RGB16( vout_thread_t *p_vout, picture_t *p_source,
}
p_in += p_source->planes[ Y_PLANE ].i_line_bytes;
p_out += p_dest->planes[ RGB_PLANE ].i_line_bytes;
p_out += p_dest->planes[ MAIN_PLANE ].i_line_bytes;
if( p_in >= p_in_end || p_out >= p_out_end )
{
......@@ -203,7 +237,7 @@ static void ConvertYUV420RGB16( vout_thread_t *p_vout, picture_t *p_source,
}
i_src = p_source->planes[ Y_PLANE ].i_line_bytes;
i_dst = p_dest->planes[ RGB_PLANE ].i_line_bytes / 2;
i_dst = p_dest->planes[ MAIN_PLANE ].i_line_bytes / 2;
while( i_src && i_dst )
{
......@@ -212,7 +246,7 @@ static void ConvertYUV420RGB16( vout_thread_t *p_vout, picture_t *p_source,
}
p_in += p_source->planes[ Y_PLANE ].i_line_bytes;
p_out += p_dest->planes[ RGB_PLANE ].i_line_bytes;
p_out += p_dest->planes[ MAIN_PLANE ].i_line_bytes;
}
/**********************************************************************
......
......@@ -2,7 +2,7 @@
* yv12_rgb8.c : YUV to paletted RGB8 conversion module for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: yv12_rgb8.c,v 1.3 2001/12/30 07:09:54 sam Exp $
* $Id: yv12_rgb8.c,v 1.4 2002/01/02 14:37:42 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -259,7 +259,7 @@ static void ConvertYUV420RGB8( vout_thread_t *p_vout, picture_t *p_source,
u8* p_y = p_source->planes[ Y_PLANE ].p_data;
u8* p_u = p_source->planes[ U_PLANE ].p_data;
u8* p_v = p_source->planes[ V_PLANE ].p_data;
u8* p_pic = p_dest->planes[ RGB_PLANE ].p_data;
u8* p_pic = p_dest->planes[ MAIN_PLANE ].p_data;
/*
* The dithering matrices
......
......@@ -2,7 +2,7 @@
* vout_dummy.c: Dummy video output display method for testing purposes
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: vout_dummy.c,v 1.13 2001/12/30 07:09:55 sam Exp $
* $Id: vout_dummy.c,v 1.14 2002/01/02 14:37:42 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -117,7 +117,9 @@ static int vout_Init( vout_thread_t *p_vout )
/* Initialize the output structure */
switch( p_vout->render.i_chroma )
{
case YUV_420_PICTURE:
case FOURCC_I420:
case FOURCC_IYUV:
case FOURCC_YV12:
p_vout->output.i_chroma = p_vout->render.i_chroma;
p_vout->output.i_width = p_vout->render.i_width;
p_vout->output.i_height = p_vout->render.i_height;
......@@ -125,7 +127,7 @@ static int vout_Init( vout_thread_t *p_vout )
break;
default:
p_vout->output.i_chroma = RGB_16BPP_PICTURE;
p_vout->output.i_chroma = FOURCC_BI_BITFIELDS | DEPTH_16BPP;
p_vout->output.i_width = p_vout->render.i_width;
p_vout->output.i_height = p_vout->render.i_height;
p_vout->output.i_aspect = p_vout->render.i_aspect;
......@@ -233,24 +235,26 @@ static int DummyNewPicture( vout_thread_t *p_vout, picture_t *p_pic )
{
/* We know this chroma, allocate a buffer which will be used