]> git.sesse.net Git - vlc/commitdiff
* ./modules/audio_output/oss.c: compilation fixes.
authorSam Hocevar <sam@videolan.org>
Thu, 8 Aug 2002 00:35:11 +0000 (00:35 +0000)
committerSam Hocevar <sam@videolan.org>
Thu, 8 Aug 2002 00:35:11 +0000 (00:35 +0000)
  * ALL: lots of -ansi -pedantic fixes.

71 files changed:
Makefile
Makefile.modules
Makefile.opts.in
configure
configure.in
debian/control
debian/rules
include/aout_internal.h
include/audio_output.h
include/defs.h.in
include/input_ext-dec.h
include/input_ext-plugins.h
include/modules_inner.h
include/video_output.h
include/vlc/vlc.h
include/vlc_common.h
include/vlc_symbols.h
include/vlc_threads.h
modules/access/dvd/ifo.c
modules/access/dvd/ifo.h
modules/access/dvd/seek.c
modules/access/dvd/summary.c
modules/access/dvd/udf.c
modules/access/http.c
modules/access/v4l/.cvsignore [new file with mode: 0644]
modules/access/v4l/Makefile [new file with mode: 0644]
modules/access/v4l/v4l.c [new file with mode: 0644]
modules/access/vcd/vcd.c
modules/audio_mixer/trivial.c
modules/audio_output/oss.c
modules/codec/a52old/adec.h
modules/codec/a52old/downmix.h
modules/codec/a52old/exponent.h
modules/codec/a52old/imdct.c
modules/codec/a52old/imdct.h
modules/codec/a52old/parse.c
modules/codec/mpeg_audio/layer1.c
modules/codec/mpeg_audio/layer2.c
modules/codec/mpeg_audio/math.c
modules/codec/mpeg_video/blocks.c
modules/codec/mpeg_video/decoder.c
modules/codec/mpeg_video/decoder.h
modules/codec/mpeg_video/idct/idctmmx.c
modules/codec/mpeg_video/idct/idctmmxext.c
modules/codec/mpeg_video/motion/motion.c
modules/codec/mpeg_video/motion/motionmmx.c
modules/codec/mpeg_video/motion/motionmmxext.c
modules/codec/spdif/spdif.c
modules/demux/mpeg/audio.c
modules/gui/win32/win32_common.h
modules/misc/memcpy/fastmemcpy.h
modules/misc/network/ipv4.c
modules/misc/network/ipv6.c
modules/video_chroma/i420_rgb_mmx.h
modules/video_output/x11/xcommon.h
src/audio_output/aout_ext-dec.c [new file with mode: 0644]
src/input/input_dec.c
src/libvlc.c
src/libvlc.h
src/misc/configuration.c
src/misc/messages.c
src/misc/modules.c
src/misc/modules_plugin.h
src/misc/modules_plugin.h.in
src/misc/mtime.c
src/misc/objects.c
src/misc/threads.c
src/video_output/video_output.c
src/video_output/video_text.c
src/vlc.c
vlc.spec

index 373fc1dad0d814fa369ebf4e752e54b2e829b988..072a60bdaadf0c402feaf4ebf02a098b5ff197e9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -148,7 +148,7 @@ mozilla-clean:
 distclean: clean
        -cd po && $(MAKE) maintainer-clean
        rm -f **/*.o **/*~ *.log
-       rm -f Makefile.opts Makefile.config
+       rm -f Makefile.opts Makefile.config vlc-config
        rm -f include/defs.h include/modules_builtin.h
        rm -f src/misc/modules_builtin.h
        rm -f config*status config*cache config*log conftest*
index 3d9f603ec7b7465ddb48c2df777e9a7e83bd4fc2..2dbdb788cf411b5f44366061abdc816c967eff3c 100644 (file)
@@ -55,7 +55,7 @@ all:
 
 clean:
 #      rm -f $(PLUGIN_ALL) $(BUILTIN_ALL)
-       rm -f *.o *.o.* *.lo *.lo.* *.obj *.moc *.moc.* *.bak
+       rm -f *.a *.so *.o *.o.* *.lo.* *.obj *.moc *.moc.* *.bak
        rm -Rf .dep
 
 FORCE:
index 520186cbc58cb0abd98e88eb3f2fa65c09db4f56..bb1337136127bf61d19c1b96d3e3a24e1b1882af 100644 (file)
@@ -97,7 +97,6 @@ arts_LDFLAGS = @arts_LDFLAGS@
 beos_LDFLAGS = @beos_LDFLAGS@
 i420_rgb_LDFLAGS = @i420_rgb_LDFLAGS@
 directx_LDFLAGS = @directx_LDFLAGS@
-dsp_LDFLAGS = @dsp_LDFLAGS@
 dv_LDFLAGS = @dv_LDFLAGS@
 dvd_LDFLAGS = @dvd_LDFLAGS@
 dvdread_LDFLAGS = @dvdread_LDFLAGS@
@@ -124,12 +123,13 @@ macosx_LDFLAGS = @macosx_LDFLAGS@
 mad_LDFLAGS = @mad_LDFLAGS@
 memcpyaltivec_LDFLAGS = @memcpyaltivec_LDFLAGS@
 motionaltivec_LDFLAGS = @motionaltivec_LDFLAGS@
-ts_dvbpsi_LDFLAGS = @ts_dvbpsi_LDFLAGS@
 ncurses_LDFLAGS = @ncurses_LDFLAGS@
+oss_LDFLAGS = @oss_LDFLAGS@
 qnx_LDFLAGS = @qnx_LDFLAGS@
 qt_LDFLAGS = @qt_LDFLAGS@
 rc_LDFLAGS = @rc_LDFLAGS@
 sdl_LDFLAGS = @sdl_LDFLAGS@
+ts_dvbpsi_LDFLAGS = @ts_dvbpsi_LDFLAGS@
 vcd_LDFLAGS = @vcd_LDFLAGS@
 vorbis_LDFLAGS = @vorbis_LDFLAGS@
 waveout_LDFLAGS = @waveout_LDFLAGS@
index 863ed05b25bc1cdd4e208c91c599ef1eeb93979f..93b952fd107591d0845ed85ed9dc1ccc39de1592 100755 (executable)
--- a/configure
+++ b/configure
@@ -8040,7 +8040,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-    #PLUGINS="${PLUGINS} audio_output/oss"
+    PLUGINS="${PLUGINS} audio_output/oss"
     echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
 echo "configure:8046: checking for main in -lossaudio" >&5
 ac_lib_var=`echo ossaudio'_'main | sed 'y%./+-%__p_%'`
@@ -8072,7 +8072,7 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  dsp_LDFLAGS="${dsp_LDFLAGS} -lossaudio"
+  oss_LDFLAGS="${oss_LDFLAGS} -lossaudio"
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -9421,7 +9421,7 @@ CFLAGS="${save_CFLAGS}"
 LDFLAGS="${save_LDFLAGS}"
 
 libvlc_LDFLAGS="${vlc_LDFLAGS} ${builtins_LDFLAGS}"
-for i in ${BUILTINS} ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} ${libdir}/vlc/${i}.a `eval echo '$'{${i}_LDFLAGS}`" ; done
+for i in `echo ${BUILTINS} | sed -e 's#[^ ]*/##g'` ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} ${libdir}/vlc/${i}.a `eval echo '$'{${i}_LDFLAGS}`" ; done
 
 
 
@@ -9781,7 +9781,6 @@ s%@arts_LDFLAGS@%$arts_LDFLAGS%g
 s%@beos_LDFLAGS@%$beos_LDFLAGS%g
 s%@i420_rgb_LDFLAGS@%$i420_rgb_LDFLAGS%g
 s%@directx_LDFLAGS@%$directx_LDFLAGS%g
-s%@dsp_LDFLAGS@%$dsp_LDFLAGS%g
 s%@dv_LDFLAGS@%$dv_LDFLAGS%g
 s%@dvd_LDFLAGS@%$dvd_LDFLAGS%g
 s%@dvdread_LDFLAGS@%$dvdread_LDFLAGS%g
@@ -9810,6 +9809,7 @@ s%@mad_LDFLAGS@%$mad_LDFLAGS%g
 s%@memcpyaltivec_LDFLAGS@%$memcpyaltivec_LDFLAGS%g
 s%@motionaltivec_LDFLAGS@%$motionaltivec_LDFLAGS%g
 s%@ncurses_LDFLAGS@%$ncurses_LDFLAGS%g
+s%@oss_LDFLAGS@%$oss_LDFLAGS%g
 s%@qnx_LDFLAGS@%$qnx_LDFLAGS%g
 s%@qt_LDFLAGS@%$qt_LDFLAGS%g
 s%@rc_LDFLAGS@%$rc_LDFLAGS%g
index e60ebcbeb35c52bbcdf87c3ad41d78b488d7cc9a..2283b2ee54f177317d5697bedb21fce3e506905b 100644 (file)
@@ -1408,8 +1408,8 @@ if test "x${enable_oss}" != "xno" &&
   (test "x${SYS}" != "xmingw32" || test "x${enable_oss}" = "xyes")
 then
   AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
-    #PLUGINS="${PLUGINS} audio_output/oss"
-    AC_CHECK_LIB(ossaudio,main,dsp_LDFLAGS="${dsp_LDFLAGS} -lossaudio")
+    PLUGINS="${PLUGINS} audio_output/oss"
+    AC_CHECK_LIB(ossaudio,main,oss_LDFLAGS="${oss_LDFLAGS} -lossaudio")
   ])
 fi
 
@@ -1909,7 +1909,7 @@ dnl
 dnl  Create the vlc-config script
 dnl
 libvlc_LDFLAGS="${vlc_LDFLAGS} ${builtins_LDFLAGS}"
-for i in ${BUILTINS} ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} ${libdir}/vlc/${i}.a `eval echo '$'{${i}_LDFLAGS}`" ; done
+for i in `echo ${BUILTINS} | sed -e 's#[^ ]*/##g'` ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} ${libdir}/vlc/${i}.a `eval echo '$'{${i}_LDFLAGS}`" ; done
 AC_SUBST(libvlc_LDFLAGS)
 
 dnl 
@@ -1981,7 +1981,6 @@ AC_SUBST(arts_LDFLAGS)
 AC_SUBST(beos_LDFLAGS)
 AC_SUBST(i420_rgb_LDFLAGS)
 AC_SUBST(directx_LDFLAGS)
-AC_SUBST(dsp_LDFLAGS)
 AC_SUBST(dv_LDFLAGS)
 AC_SUBST(dvd_LDFLAGS)
 AC_SUBST(dvdread_LDFLAGS)
@@ -2010,6 +2009,7 @@ AC_SUBST(mad_LDFLAGS)
 AC_SUBST(memcpyaltivec_LDFLAGS)
 AC_SUBST(motionaltivec_LDFLAGS)
 AC_SUBST(ncurses_LDFLAGS)
+AC_SUBST(oss_LDFLAGS)
 AC_SUBST(qnx_LDFLAGS)
 AC_SUBST(qt_LDFLAGS)
 AC_SUBST(rc_LDFLAGS)
index d863347840e4f6146c0d3bbad9c8ee24b04416d9..ff6b832a805d62ccff23f91bd43aac8c4cf3a242 100644 (file)
@@ -2,7 +2,7 @@ Source: vlc
 Section: graphics
 Priority: optional
 Maintainer: Samuel Hocevar <sam@zoy.org>
-Build-Depends: debhelper (>=2.2.0), xlibs-dev, xlibs-pic, libgnome-dev, libggi2-dev, libglide2-dev [i386], libesd0-dev, libsdl1.2-dev (>=1.2.2-3.1), libqt-dev, libasound2-dev (>=0.9.0beta10a), libarts-dev, libmad0-dev, liblircclient-dev, a52dec-dev, aalib1-dev, libdvbpsi1-dev, mozilla-dev, kdelibs-dev
+Build-Depends: debhelper (>=2.2.0), xlibs-dev, xlibs-pic, libgnome-dev, libggi2-dev, libglide2-dev [i386], libesd0-dev, libsdl1.2-dev (>=1.2.2-3.1), libqt-dev, libasound2-dev (>=0.9.0beta10a), libarts-dev, libmad0-dev, liblircclient-dev, a52dec-dev, aalib1-dev, libdvbpsi1-dev, mozilla-dev, kdelibs-dev, dvb-dev, libdv-dev
 Standards-Version: 3.5.6
 
 Package: vlc
@@ -23,7 +23,7 @@ Description: development files for the VideoLAN Client
  VideoLAN is a free MPEG, MPEG2, DVD and DivX software solution.
  .
  This package contains headers and a static library required to build plugins
- for the Videolan Client, or standalone applications using VideoLAN Client.
+ for the VideoLAN Client, or standalone applications using VideoLAN Client.
 
 Package: gnome-vlc
 Architecture: any
index 3313b95224a3c95f0cc3aa6cc518130dabd5df9d..fc4a87d3a444857df9f4fac6c7091eec5e18880b 100755 (executable)
@@ -10,7 +10,7 @@ export DH_COMPAT=3
 
 # Compilation options
 export FFMPEG_VERSION=cvs
-export CONFIG_FLAGS="--enable-release --prefix=/usr --enable-gnome --enable-gtk --enable-fb --enable-ggi --enable-sdl --enable-esd --enable-qt --enable-mad --enable-arts --enable-alsa --enable-lirc --enable-a52 --enable-aa --enable-dvbpsi --enable-xosd --enable-mozilla --enable-kde --enable-ffmpeg --with-ffmpeg-tree=ffmpeg-$(FFMPEG_VERSION) --enable-mp4"
+export CONFIG_FLAGS="--enable-release --prefix=/usr --enable-gnome --enable-gtk --enable-fb --enable-ggi --enable-sdl --enable-esd --enable-qt --enable-mad --enable-arts --enable-alsa --enable-lirc --enable-a52 --enable-aa --enable-dvbpsi --enable-xosd --enable-mozilla --enable-kde --enable-ffmpeg --with-ffmpeg-tree=ffmpeg-$(FFMPEG_VERSION) --enable-mp4 --enable-dvb --enable-dv"
 # Remove --without-dvdcss here in non-totalitarian countries
 export DVDCSS_FLAGS="--enable-dvd --without-dvdcss"
 
index 0f4e97417a3da4dd7dfc96d7403dbf044f5b7eee..bda41d08b24175e474de5775697c78abe7c75e8f 100644 (file)
@@ -2,7 +2,7 @@
  * aout_internal.h : internal defines for audio output
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: aout_internal.h,v 1.1 2002/08/07 21:36:55 massiot Exp $
+ * $Id: aout_internal.h,v 1.2 2002/08/08 00:35:10 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -57,7 +57,7 @@ typedef struct aout_alloc_t
         (p_new_buffer)->i_alloc_type = (p_alloc)->i_alloc_type;             \
         (p_new_buffer)->i_size = (u64)(p_alloc)->i_bytes_per_sec            \
                                         * i_nb_usec / 1000000 + 1;          \
-        (p_new_buffer)->p_buffer = (void *)(p_new_buffer)                   \
+        (p_new_buffer)->p_buffer = (byte_t *)(p_new_buffer)                 \
                                      + sizeof(aout_buffer_t);               \
         if ( (p_previous_buffer) != NULL )                                  \
         {                                                                   \
@@ -184,7 +184,7 @@ struct aout_input_t
 
     aout_fifo_t             fifo;
 
-    char *                  p_first_byte_to_mix;
+    byte_t *                p_first_byte_to_mix;
 };
 
 /*****************************************************************************
@@ -263,4 +263,3 @@ int aout_OutputNew( aout_instance_t * p_aout,
 void aout_OutputPlay( aout_instance_t * p_aout, aout_buffer_t * p_buffer );
 void aout_OutputDelete( aout_instance_t * p_aout );
 
-int aout_FormatToBytes( audio_sample_format_t * p_format );
index 27779a3079a93073724b8de2a1523c6ac8db391f..a6fc838a223eeda1defd89a08fa6aa08d3520d5f 100644 (file)
@@ -2,7 +2,7 @@
  * audio_output.h : audio output interface
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: audio_output.h,v 1.52 2002/08/07 21:36:55 massiot Exp $
+ * $Id: audio_output.h,v 1.53 2002/08/08 00:35:10 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -65,7 +65,7 @@ struct audio_sample_format_t
  *****************************************************************************/
 struct aout_buffer_t
 {
-    char *                  p_buffer;
+    byte_t *                p_buffer;
     int                     i_alloc_type;
     size_t                  i_size;
     int                     i_nb_samples;
@@ -84,6 +84,7 @@ VLC_EXPORT( void,              aout_DeleteInstance, ( aout_instance_t * ) );
 VLC_EXPORT( aout_buffer_t *, aout_BufferNew, ( aout_instance_t *, aout_input_t *, size_t ) );
 VLC_EXPORT( void, aout_BufferDelete, ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) );
 VLC_EXPORT( void, aout_BufferPlay, ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) );
+VLC_EXPORT( int, aout_FormatToBytes, ( audio_sample_format_t * p_format ) );
 
 /* From input.c : */
 #define aout_InputNew(a,b,c) __aout_InputNew(VLC_OBJECT(a),b,c)
index 7b55f68ef639da85e0dfa7b3a26670c233bf7474..17bf78f6fec94a94c86fdeccdd8df1077c85b59c 100644 (file)
-/* include/defs.h.in.  Generated from configure.in by autoheader.  */
+/* include/defs.h.in.  Generated automatically from configure.in by autoheader 2.13.  */
 
-/* Maximum supported data alignment */
-#undef ATTRIBUTE_ALIGNED_MAX
-
-/* Define if $CC groks 3D Now! inline assembly. */
-#undef CAN_COMPILE_3DNOW
-
-/* Define if $CC groks AltiVec inline assembly. */
-#undef CAN_COMPILE_ALTIVEC
-
-/* Define if your compiler groks C AltiVec extensions. */
-#undef CAN_COMPILE_C_ALTIVEC
-
-/* Define if $CC groks SSE inline assembly. */
-#undef CAN_COMPILE_SSE
-
-/* The ./configure command line */
-#undef CONFIGURE_LINE
-
-/* Copyright string */
-#undef COPYRIGHT_MESSAGE
-
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
-   systems. This function is required for `alloca.c' support on those systems.
-   */
-#undef CRAY_STACKSEG_END
-
-/* Define to 1 if using `alloca.c'. */
+/* Define if using alloca.c.  */
 #undef C_ALLOCA
 
-/* Define if <X11/extensions/dpms.h> defines DPMSInfo. */
-#undef DPMSINFO_IN_DPMS_H
-
-/* Define to 1 if translation of program messages to the user's native
-   language is requested. */
-#undef ENABLE_NLS
+/* Define to empty if the keyword does not work.  */
+#undef const
 
-/* Define to 1 if you have the <a52dec/a52.h> header file. */
-#undef HAVE_A52DEC_A52_H
+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+   This function is required for alloca.c support on those systems.  */
+#undef CRAY_STACKSEG_END
 
-/* Define to 1 if you have `alloca', as a function or macro. */
+/* Define if you have alloca, as a function or macro.  */
 #undef HAVE_ALLOCA
 
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
-   */
+/* Define if you have <alloca.h> and it should be used (not on Ultrix).  */
 #undef HAVE_ALLOCA_H
 
-/* Define to 1 if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
-
-/* Define to 1 if you have the <arpa/inet.h> header file. */
-#undef HAVE_ARPA_INET_H
+/* Define if you have a working `mmap' system call.  */
+#undef HAVE_MMAP
 
-/* Define to 1 if you have the `atoll' function. */
-#undef HAVE_ATOLL
+/* Define as __inline if that's what the C compiler calls it.  */
+#undef inline
 
-/* Define to 1 if you have the <Cocoa/Cocoa.h> header file. */
-#undef HAVE_COCOA_COCOA_H
+/* Define to `long' if <sys/types.h> doesn't define.  */
+#undef off_t
 
-/* Define to 1 if you have the <cthreads.h> header file. */
-#undef HAVE_CTHREADS_H
+/* Define as the return type of signal handlers (int or void).  */
+#undef RETSIGTYPE
 
-/* Define to 1 if you have the `dcgettext' function. */
-#undef HAVE_DCGETTEXT
+/* Define to `unsigned' if <sys/types.h> doesn't define.  */
+#undef size_t
 
-/* Define to 1 if you have the <ddraw.h> header file. */
-#undef HAVE_DDRAW_H
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+#undef STACK_DIRECTION
 
-/* Define if <time.h> defines nanosleep. */
-#undef HAVE_DECL_NANOSLEEP
+/* Define if you have the ANSI C header files.  */
+#undef STDC_HEADERS
 
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
+/* Define if you can safely include both <sys/time.h> and <time.h>.  */
+#undef TIME_WITH_SYS_TIME
 
-/* Define to 1 if you have the <dvbpsi/dr.h> header file. */
-#undef HAVE_DVBPSI_DR_H
+/* Define if you have the __argz_count function.  */
+#undef HAVE___ARGZ_COUNT
 
-/* Define to 1 if you have the <dvdcss/dvdcss.h> header file. */
-#undef HAVE_DVDCSS_DVDCSS_H
+/* Define if you have the __argz_next function.  */
+#undef HAVE___ARGZ_NEXT
 
-/* Define to 1 if you have the <dvdplay/dvdplay.h> header file. */
-#undef HAVE_DVDPLAY_DVDPLAY_H
+/* Define if you have the __argz_stringify function.  */
+#undef HAVE___ARGZ_STRINGIFY
 
-/* Define to 1 if you have the <dvdread/dvd_reader.h> header file. */
-#undef HAVE_DVDREAD_DVD_READER_H
+/* Define if you have the atoll function.  */
+#undef HAVE_ATOLL
 
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
+/* Define if you have the dcgettext function.  */
+#undef HAVE_DCGETTEXT
 
-/* Define to 1 if you have the `feof_unlocked' function. */
+/* Define if you have the feof_unlocked function.  */
 #undef HAVE_FEOF_UNLOCKED
 
-/* Define to 1 if you have the `fgets_unlocked' function. */
+/* Define if you have the fgets_unlocked function.  */
 #undef HAVE_FGETS_UNLOCKED
 
-/* Define to 1 if you have the <gdk/gdk.h> header file. */
-#undef HAVE_GDK_GDK_H
-
-/* Define to 1 if you have the `getcwd' function. */
+/* Define if you have the getcwd function.  */
 #undef HAVE_GETCWD
 
-/* Define to 1 if you have the `getegid' function. */
+/* Define if you have the getegid function.  */
 #undef HAVE_GETEGID
 
-/* Define to 1 if you have the `geteuid' function. */
+/* Define if you have the geteuid function.  */
 #undef HAVE_GETEUID
 
-/* Define to 1 if you have the `getgid' function. */
+/* Define if you have the getgid function.  */
 #undef HAVE_GETGID
 
-/* Define to 1 if you have the `gethostbyname2' function. */
+/* Define if you have the gethostbyname2 function.  */
 #undef HAVE_GETHOSTBYNAME2
 
-/* Define to 1 if you have the <getopt.h> header file. */
-#undef HAVE_GETOPT_H
-
-/* getopt support */
-#undef HAVE_GETOPT_LONG
-
-/* Define to 1 if you have the `getpagesize' function. */
+/* Define if you have the getpagesize function.  */
 #undef HAVE_GETPAGESIZE
 
-/* Define to 1 if you have the `getpwuid' function. */
+/* Define if you have the getpwuid function.  */
 #undef HAVE_GETPWUID
 
-/* Define if the GNU gettext() function is already present or preinstalled. */
-#undef HAVE_GETTEXT
-
-/* Define to 1 if you have the `gettimeofday' function. */
+/* Define if you have the gettimeofday function.  */
 #undef HAVE_GETTIMEOFDAY
 
-/* Define to 1 if you have the `getuid' function. */
+/* Define if you have the getuid function.  */
 #undef HAVE_GETUID
 
-/* Define to 1 if you have the <glib.h> header file. */
-#undef HAVE_GLIB_H
+/* Define if you have the isatty function.  */
+#undef HAVE_ISATTY
 
-/* Define to 1 if you have the <gnome.h> header file. */
-#undef HAVE_GNOME_H
+/* Define if you have the memalign function.  */
+#undef HAVE_MEMALIGN
 
-/* Define to 1 if you have the <gtk/gtk.h> header file. */
-#undef HAVE_GTK_GTK_H
+/* Define if you have the mempcpy function.  */
+#undef HAVE_MEMPCPY
 
-/* Define if you have the iconv() function. */
-#undef HAVE_ICONV
+/* Define if you have the munmap function.  */
+#undef HAVE_MUNMAP
 
-/* Define to 1 if you have the <image.h> header file. */
-#undef HAVE_IMAGE_H
+/* Define if you have the posix_memalign function.  */
+#undef HAVE_POSIX_MEMALIGN
 
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
+/* Define if you have the putenv function.  */
+#undef HAVE_PUTENV
 
-/* For FreeBSD VCD support */
-#undef HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H
+/* Define if you have the select function.  */
+#undef HAVE_SELECT
 
-/* Define to 1 if you have the `isatty' function. */
-#undef HAVE_ISATTY
+/* Define if you have the setenv function.  */
+#undef HAVE_SETENV
 
-/* Define to 1 if you have the <kernel/OS.h> header file. */
-#undef HAVE_KERNEL_OS_H
+/* Define if you have the setlocale function.  */
+#undef HAVE_SETLOCALE
 
-/* Define to 1 if you have the <kernel/scheduler.h> header file. */
-#undef HAVE_KERNEL_SCHEDULER_H
+/* Define if you have the sigrelse function.  */
+#undef HAVE_SIGRELSE
 
-/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
-#undef HAVE_LANGINFO_CODESET
+/* Define if you have the stpcpy function.  */
+#undef HAVE_STPCPY
 
-/* Define if your <locale.h> file defines LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
+/* Define if you have the strcasecmp function.  */
+#undef HAVE_STRCASECMP
 
-/* Define to 1 if you have the <libdv/dv.h> header file. */
-#undef HAVE_LIBDV_DV_H
+/* Define if you have the strchr function.  */
+#undef HAVE_STRCHR
 
-/* Define to 1 if you have the `pth' library (-lpth). */
-#undef HAVE_LIBPTH
+/* Define if you have the strdup function.  */
+#undef HAVE_STRDUP
 
-/* Define to 1 if you have the `st' library (-lst). */
-#undef HAVE_LIBST
+/* Define if you have the strerror function.  */
+#undef HAVE_STRERROR
 
-/* Define to 1 if you have the <libv4l/v4l.h> header file. */
-#undef HAVE_LIBV4L_V4L_H
+/* Define if you have the strndup function.  */
+#undef HAVE_STRNDUP
 
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
+/* Define if you have the strtod function.  */
+#undef HAVE_STRTOD
 
-/* Define to 1 if you have the <linux/fb.h> header file. */
-#undef HAVE_LINUX_FB_H
+/* Define if you have the strtol function.  */
+#undef HAVE_STRTOL
 
-/* Define to 1 if you have the <linux/version.h> header file. */
-#undef HAVE_LINUX_VERSION_H
+/* Define if you have the strtoul function.  */
+#undef HAVE_STRTOUL
 
-/* Define to 1 if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
+/* Define if you have the swab function.  */
+#undef HAVE_SWAB
 
-/* Define to 1 if you have the <machine/param.h> header file. */
-#undef HAVE_MACHINE_PARAM_H
+/* Define if you have the tsearch function.  */
+#undef HAVE_TSEARCH
 
-/* Define to 1 if you have the <machine/soundcard.h> header file. */
-#undef HAVE_MACHINE_SOUNDCARD_H
+/* Define if you have the vasprintf function.  */
+#undef HAVE_VASPRINTF
 
-/* Define to 1 if you have the <mad.h> header file. */
-#undef HAVE_MAD_H
+/* Define if you have the <Cocoa/Cocoa.h> header file.  */
+#undef HAVE_COCOA_COCOA_H
 
-/* Define to 1 if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
+/* Define if you have the <Ph.h> header file.  */
+#undef HAVE_PH_H
 
-/* Define to 1 if you have the `memalign' function. */
-#undef HAVE_MEMALIGN
+/* Define if you have the <X11/Xlib.h> header file.  */
+#undef HAVE_X11_XLIB_H
 
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
+/* Define if you have the <X11/extensions/Xv.h> header file.  */
+#undef HAVE_X11_EXTENSIONS_XV_H
 
-/* Define to 1 if you have the `mempcpy' function. */
-#undef HAVE_MEMPCPY
+/* Define if you have the <X11/extensions/dpms.h> header file.  */
+#undef HAVE_X11_EXTENSIONS_DPMS_H
 
-/* Define to 1 if you have a working `mmap' system call. */
-#undef HAVE_MMAP
+/* Define if you have the <a52dec/a52.h> header file.  */
+#undef HAVE_A52DEC_A52_H
 
-/* Define to 1 if you have the `munmap' function. */
-#undef HAVE_MUNMAP
+/* Define if you have the <argz.h> header file.  */
+#undef HAVE_ARGZ_H
 
-/* Define if nanosleep is available. */
-#undef HAVE_NANOSLEEP
+/* Define if you have the <arpa/inet.h> header file.  */
+#undef HAVE_ARPA_INET_H
 
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#undef HAVE_NETINET_IN_H
+/* Define if you have the <cthreads.h> header file.  */
+#undef HAVE_CTHREADS_H
 
-/* Define to 1 if you have the <net/if.h> header file. */
-#undef HAVE_NET_IF_H
+/* Define if you have the <ddraw.h> header file.  */
+#undef HAVE_DDRAW_H
 
-/* Define to 1 if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
+/* Define if you have the <dlfcn.h> header file.  */
+#undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <ogg/ogg.h> header file. */
-#undef HAVE_OGG_OGG_H
+/* Define if you have the <dvbpsi/dr.h> header file.  */
+#undef HAVE_DVBPSI_DR_H
 
-/* Define to 1 if you have the <Ph.h> header file. */
-#undef HAVE_PH_H
+/* Define if you have the <dvdcss/dvdcss.h> header file.  */
+#undef HAVE_DVDCSS_DVDCSS_H
 
-/* Define to 1 if you have the `posix_memalign' function. */
-#undef HAVE_POSIX_MEMALIGN
+/* Define if you have the <dvdplay/dvdplay.h> header file.  */
+#undef HAVE_DVDPLAY_DVDPLAY_H
 
-/* Define to 1 if you have the <pthread.h> header file. */
-#undef HAVE_PTHREAD_H
+/* Define if you have the <dvdread/dvd_reader.h> header file.  */
+#undef HAVE_DVDREAD_DVD_READER_H
 
-/* Define to 1 if you have the `putenv' function. */
-#undef HAVE_PUTENV
+/* Define if you have the <fcntl.h> header file.  */
+#undef HAVE_FCNTL_H
 
-/* Define to 1 if you have the `select' function. */
-#undef HAVE_SELECT
+/* Define if you have the <gdk/gdk.h> header file.  */
+#undef HAVE_GDK_GDK_H
 
-/* Define to 1 if you have the `setenv' function. */
-#undef HAVE_SETENV
+/* Define if you have the <getopt.h> header file.  */
+#undef HAVE_GETOPT_H
 
-/* Define to 1 if you have the `setlocale' function. */
-#undef HAVE_SETLOCALE
+/* Define if you have the <glib.h> header file.  */
+#undef HAVE_GLIB_H
 
-/* Define to 1 if you have the `sigrelse' function. */
-#undef HAVE_SIGRELSE
+/* Define if you have the <gnome.h> header file.  */
+#undef HAVE_GNOME_H
 
-/* Define to 1 if you have the <soundcard.h> header file. */
-#undef HAVE_SOUNDCARD_H
+/* Define if you have the <gtk/gtk.h> header file.  */
+#undef HAVE_GTK_GTK_H
 
-/* Define to 1 if you have the <stddef.h> header file. */
-#undef HAVE_STDDEF_H
+/* Define if you have the <image.h> header file.  */
+#undef HAVE_IMAGE_H
 
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
+/* Define if you have the <inttypes.h> header file.  */
+#undef HAVE_INTTYPES_H
 
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
+/* Define if you have the <kernel/OS.h> header file.  */
+#undef HAVE_KERNEL_OS_H
 
-/* Define to 1 if you have the `stpcpy' function. */
-#undef HAVE_STPCPY
+/* Define if you have the <kernel/scheduler.h> header file.  */
+#undef HAVE_KERNEL_SCHEDULER_H
 
-/* Define to 1 if you have the `strcasecmp' function. */
-#undef HAVE_STRCASECMP
+/* Define if you have the <libdv/dv.h> header file.  */
+#undef HAVE_LIBDV_DV_H
 
-/* Define to 1 if you have the `strchr' function. */
-#undef HAVE_STRCHR
+/* Define if you have the <libv4l/v4l.h> header file.  */
+#undef HAVE_LIBV4L_V4L_H
 
-/* Define to 1 if you have the `strdup' function. */
-#undef HAVE_STRDUP
+/* Define if you have the <limits.h> header file.  */
+#undef HAVE_LIMITS_H
 
-/* Define to 1 if you have the `strerror' function. */
-#undef HAVE_STRERROR
+/* Define if you have the <linux/fb.h> header file.  */
+#undef HAVE_LINUX_FB_H
 
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
+/* Define if you have the <linux/version.h> header file.  */
+#undef HAVE_LINUX_VERSION_H
 
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
+/* Define if you have the <locale.h> header file.  */
+#undef HAVE_LOCALE_H
 
-/* Define to 1 if you have the `strndup' function. */
-#undef HAVE_STRNDUP
+/* Define if you have the <machine/param.h> header file.  */
+#undef HAVE_MACHINE_PARAM_H
 
-/* Define to 1 if you have the `strtod' function. */
-#undef HAVE_STRTOD
+/* Define if you have the <machine/soundcard.h> header file.  */
+#undef HAVE_MACHINE_SOUNDCARD_H
 
-/* Define to 1 if you have the `strtol' function. */
-#undef HAVE_STRTOL
+/* Define if you have the <mad.h> header file.  */
+#undef HAVE_MAD_H
 
-/* Define to 1 if you have the `strtoul' function. */
-#undef HAVE_STRTOUL
+/* Define if you have the <malloc.h> header file.  */
+#undef HAVE_MALLOC_H
 
-/* Define if <sys/time.h> defines struct timespec. */
-#undef HAVE_STRUCT_TIMESPEC
+/* Define if you have the <net/if.h> header file.  */
+#undef HAVE_NET_IF_H
 
-/* Define to 1 if you have the `swab' function. */
-#undef HAVE_SWAB
+/* Define if you have the <netinet/in.h> header file.  */
+#undef HAVE_NETINET_IN_H
+
+/* Define if you have the <nl_types.h> header file.  */
+#undef HAVE_NL_TYPES_H
+
+/* Define if you have the <ogg/ogg.h> header file.  */
+#undef HAVE_OGG_OGG_H
+
+/* Define if you have the <pthread.h> header file.  */
+#undef HAVE_PTHREAD_H
+
+/* Define if you have the <soundcard.h> header file.  */
+#undef HAVE_SOUNDCARD_H
+
+/* Define if you have the <stddef.h> header file.  */
+#undef HAVE_STDDEF_H
 
-/* Define to 1 if you have the <sys/int_types.h> header file. */
+/* Define if you have the <stdint.h> header file.  */
+#undef HAVE_STDINT_H
+
+/* Define if you have the <stdlib.h> header file.  */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the <string.h> header file.  */
+#undef HAVE_STRING_H
+
+/* Define if you have the <strings.h> header file.  */
+#undef HAVE_STRINGS_H
+
+/* Define if you have the <sys/int_types.h> header file.  */
 #undef HAVE_SYS_INT_TYPES_H
 
-/* Define to 1 if you have the <sys/param.h> header file. */
+/* Define if you have the <sys/param.h> header file.  */
 #undef HAVE_SYS_PARAM_H
 
-/* Define to 1 if you have the <sys/shm.h> header file. */
+/* Define if you have the <sys/shm.h> header file.  */
 #undef HAVE_SYS_SHM_H
 
-/* Define to 1 if you have the <sys/socket.h> header file. */
+/* Define if you have the <sys/socket.h> header file.  */
 #undef HAVE_SYS_SOCKET_H
 
-/* Define to 1 if you have the <sys/sockio.h> header file. */
+/* Define if you have the <sys/sockio.h> header file.  */
 #undef HAVE_SYS_SOCKIO_H
 
-/* Define to 1 if you have the <sys/soundcard.h> header file. */
+/* Define if you have the <sys/soundcard.h> header file.  */
 #undef HAVE_SYS_SOUNDCARD_H
 
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
+/* Define if you have the <sys/time.h> header file.  */
+#undef HAVE_SYS_TIME_H
 
-/* Define to 1 if you have the <sys/times.h> header file. */
+/* Define if you have the <sys/times.h> header file.  */
 #undef HAVE_SYS_TIMES_H
 
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
+/* Define if you have the <sys/types.h> header file.  */
 #undef HAVE_SYS_TYPES_H
 
-/* Define to 1 if you have the `tsearch' function. */
-#undef HAVE_TSEARCH
-
-/* Define to 1 if you have the <unistd.h> header file. */
+/* Define if you have the <unistd.h> header file.  */
 #undef HAVE_UNISTD_H
 
-/* Support for variadic macros */
-#undef HAVE_VARIADIC_MACROS
-
-/* Define to 1 if you have the `vasprintf' function. */
-#undef HAVE_VASPRINTF
-
-/* Define to 1 if you have the <X11/extensions/dpms.h> header file. */
-#undef HAVE_X11_EXTENSIONS_DPMS_H
-
-/* Define to 1 if you have the <X11/extensions/Xv.h> header file. */
-#undef HAVE_X11_EXTENSIONS_XV_H
+/* Define if you have the pth library (-lpth).  */
+#undef HAVE_LIBPTH
 
-/* Define to 1 if you have the <X11/Xlib.h> header file. */
-#undef HAVE_X11_XLIB_H
+/* Define if you have the st library (-lst).  */
+#undef HAVE_LIBST
 
-/* Define to 1 if you have the `__argz_count' function. */
-#undef HAVE___ARGZ_COUNT
+/* Package name */
+#undef VLC_PACKAGE
 
-/* Define to 1 if you have the `__argz_next' function. */
-#undef HAVE___ARGZ_NEXT
+/* Package version */
+#undef VLC_VERSION
 
-/* Define to 1 if you have the `__argz_stringify' function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define if you have the iconv() function. */
+#undef HAVE_ICONV
 
 /* Define as const if the declaration of iconv() needs const. */
 #undef ICONV_CONST
 
-/* String suffix for module functions */
-#undef MODULE_SUFFIX
-
-/* Symbol suffix for module functions */
-#undef MODULE_SYMBOL
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
 
-/* Define if <sys/param.h> defines ntohl. */
-#undef NTOHL_IN_SYS_PARAM_H
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
 
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
+/* Define to 1 if translation of program messages to the user's native language
+   is requested. */
+#undef ENABLE_NLS
 
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
 
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
+/* Define if nanosleep is available. */
+#undef HAVE_NANOSLEEP
 
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
+/* long getopt support */
+#undef HAVE_GETOPT_LONG
 
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
+/* getopt support */
+#undef HAVE_GETOPT_LONG
 
 /* Define if <pthread.h> defines pthread_cond_t. */
 #undef PTHREAD_COND_T_IN_PTHREAD_H
 /* Define if <pthread.h> defines pthread_once. */
 #undef PTHREAD_ONCE_IN_PTHREAD_H
 
-/* Define if <pth.h> defines pth_init */
-#undef PTH_INIT_IN_PTH_H
+/* Define if <strings.h> defines strncasecmp. */
+#undef STRNCASECMP_IN_STRINGS_H
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
+/* Define if <time.h> defines nanosleep. */
+#undef HAVE_DECL_NANOSLEEP
 
-/* Indicate whether we should use SDL/SDL.h or SDL11/SDL.h */
-#undef SDL_INCLUDE_FILE
+/* Define if <sys/time.h> defines struct timespec. */
+#undef HAVE_STRUCT_TIMESPEC
 
-/* If using the C implementation of alloca, define if you know the
-   direction of stack growth for your system; otherwise it will be
-   automatically deduced at run-time.
-        STACK_DIRECTION > 0 => grows toward higher addresses
-        STACK_DIRECTION < 0 => grows toward lower addresses
-        STACK_DIRECTION = 0 => direction of growth unknown */
-#undef STACK_DIRECTION
+/* Define if <X11/extensions/dpms.h> defines DPMSInfo. */
+#undef DPMSINFO_IN_DPMS_H
 
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
+/* Define if <sys/param.h> defines ntohl. */
+#undef NTOHL_IN_SYS_PARAM_H
 
-/* Define if <strings.h> defines strncasecmp. */
-#undef STRNCASECMP_IN_STRINGS_H
+/* Support for variadic macros */
+#undef HAVE_VARIADIC_MACROS
 
-/* Define if <st.h> defines st_init */
-#undef ST_INIT_IN_ST_H
+/* Maximum supported data alignment */
+#undef ATTRIBUTE_ALIGNED_MAX
 
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
+/* Define if $CC groks 3D Now! inline assembly. */
+#undef CAN_COMPILE_3DNOW
 
-/* Simple version string */
-#undef VERSION_MESSAGE
+/* Define if $CC groks SSE inline assembly. */
+#undef CAN_COMPILE_SSE
 
-/* Package name */
-#undef VLC_PACKAGE
+/* Define if $CC groks AltiVec inline assembly. */
+#undef CAN_COMPILE_ALTIVEC
 
-/* Package version */
-#undef VLC_VERSION
+/* Define if your compiler groks C AltiVec extensions. */
+#undef CAN_COMPILE_C_ALTIVEC
+
+/* For FreeBSD VCD support */
+#undef HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H
+
+/* Indicate whether we should use SDL/SDL.h or SDL11/SDL.h */
+#undef SDL_INCLUDE_FILE
 
 /* big endian system */
 #undef WORDS_BIGENDIAN
 
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
+/* Define if <pth.h> defines pth_init */
+#undef PTH_INIT_IN_PTH_H
 
-/* Define as `__inline' if that's what the C compiler calls it, or to nothing
-   if it is not supported. */
-#undef inline
+/* Define if <st.h> defines st_init */
+#undef ST_INIT_IN_ST_H
 
-/* Define to `long' if <sys/types.h> does not define. */
-#undef off_t
+/* Simple version string */
+#undef VERSION_MESSAGE
+
+/* Copyright string */
+#undef COPYRIGHT_MESSAGE
+
+/* The ./configure command line */
+#undef CONFIGURE_LINE
+
+/* String suffix for module functions */
+#undef MODULE_SUFFIX
+
+/* Symbol suffix for module functions */
+#undef MODULE_SYMBOL
 
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t
index 7c916bc8858cc522ecd560a0b6990c50499ce83b..2d43e785e340115bbf8343404532377cf79aa701 100644 (file)
@@ -2,7 +2,7 @@
  * input_ext-dec.h: structures exported to the VideoLAN decoders
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: input_ext-dec.h,v 1.67 2002/08/07 00:29:36 sam Exp $
+ * $Id: input_ext-dec.h,v 1.68 2002/08/08 00:35:10 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Kaempf <maxx@via.ecp.fr>
@@ -312,7 +312,8 @@ static inline void RemoveBits( bit_stream_t * p_bit_stream,
     {
         p_bit_stream->fifo.buffer = WORD_AT( p_bit_stream->p_byte )
                                         << ( -p_bit_stream->fifo.i_available );
-        ((WORD_TYPE *)p_bit_stream->p_byte)++;
+        p_bit_stream->p_byte =
+                   (byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
         p_bit_stream->fifo.i_available += sizeof(WORD_TYPE) * 8;
         return;
     }
@@ -333,11 +334,13 @@ static inline void RemoveBits32( bit_stream_t * p_bit_stream )
         {
             p_bit_stream->fifo.buffer = WORD_AT( p_bit_stream->p_byte )
                             << (32 - p_bit_stream->fifo.i_available);
-            ((WORD_TYPE *)p_bit_stream->p_byte)++;
+            p_bit_stream->p_byte =
+                       (byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
             return;
         }
 
-        ((WORD_TYPE *)p_bit_stream->p_byte)++;
+        p_bit_stream->p_byte =
+                   (byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
         return;
     }
 
@@ -371,7 +374,8 @@ static inline u32 GetBits( bit_stream_t * p_bit_stream, unsigned int i_bits )
         i_result = p_bit_stream->fifo.buffer
                         >> (8 * sizeof(WORD_TYPE) - i_bits);
         p_bit_stream->fifo.buffer = WORD_AT( p_bit_stream->p_byte );
-        ((WORD_TYPE *)p_bit_stream->p_byte)++;
+        p_bit_stream->p_byte =
+                   (byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
         i_result |= p_bit_stream->fifo.buffer
                         >> (8 * sizeof(WORD_TYPE)
                                      + p_bit_stream->fifo.i_available);
@@ -429,7 +433,8 @@ static inline u32 GetBits32( bit_stream_t * p_bit_stream )
         {
             i_result = p_bit_stream->fifo.buffer;
             p_bit_stream->fifo.buffer = WORD_AT( p_bit_stream->p_byte );
-            ((WORD_TYPE *)p_bit_stream->p_byte)++;
+            p_bit_stream->p_byte =
+                       (byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
             i_result |= p_bit_stream->fifo.buffer
                              >> (p_bit_stream->fifo.i_available);
             p_bit_stream->fifo.buffer <<= (32 - p_bit_stream->fifo.i_available);
@@ -437,7 +442,8 @@ static inline u32 GetBits32( bit_stream_t * p_bit_stream )
         }
 
         i_result = WORD_AT( p_bit_stream->p_byte );
-        ((WORD_TYPE *)p_bit_stream->p_byte)++;
+        p_bit_stream->p_byte =
+                   (byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
         return( i_result );
     }
 
index d8d529307cf50c9883c9b406093c767d0b89bf0b..3ae2f927a05fa1c6ebc1f8b126b3195c16d90d87 100644 (file)
@@ -3,7 +3,7 @@
  *                      but exported to plug-ins
  *****************************************************************************
  * Copyright (C) 1999-2002 VideoLAN
- * $Id: input_ext-plugins.h,v 1.34 2002/08/07 00:29:36 sam Exp $
+ * $Id: input_ext-plugins.h,v 1.35 2002/08/08 00:35:10 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -55,7 +55,6 @@ VLC_EXPORT( int,  input_UnselectES,( input_thread_t *, es_descriptor_t * ) );
 /*****************************************************************************
  * Prototypes from input_dec.c
  *****************************************************************************/
-//decoder_capabilities_t * input_ProbeDecoder( void );
 decoder_fifo_t * input_RunDecoder( input_thread_t *, es_descriptor_t * );
 void input_EndDecoder( input_thread_t *, es_descriptor_t * );
 VLC_EXPORT( void, input_DecodePES, ( decoder_fifo_t *, pes_packet_t * ) );
index d9cc19362291830b3f4e34f262bbcdebedb345b9..40e17703573fc27a703d9537d64f9dec0c973abc 100644 (file)
@@ -2,7 +2,7 @@
  * modules_inner.h : Macros used from within a module.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules_inner.h,v 1.27 2002/08/04 08:45:35 sam Exp $
+ * $Id: modules_inner.h,v 1.28 2002/08/08 00:35:10 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
 #if defined( __BUILTIN__ )
 #   define E_( function )          CONCATENATE( function, MODULE_NAME )
 #   define __VLC_SYMBOL( symbol )  CONCATENATE( symbol, MODULE_NAME )
-#   define DECLARE_SYMBOLS         ;
-#   define STORE_SYMBOLS           ;
+#   define DECLARE_SYMBOLS         struct _u_n_u_s_e_d_
+#   define STORE_SYMBOLS           struct _u_n_u_s_e_d_
 #elif defined( __PLUGIN__ )
 #   define E_( function )          function
 #   define __VLC_SYMBOL( symbol  ) CONCATENATE( symbol, MODULE_SYMBOL )
-#   define DECLARE_SYMBOLS         module_symbols_t* p_symbols;
-#   define STORE_SYMBOLS           p_symbols = p_module->p_symbols;
+#   define DECLARE_SYMBOLS         module_symbols_t* p_symbols
+#   define STORE_SYMBOLS           p_symbols = p_module->p_symbols
 #endif
 
 #if defined( __cplusplus )
index 7759ce890de4e7bb6c83beed42eb1180461019a6..71e577661d3d457cfd2d9150797b6182f308906c 100644 (file)
@@ -5,7 +5,7 @@
  * thread, and destroy a previously opened video output thread.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_output.h,v 1.82 2002/07/31 20:56:50 sam Exp $
+ * $Id: video_output.h,v 1.83 2002/08/08 00:35:10 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
@@ -158,9 +158,6 @@ struct vout_thread_t
 #define VOUT_DEPTH_CHANGE       0x0400                      /* depth changed */
 #define VOUT_CHROMA_CHANGE      0x0800               /* change chroma tables */
 
-/* Disabled for thread deadlocks issues --Meuuh */
-//#define VOUT_NODISPLAY_CHANGE   0xff00    /* changes which forbidden display */
-
 #define MAX_JITTER_SAMPLES      20
 
 /*****************************************************************************
index d323ce3a99724bb10f6211e834bf31e66b60bf86..01a629bff2bb4c1ab6ab88b0ee480e1f6ae3d3bb 100644 (file)
@@ -2,7 +2,7 @@
  * vlc.h: global header for vlc
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc.h,v 1.6 2002/07/20 18:01:42 sam Exp $
+ * $Id: vlc.h,v 1.7 2002/08/08 00:35:10 sam Exp $
  *
  * 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
@@ -29,10 +29,11 @@ extern "C" {
 /*****************************************************************************
  * Our custom types
  *****************************************************************************/
-#define VLC_DECLARE_STRUCT( name ) struct name; typedef struct name name;
+struct vlc_t;
+struct vlc_object_t;
 
-VLC_DECLARE_STRUCT(vlc_t)
-VLC_DECLARE_STRUCT(vlc_object_t)
+typedef struct vlc_t vlc_t;
+typedef struct vlc_object_t vlc_object_t;
 
 typedef signed int vlc_error_t;
 typedef int        vlc_bool_t;
index 78ffca901c791f89e2db56c87ab62d2afadf3c3d..a0af073897fead16f6c91ab305f48cab7c3536f8 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.15 2002/08/07 21:36:55 massiot Exp $
+ * $Id: vlc_common.h,v 1.16 2002/08/08 00:35:10 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -135,80 +135,81 @@ typedef u32 vlc_fourcc_t;
  *****************************************************************************/
 
 /* Messages */
-VLC_DECLARE_STRUCT(msg_bank_t)
-VLC_DECLARE_STRUCT(msg_subscription_t)
+typedef struct msg_bank_t msg_bank_t;
+typedef struct msg_subscription_t msg_subscription_t;
 
 /* Playlist */
-VLC_DECLARE_STRUCT(playlist_t)
-VLC_DECLARE_STRUCT(playlist_item_t)
+typedef struct playlist_t playlist_t;
+typedef struct playlist_item_t playlist_item_t;
 
 /* Modules */
-VLC_DECLARE_STRUCT(module_bank_t)
-VLC_DECLARE_STRUCT(module_t)
-VLC_DECLARE_STRUCT(module_config_t)
-VLC_DECLARE_STRUCT(module_symbols_t)
+typedef struct module_bank_t module_bank_t;
+typedef struct module_t module_t;
+typedef struct module_config_t module_config_t;
+typedef struct module_symbols_t module_symbols_t;
 
 /* Interface */
-VLC_DECLARE_STRUCT(intf_thread_t)
-VLC_DECLARE_STRUCT(intf_sys_t)
-VLC_DECLARE_STRUCT(intf_console_t)
-VLC_DECLARE_STRUCT(intf_msg_t)
-VLC_DECLARE_STRUCT(intf_channel_t)
+typedef struct intf_thread_t intf_thread_t;
+typedef struct intf_sys_t intf_sys_t;
+typedef struct intf_console_t intf_console_t;
+typedef struct intf_msg_t intf_msg_t;
+typedef struct intf_channel_t intf_channel_t;
 
 /* Input */
-VLC_DECLARE_STRUCT(input_thread_t)
-VLC_DECLARE_STRUCT(input_channel_t)
-VLC_DECLARE_STRUCT(input_area_t)
-VLC_DECLARE_STRUCT(input_buffers_t)
-VLC_DECLARE_STRUCT(input_socket_t)
-VLC_DECLARE_STRUCT(input_info_t)
-VLC_DECLARE_STRUCT(input_info_category_t)
-VLC_DECLARE_STRUCT(access_sys_t)
-VLC_DECLARE_STRUCT(demux_sys_t)
-VLC_DECLARE_STRUCT(es_descriptor_t)
-VLC_DECLARE_STRUCT(es_sys_t)
-VLC_DECLARE_STRUCT(pgrm_descriptor_t)
-VLC_DECLARE_STRUCT(pgrm_sys_t)
-VLC_DECLARE_STRUCT(stream_descriptor_t)
-VLC_DECLARE_STRUCT(stream_sys_t)
+typedef struct input_thread_t input_thread_t;
+typedef struct input_channel_t input_channel_t;
+typedef struct input_area_t input_area_t;
+typedef struct input_buffers_t input_buffers_t;
+typedef struct input_socket_t input_socket_t;
+typedef struct input_info_t input_info_t;
+typedef struct input_info_category_t input_info_category_t;
+typedef struct access_sys_t access_sys_t;
+typedef struct demux_sys_t demux_sys_t;
+typedef struct es_descriptor_t es_descriptor_t;
+typedef struct es_sys_t es_sys_t;
+typedef struct pgrm_descriptor_t pgrm_descriptor_t;
+typedef struct pgrm_sys_t pgrm_sys_t;
+typedef struct stream_descriptor_t stream_descriptor_t;
+typedef struct stream_sys_t stream_sys_t;
 
 /* Audio */
-VLC_DECLARE_STRUCT(aout_instance_t)
-VLC_DECLARE_STRUCT(aout_input_t)
-VLC_DECLARE_STRUCT(aout_buffer_t)
-VLC_DECLARE_STRUCT(audio_sample_format_t)
+typedef struct aout_instance_t aout_instance_t;
+typedef struct aout_sys_t aout_sys_t;
+typedef struct aout_input_t aout_input_t;
+typedef struct aout_buffer_t aout_buffer_t;
+typedef struct audio_sample_format_t audio_sample_format_t;
 
 /* Video */
-VLC_DECLARE_STRUCT(vout_thread_t)
-VLC_DECLARE_STRUCT(vout_font_t)
-VLC_DECLARE_STRUCT(vout_sys_t)
-VLC_DECLARE_STRUCT(chroma_sys_t)
-VLC_DECLARE_STRUCT(picture_t)
-VLC_DECLARE_STRUCT(picture_sys_t)
-VLC_DECLARE_STRUCT(picture_heap_t)
-VLC_DECLARE_STRUCT(subpicture_t)
-VLC_DECLARE_STRUCT(subpicture_sys_t)
+typedef struct vout_thread_t vout_thread_t;
+typedef struct vout_font_t vout_font_t;
+typedef struct vout_sys_t vout_sys_t;
+typedef struct chroma_sys_t chroma_sys_t;
+typedef struct picture_t picture_t;
+typedef struct picture_sys_t picture_sys_t;
+typedef struct picture_heap_t picture_heap_t;
+typedef struct subpicture_t subpicture_t;
+typedef struct subpicture_sys_t subpicture_sys_t;
 
 /* Decoders */
-VLC_DECLARE_STRUCT(decoder_fifo_t)
+typedef struct decoder_fifo_t decoder_fifo_t;
 
 /* Misc */
-VLC_DECLARE_STRUCT(data_packet_t)
-VLC_DECLARE_STRUCT(data_buffer_t)
-VLC_DECLARE_STRUCT(stream_position_t)
-VLC_DECLARE_STRUCT(stream_ctrl_t)
-VLC_DECLARE_STRUCT(pes_packet_t)
-VLC_DECLARE_STRUCT(bit_stream_t)
-VLC_DECLARE_STRUCT(network_socket_t)
-VLC_DECLARE_STRUCT(iso639_lang_t)
+typedef struct data_packet_t data_packet_t;
+typedef struct data_buffer_t data_buffer_t;
+typedef struct stream_position_t stream_position_t;
+typedef struct stream_ctrl_t stream_ctrl_t;
+typedef struct pes_packet_t pes_packet_t;
+typedef struct bit_stream_t bit_stream_t;
+typedef struct network_socket_t network_socket_t;
+typedef struct iso639_lang_t iso639_lang_t;
 
 /*****************************************************************************
  * Plug-in stuff
  *****************************************************************************/
 #ifndef __PLUGIN__
-#   define VLC_EXPORT( type, name, args ) type name args;
+#   define VLC_EXPORT( type, name, args ) type name args
 #else
-#   define VLC_EXPORT( type, name, args ) ;
+#   define VLC_EXPORT( type, name, args ) struct _u_n_u_s_e_d_
     extern module_symbols_t* p_symbols;
 #endif
 
index b83948e87482eda7b8406db39bb4e46e2d13c0b2..e9a71fa96a51c462c8d061b607b110cfd8614800 100644 (file)
@@ -36,6 +36,7 @@ struct module_symbols_t
     int (* __vlc_thread_create_inner) ( vlc_object_t *, char *, int, char *, void * ( * ) ( void * ), vlc_bool_t ) ;
     int (* __vlc_threads_end_inner) ( vlc_object_t * ) ;
     int (* __vlc_threads_init_inner) ( vlc_object_t * ) ;
+    int (* aout_FormatToBytes_inner) ( audio_sample_format_t * p_format ) ;
     int (* input_AccessInit_inner) ( input_thread_t * ) ;
     int (* input_AddInfo_inner) ( input_info_category_t *, char *, char *, ... ) ;
     int (* input_ChangeArea_inner) ( input_thread_t *, input_area_t * ) ;
@@ -204,6 +205,7 @@ struct module_symbols_t
 #   define aout_BufferNew p_symbols->aout_BufferNew_inner
 #   define aout_BufferPlay p_symbols->aout_BufferPlay_inner
 #   define aout_DeleteInstance p_symbols->aout_DeleteInstance_inner
+#   define aout_FormatToBytes p_symbols->aout_FormatToBytes_inner
 #   define aout_InputDelete p_symbols->aout_InputDelete_inner
 #   define aout_OutputNextBuffer p_symbols->aout_OutputNextBuffer_inner
 #   define config_Duplicate p_symbols->config_Duplicate_inner
index 8a24b4a854e40a98b82d75fec234aad034865521..58366043e071e1389e2e9e5a35a0f2581cf4ecd1 100644 (file)
@@ -3,7 +3,7 @@
  * This header provides a portable threads implementation.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: vlc_threads.h,v 1.8 2002/07/31 20:56:50 sam Exp $
+ * $Id: vlc_threads.h,v 1.9 2002/08/08 00:35:10 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
@@ -240,8 +240,10 @@ static inline int __vlc_mutex_lock( char * psz_file, int i_line,
     int i_return = pthread_mutex_lock( p_mutex );
     if( i_return )
     {
-//        msg_Err( "thread %d: mutex_lock failed at %s:%d (%s)",
-//                 pthread_self(), psz_file, i_line, strerror(i_return) );
+#if 0
+        msg_Err( "thread %d: mutex_lock failed at %s:%d (%s)",
+                 pthread_self(), psz_file, i_line, strerror(i_return) );
+#endif
     }
     return i_return;
 
@@ -303,8 +305,10 @@ static inline int __vlc_mutex_unlock( char * psz_file, int i_line,
     int i_return = pthread_mutex_unlock( p_mutex );
     if( i_return )
     {
-//        msg_Err( "thread %d: mutex_unlock failed at %s:%d (%s)",
-//                 pthread_self(), psz_file, i_line, strerror(i_return) );
+#if 0
+        msg_Err( "thread %d: mutex_unlock failed at %s:%d (%s)",
+                 pthread_self(), psz_file, i_line, strerror(i_return) );
+#endif
     }
     return i_return;
 
@@ -665,16 +669,20 @@ static inline int __vlc_cond_wait( char * psz_file, int i_line,
 
         if( i_result == ETIMEDOUT )
         {
-//X            msg_Warn( "thread %d: possible deadlock detected "
-//X                      "in cond_wait at %s:%d (%s)", pthread_self(),
-//X                      psz_file, i_line, strerror(i_result) );
+#if 0
+            msg_Warn( "thread %d: possible deadlock detected "
+                      "in cond_wait at %s:%d (%s)", pthread_self(),
+                      psz_file, i_line, strerror(i_result) );
+#endif
             continue;
         }
 
         if( i_result )
         {
-//X            msg_Err( "thread %d: cond_wait failed at %s:%d (%s)",
-//X                     pthread_self(), psz_file, i_line, strerror(i_result) );
+#if 0
+            msg_Err( "thread %d: cond_wait failed at %s:%d (%s)",
+                     pthread_self(), psz_file, i_line, strerror(i_result) );
+#endif
         }
         return( i_result );
     }
index 9eea56efd37134daf78be2cea22d8605ca049e2b..0013df60d9e53ffced8da6b17c53120075075633 100644 (file)
@@ -2,7 +2,7 @@
  * ifo.c: Functions for ifo parsing
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ifo.c,v 1.1 2002/08/04 17:23:41 sam Exp $
+ * $Id: ifo.c,v 1.2 2002/08/08 00:35:10 sam Exp $
  *
  * Authors: Stéphane Borel <stef@via.ecp.fr>
  *          German Tischler <tanis@gaspode.franken.de>
@@ -91,7 +91,6 @@ int IfoCreate( thread_dvd_data_t * p_dvd )
     p_dvd->p_ifo = malloc( sizeof(ifo_t) );
     if( p_dvd->p_ifo == NULL )
     {
-//X        intf_Err( p_input, "unable to allocate memory. aborting" );
         return -1;
     }
 
@@ -117,13 +116,13 @@ int IfoInit( ifo_t * p_ifo )
     if( !p_ifo->i_start ) return -1;
 
     p_tmp = FillBuffer( p_ifo, p_buf, p_ifo->i_start );
-    //i_start = p_ifo->i_pos;
+    /*i_start = p_ifo->i_pos; */
 
     /*
      * read the video manager information table
      */
 #define MGINF     p_ifo->vmg.manager_inf
-    //fprintf( stderr, "VMGI\n" );
+    /*fprintf( stderr, "VMGI\n" ); */
 
     ReadBytes( p_ifo, p_buf, &p_tmp, MGINF.psz_id, 12 );
     MGINF.psz_id[12] = '\0';
@@ -156,7 +155,7 @@ int IfoInit( ifo_t * p_ifo )
     DumpBytes( p_ifo, p_buf, &p_tmp, 2 );
     DumpBytes( p_ifo, p_buf, &p_tmp, 1 );
     MGINF.i_audio_nb = ReadByte( p_ifo, p_buf, &p_tmp );
-    //fprintf( stderr, "vmgi audio nb : %d\n", MGINF.i_audio_nb );
+    /*fprintf( stderr, "vmgi audio nb : %d\n", MGINF.i_audio_nb ); */
 
     for( i = 0 ; i < 8 ; i++ )
     {
@@ -165,7 +164,7 @@ int IfoInit( ifo_t * p_ifo )
 
     DumpBytes( p_ifo, p_buf, &p_tmp, 17 );
     MGINF.i_spu_nb = ReadByte( p_ifo, p_buf, &p_tmp );
-    //fprintf( stderr, "vmgi subpic nb : %d\n", MGINF.i_spu_nb );
+    /*fprintf( stderr, "vmgi subpic nb : %d\n", MGINF.i_spu_nb ); */
 
     for( i = 0 ; i < MGINF.i_spu_nb ; i++ )
     {
@@ -176,7 +175,7 @@ int IfoInit( ifo_t * p_ifo )
     /*
      * read first play title.
      */
-    //fprintf(stderr,"readtitle %i\n", MGINF.i_first_play_title_start_byte & 0x7ff );
+    /*fprintf(stderr,"readtitle %i\n", MGINF.i_first_play_title_start_byte & 0x7ff ); */
     if( ReadTitle( p_ifo, &p_ifo->vmg.title, p_ifo->i_start
                            + OFF2LB( MGINF.i_first_play_title_start_byte ),
                    MGINF.i_first_play_title_start_byte & 0x7ff ) < 0 )
@@ -192,10 +191,10 @@ int IfoInit( ifo_t * p_ifo )
     {
         p_tmp = FillBuffer( p_ifo, p_buf,
                         p_ifo->i_start + MGINF.i_title_inf_start_sector );
-        //fprintf( stderr, "title inf %d\n", p_ifo->i_pos );
+        /*fprintf( stderr, "title inf %d\n", p_ifo->i_pos ); */
     
         TITINF.i_title_nb = ReadWord( p_ifo, p_buf, &p_tmp );
-        //fprintf( stderr, "title_inf: TTU nb %d\n", TITINF.i_title_nb );
+        /*fprintf( stderr, "title_inf: TTU nb %d\n", TITINF.i_title_nb ); */
         DumpBytes( p_ifo, p_buf, &p_tmp, 2 );
         TITINF.i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
     
@@ -203,7 +202,6 @@ int IfoInit( ifo_t * p_ifo )
         TITINF.p_attr = malloc( TITINF.i_title_nb *sizeof(title_attr_t) );
         if( TITINF.p_attr == NULL )
         {
-//X            intf_Err( p_input, "out of memory in IfoInit" );
             return -1;
         }
     
@@ -216,7 +214,7 @@ int IfoInit( ifo_t * p_ifo )
             TITINF.p_attr[i].i_title_set_num = ReadByte( p_ifo, p_buf, &p_tmp );
             TITINF.p_attr[i].i_title_num = ReadByte( p_ifo, p_buf, &p_tmp );
             TITINF.p_attr[i].i_start_sector = ReadDouble( p_ifo, p_buf, &p_tmp );
-            //fprintf( stderr, "title_inf: %d %d %d\n", TITINF.p_attr[i].i_chapter_nb, TITINF.p_attr[i].i_title_set_num, TITINF.p_attr[i].i_title_num );
+            /*fprintf( stderr, "title_inf: %d %d %d\n", TITINF.p_attr[i].i_chapter_nb, TITINF.p_attr[i].i_title_set_num, TITINF.p_attr[i].i_title_num ); */
         }
     }
     else
@@ -247,7 +245,7 @@ int IfoInit( ifo_t * p_ifo )
                                 MGINF.i_parental_inf_start_sector );
         i_start = p_ifo->i_pos;
 
-        //fprintf( stderr, "PTL\n" );
+        /*fprintf( stderr, "PTL\n" ); */
     
         PARINF.i_country_nb = ReadWord( p_ifo, p_buf, &p_tmp );
         PARINF.i_vts_nb = ReadWord( p_ifo, p_buf, &p_tmp );
@@ -257,7 +255,6 @@ int IfoInit( ifo_t * p_ifo )
                                           * sizeof(parental_desc_t) );
         if( PARINF.p_parental_desc == NULL )
         {
-//X            intf_Err( p_input, "out of memory in IfoInit" );
             return -1;
         }
 
@@ -275,7 +272,6 @@ int IfoInit( ifo_t * p_ifo )
                                           * sizeof(parental_mask_t) );
         if( PARINF.p_parental_mask == NULL )
         {
-//X            intf_Err( p_input, "out of memory in IfoInit" );
             return -1;
         }
 
@@ -292,7 +288,6 @@ int IfoInit( ifo_t * p_ifo )
 
                 if( PARINF.p_parental_mask[i].ppi_mask[j] == NULL )
                 {
-//X                    intf_Err( p_input, "out of memory in IfoInit" );
                     return -1;
                 }
 
@@ -318,17 +313,16 @@ int IfoInit( ifo_t * p_ifo )
                                 MGINF.i_vts_inf_start_sector );
         i_start = p_ifo->i_pos;
     
-        //fprintf( stderr, "VTS ATTR\n" );
+        /*fprintf( stderr, "VTS ATTR\n" ); */
     
         VTSINF.i_vts_nb = ReadWord( p_ifo, p_buf, &p_tmp );;
-        //fprintf( stderr, "VTS ATTR Nb: %d\n", VTSINF.i_vts_nb );
+        /*fprintf( stderr, "VTS ATTR Nb: %d\n", VTSINF.i_vts_nb ); */
         DumpBytes( p_ifo, p_buf, &p_tmp, 2 );
         VTSINF.i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
         VTSINF.pi_vts_attr_start_byte =
                             malloc( VTSINF.i_vts_nb * sizeof(u32) );
         if( VTSINF.pi_vts_attr_start_byte == NULL )
         {
-//X            intf_Err( p_input, "out of memory in IfoInit" );
             return -1;
         }
 
@@ -341,7 +335,6 @@ int IfoInit( ifo_t * p_ifo )
         VTSINF.p_vts_attr = malloc( VTSINF.i_vts_nb * sizeof(vts_attr_t) );
         if( VTSINF.p_vts_attr == NULL )
         {
-//X            intf_Err( p_input, "out of memory in IfoInit" );
             return -1;
         }
 
@@ -359,7 +352,7 @@ int IfoInit( ifo_t * p_ifo )
             DumpBytes( p_ifo, p_buf, &p_tmp, 1 );
             VTSINF.p_vts_attr[i].i_vts_menu_audio_nb =
                                 ReadByte( p_ifo, p_buf, &p_tmp );
-            //fprintf( stderr, "m audio nb : %d\n", VTSINF.p_vts_attr[i].i_vts_menu_audio_nb );
+            /*fprintf( stderr, "m audio nb : %d\n", VTSINF.p_vts_attr[i].i_vts_menu_audio_nb ); */
 
             for( j = 0 ; j < 8 ; j++ )
             {
@@ -369,7 +362,7 @@ int IfoInit( ifo_t * p_ifo )
             DumpBytes( p_ifo, p_buf, &p_tmp, 17 );
             VTSINF.p_vts_attr[i].i_vts_menu_spu_nb =
                                 ReadByte( p_ifo, p_buf, &p_tmp );
-            //fprintf( stderr, "m subp nb : %d\n", VTSINF.p_vts_attr[i].i_vts_menu_spu_nb );
+            /*fprintf( stderr, "m subp nb : %d\n", VTSINF.p_vts_attr[i].i_vts_menu_spu_nb ); */
 
             for( j = 0 ; j < 28 ; j++ )
             {
@@ -382,7 +375,7 @@ int IfoInit( ifo_t * p_ifo )
             DumpBytes( p_ifo, p_buf, &p_tmp, 1 );
             VTSINF.p_vts_attr[i].i_vts_title_audio_nb =
                                 ReadDouble( p_ifo, p_buf, &p_tmp );
-            //fprintf( stderr, "tt audio nb : %d\n", VTSINF.p_vts_attr[i].i_vts_title_audio_nb );
+            /*fprintf( stderr, "tt audio nb : %d\n", VTSINF.p_vts_attr[i].i_vts_title_audio_nb ); */
 
             for( j = 0 ; j < 8 ; j++ )
             {
@@ -392,7 +385,7 @@ int IfoInit( ifo_t * p_ifo )
             DumpBytes( p_ifo, p_buf, &p_tmp, 17 );
             VTSINF.p_vts_attr[i].i_vts_title_spu_nb =
                                 ReadByte( p_ifo, p_buf, &p_tmp );
-            //fprintf( stderr, "tt subp nb : %d\n", VTSINF.p_vts_attr[i].i_vts_title_spu_nb );
+            /*fprintf( stderr, "tt subp nb : %d\n", VTSINF.p_vts_attr[i].i_vts_title_spu_nb ); */
 
             for( j = 0 ; j < 28 /*VTSINF.p_vts_vts_inf[i].i_vtstt_subpic_nb*/ ; j++ )
             {
@@ -430,8 +423,6 @@ int IfoInit( ifo_t * p_ifo )
 
     p_ifo->vts.b_initialized = 0;
 
-//X    intf_Warn( p_input, 2, "vmg initialized" );
-
     return 0;
 }
 
@@ -456,10 +447,10 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title )
     i_off = p_ifo->vmg.title_inf.p_attr[i_title-1].i_start_sector
                    + p_ifo->i_start;
 
-    //fprintf(stderr, "offset: %d\n" , i_off );
+    /*fprintf(stderr, "offset: %d\n" , i_off ); */
 
     p_tmp = FillBuffer( p_ifo, p_buf, i_off );
-    //i_start = p_ifo->i_pos;
+    /*i_start = p_ifo->i_pos; */
     p_ifo->vts.i_pos = p_ifo->i_pos;
 
 #define MGINF p_ifo->vts.manager_inf
@@ -467,7 +458,7 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title )
     /*
      * read manager information
      */
-    //fprintf( stderr, "VTSI\n" );
+    /*fprintf( stderr, "VTSI\n" ); */
 
     ReadBytes( p_ifo, p_buf, &p_tmp, MGINF.psz_id , 12 );
     MGINF.psz_id[12] = '\0';
@@ -533,12 +524,12 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title )
 
     DumpBytes( p_ifo, p_buf, &p_tmp, 1 );
     MGINF.i_audio_nb = ReadByte( p_ifo, p_buf, &p_tmp );
-    //fprintf( stderr, "vtsi audio nb : %d\n", MGINF.i_audio_nb );
+    /*fprintf( stderr, "vtsi audio nb : %d\n", MGINF.i_audio_nb ); */
 
     for( i = 0 ; i < 8 ; i++ )
     {
         i_temp = ReadQuad( p_ifo, p_buf, &p_tmp );
-        //fprintf( stderr, "Audio %d: %llx\n", i, i_temp );
+        /*fprintf( stderr, "Audio %d: %llx\n", i, i_temp ); */
         i_temp >>= 8;
         MGINF.p_audio_attr[i].i_bar = i_temp & 0xff;
         i_temp >>= 8;
@@ -567,13 +558,13 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title )
 
     DumpBytes( p_ifo, p_buf, &p_tmp, 17 );
     MGINF.i_spu_nb = ReadByte( p_ifo, p_buf, &p_tmp );
-    //fprintf( stderr, "vtsi subpic nb : %d\n", MGINF.i_spu_nb );
+    /*fprintf( stderr, "vtsi subpic nb : %d\n", MGINF.i_spu_nb ); */
 
     for( i=0 ; i<MGINF.i_spu_nb ; i++ )
     {
         ReadBytes( p_ifo, p_buf, &p_tmp, (u8*)(&i_temp), 6 );
         i_temp = hton64( i_temp ) >> 16;
-        //fprintf( stderr, "Subpic %d: %llx\n", i, i_temp );
+        /*fprintf( stderr, "Subpic %d: %llx\n", i, i_temp ); */
         MGINF.p_spu_attr[i].i_caption = i_temp & 0xff;
         i_temp >>= 8;
         MGINF.p_spu_attr[i].i_foo = i_temp & 0xff;
@@ -594,17 +585,16 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title )
 
         i_start = p_ifo->i_pos;
     
-        //fprintf( stderr, "VTS PTR\n" );
+        /*fprintf( stderr, "VTS PTR\n" ); */
    
         TITINF.i_title_nb = ReadWord( p_ifo, p_buf, &p_tmp );
-        //fprintf( stderr, "VTS title_inf nb: %d\n", TITINF.i_title_nb );
+        /*fprintf( stderr, "VTS title_inf nb: %d\n", TITINF.i_title_nb ); */
         DumpBytes( p_ifo, p_buf, &p_tmp, 2 );
         TITINF.i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
 
         TITINF.pi_start_byte = malloc( TITINF.i_title_nb * sizeof(u32) );
         if( TITINF.pi_start_byte == NULL )
         {
-//X            intf_Err( p_input, "out of memory in IfoTitleSet" );
             return -1;
         }
 
@@ -618,7 +608,6 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title )
                                          * sizeof(title_start_t) );
         if( TITINF.p_title_start == NULL )
         {
-//X            intf_Err( p_input, "out of memory in IfoTitleSet" );
             return -1;
         }
 
@@ -671,7 +660,7 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title )
         p_tmp = FillBuffer( p_ifo, p_buf, p_ifo->vts.i_pos +
                                           MGINF.i_time_inf_start_sector );
 
-        //fprintf( stderr, "TMAP\n" );
+        /*fprintf( stderr, "TMAP\n" ); */
 
         TIMINF.i_nb = ReadWord( p_ifo, p_buf, &p_tmp );;
         DumpBytes( p_ifo, p_buf, &p_tmp, 2 );
@@ -680,7 +669,6 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title )
         TIMINF.pi_start_byte = malloc( TIMINF.i_nb * sizeof(u32) );
         if( TIMINF.pi_start_byte == NULL )
         {
-//X            intf_Err( p_input, "out of memory in IfoTitleSet" );
             return -1;
         }
 
@@ -692,7 +680,6 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title )
         TIMINF.p_time_map = malloc( TIMINF.i_nb * sizeof(time_map_t) );
         if( TIMINF.p_time_map == NULL )
         {
-//X            intf_Err( p_input, "out of memory in IfoTitleSet" );
             return -1;
         }
 
@@ -708,7 +695,6 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title )
                      malloc( TIMINF.p_time_map[i].i_entry_nb * sizeof(u32) );
                 if( TIMINF.p_time_map[i].pi_sector == NULL )
                 {
-//X                    msg_Err( p_input, "out of memory in IfoTitleSet" );
                     return -1;
                 }
 
@@ -751,8 +737,10 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title )
     }
 #undef MGINF
 
-//X    intf_Warn( p_input, 4, "vts %d initialized",
-//X               p_ifo->vmg.title_inf.p_attr[i_title-1].i_title_set_num );
+#if 0
+    intf_Warn( p_input, 4, "vts %d initialized",
+               p_ifo->vmg.title_inf.p_attr[i_title-1].i_title_set_num );
+#endif
 
     p_ifo->vts.b_initialized = 1;
 
@@ -902,12 +890,12 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes
 
     i_start = p_ifo->i_pos;
 
-    //fprintf( stderr, "PGC @ %d + %d\n", p_ifo->i_pos, i_bytes );
+    /*fprintf( stderr, "PGC @ %d + %d\n", p_ifo->i_pos, i_bytes ); */
 
     DumpBytes( p_ifo, p_buf, &p_tmp, 2);
     p_title->i_chapter_nb = ReadByte( p_ifo, p_buf, &p_tmp );
     p_title->i_cell_nb = ReadByte( p_ifo, p_buf, &p_tmp );
-    //fprintf( stderr, "title: Prg: %d Cell: %d\n",p_title->i_chapter_nb,p_title->i_cell_nb  );
+    /*fprintf( stderr, "title: Prg: %d Cell: %d\n",p_title->i_chapter_nb,p_title->i_cell_nb  ); */
     p_title->i_play_time = ReadDouble( p_ifo, p_buf, &p_tmp );
     p_title->i_prohibited_user_op = ReadDouble( p_ifo, p_buf, &p_tmp );
 
@@ -974,7 +962,6 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes
 
             if( p_title->command.p_pre_command == NULL )
             {
-//X                intf_Err( p_input, "out of memory in ReadTitle" );
                 return -1;
             }
 
@@ -998,7 +985,6 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes
 
             if( p_title->command.p_post_command == NULL )
             {
-//X                intf_Err( p_input, "out of memory in ReadTitle" );
                 return -1;
             }
 
@@ -1022,7 +1008,6 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes
 
             if( p_title->command.p_cell_command == NULL )
             {
-//X                intf_Err( p_input, "out of memory in ReadTitle" );
                 return -1;
             }
 
@@ -1050,7 +1035,6 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes
         
         if( p_title->chapter_map.pi_start_cell == NULL )
         {
-//X            intf_Err( p_input, "out of memory in Read Title" );
             return -1;
         }
 
@@ -1074,7 +1058,6 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes
     
         if( p_title->p_cell_play == NULL )
         {
-//X            intf_Err( p_input, "out of memory in ReadTitle" );
             return -1;
         }
 
@@ -1105,7 +1088,6 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes
 
         if( p_title->p_cell_pos == NULL )
         {
-//X            intf_Err( p_input, "out of memory" );
             return -1;
         }
 
@@ -1175,10 +1157,10 @@ static int ReadUnitInf( ifo_t * p_ifo, unit_inf_t * p_unit_inf,
     p_tmp = FillBuffer( p_ifo, p_buf, i_block ) + i_bytes;
 
     i_start = p_ifo->i_pos;
-    //fprintf( stderr, "Unit\n" );
+    /*fprintf( stderr, "Unit\n" ); */
 
     p_unit_inf->i_title_nb = ReadWord( p_ifo, p_buf, &p_tmp );
-    //fprintf( stderr, "Unit nb: %d\n", p_unit_inf->i_title_nb );
+    /*fprintf( stderr, "Unit nb: %d\n", p_unit_inf->i_title_nb ); */
     DumpBytes( p_ifo, p_buf, &p_tmp, 2 );
     p_unit_inf->i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
 
@@ -1186,7 +1168,6 @@ static int ReadUnitInf( ifo_t * p_ifo, unit_inf_t * p_unit_inf,
             malloc( p_unit_inf->i_title_nb * sizeof(unit_title_t) );
     if( p_unit_inf->p_title == NULL )
     {
-//X        intf_Err( p_input, "out of memory in ReadUnit" );
         return -1;
     }
 
@@ -1195,7 +1176,7 @@ static int ReadUnitInf( ifo_t * p_ifo, unit_inf_t * p_unit_inf,
 #define TITLE p_unit_inf->p_title[i]
         TITLE.i_category_mask = ReadByte( p_ifo, p_buf, &p_tmp );
         TITLE.i_category = ReadByte( p_ifo, p_buf, &p_tmp );
-        //fprintf( stderr, "cat mask %d: %x cat %x\n", i, TITLE.i_category_mask, TITLE.i_category );
+        /*fprintf( stderr, "cat mask %d: %x cat %x\n", i, TITLE.i_category_mask, TITLE.i_category ); */
         TITLE.i_parental_mask = ReadWord( p_ifo, p_buf, &p_tmp );
         TITLE.i_title_start_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
 #undef TITLE
@@ -1203,7 +1184,7 @@ static int ReadUnitInf( ifo_t * p_ifo, unit_inf_t * p_unit_inf,
 
     for( i = 0 ; i < p_unit_inf->i_title_nb ; i++ )
     {
-        //fprintf( stderr, "Unit: PGC %d @ %d\n", i, p_ifo->i_pos );
+        /*fprintf( stderr, "Unit: PGC %d @ %d\n", i, p_ifo->i_pos ); */
         ReadTitle( p_ifo, &p_unit_inf->p_title[i].title, i_start +
             OFF2LB( p_unit_inf->p_title[i].i_title_start_byte + i_bytes ),
           (p_unit_inf->p_title[i].i_title_start_byte+i_bytes) & 0x7ff );
@@ -1246,26 +1227,25 @@ static int ReadTitleUnit( ifo_t * p_ifo, title_unit_t * p_title_unit,
 
     p_tmp = FillBuffer( p_ifo, p_buf, i_block );
     i_start = p_ifo->i_pos;
-    //fprintf( stderr, "Unit Table\n" );
+    /*fprintf( stderr, "Unit Table\n" ); */
 
     p_title_unit->i_unit_nb = ReadWord( p_ifo, p_buf, &p_tmp );
     DumpBytes( p_ifo, p_buf, &p_tmp, 2 );
     p_title_unit->i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
 
-    //fprintf(stderr, "Unit: nb %d last %d\n", p_title_unit->i_unit_nb, p_title_unit->i_last_byte );
+    /*fprintf(stderr, "Unit: nb %d last %d\n", p_title_unit->i_unit_nb, p_title_unit->i_last_byte ); */
 
     p_title_unit->p_unit = malloc( p_title_unit->i_unit_nb * sizeof(unit_t) );
     if( p_title_unit->p_unit == NULL )
     {
-//X        intf_Err( p_input, "out of memory in ReadTitleUnit" );
         return -1;
     }
 
     for( i = 0 ; i < p_title_unit->i_unit_nb ; i++ )
     {
-        //ReadBytes( p_ifo, p_buf, &p_tmp, p_title_unit->p_unit[i].ps_lang_code, 2 );
+        /*ReadBytes( p_ifo, p_buf, &p_tmp, p_title_unit->p_unit[i].ps_lang_code, 2 ); */
         p_title_unit->p_unit[i].i_lang_code = ReadWord( p_ifo, p_buf, &p_tmp );
-        //fprintf( stderr, "lang %d %x\n", i,p_title_unit->p_unit[i].i_lang_code );
+        /*fprintf( stderr, "lang %d %x\n", i,p_title_unit->p_unit[i].i_lang_code ); */
         DumpBytes( p_ifo, p_buf, &p_tmp, 1 );
         p_title_unit->p_unit[i].i_existence_mask =
                                            ReadByte( p_ifo, p_buf, &p_tmp );
@@ -1277,7 +1257,6 @@ static int ReadTitleUnit( ifo_t * p_ifo, title_unit_t * p_title_unit,
                 malloc( p_title_unit->i_unit_nb * sizeof(unit_inf_t) );
     if( p_title_unit->p_unit_inf == NULL )
     {
-//X        intf_Err( p_input, "out of memory in ReadTitleUnit" );
         return -1;
     }
 
@@ -1323,7 +1302,7 @@ static int ReadCellInf( ifo_t * p_ifo, cell_inf_t * p_cell_inf, int i_block )
 
     p_tmp = FillBuffer( p_ifo, p_buf, i_block );
     i_start = p_ifo->i_pos;
-//    fprintf( stderr, "CELL ADD\n" );
+/*    fprintf( stderr, "CELL ADD\n" ); */
 
     p_cell_inf->i_vob_nb = ReadWord( p_ifo, p_buf, &p_tmp );
     DumpBytes( p_ifo, p_buf, &p_tmp, 2 );
@@ -1337,7 +1316,6 @@ static int ReadCellInf( ifo_t * p_ifo, cell_inf_t * p_cell_inf, int i_block )
                 malloc( p_cell_inf->i_cell_nb *sizeof(cell_map_t) );
     if( p_cell_inf->p_cell_map == NULL )
     {
-//X        intf_Err( p_input, "out of memory in ReadCellInf" );
         return -1;
     }
 
@@ -1378,7 +1356,7 @@ static int ReadVobuMap( ifo_t * p_ifo, vobu_map_t * p_vobu_map, int i_block )
     
     p_tmp = FillBuffer( p_ifo, p_buf, i_block );
     i_start = p_ifo->i_pos;
-    //fprintf( stderr, "VOBU ADMAP\n" );
+    /*fprintf( stderr, "VOBU ADMAP\n" ); */
 
     p_vobu_map->i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp );
     i_max = ( i_start + p_vobu_map->i_last_byte + 1 - p_ifo->i_pos )
@@ -1387,7 +1365,6 @@ static int ReadVobuMap( ifo_t * p_ifo, vobu_map_t * p_vobu_map, int i_block )
     p_vobu_map->pi_vobu_start_sector = malloc( i_max * sizeof(u32) );
     if( p_vobu_map->pi_vobu_start_sector == NULL )
     {
-//X        intf_Err( p_input, "out of memory in ReadVobuMap" );
         return -1;
     }
 
@@ -1452,20 +1429,20 @@ static char * IfoMath( char val )
     {
         "none",
         "=", 
-        "<->",    // swap
+        "<->",    /* swap */
         "+=",
         "-=",
         "*=",
         "/=",
         "%=",
-        "rnd",    // rnd
+        "rnd",    /* rnd */
         "&=",
         "|=",
         "^=",
-        "??",    // invalid
-        "??",    // invalid
-        "??",    // invalid
-        "??"    // invalid
+        "??",    /* invalid */
+        "??",    /* invalid */
+        "??",    /* invalid */
+        "??"    /* invalid */
     };
 
     return (char *) math_op[val & 0x0f];
@@ -1578,7 +1555,7 @@ static void IfoAdvanced( u8 *pi_code )
         printf( "ReSuME %d", pi_code[7] );
     }
     else if( ( i_cmd & 0x06) == 0x02 )
-    {    // XX01Y
+    {    /* XX01Y */
         printf ("Link to %s cell ", ( i_cmd & 0x01 ) ? "prev" : "next");
     }
     else
@@ -1673,10 +1650,10 @@ static void IfoJmp( ifo_command_t com )
                     break;
             }
 #else
-        // OP_VAL_8(2) is number of cell
-        // it is processed BEFORE switch
-        // under some conditions, it is ignored
-        // I don't understand exactly what it means
+        /* OP_VAL_8(2) is number of cell */
+        /* it is processed BEFORE switch */
+        /* under some conditions, it is ignored */
+        /* I don't understand exactly what it means */
         printf( " ( spec cell 0x%02X ) ", OP_VAL_8(2) ); 
 
         switch( OP_VAL_8(3)>>6 )
@@ -1764,7 +1741,7 @@ void IfoSetSystem( ifo_command_t com )
                         if(OP_VAL_8(1]&0x80)
                                 printf ("s[%s] = 0x%02x;", reg_name[1], OP_VAL_8(1]&0xf);
                         if(OP_VAL_8(2)&0x80)
-//DENT: lwhat about 0x7f here ???
+/*DENT: lwhat about 0x7f here ??? */
                                 printf ("s[%s] = 0x%02x;", reg_name[2], OP_VAL_8(2)&0x7f);
                         if(OP_VAL_8(3)&0x80)
                                 printf ("s[%s] = 0x%02x;", reg_name[3], OP_VAL_8(3)&0xf);
@@ -1804,7 +1781,7 @@ void IfoSetSystem( ifo_command_t com )
         }
         break;
     case 4:
-        //actually only bits 00011100 00011100 are set
+        /*actually only bits 00011100 00011100 are set */
         if( com.i_direct )
         {
             printf ("s[%s] = 0x%02x", ifo_reg[11], OP_VAL_16(1));
@@ -1815,9 +1792,9 @@ void IfoSetSystem( ifo_command_t com )
         }
         break;
     case 6:
-        //actually,
-        //s[%s]=(r[%s]&0x3FF) | (0x%02x << 0xA);
-        //but it is way too ugly
+        /*actually, */
+        /*s[%s]=(r[%s]&0x3FF) | (0x%02x << 0xA); */
+        /*but it is way too ugly */
         if( com.i_direct )
         {
             printf( "s[%s] = 0x%02x", ifo_reg[8], OP_VAL_8(2)>>2 );
@@ -2031,8 +2008,8 @@ void CommandRead( ifo_command_t com )
             else
             {
                 printf( "r[0x%X]", OP_VAL_8(3)&0x1F);
-                    // 0x1F is either not a mistake,
-                    // or Microsoft programmer's mistake!!!
+                    /* 0x1F is either not a mistake, */
+                    /* or Microsoft programmer's mistake!!! */
             }
         }
 
@@ -2042,7 +2019,7 @@ void CommandRead( ifo_command_t com )
         printf( "r[0x%X] ", pi_code[1] & 0xF );
         printf( " %s ", IfoMath( com.i_cmd ) );
 
-        if( com.i_cmd == 0x02 )    // swap
+        if( com.i_cmd == 0x02 )    /* swap */
         {
             printf("r[0x%X] ", OP_VAL_8(0)&0x1F);
         }
@@ -2105,7 +2082,9 @@ static void ReadBytes( ifo_t* p_ifo, u8* p_buf, u8** pp_tmp,
 {
     if( i_nb > DVD_LB_SIZE )
     {
-//X        intf_Err( p_input, "excessive ReadBytes call (%i)", i_nb );
+#if 0
+        intf_Err( p_input, "excessive ReadBytes call (%i)", i_nb );
+#endif
     }
 
     if( *pp_tmp + i_nb >= p_buf + DVD_LB_SIZE )
@@ -2131,7 +2110,9 @@ static void DumpBytes( ifo_t* p_ifo, u8* p_buf, u8** pp_tmp, int i_nb )
 {
     if( i_nb > DVD_LB_SIZE )
     {
-//X        intf_Err( p_input, "excessive DumpBytes call (%i)", i_nb );
+#if 0
+        intf_Err( p_input, "excessive DumpBytes call (%i)", i_nb );
+#endif
     }
 
     *pp_tmp += i_nb;
index e07a2dee40bed5fc04d1f9ce84babafc6e921073..67ac41bf8c68c2b736918d49fc04ef3f3ef96466 100644 (file)
@@ -2,7 +2,7 @@
  * dvd_ifo.h: Structures for ifo parsing
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ifo.h,v 1.1 2002/08/04 17:23:41 sam Exp $
+ * $Id: ifo.h,v 1.2 2002/08/08 00:35:10 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
  */
 typedef struct ifo_video_s
 {
-    u8      i_compression         ;// 2;
-    u8      i_system              ;// 2;
-    u8      i_ratio               ;// 2;
-    u8      i_perm_displ          ;// 2;
+    u8      i_compression         ;/* 2; */
+    u8      i_system              ;/* 2; */
+    u8      i_ratio               ;/* 2; */
+    u8      i_perm_displ          ;/* 2; */
 
-    u8      i_line21_1            ;// 1;
-    u8      i_line21_2            ;// 1;
-    u8      i_source_res          ;// 2;
-    u8      i_letterboxed         ;// 1;
-    u8      i_mode                ;// 1;
+    u8      i_line21_1            ;/* 1; */
+    u8      i_line21_2            ;/* 1; */
+    u8      i_source_res          ;/* 2; */
+    u8      i_letterboxed         ;/* 1; */
+    u8      i_mode                ;/* 1; */
 } ifo_video_t;
 
 /* Audio type information */
 typedef struct ifo_audio_s
 {
-    u8      i_coding_mode         ;// 3;
-    u8      i_multichannel_extension  ;// 1;
-    u8      i_type                ;// 2;
-    u8      i_appl_mode           ;// 2;
-
-    u8      i_quantization        ;// 2;
-    u8      i_sample_freq         ;// 2;
-    u8      i_test                ;// 1;
-    u8      i_num_channels        ;// 3;
-    u16     i_lang_code           ;// 16;   // <char> description
-    u8      i_foo                 ;// 8;    // 0x00000000 ?
-    u8      i_caption             ;// 8;
-    u8      i_bar                 ;// 8;    // 0x00000000 ?
+    u8      i_coding_mode         ;/* 3; */
+    u8      i_multichannel_extension  ;/* 1; */
+    u8      i_type                ;/* 2; */
+    u8      i_appl_mode           ;/* 2; */
+
+    u8      i_quantization        ;/* 2; */
+    u8      i_sample_freq         ;/* 2; */
+    u8      i_test                ;/* 1; */
+    u8      i_num_channels        ;/* 3; */
+    u16     i_lang_code           ;/* 16;   // <char> description */
+    u8      i_foo                 ;/* 8;    // 0x00000000 ? */
+    u8      i_caption             ;/* 8; */
+    u8      i_bar                 ;/* 8;    // 0x00000000 ? */
 } ifo_audio_t;
 
 /* Audio Status */
 typedef struct audio_status_s
 {
-    u8      i_available;        // 1
-    u8      i_position;         // 7
-    u8      i_foo;              // 8
+    u8      i_available;        /* 1 */
+    u8      i_position;         /* 7 */
+    u8      i_foo;              /* 8 */
 } audio_status_t;
 
 typedef struct ifo_spu_t
 {
-    u16     i_prefix              ;// 16;   // 0x0100 ?
-    u16     i_lang_code           ;// 16;   // <char> description
-    u8      i_foo                 ;// 8;    // dont know
-    u8      i_caption             ;// 8;    // 0x00 ?
+    u16     i_prefix              ;/* 16;   // 0x0100 ? */
+    u16     i_lang_code           ;/* 16;   // <char> description */
+    u8      i_foo                 ;/* 8;    // dont know */
+    u8      i_caption             ;/* 8;    // 0x00 ? */
 } ifo_spu_t;
 
 /* Subpicture status */
 typedef struct spu_status_s
 {
-    u8      i_available;        //1
-    u8      i_position_43;      //7
-    u8      i_position_wide;    //8
-    u8      i_position_letter;  //8
-    u8      i_position_pan;     //8
+    u8      i_available;        /*1*/
+    u8      i_position_43;      /*7*/
+    u8      i_position_wide;    /*8*/
+    u8      i_position_letter;  /*8*/
+    u8      i_position_pan;     /*8*/
 } spu_status_t;
 
 
 /* Ifo vitual machine Commands */
 typedef struct command_desc_s
 {
-    u8              i_type      :3;
-    u8              i_direct    :1;
-    u8              i_cmd       :4;
-    u8              i_dir_cmp   :1;
-    u8              i_cmp       :3;
-    u8              i_sub_cmd   :4;
+    unsigned int    i_type      :3;
+    unsigned int    i_direct    :1;
+    unsigned int    i_cmd       :4;
+    unsigned int    i_dir_cmp   :1;
+    unsigned int    i_cmp       :3;
+    unsigned int    i_sub_cmd   :4;
     union
     {
         u8          pi_8[6];
@@ -112,24 +112,24 @@ typedef struct command_desc_s
   - start at i_pgc_com_tab_sbyte */
 typedef struct command_s
 {
-    u16             i_pre_command_nb;               // 2 bytes
-    u16             i_post_command_nb;              // 2 bytes
-    u16             i_cell_command_nb;              // 2 bytes
-//    char[2]         ???
-    u64* p_pre_command;                  // i_pre_com_nb * 8 bytes
-    u64* p_post_command;                 // i_post_com_nb * 8 bytes
-    u64* p_cell_command;                  // i_pre_com_nb * 8 bytes
-
-//    command_desc_t* p_cell_command;                 // i_cell_com_nb * 8 bytes
-//    command_desc_t* p_post_command;                 // i_post_com_nb * 8 bytes
-//    command_desc_t* p_cell_command;                 // i_cell_com_nb * 8 bytes
+    u16             i_pre_command_nb;               /* 2 bytes */
+    u16             i_post_command_nb;              /* 2 bytes */
+    u16             i_cell_command_nb;              /* 2 bytes */
+/*    char[2]         ??? */
+    u64* p_pre_command;                  /* i_pre_com_nb * 8 bytes */
+    u64* p_post_command;                 /* i_post_com_nb * 8 bytes */
+    u64* p_cell_command;                  /* i_pre_com_nb * 8 bytes */
+
+/*    command_desc_t* p_cell_command;                 // i_cell_com_nb * 8 bytes */
+/*    command_desc_t* p_post_command;                 // i_post_com_nb * 8 bytes */
+/*    command_desc_t* p_cell_command;                 // i_cell_com_nb * 8 bytes */
 } command_t;
 
 /* Program Chain Map Table
  * - start at "i_pgc_prg_map_sbyte" */
 typedef struct chapter_map_s
 {
-    u8*             pi_start_cell;              // i_prg_nb * 1 byte 
+    u8*             pi_start_cell;              /* i_prg_nb * 1 byte  */
 } chapter_map_t;
 
 /* Cell Playback Information Table
@@ -138,14 +138,14 @@ typedef struct chapter_map_s
 typedef struct cell_play_s
 {
     /* This information concerns the currently selected cell */
-    u16             i_category;                 // 2 bytes
-    u8              i_still_time;               // 1 byte; in seconds; ff=inf
-    u8              i_command_nb;               // 1 byte; 0 = no com
-    u32             i_play_time;                // 4 bytes
-    u32             i_first_sector;             // 4 bytes
-    u32             i_first_ilvu_vobu_esector;  // 4 bytes; ???
-    u32             i_last_vobu_start_sector;   // 4 bytes
-    u32             i_last_sector;              // 4 bytes
+    u16             i_category;                 /* 2 bytes */
+    u8              i_still_time;               /* 1 byte; in seconds; ff=inf */
+    u8              i_command_nb;               /* 1 byte; 0 = no com */
+    u32             i_play_time;                /* 4 bytes */
+    u32             i_first_sector;             /* 4 bytes */
+    u32             i_first_ilvu_vobu_esector;  /* 4 bytes; ??? */
+    u32             i_last_vobu_start_sector;   /* 4 bytes */
+    u32             i_last_sector;              /* 4 bytes */
 } cell_play_t;
 
 /* Cell Position Information Table
@@ -154,9 +154,9 @@ typedef struct cell_play_s
 typedef struct cell_pos_s
 {
     /* This information concerns the currently selected cell */
-    u16             i_vob_id;                   // 2 bytes
-//    char            ???
-    u8              i_cell_id;                  // 1 byte
+    u16             i_vob_id;                   /* 2 bytes */
+/*    char            ??? */
+    u8              i_cell_id;                  /* 1 byte */
 } cell_pos_t;
 
 /* Main structure for Program Chain
@@ -165,31 +165,31 @@ typedef struct cell_pos_s
 typedef struct title_s
 {
     /* Global features of program chain */
-//    char[2]         ???
-    u8              i_chapter_nb;                   // 1 byte
-    u8              i_cell_nb;                  // 1 byte
-    u32             i_play_time;                // 4 bytes
-    u32             i_prohibited_user_op;       // 4 bytes
-    audio_status_t  pi_audio_status[8];         // 8*2 bytes
-    spu_status_t    pi_spu_status[32];       // 32*4 bytes
-    u16             i_next_title_num;              // 2 bytes
-    u16             i_prev_title_num;              // 2 bytes
-    u16             i_go_up_title_num;              // 2 bytes
-    u8              i_still_time;               // 1 byte ; in seconds
-    u8              i_play_mode;                // 1 byte
+/*    char[2]         ??? */
+    u8              i_chapter_nb;                   /* 1 byte */
+    u8              i_cell_nb;                  /* 1 byte */
+    u32             i_play_time;                /* 4 bytes */
+    u32             i_prohibited_user_op;       /* 4 bytes */
+    audio_status_t  pi_audio_status[8];         /* 8*2 bytes */
+    spu_status_t    pi_spu_status[32];       /* 32*4 bytes */
+    u16             i_next_title_num;              /* 2 bytes */
+    u16             i_prev_title_num;              /* 2 bytes */
+    u16             i_go_up_title_num;              /* 2 bytes */
+    u8              i_still_time;               /* 1 byte ; in seconds */
+    u8              i_play_mode;                /* 1 byte */
     /* In video_ts.ifo, the 3 significant bytes of each color are
      * preceded by 1 unsignificant byte */
-    u32             pi_yuv_color[16];           // 16*3 bytes
+    u32             pi_yuv_color[16];           /* 16*3 bytes */
     /* Here come the start bytes of the following structures */
-    u16             i_command_start_byte;            // 2 bytes
-    u16             i_chapter_map_start_byte;            // 2 bytes
-    u16             i_cell_play_start_byte;      // 2 bytes
-    u16             i_cell_pos_start_byte;       // 2 bytes
+    u16             i_command_start_byte;            /* 2 bytes */
+    u16             i_chapter_map_start_byte;            /* 2 bytes */
+    u16             i_cell_play_start_byte;      /* 2 bytes */
+    u16             i_cell_pos_start_byte;       /* 2 bytes */
     /* Predefined structures */
     command_t       command;
     chapter_map_t   chapter_map;
-    cell_play_t*    p_cell_play;           // i_cell_nb * 24 bytes
-    cell_pos_t*     p_cell_pos;             // i_cell_nb * 4 bytes
+    cell_play_t*    p_cell_play;           /* i_cell_nb * 24 bytes */
+    cell_pos_t*     p_cell_pos;             /* i_cell_nb * 4 bytes */
 } title_t;
 
 /*
@@ -199,18 +199,18 @@ typedef struct title_s
 /* Menu PGCI Language unit Descriptor */
 typedef struct unit_s
 {
-    u16             i_lang_code;            // 2 bytes (ISO-xx)
-//    char            ???
-    u8              i_existence_mask;           // 1 byte
-    u32             i_unit_inf_start_byte;                 // 4 bytes
+    u16             i_lang_code;            /* 2 bytes (ISO-xx) */
+/*    char            ??? */
+    u8              i_existence_mask;           /* 1 byte */
+    u32             i_unit_inf_start_byte;                 /* 4 bytes */
 } unit_t;
 
 typedef struct unit_title_s
 {
-    u8              i_category_mask;             // 1 byte
-    u8              i_category;                  // 1 byte
-    u16             i_parental_mask;                 // 2 bytes
-    u32             i_title_start_byte;               // 4 bytes
+    u8              i_category_mask;             /* 1 byte */
+    u8              i_category;                  /* 1 byte */
+    u16             i_parental_mask;                 /* 2 bytes */
+    u32             i_title_start_byte;               /* 4 bytes */
     title_t         title;
 } unit_title_t;
 
@@ -218,21 +218,21 @@ typedef struct unit_title_s
  * - start at i_lu_sbyte */
 typedef struct unit_inf_s
 {
-    u16             i_title_nb;                   // 2 bytes
-//    char[2]         ???
-    u32             i_last_byte;                // 4 bytes
-    unit_title_t *  p_title;                      // i_srp_nb * 8 bytes
+    u16             i_title_nb;                   /* 2 bytes */
+/*    char[2]         ??? */
+    u32             i_last_byte;                /* 4 bytes */
+    unit_title_t *  p_title;                      /* i_srp_nb * 8 bytes */
 } unit_inf_t;
 
 /* Main Struct for Menu PGCI
  * - start at i_*_pgci_ut_ssector */
 typedef struct title_unit_s
 {
-    u16             i_unit_nb;                    // 2 bytes; ???
-//    char[2]         ???
-    u32             i_last_byte;                   // 4 bytes
-    unit_t*         p_unit;                       // i_lu_nb * 8 bytes
-    unit_inf_t*     p_unit_inf;                 // i_lu_nb * 8 bytes
+    u16             i_unit_nb;                    /* 2 bytes; ??? */
+/*    char[2]         ??? */
+    u32             i_last_byte;                   /* 4 bytes */
+    unit_t*         p_unit;                       /* i_lu_nb * 8 bytes */
+    unit_inf_t*     p_unit_inf;                 /* i_lu_nb * 8 bytes */
 } title_unit_t;
 
 /*
@@ -240,20 +240,20 @@ typedef struct title_unit_s
  */
 typedef struct cell_map_s
 {
-    u16             i_vob_id;                   // 2 bytes
-    u8              i_cell_id;                  // 1 byte
-//    char            ???
-    u32             i_first_sector;             // 4 bytes
-    u32             i_last_sector;              // 4 bytes
+    u16             i_vob_id;                   /* 2 bytes */
+    u8              i_cell_id;                  /* 1 byte */
+/*    char            ??? */
+    u32             i_first_sector;             /* 4 bytes */
+    u32             i_last_sector;              /* 4 bytes */
 } cell_map_t;
 
 typedef struct cell_inf_s
 {
-    u16             i_vob_nb;                   // 2 bytes
-//    char[2]         ???
-    u32             i_last_byte;                // 4 bytes
-    u16             i_cell_nb;                  // not in ifo; computed
-                                                // with e_byte
+    u16             i_vob_nb;                   /* 2 bytes */
+/*    char[2]         ??? */
+    u32             i_last_byte;                /* 4 bytes */
+    u16             i_cell_nb;                  /* not in ifo; computed */
+                                                /* with e_byte */
     cell_map_t*     p_cell_map;
 } cell_inf_t;
 
@@ -263,8 +263,8 @@ typedef struct cell_inf_s
  */
 typedef struct vobu_map_s
 {
-    u32             i_last_byte;                   // 4 bytes
-    u32*            pi_vobu_start_sector;            // (nb of vobu) * 4 bytes
+    u32             i_last_byte;                   /* 4 bytes */
+    u32*            pi_vobu_start_sector;            /* (nb of vobu) * 4 bytes */
 } vobu_map_t;
 
 /*****************************************************************************
@@ -276,40 +276,40 @@ typedef struct vobu_map_s
  */ 
 typedef struct manager_inf_s
 {
-    char            psz_id[13];                 // 12 bytes (DVDVIDEO-VMG)
-    u32             i_vmg_end_sector;                  // 4 bytes
-//    char[12]        ???
-    u32             i_vmg_inf_end_sector;                // 4 bytes
-//    char            ???
-    u8              i_spec_ver;                 // 1 byte
-    u32             i_cat;                      // 4 bytes
-    u16             i_volume_nb;                   // 2 bytes
-    u16             i_volume;                      // 2 bytes
-    u8              i_disc_side;                // 1 bytes
-//    char[20]        ???
-    u16             i_title_set_nb;                   // 2 bytes
-    char            ps_provider_id[32];         // 32 bytes
-    u64             i_pos_code;                 // 8 bytes
-//    char[24]        ???
-    u32             i_vmg_inf_end_byte;              // 4 bytes
-    u32             i_first_play_title_start_byte;             // 4 bytes
-//    char[56]        ???
-    u32             i_vob_start_sector;             // 4 bytes
-    u32             i_title_inf_start_sector;         // 4 bytes
-    u32             i_title_unit_start_sector;          // 4 bytes
-    u32             i_parental_inf_start_sector;         // 4 bytes
-    u32             i_vts_inf_start_sector;         // 4 bytes
-    u32             i_text_data_start_sector;         // 4 bytes
-    u32             i_cell_inf_start_sector;            // 4 bytes
-    u32             i_vobu_map_start_sector;       // 4 bytes
-//    char[2]         ???
-    ifo_video_t     video_attr;                 // 2 bytes
-//    char            ???
-    u8              i_audio_nb;                 // 1 byte
-    ifo_audio_t     p_audio_attr[8];            // i_vmgm_audio_nb * 8 bytes
-//    char[16]        ???
-    u8              i_spu_nb;                // 1 byte
-    ifo_spu_t       p_spu_attr[32];          // i_subpic_nb * 6 bytes
+    char            psz_id[13];                 /* 12 bytes (DVDVIDEO-VMG) */
+    u32             i_vmg_end_sector;                  /* 4 bytes */
+/*    char[12]        ??? */
+    u32             i_vmg_inf_end_sector;                /* 4 bytes */
+/*    char            ??? */
+    u8              i_spec_ver;                 /* 1 byte */
+    u32             i_cat;                      /* 4 bytes */
+    u16             i_volume_nb;                   /* 2 bytes */
+    u16             i_volume;                      /* 2 bytes */
+    u8              i_disc_side;                /* 1 bytes */
+/*    char[20]        ??? */
+    u16             i_title_set_nb;                   /* 2 bytes */
+    char            ps_provider_id[32];         /* 32 bytes */
+    u64             i_pos_code;                 /* 8 bytes */
+/*    char[24]        ??? */
+    u32             i_vmg_inf_end_byte;              /* 4 bytes */
+    u32             i_first_play_title_start_byte;             /* 4 bytes */
+/*    char[56]        ??? */
+    u32             i_vob_start_sector;             /* 4 bytes */
+    u32             i_title_inf_start_sector;         /* 4 bytes */
+    u32             i_title_unit_start_sector;          /* 4 bytes */
+    u32             i_parental_inf_start_sector;         /* 4 bytes */
+    u32             i_vts_inf_start_sector;         /* 4 bytes */
+    u32             i_text_data_start_sector;         /* 4 bytes */
+    u32             i_cell_inf_start_sector;            /* 4 bytes */
+    u32             i_vobu_map_start_sector;       /* 4 bytes */
+/*    char[2]         ??? */
+    ifo_video_t     video_attr;                 /* 2 bytes */
+/*    char            ??? */
+    u8              i_audio_nb;                 /* 1 byte */
+    ifo_audio_t     p_audio_attr[8];            /* i_vmgm_audio_nb * 8 bytes */
+/*    char[16]        ??? */
+    u8              i_spu_nb;                /* 1 byte */
+    ifo_spu_t       p_spu_attr[32];          /* i_subpic_nb * 6 bytes */
 } manager_inf_t;
 
 
@@ -321,23 +321,23 @@ typedef struct manager_inf_s
  * we have a pointer to this structure for each tts */
 typedef struct title_attr_s
 {
-    u8              i_play_type;                // 1 byte
-    u8              i_angle_nb;                 // 1 byte
-    u16             i_chapter_nb;                  // 2 bytes; Chapters/PGs
-    u16             i_parental_id;              // 2 bytes
-    u8              i_title_set_num;            // 1 byte (VTS#)
-    u8              i_title_num;                 // 1 byte ???
-    u32             i_start_sector;              // 4 bytes
+    u8              i_play_type;                /* 1 byte */
+    u8              i_angle_nb;                 /* 1 byte */
+    u16             i_chapter_nb;                  /* 2 bytes; Chapters/PGs */
+    u16             i_parental_id;              /* 2 bytes */
+    u8              i_title_set_num;            /* 1 byte (VTS#) */
+    u8              i_title_num;                 /* 1 byte ??? */
+    u32             i_start_sector;              /* 4 bytes */
 } title_attr_t;
 
 /* Main struct for tts
  * - start at "i_vmg_ptt_srpt_ssector" */
 typedef struct title_inf_s
 {
-    u16             i_title_nb;                   // 2 bytes
-//    char[2]         ???
-    u32             i_last_byte;                   // 4 bytes
-    title_attr_t *  p_attr;                     // i_ttu_nb * 12 bytes
+    u16             i_title_nb;                   /* 2 bytes */
+/*    char[2]         ??? */
+    u32             i_last_byte;                   /* 4 bytes */
+    title_attr_t *  p_attr;                     /* i_ttu_nb * 12 bytes */
 } title_inf_t;
 
 /*
@@ -345,26 +345,26 @@ typedef struct title_inf_s
  */
 typedef struct parental_desc_s
 {
-    char            ps_country_code[2];         // 2 bytes
-//    char[2]         ???
-    u16             i_parental_mask_start_byte;            // 2 bytes
-//    char[2]         ???
+    char            ps_country_code[2];         /* 2 bytes */
+/*    char[2]         ??? */
+    u16             i_parental_mask_start_byte;            /* 2 bytes */
+/*    char[2]         ??? */
 } parental_desc_t;
 
 typedef struct parental_mask_s
 {
-    u16*            ppi_mask[8];            // (i_vts_nb +1) * 8 * 2 bytes
+    u16*            ppi_mask[8];            /* (i_vts_nb +1) * 8 * 2 bytes */
 } parental_mask_t;
 
 /* Main struct for parental management
  * - start at i_vmg_ptl_mait_ssector */
 typedef struct parental_inf_s
 {
-    u16             i_country_nb;               // 2 bytes
-    u16             i_vts_nb;                   // 2 bytes
-    u32             i_last_byte;                   // 4 bytes
-    parental_desc_t* p_parental_desc;             // i_country_nb * 8 bytes
-    parental_mask_t* p_parental_mask;        // i_country_nb * sizeof(vmg_ptl_mask_t)
+    u16             i_country_nb;               /* 2 bytes */
+    u16             i_vts_nb;                   /* 2 bytes */
+    u32             i_last_byte;                   /* 4 bytes */
+    parental_desc_t* p_parental_desc;             /* i_country_nb * 8 bytes */
+    parental_mask_t* p_parental_mask;        /* i_country_nb * sizeof(vmg_ptl_mask_t) */
 } parental_inf_t;
 
 /*
@@ -375,33 +375,33 @@ typedef struct parental_inf_s
  * - start at pi_atrt_sbyte */
 typedef struct vts_attr_s
 {
-    u32             i_last_byte;                   // 4 bytes
-    u32             i_cat_app_type;             // 4 bytes
-    ifo_video_t     vts_menu_video_attr;          // 2 bytes
-//    char            ???
-    u8              i_vts_menu_audio_nb;            // 1 byte
-    ifo_audio_t     p_vts_menu_audio_attr[8];       // 8 * 8 bytes
-//    char[17]        ???
-    u8              i_vts_menu_spu_nb;           // 1 byte
-    ifo_spu_t       p_vts_menu_spu_attr[28];     // i_vtsm_subpic_nb * 6 bytes
-//    char[2]         ???
-    ifo_video_t     vts_title_video_attr;         // 2 bytes
-//    char            ???
-    u8              i_vts_title_audio_nb;           // 1 byte
-    ifo_audio_t     p_vts_title_audio_attr[8];      // 8 * 8 bytes
-//    char[17]        ???
-    u8              i_vts_title_spu_nb;          // 1 byte
-    ifo_spu_t       p_vts_title_spu_attr[28];    // i_vtstt_subpic_nb * 6 bytes
+    u32             i_last_byte;                   /* 4 bytes */
+    u32             i_cat_app_type;             /* 4 bytes */
+    ifo_video_t     vts_menu_video_attr;          /* 2 bytes */
+/*    char            ??? */
+    u8              i_vts_menu_audio_nb;            /* 1 byte */
+    ifo_audio_t     p_vts_menu_audio_attr[8];       /* 8 * 8 bytes */
+/*    char[17]        ??? */
+    u8              i_vts_menu_spu_nb;           /* 1 byte */
+    ifo_spu_t       p_vts_menu_spu_attr[28];     /* i_vtsm_subpic_nb * 6 bytes */
+/*    char[2]         ??? */
+    ifo_video_t     vts_title_video_attr;         /* 2 bytes */
+/*    char            ??? */
+    u8              i_vts_title_audio_nb;           /* 1 byte */
+    ifo_audio_t     p_vts_title_audio_attr[8];      /* 8 * 8 bytes */
+/*    char[17]        ??? */
+    u8              i_vts_title_spu_nb;          /* 1 byte */
+    ifo_spu_t       p_vts_title_spu_attr[28];    /* i_vtstt_subpic_nb * 6 bytes */
 } vts_attr_t;
 
 /* Main struct for vts attributes
  * - start at i_vmg_vts_atrt_ssector */
 typedef struct vts_inf_s
 {
-    u16             i_vts_nb;                   // 2 bytes
-//    char[2]         ???
-    u32             i_last_byte;                   // 4 bytes
-    u32*            pi_vts_attr_start_byte;          // i_vts_nb * 4 bytes
+    u16             i_vts_nb;                   /* 2 bytes */
+/*    char[2]         ??? */
+    u32             i_last_byte;                   /* 4 bytes */
+    u32*            pi_vts_attr_start_byte;          /* i_vts_nb * 4 bytes */
     vts_attr_t*     p_vts_attr;
 } vts_inf_t;
 
@@ -429,43 +429,43 @@ typedef struct vmg_s
  */ 
 typedef struct vts_manager_s
 {
-    char            psz_id[13];                 // 12 bytes (DVDVIDEO-VTS)
-    u32             i_last_sector;              // 4 bytes
-//    char[12]        ???
-    u32             i_inf_last_sector;          // 4 bytes
-//    char            ???
-    u8              i_spec_ver;                 // 1 byte
-    u32             i_cat;                      // 4 bytes
-//    char[90]        ???
-    u32             i_inf_end_byte;                // 4 bytes
-//    char[60]        ???
-    u32             i_menu_vob_start_sector;           // 4 bytes
-    u32             i_title_vob_start_sector;          // 4 bytes
-    u32             i_title_inf_start_sector;         // 4 bytes
-    u32             i_title_unit_start_sector;            // 4 bytes
-    u32             i_menu_unit_start_sector;        // 4 bytes
-    u32             i_time_inf_start_sector;          // 4 bytes
-    u32             i_menu_cell_inf_start_sector;          // 4 bytes
-    u32             i_menu_vobu_map_start_sector;     // 4 bytes
-    u32             i_cell_inf_start_sector;            // 4 bytes
-    u32             i_vobu_map_start_sector;       // 4 bytes
-//    char[24]        ???
-    ifo_video_t     menu_video_attr;               // 2 bytes
-//    char            ???
-    u8              i_menu_audio_nb;               // 1 byte
-    ifo_audio_t     p_menu_audio_attr[8];          // i_vmgm_audio_nb * 8 bytes
-//    char[16]        ???
-    u8              i_menu_spu_nb;              // 1 byte
-    ifo_spu_t       p_menu_spu_attr[32];        // i_subpic_nb * 6 bytes
-                                                // !!! only 28 subpics ???
-//    char[2]         ???
-    ifo_video_t     video_attr;                 // 2 bytes
-//    char            ???
-    u8              i_audio_nb;                 // 1 byte
-    ifo_audio_t     p_audio_attr[8];            // i_vmgm_audio_nb * 8 bytes
-//    char[16]        ???
-    u8              i_spu_nb;                // 1 byte
-    ifo_spu_t       p_spu_attr[32];          // i_subpic_nb * 6 bytes
+    char            psz_id[13];                 /* 12 bytes (DVDVIDEO-VTS) */
+    u32             i_last_sector;              /* 4 bytes */
+/*    char[12]        ??? */
+    u32             i_inf_last_sector;          /* 4 bytes */
+/*    char            ??? */
+    u8              i_spec_ver;                 /* 1 byte */
+    u32             i_cat;                      /* 4 bytes */
+/*    char[90]        ??? */
+    u32             i_inf_end_byte;                /* 4 bytes */
+/*    char[60]        ??? */
+    u32             i_menu_vob_start_sector;           /* 4 bytes */
+    u32             i_title_vob_start_sector;          /* 4 bytes */
+    u32             i_title_inf_start_sector;         /* 4 bytes */
+    u32             i_title_unit_start_sector;            /* 4 bytes */
+    u32             i_menu_unit_start_sector;        /* 4 bytes */
+    u32             i_time_inf_start_sector;          /* 4 bytes */
+    u32             i_menu_cell_inf_start_sector;          /* 4 bytes */
+    u32             i_menu_vobu_map_start_sector;     /* 4 bytes */
+    u32             i_cell_inf_start_sector;            /* 4 bytes */
+    u32             i_vobu_map_start_sector;       /* 4 bytes */
+/*    char[24]        ??? */
+    ifo_video_t     menu_video_attr;               /* 2 bytes */
+/*    char            ??? */
+    u8              i_menu_audio_nb;               /* 1 byte */
+    ifo_audio_t     p_menu_audio_attr[8];          /* i_vmgm_audio_nb * 8 bytes */
+/*    char[16]        ??? */
+    u8              i_menu_spu_nb;              /* 1 byte */
+    ifo_spu_t       p_menu_spu_attr[32];        /* i_subpic_nb * 6 bytes */
+                                                /* !!! only 28 subpics ??? */
+/*    char[2]         ??? */
+    ifo_video_t     video_attr;                 /* 2 bytes */
+/*    char            ??? */
+    u8              i_audio_nb;                 /* 1 byte */
+    ifo_audio_t     p_audio_attr[8];            /* i_vmgm_audio_nb * 8 bytes */
+/*    char[16]        ??? */
+    u8              i_spu_nb;                /* 1 byte */
+    ifo_spu_t       p_spu_attr[32];          /* i_subpic_nb * 6 bytes */
 } vts_manager_t;
 
 /* 
@@ -476,19 +476,19 @@ typedef struct vts_manager_s
  * we have a pointer to this structure for each tts */
 typedef struct title_start_s
 {
-    u16             i_title_id;         // 2 bytes; Chapters/PGs
-    u16             i_chapter;                   // 2 bytes
+    u16             i_title_id;         /* 2 bytes; Chapters/PGs */
+    u16             i_chapter;                   /* 2 bytes */
 } title_start_t;
 
 /* Main struct for tts
  * - start at "i_vts_ptt_srpt_ssector" */
 typedef struct vts_title_s
 {
-    u16             i_title_nb;                   // 2 bytes
-//    char[2]         ???
-    u32             i_last_byte;                   // 4 bytes
+    u16             i_title_nb;                   /* 2 bytes */
+/*    char[2]         ??? */
+    u32             i_last_byte;                   /* 4 bytes */
     u32*            pi_start_byte;
-    title_start_t * p_title_start;                      // i_ttu_nb * 4 bytes
+    title_start_t * p_title_start;                      /* i_ttu_nb * 4 bytes */
 } vts_title_t;
 
 /*
@@ -498,20 +498,20 @@ typedef struct vts_title_s
 /* Time Map structure */
 typedef struct time_map_s
 {
-    u8              i_time_unit;                // 1 byte
-//    char            ???
-    u16             i_entry_nb;                 // 2 bytes
-    u32*            pi_sector;                  // i_entry_nb * 4 bytes
+    u8              i_time_unit;                /* 1 byte */
+/*    char            ??? */
+    u16             i_entry_nb;                 /* 2 bytes */
+    u32*            pi_sector;                  /* i_entry_nb * 4 bytes */
 } time_map_t;
 
 /* Main structure for tmap_ti
  * - start at "i_tmap_ti_ssector" */
 typedef struct time_inf_s
 {
-    u16             i_nb;                       // 2 bytes
-//    char[2]         ???
-    u32             i_last_byte;                   // 4 bytes
-    u32*            pi_start_byte;                   // i_tmap_nb * 4 bytes
+    u16             i_nb;                       /* 2 bytes */
+/*    char[2]         ??? */
+    u32             i_last_byte;                   /* 4 bytes */
+    u32*            pi_start_byte;                   /* i_tmap_nb * 4 bytes */
     time_map_t*     p_time_map;
 } time_inf_t;
 
index 35524c26f556b43901e2ae56c3f99bf1acb7cf33..89cc163e312bad6e0c6d50f25ea868915bb4cbec 100644 (file)
@@ -1,7 +1,7 @@
 /* seek.c: functions to navigate through DVD.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: seek.c,v 1.1 2002/08/04 17:23:41 sam Exp $
+ * $Id: seek.c,v 1.2 2002/08/08 00:35:10 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -223,8 +223,10 @@ int LbMaxOnce( thread_dvd_data_t * p_dvd )
                          p_dvd->i_vts_start + p_dvd->i_vts_lb,
                          DVDCSS_SEEK_MPEG ) < 0 )
         {
-//X            intf_ErrMsg( "dvd error: %s",
-//X                         dvdcss_error( p_dvd->dvdhandle ) );
+#if 0
+            intf_ErrMsg( "dvd error: %s",
+                         dvdcss_error( p_dvd->dvdhandle ) );
+#endif
             return 0;
         }
 
@@ -308,12 +310,16 @@ int DVDSetChapter( thread_dvd_data_t * p_dvd, int i_chapter )
                          p_dvd->i_vts_start + p_dvd->i_vts_lb,
                          DVDCSS_SEEK_MPEG ) < 0 )
         {
-//X            intf_ErrMsg( "dvd error: %s", dvdcss_error( p_dvd->dvdhandle ) );
+#if 0
+            intf_ErrMsg( "dvd error: %s", dvdcss_error( p_dvd->dvdhandle ) );
+#endif
             return -1;
         }
         
-//X        intf_WarnMsg( 4, "dvd info: chapter %d prg_cell %d map_cell %d",
-//X                i_chapter, p_dvd->i_prg_cell, p_dvd->i_map_cell );
+#if 0
+        intf_WarnMsg( 4, "dvd info: chapter %d prg_cell %d map_cell %d",
+                i_chapter, p_dvd->i_prg_cell, p_dvd->i_map_cell );
+#endif
     }
     
     return i_chapter;
index f6837be007c8f91bd79d8f4edd4a1ecd4b5d261b..90f5ba772e3474c714f5406822218b631a5de3f7 100644 (file)
@@ -3,7 +3,7 @@
  * found in .ifo.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: summary.c,v 1.1 2002/08/04 17:23:41 sam Exp $
+ * $Id: summary.c,v 1.2 2002/08/08 00:35:10 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
  ****************************************************************************/
 void IfoPrintTitle( thread_dvd_data_t * p_dvd )
 {
-//X    intf_WarnMsg( 5, "dvd info: title %d, %d chapter%s, %d angle%s",
-//X                     p_dvd->i_title, p_dvd->i_chapter_nb,
-//X                     (p_dvd->i_chapter_nb == 1) ? "" : "s",
-//X                     p_dvd->i_angle_nb,
-//X                     (p_dvd->i_angle_nb == 1) ? "" : "s" );
+#if 0
+    intf_WarnMsg( 5, "dvd info: title %d, %d chapter%s, %d angle%s",
+                     p_dvd->i_title, p_dvd->i_chapter_nb,
+                     (p_dvd->i_chapter_nb == 1) ? "" : "s",
+                     p_dvd->i_angle_nb,
+                     (p_dvd->i_angle_nb == 1) ? "" : "s" );
+#endif
 }
 
 /****************************************************************************
@@ -79,39 +81,41 @@ void IfoPrintTitle( thread_dvd_data_t * p_dvd )
 #define video p_dvd->p_ifo->vts.manager_inf.video_attr
 void IfoPrintVideo( thread_dvd_data_t * p_dvd )
 {
-//X    char*    psz_perm_displ[4] =
-//X             {
-//X                "pan-scan & letterboxed",
-//X                "pan-scan",
-//X                "letterboxed",
-//X                "not specified"
-//X             };
-//X    char*    psz_source_res[4] =
-//X             {
-//X                "720x480 ntsc or 720x576 pal",
-//X                "704x480 ntsc or 704x576 pal",
-//X                "352x480 ntsc or 352x576 pal",
-//X                "352x240 ntsc or 352x288 pal"
-//X             };
-
-//X    intf_WarnMsg( 5, "dvd info: MPEG-%d video, %sHz, aspect ratio %s",
-//X                     video.i_compression + 1,
-//X                     video.i_system ? "pal 625 @50" : "ntsc 525 @60",
-//X                     video.i_ratio ? (video.i_ratio == 3) ? "16:9"
-//X                                                          : "unknown"
-//X                                   : "4:3" );
-
-//X    intf_WarnMsg( 5, "dvd info: display mode %s, %s, %s",
-//X                     psz_perm_displ[video.i_perm_displ],
-//X                     video.i_line21_1 ? "line21-1 data in GOP"
-//X                                      : "no line21-1 data",
-//X                     video.i_line21_2 ? "line21-2 data in GOP"
-//X                                      : "no line21-2 data" );
-
-//X    intf_WarnMsg( 5, "dvd info: source is %s, %sletterboxed, %s mode",
-//X                     psz_source_res[video.i_source_res],
-//X                     video.i_letterboxed ? "" : "not ",
-//X                     video.i_mode ? "film (625/50 only)" : "camera" );
+#if 0
+    char*    psz_perm_displ[4] =
+             {
+                "pan-scan & letterboxed",
+                "pan-scan",
+                "letterboxed",
+                "not specified"
+             };
+    char*    psz_source_res[4] =
+             {
+                "720x480 ntsc or 720x576 pal",
+                "704x480 ntsc or 704x576 pal",
+                "352x480 ntsc or 352x576 pal",
+                "352x240 ntsc or 352x288 pal"
+             };
+
+    intf_WarnMsg( 5, "dvd info: MPEG-%d video, %sHz, aspect ratio %s",
+                     video.i_compression + 1,
+                     video.i_system ? "pal 625 @50" : "ntsc 525 @60",
+                     video.i_ratio ? (video.i_ratio == 3) ? "16:9"
+                                                          : "unknown"
+                                   : "4:3" );
+
+    intf_WarnMsg( 5, "dvd info: display mode %s, %s, %s",
+                     psz_perm_displ[video.i_perm_displ],
+                     video.i_line21_1 ? "line21-1 data in GOP"
+                                      : "no line21-1 data",
+                     video.i_line21_2 ? "line21-2 data in GOP"
+                                      : "no line21-2 data" );
+
+    intf_WarnMsg( 5, "dvd info: source is %s, %sletterboxed, %s mode",
+                     psz_source_res[video.i_source_res],
+                     video.i_letterboxed ? "" : "not ",
+                     video.i_mode ? "film (625/50 only)" : "camera" );
+#endif
 }
 #undef video
 
@@ -125,29 +129,31 @@ void IfoPrintAudio( thread_dvd_data_t * p_dvd, int i )
 {
     if( audio_status.i_available )
     {
-//X        char* ppsz_mode[8] =
-//X            { "A52", "unknown", "MPEG", "MPEG-2", "LPCM", "SDDS", "DTS", "" };
-//X        char* ppsz_appl_mode[4] =
-//X            { "no application specified", "karaoke", "surround sound", "" };
-//X        char* ppsz_quant[4] =
-//X            { "16 bits", "20 bits", "24 bits", "drc" };
-    
-//X        intf_WarnMsg( 5, "dvd info: audio %d (%s) is %s, "
-//X                         "%d%s channel%s, %dHz, %s", i,
-//X                         DecodeLanguage( audio.i_lang_code ),
-//X                         ppsz_mode[audio.i_coding_mode & 0x7],
-//X                         audio.i_num_channels + 1,
-//X                         audio.i_multichannel_extension ? " ext." : "",
-//X                         audio.i_num_channels ? "s" : "",
-//X                         audio.i_sample_freq ? 96000 : 48000,
-//X                         ppsz_appl_mode[audio.i_appl_mode & 0x3] );
-
-//X        intf_WarnMsg( 5, "dvd info: %s, quantization %s, status %x",
-//X                         (audio.i_caption == 1) ? "normal caption"
-//X                           : (audio.i_caption == 3) ? "directors comments"
-//X                               : "unknown caption",
-//X                         ppsz_quant[audio.i_quantization & 0x3],
-//X                         audio_status.i_position );
+#if 0
+        char* ppsz_mode[8] =
+            { "A52", "unknown", "MPEG", "MPEG-2", "LPCM", "SDDS", "DTS", "" };
+        char* ppsz_appl_mode[4] =
+            { "no application specified", "karaoke", "surround sound", "" };
+        char* ppsz_quant[4] =
+            { "16 bits", "20 bits", "24 bits", "drc" };
+        intf_WarnMsg( 5, "dvd info: audio %d (%s) is %s, "
+                         "%d%s channel%s, %dHz, %s", i,
+                         DecodeLanguage( audio.i_lang_code ),
+                         ppsz_mode[audio.i_coding_mode & 0x7],
+                         audio.i_num_channels + 1,
+                         audio.i_multichannel_extension ? " ext." : "",
+                         audio.i_num_channels ? "s" : "",
+                         audio.i_sample_freq ? 96000 : 48000,
+                         ppsz_appl_mode[audio.i_appl_mode & 0x3] );
+
+        intf_WarnMsg( 5, "dvd info: %s, quantization %s, status %x",
+                         (audio.i_caption == 1) ? "normal caption"
+                           : (audio.i_caption == 3) ? "directors comments"
+                               : "unknown caption",
+                         ppsz_quant[audio.i_quantization & 0x3],
+                         audio_status.i_position );
+#endif
     }
 }
 #undef audio_status
@@ -164,14 +170,16 @@ void IfoPrintSpu( thread_dvd_data_t * p_dvd, int i )
 {
     if( spu_status.i_available )
     {
-//X        intf_WarnMsg( 5, "dvd info: spu %d (%s), caption %d "
-//X                         "prefix %x, modes [%s%s%s%s ]", i,
-//X                         DecodeLanguage( spu.i_lang_code ),
-//X                         spu.i_caption, spu.i_prefix,
-//X                         spu_status.i_position_43 ? " 4:3" : "",
-//X                         spu_status.i_position_wide ? " wide" : "",
-//X                         spu_status.i_position_letter ? " letter" : "",
-//X                         spu_status.i_position_pan ? " pan" : "" );
+#if 0
+        intf_WarnMsg( 5, "dvd info: spu %d (%s), caption %d "
+                         "prefix %x, modes [%s%s%s%s ]", i,
+                         DecodeLanguage( spu.i_lang_code ),
+                         spu.i_caption, spu.i_prefix,
+                         spu_status.i_position_43 ? " 4:3" : "",
+                         spu_status.i_position_wide ? " wide" : "",
+                         spu_status.i_position_letter ? " letter" : "",
+                         spu_status.i_position_pan ? " pan" : "" );
+#endif
     }
 }
 #undef spu_status
index 53e88db8929bde73c00c76df5ef8aa0bd2a30098..2c4521282c4191700849e89310e1aa2a4e49d186 100644 (file)
@@ -5,7 +5,7 @@
  * contains the basic udf handling functions
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: udf.c,v 1.1 2002/08/04 17:23:41 sam Exp $
+ * $Id: udf.c,v 1.2 2002/08/08 00:35:10 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -98,7 +98,9 @@ static int UDFReadLB( dvdcss_handle dvdhandle, off_t i_lba,
 {
     if( dvdcss_seek( dvdhandle, i_lba, DVDCSS_NOFLAGS ) < 0 )
     {
-//X        intf_ErrMsg( "dvd error: block %i not found", i_lba );
+#if 0
+        intf_ErrMsg( "dvd error: block %i not found", i_lba );
+#endif
         return 0;
     }
 
@@ -256,13 +258,15 @@ static int UDFLogVolume(u8 * pi_data, char * p_volume_descriptor )
 
     UDFDecode( &pi_data[84], 128, p_volume_descriptor );
 
-    i_lb_size = GETN4( 212 );        // should be 2048
-    i_MT_L = GETN4( 264 );        // should be 6
-    i_N_PM = GETN4( 268 );        // should be 1
+    i_lb_size = GETN4( 212 );        /* should be 2048 */
+    i_MT_L = GETN4( 264 );        /* should be 6 */
+    i_N_PM = GETN4( 268 );        /* should be 1 */
 
     if( i_lb_size != DVD_LB_SIZE )
     {
-//X        intf_ErrMsg( "dvd error: invalid UDF sector size (%d)", i_lb_size );
+#if 0
+        intf_ErrMsg( "dvd error: invalid UDF sector size (%d)", i_lb_size );
+#endif
         return 1;
     }
 
@@ -664,7 +668,9 @@ u32 DVDUDFFindFile( dvdcss_handle dvdhandle, char * psz_path )
     i_partition = 0;
     if( !UDFFindPartition( i_partition, &partition ) )
     {
-//X        intf_ErrMsg( "dvd error: partition 0 not found" );
+#if 0
+        intf_ErrMsg( "dvd error: partition 0 not found" );
+#endif
         return 0;
     }
   
@@ -693,26 +699,34 @@ u32 DVDUDFFindFile( dvdcss_handle dvdhandle, char * psz_path )
 
     if( i_tag_id != 256 )
     {
-//X        intf_ErrMsg( "dvd error: bad UDF descriptor" );
+#if 0
+        intf_ErrMsg( "dvd error: bad UDF descriptor" );
+#endif
         return 0;
     }
     if( root_icb.i_partition != i_partition )
     {
-//X        intf_ErrMsg( "dvd error: bad UDF partition" );
+#if 0
+        intf_ErrMsg( "dvd error: bad UDF partition" );
+#endif
         return 0;
     }
   
     /* Find root dir */
     if( !UDFMapICB( root_icb, &i_file_type, &file, partition ) )
     {
-//X        intf_ErrMsg( "dvd error: can't find root dir" );
+#if 0
+        intf_ErrMsg( "dvd error: can't find root dir" );
+#endif
         return 0;
     }
 
     /* root dir should be dir */
     if( i_file_type != 4 )
     {
-//X        intf_ErrMsg( "dvd error: root dir error" );
+#if 0
+        intf_ErrMsg( "dvd error: root dir error" );
+#endif
         return 0;
     }
 
@@ -722,13 +736,17 @@ u32 DVDUDFFindFile( dvdcss_handle dvdhandle, char * psz_path )
     {
         if( !UDFScanDir( file, psz_token, &icb, partition ) )
         {
-//X            intf_ErrMsg( "dvd error: scan dir error" );
+#if 0
+            intf_ErrMsg( "dvd error: scan dir error" );
+#endif
             return 0;
         }
 
         if( !UDFMapICB ( icb, &i_file_type, &file, partition ) )
         {
-//X            intf_ErrMsg( "dvd error: ICB error" );
+#if 0
+            intf_ErrMsg( "dvd error: ICB error" );
+#endif
             return 0;
         }
 
index 791fcbb2e47b03bf8320983094aa9c337c749198..3d87884df1e9490aa6dccf840ad6566cd86a6238 100644 (file)
@@ -2,7 +2,7 @@
  * http.c: HTTP access plug-in
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: http.c,v 1.2 2002/08/07 00:29:36 sam Exp $
+ * $Id: http.c,v 1.3 2002/08/08 00:35:10 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -117,9 +117,10 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
     {
          snprintf( psz_buffer, sizeof(psz_buffer),
                    "%s"
-                   "Range: bytes=%lld-\r\n"
+                   "Range: bytes=%d%d-\r\n"
                    HTTP_USERAGENT HTTP_END,
-                   p_access_data->psz_buffer, i_tell );
+                   p_access_data->psz_buffer,
+                   (u32)(i_tell>>32), (u32)i_tell );
     }
     else
     {
@@ -170,7 +171,7 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
                   strlen("HTTP/1.") ) )
     {
         psz_parser += strlen("HTTP 1.") + 2;
-        i_returncode = atoi( psz_parser );
+        i_returncode = atoi( (char*)psz_parser );
         msg_Dbg( p_input, "HTTP server replied: %i", i_returncode );
         psz_parser += 4;
         for ( i = 0; psz_parser[i] != '\r' || psz_parser[i+1] != '\n'; i++ )
@@ -216,11 +217,11 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
             psz_parser += strlen("Content-Length: ");
             vlc_mutex_lock( &p_input->stream.stream_lock );
 #ifdef HAVE_ATOLL
-            p_input->stream.p_selected_area->i_size = atoll( psz_parser )
+            p_input->stream.p_selected_area->i_size = atoll( (char*)psz_parser )
                                                         + i_tell;
 #else
             /* FIXME : this won't work for 64-bit lengths */
-            p_input->stream.p_selected_area->i_size = atoi( psz_parser )
+            p_input->stream.p_selected_area->i_size = atoi( (char*)psz_parser )
                                                         + i_tell;
 #endif
             vlc_mutex_unlock( &p_input->stream.stream_lock );
diff --git a/modules/access/v4l/.cvsignore b/modules/access/v4l/.cvsignore
new file mode 100644 (file)
index 0000000..435f39e
--- /dev/null
@@ -0,0 +1,4 @@
+.dep
+*.lo
+*.o.*
+*.lo.*
diff --git a/modules/access/v4l/Makefile b/modules/access/v4l/Makefile
new file mode 100644 (file)
index 0000000..b6fbba5
--- /dev/null
@@ -0,0 +1 @@
+v4l_SOURCES = v4l.c
diff --git a/modules/access/v4l/v4l.c b/modules/access/v4l/v4l.c
new file mode 100644 (file)
index 0000000..0cfe12c
--- /dev/null
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ * v4l.c : Video4Linux input module for vlc
+ *****************************************************************************
+ * Copyright (C) 2002 VideoLAN
+ * $Id: v4l.c,v 1.1 2002/08/08 00:35:10 sam Exp $
+ *
+ * Author: 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.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <vlc/vlc.h>
+#include <vlc/input.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+/*****************************************************************************
+ * Local prototypes
+ *****************************************************************************/
+static int  V4lOpen  ( vlc_object_t * );
+static void V4lClose ( vlc_object_t * ); 
+static int  V4lRead  ( input_thread_t *, byte_t *, size_t );
+
+/*****************************************************************************
+ * Module descriptior
+ *****************************************************************************/
+vlc_module_begin();
+    set_description( _("Video4Linux input module") );
+    set_capability( "access", 80 );
+    set_callbacks( V4lOpen, V4lClose );
+vlc_module_end();
+
+static int i_fd;
+
+/*****************************************************************************
+ * V4lOpen: open device
+ *****************************************************************************/
+static int V4lOpen( vlc_object_t *p_this )
+{   
+    input_thread_t * p_input = (input_thread_t *)p_this;
+
+    p_input->pf_read = V4lRead;
+    p_input->pf_seek = NULL;
+    p_input->pf_set_area = NULL;
+    p_input->pf_set_program = NULL;
+
+    vlc_mutex_lock( &p_input->stream.stream_lock );
+    p_input->stream.b_pace_control = 0;
+    p_input->stream.b_seekable = 0;
+    p_input->stream.p_selected_area->i_size = 0;
+    p_input->stream.p_selected_area->i_tell = 0;
+    p_input->stream.i_method = INPUT_METHOD_FILE;
+    vlc_mutex_unlock( &p_input->stream.stream_lock );
+
+    i_fd = open( "/dev/v4l/video0", O_RDWR );
+
+    return 0;
+}
+
+/*****************************************************************************
+ * V4lClose: close device
+ *****************************************************************************/
+static void V4lClose( vlc_object_t *p_this )
+{
+    input_thread_t *   p_input = (input_thread_t *)p_this;
+    //thread_data_t *p_data = (thread_data_t *)p_input->p_access_data;
+
+    //close( p_data->i_handle );
+    close( i_fd );
+    //free( p_data );
+}
+
+/*****************************************************************************
+ * V4lRead: reads from the device into PES packets.
+ *****************************************************************************
+ * Returns -1 in case of error, 0 in case of EOF, otherwise the number of
+ * bytes.
+ *****************************************************************************/
+#define WIDTH 640
+#define HEIGHT 480
+
+static int V4lRead( input_thread_t * p_input, byte_t * p_buffer,
+                    size_t i_len )
+{   
+    struct video_capability vid_caps;
+    struct video_mbuf vid_buf;
+    struct video_mmap vid_mmap;
+
+    char *map = NULL;
+
+    //thread_data_t *     p_data;
+    int i_read = 0;
+
+    if( ioctl( i_fd, VIDIOCGCAP, &vid_caps ) == -1 )
+    {
+        printf("ioctl (VIDIOCGCAP) failed\n");
+        return 0;
+    }
+
+    if( ioctl( i_fd, VIDIOCGMBUF, &vid_buf ) == -1 )
+    {
+        // to do a normal read()
+        map = malloc (WIDTH * HEIGHT * 3);
+        len = read (fd_webcam, map, WIDTH * HEIGHT * 3);
+        if (len <=  0)
+        {
+            free (map);
+            return (NULL);
+        }
+        *size = 0;
+        return (map);
+    }
+
+    //p_data = (thread_data_t *)p_input->p_access_data;
+    return i_read;
+}
+
index e0136c89fd2a7e02cf356edd0c3934b2694527e6..a7a73efd928fce68260b0c40dbbfe0b92f2a28e9 100644 (file)
@@ -2,7 +2,7 @@
  * vcd.c : VCD input module for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: vcd.c,v 1.2 2002/08/07 00:29:36 sam Exp $
+ * $Id: vcd.c,v 1.3 2002/08/08 00:35:10 sam Exp $
  *
  * Author: Johan Bilien <jobi@via.ecp.fr>
  *
@@ -243,7 +243,7 @@ static int VCDOpen( vlc_object_t *p_this )
                            * (off_t)VCD_DATA_SIZE;
 
         /* Number of chapters */
-        area[i]->i_part_nb = 0;   // will be the entry points
+        area[i]->i_part_nb = 0;   /* will be the entry points */
         area[i]->i_part = 1;
 
         area[i]->i_plugin_data = p_vcd->p_sectors[i];
index 441f1f6c51f25dff9b1bc350dd9325dd218de0b7..9a90c0d93d165fc495ec09a85aa6812a4d103945 100644 (file)
@@ -2,7 +2,7 @@
  * trivial.c : trivial mixer plug-in (1 input, no downmixing)
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: trivial.c,v 1.1 2002/08/07 21:36:55 massiot Exp $
+ * $Id: trivial.c,v 1.2 2002/08/08 00:35:10 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -99,10 +99,10 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
     {
         int i_nb_bytes = p_buffer->i_nb_samples * sizeof(u32)
                           * p_input->input.i_channels;
-        char * p_in = (p_input->p_first_byte_to_mix == NULL) ?
-                      p_input->fifo.p_first->p_buffer :
-                      p_input->p_first_byte_to_mix;
-        char * p_out = p_buffer->p_buffer;
+        byte_t * p_in = (p_input->p_first_byte_to_mix == NULL) ?
+                        p_input->fifo.p_first->p_buffer :
+                        p_input->p_first_byte_to_mix;
+        byte_t * p_out = p_buffer->p_buffer;
 
         for ( ; ; )
         {
@@ -161,7 +161,7 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
         for ( ; ; )
         {
             ptrdiff_t i_available_bytes = (p_input->fifo.p_first->p_buffer
-                                           - (char *)p_in)
+                                           - (byte_t *)p_in)
                                            + p_input->fifo.p_first->i_nb_samples
                                               * sizeof(u32)
                                               * p_input->input.i_channels;
@@ -195,7 +195,7 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
                 SparseCopy( p_out, p_in, i_nb_samples,
                             p_aout->mixer.output.i_channels,
                             p_input->input.i_channels );
-                p_input->p_first_byte_to_mix = (char *)p_in
+                p_input->p_first_byte_to_mix = (byte_t *)p_in
                                + i_nb_samples * p_input->input.i_channels
                                   * sizeof(u32);
                 break;
index 8d7302fdf950dd5d71d555db1cabdc462af5d096..352c7385e4e0b72ff3e5e2bfba0f1c4ed53d450a 100644 (file)
@@ -2,7 +2,7 @@
  * oss.c : OSS /dev/dsp module for vlc
  *****************************************************************************
  * Copyright (C) 2000-2002 VideoLAN
- * $Id: oss.c,v 1.1 2002/08/07 21:36:55 massiot Exp $
+ * $Id: oss.c,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -40,6 +40,7 @@
 #endif
 
 #include <vlc/aout.h>
+
 #include "aout_internal.h"
 
 /* SNDCTL_DSP_RESET, SNDCTL_DSP_SETFMT, SNDCTL_DSP_STEREO, SNDCTL_DSP_SPEED,
@@ -62,6 +63,7 @@ struct aout_sys_t
 {
     int                   i_fd;
     volatile vlc_bool_t   b_die;
+    volatile vlc_bool_t   b_initialized;
 };
 
 #define DEFAULT_FRAME_SIZE 2048
@@ -111,7 +113,7 @@ static int Open( vlc_object_t *p_this )
     if( (psz_device = config_GetPsz( p_aout, "dspdev" )) == NULL )
     {
         msg_Err( p_aout, "no audio device given (maybe /dev/dsp ?)" );
-        free( p_aout->p_sys );
+        free( p_sys );
         return -1;
     }
 
@@ -128,16 +130,17 @@ static int Open( vlc_object_t *p_this )
 
     /* Create OSS thread and wait for its readiness. */
     p_sys->b_die = 0;
-    if( vlc_thread_create( p_aout, "aout", OSSThread, VLC_TRUE ) )
+    p_sys->b_initialized = VLC_FALSE;
+    if( vlc_thread_create( p_aout, "aout", OSSThread, VLC_FALSE ) )
     {
-        msg_Err( p_input, "cannot create OSS thread (%s)", strerror(errno) );
-        free( p_aout->p_sys->psz_device );
-        free( p_aout->p_sys );
+        msg_Err( p_aout, "cannot create OSS thread (%s)", strerror(errno) );
+        free( psz_device );
+        free( p_sys );
         return -1;
     }
 
-    p_aout->pf_setformat = SetFormat;
-    p_aout->pf_play = Play;
+    p_aout->output.pf_setformat = SetFormat;
+    p_aout->output.pf_play = Play;
 
     return 0;
 }
@@ -157,6 +160,8 @@ static int SetFormat( aout_instance_t *p_aout )
     int i_rate;
     vlc_bool_t b_stereo;
 
+    p_sys->b_initialized = VLC_FALSE;
+
     /* Reset the DSP device */
     if( ioctl( p_sys->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 )
     {
@@ -203,9 +208,10 @@ static int SetFormat( aout_instance_t *p_aout )
 
     /* Set the output rate */
     i_rate = p_aout->output.output.i_rate;
-    if( ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_SPEED, &i_rate ) < 0 )
+    if( ioctl( p_sys->i_fd, SNDCTL_DSP_SPEED, &i_rate ) < 0 )
     {
-        msg_Err( p_aout, "cannot set audio output rate (%i)", p_aout->i_rate );
+        msg_Err( p_aout, "cannot set audio output rate (%i)",
+                         p_aout->output.output.i_rate );
         return -1;
     }
 
@@ -218,6 +224,8 @@ static int SetFormat( aout_instance_t *p_aout )
 
     p_aout->output.i_nb_samples = DEFAULT_FRAME_SIZE;
 
+    p_sys->b_initialized = VLC_TRUE;
+
     return 0;
 }
 
@@ -240,8 +248,8 @@ static void Close( vlc_object_t * p_this )
     p_sys->b_die = 1;
     vlc_thread_join( p_aout );
 
-    close( p_aout->p_sys->i_fd );
-    free( p_aout->p_sys );
+    close( p_sys->i_fd );
+    free( p_sys );
 }
 
 
@@ -275,7 +283,7 @@ static int OSSThread( aout_instance_t * p_aout )
 
     while ( !p_sys->b_die )
     {
-        int i_bytes_per_sample = aout_FormatToBytes( &p_aout->output.output );
+        int i_bytes_per_sample;
         aout_buffer_t * p_buffer;
         mtime_t next_date;
         int i_tmp;
@@ -285,6 +293,13 @@ static int OSSThread( aout_instance_t * p_aout )
          * is equal to the current date + duration of buffered samples.
          * Order is important here, since GetBufInfo is believed to take
          * more time than mdate(). */
+        if( !p_sys->b_initialized )
+        {
+            msleep( THREAD_SLEEP );
+            continue;
+        }
+
+        i_bytes_per_sample = aout_FormatToBytes( &p_aout->output.output );
         next_date = (mtime_t)GetBufInfo( p_aout ) * 1000000
                       / i_bytes_per_sample
                       / p_aout->output.output.i_rate;
@@ -315,4 +330,6 @@ static int OSSThread( aout_instance_t * p_aout )
             aout_BufferFree( p_buffer );
         }
     }
+
+    return 0;
 }
index 8789a3de6d1f792d404aac06edd5ee178b34dd11..376fb86b0361a6931fc2acb03c267716e673d0cd 100644 (file)
@@ -2,7 +2,7 @@
  * adec.h : A52 decoder interface
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: adec.h,v 1.1 2002/08/04 17:23:42 sam Exp $
+ * $Id: adec.h,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Renaud Dartus <reno@videolan.org>
@@ -68,7 +68,7 @@ typedef struct syncinfo_s {
     /* Frame size in 16 bit words */
     u16 frame_size;
     /* Bit rate in kilobits */
-    //u16 bit_rate;
+    /*u16 bit_rate;*/
 } syncinfo_t;
 
 typedef struct bsi_s {
@@ -267,14 +267,14 @@ typedef struct audblk_s {
         u16 skipl;
 
     /* channel mantissas */
-//      u16 chmant[5][256];
+/*      u16 chmant[5][256]; */
 
     /* coupling mantissas */
     float cpl_flt[ 256 ];
-//      u16 cplmant[256];
+/*      u16 cplmant[256]; */
 
     /* coupling mantissas */
-//      u16 lfemant[7];
+/*      u16 lfemant[7]; */
 
     /* -- Information not in the bitstream, but derived thereof -- */
 
@@ -301,15 +301,15 @@ typedef struct audblk_s {
     u16 cplendmant;
 
     /* Decoded exponent info */
-    u16 fbw_exp[5][256];
-    u16 cpl_exp[256];
-    u16 lfe_exp[7];
+    s16 fbw_exp[5][256];
+    s16 cpl_exp[256];
+    s16 lfe_exp[7];
 
     /* Bit allocation pointer results */
-    u16 fbw_bap[5][256];
+    s16 fbw_bap[5][256];
     /* FIXME?? figure out exactly how many entries there should be (253-37?) */
-    u16 cpl_bap[256];
-    u16 lfe_bap[7];
+    s16 cpl_bap[256];
+    s16 lfe_bap[7];
 } audblk_t;
 
 /* Everything you wanted to know about band structure */
index 4759b0efab5c07c719f506d746905e5822eb3524..b999eb4c7d4b11d7eca9eed86d98094398a557f3 100644 (file)
@@ -2,7 +2,7 @@
  * downmix.h : A52 downmix types
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: downmix.h,v 1.2 2002/08/07 00:29:36 sam Exp $
+ * $Id: downmix.h,v 1.3 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Renaud Dartus <reno@videolan.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-VLC_DECLARE_STRUCT(dm_par_t)
-VLC_DECLARE_STRUCT(downmix_t)
-
-struct dm_par_t
+typedef struct dm_par_t
 {
     float unit;
     float clev;
     float slev;
-};
 
-struct downmix_t
+} dm_par_t;
+
+typedef struct downmix_t
 {
     VLC_COMMON_MEMBERS
 
@@ -45,5 +43,6 @@ struct downmix_t
     void (*pf_downmix_3f_0r_to_2ch)(float *, dm_par_t * dm_par);
     void (*pf_stream_sample_2ch_to_s16)(s16 *, float *left, float *right);
     void (*pf_stream_sample_1ch_to_s16)(s16 *, float *center);
-};
+
+} downmix_t;
 
index 18f1978516d3e73bbbff204b390298c34ae2846d..45a9b317c0d61b6ecb3cfd7d8af5a174d107b8a0 100644 (file)
@@ -2,7 +2,7 @@
  * exponent.h: A52 exponent calculations
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: exponent.h,v 1.1 2002/08/04 17:23:42 sam Exp $
+ * $Id: exponent.h,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Michel Lespinasse <walken@zoy.org>
@@ -59,7 +59,7 @@ static const s16 exps_3[128] =
 
 static inline int exp_unpack_ch( a52dec_t * p_a52dec, u16 type,
                                  u16 expstr, u16 ngrps, u16 initial_exp,
-                                 u16 exps[], u16 * dest )
+                                 u16 exps[], s16 * dest )
 {
     u16 i,j;
     s16 exp_acc;
index f88e596dc9ec924be3dee81c146b4744aaac7f58..8a74039da31ba84e8309166e41e3ad320844c604 100644 (file)
@@ -2,7 +2,7 @@
  * imdct.c: A52 DCT
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: imdct.c,v 1.1 2002/08/04 17:23:42 sam Exp $
+ * $Id: imdct.c,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
@@ -110,10 +110,10 @@ void imdct (a52dec_t * p_a52dec, s16 * buffer)
             case 2:
                 break;
             default:    /* 1/0 */
-//                if (p_a52dec->bsi.acmod == 1)
+/*              if (p_a52dec->bsi.acmod == 1) */
                     center = p_a52dec->samples;
-//                else if (p_a52dec->bsi.acmod == 0)
-//                  center = samples[config.dual_mono_ch_sel];
+/*              else if (p_a52dec->bsi.acmod == 0)
+                  center = samples[config.dual_mono_ch_sel]; */
                 do_imdct(p_a52dec->p_imdct, center, p_a52dec->p_imdct->delay); /* no downmix*/
     
                 p_a52dec->p_downmix->pf_stream_sample_1ch_to_s16 (buffer, center);
index b12921b9f38be7f705ee16cf95fb825bca110d3d..7a37c20c731b38caabdad88acd34d4f383850279 100644 (file)
@@ -2,7 +2,7 @@
  * imdct.h : A52 IMDCT types
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: imdct.h,v 1.2 2002/08/07 00:29:36 sam Exp $
+ * $Id: imdct.h,v 1.3 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Renaud Dartus <reno@videolan.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-VLC_DECLARE_STRUCT(complex_t)
-VLC_DECLARE_STRUCT(imdct_t)
-
-struct complex_t
+typedef struct complex_t
 {
     float real;
     float imag;
-};
+
+} complex_t;
 
 #define N 512
 
+typedef struct imdct_t imdct_t;
+
 struct imdct_t
 {
     VLC_COMMON_MEMBERS
@@ -77,10 +77,13 @@ struct imdct_t
     /* Module used and shortcuts */
     module_t * p_module;
     void (*pf_imdct_init)    ( imdct_t * );
-    //void (*pf_fft_64p) (complex_t *a);
+#if 0
+    void (*pf_fft_64p) (complex_t *a);
+#endif
     void (*pf_imdct_256)     ( imdct_t *, float [], float [] );
     void (*pf_imdct_256_nol) ( imdct_t *, float [], float [] );
     void (*pf_imdct_512)     ( imdct_t *, float [], float [] );
     void (*pf_imdct_512_nol) ( imdct_t *, float [], float [] );
+
 };
 
index 7d8919f06aaf5ebe20b73b2c4b31e68e4505814c..5615cc2d369c2c3d1d5d639224de014e3dc57c2c 100644 (file)
@@ -2,7 +2,7 @@
  * parse.c: A52 parsing procedures
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: parse.c,v 1.1 2002/08/04 17:23:42 sam Exp $
+ * $Id: parse.c,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
@@ -738,8 +738,10 @@ int parse_audblk (a52dec_t * p_a52dec, int blknum)
             if (p_a52dec->audblk.deltbae[i] == DELTA_BIT_NEW)
             {
                 p_a52dec->audblk.deltnseg[i] = GetBits (&p_a52dec->bit_stream,3);
-//                if (p_a52dec->audblk.deltnseg[i] >= 8)
-//                    fprintf (stderr, "parse debug: p_a52dec->audblk.deltnseg[%i] == %i\n", i, p_a52dec->audblk.deltnseg[i]);
+#if 0
+                if (p_a52dec->audblk.deltnseg[i] >= 8)
+                    fprintf (stderr, "parse debug: p_a52dec->audblk.deltnseg[%i] == %i\n", i, p_a52dec->audblk.deltnseg[i]);
+#endif
                 for (j = 0; j < p_a52dec->audblk.deltnseg[i] + 1; j++)
                 {
                     p_a52dec->audblk.deltoffst[i][j] = GetBits (&p_a52dec->bit_stream,5);
index 18ebc778250a3941e8bbc4635547c7e083281418..8f491ef92af136cf740716a25d7469aeafc0c039 100644 (file)
@@ -2,7 +2,7 @@
  * layer1.c: MPEG Layer I audio decoder
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: layer1.c,v 1.1 2002/08/04 17:23:42 sam Exp $
+ * $Id: layer1.c,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
@@ -92,9 +92,7 @@ int adec_layer1_mono( adec_thread_t * p_adec, s16 * buffer )
     float offset[32];
     float sample[32];
 
-    int i_sb;
-    int s;
-    int i_read_bits = 0;
+    unsigned int i_sb, s, i_read_bits = 0;
 
     /*
      * Parse the allocation tables
index eb66972ca23b0b6f375bbd325564619de849c013..2b908582703bbdeb226d99063da2e39546f20f52 100644 (file)
@@ -2,7 +2,7 @@
  * layer2.c: MPEG Layer II audio decoder
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: layer2.c,v 1.1 2002/08/04 17:23:42 sam Exp $
+ * $Id: layer2.c,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
@@ -83,7 +83,7 @@ static int adec_bound_table[4] = { 4, 8, 12, 16 };
 typedef struct
 {
     s8 nbal[32];
-    u8 * alloc[32];
+    s8 * alloc[32];
 } alloc_table_t;
 
 #define L3 -1
@@ -209,7 +209,7 @@ int adec_layer2_mono( adec_thread_t * p_adec, s16 * buffer )
     adec_layer2_get_table (p_adec->header, freq_table, &alloc_table, &sblimit);
 
     /* parse allocation */
-    //sblimit=27;
+    /*sblimit=27;*/
 
     for (sb = 0; sb < sblimit; sb++)
     {
index 553339ac2f912d5b669ac4f77c4c0bb51779e7bd..59a739d4e1313ff86a51e0ccaa5804466c2b3afe 100644 (file)
@@ -2,7 +2,7 @@
  * math.c: Inverse Discrete Cosine Transform and Pulse Code Modulation
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: math.c,v 1.1 2002/08/04 17:23:42 sam Exp $
+ * $Id: math.c,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
@@ -481,12 +481,12 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
                 if ((tmp += *f++ * *v) > 32767)
                 {
                     /* ceiling saturation */
-                    *p_pcm = 0x7FFF;
+                    *p_pcm = 32767; /* 0x7ffff */
                 }
                 else if (tmp < -32768)
                 {
                     /* floor saturation */
-                    *p_pcm = 0x8000;
+                    *p_pcm = -32768; /* 0x8000 */
                 }
                 else
                 {
@@ -518,11 +518,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
                 tmp += *f++ * *v--;
                 if ((tmp += *f++ * *v) > 32767)
                 {
-                    *p_pcm = 0x7FFF;
+                    *p_pcm = 32767; /* 0x7ffff */
                 }
                 else if (tmp < -32768)
                 {
-                    *p_pcm = 0x8000;
+                    *p_pcm = -32768; /* 0x8000 */
                 }
                 else
                 {
@@ -554,11 +554,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
                 tmp += *f++ * *v--;
                 if ((tmp += *f++ * *v) > 32767)
                 {
-                    *p_pcm = 0x7FFF;
+                    *p_pcm = 32767; /* 0x7ffff */
                 }
                 else if (tmp < -32768)
                 {
-                    *p_pcm = 0x8000;
+                    *p_pcm = -32768; /* 0x8000 */
                 }
                 else
                 {
@@ -590,11 +590,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
                 tmp += *f++ * *v--;
                 if ((tmp += *f++ * *v) > 32767)
                 {
-                    *p_pcm = 0x7FFF;
+                    *p_pcm = 32767; /* 0x7ffff */
                 }
                 else if (tmp < -32768)
                 {
-                    *p_pcm = 0x8000;
+                    *p_pcm = -32768; /* 0x8000 */
                 }
                 else
                 {
@@ -626,11 +626,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
                 tmp += *f++ * *v--;
                 if ((tmp += *f++ * *v) > 32767)
                 {
-                    *p_pcm = 0x7FFF;
+                    *p_pcm = 32767; /* 0x7ffff */
                 }
                 else if (tmp < -32768)
                 {
-                    *p_pcm = 0x8000;
+                    *p_pcm = -32768; /* 0x8000 */
                 }
                 else
                 {
@@ -662,11 +662,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
                 tmp += *f++ * *v--;
                 if ((tmp += *f++ * *v) > 32767)
                 {
-                    *p_pcm = 0x7FFF;
+                    *p_pcm = 32767; /* 0x7ffff */
                 }
                 else if (tmp < -32768)
                 {
-                    *p_pcm = 0x8000;
+                    *p_pcm = -32768; /* 0x8000 */
                 }
                 else
                 {
@@ -698,11 +698,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
                 tmp += *f++ * *v--;
                 if ((tmp += *f++ * *v) > 32767)
                 {
-                    *p_pcm = 0x7FFF;
+                    *p_pcm = 32767; /* 0x7ffff */
                 }
                 else if (tmp < -32768)
                 {
-                    *p_pcm = 0x8000;
+                    *p_pcm = -32768; /* 0x8000 */
                 }
                 else
                 {
@@ -734,11 +734,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
                 tmp += *f++ * *v--;
                 if ((tmp += *f++ * *v) > 32767)
                 {
-                    *p_pcm = 0x7FFF;
+                    *p_pcm = 32767; /* 0x7ffff */
                 }
                 else if (tmp < -32768)
                 {
-                    *p_pcm = 0x8000;
+                    *p_pcm = -32768; /* 0x8000 */
                 }
                 else
                 {
@@ -770,11 +770,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
                 tmp += *f++ * *v--;
                 if ((tmp += *f++ * *v) > 32767)
                 {
-                    *p_pcm = 0x7FFF;
+                    *p_pcm = 32767; /* 0x7ffff */
                 }
                 else if (tmp < -32768)
                 {
-                    *p_pcm = 0x8000;
+                    *p_pcm = -32768; /* 0x8000 */
                 }
                 else
                 {
@@ -806,11 +806,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
                 tmp += *f++ * *v--;
                 if ((tmp += *f++ * *v) > 32767)
                 {
-                    *p_pcm = 0x7FFF;
+                    *p_pcm = 32767; /* 0x7ffff */
                 }
                 else if (tmp < -32768)
                 {
-                    *p_pcm = 0x8000;
+                    *p_pcm = -32768; /* 0x8000 */
                 }
                 else
                 {
@@ -842,11 +842,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
                 tmp += *f++ * *v--;
                 if ((tmp += *f++ * *v) > 32767)
                 {
-                    *p_pcm = 0x7FFF;
+                    *p_pcm = 32767; /* 0x7ffff */
                 }
                 else if (tmp < -32768)
                 {    
-                    *p_pcm = 0x8000;
+                    *p_pcm = -32768; /* 0x8000 */
                 }
                 else
                 {
@@ -878,11 +878,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
                 tmp += *f++ * *v--;
                 if ((tmp += *f++ * *v) > 32767)
                 {
-                    *p_pcm = 0x7FFF;
+                    *p_pcm = 32767; /* 0x7ffff */
                 }
                 else if (tmp < -32768)
                 {
-                    *p_pcm = 0x8000;
+                    *p_pcm = -32768; /* 0x8000 */
                 }
                 else
                 {
@@ -914,11 +914,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
                 tmp += *f++ * *v--;
                 if ((tmp += *f++ * *v) > 32767)
                 {
-                    *p_pcm = 0x7FFF;
+                    *p_pcm = 32767; /* 0x7ffff */
                 }
                 else if (tmp < -32768)
                 {
-                    *p_pcm = 0x8000;
+                    *p_pcm = -32768; /* 0x8000 */
                 }
                 else
                 {
@@ -950,11 +950,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
                 tmp += *f++ * *v--;
                 if ((tmp += *f++ * *v) > 32767)
                 {
-                    *p_pcm = 0x7FFF;
+                    *p_pcm = 32767; /* 0x7ffff */
                 }
                 else if (tmp < -32768)
                 {
-                    *p_pcm = 0x8000;
+                    *p_pcm = -32768; /* 0x8000 */
                 }
                 else
                 {
@@ -986,11 +986,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
                 v += 15;
                 if ((tmp += *f++ * *v) > 32767)
                 {
-                    *p_pcm = 0x7FFF;
+                    *p_pcm = 32767; /* 0x7ffff */
                 }
                 else if (tmp < -32768)
                 {
-                    *p_pcm = 0x8000;
+                    *p_pcm = -32768; /* 0x8000 */
                 }
                 else
                 {
@@ -1021,11 +1021,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
                 tmp += *f++ * *v--;
                 if ((tmp += *f++ * *v) > 32767)
                 {
-                    *p_pcm = 0x7FFF;
+                    *p_pcm = 32767; /* 0x7ffff */
                 }
                 else if (tmp < -32768)
                 {
-                    *p_pcm = 0x8000;
+                    *p_pcm = -32768; /* 0x8000 */
                 }
                 else
                 {
index f545d716bbf77c8c3c62db5e400a1da071538362..2eb33275f45df602be1e71a2d3b2f24011aedc24 100644 (file)
@@ -2,7 +2,7 @@
  * blocks.c : blocks parsing
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: blocks.c,v 1.2 2002/08/04 18:39:41 sam Exp $
+ * $Id: blocks.c,v 1.3 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Michel Lespinasse <walken@zoy.org>
  *          Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
@@ -161,9 +161,7 @@ static inline int GetChromaDCDiff( vpar_thread_t * p_vpar )
 
 #define SATURATE(val)                                                       \
     if ((u32)(val + 2048) > 4095)                                           \
-    {                                                                       \
-       val = (val > 0) ? 2047 : -2048;                                      \
-    }
+       val = (val > 0) ? 2047 : -2048
 
 /*****************************************************************************
  * MPEG2IntraB14 : Decode an intra block according to ISO/IEC 13818-2 table B14
@@ -969,23 +967,23 @@ static inline void PSZ_NAME( vpar_thread_t * p_vpar, macroblock_t * p_mb )  \
     p_mb->p_v_data = p_mb->pp_dest[2] + (p_vpar->mb.i_offset                \
                             >> p_vpar->sequence.b_chroma_h_subsampled);     \
                                                                             \
-    DECODE_LUMABLOCK( 0, PF_MBFUNC );                                       \
-    DECODE_LUMABLOCK( 1, PF_MBFUNC );                                       \
-    DECODE_LUMABLOCK( 2, PF_MBFUNC );                                       \
-    DECODE_LUMABLOCK( 3, PF_MBFUNC );                                       \
+    DECODE_LUMABLOCK( 0, PF_MBFUNC )                                        \
+    DECODE_LUMABLOCK( 1, PF_MBFUNC )                                        \
+    DECODE_LUMABLOCK( 2, PF_MBFUNC )                                        \
+    DECODE_LUMABLOCK( 3, PF_MBFUNC )                                        \
                                                                             \
     do                                                                      \
     {                                                                       \
-        DECODE_CHROMABLOCK( i_b, PF_MBFUNC, 1 );                            \
-        DECODE_CHROMABLOCK( i_b + 1, PF_MBFUNC, 2 );                        \
+        DECODE_CHROMABLOCK( i_b, PF_MBFUNC, 1 )                             \
+        DECODE_CHROMABLOCK( i_b + 1, PF_MBFUNC, 2 )                         \
         i_b += 2;                                                           \
     }                                                                       \
     while( i_b < 4 + p_vpar->sequence.i_chroma_nb_blocks );                 \
 }
 
-DECLARE_INTRAMB( MPEG1IntraMB, MPEG1Intra );
-DECLARE_INTRAMB( MPEG2IntraB14MB, MPEG2IntraB14 );
-DECLARE_INTRAMB( MPEG2IntraB15MB, MPEG2IntraB15 );
+DECLARE_INTRAMB( MPEG1IntraMB, MPEG1Intra )
+DECLARE_INTRAMB( MPEG2IntraB14MB, MPEG2IntraB14 )
+DECLARE_INTRAMB( MPEG2IntraB15MB, MPEG2IntraB15 )
 
 #undef DECLARE_INTRAMB
 #undef DECODE_LUMABLOCK
@@ -1021,22 +1019,22 @@ static inline void PSZ_NAME( vpar_thread_t * p_vpar, macroblock_t * p_mb )  \
     p_mb->p_v_data = p_mb->pp_dest[2] + (p_vpar->mb.i_offset                \
                             >> p_vpar->sequence.b_chroma_h_subsampled);     \
                                                                             \
-    DECODE_LUMABLOCK( 0, PF_MBFUNC );                                       \
-    DECODE_LUMABLOCK( 1, PF_MBFUNC );                                       \
-    DECODE_LUMABLOCK( 2, PF_MBFUNC );                                       \
-    DECODE_LUMABLOCK( 3, PF_MBFUNC );                                       \
+    DECODE_LUMABLOCK( 0, PF_MBFUNC )                                        \
+    DECODE_LUMABLOCK( 1, PF_MBFUNC )                                        \
+    DECODE_LUMABLOCK( 2, PF_MBFUNC )                                        \
+    DECODE_LUMABLOCK( 3, PF_MBFUNC )                                        \
                                                                             \
     do                                                                      \
     {                                                                       \
-        DECODE_CHROMABLOCK( i_b, PF_MBFUNC );                               \
-        DECODE_CHROMABLOCK( i_b + 1, PF_MBFUNC );                           \
+        DECODE_CHROMABLOCK( i_b, PF_MBFUNC )                                \
+        DECODE_CHROMABLOCK( i_b + 1, PF_MBFUNC )                            \
         i_b += 2;                                                           \
     }                                                                       \
     while( i_b < 4 + p_vpar->sequence.i_chroma_nb_blocks );                 \
 }
 
-DECLARE_NONINTRAMB( MPEG1NonIntraMB, MPEG1NonIntra );
-DECLARE_NONINTRAMB( MPEG2NonIntraMB, MPEG2NonIntra );
+DECLARE_NONINTRAMB( MPEG1NonIntraMB, MPEG1NonIntra )
+DECLARE_NONINTRAMB( MPEG2NonIntraMB, MPEG2NonIntra )
 
 #undef DECLARE_NONINTRAMB
 #undef DECODE_LUMABLOCK
@@ -1147,7 +1145,7 @@ static inline int GetDMV( vpar_thread_t * p_vpar )
         p_m_inner->i_height = i_hei;                                        \
         p_m_inner->b_second_half = b_s_half;                                \
         p_mb->i_nb_motions++;                                               \
-    } while( 0 );
+    } while( 0 )
 
 /* MPEG-1 predictions. */
 
@@ -1198,7 +1196,7 @@ static void MotionMPEG1Reuse( vpar_thread_t * p_vpar,
         i_motion_y <<= 1;
     }
 
-     MOTION_BLOCK( b_average, p_motion->ppi_pmv[0][0], p_motion->ppi_pmv[0][1],
+    MOTION_BLOCK( b_average, p_motion->ppi_pmv[0][0], p_motion->ppi_pmv[0][1],
                   i_offset, p_motion->pppi_ref[0], i_offset, i_width, 16, 0 );
 }
 
@@ -1981,7 +1979,7 @@ static inline void ParseSlice( vpar_thread_t * p_vpar,
                     /* Non-intra MB without forward mv in a P picture. */
                     p_f_motion->ppi_pmv[0][0] = p_f_motion->ppi_pmv[0][1] = 0;
                     p_f_motion->ppi_pmv[1][0] = p_f_motion->ppi_pmv[1][1] = 0;
-                    MOTION( MotionFrameZero, MB_MOTION_FORWARD );
+                    MOTION( MotionFrameZero, MB_MOTION_FORWARD )
                 }
             }
             else if( i_structure == FRAME_STRUCTURE )
@@ -1989,22 +1987,22 @@ static inline void ParseSlice( vpar_thread_t * p_vpar,
                 switch( i_mb_modes & MOTION_TYPE_MASK )
                 {
                 case MC_FRAME:
-                    MOTION( MotionFrameFrame, i_mb_modes );
+                    MOTION( MotionFrameFrame, i_mb_modes )
                     break;
 
                 case MC_FIELD:
-                    MOTION( MotionFrameField, i_mb_modes );
+                    MOTION( MotionFrameField, i_mb_modes )
                     break;
 
                 case MC_DMV:
-                    MOTION( MotionFrameDMV, MB_MOTION_FORWARD );
+                    MOTION( MotionFrameDMV, MB_MOTION_FORWARD )
                     break;
 
                 case 0:
                     /* Non-intra MB without forward mv in a P picture. */
                     p_f_motion->ppi_pmv[0][0] = p_f_motion->ppi_pmv[0][1] = 0;
                     p_f_motion->ppi_pmv[1][0] = p_f_motion->ppi_pmv[1][1] = 0;
-                    MOTION( MotionFrameZero, MB_MOTION_FORWARD );
+                    MOTION( MotionFrameZero, MB_MOTION_FORWARD )
                 }
             }
             else
@@ -2013,22 +2011,22 @@ static inline void ParseSlice( vpar_thread_t * p_vpar,
                 switch( i_mb_modes & MOTION_TYPE_MASK )
                 {
                 case MC_FIELD:
-                    MOTION( MotionFieldField, i_mb_modes );
+                    MOTION( MotionFieldField, i_mb_modes )
                     break;
 
                 case MC_16X8:
-                    MOTION( MotionField16x8, i_mb_modes );
+                    MOTION( MotionField16x8, i_mb_modes )
                     break;
 
                 case MC_DMV:
-                    MOTION( MotionFieldDMV, i_mb_modes );
+                    MOTION( MotionFieldDMV, i_mb_modes )
                     break;
 
                 case 0:
                     /* Non-intra MB without forward mv in a P picture. */
                     p_f_motion->ppi_pmv[0][0] = p_f_motion->ppi_pmv[0][1] = 0;
                     p_f_motion->ppi_pmv[1][0] = p_f_motion->ppi_pmv[1][1] = 0;
-                    MOTION( MotionFieldZero, MB_MOTION_FORWARD );
+                    MOTION( MotionFieldZero, MB_MOTION_FORWARD )
                 }
             }
 
@@ -2102,11 +2100,11 @@ static inline void ParseSlice( vpar_thread_t * p_vpar,
 
                     if( i_structure == FRAME_STRUCTURE )
                     {
-                        MOTION( MotionFrameZero, MB_MOTION_FORWARD );
+                        MOTION( MotionFrameZero, MB_MOTION_FORWARD )
                     }
                     else
                     {
-                        MOTION( MotionFieldZero, MB_MOTION_FORWARD );
+                        MOTION( MotionFieldZero, MB_MOTION_FORWARD )
                     }
 
                     p_vpar->pool.pf_decode_mb( &p_vpar->pool, p_mb );
@@ -2127,15 +2125,15 @@ static inline void ParseSlice( vpar_thread_t * p_vpar,
 
                     if( !b_mpeg2 )
                     {
-                        MOTION( MotionMPEG1Reuse, i_mb_modes );
+                        MOTION( MotionMPEG1Reuse, i_mb_modes )
                     }
                     else if( i_structure == FRAME_STRUCTURE )
                     {
-                        MOTION( MotionFrameReuse, i_mb_modes );
+                        MOTION( MotionFrameReuse, i_mb_modes )
                     }
                     else
                     {
-                        MOTION( MotionFieldReuse, i_mb_modes );
+                        MOTION( MotionFieldReuse, i_mb_modes )
                     }
 
                     p_vpar->pool.pf_decode_mb( &p_vpar->pool, p_mb );
@@ -2181,23 +2179,23 @@ void FUNCNAME( vpar_thread_t * p_vpar )                                     \
 }
 
 DECLARE_PICD( vpar_PictureDataGENERIC, p_vpar->sequence.b_mpeg2,
-              p_vpar->picture.i_coding_type, p_vpar->picture.i_structure );
+              p_vpar->picture.i_coding_type, p_vpar->picture.i_structure )
 #if (VPAR_OPTIM_LEVEL > 0)
-DECLARE_PICD( vpar_PictureData2IF, 1, I_CODING_TYPE, FRAME_STRUCTURE );
-DECLARE_PICD( vpar_PictureData2PF, 1, P_CODING_TYPE, FRAME_STRUCTURE );
-DECLARE_PICD( vpar_PictureData2BF, 1, B_CODING_TYPE, FRAME_STRUCTURE );
+DECLARE_PICD( vpar_PictureData2IF, 1, I_CODING_TYPE, FRAME_STRUCTURE )
+DECLARE_PICD( vpar_PictureData2PF, 1, P_CODING_TYPE, FRAME_STRUCTURE )
+DECLARE_PICD( vpar_PictureData2BF, 1, B_CODING_TYPE, FRAME_STRUCTURE )
 #endif
 #if (VPAR_OPTIM_LEVEL > 1)
-DECLARE_PICD( vpar_PictureData2IT, 1, I_CODING_TYPE, TOP_FIELD );
-DECLARE_PICD( vpar_PictureData2PT, 1, P_CODING_TYPE, TOP_FIELD );
-DECLARE_PICD( vpar_PictureData2BT, 1, B_CODING_TYPE, TOP_FIELD );
-DECLARE_PICD( vpar_PictureData2IB, 1, I_CODING_TYPE, BOTTOM_FIELD );
-DECLARE_PICD( vpar_PictureData2PB, 1, P_CODING_TYPE, BOTTOM_FIELD );
-DECLARE_PICD( vpar_PictureData2BB, 1, B_CODING_TYPE, BOTTOM_FIELD );
-DECLARE_PICD( vpar_PictureData1I, 0, I_CODING_TYPE, FRAME_STRUCTURE );
-DECLARE_PICD( vpar_PictureData1P, 0, P_CODING_TYPE, FRAME_STRUCTURE );
-DECLARE_PICD( vpar_PictureData1B, 0, B_CODING_TYPE, FRAME_STRUCTURE );
-DECLARE_PICD( vpar_PictureData1D, 0, D_CODING_TYPE, FRAME_STRUCTURE );
+DECLARE_PICD( vpar_PictureData2IT, 1, I_CODING_TYPE, TOP_FIELD )
+DECLARE_PICD( vpar_PictureData2PT, 1, P_CODING_TYPE, TOP_FIELD )
+DECLARE_PICD( vpar_PictureData2BT, 1, B_CODING_TYPE, TOP_FIELD )
+DECLARE_PICD( vpar_PictureData2IB, 1, I_CODING_TYPE, BOTTOM_FIELD )
+DECLARE_PICD( vpar_PictureData2PB, 1, P_CODING_TYPE, BOTTOM_FIELD )
+DECLARE_PICD( vpar_PictureData2BB, 1, B_CODING_TYPE, BOTTOM_FIELD )
+DECLARE_PICD( vpar_PictureData1I, 0, I_CODING_TYPE, FRAME_STRUCTURE )
+DECLARE_PICD( vpar_PictureData1P, 0, P_CODING_TYPE, FRAME_STRUCTURE )
+DECLARE_PICD( vpar_PictureData1B, 0, B_CODING_TYPE, FRAME_STRUCTURE )
+DECLARE_PICD( vpar_PictureData1D, 0, D_CODING_TYPE, FRAME_STRUCTURE )
 #endif
 
 #undef DECLARE_PICD
index 6ed4f8120eec69b9ab7489a38e9a9f0d6ae43aa6..96397f48228f1b3cedfd4b1d1ad548fc487d55c9 100644 (file)
@@ -2,7 +2,7 @@
  * video_decoder.c : video decoder thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: decoder.c,v 1.2 2002/08/04 18:39:41 sam Exp $
+ * $Id: decoder.c,v 1.3 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Lespinasse <walken@zoy.org>
@@ -218,7 +218,7 @@ static inline void MotionBlock( vdec_pool_t * p_pool, vlc_bool_t b_average,
 #define DECODE_NONINTRA_BLOCK( i_b, p_dest )                                \
     if( p_mb->i_coded_block_pattern & (1 << (11 - (i_b))) )                 \
     {                                                                       \
-        DECODE_INTRA_BLOCK( i_b, p_dest );                                  \
+        DECODE_INTRA_BLOCK( i_b, p_dest )                                   \
     }
 
 #define DECLARE_DECODEMB( PSZ_NAME, I_CHROMA )                              \
@@ -265,28 +265,28 @@ void PSZ_NAME ( vdec_thread_t *p_vdec, macroblock_t * p_mb )                \
          * adding prediction and coefficient data (ISO/IEC                  \
          * 13818-2 section 7.6.8)                                           \
          */                                                                 \
-        DECODE_NONINTRA_BLOCK( 0, p_mb->p_y_data );                         \
-        DECODE_NONINTRA_BLOCK( 1, p_mb->p_y_data + 8 );                     \
-        DECODE_NONINTRA_BLOCK( 2, p_mb->p_y_data + i_lum_dct_offset );      \
-        DECODE_NONINTRA_BLOCK( 3, p_mb->p_y_data + i_lum_dct_offset + 8 );  \
+        DECODE_NONINTRA_BLOCK( 0, p_mb->p_y_data )                          \
+        DECODE_NONINTRA_BLOCK( 1, p_mb->p_y_data + 8 )                      \
+        DECODE_NONINTRA_BLOCK( 2, p_mb->p_y_data + i_lum_dct_offset )       \
+        DECODE_NONINTRA_BLOCK( 3, p_mb->p_y_data + i_lum_dct_offset + 8 )   \
         if( I_CHROMA != CHROMA_NONE )                                       \
         {                                                                   \
-            DECODE_NONINTRA_BLOCK( 4, p_mb->p_u_data );                     \
-            DECODE_NONINTRA_BLOCK( 5, p_mb->p_v_data );                     \
+            DECODE_NONINTRA_BLOCK( 4, p_mb->p_u_data )                      \
+            DECODE_NONINTRA_BLOCK( 5, p_mb->p_v_data )                      \
             if( I_CHROMA != CHROMA_420 )                                    \
             {                                                               \
                 DECODE_NONINTRA_BLOCK( 6, p_mb->p_u_data                    \
-                                           + i_chrom_dct_offset );          \
+                                           + i_chrom_dct_offset )           \
                 DECODE_NONINTRA_BLOCK( 7, p_mb->p_v_data                    \
-                                           + i_chrom_dct_offset );          \
+                                           + i_chrom_dct_offset )           \
                 if( I_CHROMA == CHROMA_444 )                                \
                 {                                                           \
-                    DECODE_NONINTRA_BLOCK( 8, p_mb->p_u_data + 8 );         \
-                    DECODE_NONINTRA_BLOCK( 9, p_mb->p_v_data + 8 );         \
+                    DECODE_NONINTRA_BLOCK( 8, p_mb->p_u_data + 8 )          \
+                    DECODE_NONINTRA_BLOCK( 9, p_mb->p_v_data + 8 )          \
                     DECODE_NONINTRA_BLOCK( 10, p_mb->p_u_data + 8           \
-                                           + i_chrom_dct_offset );          \
+                                           + i_chrom_dct_offset )           \
                     DECODE_NONINTRA_BLOCK( 11, p_mb->p_v_data + 8           \
-                                           + i_chrom_dct_offset );          \
+                                           + i_chrom_dct_offset )           \
                 }                                                           \
             }                                                               \
         }                                                                   \
@@ -294,38 +294,38 @@ void PSZ_NAME ( vdec_thread_t *p_vdec, macroblock_t * p_mb )                \
     else                                                                    \
     {                                                                       \
         /* Intra macroblock */                                              \
-        DECODE_INTRA_BLOCK( 0, p_mb->p_y_data );                            \
-        DECODE_INTRA_BLOCK( 1, p_mb->p_y_data + 8 );                        \
-        DECODE_INTRA_BLOCK( 2, p_mb->p_y_data + i_lum_dct_offset );         \
-        DECODE_INTRA_BLOCK( 3, p_mb->p_y_data + i_lum_dct_offset + 8 );     \
+        DECODE_INTRA_BLOCK( 0, p_mb->p_y_data )                             \
+        DECODE_INTRA_BLOCK( 1, p_mb->p_y_data + 8 )                         \
+        DECODE_INTRA_BLOCK( 2, p_mb->p_y_data + i_lum_dct_offset )          \
+        DECODE_INTRA_BLOCK( 3, p_mb->p_y_data + i_lum_dct_offset + 8 )      \
         if( I_CHROMA != CHROMA_NONE )                                       \
         {                                                                   \
-            DECODE_INTRA_BLOCK( 4, p_mb->p_u_data );                        \
-            DECODE_INTRA_BLOCK( 5, p_mb->p_v_data );                        \
+            DECODE_INTRA_BLOCK( 4, p_mb->p_u_data )                         \
+            DECODE_INTRA_BLOCK( 5, p_mb->p_v_data )                         \
             if( I_CHROMA != CHROMA_420 )                                    \
             {                                                               \
                 DECODE_INTRA_BLOCK( 6, p_mb->p_u_data                       \
-                                        + i_chrom_dct_offset );             \
+                                        + i_chrom_dct_offset )              \
                 DECODE_INTRA_BLOCK( 7, p_mb->p_v_data                       \
-                                        + i_chrom_dct_offset );             \
+                                        + i_chrom_dct_offset )              \
                 if( I_CHROMA == CHROMA_444 )                                \
                 {                                                           \
-                    DECODE_INTRA_BLOCK( 8, p_mb->p_u_data + 8 );            \
-                    DECODE_INTRA_BLOCK( 9, p_mb->p_v_data + 8 );            \
+                    DECODE_INTRA_BLOCK( 8, p_mb->p_u_data + 8 )             \
+                    DECODE_INTRA_BLOCK( 9, p_mb->p_v_data + 8 )             \
                     DECODE_INTRA_BLOCK( 10, p_mb->p_u_data + 8              \
-                                           + i_chrom_dct_offset );          \
+                                           + i_chrom_dct_offset )           \
                     DECODE_INTRA_BLOCK( 11, p_mb->p_v_data + 8              \
-                                           + i_chrom_dct_offset );          \
+                                           + i_chrom_dct_offset )           \
                 }                                                           \
             }                                                               \
         }                                                                   \
     }                                                                       \
 }
 
-DECLARE_DECODEMB( vdec_DecodeMacroblockBW, CHROMA_NONE );
-DECLARE_DECODEMB( vdec_DecodeMacroblock420, CHROMA_420 );
-DECLARE_DECODEMB( vdec_DecodeMacroblock422, CHROMA_422 );
-DECLARE_DECODEMB( vdec_DecodeMacroblock444, CHROMA_444 );
+DECLARE_DECODEMB( vdec_DecodeMacroblockBW, CHROMA_NONE )
+DECLARE_DECODEMB( vdec_DecodeMacroblock420, CHROMA_420 )
+DECLARE_DECODEMB( vdec_DecodeMacroblock422, CHROMA_422 )
+DECLARE_DECODEMB( vdec_DecodeMacroblock444, CHROMA_444 )
 
 #undef DECLARE_DECODEMB
 
index a3d0d42178cd0b3d5736f1a8fd6881991fa158e6..9b2a0cdbb9856336c767a820e901f2e7a139c51c 100644 (file)
@@ -2,7 +2,7 @@
  * decoder.h : video decoder thread
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: decoder.h,v 1.2 2002/08/07 00:29:36 sam Exp $
+ * $Id: decoder.h,v 1.3 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
  
-VLC_DECLARE_STRUCT(vpar_thread_t)
-VLC_DECLARE_STRUCT(vdec_thread_t)
-VLC_DECLARE_STRUCT(vdec_pool_t)
+typedef struct vpar_thread_t vpar_thread_t;
+typedef struct vdec_pool_t vdec_pool_t;
 
 /*****************************************************************************
  * vdec_thread_t: video decoder thread descriptor
  *****************************************************************************/
-struct vdec_thread_t
+typedef struct vdec_thread_t
 {
     VLC_COMMON_MEMBERS
 
@@ -37,7 +36,8 @@ struct vdec_thread_t
 
     /* Input properties */
     vdec_pool_t * p_pool;
-};
+
+} vdec_thread_t;
 
 /*****************************************************************************
  * Prototypes
index d5b40471961be812f6c75eeaf32ce2fbf9aa5f15..3d2c8c4c2ae40e93855c39b2f5664b366af44aec 100644 (file)
@@ -2,7 +2,7 @@
  * idctmmx.c : MMX IDCT module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: idctmmx.c,v 1.1 2002/08/04 17:23:42 sam Exp $
+ * $Id: idctmmx.c,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
@@ -88,118 +88,118 @@ static void NormScan( u8 ppi_scan[2][64] )
 
 static inline void RowHead( dctelem_t * row, int offset, dctelem_t * table )
 {
-    movq_m2r (*(row+offset), mm2);      // mm2 = x6 x4 x2 x0
+    movq_m2r (*(row+offset), mm2);      /* mm2 = x6 x4 x2 x0 */
 
-    movq_m2r (*(row+offset+4), mm5);    // mm5 = x7 x5 x3 x1
-    movq_r2r (mm2, mm0);                // mm0 = x6 x4 x2 x0
+    movq_m2r (*(row+offset+4), mm5);    /* mm5 = x7 x5 x3 x1 */
+    movq_r2r (mm2, mm0);                /* mm0 = x6 x4 x2 x0 */
 
-    movq_m2r (*table, mm3);             // mm3 = C6 C4 C2 C4
-    movq_r2r (mm5, mm6);                // mm6 = x7 x5 x3 x1
+    movq_m2r (*table, mm3);             /* mm3 = C6 C4 C2 C4 */
+    movq_r2r (mm5, mm6);                /* mm6 = x7 x5 x3 x1 */
 
-    punpckldq_r2r (mm0, mm0);           // mm0 = x2 x0 x2 x0
+    punpckldq_r2r (mm0, mm0);           /* mm0 = x2 x0 x2 x0 */
 
-    movq_m2r (*(table+4), mm4);         // mm4 = -C2 -C4 C6 C4
-    pmaddwd_r2r (mm0, mm3);             // mm3 = C4*x0+C6*x2 C4*x0+C2*x2
+    movq_m2r (*(table+4), mm4);         /* mm4 = -C2 -C4 C6 C4 */
+    pmaddwd_r2r (mm0, mm3);             /* mm3 = C4*x0+C6*x2 C4*x0+C2*x2 */
 
-    movq_m2r (*(table+8), mm1);         // mm1 = -C7 C3 C3 C1
-    punpckhdq_r2r (mm2, mm2);           // mm2 = x6 x4 x6 x4
+    movq_m2r (*(table+8), mm1);         /* mm1 = -C7 C3 C3 C1 */
+    punpckhdq_r2r (mm2, mm2);           /* mm2 = x6 x4 x6 x4 */
 }
 
 static inline void Row( dctelem_t * table, s32 * rounder )
 {
-    pmaddwd_r2r (mm2, mm4);             // mm4 = -C4*x4-C2*x6 C4*x4+C6*x6
-    punpckldq_r2r (mm5, mm5);           // mm5 = x3 x1 x3 x1
+    pmaddwd_r2r (mm2, mm4);             /* mm4 = -C4*x4-C2*x6 C4*x4+C6*x6 */
+    punpckldq_r2r (mm5, mm5);           /* mm5 = x3 x1 x3 x1 */
 
-    pmaddwd_m2r (*(table+16), mm0);     // mm0 = C4*x0-C2*x2 C4*x0-C6*x2
-    punpckhdq_r2r (mm6, mm6);           // mm6 = x7 x5 x7 x5
+    pmaddwd_m2r (*(table+16), mm0);     /* mm0 = C4*x0-C2*x2 C4*x0-C6*x2 */
+    punpckhdq_r2r (mm6, mm6);           /* mm6 = x7 x5 x7 x5 */
 
-    movq_m2r (*(table+12), mm7);        // mm7 = -C5 -C1 C7 C5
-    pmaddwd_r2r (mm5, mm1);             // mm1 = C3*x1-C7*x3 C1*x1+C3*x3
+    movq_m2r (*(table+12), mm7);        /* mm7 = -C5 -C1 C7 C5 */
+    pmaddwd_r2r (mm5, mm1);             /* mm1 = C3*x1-C7*x3 C1*x1+C3*x3 */
 
-    paddd_m2r (*rounder, mm3);          // mm3 += rounder
-    pmaddwd_r2r (mm6, mm7);             // mm7 = -C1*x5-C5*x7 C5*x5+C7*x7
+    paddd_m2r (*rounder, mm3);          /* mm3 += rounder */
+    pmaddwd_r2r (mm6, mm7);             /* mm7 = -C1*x5-C5*x7 C5*x5+C7*x7 */
 
-    pmaddwd_m2r (*(table+20), mm2);     // mm2 = C4*x4-C6*x6 -C4*x4+C2*x6
-    paddd_r2r (mm4, mm3);               // mm3 = a1 a0 + rounder
+    pmaddwd_m2r (*(table+20), mm2);     /* mm2 = C4*x4-C6*x6 -C4*x4+C2*x6 */
+    paddd_r2r (mm4, mm3);               /* mm3 = a1 a0 + rounder */
 
-    pmaddwd_m2r (*(table+24), mm5);     // mm5 = C7*x1-C5*x3 C5*x1-C1*x3
-    movq_r2r (mm3, mm4);                // mm4 = a1 a0 + rounder
+    pmaddwd_m2r (*(table+24), mm5);     /* mm5 = C7*x1-C5*x3 C5*x1-C1*x3 */
+    movq_r2r (mm3, mm4);                /* mm4 = a1 a0 + rounder */
 
-    pmaddwd_m2r (*(table+28), mm6);     // mm6 = C3*x5-C1*x7 C7*x5+C3*x7
-    paddd_r2r (mm7, mm1);               // mm1 = b1 b0
+    pmaddwd_m2r (*(table+28), mm6);     /* mm6 = C3*x5-C1*x7 C7*x5+C3*x7 */
+    paddd_r2r (mm7, mm1);               /* mm1 = b1 b0 */
 
-    paddd_m2r (*rounder, mm0);          // mm0 += rounder
-    psubd_r2r (mm1, mm3);               // mm3 = a1-b1 a0-b0 + rounder
+    paddd_m2r (*rounder, mm0);          /* mm0 += rounder */
+    psubd_r2r (mm1, mm3);               /* mm3 = a1-b1 a0-b0 + rounder */
 
-    psrad_i2r (ROW_SHIFT, mm3);         // mm3 = y6 y7
-    paddd_r2r (mm4, mm1);               // mm1 = a1+b1 a0+b0 + rounder
+    psrad_i2r (ROW_SHIFT, mm3);         /* mm3 = y6 y7 */
+    paddd_r2r (mm4, mm1);               /* mm1 = a1+b1 a0+b0 + rounder */
 
-    paddd_r2r (mm2, mm0);               // mm0 = a3 a2 + rounder
-    psrad_i2r (ROW_SHIFT, mm1);         // mm1 = y1 y0
+    paddd_r2r (mm2, mm0);               /* mm0 = a3 a2 + rounder */
+    psrad_i2r (ROW_SHIFT, mm1);         /* mm1 = y1 y0 */
 
-    paddd_r2r (mm6, mm5);               // mm5 = b3 b2
-    movq_r2r (mm0, mm7);                // mm7 = a3 a2 + rounder
+    paddd_r2r (mm6, mm5);               /* mm5 = b3 b2 */
+    movq_r2r (mm0, mm7);                /* mm7 = a3 a2 + rounder */
 
-    paddd_r2r (mm5, mm0);               // mm0 = a3+b3 a2+b2 + rounder
-    psubd_r2r (mm5, mm7);               // mm7 = a3-b3 a2-b2 + rounder
+    paddd_r2r (mm5, mm0);               /* mm0 = a3+b3 a2+b2 + rounder */
+    psubd_r2r (mm5, mm7);               /* mm7 = a3-b3 a2-b2 + rounder */
 }
 
 static inline void RowTail( dctelem_t * row, int store )
 {
-    psrad_i2r (ROW_SHIFT, mm0);         // mm0 = y3 y2
+    psrad_i2r (ROW_SHIFT, mm0);         /* mm0 = y3 y2 */
 
-    psrad_i2r (ROW_SHIFT, mm7);         // mm7 = y4 y5
+    psrad_i2r (ROW_SHIFT, mm7);         /* mm7 = y4 y5 */
 
-    packssdw_r2r (mm0, mm1);            // mm1 = y3 y2 y1 y0
+    packssdw_r2r (mm0, mm1);            /* mm1 = y3 y2 y1 y0 */
 
-    packssdw_r2r (mm3, mm7);            // mm7 = y6 y7 y4 y5
+    packssdw_r2r (mm3, mm7);            /* mm7 = y6 y7 y4 y5 */
 
-    movq_r2m (mm1, *(row+store));       // save y3 y2 y1 y0
-    movq_r2r (mm7, mm4);                // mm4 = y6 y7 y4 y5
+    movq_r2m (mm1, *(row+store));       /* save y3 y2 y1 y0 */
+    movq_r2r (mm7, mm4);                /* mm4 = y6 y7 y4 y5 */
 
-    pslld_i2r (16, mm7);                // mm7 = y7 0 y5 0
+    pslld_i2r (16, mm7);                /* mm7 = y7 0 y5 0 */
 
-    psrld_i2r (16, mm4);                // mm4 = 0 y6 0 y4
+    psrld_i2r (16, mm4);                /* mm4 = 0 y6 0 y4 */
 
-    por_r2r (mm4, mm7);                 // mm7 = y7 y6 y5 y4
+    por_r2r (mm4, mm7);                 /* mm7 = y7 y6 y5 y4 */
 
-    // slot
+    /* slot */
 
-    movq_r2m (mm7, *(row+store+4));     // save y7 y6 y5 y4
+    movq_r2m (mm7, *(row+store+4));     /* save y7 y6 y5 y4 */
 }
 
 static inline void RowMid( dctelem_t * row, int store,
                            int offset, dctelem_t * table )
 {
-    movq_m2r (*(row+offset), mm2);      // mm2 = x6 x4 x2 x0
-    psrad_i2r (ROW_SHIFT, mm0);         // mm0 = y3 y2
+    movq_m2r (*(row+offset), mm2);      /* mm2 = x6 x4 x2 x0 */
+    psrad_i2r (ROW_SHIFT, mm0);         /* mm0 = y3 y2 */
 
-    movq_m2r (*(row+offset+4), mm5);    // mm5 = x7 x5 x3 x1
-    psrad_i2r (ROW_SHIFT, mm7);         // mm7 = y4 y5
+    movq_m2r (*(row+offset+4), mm5);    /* mm5 = x7 x5 x3 x1 */
+    psrad_i2r (ROW_SHIFT, mm7);         /* mm7 = y4 y5 */
 
-    packssdw_r2r (mm0, mm1);            // mm1 = y3 y2 y1 y0
-    movq_r2r (mm5, mm6);                // mm6 = x7 x5 x3 x1
+    packssdw_r2r (mm0, mm1);            /* mm1 = y3 y2 y1 y0 */
+    movq_r2r (mm5, mm6);                /* mm6 = x7 x5 x3 x1 */
 
-    packssdw_r2r (mm3, mm7);            // mm7 = y6 y7 y4 y5
-    movq_r2r (mm2, mm0);                // mm0 = x6 x4 x2 x0
+    packssdw_r2r (mm3, mm7);            /* mm7 = y6 y7 y4 y5 */
+    movq_r2r (mm2, mm0);                /* mm0 = x6 x4 x2 x0 */
 
-    movq_r2m (mm1, *(row+store));       // save y3 y2 y1 y0
-    movq_r2r (mm7, mm1);                // mm1 = y6 y7 y4 y5
+    movq_r2m (mm1, *(row+store));       /* save y3 y2 y1 y0 */
+    movq_r2r (mm7, mm1);                /* mm1 = y6 y7 y4 y5 */
 
-    punpckldq_r2r (mm0, mm0);           // mm0 = x2 x0 x2 x0
-    psrld_i2r (16, mm7);                // mm7 = 0 y6 0 y4
+    punpckldq_r2r (mm0, mm0);           /* mm0 = x2 x0 x2 x0 */
+    psrld_i2r (16, mm7);                /* mm7 = 0 y6 0 y4 */
 
-    movq_m2r (*table, mm3);             // mm3 = C6 C4 C2 C4
-    pslld_i2r (16, mm1);                // mm1 = y7 0 y5 0
+    movq_m2r (*table, mm3);             /* mm3 = C6 C4 C2 C4 */
+    pslld_i2r (16, mm1);                /* mm1 = y7 0 y5 0 */
 
-    movq_m2r (*(table+4), mm4);         // mm4 = -C2 -C4 C6 C4
-    por_r2r (mm1, mm7);                 // mm7 = y7 y6 y5 y4
+    movq_m2r (*(table+4), mm4);         /* mm4 = -C2 -C4 C6 C4 */
+    por_r2r (mm1, mm7);                 /* mm7 = y7 y6 y5 y4 */
 
-    movq_m2r (*(table+8), mm1);         // mm1 = -C7 C3 C3 C1
-    punpckhdq_r2r (mm2, mm2);           // mm2 = x6 x4 x6 x4
+    movq_m2r (*(table+8), mm1);         /* mm1 = -C7 C3 C3 C1 */
+    punpckhdq_r2r (mm2, mm2);           /* mm2 = x6 x4 x6 x4 */
 
-    movq_r2m (mm7, *(row+store+4));     // save y7 y6 y5 y4
-    pmaddwd_r2r (mm0, mm3);             // mm3 = C4*x0+C6*x2 C4*x0+C2*x2
+    movq_r2m (mm7, *(row+store+4));     /* save y7 y6 y5 y4 */
+    pmaddwd_r2r (mm0, mm3);             /* mm3 = C4*x0+C6*x2 C4*x0+C2*x2 */
 }
 
 static inline void Col( dctelem_t * col, int offset )
@@ -218,132 +218,132 @@ static inline void Col( dctelem_t * col, int offset )
     /* column code adapted from peter gubanov */
     /* http://www.elecard.com/peter/idct.shtml */
 
-    movq_m2r (*_T1, mm0);               // mm0 = T1
+    movq_m2r (*_T1, mm0);               /* mm0 = T1 */
 
-    movq_m2r (*(col+offset+1*8), mm1);  // mm1 = x1
-    movq_r2r (mm0, mm2);                // mm2 = T1
+    movq_m2r (*(col+offset+1*8), mm1);  /* mm1 = x1 */
+    movq_r2r (mm0, mm2);                /* mm2 = T1 */
 
-    movq_m2r (*(col+offset+7*8), mm4);  // mm4 = x7
-    pmulhw_r2r (mm1, mm0);              // mm0 = T1*x1
+    movq_m2r (*(col+offset+7*8), mm4);  /* mm4 = x7 */
+    pmulhw_r2r (mm1, mm0);              /* mm0 = T1*x1 */
 
-    movq_m2r (*_T3, mm5);               // mm5 = T3
-    pmulhw_r2r (mm4, mm2);              // mm2 = T1*x7
+    movq_m2r (*_T3, mm5);               /* mm5 = T3 */
+    pmulhw_r2r (mm4, mm2);              /* mm2 = T1*x7 */
 
-    movq_m2r (*(col+offset+5*8), mm6);  // mm6 = x5
-    movq_r2r (mm5, mm7);                // mm7 = T3-1
+    movq_m2r (*(col+offset+5*8), mm6);  /* mm6 = x5 */
+    movq_r2r (mm5, mm7);                /* mm7 = T3-1 */
 
-    movq_m2r (*(col+offset+3*8), mm3);  // mm3 = x3
-    psubsw_r2r (mm4, mm0);              // mm0 = v17
+    movq_m2r (*(col+offset+3*8), mm3);  /* mm3 = x3 */
+    psubsw_r2r (mm4, mm0);              /* mm0 = v17 */
 
-    movq_m2r (*_T2, mm4);               // mm4 = T2
-    pmulhw_r2r (mm3, mm5);              // mm5 = (T3-1)*x3
+    movq_m2r (*_T2, mm4);               /* mm4 = T2 */
+    pmulhw_r2r (mm3, mm5);              /* mm5 = (T3-1)*x3 */
 
-    paddsw_r2r (mm2, mm1);              // mm1 = u17
-    pmulhw_r2r (mm6, mm7);              // mm7 = (T3-1)*x5
+    paddsw_r2r (mm2, mm1);              /* mm1 = u17 */
+    pmulhw_r2r (mm6, mm7);              /* mm7 = (T3-1)*x5 */
 
-    //slot
+    /*slot*/
 
-    movq_r2r (mm4, mm2);                // mm2 = T2
-    paddsw_r2r (mm3, mm5);              // mm5 = T3*x3
+    movq_r2r (mm4, mm2);                /* mm2 = T2 */
+    paddsw_r2r (mm3, mm5);              /* mm5 = T3*x3 */
 
-    pmulhw_m2r (*(col+offset+2*8), mm4);// mm4 = T2*x2
-    paddsw_r2r (mm6, mm7);              // mm7 = T3*x5
+    pmulhw_m2r (*(col+offset+2*8), mm4);/* mm4 = T2*x2 */
+    paddsw_r2r (mm6, mm7);              /* mm7 = T3*x5 */
 
-    psubsw_r2r (mm6, mm5);              // mm5 = v35
-    paddsw_r2r (mm3, mm7);              // mm7 = u35
+    psubsw_r2r (mm6, mm5);              /* mm5 = v35 */
+    paddsw_r2r (mm3, mm7);              /* mm7 = u35 */
 
-    movq_m2r (*(col+offset+6*8), mm3);  // mm3 = x6
-    movq_r2r (mm0, mm6);                // mm6 = v17
+    movq_m2r (*(col+offset+6*8), mm3);  /* mm3 = x6 */
+    movq_r2r (mm0, mm6);                /* mm6 = v17 */
 
-    pmulhw_r2r (mm3, mm2);              // mm2 = T2*x6
-    psubsw_r2r (mm5, mm0);              // mm0 = b3
+    pmulhw_r2r (mm3, mm2);              /* mm2 = T2*x6 */
+    psubsw_r2r (mm5, mm0);              /* mm0 = b3 */
 
-    psubsw_r2r (mm3, mm4);              // mm4 = v26
-    paddsw_r2r (mm6, mm5);              // mm5 = v12
+    psubsw_r2r (mm3, mm4);              /* mm4 = v26 */
+    paddsw_r2r (mm6, mm5);              /* mm5 = v12 */
 
-    movq_r2m (mm0, scratch0);           // save b3
-    movq_r2r (mm1, mm6);                // mm6 = u17
+    movq_r2m (mm0, scratch0);           /* save b3 */
+    movq_r2r (mm1, mm6);                /* mm6 = u17 */
 
-    paddsw_m2r (*(col+offset+2*8), mm2);// mm2 = u26
-    paddsw_r2r (mm7, mm6);              // mm6 = b0
+    paddsw_m2r (*(col+offset+2*8), mm2);/* mm2 = u26 */
+    paddsw_r2r (mm7, mm6);              /* mm6 = b0 */
 
-    psubsw_r2r (mm7, mm1);              // mm1 = u12
-    movq_r2r (mm1, mm7);                // mm7 = u12
+    psubsw_r2r (mm7, mm1);              /* mm1 = u12 */
+    movq_r2r (mm1, mm7);                /* mm7 = u12 */
 
-    movq_m2r (*(col+offset+0*8), mm3);  // mm3 = x0
-    paddsw_r2r (mm5, mm1);              // mm1 = u12+v12
+    movq_m2r (*(col+offset+0*8), mm3);  /* mm3 = x0 */
+    paddsw_r2r (mm5, mm1);              /* mm1 = u12+v12 */
 
-    movq_m2r (*_C4, mm0);               // mm0 = C4/2
-    psubsw_r2r (mm5, mm7);              // mm7 = u12-v12
+    movq_m2r (*_C4, mm0);               /* mm0 = C4/2 */
+    psubsw_r2r (mm5, mm7);              /* mm7 = u12-v12 */
 
-    movq_r2m (mm6, scratch1);           // save b0
-    pmulhw_r2r (mm0, mm1);              // mm1 = b1/2
+    movq_r2m (mm6, scratch1);           /* save b0 */
+    pmulhw_r2r (mm0, mm1);              /* mm1 = b1/2 */
 
-    movq_r2r (mm4, mm6);                // mm6 = v26
-    pmulhw_r2r (mm0, mm7);              // mm7 = b2/2
+    movq_r2r (mm4, mm6);                /* mm6 = v26 */
+    pmulhw_r2r (mm0, mm7);              /* mm7 = b2/2 */
 
-    movq_m2r (*(col+offset+4*8), mm5);  // mm5 = x4
-    movq_r2r (mm3, mm0);                // mm0 = x0
+    movq_m2r (*(col+offset+4*8), mm5);  /* mm5 = x4 */
+    movq_r2r (mm3, mm0);                /* mm0 = x0 */
 
-    psubsw_r2r (mm5, mm3);              // mm3 = v04
-    paddsw_r2r (mm5, mm0);              // mm0 = u04
+    psubsw_r2r (mm5, mm3);              /* mm3 = v04 */
+    paddsw_r2r (mm5, mm0);              /* mm0 = u04 */
 
-    paddsw_r2r (mm3, mm4);              // mm4 = a1
-    movq_r2r (mm0, mm5);                // mm5 = u04
+    paddsw_r2r (mm3, mm4);              /* mm4 = a1 */
+    movq_r2r (mm0, mm5);                /* mm5 = u04 */
 
-    psubsw_r2r (mm6, mm3);              // mm3 = a2
-    paddsw_r2r (mm2, mm5);              // mm5 = a0
+    psubsw_r2r (mm6, mm3);              /* mm3 = a2 */
+    paddsw_r2r (mm2, mm5);              /* mm5 = a0 */
 
-    paddsw_r2r (mm1, mm1);              // mm1 = b1
-    psubsw_r2r (mm2, mm0);              // mm0 = a3
+    paddsw_r2r (mm1, mm1);              /* mm1 = b1 */
+    psubsw_r2r (mm2, mm0);              /* mm0 = a3 */
 
-    paddsw_r2r (mm7, mm7);              // mm7 = b2
-    movq_r2r (mm3, mm2);                // mm2 = a2
+    paddsw_r2r (mm7, mm7);              /* mm7 = b2 */
+    movq_r2r (mm3, mm2);                /* mm2 = a2 */
 
-    movq_r2r (mm4, mm6);                // mm6 = a1
-    paddsw_r2r (mm7, mm3);              // mm3 = a2+b2
+    movq_r2r (mm4, mm6);                /* mm6 = a1 */
+    paddsw_r2r (mm7, mm3);              /* mm3 = a2+b2 */
 
-    psraw_i2r (COL_SHIFT, mm3);         // mm3 = y2
-    paddsw_r2r (mm1, mm4);              // mm4 = a1+b1
+    psraw_i2r (COL_SHIFT, mm3);         /* mm3 = y2 */
+    paddsw_r2r (mm1, mm4);              /* mm4 = a1+b1 */
 
-    psraw_i2r (COL_SHIFT, mm4);         // mm4 = y1
-    psubsw_r2r (mm1, mm6);              // mm6 = a1-b1
+    psraw_i2r (COL_SHIFT, mm4);         /* mm4 = y1 */
+    psubsw_r2r (mm1, mm6);              /* mm6 = a1-b1 */
 
-    movq_m2r (scratch1, mm1);           // mm1 = b0
-    psubsw_r2r (mm7, mm2);              // mm2 = a2-b2
+    movq_m2r (scratch1, mm1);           /* mm1 = b0 */
+    psubsw_r2r (mm7, mm2);              /* mm2 = a2-b2 */
 
-    psraw_i2r (COL_SHIFT, mm6);         // mm6 = y6
-    movq_r2r (mm5, mm7);                // mm7 = a0
+    psraw_i2r (COL_SHIFT, mm6);         /* mm6 = y6 */
+    movq_r2r (mm5, mm7);                /* mm7 = a0 */
 
-    movq_r2m (mm4, *(col+offset+1*8));  // save y1
-    psraw_i2r (COL_SHIFT, mm2);         // mm2 = y5
+    movq_r2m (mm4, *(col+offset+1*8));  /* save y1 */
+    psraw_i2r (COL_SHIFT, mm2);         /* mm2 = y5 */
 
-    movq_r2m (mm3, *(col+offset+2*8));  // save y2
-    paddsw_r2r (mm1, mm5);              // mm5 = a0+b0
+    movq_r2m (mm3, *(col+offset+2*8));  /* save y2 */
+    paddsw_r2r (mm1, mm5);              /* mm5 = a0+b0 */
 
-    movq_m2r (scratch0, mm4);           // mm4 = b3
-    psubsw_r2r (mm1, mm7);              // mm7 = a0-b0
+    movq_m2r (scratch0, mm4);           /* mm4 = b3 */
+    psubsw_r2r (mm1, mm7);              /* mm7 = a0-b0 */
 
-    psraw_i2r (COL_SHIFT, mm5);         // mm5 = y0
-    movq_r2r (mm0, mm3);                // mm3 = a3
+    psraw_i2r (COL_SHIFT, mm5);         /* mm5 = y0 */
+    movq_r2r (mm0, mm3);                /* mm3 = a3 */
 
-    movq_r2m (mm2, *(col+offset+5*8));  // save y5
-    psubsw_r2r (mm4, mm3);              // mm3 = a3-b3
+    movq_r2m (mm2, *(col+offset+5*8));  /* save y5 */
+    psubsw_r2r (mm4, mm3);              /* mm3 = a3-b3 */
 
-    psraw_i2r (COL_SHIFT, mm7);         // mm7 = y7
-    paddsw_r2r (mm0, mm4);              // mm4 = a3+b3
+    psraw_i2r (COL_SHIFT, mm7);         /* mm7 = y7 */
+    paddsw_r2r (mm0, mm4);              /* mm4 = a3+b3 */
 
-    movq_r2m (mm5, *(col+offset+0*8));  // save y0
-    psraw_i2r (COL_SHIFT, mm3);         // mm3 = y4
+    movq_r2m (mm5, *(col+offset+0*8));  /* save y0 */
+    psraw_i2r (COL_SHIFT, mm3);         /* mm3 = y4 */
 
-    movq_r2m (mm6, *(col+offset+6*8));  // save y6
-    psraw_i2r (COL_SHIFT, mm4);         // mm4 = y3
+    movq_r2m (mm6, *(col+offset+6*8));  /* save y6 */
+    psraw_i2r (COL_SHIFT, mm4);         /* mm4 = y3 */
 
-    movq_r2m (mm7, *(col+offset+7*8));  // save y7
+    movq_r2m (mm7, *(col+offset+7*8));  /* save y7 */
 
-    movq_r2m (mm3, *(col+offset+4*8));  // save y4
+    movq_r2m (mm3, *(col+offset+4*8));  /* save y4 */
 
-    movq_r2m (mm4, *(col+offset+3*8));  // save y3
+    movq_r2m (mm4, *(col+offset+3*8));  /* save y3 */
 }
 
 
@@ -351,17 +351,17 @@ static s32 rounder0[] ATTR_ALIGN(8) =
     rounder ((1 << (COL_SHIFT - 1)) - 0.5);
 static s32 rounder4[] ATTR_ALIGN(8) = rounder (0);
 static s32 rounder1[] ATTR_ALIGN(8) =
-    rounder (1.25683487303);    // C1*(C1/C4+C1+C7)/2
+    rounder (1.25683487303);    /* C1*(C1/C4+C1+C7)/2 */
 static s32 rounder7[] ATTR_ALIGN(8) =
-    rounder (-0.25);            // C1*(C7/C4+C7-C1)/2
+    rounder (-0.25);            /* C1*(C7/C4+C7-C1)/2 */
 static s32 rounder2[] ATTR_ALIGN(8) =
-    rounder (0.60355339059);    // C2 * (C6+C2)/2
+    rounder (0.60355339059);    /* C2 * (C6+C2)/2 */
 static s32 rounder6[] ATTR_ALIGN(8) =
-    rounder (-0.25);            // C2 * (C6-C2)/2
+    rounder (-0.25);            /* C2 * (C6-C2)/2 */
 static s32 rounder3[] ATTR_ALIGN(8) =
-    rounder (0.087788325588);   // C3*(-C3/C4+C3+C5)/2
+    rounder (0.087788325588);   /* C3*(-C3/C4+C3+C5)/2 */
 static s32 rounder5[] ATTR_ALIGN(8) =
-    rounder (-0.441341716183);  // C3*(-C5/C4+C5-C3)/2
+    rounder (-0.441341716183);  /* C3*(-C5/C4+C5-C3)/2 */
 
 static void IDCT( dctelem_t * p_block )
 {
index 229fc2c68a1c64a6cc1a6c599917f7361d34776d..7317857c976ef3e2fbbf07c7909a873ba8c040ae 100644 (file)
@@ -2,7 +2,7 @@
  * idctmmxext.c : MMX EXT IDCT module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: idctmmxext.c,v 1.1 2002/08/04 17:23:42 sam Exp $
+ * $Id: idctmmxext.c,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
@@ -88,101 +88,101 @@ static void NormScan( u8 ppi_scan[2][64] )
 
 static inline void RowHead( dctelem_t * row, int offset, dctelem_t * table )
 {
-    movq_m2r (*(row+offset), mm2);      // mm2 = x6 x4 x2 x0
+    movq_m2r (*(row+offset), mm2);      /* mm2 = x6 x4 x2 x0 */
 
-    movq_m2r (*(row+offset+4), mm5);    // mm5 = x7 x5 x3 x1
-    movq_r2r (mm2, mm0);                // mm0 = x6 x4 x2 x0
+    movq_m2r (*(row+offset+4), mm5);    /* mm5 = x7 x5 x3 x1 */
+    movq_r2r (mm2, mm0);                /* mm0 = x6 x4 x2 x0 */
 
-    movq_m2r (*table, mm3);             // mm3 = -C2 -C4 C2 C4
-    movq_r2r (mm5, mm6);                // mm6 = x7 x5 x3 x1
+    movq_m2r (*table, mm3);             /* mm3 = -C2 -C4 C2 C4 */
+    movq_r2r (mm5, mm6);                /* mm6 = x7 x5 x3 x1 */
 
-    movq_m2r (*(table+4), mm4);         // mm4 = C6 C4 C6 C4
-    pmaddwd_r2r (mm0, mm3);             // mm3 = -C4*x4-C2*x6 C4*x0+C2*x2
+    movq_m2r (*(table+4), mm4);         /* mm4 = C6 C4 C6 C4 */
+    pmaddwd_r2r (mm0, mm3);             /* mm3 = -C4*x4-C2*x6 C4*x0+C2*x2 */
 
-    pshufw_r2r (mm2, mm2, 0x4e);        // mm2 = x2 x0 x6 x4
+    pshufw_r2r (mm2, mm2, 0x4e);        /* mm2 = x2 x0 x6 x4 */
 }
 
 static inline void Row( dctelem_t * table, s32 * rounder )
 {
-    movq_m2r (*(table+8), mm1);         // mm1 = -C5 -C1 C3 C1
-    pmaddwd_r2r (mm2, mm4);             // mm4 = C4*x0+C6*x2 C4*x4+C6*x6
+    movq_m2r (*(table+8), mm1);         /* mm1 = -C5 -C1 C3 C1 */
+    pmaddwd_r2r (mm2, mm4);             /* mm4 = C4*x0+C6*x2 C4*x4+C6*x6 */
 
-    pmaddwd_m2r (*(table+16), mm0);     // mm0 = C4*x4-C6*x6 C4*x0-C6*x2
-    pshufw_r2r (mm6, mm6, 0x4e);        // mm6 = x3 x1 x7 x5
+    pmaddwd_m2r (*(table+16), mm0);     /* mm0 = C4*x4-C6*x6 C4*x0-C6*x2 */
+    pshufw_r2r (mm6, mm6, 0x4e);        /* mm6 = x3 x1 x7 x5 */
 
-    movq_m2r (*(table+12), mm7);        // mm7 = -C7 C3 C7 C5
-    pmaddwd_r2r (mm5, mm1);             // mm1 = -C1*x5-C5*x7 C1*x1+C3*x3
+    movq_m2r (*(table+12), mm7);        /* mm7 = -C7 C3 C7 C5 */
+    pmaddwd_r2r (mm5, mm1);             /* mm1 = -C1*x5-C5*x7 C1*x1+C3*x3 */
 
-    paddd_m2r (*rounder, mm3);          // mm3 += rounder
-    pmaddwd_r2r (mm6, mm7);             // mm7 = C3*x1-C7*x3 C5*x5+C7*x7
+    paddd_m2r (*rounder, mm3);          /* mm3 += rounder */
+    pmaddwd_r2r (mm6, mm7);             /* mm7 = C3*x1-C7*x3 C5*x5+C7*x7 */
 
-    pmaddwd_m2r (*(table+20), mm2);     // mm2 = C4*x0-C2*x2 -C4*x4+C2*x6
-    paddd_r2r (mm4, mm3);               // mm3 = a1 a0 + rounder
+    pmaddwd_m2r (*(table+20), mm2);     /* mm2 = C4*x0-C2*x2 -C4*x4+C2*x6 */
+    paddd_r2r (mm4, mm3);               /* mm3 = a1 a0 + rounder */
 
-    pmaddwd_m2r (*(table+24), mm5);     // mm5 = C3*x5-C1*x7 C5*x1-C1*x3
-    movq_r2r (mm3, mm4);                // mm4 = a1 a0 + rounder
+    pmaddwd_m2r (*(table+24), mm5);     /* mm5 = C3*x5-C1*x7 C5*x1-C1*x3 */
+    movq_r2r (mm3, mm4);                /* mm4 = a1 a0 + rounder */
 
-    pmaddwd_m2r (*(table+28), mm6);     // mm6 = C7*x1-C5*x3 C7*x5+C3*x7
-    paddd_r2r (mm7, mm1);               // mm1 = b1 b0
+    pmaddwd_m2r (*(table+28), mm6);     /* mm6 = C7*x1-C5*x3 C7*x5+C3*x7 */
+    paddd_r2r (mm7, mm1);               /* mm1 = b1 b0 */
 
-    paddd_m2r (*rounder, mm0);          // mm0 += rounder
-    psubd_r2r (mm1, mm3);               // mm3 = a1-b1 a0-b0 + rounder
+    paddd_m2r (*rounder, mm0);          /* mm0 += rounder */
+    psubd_r2r (mm1, mm3);               /* mm3 = a1-b1 a0-b0 + rounder */
 
-    psrad_i2r (ROW_SHIFT, mm3);         // mm3 = y6 y7
-    paddd_r2r (mm4, mm1);               // mm1 = a1+b1 a0+b0 + rounder
+    psrad_i2r (ROW_SHIFT, mm3);         /* mm3 = y6 y7 */
+    paddd_r2r (mm4, mm1);               /* mm1 = a1+b1 a0+b0 + rounder */
 
-    paddd_r2r (mm2, mm0);               // mm0 = a3 a2 + rounder
-    psrad_i2r (ROW_SHIFT, mm1);         // mm1 = y1 y0
+    paddd_r2r (mm2, mm0);               /* mm0 = a3 a2 + rounder */
+    psrad_i2r (ROW_SHIFT, mm1);         /* mm1 = y1 y0 */
 
-    paddd_r2r (mm6, mm5);               // mm5 = b3 b2
-    movq_r2r (mm0, mm4);                // mm4 = a3 a2 + rounder
+    paddd_r2r (mm6, mm5);               /* mm5 = b3 b2 */
+    movq_r2r (mm0, mm4);                /* mm4 = a3 a2 + rounder */
 
-    paddd_r2r (mm5, mm0);               // mm0 = a3+b3 a2+b2 + rounder
-    psubd_r2r (mm5, mm4);               // mm4 = a3-b3 a2-b2 + rounder
+    paddd_r2r (mm5, mm0);               /* mm0 = a3+b3 a2+b2 + rounder */
+    psubd_r2r (mm5, mm4);               /* mm4 = a3-b3 a2-b2 + rounder */
 }
 
 static inline void RowTail( dctelem_t * row, int store )
 {
-    psrad_i2r (ROW_SHIFT, mm0);         // mm0 = y3 y2
+    psrad_i2r (ROW_SHIFT, mm0);         /* mm0 = y3 y2 */
 
-    psrad_i2r (ROW_SHIFT, mm4);         // mm4 = y4 y5
+    psrad_i2r (ROW_SHIFT, mm4);         /* mm4 = y4 y5 */
 
-    packssdw_r2r (mm0, mm1);            // mm1 = y3 y2 y1 y0
+    packssdw_r2r (mm0, mm1);            /* mm1 = y3 y2 y1 y0 */
 
-    packssdw_r2r (mm3, mm4);            // mm4 = y6 y7 y4 y5
+    packssdw_r2r (mm3, mm4);            /* mm4 = y6 y7 y4 y5 */
 
-    movq_r2m (mm1, *(row+store));       // save y3 y2 y1 y0
-    pshufw_r2r (mm4, mm4, 0xb1);        // mm4 = y7 y6 y5 y4
+    movq_r2m (mm1, *(row+store));       /* save y3 y2 y1 y0 */
+    pshufw_r2r (mm4, mm4, 0xb1);        /* mm4 = y7 y6 y5 y4 */
 
-    // slot
-    movq_r2m (mm4, *(row+store+4));     // save y7 y6 y5 y4
+    /* slot */
+    movq_r2m (mm4, *(row+store+4));     /* save y7 y6 y5 y4 */
 }
 
 static inline void RowMid( dctelem_t * row, int store,
                            int offset, dctelem_t * table)
 {
-    movq_m2r (*(row+offset), mm2);      // mm2 = x6 x4 x2 x0
-    psrad_i2r (ROW_SHIFT, mm0);         // mm0 = y3 y2
+    movq_m2r (*(row+offset), mm2);      /* mm2 = x6 x4 x2 x0 */
+    psrad_i2r (ROW_SHIFT, mm0);         /* mm0 = y3 y2 */
 
-    movq_m2r (*(row+offset+4), mm5);    // mm5 = x7 x5 x3 x1
-    psrad_i2r (ROW_SHIFT, mm4);         // mm4 = y4 y5
+    movq_m2r (*(row+offset+4), mm5);    /* mm5 = x7 x5 x3 x1 */
+    psrad_i2r (ROW_SHIFT, mm4);         /* mm4 = y4 y5 */
 
-    packssdw_r2r (mm0, mm1);            // mm1 = y3 y2 y1 y0
-    movq_r2r (mm5, mm6);                // mm6 = x7 x5 x3 x1
+    packssdw_r2r (mm0, mm1);            /* mm1 = y3 y2 y1 y0 */
+    movq_r2r (mm5, mm6);                /* mm6 = x7 x5 x3 x1 */
 
-    packssdw_r2r (mm3, mm4);            // mm4 = y6 y7 y4 y5
-    movq_r2r (mm2, mm0);                // mm0 = x6 x4 x2 x0
+    packssdw_r2r (mm3, mm4);            /* mm4 = y6 y7 y4 y5 */
+    movq_r2r (mm2, mm0);                /* mm0 = x6 x4 x2 x0 */
 
-    movq_r2m (mm1, *(row+store));       // save y3 y2 y1 y0
-    pshufw_r2r (mm4, mm4, 0xb1);        // mm4 = y7 y6 y5 y4
+    movq_r2m (mm1, *(row+store));       /* save y3 y2 y1 y0 */
+    pshufw_r2r (mm4, mm4, 0xb1);        /* mm4 = y7 y6 y5 y4 */
 
-    movq_m2r (*table, mm3);             // mm3 = -C2 -C4 C2 C4
-    movq_r2m (mm4, *(row+store+4));     // save y7 y6 y5 y4
+    movq_m2r (*table, mm3);             /* mm3 = -C2 -C4 C2 C4 */
+    movq_r2m (mm4, *(row+store+4));     /* save y7 y6 y5 y4 */
 
-    pmaddwd_r2r (mm0, mm3);             // mm3 = -C4*x4-C2*x6 C4*x0+C2*x2
+    pmaddwd_r2r (mm0, mm3);             /* mm3 = -C4*x4-C2*x6 C4*x0+C2*x2 */
 
-    movq_m2r (*(table+4), mm4);         // mm4 = C6 C4 C6 C4
-    pshufw_r2r (mm2, mm2, 0x4e);        // mm2 = x2 x0 x6 x4
+    movq_m2r (*(table+4), mm4);         /* mm4 = C6 C4 C6 C4 */
+    pshufw_r2r (mm2, mm2, 0x4e);        /* mm2 = x2 x0 x6 x4 */
 }
 
 static inline void Col( dctelem_t * col, int offset )
@@ -201,132 +201,132 @@ static inline void Col( dctelem_t * col, int offset )
     /* column code adapted from peter gubanov */
     /* http://www.elecard.com/peter/idct.shtml */
 
-    movq_m2r (*_T1, mm0);               // mm0 = T1
+    movq_m2r (*_T1, mm0);               /* mm0 = T1 */
 
-    movq_m2r (*(col+offset+1*8), mm1);  // mm1 = x1
-    movq_r2r (mm0, mm2);                // mm2 = T1
+    movq_m2r (*(col+offset+1*8), mm1);  /* mm1 = x1 */
+    movq_r2r (mm0, mm2);                /* mm2 = T1 */
 
-    movq_m2r (*(col+offset+7*8), mm4);  // mm4 = x7
-    pmulhw_r2r (mm1, mm0);              // mm0 = T1*x1
+    movq_m2r (*(col+offset+7*8), mm4);  /* mm4 = x7 */
+    pmulhw_r2r (mm1, mm0);              /* mm0 = T1*x1 */
 
-    movq_m2r (*_T3, mm5);               // mm5 = T3
-    pmulhw_r2r (mm4, mm2);              // mm2 = T1*x7
+    movq_m2r (*_T3, mm5);               /* mm5 = T3 */
+    pmulhw_r2r (mm4, mm2);              /* mm2 = T1*x7 */
 
-    movq_m2r (*(col+offset+5*8), mm6);  // mm6 = x5
-    movq_r2r (mm5, mm7);                // mm7 = T3-1
+    movq_m2r (*(col+offset+5*8), mm6);  /* mm6 = x5 */
+    movq_r2r (mm5, mm7);                /* mm7 = T3-1 */
 
-    movq_m2r (*(col+offset+3*8), mm3);  // mm3 = x3
-    psubsw_r2r (mm4, mm0);              // mm0 = v17
+    movq_m2r (*(col+offset+3*8), mm3);  /* mm3 = x3 */
+    psubsw_r2r (mm4, mm0);              /* mm0 = v17 */
 
-    movq_m2r (*_T2, mm4);               // mm4 = T2
-    pmulhw_r2r (mm3, mm5);              // mm5 = (T3-1)*x3
+    movq_m2r (*_T2, mm4);               /* mm4 = T2 */
+    pmulhw_r2r (mm3, mm5);              /* mm5 = (T3-1)*x3 */
 
-    paddsw_r2r (mm2, mm1);              // mm1 = u17
-    pmulhw_r2r (mm6, mm7);              // mm7 = (T3-1)*x5
+    paddsw_r2r (mm2, mm1);              /* mm1 = u17 */
+    pmulhw_r2r (mm6, mm7);              /* mm7 = (T3-1)*x5 */
 
-    //slot
+    /*slot*/
 
-    movq_r2r (mm4, mm2);                // mm2 = T2
-    paddsw_r2r (mm3, mm5);              // mm5 = T3*x3
+    movq_r2r (mm4, mm2);                /* mm2 = T2 */
+    paddsw_r2r (mm3, mm5);              /* mm5 = T3*x3 */
 
-    pmulhw_m2r (*(col+offset+2*8), mm4);// mm4 = T2*x2
-    paddsw_r2r (mm6, mm7);              // mm7 = T3*x5
+    pmulhw_m2r (*(col+offset+2*8), mm4);/* mm4 = T2*x2 */
+    paddsw_r2r (mm6, mm7);              /* mm7 = T3*x5 */
 
-    psubsw_r2r (mm6, mm5);              // mm5 = v35
-    paddsw_r2r (mm3, mm7);              // mm7 = u35
+    psubsw_r2r (mm6, mm5);              /* mm5 = v35 */
+    paddsw_r2r (mm3, mm7);              /* mm7 = u35 */
 
-    movq_m2r (*(col+offset+6*8), mm3);  // mm3 = x6
-    movq_r2r (mm0, mm6);                // mm6 = v17
+    movq_m2r (*(col+offset+6*8), mm3);  /* mm3 = x6 */
+    movq_r2r (mm0, mm6);                /* mm6 = v17 */
 
-    pmulhw_r2r (mm3, mm2);              // mm2 = T2*x6
-    psubsw_r2r (mm5, mm0);              // mm0 = b3
+    pmulhw_r2r (mm3, mm2);              /* mm2 = T2*x6 */
+    psubsw_r2r (mm5, mm0);              /* mm0 = b3 */
 
-    psubsw_r2r (mm3, mm4);              // mm4 = v26
-    paddsw_r2r (mm6, mm5);              // mm5 = v12
+    psubsw_r2r (mm3, mm4);              /* mm4 = v26 */
+    paddsw_r2r (mm6, mm5);              /* mm5 = v12 */
 
-    movq_r2m (mm0, scratch0);           // save b3
-    movq_r2r (mm1, mm6);                // mm6 = u17
+    movq_r2m (mm0, scratch0);           /* save b3 */
+    movq_r2r (mm1, mm6);                /* mm6 = u17 */
 
-    paddsw_m2r (*(col+offset+2*8), mm2);// mm2 = u26
-    paddsw_r2r (mm7, mm6);              // mm6 = b0
+    paddsw_m2r (*(col+offset+2*8), mm2);/* mm2 = u26 */
+    paddsw_r2r (mm7, mm6);              /* mm6 = b0 */
 
-    psubsw_r2r (mm7, mm1);              // mm1 = u12
-    movq_r2r (mm1, mm7);                // mm7 = u12
+    psubsw_r2r (mm7, mm1);              /* mm1 = u12 */
+    movq_r2r (mm1, mm7);                /* mm7 = u12 */
 
-    movq_m2r (*(col+offset+0*8), mm3);  // mm3 = x0
-    paddsw_r2r (mm5, mm1);              // mm1 = u12+v12
+    movq_m2r (*(col+offset+0*8), mm3);  /* mm3 = x0 */
+    paddsw_r2r (mm5, mm1);              /* mm1 = u12+v12 */
 
-    movq_m2r (*_C4, mm0);               // mm0 = C4/2
-    psubsw_r2r (mm5, mm7);              // mm7 = u12-v12
+    movq_m2r (*_C4, mm0);               /* mm0 = C4/2 */
+    psubsw_r2r (mm5, mm7);              /* mm7 = u12-v12 */
 
-    movq_r2m (mm6, scratch1);           // save b0
-    pmulhw_r2r (mm0, mm1);              // mm1 = b1/2
+    movq_r2m (mm6, scratch1);           /* save b0 */
+    pmulhw_r2r (mm0, mm1);              /* mm1 = b1/2 */
 
-    movq_r2r (mm4, mm6);                // mm6 = v26
-    pmulhw_r2r (mm0, mm7);              // mm7 = b2/2
+    movq_r2r (mm4, mm6);                /* mm6 = v26 */
+    pmulhw_r2r (mm0, mm7);              /* mm7 = b2/2 */
 
-    movq_m2r (*(col+offset+4*8), mm5);  // mm5 = x4
-    movq_r2r (mm3, mm0);                // mm0 = x0
+    movq_m2r (*(col+offset+4*8), mm5);  /* mm5 = x4 */
+    movq_r2r (mm3, mm0);                /* mm0 = x0 */
 
-    psubsw_r2r (mm5, mm3);              // mm3 = v04
-    paddsw_r2r (mm5, mm0);              // mm0 = u04
+    psubsw_r2r (mm5, mm3);              /* mm3 = v04 */
+    paddsw_r2r (mm5, mm0);              /* mm0 = u04 */
 
-    paddsw_r2r (mm3, mm4);              // mm4 = a1
-    movq_r2r (mm0, mm5);                // mm5 = u04
+    paddsw_r2r (mm3, mm4);              /* mm4 = a1 */
+    movq_r2r (mm0, mm5);                /* mm5 = u04 */
 
-    psubsw_r2r (mm6, mm3);              // mm3 = a2
-    paddsw_r2r (mm2, mm5);              // mm5 = a0
+    psubsw_r2r (mm6, mm3);              /* mm3 = a2 */
+    paddsw_r2r (mm2, mm5);              /* mm5 = a0 */
 
-    paddsw_r2r (mm1, mm1);              // mm1 = b1
-    psubsw_r2r (mm2, mm0);              // mm0 = a3
+    paddsw_r2r (mm1, mm1);              /* mm1 = b1 */
+    psubsw_r2r (mm2, mm0);              /* mm0 = a3 */
 
-    paddsw_r2r (mm7, mm7);              // mm7 = b2
-    movq_r2r (mm3, mm2);                // mm2 = a2
+    paddsw_r2r (mm7, mm7);              /* mm7 = b2 */
+    movq_r2r (mm3, mm2);                /* mm2 = a2 */
 
-    movq_r2r (mm4, mm6);                // mm6 = a1
-    paddsw_r2r (mm7, mm3);              // mm3 = a2+b2
+    movq_r2r (mm4, mm6);                /* mm6 = a1 */
+    paddsw_r2r (mm7, mm3);              /* mm3 = a2+b2 */
 
-    psraw_i2r (COL_SHIFT, mm3);         // mm3 = y2
-    paddsw_r2r (mm1, mm4);              // mm4 = a1+b1
+    psraw_i2r (COL_SHIFT, mm3);         /* mm3 = y2 */
+    paddsw_r2r (mm1, mm4);              /* mm4 = a1+b1 */
 
-    psraw_i2r (COL_SHIFT, mm4);         // mm4 = y1
-    psubsw_r2r (mm1, mm6);              // mm6 = a1-b1
+    psraw_i2r (COL_SHIFT, mm4);         /* mm4 = y1 */
+    psubsw_r2r (mm1, mm6);              /* mm6 = a1-b1 */
 
-    movq_m2r (scratch1, mm1);           // mm1 = b0
-    psubsw_r2r (mm7, mm2);              // mm2 = a2-b2
+    movq_m2r (scratch1, mm1);           /* mm1 = b0 */
+    psubsw_r2r (mm7, mm2);              /* mm2 = a2-b2 */
 
-    psraw_i2r (COL_SHIFT, mm6);         // mm6 = y6
-    movq_r2r (mm5, mm7);                // mm7 = a0
+    psraw_i2r (COL_SHIFT, mm6);         /* mm6 = y6 */
+    movq_r2r (mm5, mm7);                /* mm7 = a0 */
 
-    movq_r2m (mm4, *(col+offset+1*8));  // save y1
-    psraw_i2r (COL_SHIFT, mm2);         // mm2 = y5
+    movq_r2m (mm4, *(col+offset+1*8));  /* save y1 */
+    psraw_i2r (COL_SHIFT, mm2);         /* mm2 = y5 */
 
-    movq_r2m (mm3, *(col+offset+2*8));  // save y2
-    paddsw_r2r (mm1, mm5);              // mm5 = a0+b0
+    movq_r2m (mm3, *(col+offset+2*8));  /* save y2 */
+    paddsw_r2r (mm1, mm5);              /* mm5 = a0+b0 */
 
-    movq_m2r (scratch0, mm4);           // mm4 = b3
-    psubsw_r2r (mm1, mm7);              // mm7 = a0-b0
+    movq_m2r (scratch0, mm4);           /* mm4 = b3 */
+    psubsw_r2r (mm1, mm7);              /* mm7 = a0-b0 */
 
-    psraw_i2r (COL_SHIFT, mm5);         // mm5 = y0
-    movq_r2r (mm0, mm3);                // mm3 = a3
+    psraw_i2r (COL_SHIFT, mm5);         /* mm5 = y0 */
+    movq_r2r (mm0, mm3);                /* mm3 = a3 */
 
-    movq_r2m (mm2, *(col+offset+5*8));  // save y5
-    psubsw_r2r (mm4, mm3);              // mm3 = a3-b3
+    movq_r2m (mm2, *(col+offset+5*8));  /* save y5 */
+    psubsw_r2r (mm4, mm3);              /* mm3 = a3-b3 */
 
-    psraw_i2r (COL_SHIFT, mm7);         // mm7 = y7
-    paddsw_r2r (mm0, mm4);              // mm4 = a3+b3
+    psraw_i2r (COL_SHIFT, mm7);         /* mm7 = y7 */
+    paddsw_r2r (mm0, mm4);              /* mm4 = a3+b3 */
 
-    movq_r2m (mm5, *(col+offset+0*8));  // save y0
-    psraw_i2r (COL_SHIFT, mm3);         // mm3 = y4
+    movq_r2m (mm5, *(col+offset+0*8));  /* save y0 */
+    psraw_i2r (COL_SHIFT, mm3);         /* mm3 = y4 */
 
-    movq_r2m (mm6, *(col+offset+6*8));  // save y6
-    psraw_i2r (COL_SHIFT, mm4);         // mm4 = y3
+    movq_r2m (mm6, *(col+offset+6*8));  /* save y6 */
+    psraw_i2r (COL_SHIFT, mm4);         /* mm4 = y3 */
 
-    movq_r2m (mm7, *(col+offset+7*8));  // save y7
+    movq_r2m (mm7, *(col+offset+7*8));  /* save y7 */
 
-    movq_r2m (mm3, *(col+offset+4*8));  // save y4
+    movq_r2m (mm3, *(col+offset+4*8));  /* save y4 */
 
-    movq_r2m (mm4, *(col+offset+3*8));  // save y3
+    movq_r2m (mm4, *(col+offset+3*8));  /* save y3 */
 }
 
 
@@ -334,17 +334,17 @@ static s32 rounder0[] ATTR_ALIGN(8) =
     rounder ((1 << (COL_SHIFT - 1)) - 0.5);
 static s32 rounder4[] ATTR_ALIGN(8) = rounder (0);
 static s32 rounder1[] ATTR_ALIGN(8) =
-    rounder (1.25683487303);    // C1*(C1/C4+C1+C7)/2
+    rounder (1.25683487303);    /* C1*(C1/C4+C1+C7)/2 */
 static s32 rounder7[] ATTR_ALIGN(8) =
-    rounder (-0.25);            // C1*(C7/C4+C7-C1)/2
+    rounder (-0.25);            /* C1*(C7/C4+C7-C1)/2 */
 static s32 rounder2[] ATTR_ALIGN(8) =
-    rounder (0.60355339059);    // C2 * (C6+C2)/2
+    rounder (0.60355339059);    /* C2 * (C6+C2)/2 */
 static s32 rounder6[] ATTR_ALIGN(8) =
-    rounder (-0.25);            // C2 * (C6-C2)/2
+    rounder (-0.25);            /* C2 * (C6-C2)/2 */
 static s32 rounder3[] ATTR_ALIGN(8) =
-    rounder (0.087788325588);   // C3*(-C3/C4+C3+C5)/2
+    rounder (0.087788325588);   /* C3*(-C3/C4+C3+C5)/2 */
 static s32 rounder5[] ATTR_ALIGN(8) =
-    rounder (-0.441341716183);  // C3*(-C5/C4+C5-C3)/2
+    rounder (-0.441341716183);  /* C3*(-C5/C4+C5-C3)/2 */
 
 static void IDCT( dctelem_t * p_block )
 {
index 8d3603d1533b997ab7d01bbee3785ab209237dce..b53c6c79362ac2813105511cfc98c01520ef8dc8 100644 (file)
@@ -2,7 +2,7 @@
  * motion.c : C motion compensation module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: motion.c,v 1.1 2002/08/04 17:23:42 sam Exp $
+ * $Id: motion.c,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
@@ -60,7 +60,7 @@ vlc_module_end();
 #define put(predictor,i) dest[i] = predictor (i)
 #define avg(predictor,i) dest[i] = avg2 (predictor (i), dest[i])
 
-// mc function template
+/* mc function template */
 
 #define MC_FUNC(op,xy)                                                      \
 static void MC_##op##_##xy##16_c (yuv_data_t * dest, yuv_data_t * ref,      \
@@ -104,7 +104,7 @@ static void MC_##op##_##xy##8_c (yuv_data_t * dest, yuv_data_t * ref,       \
     } while (--height);                                                     \
 }
 
-// definitions of the actual mc functions
+/* definitions of the actual mc functions */
 
 MC_FUNC (put,o)
 MC_FUNC (avg,o)
index 097fa3e61bc87813cf2f0237f884192b458d9c62..72a53d2cdd48e91df0a038ee630b0ae565f39539 100644 (file)
@@ -2,7 +2,7 @@
  * motionmmx.c : MMX motion compensation module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: motionmmx.c,v 1.1 2002/08/04 17:23:42 sam Exp $
+ * $Id: motionmmx.c,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
@@ -53,7 +53,7 @@ vlc_module_end();
  * Motion compensation in MMX
  *****************************************************************************/
 
-// some rounding constants
+/* some rounding constants */
 mmx_t round1 = {0x0001000100010001LL};
 mmx_t round4 = {0x0002000200020002LL};
 
@@ -67,25 +67,25 @@ mmx_t round4 = {0x0002000200020002LL};
 
 static inline void mmx_zero_reg ()
 {
-    // load 0 into mm0
+    /* load 0 into mm0 */
     pxor_r2r (mm0, mm0);
 }
 
 static inline void mmx_average_2_U8 (yuv_data_t * dest,
                                      yuv_data_t * src1, yuv_data_t * src2)
 {
-    //
-    // *dest = (*src1 + *src2 + 1)/ 2;
-    //
+    /*
+     * *dest = (*src1 + *src2 + 1)/ 2;
+     */
     static mmx_t mask1 = {0x0101010101010101LL};
     static mmx_t mask7f = {0x7f7f7f7f7f7f7f7fLL};
 
-    movq_m2r (*src1, mm1);        // load 8 src1 bytes
+    movq_m2r (*src1, mm1);        /* load 8 src1 bytes */
     movq_r2r (mm1, mm2);
     psrlq_i2r (1, mm1);
     pand_m2r (mask7f, mm1);
 
-    movq_m2r (*src2, mm3);        // load 8 src2 bytes
+    movq_m2r (*src2, mm3);        /* load 8 src2 bytes */
     por_r2r (mm3, mm2);
     psrlq_i2r (1, mm3);
     pand_m2r (mask7f, mm3);
@@ -93,179 +93,179 @@ static inline void mmx_average_2_U8 (yuv_data_t * dest,
     paddb_r2r (mm1, mm3);
     pand_m2r (mask1, mm2);
     paddb_r2r (mm3, mm2);
-    movq_r2m (mm2, *dest);        // store result in dest
+    movq_r2m (mm2, *dest);        /* store result in dest */
 }
 
 static inline void mmx_interp_average_2_U8 (yuv_data_t * dest,
                                             yuv_data_t * src1, yuv_data_t * src2)
 {
-    //
-    // *dest = (*dest + (*src1 + *src2 + 1)/ 2 + 1)/ 2;
-    //
+    /*
+     * *dest = (*dest + (*src1 + *src2 + 1)/ 2 + 1)/ 2;
+     */
 
-    movq_m2r (*dest, mm1);        // load 8 dest bytes
-    movq_r2r (mm1, mm2);        // copy 8 dest bytes
+    movq_m2r (*dest, mm1);        /* load 8 dest bytes */
+    movq_r2r (mm1, mm2);        /* copy 8 dest bytes */
 
-    movq_m2r (*src1, mm3);        // load 8 src1 bytes
-    movq_r2r (mm3, mm4);        // copy 8 src1 bytes
+    movq_m2r (*src1, mm3);        /* load 8 src1 bytes */
+    movq_r2r (mm3, mm4);        /* copy 8 src1 bytes */
 
-    movq_m2r (*src2, mm5);        // load 8 src2 bytes
-    movq_r2r (mm5, mm6);        // copy 8 src2 bytes
+    movq_m2r (*src2, mm5);        /* load 8 src2 bytes */
+    movq_r2r (mm5, mm6);        /* copy 8 src2 bytes */
 
-    punpcklbw_r2r (mm0, mm1);        // unpack low dest bytes
-    punpckhbw_r2r (mm0, mm2);        // unpack high dest bytes
+    punpcklbw_r2r (mm0, mm1);        /* unpack low dest bytes */
+    punpckhbw_r2r (mm0, mm2);        /* unpack high dest bytes */
 
-    punpcklbw_r2r (mm0, mm3);        // unpack low src1 bytes
-    punpckhbw_r2r (mm0, mm4);        // unpack high src1 bytes
+    punpcklbw_r2r (mm0, mm3);        /* unpack low src1 bytes */
+    punpckhbw_r2r (mm0, mm4);        /* unpack high src1 bytes */
 
-    punpcklbw_r2r (mm0, mm5);        // unpack low src2 bytes
-    punpckhbw_r2r (mm0, mm6);        // unpack high src2 bytes
+    punpcklbw_r2r (mm0, mm5);        /* unpack low src2 bytes */
+    punpckhbw_r2r (mm0, mm6);        /* unpack high src2 bytes */
 
-    paddw_r2r (mm5, mm3);        // add lows
+    paddw_r2r (mm5, mm3);        /* add lows */
     paddw_m2r (round1, mm3);
-    psraw_i2r (1, mm3);                // /2
+    psraw_i2r (1, mm3);                /* /2 */
 
-    paddw_r2r (mm6, mm4);        // add highs
+    paddw_r2r (mm6, mm4);        /* add highs */
     paddw_m2r (round1, mm4);
-    psraw_i2r (1, mm4);                // /2
+    psraw_i2r (1, mm4);                /* /2 */
 
-    paddw_r2r (mm3, mm1);        // add lows
+    paddw_r2r (mm3, mm1);        /* add lows */
     paddw_m2r (round1, mm1);
-    psraw_i2r (1, mm1);                // /2
+    psraw_i2r (1, mm1);                /* /2 */
 
-    paddw_r2r (mm4, mm2);        // add highs
+    paddw_r2r (mm4, mm2);        /* add highs */
     paddw_m2r (round1, mm2);
-    psraw_i2r (1, mm2);                // /2
+    psraw_i2r (1, mm2);                /* /2 */
 
-    packuswb_r2r (mm2, mm1);        // pack (w/ saturation)
-    movq_r2m (mm1, *dest);        // store result in dest
+    packuswb_r2r (mm2, mm1);        /* pack (w/ saturation) */
+    movq_r2m (mm1, *dest);        /* store result in dest */
 }
 
 static inline void mmx_average_4_U8 (yuv_data_t * dest,
                                      yuv_data_t * src1, yuv_data_t * src2,
                                      yuv_data_t * src3, yuv_data_t * src4)
 {
-    //
-    // *dest = (*src1 + *src2 + *src3 + *src4 + 2)/ 4;
-    //
+    /*
+     * *dest = (*src1 + *src2 + *src3 + *src4 + 2)/ 4;
+     */
 
-    movq_m2r (*src1, mm1);        // load 8 src1 bytes
-    movq_r2r (mm1, mm2);        // copy 8 src1 bytes
+    movq_m2r (*src1, mm1);        /* load 8 src1 bytes */
+    movq_r2r (mm1, mm2);        /* copy 8 src1 bytes */
 
-    punpcklbw_r2r (mm0, mm1);        // unpack low src1 bytes
-    punpckhbw_r2r (mm0, mm2);        // unpack high src1 bytes
+    punpcklbw_r2r (mm0, mm1);        /* unpack low src1 bytes */
+    punpckhbw_r2r (mm0, mm2);        /* unpack high src1 bytes */
 
-    movq_m2r (*src2, mm3);        // load 8 src2 bytes
-    movq_r2r (mm3, mm4);        // copy 8 src2 bytes
+    movq_m2r (*src2, mm3);        /* load 8 src2 bytes */
+    movq_r2r (mm3, mm4);        /* copy 8 src2 bytes */
 
-    punpcklbw_r2r (mm0, mm3);        // unpack low src2 bytes
-    punpckhbw_r2r (mm0, mm4);        // unpack high src2 bytes
+    punpcklbw_r2r (mm0, mm3);        /* unpack low src2 bytes */
+    punpckhbw_r2r (mm0, mm4);        /* unpack high src2 bytes */
 
-    paddw_r2r (mm3, mm1);        // add lows
-    paddw_r2r (mm4, mm2);        // add highs
+    paddw_r2r (mm3, mm1);        /* add lows */
+    paddw_r2r (mm4, mm2);        /* add highs */
 
-    // now have partials in mm1 and mm2
+    /* now have partials in mm1 and mm2 */
 
-    movq_m2r (*src3, mm3);        // load 8 src3 bytes
-    movq_r2r (mm3, mm4);        // copy 8 src3 bytes
+    movq_m2r (*src3, mm3);        /* load 8 src3 bytes */
+    movq_r2r (mm3, mm4);        /* copy 8 src3 bytes */
 
-    punpcklbw_r2r (mm0, mm3);        // unpack low src3 bytes
-    punpckhbw_r2r (mm0, mm4);        // unpack high src3 bytes
+    punpcklbw_r2r (mm0, mm3);        /* unpack low src3 bytes */
+    punpckhbw_r2r (mm0, mm4);        /* unpack high src3 bytes */
 
-    paddw_r2r (mm3, mm1);        // add lows
-    paddw_r2r (mm4, mm2);        // add highs
+    paddw_r2r (mm3, mm1);        /* add lows */
+    paddw_r2r (mm4, mm2);        /* add highs */
 
-    movq_m2r (*src4, mm5);        // load 8 src4 bytes
-    movq_r2r (mm5, mm6);        // copy 8 src4 bytes
+    movq_m2r (*src4, mm5);        /* load 8 src4 bytes */
+    movq_r2r (mm5, mm6);        /* copy 8 src4 bytes */
 
-    punpcklbw_r2r (mm0, mm5);        // unpack low src4 bytes
-    punpckhbw_r2r (mm0, mm6);        // unpack high src4 bytes
+    punpcklbw_r2r (mm0, mm5);        /* unpack low src4 bytes */
+    punpckhbw_r2r (mm0, mm6);        /* unpack high src4 bytes */
 
-    paddw_r2r (mm5, mm1);        // add lows
-    paddw_r2r (mm6, mm2);        // add highs
+    paddw_r2r (mm5, mm1);        /* add lows */
+    paddw_r2r (mm6, mm2);        /* add highs */
 
-    // now have subtotal in mm1 and mm2
+    /* now have subtotal in mm1 and mm2 */
 
     paddw_m2r (round4, mm1);
-    psraw_i2r (2, mm1);                // /4
+    psraw_i2r (2, mm1);                /* /4 */
     paddw_m2r (round4, mm2);
-    psraw_i2r (2, mm2);                // /4
+    psraw_i2r (2, mm2);                /* /4 */
 
-    packuswb_r2r (mm2, mm1);        // pack (w/ saturation)
-    movq_r2m (mm1, *dest);        // store result in dest
+    packuswb_r2r (mm2, mm1);        /* pack (w/ saturation) */
+    movq_r2m (mm1, *dest);        /* store result in dest */
 }
 
 static inline void mmx_interp_average_4_U8 (yuv_data_t * dest,
                                             yuv_data_t * src1, yuv_data_t * src2,
                                             yuv_data_t * src3, yuv_data_t * src4)
 {
-    //
-    // *dest = (*dest + (*src1 + *src2 + *src3 + *src4 + 2)/ 4 + 1)/ 2;
-    //
+    /*
+     * *dest = (*dest + (*src1 + *src2 + *src3 + *src4 + 2)/ 4 + 1)/ 2;
+     */
 
-    movq_m2r (*src1, mm1);        // load 8 src1 bytes
-    movq_r2r (mm1, mm2);        // copy 8 src1 bytes
+    movq_m2r (*src1, mm1);        /* load 8 src1 bytes */
+    movq_r2r (mm1, mm2);        /* copy 8 src1 bytes */
 
-    punpcklbw_r2r (mm0, mm1);        // unpack low src1 bytes
-    punpckhbw_r2r (mm0, mm2);        // unpack high src1 bytes
+    punpcklbw_r2r (mm0, mm1);        /* unpack low src1 bytes */
+    punpckhbw_r2r (mm0, mm2);        /* unpack high src1 bytes */
 
-    movq_m2r (*src2, mm3);        // load 8 src2 bytes
-    movq_r2r (mm3, mm4);        // copy 8 src2 bytes
+    movq_m2r (*src2, mm3);        /* load 8 src2 bytes */
+    movq_r2r (mm3, mm4);        /* copy 8 src2 bytes */
 
-    punpcklbw_r2r (mm0, mm3);        // unpack low src2 bytes
-    punpckhbw_r2r (mm0, mm4);        // unpack high src2 bytes
+    punpcklbw_r2r (mm0, mm3);        /* unpack low src2 bytes */
+    punpckhbw_r2r (mm0, mm4);        /* unpack high src2 bytes */
 
-    paddw_r2r (mm3, mm1);        // add lows
-    paddw_r2r (mm4, mm2);        // add highs
+    paddw_r2r (mm3, mm1);        /* add lows */
+    paddw_r2r (mm4, mm2);        /* add highs */
 
-    // now have partials in mm1 and mm2
+    /* now have partials in mm1 and mm2 */
 
-    movq_m2r (*src3, mm3);        // load 8 src3 bytes
-    movq_r2r (mm3, mm4);        // copy 8 src3 bytes
+    movq_m2r (*src3, mm3);        /* load 8 src3 bytes */
+    movq_r2r (mm3, mm4);        /* copy 8 src3 bytes */
 
-    punpcklbw_r2r (mm0, mm3);        // unpack low src3 bytes
-    punpckhbw_r2r (mm0, mm4);        // unpack high src3 bytes
+    punpcklbw_r2r (mm0, mm3);        /* unpack low src3 bytes */
+    punpckhbw_r2r (mm0, mm4);        /* unpack high src3 bytes */
 
-    paddw_r2r (mm3, mm1);        // add lows
-    paddw_r2r (mm4, mm2);        // add highs
+    paddw_r2r (mm3, mm1);        /* add lows */
+    paddw_r2r (mm4, mm2);        /* add highs */
 
-    movq_m2r (*src4, mm5);        // load 8 src4 bytes
-    movq_r2r (mm5, mm6);        // copy 8 src4 bytes
+    movq_m2r (*src4, mm5);        /* load 8 src4 bytes */
+    movq_r2r (mm5, mm6);        /* copy 8 src4 bytes */
 
-    punpcklbw_r2r (mm0, mm5);        // unpack low src4 bytes
-    punpckhbw_r2r (mm0, mm6);        // unpack high src4 bytes
+    punpcklbw_r2r (mm0, mm5);        /* unpack low src4 bytes */
+    punpckhbw_r2r (mm0, mm6);        /* unpack high src4 bytes */
 
-    paddw_r2r (mm5, mm1);        // add lows
-    paddw_r2r (mm6, mm2);        // add highs
+    paddw_r2r (mm5, mm1);        /* add lows */
+    paddw_r2r (mm6, mm2);        /* add highs */
 
     paddw_m2r (round4, mm1);
-    psraw_i2r (2, mm1);                // /4
+    psraw_i2r (2, mm1);                /* /4 */
     paddw_m2r (round4, mm2);
-    psraw_i2r (2, mm2);                // /4
+    psraw_i2r (2, mm2);                /* /4 */
 
-    // now have subtotal/4 in mm1 and mm2
+    /* now have subtotal/4 in mm1 and mm2 */
 
-    movq_m2r (*dest, mm3);        // load 8 dest bytes
-    movq_r2r (mm3, mm4);        // copy 8 dest bytes
+    movq_m2r (*dest, mm3);        /* load 8 dest bytes */
+    movq_r2r (mm3, mm4);        /* copy 8 dest bytes */
 
-    punpcklbw_r2r (mm0, mm3);        // unpack low dest bytes
-    punpckhbw_r2r (mm0, mm4);        // unpack high dest bytes
+    punpcklbw_r2r (mm0, mm3);        /* unpack low dest bytes */
+    punpckhbw_r2r (mm0, mm4);        /* unpack high dest bytes */
 
-    paddw_r2r (mm3, mm1);        // add lows
-    paddw_r2r (mm4, mm2);        // add highs
+    paddw_r2r (mm3, mm1);        /* add lows */
+    paddw_r2r (mm4, mm2);        /* add highs */
 
     paddw_m2r (round1, mm1);
-    psraw_i2r (1, mm1);                // /2
+    psraw_i2r (1, mm1);                /* /2 */
     paddw_m2r (round1, mm2);
-    psraw_i2r (1, mm2);                // /2
+    psraw_i2r (1, mm2);                /* /2 */
 
-    // now have end value in mm1 and mm2
+    /* now have end value in mm1 and mm2 */
 
-    packuswb_r2r (mm2, mm1);        // pack (w/ saturation)
-    movq_r2m (mm1,*dest);        // store result in dest
+    packuswb_r2r (mm2, mm1);        /* pack (w/ saturation) */
+    movq_r2m (mm1,*dest);        /* store result in dest */
 }
 
-//-----------------------------------------------------------------------
+/*-----------------------------------------------------------------------*/
 
 static inline void MC_avg_mmx (int width, int height,
                                yuv_data_t * dest, yuv_data_t * ref, int stride)
@@ -295,7 +295,7 @@ static void MC_avg_8_mmx (yuv_data_t * dest, yuv_data_t * ref,
     MC_avg_mmx (8, height, dest, ref, stride);
 }
 
-//-----------------------------------------------------------------------
+/*-----------------------------------------------------------------------*/
 
 static inline void MC_put_mmx (int width, int height,
                                yuv_data_t * dest, yuv_data_t * ref, int stride)
@@ -303,13 +303,13 @@ static inline void MC_put_mmx (int width, int height,
     mmx_zero_reg ();
 
     do {
-        movq_m2r (* ref, mm1);        // load 8 ref bytes
-        movq_r2m (mm1,* dest);        // store 8 bytes at curr
+        movq_m2r (* ref, mm1);        /* load 8 ref bytes */
+        movq_r2m (mm1,* dest);        /* store 8 bytes at curr */
 
         if (width == 16)
             {
-                movq_m2r (* (ref+8), mm1);        // load 8 ref bytes
-                movq_r2m (mm1,* (dest+8));        // store 8 bytes at curr
+                movq_m2r (* (ref+8), mm1);        /* load 8 ref bytes */
+                movq_r2m (mm1,* (dest+8));        /* store 8 bytes at curr */
             }
 
         dest += stride;
@@ -329,9 +329,9 @@ static void MC_put_8_mmx (yuv_data_t * dest, yuv_data_t * ref,
     MC_put_mmx (8, height, dest, ref, stride);
 }
 
-//-----------------------------------------------------------------------
+/*-----------------------------------------------------------------------*/
 
-// Half pixel interpolation in the x direction
+/* Half pixel interpolation in the x direction */
 static inline void MC_avg_x_mmx (int width, int height,
                                  yuv_data_t * dest, yuv_data_t * ref, int stride)
 {
@@ -360,7 +360,7 @@ static void MC_avg_x8_mmx (yuv_data_t * dest, yuv_data_t * ref,
     MC_avg_x_mmx (8, height, dest, ref, stride);
 }
 
-//-----------------------------------------------------------------------
+/*-----------------------------------------------------------------------*/
 
 static inline void MC_put_x_mmx (int width, int height,
                                  yuv_data_t * dest, yuv_data_t * ref, int stride)
@@ -390,7 +390,7 @@ static void MC_put_x8_mmx (yuv_data_t * dest, yuv_data_t * ref,
     MC_put_x_mmx (8, height, dest, ref, stride);
 }
 
-//-----------------------------------------------------------------------
+/*-----------------------------------------------------------------------*/
 
 static inline void MC_avg_xy_8wide_mmx (int height, yuv_data_t * dest,
     yuv_data_t * ref, int stride)
@@ -398,7 +398,7 @@ static inline void MC_avg_xy_8wide_mmx (int height, yuv_data_t * dest,
     pxor_r2r (mm0, mm0);
     movq_m2r (round4, mm7);
 
-    movq_m2r (*ref, mm1);      // calculate first row ref[0] + ref[1]
+    movq_m2r (*ref, mm1);      /* calculate first row ref[0] + ref[1] */
     movq_r2r (mm1, mm2);
 
     punpcklbw_r2r (mm0, mm1);
@@ -417,7 +417,7 @@ static inline void MC_avg_xy_8wide_mmx (int height, yuv_data_t * dest,
 
     do {
 
-        movq_m2r (*ref, mm5);   // calculate next row ref[0] + ref[1]
+        movq_m2r (*ref, mm5);   /* calculate next row ref[0] + ref[1] */
         movq_r2r (mm5, mm6);
 
         punpcklbw_r2r (mm0, mm5);
@@ -432,7 +432,7 @@ static inline void MC_avg_xy_8wide_mmx (int height, yuv_data_t * dest,
         paddw_r2r (mm3, mm5);
         paddw_r2r (mm4, mm6);
 
-        movq_r2r (mm7, mm3);   // calculate round4 + previous row + current row
+        movq_r2r (mm7, mm3);   /* calculate round4 + previous row + current row */
         movq_r2r (mm7, mm4);
 
         paddw_r2r (mm1, mm3);
@@ -441,10 +441,10 @@ static inline void MC_avg_xy_8wide_mmx (int height, yuv_data_t * dest,
         paddw_r2r (mm5, mm3);
         paddw_r2r (mm6, mm4);
 
-        psraw_i2r (2, mm3);                // /4
-        psraw_i2r (2, mm4);                // /4
+        psraw_i2r (2, mm3);                /* /4 */
+        psraw_i2r (2, mm4);                /* /4 */
 
-        movq_m2r (*dest, mm1);   // calculate (subtotal + dest[0] + round1) / 2
+        movq_m2r (*dest, mm1);   /* calculate (subtotal + dest[0] + round1) / 2 */
         movq_r2r (mm1, mm2);
 
         punpcklbw_r2r (mm0, mm1);
@@ -456,13 +456,13 @@ static inline void MC_avg_xy_8wide_mmx (int height, yuv_data_t * dest,
         paddw_m2r (round1, mm3);
         paddw_m2r (round1, mm4);
 
-        psraw_i2r (1, mm3);                // /2
-        psraw_i2r (1, mm4);                // /2
+        psraw_i2r (1, mm3);                /* /2 */
+        psraw_i2r (1, mm4);                /* /2 */
 
-        packuswb_r2r (mm4, mm3);      // pack (w/ saturation)
-       movq_r2m (mm3, *dest);        // store result in dest
+        packuswb_r2r (mm4, mm3);      /* pack (w/ saturation) */
+       movq_r2m (mm3, *dest);        /* store result in dest */
 
-        movq_r2r (mm5, mm1);    // remember current row for the next pass
+        movq_r2r (mm5, mm1);    /* remember current row for the next pass */
         movq_r2r (mm6, mm2);
 
        ref += stride;
@@ -484,7 +484,7 @@ static void MC_avg_xy8_mmx (yuv_data_t * dest, yuv_data_t * ref,
     MC_avg_xy_8wide_mmx(height, dest, ref, stride);
 }
 
-//-----------------------------------------------------------------------
+/*-----------------------------------------------------------------------*/
 
 static inline void MC_put_xy_8wide_mmx (int height, yuv_data_t * dest,
     yuv_data_t * ref, int stride)
@@ -492,7 +492,7 @@ static inline void MC_put_xy_8wide_mmx (int height, yuv_data_t * dest,
     pxor_r2r (mm0, mm0);
     movq_m2r (round4, mm7);
 
-    movq_m2r (*ref, mm1);      // calculate first row ref[0] + ref[1]
+    movq_m2r (*ref, mm1);      /* calculate first row ref[0] + ref[1] */
     movq_r2r (mm1, mm2);
 
     punpcklbw_r2r (mm0, mm1);
@@ -511,7 +511,7 @@ static inline void MC_put_xy_8wide_mmx (int height, yuv_data_t * dest,
 
     do {
 
-        movq_m2r (*ref, mm5);   // calculate next row ref[0] + ref[1]
+        movq_m2r (*ref, mm5);   /* calculate next row ref[0] + ref[1] */
         movq_r2r (mm5, mm6);
 
         punpcklbw_r2r (mm0, mm5);
@@ -526,7 +526,7 @@ static inline void MC_put_xy_8wide_mmx (int height, yuv_data_t * dest,
         paddw_r2r (mm3, mm5);
         paddw_r2r (mm4, mm6);
 
-        movq_r2r (mm7, mm3);   // calculate round4 + previous row + current row
+        movq_r2r (mm7, mm3);   /* calculate round4 + previous row + current row */
         movq_r2r (mm7, mm4);
 
         paddw_r2r (mm1, mm3);
@@ -535,13 +535,13 @@ static inline void MC_put_xy_8wide_mmx (int height, yuv_data_t * dest,
         paddw_r2r (mm5, mm3);
         paddw_r2r (mm6, mm4);
 
-        psraw_i2r (2, mm3);                // /4
-        psraw_i2r (2, mm4);                // /4
+        psraw_i2r (2, mm3);                /* /4 */
+        psraw_i2r (2, mm4);                /* /4 */
 
-        packuswb_r2r (mm4, mm3);      // pack (w/ saturation)
-       movq_r2m (mm3, *dest);        // store result in dest
+        packuswb_r2r (mm4, mm3);      /* pack (w/ saturation) */
+       movq_r2m (mm3, *dest);        /* store result in dest */
 
-        movq_r2r (mm5, mm1);    // advance to the next row
+        movq_r2r (mm5, mm1);    /* advance to the next row */
         movq_r2r (mm6, mm2);
 
        ref += stride;
@@ -563,7 +563,7 @@ static void MC_put_xy8_mmx (yuv_data_t * dest, yuv_data_t * ref,
     MC_put_xy_8wide_mmx(height, dest, ref, stride);
 }
 
-//-----------------------------------------------------------------------
+/*-----------------------------------------------------------------------*/
 
 static inline void MC_avg_y_mmx (int width, int height,
                                  yuv_data_t * dest, yuv_data_t * ref, int stride)
@@ -596,7 +596,7 @@ static void MC_avg_y8_mmx (yuv_data_t * dest, yuv_data_t * ref,
     MC_avg_y_mmx (8, height, dest, ref, stride);
 }
 
-//-----------------------------------------------------------------------
+/*-----------------------------------------------------------------------*/
 
 static inline void MC_put_y_mmx (int width, int height,
                                  yuv_data_t * dest, yuv_data_t * ref, int stride)
index a33b63a135efd6025d510cda399a3c51ababcdca..93dc5d2968e3647d9254fe52cd6ee6ccc3cf2734 100644 (file)
@@ -2,7 +2,7 @@
  * motionmmxext.c : MMX EXT motion compensation module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: motionmmxext.c,v 1.1 2002/08/04 17:23:42 sam Exp $
+ * $Id: motionmmxext.c,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
@@ -56,7 +56,7 @@ vlc_module_end();
 #define CPU_3DNOW 1
 
 
-//CPU_MMXEXT/CPU_3DNOW adaptation layer
+/* CPU_MMXEXT/CPU_3DNOW adaptation layer */
 
 #define pavg_r2r(src,dest)                                                  \
 do {                                                                        \
@@ -75,7 +75,7 @@ do {                                                                        \
 } while (0)
 
 
-//CPU_MMXEXT code
+/* CPU_MMXEXT code */
 
 
 static inline void MC_put1_8 (int height, yuv_data_t * dest, yuv_data_t * ref,
@@ -222,8 +222,8 @@ static inline void MC_put4_8 (int height, yuv_data_t * dest, yuv_data_t * ref,
         movq_r2m (mm0, *dest);
         dest += stride;
 
-        movq_r2r (mm6, mm7);        // unroll !
-        movq_r2r (mm2, mm0);        // unroll !
+        movq_r2r (mm6, mm7);        /* unroll ! */
+        movq_r2r (mm2, mm0);        /* unroll ! */
     } while (--height);
 }
 
index 353a7bc4c8923aa63cb26b6564fd6844290f656a..1aadb2abf0987eeaf40bf4da62b46e1299dd149a 100644 (file)
@@ -2,7 +2,7 @@
  * spdif.c: A52 pass-through to external decoder with enabled soundcard
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: spdif.c,v 1.1 2002/08/04 17:23:42 sam Exp $
+ * $Id: spdif.c,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Stéphane Borel <stef@via.ecp.fr>
  *          Juha Yrjola <jyrjola@cc.hut.fi>
@@ -195,7 +195,7 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
             i_current_pts += i_frame_time;
         }
 
-        // wait a little to avoid an input flood from the a52 input
+        /* wait a little to avoid an input flood from the a52 input */
         mwait( i_current_pts - 500000 );
 
         vlc_mutex_lock (&p_spdif->p_aout_fifo->data_lock);
index 4240897d97ebc8ad2bf5b8543321ddc2b25d43ed..55a6b0a9ef2bf037eef9b826e33812cdc59f15a7 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_audio.c : mpeg_audio Stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: audio.c,v 1.2 2002/08/07 00:29:36 sam Exp $
+ * $Id: audio.c,v 1.3 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  * 
@@ -272,7 +272,7 @@ static int MPEGAudio_SkipID3Tag( input_thread_t *p_input )
     i_size = (p_peek[6] << 21) +
              (p_peek[7] << 14) +
              (p_peek[8] << 7) +
-             p_peek[9];  //Is this safe?
+             p_peek[9];  /* Is this safe? */
     if ( b_footer )
     {
         i_size += 10;
@@ -285,7 +285,7 @@ static int MPEGAudio_SkipID3Tag( input_thread_t *p_input )
         return( -1 );
     }
         
-    p_input->p_current_data += i_size; //seek passed end of ID3 tag
+    p_input->p_current_data += i_size; /* seek passed end of ID3 tag */
 
     return (0);
 }
index 63f956c1d3653d3b96293f295046b6093003f67b..e71fabd797585595ca4b8498788cf530edd214f2 100644 (file)
@@ -29,8 +29,6 @@
 #include "playlist.h"\r
 #include "preferences.h"\r
 \r
-VLC_DECLARE_STRUCT(es_descriptor_t)\r
-\r
 /*****************************************************************************\r
  * The TrackBar is graduated from 0 to SLIDER_MAX_VALUE.\r
  * SLIDER_MAX_VALUE is set to the higher acceptable value (2^31 - 1), in order\r
index 07068e98d742152c57a613390b27c83d2817965e..d65ca2d2dbf2dac76743404c6a1a510bb533dc74 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * fastmemcpy.h : fast memcpy routines
  *****************************************************************************
- * $Id: fastmemcpy.h,v 1.1 2002/08/04 17:23:43 sam Exp $
+ * $Id: fastmemcpy.h,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: various Linux kernel hackers
  *          various MPlayer hackers
@@ -29,9 +29,9 @@
 
 #define BLOCK_SIZE 4096
 #define CONFUSION_FACTOR 0
-//Feel free to fine-tune the above 2, it might be possible to get some speedup with them :)
+/*Feel free to fine-tune the above 2, it might be possible to get some speedup with them :)*/
 
-//#define STATISTICS
+/*#define STATISTICS*/
 
 #ifndef HAVE_SSE2
 /*
@@ -90,8 +90,8 @@ data.
 If you have questions please contact with me: Nick Kurshev: nickols_k@mail.ru.
 */
 
-// 3dnow memcpy support from kernel 2.4.2
-//  by Pontscho/fresh!mindworkz
+/* 3dnow memcpy support from kernel 2.4.2 */
+/*  by Pontscho/fresh!mindworkz           */
 
 #if defined( HAVE_MMX2 ) || defined( HAVE_3DNOW ) || defined( HAVE_MMX )
 
@@ -128,7 +128,7 @@ __asm__ __volatile__(\
 #ifdef HAVE_SSE
 #define MMREG_SIZE 16
 #else
-#define MMREG_SIZE 64 //8
+#define MMREG_SIZE 64 /*8*/
 #endif
 
 /* Small defines (for readability only) ;) */
@@ -245,7 +245,7 @@ void * fast_memcpy(void * to, const void * from, size_t len)
                ((unsigned char *)to)+=64;
        }
 #else
-       // Align destination at BLOCK_SIZE boundary
+       /* Align destination at BLOCK_SIZE boundary */
        for(; ((int)to & (BLOCK_SIZE-1)) && i>0; i--)
        {
                __asm__ __volatile__ (
@@ -269,12 +269,12 @@ void * fast_memcpy(void * to, const void * from, size_t len)
                MOVNTQ" %%mm6, 48(%1)\n"
                MOVNTQ" %%mm7, 56(%1)\n"
                :: "r" (from), "r" (to) : "memory");
-               ((const unsigned char *)from)+=64;
-               ((unsigned char *)to)+=64;
+                from = (const void *) (((const unsigned char *)from)+64);
+               to = (void *) (((unsigned char *)to)+64);
        }
 
-//     printf(" %d %d\n", (int)from&1023, (int)to&1023);
-       // Pure Assembly cuz gcc is a bit unpredictable ;)
+/*     printf(" %d %d\n", (int)from&1023, (int)to&1023); */
+       /* Pure Assembly cuz gcc is a bit unpredictable ;) */
 # if 0
        if(i>=BLOCK_SIZE/64)
                asm volatile(
@@ -314,7 +314,7 @@ void * fast_memcpy(void * to, const void * from, size_t len)
                                "jb 2b                          \n\t"
 
 #if CONFUSION_FACTOR > 0
-       // a few percent speedup on out of order executing CPUs
+       /* a few percent speedup on out of order executing CPUs */
                        "movl %5, %%eax         \n\t"
                                "2:                     \n\t"
                                "movl (%0), %%ebx       \n\t"
@@ -360,8 +360,8 @@ void * fast_memcpy(void * to, const void * from, size_t len)
                MOVNTQ" %%mm6, 48(%1)\n"
                MOVNTQ" %%mm7, 56(%1)\n"
                :: "r" (from), "r" (to) : "memory");
-               ((const unsigned char *)from)+=64;
-               ((unsigned char *)to)+=64;
+               from = (const void *) (((const unsigned char *)from)+64);
+               to = (void *) (((unsigned char *)to)+64);
        }
 
 #endif /* Have SSE */
index 83ba7cde0b7dd9a6dd1ba06fa86a4fe2c6d673e8..7c5188f249683b100c525221ddd064864a4ab13d 100644 (file)
@@ -2,7 +2,7 @@
  * ipv4.c: IPv4 network abstraction layer
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: ipv4.c,v 1.1 2002/08/04 17:23:43 sam Exp $
+ * $Id: ipv4.c,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Mathias Kretschmer <mathias@research.att.com>
@@ -100,7 +100,6 @@ static int BuildAddr( struct sockaddr_in * p_socket,
             /* We have a fqdn, try to find its address */
             if ( (p_hostent = gethostbyname( psz_address )) == NULL )
             {
-//X                intf_ErrMsg( "BuildLocalAddr: unknown host %s", psz_address );
                 return( -1 );
             }
 
index e2323bde6ec1bc8f9559e9e247444ce8adfa17cc..e76b52a95be1cfa4930276a8fb98e94453f7708f 100644 (file)
@@ -2,7 +2,7 @@
  * ipv6.c: IPv6 network abstraction layer
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: ipv6.c,v 1.1 2002/08/04 17:23:43 sam Exp $
+ * $Id: ipv6.c,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Alexis Guillard <alexis.guillard@bt.com>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -111,7 +111,7 @@ static int BuildAddr( struct sockaddr_in6 * p_socket,
     }
     if( !_getaddrinfo || !_freeaddrinfo )
     {
-//X        msg_Err( p_this, "no IPv6 stack installed" );
+        /* msg_Err( p_this, "no IPv6 stack installed" ); */
         if( wship6_dll ) FreeLibrary( wship6_dll );
         return( -1 );
     }
@@ -134,17 +134,20 @@ static int BuildAddr( struct sockaddr_in6 * p_socket,
         {
             *psz_multicast_interface = '\0';
             psz_multicast_interface++;
-//X            msg_Dbg( p_this, "Interface name specified: \"%s\"",
-//                          psz_multicast_interface );
+#if 0
+            msg_Dbg( p_this, "Interface name specified: \"%s\"",
+                             psz_multicast_interface );
+#endif
             /* now convert that interface name to an index */
 #if !defined( WIN32 )
             p_socket->sin6_scope_id = if_nametoindex(psz_multicast_interface);
 #else
             /* FIXME: for now we always use the default interface */
             p_socket->sin6_scope_id = 0;
-//X            msg_Warn( 3, "Using default interface. This has to be FIXED!");
 #endif
-//X            msg_Warn( p_this, " = #%i\n", p_socket->sin6_scope_id );
+#if 0
+            msg_Warn( p_this, " = #%i\n", p_socket->sin6_scope_id );
+#endif
         }
         psz_address[strlen(psz_address) - 1] = '\0' ;
 
@@ -176,7 +179,9 @@ static int BuildAddr( struct sockaddr_in6 * p_socket,
         /* We have a fqdn, try to find its address */
         if ( (p_hostent = gethostbyname2( psz_address, AF_INET6 )) == NULL )
         {
-//X            intf_ErrMsg( "ipv6 error: unknown host %s", psz_address );
+#if 0
+            intf_ErrMsg( "ipv6 error: unknown host %s", psz_address );
+#endif
             return( -1 );
         }
 
@@ -196,7 +201,9 @@ static int BuildAddr( struct sockaddr_in6 * p_socket,
         _freeaddrinfo( res );
 
 #else
-//X        intf_ErrMsg( "ipv6 error: IPv6 address %s is invalid", psz_address );
+#if 0
+        intf_ErrMsg( "ipv6 error: IPv6 address %s is invalid", psz_address );
+#endif
         return( -1 );
 #endif
     }
@@ -228,14 +235,10 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
     char * psz_server_addr = p_socket->psz_server_addr;
     int i_server_port = p_socket->i_server_port;
 
-    int i_handle, i_opt, i_opt_size;
+    int i_handle, i_opt;
+    unsigned int i_opt_size;
     struct sockaddr_in6 sock;
 
-    if( i_bind_port == 0 )
-    {
-//X        i_bind_port = config_GetInt( "server-port" );
-    }
-
     /* Open a SOCK_DGRAM (UDP) socket, in the AF_INET6 domain, automatic (0)
      * protocol */
     if( (i_handle = socket( AF_INET6, SOCK_DGRAM, 0 )) == -1 )
@@ -322,7 +325,7 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
 
         if( res == -1 )
         {
-//X            intf_ErrMsg( "ipv6 error: setsockopt JOIN_GROUP failed" );
+            msg_Err( p_this, "setsockopt JOIN_GROUP failed" );
         }
     }
 
index 252c47c376784644a231a0e8ca46a7cbb9c61053..d021dd49e0e79e3760f675a9a149d95d74af3007 100644 (file)
@@ -2,7 +2,7 @@
  * transforms_yuvmmx.h: MMX YUV transformation assembly
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: i420_rgb_mmx.h,v 1.1 2002/08/04 17:23:43 sam Exp $
+ * $Id: i420_rgb_mmx.h,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Olie Lho <ollie@sis.com.tw>
  *          Gaël Hendryckx <jimmy@via.ecp.fr>
  *****************************************************************************/
 
 /* hope these constant values are cache line aligned */
-#define UNUSED_LONGLONG(foo) \
-    static const unsigned long long foo __asm__ (#foo) __attribute__((unused))
-UNUSED_LONGLONG(mmx_80w)     = 0x0080008000800080;
-UNUSED_LONGLONG(mmx_10w)     = 0x1010101010101010;
-UNUSED_LONGLONG(mmx_00ffw)   = 0x00ff00ff00ff00ff;
-UNUSED_LONGLONG(mmx_Y_coeff) = 0x253f253f253f253f;
+#define UNUSED_U64(foo) \
+    static const u64 foo __asm__ (#foo) __attribute__((unused))
+UNUSED_U64(mmx_80w)     = 0x0080008000800080;
+UNUSED_U64(mmx_10w)     = 0x1010101010101010;
+UNUSED_U64(mmx_00ffw)   = 0x00ff00ff00ff00ff;
+UNUSED_U64(mmx_Y_coeff) = 0x253f253f253f253f;
 
-UNUSED_LONGLONG(mmx_U_green) = 0xf37df37df37df37d;
-UNUSED_LONGLONG(mmx_U_blue)  = 0x4093409340934093;
-UNUSED_LONGLONG(mmx_V_red)   = 0x3312331233123312;
-UNUSED_LONGLONG(mmx_V_green) = 0xe5fce5fce5fce5fc;
+UNUSED_U64(mmx_U_green) = 0xf37df37df37df37d;
+UNUSED_U64(mmx_U_blue)  = 0x4093409340934093;
+UNUSED_U64(mmx_V_red)   = 0x3312331233123312;
+UNUSED_U64(mmx_V_green) = 0xe5fce5fce5fce5fc;
 
-UNUSED_LONGLONG(mmx_mask_f8) = 0xf8f8f8f8f8f8f8f8;
-UNUSED_LONGLONG(mmx_mask_fc) = 0xfcfcfcfcfcfcfcfc;
-#undef UNUSED_LONGLONG
+UNUSED_U64(mmx_mask_f8) = 0xf8f8f8f8f8f8f8f8;
+UNUSED_U64(mmx_mask_fc) = 0xfcfcfcfcfcfcfcfc;
+#undef UNUSED_U64
 
 #define MMX_INIT_16 "                                                       \n\
 movd      (%1), %%mm0       # Load 4 Cb       00 00 00 00 u3 u2 u1 u0       \n\
index 179958d3eab33b2f9103371e5a12364dd53d61cb..99e60dde2cbf945ba4e2d3edfab199f799eed28b 100644 (file)
@@ -2,7 +2,7 @@
  * xcommon.h: Defines common to the X11 and XVideo plugins
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: xcommon.h,v 1.1 2002/08/04 17:23:44 sam Exp $
+ * $Id: xcommon.h,v 1.2 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
 #   define IMAGE_FREE     XDestroyImage
 #endif
 
-VLC_DECLARE_STRUCT(x11_window_t)
-
 /*****************************************************************************
  * x11_window_t: X11 window descriptor
  *****************************************************************************
  * This structure contains all the data necessary to describe an X11 window.
  *****************************************************************************/
-struct x11_window_t
+typedef struct x11_window_t
 {
     Window              base_window;                          /* base window */
     Window              video_window;     /* sub-window for displaying video */
@@ -57,7 +55,8 @@ struct x11_window_t
     int                 i_height;                   /* height of main window */
     Atom                wm_protocols;
     Atom                wm_delete_window;
-};
+
+} x11_window_t;
 
 /*****************************************************************************
  * vout_sys_t: video output method descriptor
diff --git a/src/audio_output/aout_ext-dec.c b/src/audio_output/aout_ext-dec.c
new file mode 100644 (file)
index 0000000..cbdf1c5
--- /dev/null
@@ -0,0 +1,194 @@
+/*****************************************************************************
+ * aout_ext-dec.c : exported fifo management functions
+ *****************************************************************************
+ * Copyright (C) 1999-2001 VideoLAN
+ * $Id: aout_ext-dec.c,v 1.20 2002/08/08 00:35:11 sam Exp $
+ *
+ * Authors: Michel Kaempf <maxx@via.ecp.fr>
+ *          Cyril Deguet <asmax@via.ecp.fr>
+ *
+ * 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.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <stdlib.h>                            /* calloc(), malloc(), free() */
+#include <string.h>
+
+#include <vlc/vlc.h>
+
+#include "audio_output.h"
+
+/*****************************************************************************
+ * aout_CreateFifo
+ *****************************************************************************/
+aout_fifo_t * __aout_CreateFifo( vlc_object_t *p_this, int i_format,
+                                 int i_channels, int i_rate, int i_frame_size,
+                                 void *p_buffer )
+{
+    aout_thread_t *p_aout;
+    aout_fifo_t   *p_fifo = NULL;
+    int i_index;
+
+    /* Spawn an audio output if there is none */
+    p_aout = vlc_object_find( p_this, VLC_OBJECT_AOUT, FIND_ANYWHERE );
+
+    if( p_aout )
+    {
+        if( p_aout->fifo[0].i_format != i_format )
+        {
+            msg_Dbg( p_this, "changing aout type" );
+            vlc_object_detach_all( p_aout );
+            vlc_object_release( p_aout );
+            aout_DestroyThread( p_aout );
+            p_aout = NULL;
+        }
+    }
+
+    if( p_aout == NULL )
+    {
+        msg_Dbg( p_this, "no aout present, spawning one" );
+
+        p_aout = aout_CreateThread( p_this, i_channels, i_rate );
+        /* Everything failed */
+        if( p_aout == NULL )
+        {
+            return NULL;
+        }
+    }
+
+    /* temporary hack to switch output type (mainly for spdif)
+     * FIXME: to be adapted when several output are available */
+    /* Take the fifos lock */
+    vlc_mutex_lock( &p_aout->fifos_lock );
+
+    /* Look for a free fifo structure */
+    for( i_index = 0; i_index < AOUT_MAX_FIFOS; i_index++ )
+    {
+        if( p_aout->fifo[i_index].i_format == AOUT_FIFO_NONE )
+        {
+            p_fifo = &p_aout->fifo[i_index];
+            p_fifo->i_fifo = i_index;
+            break;
+        }
+    }
+
+    if( p_fifo == NULL )
+    {
+        msg_Err( p_aout, "no fifo available" );
+        vlc_mutex_unlock( &p_aout->fifos_lock );
+        return NULL;
+    }
+
+    /* Initialize the new fifo structure */
+    switch ( p_fifo->i_format = i_format )
+    {
+        case AOUT_FIFO_PCM:
+        case AOUT_FIFO_SPDIF:
+            p_fifo->b_die = 0;
+
+            p_fifo->i_channels = i_channels;
+            p_fifo->i_rate = i_rate;
+            p_fifo->i_frame_size = i_frame_size;
+
+            p_fifo->i_unit_limit = (AOUT_FIFO_SIZE + 1)
+                                     * (i_frame_size / i_channels);
+
+            /* Allocate the memory needed to store the audio frames and their
+             * dates. As the fifo is a rotative fifo, we must be able to find
+             * out whether the fifo is full or empty, that's why we must in
+             * fact allocate memory for (AOUT_FIFO_SIZE+1) audio frames. */
+            p_fifo->date = malloc( ( sizeof(s16) * i_frame_size 
+                                      + sizeof(mtime_t) )
+                                   * ( AOUT_FIFO_SIZE + 1 ) );
+            if ( p_fifo->date == NULL )
+            {
+                msg_Err( p_aout, "out of memory" );
+                p_fifo->i_format = AOUT_FIFO_NONE;
+                vlc_mutex_unlock( &p_aout->fifos_lock );
+                return NULL;
+            }
+
+            p_fifo->buffer = (u8 *)p_fifo->date + sizeof(mtime_t)
+                                                     * ( AOUT_FIFO_SIZE + 1 );
+
+            /* Set the fifo's buffer as empty (the first frame that is to be
+             * played is also the first frame that is not to be played) */
+            p_fifo->i_start_frame = 0;
+            /* p_fifo->i_next_frame = 0; */
+            p_fifo->i_end_frame = 0;
+
+            /* Waiting for the audio decoder to compute enough frames to work
+             * out the fifo's current rate (as soon as the decoder has decoded
+             * enough frames, the members of the fifo structure that are not
+             * initialized now will be calculated) */
+            p_fifo->b_start_frame = 0;
+            p_fifo->b_next_frame = 0;
+            break;
+
+        default:
+            msg_Err( p_aout, "unknown fifo type 0x%x", p_fifo->i_format );
+            p_fifo->i_format = AOUT_FIFO_NONE;
+            vlc_mutex_unlock( &p_aout->fifos_lock );
+            return NULL;
+    }
+
+    /* Release the fifos lock */
+    vlc_mutex_unlock( &p_aout->fifos_lock );
+
+    msg_Dbg( p_aout, "fifo #%i allocated, %i channels, rate %li, "
+                     "frame size %i", p_fifo->i_fifo, p_fifo->i_channels,
+                     p_fifo->i_rate, p_fifo->i_frame_size );
+
+    /* Return the pointer to the fifo structure */
+    return p_fifo;
+}
+
+/*****************************************************************************
+ * aout_DestroyFifo
+ *****************************************************************************/
+void aout_DestroyFifo( aout_fifo_t * p_fifo )
+{
+    vlc_mutex_lock( &p_fifo->data_lock );
+    p_fifo->b_die = 1;
+    vlc_mutex_unlock( &p_fifo->data_lock );
+}
+
+/*****************************************************************************
+ * aout_FreeFifo
+ *****************************************************************************/
+void aout_FreeFifo( aout_fifo_t * p_fifo )
+{
+    switch ( p_fifo->i_format )
+    {
+        case AOUT_FIFO_NONE:
+
+            break;
+
+        case AOUT_FIFO_PCM:
+        case AOUT_FIFO_SPDIF:
+
+            free( p_fifo->date );
+            p_fifo->i_format = AOUT_FIFO_NONE;
+
+            break;
+
+        default:
+
+            break;
+    }
+}
+
index a4e8eaf80e1eb8b3c6383a16c5119fbabb55c41c..22844b093e18f7b1c75a077892146381df92eb61 100644 (file)
@@ -2,7 +2,7 @@
  * input_dec.c: Functions for the management of decoders
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: input_dec.c,v 1.42 2002/08/04 20:04:11 sam Exp $
+ * $Id: input_dec.c,v 1.43 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -106,9 +106,9 @@ void input_EndDecoder( input_thread_t * p_input, es_descriptor_t * p_es )
     /* Waiting for the thread to exit */
     /* I thought that unlocking was better since thread join can be long
      * but it actually creates late pictures and freezes --stef */
-//    vlc_mutex_unlock( &p_input->stream.stream_lock );
+    /* vlc_mutex_unlock( &p_input->stream.stream_lock ); */
     vlc_thread_join( p_es->p_decoder_fifo );
-//    vlc_mutex_lock( &p_input->stream.stream_lock );
+    /* vlc_mutex_lock( &p_input->stream.stream_lock ); */
 
     /* Delete decoder configuration */
     DeleteDecoderFifo( p_es->p_decoder_fifo );
index 5c89a12d8a6a484a64a34536f1f396706ac3f90a..6d0bef06065264d3616f5e9abcab186da3bb2bbc 100644 (file)
@@ -2,7 +2,7 @@
  * libvlc.c: main libvlc source
  *****************************************************************************
  * Copyright (C) 1998-2002 VideoLAN
- * $Id: libvlc.c,v 1.21 2002/08/07 21:36:56 massiot Exp $
+ * $Id: libvlc.c,v 1.22 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -765,7 +765,7 @@ vlc_error_t vlc_destroy_r( vlc_t *p_vlc )
     if( i_index == i_vlc )
     {
         fprintf( stderr, "error: trying to unregister %p which is not in "
-                         "the list\n", p_vlc );
+                         "the list\n", (void *)p_vlc );
         vlc_mutex_unlock( p_vlc->p_global_lock );
         vlc_object_destroy( p_vlc );
         return VLC_EGENERIC;
index ea8fdf5d2ca7fa70f343989e0fed14e46db7d97b..5011f38ae97d559dda9266b76c6019a1ad63fb04 100644 (file)
@@ -2,7 +2,7 @@
  * libvlc.h: main libvlc header
  *****************************************************************************
  * Copyright (C) 1998-2002 VideoLAN
- * $Id: libvlc.h,v 1.11 2002/08/07 21:36:56 massiot Exp $
+ * $Id: libvlc.h,v 1.12 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
     "\n                                 VCD device" \
     "\n  udpstream:[@[<bind address>][:<bind port>]]" \
     "\n                                 UDP stream sent by VLS" \
-    "\n  vlc:loop                       loop execution of the " \
-    "playlist" \
     "\n  vlc:pause                      pause execution of " \
     "playlist items" \
     "\n  vlc:quit                       quit VLC" \
index 160550e9591bdd9e6fc291610655ed5b8ea341e2..95bc13217c5bf346f6db28e8bad3c45be3f69459 100644 (file)
@@ -2,7 +2,7 @@
  * configuration.c management of the modules configuration
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: configuration.c,v 1.34 2002/08/07 00:29:37 sam Exp $
+ * $Id: configuration.c,v 1.35 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -511,8 +511,10 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name )
                 !memcmp( &line[1], p_module->psz_object_name,
                          strlen(p_module->psz_object_name) ) )
             {
-                //msg_Dbg( p_this, "loading config for module \"%s\"",
-                //                 p_module->psz_object_name );
+#if 0
+                msg_Dbg( p_this, "loading config for module \"%s\"",
+                                 p_module->psz_object_name );
+#endif
 
                 break;
             }
@@ -560,16 +562,20 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name )
                         if( !*psz_option_value )
                             break;                    /* ignore empty option */
                         p_item->i_value = atoi( psz_option_value);
-                        //msg_Dbg( p_this, "option \"%s\", value %i",
-                        //         p_item->psz_name, p_item->i_value );
+#if 0
+                        msg_Dbg( p_this, "option \"%s\", value %i",
+                                 p_item->psz_name, p_item->i_value );
+#endif
                         break;
 
                     case CONFIG_ITEM_FLOAT:
                         if( !*psz_option_value )
                             break;                    /* ignore empty option */
                         p_item->f_value = (float)atof( psz_option_value);
-                        //msg_Dbg( p_this, "option \"%s\", value %f",
-                        //         p_item->psz_name, (double)p_item->f_value );
+#if O
+                        msg_Dbg( p_this, "option \"%s\", value %f",
+                                 p_item->psz_name, (double)p_item->f_value );
+#endif
                         break;
 
                     default:
@@ -584,9 +590,11 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name )
 
                         vlc_mutex_unlock( p_item->p_lock );
 
-                        //msg_Dbg( p_this, "option \"%s\", value \"%s\"",
-                        //         p_item->psz_name,
-                        //         p_item->psz_value ? p_item->psz_value : "" );
+#if 0
+                        msg_Dbg( p_this, "option \"%s\", value \"%s\"",
+                                 p_item->psz_name,
+                                 p_item->psz_value ? p_item->psz_value : "" );
+#endif
                         break;
                     }
                 }
@@ -1128,7 +1136,6 @@ char *config_GetHomeDir( void )
             p_homedir = (char *)malloc( MAX_PATH );
             if( !p_homedir )
             {
-//X                intf_ErrMsg( "config error: couldn't malloc p_homedir" );
                 return NULL;
             }
 
@@ -1155,15 +1162,11 @@ char *config_GetHomeDir( void )
         {
             if( ( p_tmp = getenv( "TMP" ) ) == NULL )
             {
-                p_homedir = strdup( "/tmp" );
+                p_tmp = "/tmp";
             }
-            else p_homedir = strdup( p_tmp );
-
-//X            intf_ErrMsg( "config error: unable to get home directory, "
-//X                         "using %s instead", p_homedir );
-
         }
-        else p_homedir = strdup( p_tmp );
+
+        p_homedir = strdup( p_tmp );
     }
 #if defined(HAVE_GETPWUID)
     else
index 9795bb00b0902eb2756dfd633299b1b20be95498..0c978a48599614b71c06fa509707d2419d7bcbea 100644 (file)
@@ -4,7 +4,7 @@
  * modules, especially intf modules. See config.h for output configuration.
  *****************************************************************************
  * Copyright (C) 1998-2002 VideoLAN
- * $Id: messages.c,v 1.6 2002/07/31 20:56:53 sam Exp $
+ * $Id: messages.c,v 1.7 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -231,7 +231,8 @@ void __msg_Generic( vlc_object_t *p_this, int i_type, const char *psz_module,
         QueueMsg( (vlc_object_t *)p_this, FN_TYPE, "unknown", \
                   psz_format, args ); \
         va_end( args ); \
-    }
+    } \
+    struct _
 
 DECLARE_MSG_FN( __msg_Info, VLC_MSG_INFO );
 DECLARE_MSG_FN( __msg_Err,  VLC_MSG_ERR );
index 3795cb574d4067e5007f76ab8af297b5f7ba3c5c..9ec6de2cb5a9878c9c5883397690b25363aa9e57 100644 (file)
@@ -2,7 +2,7 @@
  * modules.c : Builtin and plugin modules management functions
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.81 2002/08/07 00:29:37 sam Exp $
+ * $Id: modules.c,v 1.82 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Ethan C. Baldridge <BaldridgeE@cadmus.com>
@@ -770,8 +770,8 @@ static int AllocatePluginFile( vlc_object_t * p_this, char * psz_file )
     p_this->p_vlc->p_module_bank->first = p_module;
     p_this->p_vlc->p_module_bank->i_count++;
 
-    //msg_Dbg( p_this, "plugin \"%s\", %s",
-    //         p_module->psz_object_name, p_module->psz_longname );
+    /msg_Dbg( p_this, "plugin \"%s\", %s",
+                p_module->psz_object_name, p_module->psz_longname ); */
 
     vlc_object_attach( p_module, p_this->p_vlc->p_module_bank );
 
@@ -888,8 +888,8 @@ static int AllocateBuiltinModule( vlc_object_t * p_this,
     p_this->p_vlc->p_module_bank->first = p_module;
     p_this->p_vlc->p_module_bank->i_count++;
 
-    //msg_Dbg( p_this, "builtin \"%s\", %s",
-    //         p_module->psz_object_name, p_module->psz_longname );
+    /msg_Dbg( p_this, "builtin \"%s\", %s",
+                p_module->psz_object_name, p_module->psz_longname ); */
 
     vlc_object_attach( p_module, p_this->p_vlc->p_module_bank );
 
@@ -1113,7 +1113,8 @@ static int CallEntry( module_t * p_module )
     int (* pf_symbol) ( module_t * p_module );
 
     /* Try to resolve the symbol */
-    pf_symbol = module_getsymbol( p_module->handle, psz_name );
+    pf_symbol = (int (*)(module_t *)) module_getsymbol( p_module->handle, 
+                                                        psz_name );
 
     if( pf_symbol == NULL )
     {
index 4bd86bccd786ff43cdc1f8adf3f45c665b031384..00d4963a6dfe60a673d7ba17394e2c393373f18b 100644 (file)
@@ -31,8 +31,7 @@
  * This function loads a dynamically linked library using a system dependant
  * method, and returns a non-zero value on error, zero otherwise.
  *****************************************************************************/
-static inline int module_load( const char * psz_filename,
-                               module_handle_t * handle )
+static int module_load( const char * psz_filename, module_handle_t * handle )
 {
 #ifdef SYS_BEOS
     *handle = load_add_on( psz_filename );
@@ -70,7 +69,7 @@ static inline int module_load( const char * psz_filename,
  * using a system dependant method. No return value is taken in consideration,
  * since some libraries sometimes refuse to close properly.
  *****************************************************************************/
-static inline void module_unload( module_handle_t handle )
+static void module_unload( module_handle_t handle )
 {
 #ifdef SYS_BEOS
     unload_add_on( handle );
@@ -92,8 +91,8 @@ static inline void module_unload( module_handle_t handle )
  * string, and returns a pointer to it. We don't check for dlerror() or
  * similar functions, since we want a non-NULL symbol anyway.
  *****************************************************************************/
-static inline void * _module_getsymbol( module_handle_t handle,
-                                        const char * psz_function )
+static void * _module_getsymbol( module_handle_t handle,
+                                 const char * psz_function )
 {
 #ifdef SYS_BEOS
     void * p_symbol;
@@ -116,8 +115,8 @@ static inline void * _module_getsymbol( module_handle_t handle,
 #endif
 }
 
-static inline void * module_getsymbol( module_handle_t handle,
-                                       const char * psz_function )
+static void * module_getsymbol( module_handle_t handle,
+                                const char * psz_function )
 {
     void * p_symbol = _module_getsymbol( handle, psz_function );
 
@@ -145,7 +144,7 @@ static inline void * module_getsymbol( module_handle_t handle,
  * function. psz_buffer can be used to store temporary data, it is guaranteed
  * to be kept intact until the return value of module_error has been used.
  *****************************************************************************/
-static inline const char * module_error( char *psz_buffer )
+static const char * module_error( char *psz_buffer )
 {
 #if defined(SYS_BEOS)
     return( "failed" );
@@ -185,6 +184,7 @@ static inline const char * module_error( char *psz_buffer )
     (p_symbols)->aout_BufferNew_inner = aout_BufferNew; \
     (p_symbols)->aout_BufferDelete_inner = aout_BufferDelete; \
     (p_symbols)->aout_BufferPlay_inner = aout_BufferPlay; \
+    (p_symbols)->aout_FormatToBytes_inner = aout_FormatToBytes; \
     (p_symbols)->__aout_InputNew_inner = __aout_InputNew; \
     (p_symbols)->aout_InputDelete_inner = aout_InputDelete; \
     (p_symbols)->aout_OutputNextBuffer_inner = aout_OutputNextBuffer; \
index 5eb609b10dd9f243b8ef957b1699f6167ccb52fc..873f4c39a70b465104e8e0666dba867cf4458975 100644 (file)
@@ -2,7 +2,7 @@
  * modules_plugin.h : Plugin management functions used by the core application.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules_plugin.h.in,v 1.2 2002/08/04 12:18:41 sam Exp $
+ * $Id: modules_plugin.h.in,v 1.3 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -31,8 +31,7 @@
  * This function loads a dynamically linked library using a system dependant
  * method, and returns a non-zero value on error, zero otherwise.
  *****************************************************************************/
-static inline int module_load( const char * psz_filename,
-                               module_handle_t * handle )
+static int module_load( const char * psz_filename, module_handle_t * handle )
 {
 #ifdef SYS_BEOS
     *handle = load_add_on( psz_filename );
@@ -70,7 +69,7 @@ static inline int module_load( const char * psz_filename,
  * using a system dependant method. No return value is taken in consideration,
  * since some libraries sometimes refuse to close properly.
  *****************************************************************************/
-static inline void module_unload( module_handle_t handle )
+static void module_unload( module_handle_t handle )
 {
 #ifdef SYS_BEOS
     unload_add_on( handle );
@@ -92,8 +91,8 @@ static inline void module_unload( module_handle_t handle )
  * string, and returns a pointer to it. We don't check for dlerror() or
  * similar functions, since we want a non-NULL symbol anyway.
  *****************************************************************************/
-static inline void * _module_getsymbol( module_handle_t handle,
-                                        const char * psz_function )
+static void * _module_getsymbol( module_handle_t handle,
+                                 const char * psz_function )
 {
 #ifdef SYS_BEOS
     void * p_symbol;
@@ -116,8 +115,8 @@ static inline void * _module_getsymbol( module_handle_t handle,
 #endif
 }
 
-static inline void * module_getsymbol( module_handle_t handle,
-                                       const char * psz_function )
+static void * module_getsymbol( module_handle_t handle,
+                                const char * psz_function )
 {
     void * p_symbol = _module_getsymbol( handle, psz_function );
 
@@ -145,7 +144,7 @@ static inline void * module_getsymbol( module_handle_t handle,
  * function. psz_buffer can be used to store temporary data, it is guaranteed
  * to be kept intact until the return value of module_error has been used.
  *****************************************************************************/
-static inline const char * module_error( char *psz_buffer )
+static const char * module_error( char *psz_buffer )
 {
 #if defined(SYS_BEOS)
     return( "failed" );
index 1d2ae6b9477059e0c1b6364cb73bf98a1d37c26f..f084941f89676e824bf59dc23d47c51790006bd6 100644 (file)
@@ -3,7 +3,7 @@
  * Functions are prototyped in mtime.h.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: mtime.c,v 1.33 2002/07/12 21:57:25 massiot Exp $
+ * $Id: mtime.c,v 1.34 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -73,12 +73,14 @@ int nanosleep(struct timespec *, struct timespec *);
  *****************************************************************************/
 char *mstrtime( char *psz_buffer, mtime_t date )
 {
+    static mtime_t ll1000 = 1000, ll60 = 60, ll24 = 24;
+
     sprintf( psz_buffer, "%02d:%02d:%02d-%03d.%03d",
-             (int) (date / (I64C(1000) * I64C(1000) * I64C(60) * I64C(60)) % I64C(24)),
-             (int) (date / (I64C(1000) * I64C(1000) * I64C(60)) % I64C(60)),
-             (int) (date / (I64C(1000) * I64C(1000)) % I64C(60)),
-             (int) (date / I64C(1000) % I64C(1000)),
-             (int) (date % I64C(1000)) );
+             (int) (date / (ll1000 * ll1000 * ll60 * ll60) % ll24),
+             (int) (date / (ll1000 * ll1000 * ll60) % ll60),
+             (int) (date / (ll1000 * ll1000) % ll60),
+             (int) (date / ll1000 % ll1000),
+             (int) (date % ll1000) );
     return( psz_buffer );
 }
 
index 276293fed32f5aa69f8cfbdf20844ba5d1a9a8ff..bdfcd999c2359ea560e121e848f3a32765dbb4cd 100644 (file)
@@ -2,7 +2,7 @@
  * objects.c: vlc_object_t handling
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: objects.c,v 1.14 2002/08/07 21:36:56 massiot Exp $
+ * $Id: objects.c,v 1.15 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -150,8 +150,6 @@ void * __vlc_object_create( vlc_object_t *p_this, int i_type )
     vlc_mutex_init( p_new, &p_new->object_lock );
     vlc_cond_init( p_new, &p_new->object_wait );
 
-    //msg_Dbg( p_new, "created object" );
-
     return p_new;
 }
 
@@ -204,8 +202,6 @@ void __vlc_object_destroy( vlc_object_t *p_this )
         msleep( 100000 );
     }
 
-    //msg_Dbg( p_this, "destroyed object" );
-
     vlc_mutex_destroy( &p_this->object_lock );
     vlc_cond_destroy( &p_this->object_wait );
 
index b65aa9f9ee5722c0689c1e749c74c531def85158..ac8a3f008ac0e7352a87595af1f74aa6b348a736 100644 (file)
@@ -2,7 +2,7 @@
  * threads.c : threads implementation for the VideoLAN client
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
- * $Id: threads.c,v 1.11 2002/07/29 19:05:47 gbazin Exp $
+ * $Id: threads.c,v 1.12 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -312,8 +312,10 @@ int __vlc_mutex_destroy( char * psz_file, int i_line, vlc_mutex_t *p_mutex )
     int i_return = pthread_mutex_destroy( p_mutex );
     if( i_return )
     {
-//X        intf_ErrMsg( "thread %d error: mutex_destroy failed at %s:%d (%s)",
-//X                     pthread_self(), psz_file, i_line, strerror(i_return) );
+#if 0
+        intf_ErrMsg( "thread %d error: mutex_destroy failed at %s:%d (%s)",
+                     pthread_self(), psz_file, i_line, strerror(i_return) );
+#endif
     }
     return i_return;
 
@@ -434,8 +436,10 @@ int __vlc_cond_destroy( char * psz_file, int i_line, vlc_cond_t *p_condvar )
     int i_result = pthread_cond_destroy( p_condvar );
     if( i_result )
     {
-//X        intf_ErrMsg( "thread %d error: cond_destroy failed at %s:%d (%s)",
-//X                     pthread_self(), psz_file, i_line, strerror(i_result) );
+#if 0
+        intf_ErrMsg( "thread %d error: cond_destroy failed at %s:%d (%s)",
+                     pthread_self(), psz_file, i_line, strerror(i_result) );
+#endif
     }
     return i_result;
 
index 833df04b8e3094af8c5edc5db4e710b638e539e0..f49e81d1ad19d3414d49bc05e12b361da51d7d92 100644 (file)
@@ -5,7 +5,7 @@
  * thread, and destroy a previously oppened video output thread.
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: video_output.c,v 1.188 2002/07/31 20:56:53 sam Exp $
+ * $Id: video_output.c,v 1.189 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -548,7 +548,7 @@ static void RunThread( vout_thread_t *p_vout)
                 }
                 else
                 {
-                    //intf_WarnMsg( 6, "vout info: duplicating picture" );
+                    /*intf_WarnMsg( 6, "vout info: duplicating picture" );*/
                 }
             }
         }
index 2e74653afd65e32bfa82296039d28dac166c3738..7ed2e31c43f1d277aa7d9d8d28c484cd68d1ae62 100644 (file)
@@ -2,7 +2,7 @@
  * video_text.c : text manipulation functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: video_text.c,v 1.36 2002/07/20 18:01:43 sam Exp $
+ * $Id: video_text.c,v 1.37 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -467,7 +467,7 @@ void vout_Print( vout_font_t *p_font, byte_t *p_pic, int i_bytes_per_pixel, int
                                                      p_font->i_interspacing);
 
     /* compute where to stop... */
-    i_end = (int) (i_percent * strlen(psz_text) / I64C(100));
+    i_end = (int) (i_percent * strlen(psz_text) / (s64)100);
     if(i_end > strlen(psz_text))
         i_end = strlen(psz_text);
     
index 5147b8f6657d22eebfe2d82c51c4f2e0df4bff3b..5adc5fe8772e6b37d1059734be22d5a972097220 100644 (file)
--- a/src/vlc.c
+++ b/src/vlc.c
@@ -2,7 +2,7 @@
  * vlc.c: the vlc player
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: vlc.c,v 1.7 2002/07/23 00:39:17 sam Exp $
+ * $Id: vlc.c,v 1.8 2002/08/08 00:35:11 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -31,7 +31,7 @@
 /*****************************************************************************
  * main: parse command line, start interface and spawn threads
  *****************************************************************************/
-int main(int i_argc, char *ppsz_argv[], char *ppsz_env[])
+int main(int i_argc, char *ppsz_argv[])
 {
     vlc_error_t err;
 
@@ -64,13 +64,15 @@ int main(int i_argc, char *ppsz_argv[], char *ppsz_env[])
     err = vlc_run();
 
     /* Add background interfaces */
-    //{ int i; for( i=10; i--; ) vlc_add_intf( NULL, "dummy", 0 ); }
-    //vlc_add_intf( NULL, "dummy", VLC_FALSE );
-    //vlc_add_intf( NULL, "logger", VLC_FALSE );
-    //vlc_add_intf( NULL, "xosd", VLC_FALSE );
-    //vlc_add_intf( NULL, "gtk", VLC_FALSE );
-    //vlc_add_intf( NULL, "kde", VLC_FALSE );
-    //vlc_add_intf( "rc", VLC_FALSE );
+#if 0
+    { int i; for( i=10; i--; ) vlc_add_intf( NULL, "dummy", 0 ); }
+    vlc_add_intf( NULL, "dummy", VLC_FALSE );
+    vlc_add_intf( NULL, "logger", VLC_FALSE );
+    vlc_add_intf( NULL, "xosd", VLC_FALSE );
+    vlc_add_intf( NULL, "gtk", VLC_FALSE );
+    vlc_add_intf( NULL, "kde", VLC_FALSE );
+    vlc_add_intf( "rc", VLC_FALSE );
+#endif
 
     /* Add a blocking interface and keep the return value */
     err = vlc_add_intf( NULL, VLC_TRUE );
index a4952a3564ca33e8aa70b060717353746674572c..8adcd6957ddc58a04a494da53dd8ba77650b79e2 100644 (file)
--- a/vlc.spec
+++ b/vlc.spec
@@ -277,7 +277,6 @@ rm -fr %buildroot
 %dir %{_libdir}/videolan/vlc
 %{_libdir}/videolan/vlc/ac3_spdif.so
 %{_libdir}/videolan/vlc/avi.so
-%{_libdir}/videolan/vlc/dsp.so
 %{_libdir}/videolan/vlc/dummy.so
 %{_libdir}/videolan/vlc/dvd.so
 %{_libdir}/videolan/vlc/fb.so
@@ -301,6 +300,7 @@ rm -fr %buildroot
 %{_libdir}/videolan/vlc/mpeg_ps.so
 %{_libdir}/videolan/vlc/mpeg_ts.so
 %{_libdir}/videolan/vlc/null.so
+%{_libdir}/videolan/vlc/oss.so
 %{_libdir}/videolan/vlc/rc.so
 %{_libdir}/videolan/vlc/spudec.so
 %{_libdir}/videolan/vlc/udp.so