* ALL: lots of -ansi -pedantic fixes.
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*
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:
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@
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@
#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_%'`
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
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
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
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
(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
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
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)
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)
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
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
# 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"
* 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>
*
(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 ) \
{ \
aout_fifo_t fifo;
- char * p_first_byte_to_mix;
+ byte_t * p_first_byte_to_mix;
};
/*****************************************************************************
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 );
* 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>
*
*****************************************************************************/
struct aout_buffer_t
{
- char * p_buffer;
+ byte_t * p_buffer;
int i_alloc_type;
size_t i_size;
int i_nb_samples;
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)
-/* 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
* 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>
{
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;
}
{
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;
}
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);
{
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);
}
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 );
}
* 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>
*
/*****************************************************************************
* 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 * ) );
* 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 )
* 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>
#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
/*****************************************************************************
* 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
/*****************************************************************************
* 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;
* 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>
*****************************************************************************/
/* 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
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 * ) ;
# 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
* 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>
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;
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;
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 );
}
* 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>
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;
}
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';
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++ )
{
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++ )
{
/*
* 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 )
{
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 );
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;
}
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
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 );
* sizeof(parental_desc_t) );
if( PARINF.p_parental_desc == NULL )
{
-//X intf_Err( p_input, "out of memory in IfoInit" );
return -1;
}
* sizeof(parental_mask_t) );
if( PARINF.p_parental_mask == NULL )
{
-//X intf_Err( p_input, "out of memory in IfoInit" );
return -1;
}
if( PARINF.p_parental_mask[i].ppi_mask[j] == NULL )
{
-//X intf_Err( p_input, "out of memory in IfoInit" );
return -1;
}
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;
}
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;
}
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++ )
{
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++ )
{
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++ )
{
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++ )
{
p_ifo->vts.b_initialized = 0;
-//X intf_Warn( p_input, 2, "vmg initialized" );
-
return 0;
}
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
/*
* 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';
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;
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;
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;
}
* sizeof(title_start_t) );
if( TITINF.p_title_start == NULL )
{
-//X intf_Err( p_input, "out of memory in IfoTitleSet" );
return -1;
}
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 );
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;
}
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;
}
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;
}
}
#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;
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 );
if( p_title->command.p_pre_command == NULL )
{
-//X intf_Err( p_input, "out of memory in ReadTitle" );
return -1;
}
if( p_title->command.p_post_command == NULL )
{
-//X intf_Err( p_input, "out of memory in ReadTitle" );
return -1;
}
if( p_title->command.p_cell_command == NULL )
{
-//X intf_Err( p_input, "out of memory in ReadTitle" );
return -1;
}
if( p_title->chapter_map.pi_start_cell == NULL )
{
-//X intf_Err( p_input, "out of memory in Read Title" );
return -1;
}
if( p_title->p_cell_play == NULL )
{
-//X intf_Err( p_input, "out of memory in ReadTitle" );
return -1;
}
if( p_title->p_cell_pos == NULL )
{
-//X intf_Err( p_input, "out of memory" );
return -1;
}
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 );
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;
}
#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
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 );
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 );
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;
}
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 );
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;
}
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 )
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;
}
{
"none",
"=",
- "<->", // swap
+ "<->", /* swap */
"+=",
"-=",
"*=",
"/=",
"%=",
- "rnd", // rnd
+ "rnd", /* rnd */
"&=",
"|=",
"^=",
- "??", // invalid
- "??", // invalid
- "??", // invalid
- "??" // invalid
+ "??", /* invalid */
+ "??", /* invalid */
+ "??", /* invalid */
+ "??" /* invalid */
};
return (char *) math_op[val & 0x0f];
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
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 )
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);
}
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));
}
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 );
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!!! */
}
}
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);
}
{
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 )
{
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;
* 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];
- 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
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
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
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;
/*
/* 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;
* - 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;
/*
*/
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;
*/
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;
/*****************************************************************************
*/
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;
* 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;
/*
*/
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;
/*
* - 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;
*/
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;
/*
* 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;
/*
/* 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;
/* 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>
*
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;
}
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;
* 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
}
/****************************************************************************
#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
{
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
{
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
* 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>
*
{
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;
}
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;
}
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;
}
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;
}
{
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;
}
* 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>
*
{
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
{
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++ )
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 );
--- /dev/null
+.dep
+*.lo
+*.o.*
+*.lo.*
--- /dev/null
+v4l_SOURCES = v4l.c
--- /dev/null
+/*****************************************************************************
+ * 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;
+}
+
* 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>
*
* (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];
* 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>
*
{
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 ( ; ; )
{
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;
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;
* 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>
#endif
#include <vlc/aout.h>
+
#include "aout_internal.h"
/* SNDCTL_DSP_RESET, SNDCTL_DSP_SETFMT, SNDCTL_DSP_STEREO, SNDCTL_DSP_SPEED,
{
int i_fd;
volatile vlc_bool_t b_die;
+ volatile vlc_bool_t b_initialized;
};
#define DEFAULT_FRAME_SIZE 2048
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;
}
/* 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;
}
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 )
{
/* 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;
}
p_aout->output.i_nb_samples = DEFAULT_FRAME_SIZE;
+ p_sys->b_initialized = VLC_TRUE;
+
return 0;
}
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 );
}
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;
* 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;
aout_BufferFree( p_buffer );
}
}
+
+ return 0;
}
* 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>
/* 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 {
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 -- */
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 */
* 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
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;
* 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>
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;
* 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>
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);
* 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
/* 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 [] );
+
};
* 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>
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);
* 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>
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
* 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>
typedef struct
{
s8 nbal[32];
- u8 * alloc[32];
+ s8 * alloc[32];
} alloc_table_t;
#define L3 -1
adec_layer2_get_table (p_adec->header, freq_table, &alloc_table, &sblimit);
/* parse allocation */
- //sblimit=27;
+ /*sblimit=27;*/
for (sb = 0; sb < sblimit; sb++)
{
* 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>
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
{
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
{
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
{
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
{
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
{
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
{
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
{
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
{
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
{
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
{
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
{
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
{
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
{
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
{
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
{
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
{
* 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>
#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
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
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
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. */
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 );
}
/* 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 )
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
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 )
}
}
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 );
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 );
}
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
* 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>
#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 ) \
* 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 ) \
} \
} \
} \
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
* 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
/* Input properties */
vdec_pool_t * p_pool;
-};
+
+} vdec_thread_t;
/*****************************************************************************
* Prototypes
* 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>
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 )
/* 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 */
}
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 )
{
* 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>
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 )
/* 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 */
}
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 )
{
* 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>
#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, \
} while (--height); \
}
-// definitions of the actual mc functions
+/* definitions of the actual mc functions */
MC_FUNC (put,o)
MC_FUNC (avg,o)
* 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>
* Motion compensation in MMX
*****************************************************************************/
-// some rounding constants
+/* some rounding constants */
mmx_t round1 = {0x0001000100010001LL};
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);
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)
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)
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;
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)
{
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)
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)
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);
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);
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);
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);
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;
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)
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);
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);
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);
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;
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)
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)
* 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>
#define CPU_3DNOW 1
-//CPU_MMXEXT/CPU_3DNOW adaptation layer
+/* CPU_MMXEXT/CPU_3DNOW adaptation layer */
#define pavg_r2r(src,dest) \
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,
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);
}
* 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>
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);
* 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>
*
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;
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);
}
#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
/*****************************************************************************
* 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
#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
/*
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 )
#ifdef HAVE_SSE
#define MMREG_SIZE 16
#else
-#define MMREG_SIZE 64 //8
+#define MMREG_SIZE 64 /*8*/
#endif
/* Small defines (for readability only) ;) */
((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__ (
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(
"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"
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 */
* 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>
/* 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 );
}
* 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>
}
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 );
}
{
*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' ;
/* 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 );
}
_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
}
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 )
if( res == -1 )
{
-//X intf_ErrMsg( "ipv6 error: setsockopt JOIN_GROUP failed" );
+ msg_Err( p_this, "setsockopt JOIN_GROUP failed" );
}
}
* 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\
* 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 */
int i_height; /* height of main window */
Atom wm_protocols;
Atom wm_delete_window;
-};
+
+} x11_window_t;
/*****************************************************************************
* vout_sys_t: video output method descriptor
--- /dev/null
+/*****************************************************************************
+ * 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;
+ }
+}
+
* 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>
*
/* 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 );
* 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>
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;
* 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" \
* 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>
*
!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;
}
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:
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;
}
}
p_homedir = (char *)malloc( MAX_PATH );
if( !p_homedir )
{
-//X intf_ErrMsg( "config error: couldn't malloc p_homedir" );
return NULL;
}
{
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
* 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>
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 );
* 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>
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 );
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 );
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 )
{
* 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 );
* 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 );
* 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;
#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 );
* 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" );
(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; \
* 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>
*
* 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 );
* 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 );
* 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;
#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 );
* 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" );
* 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>
*
*****************************************************************************/
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 );
}
* 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>
*
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;
}
msleep( 100000 );
}
- //msg_Dbg( p_this, "destroyed object" );
-
vlc_mutex_destroy( &p_this->object_lock );
vlc_cond_destroy( &p_this->object_wait );
* 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>
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;
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;
* 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>
*
}
else
{
- //intf_WarnMsg( 6, "vout info: duplicating picture" );
+ /*intf_WarnMsg( 6, "vout info: duplicating picture" );*/
}
}
}
* 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>
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);
* 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>
/*****************************************************************************
* 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;
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 );
%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
%{_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