Commit 0393b253 authored by Christophe Massiot's avatar Christophe Massiot

* Fixed Altivec-enabled version of fastmemcpy

* Fixed --memcpy switch
* Changed CFLAGS_VLC to vlc_CFLAGS (last-minute changes are great ideas :p)
* New README file for MacOS X.
parent a0249c48
...@@ -515,13 +515,13 @@ $(C_OBJ): %.o: Makefile.opts Makefile.dep Makefile ...@@ -515,13 +515,13 @@ $(C_OBJ): %.o: Makefile.opts Makefile.dep Makefile
$(C_OBJ): %.o: $(H_OBJ) $(C_OBJ): %.o: $(H_OBJ)
$(C_OBJ): %.o: .dep/%.d $(C_OBJ): %.o: .dep/%.d
$(C_OBJ): %.o: %.c $(C_OBJ): %.o: %.c
$(CC) $(CFLAGS) $(CFLAGS_VLC) -c -o $@ $< $(CC) $(CFLAGS) $(vlc_CFLAGS) -c -o $@ $<
$(CPP_OBJ): %.o: Makefile.opts Makefile.dep Makefile $(CPP_OBJ): %.o: Makefile.opts Makefile.dep Makefile
$(CPP_OBJ): %.o: $(H_OBJ) $(CPP_OBJ): %.o: $(H_OBJ)
$(CPP_OBJ): %.o: .dep/%.dpp $(CPP_OBJ): %.o: .dep/%.dpp
$(CPP_OBJ): %.o: %.cpp $(CPP_OBJ): %.o: %.cpp
$(CC) $(CFLAGS) $(CFLAGS_VLC) -c -o $@ $< $(CC) $(CFLAGS) $(vlc_CFLAGS) -c -o $@ $<
$(RESOURCE_OBJ): %.o: Makefile.dep Makefile $(RESOURCE_OBJ): %.o: Makefile.dep Makefile
ifneq (,(findstring mingw32,$(SYS))) ifneq (,(findstring mingw32,$(SYS)))
......
{\rtf1\mac\ansicpg10000\cocoartf100
{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fmodern\fcharset77 Courier;
}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww11240\viewh10380\viewkind0
\hyphauto1\hyphfactor90
\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
\f0\fs48 \cf0 VideoLAN Client (VLC) version 0.3\
Mac OS X-specific information
\fs24 \
\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
\cf0 \
\
\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qj
\cf0 Welcome to the VideoLAN Client ! VLC is a multi-purpose mutimedia tool : it can play DVDs and VCDs, or read a stream from the network. VLC has originally been developed for GNU/Linux systems, but has been ported to numerous operating systems, including Mac OS X and Win32. The Mac OS X port is a bit young and immature, as you will notice, and there are many caveats. We are working hard to improve it, and if you think you can help us in any way, please drop us a line.\
\
You may find the following frequentely asked questions useful :\
\
\f1\b \ul 1. How do I read a DVD ? The menu item is disabled !\
\f0\b0 \ulnone The menu item hasn't been implemented yet, but you can access all features of VLC using the command line. First open a terminal window (Terminal.app in your Applications folder) and change to the directory where you copied VLC - for instance if you copied it to your Applications folder, type :\
\f2 cd /Applications\
\f0 \
Then type :\
\f2 ./vlc.app/Contents/MacOS/vlc dvd:/dev/rdisk1\
\f0 \
VLC should play your DVD. On some configurations, /dev/rdisk1 isn't the DVD drive, and you will find it as /dev/rdisk2, /dev/rdisk3, etc. YMMV\
\
You can access all the capabilities of VLC through the command line (since the native interface support is still very poor), such as choosing audio channel, subtitles, and titles/chapters. To view all the options available, please type :\
\f2 ./vlc.app/Contents/MacOS/vlc --help\
\f0 \
For instance, if you want the audio channel #2 :\
\f2 ./vlc.app/Contents/MacOS/vlc --input_audio 2 dvd:/dev/rdisk1\
\f0 \
You can view all available channels and subtitles with :\
\f2 ./vlc.app/Contents/MacOS/vlc --stats dvd:/dev/rdisk1\
\f0 \
\
\f1\b \ul 2. How do I read a VCD ?\
\f0\b0 \ulnone The same way you read a DVD, except you replace
\f2 dvd
\f0 by
\f2 vcd
\f0 . Eg. :\
\f2 ./vlc.app/Contents/MacOS/vlc vcd:/dev/rdisk1\
\f0 \
\
\f1\b \ul 3. How do I read an SVCD ?
\f0\b0 \ulnone \
SVCDs contain plain MPEG-2 files and do not require any specific plug-in. just copy the .vob files in the SVCD onto your hard drive, and use the "Open File" menu item in VLC (drag and drop doesn't work yet).\
\
\
\f1\b \ul 4. Audio and video are out of sync by 300 ms !\
\f0\b0 \ulnone This is a known issue, and we're working on it. In the meantime, launch the application with
\f2 --desync\'ca300
\f0 (the exact number depends on your machine), eg. :\
\f2 ./vlc.app/Contents/MacOS/vlc --desync 300 dvd:/dev/rdisk1\
\f0 \
\
\f1\b \ul 5. The video is choppy ! It's like we're dropping frames\
\f0\b0 \ulnone That's the normal behavior when the CPU isn't fast enough to decode all frames. Though there is some room for improvement, do never expect VLC to be able to decode MPEG-2 streams on a low-end G3 machine. Apple DVD player uses specific hardware accelerations from the video board of those systems, and we currently lack documentation to do the same. If you think you have information which might help us, please contact us, otherwise please don't complain about this.\
\
If VLC is slow on your G4 system, try and quit or hide all running applications. See with
\f2 top
\f0 in a terminal window which applications take the CPU. Minimizing the VLC controller window might help, too.\
\
\
\f1\b \ul 6. How do I play a DivX file ?\
\f0\b0 \ulnone VLC doesn't support DivX or OpenDivX or MPEG-4 files at present. We are working on it too, but this isn't expected to happen in the near future.\
\
\
Thanks for reading this file. For additional information, subscribe to the vlc mailing list on \ul http://www.videolan.org/.\ulnone \
-- \
Christophe Massiot <massiot@via.ecp.fr>, 6 Apr 2002, for the VideoLAN team.}
\ No newline at end of file
...@@ -3268,7 +3268,7 @@ else ...@@ -3268,7 +3268,7 @@ else
plugins_CFLAGS="${plugins_CFLAGS} -fPIC" plugins_CFLAGS="${plugins_CFLAGS} -fPIC"
fi fi
save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'a-z.' 'A-Z_'`" save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"
for ac_func in gettimeofday select strerror strtod strtol isatty usleep vasprintf swab sigrelse getpwuid memalign posix_memalign for ac_func in gettimeofday select strerror strtod strtol isatty usleep vasprintf swab sigrelse getpwuid memalign posix_memalign
do do
...@@ -5376,7 +5376,7 @@ MMX_MODULES="memcpymmx idctmmx motionmmx chroma_i420_rgb_mmx chroma_i420_yuy2_mm ...@@ -5376,7 +5376,7 @@ MMX_MODULES="memcpymmx idctmmx motionmmx chroma_i420_rgb_mmx chroma_i420_yuy2_mm
MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext" MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn" THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
SSE_MODULES="imdctsse downmixsse" SSE_MODULES="imdctsse downmixsse"
ALTIVEC_MODULES="idctaltivec motionaltivec" ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6 echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
echo "configure:5383: checking if \$CC groks MMX inline assembly" >&5 echo "configure:5383: checking if \$CC groks MMX inline assembly" >&5
......
...@@ -401,7 +401,7 @@ MMX_MODULES="memcpymmx idctmmx motionmmx chroma_i420_rgb_mmx chroma_i420_yuy2_mm ...@@ -401,7 +401,7 @@ MMX_MODULES="memcpymmx idctmmx motionmmx chroma_i420_rgb_mmx chroma_i420_yuy2_mm
MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext" MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn" THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
SSE_MODULES="imdctsse downmixsse" SSE_MODULES="imdctsse downmixsse"
ALTIVEC_MODULES="idctaltivec motionaltivec" ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
AC_CACHE_CHECK([if \$CC groks MMX inline assembly], AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
[ac_cv_mmx_inline], [ac_cv_mmx_inline],
......
/***************************************************************************** /*****************************************************************************
* memcpy.c : classic memcpy module * memcpyaltivec.c : Altivec memcpy module
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: memcpyaltivec.c,v 1.2 2002/04/04 22:08:05 massiot Exp $ * $Id: memcpyaltivec.c,v 1.3 2002/04/07 23:08:44 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -84,6 +84,15 @@ typedef unsigned long size_t; ...@@ -84,6 +84,15 @@ typedef unsigned long size_t;
#define vector_u32_t vector unsigned int #define vector_u32_t vector unsigned int
#define MMREG_SIZE 16 #define MMREG_SIZE 16
#define SMALL_MEMCPY(to, from, len) \
{ \
unsigned char * end = to + len; \
while( to < end ) \
{ \
*to++ = *from++; \
} \
}
void * _M( fast_memcpy )(void * _to, const void * _from, size_t len) void * _M( fast_memcpy )(void * _to, const void * _from, size_t len)
{ {
void * retval = _to; void * retval = _to;
...@@ -100,9 +109,7 @@ void * _M( fast_memcpy )(void * _to, const void * _from, size_t len) ...@@ -100,9 +109,7 @@ void * _M( fast_memcpy )(void * _to, const void * _from, size_t len)
{ {
delta = MMREG_SIZE - delta; delta = MMREG_SIZE - delta;
len -= delta; len -= delta;
memcpy(to, from, delta); SMALL_MEMCPY(to, from, delta);
to += delta;
from += delta;
} }
if( len & ~(MMREG_SIZE-1) ) if( len & ~(MMREG_SIZE-1) )
...@@ -126,12 +133,13 @@ void * _M( fast_memcpy )(void * _to, const void * _from, size_t len) ...@@ -126,12 +133,13 @@ void * _M( fast_memcpy )(void * _to, const void * _from, size_t len)
to += 16; to += 16;
} while( len & ~(MMREG_SIZE-1) ); } while( len & ~(MMREG_SIZE-1) );
vec_st( tmp, 0, to ); vec_st( tmp, 0, to );
to += 16;
} }
} }
if( len ) if( len )
{ {
memcpy( to, from, len ); SMALL_MEMCPY( to, from, len );
} }
return retval; return retval;
...@@ -157,65 +165,59 @@ void * _M( fast_memcpy )(void * _to, const void * _from, size_t len) ...@@ -157,65 +165,59 @@ void * _M( fast_memcpy )(void * _to, const void * _from, size_t len)
void * _M( fast_memcpy )(void * _to, const void * _from, size_t len) void * _M( fast_memcpy )(void * _to, const void * _from, size_t len)
{ {
asm (" \n" asm (" \n"
" stwu %r1, -32(%r1) \n" " cmplwi %cr0, %r5, 16 \n"
" mflr %r0 \n" " mr %r9, %r3 \n"
" stw %r28, 16(%r1) \n"
" stw %r29, 20(%r1) \n"
" stw %r30, 24(%r1) \n"
" stw %r31, 28(%r1) \n"
" stw %r0, 36(%r1) \n"
" mr %r29, %r5 \n"
" cmplwi %cr0, %r29, 16 \n"
" mr %r28, %r3 \n"
" mr %r31, %r4 \n"
" bc 4, 1, ._L3 \n" " bc 4, 1, ._L3 \n"
" andi. %r30, %r28, 15 \n" " andi. %r0, %r3, 15 \n"
" bc 12, 2, ._L4 \n" " bc 12, 2, ._L4 \n"
" subfic %r30, %r30, 16 \n" " subfic %r0, %r0, 16 \n"
" mr %r5, %r30 \n" " add %r11, %r3, %r0 \n"
" crxor 6, 6, 6 \n" " cmplw %cr0, %r3, %r11 \n"
" bl memcpy \n" " subf %r5, %r0, %r5 \n"
" add %r31, %r31, %r30 \n" " bc 4, 0, ._L4 \n"
" subf %r29, %r30, %r29 \n" " ._L7: \n"
" add %r3, %r28, %r30 \n" " lbz %r0, 0(%r4) \n"
" stb %r0, 0(%r9) \n"
" addi %r9, %r9, 1 \n"
" cmplw %cr0, %r9, %r11 \n"
" addi %r4, %r4, 1 \n"
" bc 12, 0, ._L7 \n"
" ._L4: \n" " ._L4: \n"
" rlwinm. %r0, %r29, 0, 0, 27 \n" " rlwinm. %r0, %r5, 0, 0, 27 \n"
" bc 12, 2, ._L3 \n" " bc 12, 2, ._L3 \n"
" li %r9, 15 \n" " li %r11, 15 \n"
" lvsl %v12, 0, %r31 \n" " lvsl %v12, 0, %r4 \n"
" lvx %v1, 0, %r31 \n" " lvx %v1, 0, %r4 \n"
" lvx %v0, %r9, %r31 \n" " lvx %v0, %r11, %r4 \n"
" addi %r31, %r31, 16 \n" " addi %r4, %r4, 16 \n"
" vperm %v13, %v1, %v0, %v12 \n" " vperm %v13, %v1, %v0, %v12 \n"
" addi %r29, %r29, -16 \n" " addi %r5, %r5, -16 \n"
" ._L9: \n" " ._L13: \n"
" addi %r29, %r29, -16 \n" " addi %r5, %r5, -16 \n"
" li %r9, 15 \n" " li %r11, 15 \n"
" lvx %v1, 0, %r31 \n" " lvx %v1, 0, %r4 \n"
" lvx %v0, %r9, %r31 \n" " lvx %v0, %r11, %r4 \n"
" rlwinm. %r0, %r29, 0, 0, 27 \n" " rlwinm. %r0, %r5, 0, 0, 27 \n"
" stvx %v13, 0, %r3 \n" " stvx %v13, 0, %r9 \n"
" vperm %v13, %v1, %v0, %v12 \n" " vperm %v13, %v1, %v0, %v12 \n"
" addi %r31, %r31, 16 \n" " addi %r4, %r4, 16 \n"
" addi %r3, %r3, 16 \n" " addi %r9, %r9, 16 \n"
" bc 4, 2, ._L9 \n" " bc 4, 2, ._L13 \n"
" stvx %v13, 0, %r3 \n" " stvx %v13, 0, %r9 \n"
" addi %r9, %r9, 16 \n"
" ._L3: \n" " ._L3: \n"
" cmpwi %cr0, %r29, 0 \n" " cmpwi %cr0, %r5, 0 \n"
" bc 12, 2, ._L10 \n" " bclr 12, 2 \n"
" mr %r4, %r31 \n" " add %r5, %r9, %r5 \n"
" mr %r5, %r29 \n" " cmplw %cr0, %r9, %r5 \n"
" crxor 6, 6, 6 \n" " bclr 4, 0 \n"
" bl memcpy \n" " ._L17: \n"
" ._L10: \n" " lbz %r0, 0(%r4) \n"
" mr %r3, %r28 \n" " stb %r0, 0(%r9) \n"
" lwz %r0, 36(%r1) \n" " addi %r9, %r9, 1 \n"
" mtlr %r0 \n" " cmplw %cr0, %r9, %r5 \n"
" lwz %r28, 16(%r1) \n" " addi %r4, %r4, 1 \n"
" lwz %r29, 20(%r1) \n" " bc 12, 0, ._L17 \n"
" lwz %r30, 24(%r1) \n"
" lwz %r31, 28(%r1) \n"
" la %r1, 32(%r1) \n"
" blr \n" " blr \n"
); );
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* and spawn threads. * and spawn threads.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: main.c,v 1.175 2002/04/02 23:43:57 gbazin Exp $ * $Id: main.c,v 1.176 2002/04/07 23:08:44 massiot 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>
...@@ -195,9 +195,6 @@ ...@@ -195,9 +195,6 @@
#define FILTER_TEXT "video filter module" #define FILTER_TEXT "video filter module"
#define FILTER_LONGTEXT NULL #define FILTER_LONGTEXT NULL
#define INPUT_TEXT "input method"
#define INPUT_LONGTEXT NULL
#define SERVER_PORT_TEXT "server port" #define SERVER_PORT_TEXT "server port"
#define SERVER_PORT_LONGTEXT NULL #define SERVER_PORT_LONGTEXT NULL
...@@ -334,7 +331,6 @@ ADD_PLUGIN ( "filter", MODULE_CAPABILITY_VOUT, NULL, NULL, FILTER_TEXT, FILTER_ ...@@ -334,7 +331,6 @@ ADD_PLUGIN ( "filter", MODULE_CAPABILITY_VOUT, NULL, NULL, FILTER_TEXT, FILTER_
/* Input options */ /* Input options */
ADD_CATEGORY_HINT( "Input", NULL ) ADD_CATEGORY_HINT( "Input", NULL )
ADD_STRING ( "input", NULL, NULL, INPUT_TEXT, INPUT_LONGTEXT )
ADD_INTEGER ( "server_port", 1234, NULL, SERVER_PORT_TEXT, SERVER_PORT_LONGTEXT ) ADD_INTEGER ( "server_port", 1234, NULL, SERVER_PORT_TEXT, SERVER_PORT_LONGTEXT )
ADD_BOOL ( "network_channel", NULL, NETCHANNEL_TEXT, NETCHANNEL_LONGTEXT ) ADD_BOOL ( "network_channel", NULL, NETCHANNEL_TEXT, NETCHANNEL_LONGTEXT )
ADD_STRING ( "channel_server", "localhost", NULL, CHAN_SERV_TEXT, CHAN_SERV_LONGTEXT ) ADD_STRING ( "channel_server", "localhost", NULL, CHAN_SERV_TEXT, CHAN_SERV_LONGTEXT )
...@@ -732,8 +728,8 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] ) ...@@ -732,8 +728,8 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
* Choose the best memcpy module * Choose the best memcpy module
*/ */
psz_plugin = config_GetPszVariable( "memcpy" ); psz_plugin = config_GetPszVariable( "memcpy" );
p_main->p_memcpy_module = module_Need( MODULE_CAPABILITY_MEMCPY, NULL, p_main->p_memcpy_module = module_Need( MODULE_CAPABILITY_MEMCPY,
psz_plugin ); psz_plugin, NULL );
if( psz_plugin ) free( psz_plugin ); if( psz_plugin ) free( psz_plugin );
if( p_main->p_memcpy_module == NULL ) if( p_main->p_memcpy_module == NULL )
{ {
......
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