Commit 95a333bf authored by Sam Hocevar's avatar Sam Hocevar

  * Borrowed MPlayer's fast memcpy() routines. Best is autodetected, choose
    "--memcpy <whatever>" to choose one from c, mmx, mmxext or 3dn.
    Please test! Especially Athlon users.
  * Added versioned build-dep to libasound2-dev (Closes Debian bug #121057).
  * Updated Gtk/GNOME interfaces to use "udpstream" instead of "ts".
  * Unrolled ChangeLog.
parent c4535c4c
......@@ -4,6 +4,79 @@
HEAD
* Borrowed MPlayer's fast memcpy() routines. Best is autodetected, choose
"--memcpy <whatever>" to choose one from c, mmx, mmxext or 3dn.
* Added versioned build-dep to libasound2-dev (Closes Debian bug #121057).
* Updated Gtk/GNOME interfaces to use "udpstream" instead of "ts".
* More checks for GTK headers.
* Fixed a crash when pausing.
* Fixed numerous bugs in ES selection.
* Fixed stupid bug in vout_Manage. It sometimes called SetDSequenceMatrix
when there was no valid sequence.
* Hopeless fix for the input netlist corruption bug.
* Implemented simple BDirectWindow (DMA) support.
* DeleteDecoderConfig wasn't freeing (anymore) the packets left in the
decoder fifo. This bug was creating an io_vec starving on title change
when playing DVDs.
* Removed a bug in the Makefile that made the CVS-snapshots building fail.
* Added "#include <string.>" to include/threads.h.
* Removed the mutex the vout and intf thread (were supposed to use)
for syncronizing acces to the p_vout->p_sys structure.
* Added error checking in pthread wrapper; as a result, intf_msg.h must
now be included *before* threads.h.
* Changed all files to include intf_msg.h before threads.h; while I was
at it, I update the copyright notices.
* Removed the obsolete darwin plug-in.
* Fixed a deadlock (bug reported by marcari).
* Various (sometimes hopeless) fixes to try to improve xvideo stability.
* Documentation updates.
* Updated man page.
* dvd:<device>[@<raw device>] to avoid device namespace collision under
win32.
* Fixed a compilation issue under Win32.
* Fixed a potential packet corruption in the DVD input.
* Changed the protocol version for communication between vlc and vlcs
from 12 to 13 (due to change from ts:// to udpstream://)
* Big clean-up to allow compiling every module as plugins.
* Added bytes_swap.h to provide ntoh() and htol() on Win32. With this
change we don't have to link winsock2 with every plugin anymore. This
should also give us a slight speed increase.
* Added #define WIN32_LEAN_AND_MEAN in threads.h to speed-up compilation
on Win32.
* Modified ac_downmix_3dn and sse so they compile with the latest gcc for
Win32.
* Support for libdvdread.
* Added "Video" menu hint to debian/*menu (Closes Debian bug #121036).
* Major rewrite of the network layer. only supported syntax is:
udp[stream]:[//][serveraddr:[serverport]][@[bindaddr][:bindport]]
* Don`t use long long, use u64/s64 (int_types.h).
* Fixed a stale pointer in mpeg_vdec_Run().
* (Hopefully) fixed the network connect() bug under UNIX.
* aRts audio output courtesy of Emmanuel Blindauer <manu@agat.net>.
* Fix to the esd plugin when esd-config --cflags is nonempty.
* --channels puts gtk/gnome in multi-channel network mode.
* The network window of the interface reports the values of the environment
variables.
* Channels mode excludes vls configuration.
* The vlc does not try to bind vls.via.ecp.fr by default when you select
channels mode.
* Fixed MacOS X 10.1 network input, thanks to Mathias Kretschmer
<mathias@research.att.com>.
* Fixed a few crashes due to race conditions in the decoder spawning.
* Removed unused code here and there.
* Fixed a bug in altivec detection on MacOS X.
* It seems that the 'focus' bug under WinME is solved.
* Updated the INSTALL-win32.txt file.
* The ./configure script is more friendly for Win32 users.
* Moved warning message to debug message in spdif pass-through plugin.
* Changed a bit the wait time. It works better here, please test.
* The default file-translation mode was not being set under win32.
* Fixed heap corruption issues in ac3dec (thanks reno).
* Fixed a crash when using `--input dvd /dev/dvd' instead of `dvd:/dev/dvd'.
* configure should no longer assume AltiVec is supported when it actually
isn't with buggy compilers and/or pre-set $CFLAGS.
* Commited my little release-howto (only useful to core vlc developers).
* Closing Debian bug #119369 which was fixed a while ago.
* Decoder modularization.
0.2.91
......
......@@ -4,7 +4,10 @@
HEAD
* Nothing yet.
* Update for libdvdcss documentation.
* Reworked Keith Packard's raw device patch. The name of the raw device
is in the environment variable DVDCSS_RAW_DEVICE.
* Fixed a bug in libdvdcss: the key wasn't searched when it had to.
1.0.0
Mon, 12 Nov 2001 17:14:29 +0100
......
......@@ -34,6 +34,7 @@ PLUGINS_DIR := ac3_adec \
kde \
lpcm_adec \
macosx \
memcpy \
mga \
motion \
mpeg \
......@@ -78,6 +79,10 @@ PLUGINS_TARGETS := ac3_adec/ac3_adec \
kde/kde \
lpcm_adec/lpcm_adec \
macosx/macosx \
memcpy/memcpy \
memcpy/memcpymmx \
memcpy/memcpymmxext \
memcpy/memcpy3dn \
mga/mga \
motion/motion \
motion/motionmmx \
......
This diff is collapsed.
......@@ -295,15 +295,15 @@ ARCH=${target_cpu}
dnl
dnl default modules
dnl
BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion imdct downmix mpeg_adec lpcm_adec ac3_adec mpeg_vdec"
BUILTINS="${BUILTINS} es ps ts memcpy yuv idct idctclassic motion imdct downmix mpeg_adec lpcm_adec ac3_adec mpeg_vdec"
PLUGINS="${PLUGINS} ac3_spdif spu_dec"
dnl
dnl Accelerated modules
dnl
MMX_MODULES="yuvmmx idctmmx motionmmx"
MMXEXT_MODULES="idctmmxext motionmmxext"
THREEDNOW_MODULES="imdct3dn downmix3dn"
MMX_MODULES="memcpymmx yuvmmx idctmmx motionmmx"
MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
SSE_MODULES="imdctsse downmixsse"
ALTIVEC_MODULES="idctaltivec motionaltivec"
......@@ -328,7 +328,7 @@ AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly],
[AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));],
ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)])
if test x"$ac_cv_3dnow_inline" != x"no"; then
AC_DEFINE(HAVE_3DNOW, 1, Define if \$CC groks 3D Now! inline assembly.)
AC_DEFINE(CAN_COMPILE_3DNOW, 1, Define if \$CC groks 3D Now! inline assembly.)
ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
fi
......@@ -337,7 +337,7 @@ AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
[AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));],
ac_cv_sse_inline=yes, ac_cv_sse_inline=no)])
if test x"$ac_cv_sse_inline" != x"no"; then
AC_DEFINE(HAVE_SSE, 1, Define if \$CC groks SSE inline assembly.)
AC_DEFINE(CAN_COMPILE_SSE, 1, Define if \$CC groks SSE inline assembly.)
ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
fi
......@@ -353,7 +353,7 @@ AC_CACHE_CHECK([if \$CC groks Altivec inline assembly],
CFLAGS=$save_CFLAGS
])])
if test x"$ac_cv_altivec_inline" != x"no"; then
AC_DEFINE(HAVE_ALTIVEC, 1, Define if \$CC groks ALTIVEC inline assembly.)
AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks ALTIVEC inline assembly.)
ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
fi
......@@ -372,7 +372,7 @@ AC_CACHE_CHECK([if \$CC groks Altivec C extensions],
CFLAGS=$save_CFLAGS
])
if test x"$ac_cv_c_altivec" != x"no"; then
AC_DEFINE(HAVE_C_ALTIVEC, 1, Define if your compiler groks C altivec extensions.)
AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C altivec extensions.)
CFLAGS_ALTIVEC="$CFLAGS_ALTIVEC $ac_cv_c_altivec"
ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
fi
......@@ -1129,7 +1129,7 @@ AC_ARG_ENABLE(alsa,
(default disabled)],
[if test x$enable_alsa = xyes
then
AC_CHECK_HEADER(sys/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
if test x$have_alsa = xtrue
then
PLUGINS="${PLUGINS} alsa"
......
vlc (0.2.91-2) unstable; urgency=low
* Added versioned build-dep to libasound2-dev (Closes: #121057).
* Added "Video" menu hints (Closes: #121036).
-- Samuel Hocevar <sam@zoy.org> Sun, 25 Nov 2001 02:25:34 +0100
......
......@@ -2,7 +2,7 @@ Source: vlc
Section: graphics
Priority: optional
Maintainer: Samuel Hocevar <sam@zoy.org>
Build-Depends: debhelper (>=2.2.0), xlibs-dev, libgnome-dev, libggi2-dev, libglide2-dev [i386], libesd0-dev, libsdl1.2-dev, libqt-dev, libasound2-dev [alpha i386 ia64 m68k powerpc]
Build-Depends: debhelper (>=2.2.0), xlibs-dev, libgnome-dev, libggi2-dev, libglide2-dev [i386], libesd0-dev, libsdl1.2-dev, libqt-dev, libasound2-dev [alpha i386 ia64 m68k powerpc] (>=0.9.0beta7)
Standards-Version: 3.0.1
Package: vlc
......
usr/lib
usr/share/doc/libdvdcss0
usr/share/doc/libdvdcss1
......@@ -94,8 +94,7 @@ install: build
# libdvdcss start
mv debian/vlc/usr/include/videolan/dvdcss.h \
debian/libdvdcss$(major)-dev/usr/include/videolan
rmdir debian/vlc/usr/include/videolan
rmdir debian/vlc/usr/include
rm -Rf debian/vlc/usr/include
mv debian/vlc/usr/lib/*.a debian/libdvdcss$(major)-dev/usr/lib
mv debian/vlc/usr/lib/*.so debian/libdvdcss$(major)-dev/usr/lib
mv debian/vlc/usr/lib/*.so.* debian/libdvdcss$(major)/usr/lib
......
......@@ -27,8 +27,8 @@ The input thread spawns the appropriate decoder modules from <filename>
src/input/input_dec.c</filename>. The <function>Dec_CreateThread</funcion>
function selects the more accurate decoder module. Each decoder module
looks at decoder_config.i_type and returns a score [ see the modules
section ]. It then launches <function> module.pf_RunThread()</function>,
with an <type>decoder_config_t</type>, described in <filename>
section ]. It then launches <function> module.pf_run()</function>,
with a <type>decoder_config_t</type>, described in <filename>
include/input_ext-dec.h</filename>.
</para>
......
......@@ -66,6 +66,9 @@ Set
.B vlc
verbosity. This command is cumulative, you can use "-vv" or "-vvvv" for increased verbosity.
.TP
.B \-\-memcpy <module>
Specify a module for performing heavy memory copies: "memcpy", "sse" for instance.
.TP
.B \-\-noaudio
Disable audio output.
.TP
......
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.51 2001/11/28 15:08:04 massiot Exp $
* $Id: common.h,v 1.52 2001/12/03 16:18:37 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -237,6 +237,8 @@ struct decoder_fifo_s;
#define I64C(x) x##LL
/* Pointer to the fast memcpy plugin function */
extern void* ( * pf_fast_memcpy ) ( void *, const void *, size_t );
/* The win32 specific stuff was getting really big so it has been moved */
#if defined( WIN32 )
......@@ -282,6 +284,8 @@ typedef struct module_symbols_s
void ( * intf_PlaylistJumpto ) ( struct playlist_s *, int );
void ( * intf_UrlDecode ) ( char * );
void* ( * pf_fast_memcpy ) ( void *, const void *, size_t );
void ( * msleep ) ( mtime_t );
mtime_t ( * mdate ) ( void );
......
......@@ -90,6 +90,9 @@
* outputting an error message (in second) */
#define THREAD_COND_TIMEOUT 5
/* Environment variable containing the memcpy method */
#define MEMCPY_METHOD_VAR "vlc_memcpy"
/*
* Decoders FIFO configuration
*/
......@@ -326,16 +329,11 @@
/* Default dimensions for display window - these dimensions are enough for the
* standard width and height broadcasted MPEG-2 streams or DVDs */
#define VOUT_WIDTH_VAR "vlc_width"
#define VOUT_HEIGHT_VAR "vlc_height"
#define VOUT_WIDTH_DEFAULT 720
#define VOUT_HEIGHT_VAR "vlc_height"
#define VOUT_HEIGHT_DEFAULT 576
#define VOUT_DEPTH_VAR "vlc_depth"
#define VOUT_DEPTH_DEFAULT 15
#define VOUT_FULLSCREEN_VAR "vlc_fullscreen"
#define VOUT_FULLSCREEN_DEFAULT 0
#define VOUT_FULLSCREEN_DEPTH_VAR "vlc_fullscreen_depth"
#define VOUT_FULLSCREEN_DEPTH_DEFAULT 32
......
......@@ -97,9 +97,15 @@
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define if you have the <gdk/gdk.h> header file. */
#undef HAVE_GDK_GDK_H
/* Define if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H
/* Define if you have the <glib.h> header file. */
#undef HAVE_GLIB_H
/* Define if you have the <gnome.h> header file. */
#undef HAVE_GNOME_H
......@@ -203,16 +209,16 @@
#undef BOOLEAN_T_IN_CTHREADS_H
/* Define if $CC groks 3D Now! inline assembly. */
#undef HAVE_3DNOW
#undef CAN_COMPILE_3DNOW
/* Define if $CC groks SSE inline assembly. */
#undef HAVE_SSE
#undef CAN_COMPILE_SSE
/* Define if $CC groks ALTIVEC inline assembly. */
#undef HAVE_ALTIVEC
#undef CAN_COMPILE_ALTIVEC
/* Define if your compiler groks C altivec extensions. */
#undef HAVE_C_ALTIVEC
#undef CAN_COMPILE_C_ALTIVEC
/* Define if <sys/cdio.h> defines dvd_struct. */
#undef DVD_STRUCT_IN_SYS_CDIO_H
......
......@@ -2,7 +2,7 @@
* input_ext-dec.h: structures exported to the VideoLAN decoders
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-dec.h,v 1.39 2001/11/15 17:39:12 sam Exp $
* $Id: input_ext-dec.h,v 1.40 2001/12/03 16:18:37 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
......@@ -479,14 +479,14 @@ static __inline__ void GetChunk( bit_stream_t * p_bit_stream,
if( (i_available = p_bit_stream->p_end - p_bit_stream->p_byte)
>= i_buf_len )
{
memcpy( p_buffer, p_bit_stream->p_byte, i_buf_len );
pf_fast_memcpy( p_buffer, p_bit_stream->p_byte, i_buf_len );
p_bit_stream->p_byte += i_buf_len;
}
else
{
do
{
memcpy( p_buffer, p_bit_stream->p_byte, i_available );
pf_fast_memcpy( p_buffer, p_bit_stream->p_byte, i_available );
p_bit_stream->p_byte = p_bit_stream->p_end;
p_buffer += i_available;
i_buf_len -= i_available;
......@@ -497,7 +497,7 @@ static __inline__ void GetChunk( bit_stream_t * p_bit_stream,
if( i_buf_len )
{
memcpy( p_buffer, p_bit_stream->p_byte, i_buf_len );
pf_fast_memcpy( p_buffer, p_bit_stream->p_byte, i_buf_len );
p_bit_stream->p_byte += i_buf_len;
}
}
......
......@@ -3,7 +3,7 @@
* Declaration and extern access to global program object.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: main.h,v 1.22 2001/10/01 16:18:48 massiot Exp $
* $Id: main.h,v 1.23 2001/12/03 16:18:37 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -50,6 +50,9 @@ typedef struct main_s
boolean_t b_video; /* is video output allowed ? */
boolean_t b_ac3;
/* memcpy plugin used */
struct module_s * p_memcpy_module;
/* Unique threads */
p_intf_thread_t p_intf; /* main interface thread */
......
......@@ -2,7 +2,7 @@
* modules.h : Module management functions.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules.h,v 1.32 2001/11/13 18:10:38 sam Exp $
* $Id: modules.h,v 1.33 2001/12/03 16:18:37 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -67,6 +67,7 @@ typedef void * module_handle_t;
#define MODULE_CAPABILITY_YUV 1 << 9 /* YUV colorspace conversion */
#define MODULE_CAPABILITY_IMDCT 1 << 10 /* IMDCT transformation */
#define MODULE_CAPABILITY_DOWNMIX 1 << 11 /* AC3 downmix */
#define MODULE_CAPABILITY_MEMCPY 1 << 12 /* memcpy */
/* FIXME: kludge */
struct input_area_s;
......@@ -219,9 +220,15 @@ typedef struct function_list_s
/* Decoder plugins */
struct
{
int ( * pf_RunThread ) ( struct decoder_config_s * p_config );
int ( * pf_run ) ( struct decoder_config_s * p_config );
} dec;
/* memcpy plugins */
struct
{
void* ( * pf_fast_memcpy ) ( void *, const void *, size_t );
} memcpy;
} functions;
} function_list_t;
......@@ -241,6 +248,7 @@ typedef struct module_functions_s
function_list_t yuv;
function_list_t imdct;
function_list_t downmix;
function_list_t memcpy;
} module_functions_t;
......
......@@ -45,6 +45,7 @@
(p_symbols)->intf_PlaylistDestroy = intf_PlaylistDestroy; \
(p_symbols)->intf_PlaylistJumpto = intf_PlaylistJumpto; \
(p_symbols)->intf_UrlDecode = intf_UrlDecode; \
(p_symbols)->pf_fast_memcpy = pf_fast_memcpy; \
(p_symbols)->msleep = msleep; \
(p_symbols)->mdate = mdate; \
(p_symbols)->network_ChannelCreate = network_ChannelCreate; \
......@@ -149,6 +150,8 @@
# define intf_PlaylistJumpto(a,b) p_symbols->intf_PlaylistJumpto(a,b)
# define intf_UrlDecode(a) p_symbols->intf_UrlDecode(a)
# define pf_fast_memcpy p_symbols->pf_fast_memcpy
# define msleep(a) p_symbols->msleep(a)
# define mdate() p_symbols->mdate()
......
......@@ -2,7 +2,7 @@
* ac3_adec.c: ac3 decoder module main file
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ac3_adec.c,v 1.4 2001/11/28 15:08:04 massiot Exp $
* $Id: ac3_adec.c,v 1.5 2001/12/03 16:18:37 sam Exp $
*
* Authors: Michel Lespinasse <walken@zoy.org>
*
......@@ -75,7 +75,7 @@ static void BitstreamCallback ( bit_stream_t *p_bit_stream,
void _M( adec_getfunctions )( function_list_t * p_function_list )
{
p_function_list->pf_probe = ac3_adec_Probe;
p_function_list->functions.dec.pf_RunThread = ac3_adec_Run;
p_function_list->functions.dec.pf_run = ac3_adec_Run;
}
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* ac3_spdif.c: ac3 pass-through to external decoder with enabled soundcard
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: ac3_spdif.c,v 1.4 2001/11/28 15:08:05 massiot Exp $
* $Id: ac3_spdif.c,v 1.5 2001/12/03 16:18:37 sam Exp $
*
* Authors: Stphane Borel <stef@via.ecp.fr>
* Juha Yrjola <jyrjola@cc.hut.fi>
......@@ -75,7 +75,7 @@ static void BitstreamCallback( bit_stream_t *, boolean_t );
void _M( adec_getfunctions )( function_list_t * p_function_list )
{
p_function_list->pf_probe = ac3_spdif_Probe;
p_function_list->functions.dec.pf_RunThread = ac3_spdif_Run;
p_function_list->functions.dec.pf_run = ac3_spdif_Run;
}
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* aout_alsa.c : Alsa functions library
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: aout_alsa.c,v 1.20 2001/11/28 15:08:05 massiot Exp $
* $Id: aout_alsa.c,v 1.21 2001/12/03 16:18:37 sam Exp $
*
* Authors: Henri Fallon <henri@videolan.org> - Original Author
* Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
......@@ -36,7 +36,7 @@
#include <stdio.h> /* "intf_msg.h" */
#include <stdlib.h> /* calloc(), malloc(), free() */
#include <sys/asoundlib.h>
#include <alsa/asoundlib.h>
#include "config.h"
#include "common.h" /* boolean_t, byte_t */
......
......@@ -2,7 +2,7 @@
* gtk_open.c : functions to handle file/disc/network open widgets.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_open.c,v 1.9 2001/11/28 15:08:05 massiot Exp $
* $Id: gtk_open.c,v 1.10 2001/12/03 16:18:37 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -336,7 +336,7 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data )
if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button),
"network_ts" ) )->active )
{
psz_protocol = "ts";
psz_protocol = "udpstream";
}
else if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button),
"network_rtp" ) )->active )
......
......@@ -2,7 +2,7 @@
* lpcm_decoder_thread.c: lpcm decoder thread
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: lpcm_adec.c,v 1.2 2001/11/28 15:08:05 massiot Exp $
* $Id: lpcm_adec.c,v 1.3 2001/12/03 16:18:37 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Henri Fallon <henri@videolan.org>
......@@ -71,7 +71,7 @@ static void lpcm_adec_EndThread ( lpcmdec_thread_t * );
void _M( adec_getfunctions )( function_list_t * p_function_list )
{
p_function_list->pf_probe = lpcm_adec_Probe;
p_function_list->functions.dec.pf_RunThread = lpcm_adec_Run;
p_function_list->functions.dec.pf_run = lpcm_adec_Run;
}
/*****************************************************************************
......
###############################################################################
# vlc (VideoLAN Client) memcpy module makefile
# (c)2001 VideoLAN
###############################################################################
#
# Objects
#
PLUGIN_MEMCPY = memcpy.o
PLUGIN_MEMCPYMMX = memcpymmx.o
PLUGIN_MEMCPYMMXEXT = memcpymmxext.o
PLUGIN_MEMCPY3DN = memcpy3dn.o
BUILTIN_MEMCPY = $(PLUGIN_MEMCPY:%.o=BUILTIN_%.o)
BUILTIN_MEMCPYMMX = $(PLUGIN_MEMCPYMMX:%.o=BUILTIN_%.o)
BUILTIN_MEMCPYMMXEXT = $(PLUGIN_MEMCPYMMXEXT:%.o=BUILTIN_%.o)
BUILTIN_MEMCPY3DN = $(PLUGIN_MEMCPY3DN:%.o=BUILTIN_%.o)
PLUGIN_C = $(PLUGIN_MEMCPY) $(PLUGIN_MEMCPYMMX) $(PLUGIN_MEMCPYMMXEXT) $(PLUGIN_MEMCPY3DN)
BUILTIN_C = $(BUILTIN_MEMCPY) $(BUILTIN_MEMCPYMMX) $(BUILTIN_MEMCPYMMXEXT) $(BUILTIN_MEMCPY3DN)
ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
#
# Virtual targets
#
include ../../Makefile.modules
#
# Real targets
#
../memcpy.so: $(PLUGIN_MEMCPY)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
../memcpy.a: $(BUILTIN_MEMCPY)
ar r $@ $^
$(RANLIB) $@
../memcpymmx.so: $(PLUGIN_MEMCPYMMX)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
../memcpymmx.a: $(BUILTIN_MEMCPYMMX)
ar r $@ $^
$(RANLIB) $@
../memcpymmxext.so: $(PLUGIN_MEMCPYMMXEXT)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
../memcpymmxext.a: $(BUILTIN_MEMCPYMMXEXT)
ar r $@ $^
$(RANLIB) $@
../memcpy3dn.so: $(PLUGIN_MEMCPY3DN)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
../memcpy3dn.a: $(BUILTIN_MEMCPY3DN)
ar r $@ $^
$(RANLIB) $@
This diff is collapsed.
/*****************************************************************************
* memcpy.c : classic memcpy module
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: memcpy.c,v 1.1 2001/12/03 16:18:37 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define MODULE_NAME memcpy
#include "modules_inner.h"
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "common.h"
#include "intf_msg.h"
#include "threads.h"
#include "mtime.h"
#include "tests.h"
#include "modules.h"
#include "modules_export.h"
/*****************************************************************************
* Local and extern prototypes.
*****************************************************************************/
static void memcpy_getfunctions( function_list_t * p_function_list );
static int memcpy_Probe ( probedata_t *p_data );
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
MODULE_CONFIG_START
ADD_WINDOW( "Configuration for C memcpy module" )
ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
MODULE_CONFIG_STOP
MODULE_INIT_START
p_module->i_capabilities = MODULE_CAPABILITY_NULL
| MODULE_CAPABILITY_MEMCPY;
p_module->psz_longname = "libc memcpy module";
MODULE_INIT_STOP
MODULE_ACTIVATE_START
memcpy_getfunctions( &p_module->p_functions->memcpy );
MODULE_ACTIVATE_STOP
MODULE_DEACTIVATE_START
MODULE_DEACTIVATE_STOP
/* Following functions are local */
/*****************************************************************************
* Functions exported as capabilities. They are declared as static so that
* we don't pollute the namespace too much.
*****************************************************************************/
static void memcpy_getfunctions( function_list_t * p_function_list )
{
p_function_list->pf_probe = memcpy_Probe;
#define F p_function_list->functions.memcpy
F.pf_fast_memcpy = memcpy;
#undef F
}
/*****************************************************************************
* memcpy_Probe: returns a preference score
*****************************************************************************/
static int memcpy_Probe( probedata_t *p_data )
{
if( TestMethod( MEMCPY_METHOD_VAR, "memcpy" )
|| TestMethod( MEMCPY_METHOD_VAR, "c" ) )
{
return( 999 );
}
/* This plugin always works */
return( 50 );
}
/*****************************************************************************
* memcpy3dn.c : 3D Now! memcpy module
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: memcpy3dn.c,v 1.1 2001/12/03 16:18:37 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define MODULE_NAME memcpy3dn
#include "modules_inner.h"
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "common.h"
#include "intf_msg.h"
#include "threads.h"
#include "mtime.h"
#include "tests.h"
#include "modules.h"
#include "modules_export.h"
/*****************************************************************************
* Local and extern prototypes.
*****************************************************************************/
static void memcpy_getfunctions( function_list_t * p_function_list );
static int memcpy_Probe ( probedata_t *p_data );
void * _M( fast_memcpy ) ( void * to, const void * from, size_t len );
#undef HAVE_MMX
#undef HAVE_MMX2
#undef HAVE_SSE
#undef HAVE_SSE2
#define HAVE_3DNOW
#include "fastmemcpy.h"
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
MODULE_CONFIG_START
ADD_WINDOW( "Configuration for 3D Now! memcpy module" )
ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
MODULE_CONFIG_STOP
MODULE_INIT_START
p_module->i_capabilities = MODULE_CAPABILITY_NULL
| MODULE_CAPABILITY_MEMCPY;
p_module->psz_longname = "3D Now! memcpy module";
MODULE_INIT_STOP
MODULE_ACTIVATE_START
memcpy_getfunctions( &p_module->p_functions->memcpy );
MODULE_ACTIVATE_STOP
MODULE_DEACTIVATE_START
MODULE_DEACTIVATE_STOP
/* Following functions are local */
/*****************************************************************************
* Functions exported as capabilities. They are declared as static so that
* we don't pollute the namespace too much.
*****************************************************************************/
static void memcpy_getfunctions( function_list_t * p_function_list )
{
p_function_list->pf_probe = memcpy_Probe;
#define F p_function_list->functions.memcpy
F.pf_fast_memcpy = _M( fast_memcpy );
#undef F
}
/*****************************************************************************
* memcpy_Probe: returns a preference score
*****************************************************************************/
static int memcpy_Probe( probedata_t *p_data )
{
/* Test for 3D Now! support in the CPU */
if( !TestCPU( CPU_CAPABILITY_3DNOW ) )
{
return( 0 );
}
if( TestMethod( MEMCPY_METHOD_VAR, "memcpy3dn" )
|| TestMethod( MEMCPY_METHOD_VAR, "3dn" ) )
{
return( 999 );
}
/* This plugin always works */
return( 100 );
}
/*****************************************************************************
* memcpymmx.c : MMX memcpy module
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: memcpymmx.c,v 1.1 2001/12/03 16:18:37 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define MODULE_NAME memcpymmx
#include "modules_inner.h"
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "common.h"
#include "intf_msg.h"
#include "threads.h"
#include "mtime.h"
#include "tests.h"
#include "modules.h"
#include "modules_export.h"
/*****************************************************************************
* Local and extern prototypes.
*****************************************************************************/
static void memcpy_getfunctions( function_list_t * p_function_list );
static int memcpy_Probe ( probedata_t *p_data );
void * _M( fast_memcpy ) ( void * to, const void * from, size_t len );
#define HAVE_MMX
#undef HAVE_MMX2
#undef HAVE_SSE
#undef HAVE_SSE2
#undef HAVE_3DNOW
#include "fastmemcpy.h"
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
MODULE_CONFIG_START
ADD_WINDOW( "Configuration for MMX memcpy module" )
ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
MODULE_CONFIG_STOP
MODULE_INIT_START
p_module->i_capabilities = MODULE_CAPABILITY_NULL
| MODULE_CAPABILITY_MEMCPY;
p_module->psz_longname = "MMX memcpy module";
MODULE_INIT_STOP
MODULE_ACTIVATE_START
memcpy_getfunctions( &p_module->p_functions->memcpy );
MODULE_ACTIVATE_STOP
MODULE_DEACTIVATE_START
MODULE_DEACTIVATE_STOP
/* Following functions are local */
/*****************************************************************************
* Functions exported as capabilities. They are declared as static so that
* we don't pollute the namespace too much.
*****************************************************************************/
static void memcpy_getfunctions( function_list_t * p_function_list )
{
p_function_list->pf_probe = memcpy_Probe;
#define F p_function_list->functions.memcpy
F.pf_fast_memcpy = _M( fast_memcpy );
#undef F
}
/*****************************************************************************
* memcpy_Probe: returns a preference score
*****************************************************************************/
static int memcpy_Probe( probedata_t *p_data )
{
/* Test for MMX support in the CPU */
if( !TestCPU( CPU_CAPABILITY_MMX ) )
{
return( 0 );
}
if( TestMethod( MEMCPY_METHOD_VAR, "memcpymmx" )
|| TestMethod( MEMCPY_METHOD_VAR, "mmx" ) )
{
return( 999 );
}
/* This plugin always works */
return( 100 );
}
/*****************************************************************************
* memcpymmxext.c : MMX EXT memcpy module
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: memcpymmxext.c,v 1.1 2001/12/03 16:18:37 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define MODULE_NAME memcpymmxext
#include "modules_inner.h"
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "common.h"
#include "intf_msg.h"
#include "threads.h"
#include "mtime.h"
#include "tests.h"
#include "modules.h"
#include "modules_export.h"
/*****************************************************************************
* Local and extern prototypes.
*****************************************************************************/
static void memcpy_getfunctions( function_list_t * p_function_list );
static int memcpy_Probe ( probedata_t *p_data );
void * _M( fast_memcpy ) ( void * to, const void * from, size_t len );
#undef HAVE_MMX
#define HAVE_MMX2
#undef HAVE_SSE
#undef HAVE_SSE2
#undef HAVE_3DNOW
#include "fastmemcpy.h"
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
MODULE_CONFIG_START
ADD_WINDOW( "Configuration for MMX EXT memcpy module" )
ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
MODULE_CONFIG_STOP
MODULE_INIT_START
p_module->i_capabilities = MODULE_CAPABILITY_NULL
| MODULE_CAPABILITY_MEMCPY;
p_module->psz_longname = "MMX EXT memcpy module";
MODULE_INIT_STOP
MODULE_ACTIVATE_START
memcpy_getfunctions( &p_module->p_functions->memcpy );
MODULE_ACTIVATE_STOP
MODULE_DEACTIVATE_START
MODULE_DEACTIVATE_STOP
/* Following functions are local */
/*****************************************************************************
* Functions exported as capabilities. They are declared as static so that
* we don't pollute the namespace too much.
*****************************************************************************/
static void memcpy_getfunctions( function_list_t * p_function_list )
{
p_function_list->pf_probe = memcpy_Probe;
#define F p_function_list->functions.memcpy
F.pf_fast_memcpy = _M( fast_memcpy );
#undef F
}
/*****************************************************************************
* memcpy_Probe: returns a preference score
*****************************************************************************/
static int memcpy_Probe( probedata_t *p_data )
{
/* Test for MMX EXT support in the CPU */
if( !TestCPU( CPU_CAPABILITY_MMXEXT ) )
{
return( 0 );
}
if( TestMethod( MEMCPY_METHOD_VAR, "memcpymmxext" )
|| TestMethod( MEMCPY_METHOD_VAR, "mmxext" ) )
{
return( 999 );
}
/* This plugin always works */
return( 200 );
}
......@@ -2,7 +2,7 @@
* input_ts.h: structures of the input not exported to other modules
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ts.h,v 1.10 2001/07/12 23:06:54 gbazin Exp $
* $Id: input_ts.h,v 1.11 2001/12/03 16:18:37 sam Exp $
*
* Authors: Henri Fallon <henri@via.ecp.fr>
* Boris Dors <babal@via.ecp.fr>
......@@ -71,7 +71,7 @@ static __inline__ int read_network( int i_fd, char * p_base,
i_bytes = p_sys->i_length - p_sys->i_offset;
}
memcpy( p_base, p_sys->p_buffer + p_sys->i_offset, i_bytes );
pf_fast_memcpy( p_base, p_sys->p_buffer + p_sys->i_offset, i_bytes );
p_sys->i_offset += i_bytes;
return i_bytes;
......
......@@ -2,7 +2,7 @@
* mpeg_adec.c: MPEG audio decoder thread
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: mpeg_adec.c,v 1.3 2001/11/28 15:08:05 massiot Exp $
* $Id: mpeg_adec.c,v 1.4 2001/12/03 16:18:37 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
......@@ -69,7 +69,7 @@ static void adec_Decode( adec_thread_t * );
void _M( adec_getfunctions )( function_list_t * p_function_list )
{
p_function_list->pf_probe = adec_Probe;
p_function_list->functions.dec.pf_RunThread = adec_RunThread;
p_function_list->functions.dec.pf_run = adec_RunThread;
}
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* video_parser.c : video parser thread
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: video_parser.c,v 1.4 2001/11/28 15:08:05 massiot Exp $
* $Id: video_parser.c,v 1.5 2001/12/03 16:18:37 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
......@@ -80,7 +80,7 @@ static void BitstreamCallback ( bit_stream_t *, boolean_t );
void _M( vdec_getfunctions )( function_list_t * p_function_list )
{
p_function_list->pf_probe = mpeg_vdec_Probe;
p_function_list->functions.dec.pf_RunThread = mpeg_vdec_Run;
p_function_list->functions.dec.pf_run = mpeg_vdec_Run;
}
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* vout_sdl.c: SDL video output display method
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: vout_sdl.c,v 1.65 2001/11/28 15:08:05 massiot Exp $
* $Id: vout_sdl.c,v 1.66 2001/12/03 16:18:37 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
......@@ -594,20 +594,20 @@ static void vout_Display( vout_thread_t *p_vout )
SDL_LockYUVOverlay( p_vout->p_sys->p_overlay );
/* copy the data into video buffers */
/* Y first */
memcpy( p_vout->p_sys->p_overlay->pixels[0],
p_vout->p_rendered_pic->p_y,
p_vout->p_sys->p_overlay->h *
p_vout->p_sys->p_overlay->pitches[0] );
pf_fast_memcpy( p_vout->p_sys->p_overlay->pixels[0],
p_vout->p_rendered_pic->p_y,
p_vout->p_sys->p_overlay->h *
p_vout->p_sys->p_overlay->pitches[0] );
/* then V */
memcpy( p_vout->p_sys->p_overlay->pixels[1],
p_vout->p_rendered_pic->p_v,
p_vout->p_sys->p_overlay->h *
p_vout->p_sys->p_overlay->pitches[1] / 2 );
pf_fast_memcpy( p_vout->p_sys->p_overlay->pixels[1],
p_vout->p_rendered_pic->p_v,
p_vout->p_sys->p_overlay->h *
p_vout->p_sys->p_overlay->pitches[1] / 2 );
/* and U */
memcpy( p_vout->p_sys->p_overlay->pixels[2],
p_vout->p_rendered_pic->p_u,
p_vout->p_sys->p_overlay->h *
p_vout->p_sys->p_overlay->pitches[2] / 2 );
pf_fast_memcpy( p_vout->p_sys->p_overlay->pixels[2],
p_vout->p_rendered_pic->p_u,
p_vout->p_sys->p_overlay->h *
p_vout->p_sys->p_overlay->pitches[2] / 2 );
OutputCoords( p_vout->p_rendered_pic, 1,
p_vout->p_sys->i_width,
......
......@@ -2,7 +2,7 @@
* spu_decoder.c : spu decoder thread
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: spu_decoder.c,v 1.4 2001/11/28 15:08:06 massiot Exp $
* $Id: spu_decoder.c,v 1.5 2001/12/03 16:18:37 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -76,7 +76,7 @@ static int ParseRLE ( spudec_thread_t *, subpicture_t *, u8 * );
void _M( spu_dec_getfunctions )( function_list_t * p_function_list )
{
p_function_list->pf_probe = spu_dec_Probe;
p_function_list->functions.dec.pf_RunThread = spu_dec_Run;
p_function_list->functions.dec.pf_run = spu_dec_Run;
}
/*****************************************************************************
......
......@@ -585,8 +585,8 @@ static int VCDRead( input_thread_t * p_input,
if( U32_AT(p_buffer) != 0x1B9 )
{
memcpy( p_data->p_buffer, p_buffer + i_index,
6 + i_packet_size );
pf_fast_memcpy( p_data->p_buffer, p_buffer + i_index,
6 + i_packet_size );
i_index += ( 6 + i_packet_size );
}
......
......@@ -2,7 +2,7 @@
* vout_xvideo.c: Xvideo video output display method
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: vout_xvideo.c,v 1.33 2001/12/03 13:58:59 massiot Exp $
* $Id: vout_xvideo.c,v 1.34 2001/12/03 16:18:37 sam Exp $
*
* Authors: Shane Harper <shanegh@optusnet.com.au>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -677,12 +677,12 @@ static void vout_Display( vout_thread_t *p_vout )
break;
case YUV_420_PICTURE:
memcpy( p_vout->p_sys->p_xvimage->data,
p_vout->p_rendered_pic->p_y, i_size );
memcpy( p_vout->p_sys->p_xvimage->data + ( i_size ),
p_vout->p_rendered_pic->p_v, i_size / 4 );
memcpy( p_vout->p_sys->p_xvimage->data + ( i_size ) + ( i_size / 4 ),
p_vout->p_rendered_pic->p_u, i_size / 4 );
pf_fast_memcpy( p_vout->p_sys->p_xvimage->data,
p_vout->p_rendered_pic->p_y, i_size );
pf_fast_memcpy( p_vout->p_sys->p_xvimage->data + ( i_size ),
p_vout->p_rendered_pic->p_v, i_size / 4 );
pf_fast_memcpy( p_vout->p_sys->p_xvimage->data + ( i_size ) + ( i_size / 4 ),
p_vout->p_rendered_pic->p_u, i_size / 4 );
break;
}
......
......@@ -2,7 +2,7 @@
* input_dec.c: Functions for the management of decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: input_dec.c,v 1.18 2001/11/30 22:52:40 gbazin Exp $
* $Id: input_dec.c,v 1.19 2001/12/03 16:18:37 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -80,7 +80,7 @@ vlc_thread_t input_RunDecoder( input_thread_t * p_input,
/* Spawn the decoder thread */
if ( vlc_thread_create( &thread_id, "decoder",
(vlc_thread_func_t)p_es->p_module->
p_functions->dec.functions.dec.pf_RunThread,
p_functions->dec.functions.dec.pf_run,
(void *)p_es->p_config) )
{
intf_ErrMsg( "input error: can't spawn decoder thread \"%s\"",
......
......@@ -4,7 +4,7 @@
* and spawn threads.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: main.c,v 1.127 2001/11/28 15:08:06 massiot Exp $
* $Id: main.c,v 1.128 2001/12/03 16:18:37 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -135,8 +135,9 @@
#define OPT_YUV 183
#define OPT_DOWNMIX 184
#define OPT_IMDCT 185
#define OPT_DVDCSS_METHOD 186
#define OPT_DVDCSS_VERBOSE 187
#define OPT_MEMCPY 186
#define OPT_DVDCSS_METHOD 187
#define OPT_DVDCSS_VERBOSE 188
#define OPT_SYNCHRO 190
#define OPT_WARNING 191
......@@ -216,8 +217,9 @@ static const struct option longopts[] =
{ "channels", 0, 0, OPT_CHANNELS },
{ "channelserver", 1, 0, OPT_CHANNELSERVER },
/* Synchro options */
/* Misc options */
{ "synchro", 1, 0, OPT_SYNCHRO },
{ "memcpy", 1, 0, OPT_MEMCPY },
{ 0, 0, 0, 0 }
};
......@@ -225,13 +227,13 @@ static const struct option longopts[] =
static const char *psz_shortopts = "hHvgt:T:u:a:s:c:I:A:V:";
/*****************************************************************************
* Global variable program_data - these are the only ones, see main.h and
* modules.h
* Global variables - these are the only ones, see main.h and modules.h
*****************************************************************************/
main_t *p_main;
module_bank_t *p_module_bank;
aout_bank_t *p_aout_bank;
vout_bank_t *p_vout_bank;
void* ( *pf_fast_memcpy ) ( void *, const void *, size_t );
/*****************************************************************************
* Local prototypes
......@@ -375,6 +377,24 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
aout_InitBank();
vout_InitBank();
/*
* Choose the best memcpy module
*/
p_main->p_memcpy_module = module_Need( MODULE_CAPABILITY_MEMCPY, NULL );
if( p_main->p_memcpy_module == NULL )
{
intf_ErrMsg( "intf error: no suitable memcpy module, "
"using libc default" );
pf_fast_memcpy = memcpy;
}
else
{
#define f p_main->p_memcpy_module->p_functions->memcpy.functions.memcpy
pf_fast_memcpy = f.pf_fast_memcpy;
#undef f
}
/*
* Initialize shared resources and libraries
*/
......@@ -423,6 +443,11 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
}
}
/*
* Free memcpy module
*/
module_Unneed( p_main->p_memcpy_module );
/*
* Free module, aout and vout banks
*/
......@@ -790,10 +815,13 @@ static int GetConfiguration( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] )
main_PutPszVariable( INPUT_CHANNEL_SERVER_VAR, optarg );
break;
/* Synchro options */
/* Misc options */
case OPT_SYNCHRO:
main_PutPszVariable( VPAR_SYNCHRO_VAR, optarg );
break;
case OPT_MEMCPY:
main_PutPszVariable( MEMCPY_METHOD_VAR, optarg );
break;
/* Internal error: unknown option */
case '?':
......@@ -867,6 +895,7 @@ static void Usage( int i_fashion )
"\n -I, --intf <module> \tinterface method"
"\n -v, --verbose \tverbose mode (cumulative)"
"\n --stdout <filename> \tredirect console stdout"
"\n --memcpy <module> \tmemcpy method"
"\n"
"\n --noaudio \tdisable audio"
"\n -A, --aout <module> \taudio output method"
......@@ -916,7 +945,8 @@ static void Usage( int i_fashion )
"\n " INTF_METHOD_VAR "=<method name> \tinterface method"
"\n " INTF_INIT_SCRIPT_VAR "=<filename> \tinitialization script"
"\n " INTF_CHANNELS_VAR "=<filename> \tchannels list"
"\n " INTF_STDOUT_VAR "=<filename> \tredirect console stdout" );
"\n " INTF_STDOUT_VAR "=<filename> \tredirect console stdout"
"\n " MEMCPY_METHOD_VAR "=<method name> \tmemcpy method" );
/* Audio parameters */
intf_MsgImm( "\nAudio parameters:"
......@@ -1164,7 +1194,7 @@ static int CPUCapabilities( void )
{
i_capabilities |= CPU_CAPABILITY_MMXEXT;
#ifdef HAVE_SSE
#ifdef CAN_COMPILE_SSE
/* We test if OS support the SSE instructions */
i_illegal = 0;
if( setjmp( env ) == 0 )
......@@ -1201,7 +1231,7 @@ static int CPUCapabilities( void )
/* list these additional capabilities */
cpuid( 0x80000001 );
#ifdef HAVE_3DNOW
#ifdef CAN_COMPILE_3DNOW
if( i_edx & 0x80000000 )
{
i_illegal = 0;
......@@ -1231,7 +1261,7 @@ static int CPUCapabilities( void )
/* Test for Altivec */
signal( SIGILL, InstructionSignalHandler );
#ifdef HAVE_ALTIVEC
#ifdef CAN_COMPILE_ALTIVEC
i_illegal = 0;
if( setjmp( env ) == 0 )
{
......
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