]> git.sesse.net Git - vlc/commitdiff
* ./src/misc/modules_plugin.h: exported input_ClockManageRef for fenrir.
authorSam Hocevar <sam@videolan.org>
Thu, 25 Apr 2002 21:52:42 +0000 (21:52 +0000)
committerSam Hocevar <sam@videolan.org>
Thu, 25 Apr 2002 21:52:42 +0000 (21:52 +0000)
  * ./include/video.h: moved vout_CopyPicture out of the way, an inline
    function did not make sense here.
  * ./include/video.h: moved vout_ChromaCmp out of the way.
  * ./plugins/avi/fourcc.h, ./include/video.h: merged these two files into
    video.h.
  * ./include/os_specific.h: this file is now always included.
  * ./include/debug.h: removed this file which was almost useless, and moved
    ASSERT to common.h.
  * ./include/common.h: fixed vlc_memalign and changed its prototype to
    follow posix_memalign's.

34 files changed:
ChangeLog
Makefile.opts.in
extras/Win32_msvc/vlc.dsp
include/common.h
include/debug.h [deleted file]
include/input_ext-plugins.h
include/os_specific.h
include/video.h
include/video_output.h
include/videolan/vlc.h
plugins/a52/a52.c
plugins/ac3_adec/ac3_adec.c
plugins/avi/avi.c
plugins/avi/avi.h
plugins/avi/fourcc.h [deleted file]
plugins/dummy/vout_dummy.c
plugins/dvd/dvd_access.c
plugins/dvd/dvd_demux.c
plugins/dvd/dvd_es.c
plugins/dvd/dvd_seek.c
plugins/dvd/dvd_summary.c
plugins/dvdread/input_dvdread.c
plugins/macosx/vout_macosx.c
plugins/mad/mad_adec.c
plugins/mad/mad_libmad.c
plugins/mpeg_vdec/vpar_pool.c
plugins/satellite/input_satellite.c
plugins/vcd/input_vcd.c
src/input/input_programs.c
src/interface/main.c
src/misc/modules_plugin.h
src/video_output/video_output.c
src/video_output/vout_pictures.c
src/video_output/vout_subpictures.c

index 800712a8937c844b9c67b9a0aec99eaa3ff24769..d11dd23dfb5de3447ca5917fef794c45c8ece6e8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,57 @@
 
 HEAD
 
+  * ./src/misc/modules_plugin.h: exported input_ClockManageRef for fenrir.
+  * ./include/video.h: moved vout_CopyPicture out of the way, an inline
+    function did not make sense here.
+  * ./include/video.h: moved vout_ChromaCmp out of the way.
+  * ./plugins/avi/fourcc.h, ./include/video.h: merged these two files into
+    video.h.
+  * ./include/os_specific.h: this file is now always included.
+  * ./include/debug.h: removed this file which was almost useless, and moved
+    ASSERT to common.h.
+  * ./include/common.h: fixed vlc_memalign and changed its prototype to
+    follow posix_memalign's.
+  * ./configure.in: dropped usage of $withval and $enableval in favor of the
+    safer variants $with_foo and $enable_foo.
+  * ./plugins/avi/avi.c: will not segfault when no audio is found/supported.
+  * ./plugins/ffmpeg/ffmpeg.c: with empty frame(data_packet) it won't segfault.
+  * ./plugins/avi/avi.c: use KeyFrame to seek, so video will not be bad as
+    before.
+  * ./plugins/mpeg_system/mpeg_ts.c: moved Program Specific Information
+    decoder to the ts demux module.
+  * ./plugins/mpeg_system/Makefile: added a mpeg_ts_dvbpsi module tha uses
+    libdvbpsi to decode PSIs. It is used by default if the lib is found. It
+    shares much code with mpeg_ts.
+  * ./plugins/directx/vout_events.c: fixed typo. You have to double click on
+    the video window to switch to fullscreen.
+  * ./src/misc/configuration.c: on Win32 the config file is now stored under
+    the "Application Data" folder belonging to the user. (this works if at
+    least IE4 is installed, otherwise the old method is used to get the
+    config directory)
+  * ./configure.in: fixed MacOS X module linking problem.
+  * ./src/interface/main.c: we no longer segfault if argc == 0.  
+  * ALL: renamed PLUGINS to __PLUGINS__ to avoid conflicts with libraries
+    defining it. Grmbl.
+  * ./src/input/input_ext-plugins.c: cosmetic change.
+  * ./plugins/ac3_adec/*: use of _M to avoid conflict with libavcodec.a.
+  * ./plugins/avi/*: a light AVI demux.
+  * ./plugins/ffmpeg/*: a video decoder for divx v3 and opendivx.
+  * ./plugins/win32/preferences.cpp: fixed a compilation bug
+  * ./plugins/avi, ./plugins/ffmpeg: created empty directories for fenrir's
+    upcoming work.
+  * ./plugins/spudec/spu_decoder.c: fixed the spu decoder to take the pitch
+    of the destination picture into account when rendering the subtitles
+    (Implemented only for the YUV modes).
+  * ./plugins/directx/vout_events.c: fixed the mouse autohidding feature in
+    the DirectX plugin (at least partially).
+  * ./plugins/directx/vout_directx.c: fixed the DirectX video output for
+    non-overlay modes. It was only working in RGB16 before.
+  * ./plugins/directx/vout_directx.c: DirectX video output plugin now uses
+    triple buffering for YUV overlay. This improves the video quality a lot
+    (no tearing) without affecting performance. (I knew double buffering
+    sucked but I just discovered why triple buffering is better: you don't
+    have to wait for the vsync to flip the buffers).
   * ./plugins/spudec/spu_decoder.c, ./plugins/dvd/dvd_es.c: temporary fix
     to avoid retrieving the spu palette from a network stream as if it was
     a DVD.
index 1ec4d318b0498298ec16c54631c772726fd7bfa2..45337b2803a051486d565a4be2fde64dd1d7a0ea 100644 (file)
@@ -254,8 +254,8 @@ endif
 # C compiler flags: plugins and builtins compilation
 #
 vlc_CFLAGS += -D__VLC__
-plugins_CFLAGS += -D__PLUGIN__ -I../../include -I../../extras
-builtins_CFLAGS += -D__BUILTIN__ -I../../include -I../../extras
+plugins_CFLAGS += -D__VLC__ -D__PLUGIN__ -I../../include -I../../extras
+builtins_CFLAGS += -D__VLC__ -D__BUILTIN__ -I../../include -I../../extras
 
 #
 # Linker flags: plugins and builtins linking
index 11de4083f4c988dad91ca9dad89c4e5f7966aace..493f6bb585704a211dd4f7fec3bb42e69cb33c65 100755 (executable)
@@ -1455,10 +1455,6 @@ SOURCE=..\..\include\darwin_specific.h
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\..\include\debug.h\r
-# End Source File\r
-# Begin Source File\r
-\r
 SOURCE=.\defs.h\r
 # End Source File\r
 # Begin Source File\r
index 58cc47cf7418f05a938a7eb567c8e1a36994d73e..18ba02e0706d85ab6cfb96c4db858ca974895112 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: common.h,v 1.98 2002/04/25 02:10:33 jobi Exp $
+ * $Id: common.h,v 1.99 2002/04/25 21:52:42 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -378,13 +378,15 @@ struct intf_subscription_s;
     /* Some systems have memalign() but no declaration for it */
     void * memalign( size_t align, size_t size );
 
-#   define vlc_memalign(align,size,pp_orig) \
+#   define vlc_memalign(pp_orig,align,size) \
     ( *(pp_orig) = memalign( align, size ) )
 
 #else /* We don't have any choice but to align manually */
-#   define vlc_memalign(align,size,pp_orig) \
-    (( *(pp_orig) = malloc( size + align - 1 )) ? \
-        (void *)( (((unsigned long)*(pp_orig)) + 15) & ~0xFUL ) : NULL )
+#   define vlc_memalign(pp_orig,align,size) \
+    (( *(pp_orig) = malloc( size + align - 1 )) \
+        ? (void *)( (((unsigned long)*(pp_orig)) + (unsigned long)(align-1) ) \
+                       % (unsigned long)align ) \
+        : NULL )
 
 #endif
 
@@ -500,6 +502,22 @@ typedef __int64 off_t;
 #   define N_(String) (String)
 #endif
 
+/*****************************************************************************
+ * Debug macros
+ *****************************************************************************/
+/* ASSERT: this macro is used to test that a pointer is not nul. It inserts
+ * the needed code when the program is compiled with the debug option, but
+ * does nothing when not in debug mode. */
+#ifdef DEBUG
+#   define ASSERT(p_Mem)                                                      \
+    if (!(p_Mem))                                                             \
+        intf_ErrMsg("Void pointer error: "                                    \
+                    "%s line %d (variable %s at address %p)\n",               \
+                     __FILE__, __LINE__, #p_Mem, &p_Mem);
+#else
+#   define ASSERT(p_Mem)
+#endif
+
 /*****************************************************************************
  * Plug-in stuff
  *****************************************************************************/
@@ -615,6 +633,9 @@ typedef struct module_symbols_s
                                              struct data_packet_s  *,
                                              struct es_descriptor_s *,
                                              boolean_t ) );
+    void ( * input_ClockManageRef )      ( struct input_thread_s *,
+                                           struct pgrm_descriptor_s *,
+                                           mtime_t );
     int ( * input_ClockManageControl )   ( struct input_thread_s *,
                                            struct pgrm_descriptor_s *,
                                            mtime_t );
@@ -664,6 +685,7 @@ typedef struct module_symbols_s
                                       struct picture_s *, mtime_t );
     void  ( * vout_PlacePicture )   ( struct vout_thread_s *, int, int,
                                       int *, int *, int *, int * );
+    int   ( * vout_ChromaCmp )      ( u32, u32 );
 
     struct subpicture_s * (* vout_CreateSubPicture)
                                         ( struct vout_thread_s *, int, int );
diff --git a/include/debug.h b/include/debug.h
deleted file mode 100644 (file)
index d3ecd91..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/*****************************************************************************
- * debug.h: vlc debug macros
- * Stand alone file
- *****************************************************************************
- * Copyright (C) 1999, 2000 VideoLAN
- * $Id: debug.h,v 1.8 2001/03/21 13:42:33 sam Exp $
- *
- * Authors: Benoît Steiner <benny@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.
- *****************************************************************************/
-
-/*****************************************************************************
- * Required headers:
- * - <string.h>
- * - intf_msg.h
- *****************************************************************************/
-
-
-/*****************************************************************************
- * ASSERT
- *****************************************************************************
- * This macro is used to test that a pointer is not nul. It insert the needed
- * code when the program is compiled with the debug option, but does nothing
- * in release program.
- *****************************************************************************/
-#ifdef DEBUG
-#define ASSERT(p_Mem)                                                         \
-if (!(p_Mem))                                                                 \
-    intf_ErrMsg("Void pointer error: "                                        \
-                "%s line %d (variable %s at address %p)\n",                   \
-                 __FILE__, __LINE__, #p_Mem, &p_Mem);
-
-#else
-#define ASSERT(p_Mem)
-
-#endif
-
-
-/*****************************************************************************
- * RZERO
- *****************************************************************************
- * This macro is used to initialise a variable to 0. It is very useful when
- * used with the ASSERT macro. It also only insert the needed code when the
- * program is compiled with the debug option.
- *****************************************************************************/
-#ifdef DEBUG
-#define RZERO(r_Var)                                                          \
-bzero(&(r_Var), sizeof((r_Var)));
-
-#else
-#define RZERO(r_Var)
-
-#endif
-
-
-/*****************************************************************************
- * PZERO
- *****************************************************************************
- * This macro is used to initiase the memory pointed out by a pointer to 0.
- * It has the same purpose than RZERO, but for pointers.
- *****************************************************************************/
-/* It is already defined on BSD */
-#ifndef PZERO
-#ifdef DEBUG
-#define PZERO(p_Mem)                                                          \
-bzero((p_Mem), sizeof(*(p_Mem)));
-
-#else
-#define PZERO(p_Mem)
-
-#endif
-#endif
-
-
-/*****************************************************************************
- * AZERO
- *****************************************************************************
- * This macro is used to initiase an array of variables to 0.
- * It has the same purpose than RZERO or PZERO, but for array
- *****************************************************************************/
-#ifdef DEBUG
-#define AZERO(p_Array, i_Size)                                                \
-bzero((p_Array), (i_Size)*sizeof(*(p_Array)));
-
-#else
-#define ZERO(p_Array, i_Size)
-
-#endif
index ee77a184a75c754b7a10b3894424008e2f9a4412..cfd16cc0c92e5f9d739b0688073af5ccdcd96097 100644 (file)
@@ -3,7 +3,7 @@
  *                      but exported to plug-ins
  *****************************************************************************
  * Copyright (C) 1999-2002 VideoLAN
- * $Id: input_ext-plugins.h,v 1.23 2002/04/25 02:10:33 jobi Exp $
+ * $Id: input_ext-plugins.h,v 1.24 2002/04/25 21:52:42 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -100,6 +100,7 @@ void input_ClockManageRef( struct input_thread_s *,
 mtime_t input_ClockGetTS( struct input_thread_s *,
                           struct pgrm_descriptor_s *, mtime_t );
 #else
+#   define input_ClockManageRef p_symbols->input_ClockManageRef
 #   define input_ClockManageControl p_symbols->input_ClockManageControl
 #endif
 
index 6e39125839daf7eb983ac7d19fe8137e9e712c25..30ea2fe19c7240486e35ca68c47c444d24d734c4 100644 (file)
@@ -2,7 +2,7 @@
  * os_specific.h: OS specific features
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: os_specific.h,v 1.2 2002/04/24 00:36:24 sam Exp $
+ * $Id: os_specific.h,v 1.3 2002/04/25 21:52:42 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Gildas Bazin <gbazin@netcourrier.com>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#ifdef SYS_BEOS
-#   include "beos_specific.h"
+#ifndef _NEED_OS_SPECIFIC_H
+#   define _NEED_OS_SPECIFIC_H 1
 #endif
-#ifdef SYS_DARWIN
+
+#if defined( SYS_BEOS )
+#   include "beos_specific.h"
+#elif defined( SYS_DARWIN )
 #   include "darwin_specific.h"
-#endif
-#ifdef WIN32
+#elif defined( WIN32 )
 #   include "win32_specific.h"
+#else
+#   undef _NEED_OS_SPECIFIC_H
 #endif
 
-#ifdef __cplusplus
+#   ifdef __cplusplus
 extern "C" {
-#endif
+#   endif
 
 /*****************************************************************************
  * main_sys_t: system specific descriptor
@@ -42,19 +46,25 @@ extern "C" {
 struct main_sys_s;
 
 #ifndef __PLUGIN__
-extern struct main_sys_s *p_main_sys;
+    extern struct main_sys_s *p_main_sys;
 #else
 #   define p_main_sys (p_symbols->p_main_sys)
 #endif
 
-
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-void system_Init ( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] );
-void system_Configure  ( void );
-void system_End  ( void );
+#ifdef _NEED_OS_SPECIFIC_H
+    void system_Init ( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] );
+    void system_Configure  ( void );
+    void system_End  ( void );
+#else
+#   define system_Init(...) {}
+#   define system_Configure(...) {}
+#   define system_End(...) {}
+#endif
 
-#ifdef __cplusplus
+#   ifdef __cplusplus
 }
-#endif
+#   endif
+
index bd8fa35e9fbc60ee9441e52404bdae95982b74d3..8387b530a5d3244a2c1f3cc0f3a63cee08edbe2d 100644 (file)
@@ -4,7 +4,7 @@
  * includes all common video types and constants.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: video.h,v 1.49 2002/04/15 23:04:08 massiot Exp $
+ * $Id: video.h,v 1.50 2002/04/25 21:52:42 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -142,38 +142,124 @@ typedef struct picture_heap_s
 #define DESTROYED_PICTURE       6              /* allocated but no more used */
 
 /*****************************************************************************
- * Flags used to describe picture format - see http://www.webartz.com/fourcc/
+ * Codes used to describe picture format - see http://www.webartz.com/fourcc/
  *****************************************************************************/
-
-/* Packed RGB formats */
-#define FOURCC_BI_RGB        0x00000000                      /* RGB for 8bpp */
-#define FOURCC_RGB2          0x32424752                  /* alias for BI_RGB */
-#define FOURCC_BI_BITFIELDS  0x00000003            /* RGB, for 16, 24, 32bpp */
-#define FOURCC_RV15          0x35315652    /* RGB 15bpp, 0x1f, 0x7e0, 0xf800 */
-#define FOURCC_RV16          0x36315652    /* RGB 16bpp, 0x1f, 0x3e0, 0x7c00 */
-#define FOURCC_RV24          0x34325652 /* RGB 24bpp, 0xff, 0xff00, 0xff0000 */
-#define FOURCC_RV32          0x32335652 /* RGB 32bpp, 0xff, 0xff00, 0xff0000 */
-
-/* Planar YUV formats */
-#define FOURCC_I420          0x30323449               /* Planar 4:2:0, Y:U:V */
-#define FOURCC_IYUV          0x56555949                    /* alias for I420 */
-#define FOURCC_YV12          0x32315659               /* Planar 4:2:0, Y:V:U */
-
-/* Packed YUV formats */
-#define FOURCC_IUYV          0x56595549 /* Packed 4:2:2, U:Y:V:Y, interlaced */
-#define FOURCC_UYVY          0x59565955             /* Packed 4:2:2, U:Y:V:Y */
-#define FOURCC_UYNV          0x564e5955                    /* alias for UYVY */
-#define FOURCC_Y422          0x32323459                    /* alias for UYVY */
-#define FOURCC_cyuv          0x76757963   /* Packed 4:2:2, U:Y:V:Y, reverted */
-#define FOURCC_YUY2          0x32595559             /* Packed 4:2:2, Y:U:Y:V */
-#define FOURCC_YUNV          0x564e5559                    /* alias for YUY2 */
-#define FOURCC_YVYU          0x55585659             /* Packed 4:2:2, Y:V:Y:U */
-#define FOURCC_Y211          0x31313259             /* Packed 2:1:1, Y:U:Y:V */
+#define MAKEFOURCC( a, b, c, d ) \
+    ( ((u32)a) | ( ((u32)b) << 8 ) | ( ((u32)c) << 16 ) | ( ((u32)d) << 24 ) )
+
+#define MAKETWOCC( a, b ) \
+    ( (u16)(a) | ( (u16)(b) << 8 ) )
+
+/* AVI stuff */
+#define FOURCC_RIFF         MAKEFOURCC('R','I','F','F')
+#define FOURCC_LIST         MAKEFOURCC('L','I','S','T')
+#define FOURCC_JUNK         MAKEFOURCC('J','U','N','K')
+#define FOURCC_AVI          MAKEFOURCC('A','V','I',' ')
+#define FOURCC_WAVE         MAKEFOURCC('W','A','V','E')
+
+#define FOURCC_avih         MAKEFOURCC('a','v','i','h')
+#define FOURCC_hdrl         MAKEFOURCC('h','d','r','l')
+#define FOURCC_movi         MAKEFOURCC('m','o','v','i')
+#define FOURCC_idx1         MAKEFOURCC('i','d','x','1')
+
+#define FOURCC_strl         MAKEFOURCC('s','t','r','l')
+#define FOURCC_strh         MAKEFOURCC('s','t','r','h')
+#define FOURCC_strf         MAKEFOURCC('s','t','r','f')
+#define FOURCC_strd         MAKEFOURCC('s','t','r','d')
+
+#define FOURCC_rec          MAKEFOURCC('r','e','c',' ')
+#define FOURCC_auds         MAKEFOURCC('a','u','d','s')
+#define FOURCC_vids         MAKEFOURCC('v','i','d','s')
+
+#define TWOCC_wb            MAKETWOCC('w','b')
+#define TWOCC_db            MAKETWOCC('d','b')
+#define TWOCC_dc            MAKETWOCC('d','c')
+#define TWOCC_pc            MAKETWOCC('p','c')
+
+/* MPEG4 (opendivx) codec */
+#define FOURCC_DIVX         MAKEFOURCC('D','I','V','X')
+#define FOURCC_divx         MAKEFOURCC('d','i','v','x')
+#define FOURCC_DX50         MAKEFOURCC('D','X','5','0')
+#define FOURCC_MP4S         MAKEFOURCC('M','P','4','S')
+#define FOURCC_MPG4         MAKEFOURCC('M','P','G','4')
+#define FOURCC_mpg4         MAKEFOURCC('m','p','g','4')
+#define FOURCC_mp4v         MAKEFOURCC('m','p','4','v')
+
+/* msmepg (divx v3) codec */
+#define FOURCC_DIV3         MAKEFOURCC('D','I','V','3')
+#define FOURCC_div3         MAKEFOURCC('d','i','v','3')
+#define FOURCC_DIV4         MAKEFOURCC('D','I','V','4')
+#define FOURCC_div4         MAKEFOURCC('d','i','v','4')
+#define FOURCC_DIV5         MAKEFOURCC('D','I','V','5')
+#define FOURCC_div5         MAKEFOURCC('d','i','v','5')
+#define FOURCC_DIV6         MAKEFOURCC('D','I','V','6')
+#define FOURCC_div6         MAKEFOURCC('d','i','v','6')
+#define FOURCC_3IV1         MAKEFOURCC('3','I','V','1')
+#define FOURCC_AP41         MAKEFOURCC('A','P','4','1')
+#define FOURCC_MP43         MAKEFOURCC('M','P','4','3')
+#define FOURCC_mp43         MAKEFOURCC('m','p','4','3')
+
+/* Packed RGB for 8bpp */
+#define FOURCC_BI_RGB       MAKEFOURCC( 0 , 0 , 0 , 0 )
+#define FOURCC_RGB2         MAKEFOURCC('R','G','B','2')
+
+/* Packed RGB for 16, 24, 32bpp */
+#define FOURCC_BI_BITFIELDS MAKEFOURCC( 0 , 0 , 0 , 3 )
+
+/* Packed RGB 15bpp, 0x1f, 0x7e0, 0xf800 */
+#define FOURCC_RV15         MAKEFOURCC('R','V','1','5')
+
+/* Packed RGB 16bpp, 0x1f, 0x3e0, 0x7c00 */
+#define FOURCC_RV16         MAKEFOURCC('R','V','1','6')
+
+/* Packed RGB 24bpp, 0xff, 0xff00, 0xff0000 */
+#define FOURCC_RV24         MAKEFOURCC('R','V','2','4')
+
+/* Packed RGB 32bpp, 0xff, 0xff00, 0xff0000 */
+#define FOURCC_RV32         MAKEFOURCC('R','V','3','2')
+
+/* Planar YUV 4:2:0, Y:U:V */
+#define FOURCC_I420         MAKEFOURCC('I','4','2','0')
+#define FOURCC_IYUV         MAKEFOURCC('I','Y','U','V')
+
+/* Planar YUV 4:2:0, Y:V:U */
+#define FOURCC_YV12         MAKEFOURCC('Y','V','1','2')
+
+/* Packed YUV 4:2:2, U:Y:V:Y, interlaced */
+#define FOURCC_IUYV         MAKEFOURCC('I','U','Y','V')
+
+/* Packed YUV 4:2:2, U:Y:V:Y */
+#define FOURCC_UYVY         MAKEFOURCC('U','Y','V','Y')
+#define FOURCC_UYNV         MAKEFOURCC('U','Y','N','V')
+#define FOURCC_Y422         MAKEFOURCC('Y','4','2','2')
+
+/* Packed YUV 4:2:2, U:Y:V:Y, reverted */
+#define FOURCC_cyuv         MAKEFOURCC('c','y','u','v')
+
+/* Packed YUV 4:2:2, Y:U:Y:V */
+#define FOURCC_YUY2         MAKEFOURCC('Y','U','Y','2')
+#define FOURCC_YUNV         MAKEFOURCC('Y','U','N','V')
+
+/* Packed YUV 4:2:2, Y:V:Y:U */
+#define FOURCC_YVYU         MAKEFOURCC('Y','V','Y','U')
+
+/* Packed YUV 2:1:1, Y:U:Y:V */
+#define FOURCC_Y211         MAKEFOURCC('Y','2','1','1')
 
 /* Custom formats which we use but which don't exist in the fourcc database */
-#define FOURCC_YMGA          0x41474d59  /* Planar Y, packed UV, from Matrox */
-#define FOURCC_I422          0x32323449               /* Planar 4:2:2, Y:U:V */
-#define FOURCC_I444          0x34343449               /* Planar 4:4:4, Y:U:V */
+
+/* Planar Y, packed UV, from Matrox */
+#define FOURCC_YMGA         MAKEFOURCC('Y','M','G','A')
+
+/* Planar 4:2:2, Y:U:V */
+#define FOURCC_I422         MAKEFOURCC('I','4','2','2')
+
+/* Planar 4:4:4, Y:U:V */
+#define FOURCC_I444         MAKEFOURCC('I','4','4','4')
+
+/*****************************************************************************
+ * Shortcuts to access image components
+ *****************************************************************************/
 
 /* Plane indices */
 #define Y_PLANE      0
@@ -188,120 +274,6 @@ typedef struct picture_heap_s
 #define V_PIXELS     p[V_PLANE].p_pixels
 #define V_PITCH      p[V_PLANE].i_pitch
 
-static __inline__ int vout_ChromaCmp( u32 i_chroma, u32 i_amorhc )
-{
-    /* If they are the same, they are the same ! */
-    if( i_chroma == i_amorhc )
-    {
-        return 1;
-    }
-
-    /* Check for equivalence classes */
-    switch( i_chroma )
-    {
-        case FOURCC_I420:
-        case FOURCC_IYUV:
-        case FOURCC_YV12:
-            switch( i_amorhc )
-            {
-                case FOURCC_I420:
-                case FOURCC_IYUV:
-                case FOURCC_YV12:
-                    return 1;
-
-                default:
-                    return 0;
-            }
-
-        case FOURCC_UYVY:
-        case FOURCC_UYNV:
-        case FOURCC_Y422:
-            switch( i_amorhc )
-            {
-                case FOURCC_UYVY:
-                case FOURCC_UYNV:
-                case FOURCC_Y422:
-                    return 1;
-
-                default:
-                    return 0;
-            }
-
-        case FOURCC_YUY2:
-        case FOURCC_YUNV:
-            switch( i_amorhc )
-            {
-                case FOURCC_YUY2:
-                case FOURCC_YUNV:
-                    return 1;
-
-                default:
-                    return 0;
-            }
-
-        default:
-            return 0;
-    }
-}
-
-/*****************************************************************************
- * vout_CopyPicture: copy a picture to another one
- *****************************************************************************
- * This function takes advantage of the image format, and reduces the
- * number of calls to memcpy() to the minimum. Source and destination
- * images must have same width, height, and chroma.
- *****************************************************************************/
-static __inline__ void vout_CopyPicture( picture_t *p_src, picture_t *p_dest )
-{
-    int i;
-
-    for( i = 0; i < p_src->i_planes ; i++ )
-    {
-        if( p_src->p[i].i_pitch == p_dest->p[i].i_pitch )
-        {
-            if( p_src->p[i].b_margin )
-            {
-                /* If p_src->b_margin is set, p_dest->b_margin must be set */
-                if( p_dest->p[i].b_hidden )
-                {
-                    /* There are margins, but they are hidden : perfect ! */
-                    FAST_MEMCPY( p_dest->p[i].p_pixels, p_src->p[i].p_pixels,
-                                 p_src->p[i].i_pitch * p_src->p[i].i_lines );
-                    continue;
-                }
-                else
-                {
-                    /* We can't directly copy the margin. Too bad. */
-                }
-            }
-            else
-            {
-                /* Same pitch, no margins : perfect ! */
-                FAST_MEMCPY( p_dest->p[i].p_pixels, p_src->p[i].p_pixels,
-                             p_src->p[i].i_pitch * p_src->p[i].i_lines );
-                continue;
-            }
-        }
-        else
-        {
-            /* Pitch values are different */
-        }
-
-        /* We need to proceed line by line */
-        {
-            u8 *p_in = p_src->p[i].p_pixels, *p_out = p_dest->p[i].p_pixels;
-            int i_line;
-
-            for( i_line = p_src->p[i].i_lines; i_line--; )
-            {
-                FAST_MEMCPY( p_out, p_in, p_src->p[i].i_visible_bytes );
-                p_in += p_src->p[i].i_pitch;
-                p_out += p_dest->p[i].i_pitch;
-            }
-        }
-    }
-}
-
 /*****************************************************************************
  * subpicture_t: video subtitle
  *****************************************************************************
index d981456425b3caddac7c3a176aaba25a6f618a1e..105e13cb47c2b99e24442aa18c17d9867dd7754a 100644 (file)
@@ -5,7 +5,7 @@
  * thread, and destroy a previously opened video output thread.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_output.h,v 1.74 2002/04/24 00:36:24 sam Exp $
+ * $Id: video_output.h,v 1.75 2002/04/25 21:52:42 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -200,6 +200,8 @@ vout_fifo_t *   vout_CreateFifo     ( void );
 void            vout_DestroyFifo    ( vout_fifo_t * );
 void            vout_FreeFifo       ( vout_fifo_t * );
 
+int             vout_ChromaCmp          ( u32, u32 );
+
 picture_t *     vout_CreatePicture  ( vout_thread_t *,
                                       boolean_t, boolean_t, boolean_t );
 void            vout_AllocatePicture( picture_t *, int, int, u32 );
@@ -233,5 +235,6 @@ void            vout_RenderSubPictures  ( vout_thread_t *, picture_t *,
 #   define vout_LinkPicture p_symbols->vout_LinkPicture
 #   define vout_UnlinkPicture p_symbols->vout_UnlinkPicture
 #   define vout_PlacePicture p_symbols->vout_PlacePicture
+#   define vout_ChromaCmp p_symbols->vout_ChromaCmp
 #endif
 
index 3bc61b93ed474f14c74f70402162037eb4a73797..6ae2f11e4b1795cab443a49ad856c5f4bafdc1c1 100644 (file)
@@ -2,7 +2,7 @@
  * vlc.h: global header for vlc
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc.h,v 1.7 2002/04/24 00:36:24 sam Exp $
+ * $Id: vlc.h,v 1.8 2002/04/25 21:52:42 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -26,7 +26,7 @@
 /*****************************************************************************
  * Required vlc headers
  *****************************************************************************/
-#if defined( __VLC__ ) || defined( __PLUGIN__ ) || defined( __BUILTIN__ )
+#if defined( __VLC__ )
 #   include "defs.h"
 #   include "config.h"
 
index 65f2d0d4b7328cd334b8fb17c40167306e6b9ca9..9ccaa288766d877ac45f1a9aa10e5b0feb99adc0 100644 (file)
@@ -4,7 +4,7 @@
  *   (http://liba52.sf.net/).
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: a52.c,v 1.7 2002/04/19 13:56:10 sam Exp $
+ * $Id: a52.c,v 1.8 2002/04/25 21:52:42 sam Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *      
@@ -37,8 +37,6 @@
 #include "stream_control.h"
 #include "input_ext-dec.h"
 
-#include "debug.h"
-
 #include <a52dec/a52.h>                                /* liba52 header file */
 #include "a52.h"
 
index d427c8c213d5534d52c7045cb38beed9b24dfcd8..9aae57fad8a399282e5c876f7c35f6533a17ec7e 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_adec.c: ac3 decoder module main file
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ac3_adec.c,v 1.28 2002/04/23 23:44:36 fenrir Exp $
+ * $Id: ac3_adec.c,v 1.29 2002/04/25 21:52:42 sam Exp $
  *
  * Authors: Michel Lespinasse <walken@zoy.org>
  *
@@ -120,7 +120,7 @@ static int InitThread( ac3dec_thread_t * p_ac3thread )
      */
     p_ac3thread->p_fifo = p_ac3thread->p_config->p_decoder_fifo;
     p_ac3thread->ac3_decoder =
-        vlc_memalign( 16, sizeof(ac3dec_t), &p_ac3thread->ac3_decoder_orig );
+        vlc_memalign( &p_ac3thread->ac3_decoder_orig, 16, sizeof(ac3dec_t) );
 
     /*
      * Choose the best downmix module
@@ -153,7 +153,7 @@ static int InitThread( ac3dec_thread_t * p_ac3thread )
      * Choose the best IMDCT module
      */
     p_ac3thread->ac3_decoder->imdct =
-    vlc_memalign( 16, sizeof(imdct_t), &p_ac3thread->ac3_decoder->imdct_orig );
+    vlc_memalign( &p_ac3thread->ac3_decoder->imdct_orig, 16, sizeof(imdct_t) );
     
 #define IMDCT p_ac3thread->ac3_decoder->imdct
     psz_name = config_GetPszVariable( IMDCT_METHOD_VAR );
@@ -180,39 +180,39 @@ static int InitThread( ac3dec_thread_t * p_ac3thread )
 
     /* Initialize the ac3 decoder structures */
     p_ac3thread->ac3_decoder->samples =
-        vlc_memalign( 16, 6 * 256 * sizeof(float),
-                      &p_ac3thread->ac3_decoder->samples_orig );
-
-    IMDCT->buf    = vlc_memalign( 16, N/4 * sizeof(complex_t),
-                                  &IMDCT->buf_orig );
-    IMDCT->delay  = vlc_memalign( 16, 6 * 256 * sizeof(float),
-                                  &IMDCT->delay_orig );
-    IMDCT->delay1 = vlc_memalign( 16, 6 * 256 * sizeof(float),
-                                  &IMDCT->delay1_orig );
-    IMDCT->xcos1  = vlc_memalign( 16, N/4 * sizeof(float),
-                                  &IMDCT->xcos1_orig );
-    IMDCT->xsin1  = vlc_memalign( 16, N/4 * sizeof(float),
-                                  &IMDCT->xsin1_orig );
-    IMDCT->xcos2  = vlc_memalign( 16, N/8 * sizeof(float),
-                                  &IMDCT->xcos2_orig );
-    IMDCT->xsin2  = vlc_memalign( 16, N/8 * sizeof(float),
-                                  &IMDCT->xsin2_orig );
-    IMDCT->xcos_sin_sse = vlc_memalign( 16, 128 * 4 * sizeof(float),
-                                        &IMDCT->xcos_sin_sse_orig );
-    IMDCT->w_1    = vlc_memalign( 16, 1  * sizeof(complex_t),
-                                  &IMDCT->w_1_orig );
-    IMDCT->w_2    = vlc_memalign( 16, 2  * sizeof(complex_t),
-                                  &IMDCT->w_2_orig );
-    IMDCT->w_4    = vlc_memalign( 16, 4  * sizeof(complex_t),
-                                  &IMDCT->w_4_orig );
-    IMDCT->w_8    = vlc_memalign( 16, 8  * sizeof(complex_t),
-                                  &IMDCT->w_8_orig );
-    IMDCT->w_16   = vlc_memalign( 16, 16 * sizeof(complex_t),
-                                  &IMDCT->w_16_orig );
-    IMDCT->w_32   = vlc_memalign( 16, 32 * sizeof(complex_t),
-                                  &IMDCT->w_32_orig );
-    IMDCT->w_64   = vlc_memalign( 16, 64 * sizeof(complex_t),
-                                  &IMDCT->w_64_orig );
+        vlc_memalign( &p_ac3thread->ac3_decoder->samples_orig,
+                      16, 6 * 256 * sizeof(float) );
+
+    IMDCT->buf    = vlc_memalign( &IMDCT->buf_orig,
+                                  16, N/4 * sizeof(complex_t) );
+    IMDCT->delay  = vlc_memalign( &IMDCT->delay_orig,
+                                  16, 6 * 256 * sizeof(float) );
+    IMDCT->delay1 = vlc_memalign( &IMDCT->delay1_orig,
+                                  16, 6 * 256 * sizeof(float) );
+    IMDCT->xcos1  = vlc_memalign( &IMDCT->xcos1_orig,
+                                  16, N/4 * sizeof(float) );
+    IMDCT->xsin1  = vlc_memalign( &IMDCT->xsin1_orig,
+                                  16, N/4 * sizeof(float) );
+    IMDCT->xcos2  = vlc_memalign( &IMDCT->xcos2_orig,
+                                  16, N/8 * sizeof(float) );
+    IMDCT->xsin2  = vlc_memalign( &IMDCT->xsin2_orig,
+                                  16, N/8 * sizeof(float) );
+    IMDCT->xcos_sin_sse = vlc_memalign( &IMDCT->xcos_sin_sse_orig,
+                                        16, 128 * 4 * sizeof(float) );
+    IMDCT->w_1    = vlc_memalign( &IMDCT->w_1_orig,
+                                  16, 1  * sizeof(complex_t) );
+    IMDCT->w_2    = vlc_memalign( &IMDCT->w_2_orig,
+                                  16, 2  * sizeof(complex_t) );
+    IMDCT->w_4    = vlc_memalign( &IMDCT->w_4_orig,
+                                  16, 4  * sizeof(complex_t) );
+    IMDCT->w_8    = vlc_memalign( &IMDCT->w_8_orig,
+                                  16, 8  * sizeof(complex_t) );
+    IMDCT->w_16   = vlc_memalign( &IMDCT->w_16_orig,
+                                  16, 16 * sizeof(complex_t) );
+    IMDCT->w_32   = vlc_memalign( &IMDCT->w_32_orig,
+                                  16, 32 * sizeof(complex_t) );
+    IMDCT->w_64   = vlc_memalign( &IMDCT->w_64_orig,
+                                  16, 64 * sizeof(complex_t) );
 
     _M( ac3_init )( p_ac3thread->ac3_decoder );
 
@@ -241,8 +241,8 @@ static int decoder_Run ( decoder_config_t * p_config )
     boolean_t           b_sync = 0;
 
     /* Allocate the memory needed to store the thread's structure */
-    p_ac3thread = (ac3dec_thread_t *)vlc_memalign( 16,
-                      sizeof(ac3dec_thread_t), &p_ac3thread_orig );
+    p_ac3thread = (ac3dec_thread_t *)vlc_memalign( &p_ac3thread_orig, 16,
+                                                   sizeof(ac3dec_thread_t) );
 
     if( p_ac3thread == NULL )
     {
index 43582ed059dc3f52ad4fa0a91bcf6c8d76f98caf..fd7e2573a713e9ce2ad0097d519107f1d09b1d51 100644 (file)
@@ -2,7 +2,7 @@
  * avi.c : AVI file Stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: avi.c,v 1.3 2002/04/25 11:41:38 fenrir Exp $
+ * $Id: avi.c,v 1.4 2002/04/25 21:52:42 sam Exp $
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  * 
  * This program is free software; you can redistribute it and/or modify
@@ -35,6 +35,8 @@
 #include "input_ext-dec.h"
 #include "input_ext-plugins.h"
 
+#include "video.h"
+
 /*****************************************************************************
  * Constants
  *****************************************************************************/
@@ -69,7 +71,6 @@ MODULE_DEACTIVATE_STOP
 /*****************************************************************************
  * Definition of structures and libraries for this plugins 
  *****************************************************************************/
-#include "fourcc.h"
 #include "libLE.c"
 #include "libioRIFF.c"
 #include "avi.h"
index 873386612dbbe057a0f8e9673792d2c069b5401f..a8e03021b22cd59c5416d16c8a3d0965b1b48a39 100644 (file)
@@ -2,7 +2,7 @@
  * avi.h : AVI file Stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: avi.h,v 1.1 2002/04/23 23:44:36 fenrir Exp $
+ * $Id: avi.h,v 1.2 2002/04/25 21:52:42 sam Exp $
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  * 
  * This program is free software; you can redistribute it and/or modify
 #define AVIIF_NOTIME        0x00000100L /* this frame doesn't take any time */
 #define AVIIF_COMPUSE       0x0FFF0000L /* these bits are for compressor use */
 
+/* Sound formats */
+#define WAVE_FORMAT_UNKNOWN         0x0000
+#define WAVE_FORMAT_PCM             0x0001
+#define WAVE_FORMAT_MPEG            0x0050
+#define WAVE_FORMAT_MPEGLAYER3      0x0055
+#define WAVE_FORMAT_AC3             0x2000
+
 typedef struct bitmapinfoheader_s
 {
     u32 i_size; /* size of header */
diff --git a/plugins/avi/fourcc.h b/plugins/avi/fourcc.h
deleted file mode 100644 (file)
index c269944..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*****************************************************************************
- * fourcc.h : AVI file Stream input module for vlc
- *****************************************************************************
- * Copyright (C) 2001 VideoLAN
- * $Id: fourcc.h,v 1.1 2002/04/23 23:44:36 fenrir Exp $
- * Authors: Laurent Aimar <fenrir@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.
- *****************************************************************************/
-
-
-#define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
-   ( ((u32)ch0) | ( ((u32)ch1) << 8 ) | \
-     ( ((u32)ch2) << 16 ) | ( ((u32)ch3) << 24 ) )
-
-#define mmioTWOCC( ch0, ch1 ) \
-        ( (u32)(ch0) | ( (u32)(ch1) << 8 ) )
-        
-#define WAVE_FORMAT_UNKNOWN         0x0000
-#define WAVE_FORMAT_PCM             0x0001
-#define WAVE_FORMAT_MPEG            0x0050
-#define WAVE_FORMAT_MPEGLAYER3      0x0055
-#define WAVE_FORMAT_AC3             0x2000
-        
-#define FOURCC_RIFF                 mmioFOURCC( 'R', 'I', 'F', 'F' )
-#define FOURCC_LIST                 mmioFOURCC( 'L', 'I', 'S', 'T' )
-#define FOURCC_JUNK                 mmioFOURCC( 'J', 'U', 'N', 'K' )
-#define FOURCC_AVI                  mmioFOURCC( 'A', 'V', 'I', ' ' )
-#define FOURCC_WAVE                 mmioFOURCC( 'W', 'A', 'V', 'E' )
-
-#define FOURCC_avih                 mmioFOURCC( 'a', 'v', 'i', 'h' )
-#define FOURCC_hdrl                 mmioFOURCC( 'h', 'd', 'r', 'l' )
-#define FOURCC_movi                 mmioFOURCC( 'm', 'o', 'v', 'i' )
-#define FOURCC_idx1                 mmioFOURCC( 'i', 'd', 'x', '1' )
-
-#define FOURCC_strl                 mmioFOURCC( 's', 't', 'r', 'l' )
-#define FOURCC_strh                 mmioFOURCC( 's', 't', 'r', 'h' )
-#define FOURCC_strf                 mmioFOURCC( 's', 't', 'r', 'f' )
-#define FOURCC_strd                 mmioFOURCC( 's', 't', 'r', 'd' )
-
-#define FOURCC_rec                  mmioFOURCC( 'r', 'e', 'c', ' ' )
-#define FOURCC_auds                 mmioFOURCC( 'a', 'u', 'd', 's' )
-#define FOURCC_vids                 mmioFOURCC( 'v', 'i', 'd', 's' )
-        
-
-#define TWOCC_wb                    mmioTWOCC( 'w', 'b' )
-#define TWOCC_db                    mmioTWOCC( 'd', 'b' )
-#define TWOCC_dc                    mmioTWOCC( 'd', 'c' )
-#define TWOCC_pc                    mmioTWOCC( 'p', 'c' )
-        
-        
-/* definition of mpeg4 (opendivx) codec */
-#define FOURCC_DIVX         mmioFOURCC( 'D', 'I', 'V', 'X' )
-#define FOURCC_divx         mmioFOURCC( 'd', 'i', 'v', 'x' )
-#define FOURCC_DX50         mmioFOURCC( 'D', 'X', '5', '0' )
-#define FOURCC_MP4S         mmioFOURCC( 'M', 'P', '4', 'S' )
-#define FOURCC_MPG4         mmioFOURCC( 'M', 'P', 'G', '4' )
-#define FOURCC_mpg4         mmioFOURCC( 'm', 'p', 'g', '4' )
-#define FOURCC_mp4v         mmioFOURCC( 'm', 'p', '4', 'v' )
-        
-/* definition of msmepg (divx v3) codec */
-#define FOURCC_DIV3         mmioFOURCC( 'D', 'I', 'V', '3' )
-#define FOURCC_div3         mmioFOURCC( 'd', 'i', 'v', '3' )
-#define FOURCC_DIV4         mmioFOURCC( 'D', 'I', 'V', '4' )
-#define FOURCC_div4         mmioFOURCC( 'd', 'i', 'v', '4' )
-#define FOURCC_DIV5         mmioFOURCC( 'D', 'I', 'V', '5' )
-#define FOURCC_div5         mmioFOURCC( 'd', 'i', 'v', '5' )
-#define FOURCC_DIV6         mmioFOURCC( 'D', 'I', 'V', '6' )
-#define FOURCC_div6         mmioFOURCC( 'd', 'i', 'v', '6' )
-#define FOURCC_3IV1         mmioFOURCC( '3', 'I', 'V', '1' )
-#define FOURCC_AP41         mmioFOURCC( 'A', 'P', '4', '1' )
-#define FOURCC_MP43         mmioFOURCC( 'M', 'P', '4', '3' )
-#define FOURCC_mp43         mmioFOURCC( 'm', 'p', '4', '3' )
-        
index 4f3cb13e7abb3511fbe350098bb6dfd462876bc1..95a62af1112cce7006ffeaea94ec9e44668fa70e 100644 (file)
@@ -2,7 +2,7 @@
  * vout_dummy.c: Dummy video output display method for testing purposes
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: vout_dummy.c,v 1.21 2002/04/05 01:05:22 gbazin Exp $
+ * $Id: vout_dummy.c,v 1.22 2002/04/25 21:52:42 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -234,8 +234,8 @@ static int DummyNewPicture( vout_thread_t *p_vout, picture_t *p_pic )
     case FOURCC_YV12:
 
         /* Allocate the memory buffer */
-        p_pic->p_data = vlc_memalign( 16, i_width * i_height * 3 / 2,
-                                      &p_pic->p_data_orig );
+        p_pic->p_data = vlc_memalign( &p_pic->p_data_orig,
+                                      16, i_width * i_height * 3 / 2 );
 
         /* Y buffer */
         p_pic->Y_PIXELS = p_pic->p_data;
@@ -269,8 +269,8 @@ static int DummyNewPicture( vout_thread_t *p_vout, picture_t *p_pic )
     case FOURCC_RV16:
 
         /* Allocate the memory buffer */
-        p_pic->p_data = vlc_memalign( 16, i_width * i_height * 2,
-                                      &p_pic->p_data_orig );
+        p_pic->p_data = vlc_memalign( &p_pic->p_data_orig,
+                                      16, i_width * i_height * 2 );
 
         /* Fill important structures */
         p_pic->p->p_pixels = p_pic->p_data;
index e1708e50550961be3beff28f363b5431c601598e..018400aa13f95dadd6ba3d2db63c5f60dfe71f3d 100644 (file)
@@ -8,7 +8,7 @@
  *  -dvd_udf to find files
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_access.c,v 1.14 2002/04/23 14:16:20 sam Exp $
+ * $Id: dvd_access.c,v 1.15 2002/04/25 21:52:42 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -68,8 +68,6 @@
 #include "dvd_summary.h"
 #include "iso_lang.h"
 
-#include "debug.h"
-
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
index 674906e4bf927a917c0041e09d4405fab5142774..f5383d28d554d090a8d9a7c33fd4d58547a77863 100644 (file)
@@ -1,7 +1,7 @@
 /* dvd_demux.c: DVD demux functions.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_demux.c,v 1.4 2002/03/18 19:14:52 sam Exp $
+ * $Id: dvd_demux.c,v 1.5 2002/04/25 21:52:42 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -48,8 +48,6 @@
 #include "input_ext-dec.h"
 #include "input_ext-plugins.h"
 
-#include "debug.h"
-
 /* how many packets DVDDemux will read in each loop */
 #define DVD_READ_ONCE 64
 
index e9a6d8255fcbae81a6e3283668c4cfe15d0f6bd8..f954ad51a8d3e42d5c004677a216b009d2d94e10 100644 (file)
@@ -1,7 +1,7 @@
 /* dvd_es.c: functions to find and select ES
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_es.c,v 1.8 2002/04/23 20:58:23 sam Exp $
+ * $Id: dvd_es.c,v 1.9 2002/04/25 21:52:42 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -59,8 +59,6 @@
 #include "dvd_summary.h"
 #include "iso_lang.h"
 
-#include "debug.h"
-
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
index bcb1550b710134ff41deb983c1d743f04b8e6130..67c0a71bfe0de36f38dee925e40564991dccd6bb 100644 (file)
@@ -1,7 +1,7 @@
 /* dvd_seek.c: functions to navigate through DVD.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_seek.c,v 1.4 2002/04/03 06:23:08 sam Exp $
+ * $Id: dvd_seek.c,v 1.5 2002/04/25 21:52:42 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -58,8 +58,6 @@
 #include "dvd_seek.h"
 #include "dvd_ifo.h"
 
-#include "debug.h"
-
 #define title \
     p_dvd->p_ifo->vts.title_unit.p_title[p_dvd->i_title_id-1].title
 #define cell  p_dvd->p_ifo->vts.cell_inf
index a538473f46db183b2a33647da5b1c9db815dce2f..f4095f0b2a028589844c968153d8090324e6c698 100644 (file)
@@ -3,7 +3,7 @@
  * found in .ifo.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_summary.c,v 1.16 2002/04/03 06:23:08 sam Exp $
+ * $Id: dvd_summary.c,v 1.17 2002/04/25 21:52:42 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -57,8 +57,6 @@
 #include "dvd_ifo.h"
 #include "iso_lang.h"
 
-#include "debug.h"
-
 /*
  * Local tools to decode some data in ifo
  */
index 4a62230ea6d2812574132d6ad471c7701fa8e33a..6b9501afbc95cf2872104cb2ecbd535e07d52181 100644 (file)
@@ -6,7 +6,7 @@
  * It depends on: libdvdread for ifo files and block reading.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: input_dvdread.c,v 1.36 2002/04/23 14:16:20 sam Exp $
+ * $Id: input_dvdread.c,v 1.37 2002/04/25 21:52:42 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -76,8 +76,6 @@
 
 #include "iso_lang.h"
 
-#include "debug.h"
-
 /* how many blocks DVDRead will read in each loop */
 #define DVD_BLOCK_READ_ONCE 64
 
index 44b411bc995021a3f905910115874db2c5bb252c..a79a0c7a3d7a668a5cfe8dce383655bc7aeebf66 100644 (file)
@@ -640,8 +640,8 @@ static int QTNewPicture( vout_thread_t *p_vout, picture_t *p_pic )
             p_pic->p_sys->i_size = sizeof(PlanarPixmapInfoYUV420);
 
             /* Allocate the memory buffer */
-            p_pic->p_data = vlc_memalign( 16, i_width * i_height * 3 / 2,
-                                          &p_pic->p_data_orig );
+            p_pic->p_data = vlc_memalign( &p_pic->p_data_orig,
+                                          16, i_width * i_height * 3 / 2 );
 
             /* Y buffer */
             p_pic->Y_PIXELS = p_pic->p_data; 
index 21e61af1b7a2d4f82b64cb19a2f88e7927ef085d..83254966a8fccce9f89189d5b63e290e92a6cd76 100644 (file)
@@ -33,8 +33,6 @@
 #include "stream_control.h"
 #include "input_ext-dec.h"
 
-#include "debug.h"
-
 /*****************************************************************************
  * Libmad include files                                                      *
  *****************************************************************************/
index 9bd34295b2dee66a5517a84622d0b0fc90248380..aefd6b92d9b21e6c5040ed55fbf2c373edadfaf2 100644 (file)
@@ -31,8 +31,6 @@
 #include "stream_control.h"
 #include "input_ext-dec.h"
 
-#include "debug.h"
-
 /*****************************************************************************
  * Libmad includes files
  *****************************************************************************/
index 249d267f3c992c2cfea346a2bda5df25538ac87f..d34223bfc96d652e88c02b96e342b70fece0749c 100644 (file)
@@ -2,7 +2,7 @@
  * vpar_pool.c : management of the pool of decoder threads
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: vpar_pool.c,v 1.7 2002/04/05 01:05:22 gbazin Exp $
+ * $Id: vpar_pool.c,v 1.8 2002/04/25 21:52:42 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -89,8 +89,8 @@ void vpar_InitPool( vpar_thread_t * p_vpar )
     for( j = 0; j < 12; j++ )
     {
         p_vpar->pool.mb.p_idcts[j].pi_block =
-            vlc_memalign( 16, 64 * sizeof(dctelem_t),
-                          &p_vpar->pool.mb.p_idcts[j].pi_block_orig );
+            vlc_memalign( &p_vpar->pool.mb.p_idcts[j].pi_block_orig,
+                          16, 64 * sizeof(dctelem_t) );
     }
 }
 
@@ -168,8 +168,8 @@ void vpar_SpawnPool( vpar_thread_t * p_vpar )
                 for( j = 0; j < 12; j++ )
                 {
                     p_vpar->pool.p_macroblocks[i].p_idcts[j].pi_block =
-                        vlc_memalign( 16, 64 * sizeof(dctelem_t),
-                                      &p_vpar->pool.p_macroblocks[i].p_idcts[j].pi_block_orig );
+                        vlc_memalign( &p_vpar->pool.p_macroblocks[i].p_idcts[j].pi_block_orig,
+                                      16, 64 * sizeof(dctelem_t) );
                 }
 
                 p_vpar->pool.pp_vdec[i] = vdec_CreateThread( &p_vpar->pool );
index ce9a4c09d93444f4adec1bd5efb6c6a4479ea539..e6ae16a12abc6df8a3e4353d4e5d4d3f00d1dcc8 100644 (file)
@@ -47,8 +47,6 @@
 #include "input_ext-dec.h"
 #include "input_ext-plugins.h"
 
-#include "debug.h"
-
 #include "satellite_tools.h"
 
 #define SATELLITE_READ_ONCE 3
index ee5f172d340559083234826fd124e476727873fc..69b3e831fc4f3b43aac77afca215e40f573a27e3 100644 (file)
@@ -53,8 +53,6 @@
 #include "input_ext-dec.h"
 #include "input_ext-plugins.h"
 
-#include "debug.h"
-
 #include "input_vcd.h"
 #include "cdrom_tools.h"
 
index 6638f513185f663e740c335fe469b35cf100cbbd..0404a95012a7223ef8efaab6bab1a675ea10b073 100644 (file)
@@ -2,7 +2,7 @@
  * input_programs.c: es_descriptor_t, pgrm_descriptor_t management
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: input_programs.c,v 1.82 2002/04/23 23:44:36 fenrir Exp $
+ * $Id: input_programs.c,v 1.83 2002/04/25 21:52:42 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -35,8 +35,6 @@
 #include "input_ext-dec.h"
 #include "input_ext-plugins.h"
 
-#include "debug.h"
-
 /*
  * NOTICE : all of these functions expect you to have taken the lock on
  * p_input->stream.lock
index 99d4c867fa55ed35744c6e5fead319878018d302..27cc71a89aa3a7d6d24e7f7827df40cc77c49c64 100644 (file)
@@ -4,7 +4,7 @@
  * and spawn threads.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: main.c,v 1.187 2002/04/24 00:36:24 sam Exp $
+ * $Id: main.c,v 1.188 2002/04/25 21:52:42 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -80,8 +80,6 @@
 #include "video.h"
 #include "video_output.h"
 
-#include "debug.h"
-
 /*****************************************************************************
  * Configuration options for the main program. Each module will also separatly
  * define its own configuration options.
@@ -679,9 +677,7 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
     /*
      * System specific configuration
      */
-#if defined( WIN32 )
     system_Configure();
-#endif
 
     /* p_main inititalization. FIXME ? */
     p_main->i_warning_level = config_GetIntVariable( "warning" );
@@ -844,10 +840,7 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
     /*
      * System specific cleaning code
      */
-#if defined( SYS_BEOS ) || defined( SYS_DARWIN ) || defined( WIN32 )
     system_End();
-#endif
-
 
     /*
      * Terminate messages interface and program
index a8d3003191ef38a2792e06f5d092fc62703a1ce5..763491e7ebf37031a19f622bceb0738f84246628 100644 (file)
@@ -2,7 +2,7 @@
  * modules_plugin.h : Plugin management functions used by the core application.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules_plugin.h,v 1.20 2002/04/25 02:10:33 jobi Exp $
+ * $Id: modules_plugin.h,v 1.21 2002/04/25 21:52:42 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -248,6 +248,7 @@ module_error( char *psz_buffer )
     (p_symbols)->input_DemuxPS = input_DemuxPS; \
     (p_symbols)->input_ReadTS = input_ReadTS; \
     (p_symbols)->input_DemuxTS = input_DemuxTS; \
+    (p_symbols)->input_ClockManageRef = input_ClockManageRef; \
     (p_symbols)->input_ClockManageControl = input_ClockManageControl; \
     (p_symbols)->input_FDSeek = input_FDSeek; \
     (p_symbols)->input_FDClose = input_FDClose; \
@@ -283,6 +284,7 @@ module_error( char *psz_buffer )
     (p_symbols)->vout_LinkPicture = vout_LinkPicture; \
     (p_symbols)->vout_UnlinkPicture = vout_UnlinkPicture; \
     (p_symbols)->vout_PlacePicture = vout_PlacePicture; \
+    (p_symbols)->vout_ChromaCmp = vout_ChromaCmp; \
     (p_symbols)->UnalignedGetBits = UnalignedGetBits; \
     (p_symbols)->UnalignedRemoveBits = UnalignedRemoveBits; \
     (p_symbols)->UnalignedShowBits = UnalignedShowBits; \
index c7f8c66549dfc51621cf67c568b907813cc7fc6f..d3386e5d2f2daffb17e21a66308f506589721c0a 100644 (file)
@@ -5,7 +5,7 @@
  * thread, and destroy a previously oppened video output thread.
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: video_output.c,v 1.172 2002/04/21 11:23:03 gbazin Exp $
+ * $Id: video_output.c,v 1.173 2002/04/25 21:52:42 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -265,6 +265,68 @@ void vout_DestroyThread( vout_thread_t *p_vout, int *pi_status )
     }
 }
 
+/*****************************************************************************
+ * vout_ChromaCmp: compare two chroma values
+ *****************************************************************************
+ * This function returns 1 if the two fourcc values given as argument are
+ * the same format (eg. UYVY / UYNV) or almost the same format (eg. I420/YV12)
+ *****************************************************************************/
+int vout_ChromaCmp( u32 i_chroma, u32 i_amorhc )
+{
+    /* If they are the same, they are the same ! */
+    if( i_chroma == i_amorhc )
+    {
+        return 1;
+    }
+
+    /* Check for equivalence classes */
+    switch( i_chroma )
+    {
+        case FOURCC_I420:
+        case FOURCC_IYUV:
+        case FOURCC_YV12:
+            switch( i_amorhc )
+            {
+                case FOURCC_I420:
+                case FOURCC_IYUV:
+                case FOURCC_YV12:
+                    return 1;
+
+                default:
+                    return 0;
+            }
+
+        case FOURCC_UYVY:
+        case FOURCC_UYNV:
+        case FOURCC_Y422:
+            switch( i_amorhc )
+            {
+                case FOURCC_UYVY:
+                case FOURCC_UYNV:
+                case FOURCC_Y422:
+                    return 1;
+
+                default:
+                    return 0;
+            }
+
+        case FOURCC_YUY2:
+        case FOURCC_YUNV:
+            switch( i_amorhc )
+            {
+                case FOURCC_YUY2:
+                case FOURCC_YUNV:
+                    return 1;
+
+                default:
+                    return 0;
+            }
+
+        default:
+            return 0;
+    }
+}
+
 /*****************************************************************************
  * InitThread: initialize video output thread
  *****************************************************************************
index d46c4d39fd0a30f5e2f18d8cedda279a14b1e00d..f95e859aa830affca1219bf2f88424f6028c7557 100644 (file)
@@ -2,7 +2,7 @@
  * vout_pictures.c : picture management functions
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: vout_pictures.c,v 1.21 2002/04/15 23:04:08 massiot Exp $
+ * $Id: vout_pictures.c,v 1.22 2002/04/25 21:52:42 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
 #include "video.h"
 #include "video_output.h"
 
+/*****************************************************************************
+ * Local prototypes
+ *****************************************************************************/
+static void vout_CopyPicture( picture_t *p_src, picture_t *p_dest );
+
 /*****************************************************************************
  * vout_DisplayPicture: display a picture
  *****************************************************************************
@@ -517,7 +522,7 @@ void vout_AllocatePicture( picture_t *p_pic,
         i_bytes += p_pic->p[ i_index ].i_lines * p_pic->p[ i_index ].i_pitch;
     }
 
-    p_pic->p_data = vlc_memalign( 16, i_bytes, &p_pic->p_data_orig );
+    p_pic->p_data = vlc_memalign( &p_pic->p_data_orig, 16, i_bytes );
 
     if( p_pic->p_data == NULL )
     {
@@ -536,3 +541,65 @@ void vout_AllocatePicture( picture_t *p_pic,
     }
 }
 
+/* Following functions are local */
+
+/*****************************************************************************
+ * vout_CopyPicture: copy a picture to another one
+ *****************************************************************************
+ * This function takes advantage of the image format, and reduces the
+ * number of calls to memcpy() to the minimum. Source and destination
+ * images must have same width, height, and chroma.
+ *****************************************************************************/
+static void vout_CopyPicture( picture_t *p_src, picture_t *p_dest )
+{
+#if 0
+    int i;
+
+    for( i = 0; i < p_src->i_planes ; i++ )
+    {
+        if( p_src->p[i].i_pitch == p_dest->p[i].i_pitch )
+        {
+            if( p_src->p[i].b_margin )
+            {
+                /* If p_src->b_margin is set, p_dest->b_margin must be set */
+                if( p_dest->p[i].b_hidden )
+                {
+                    /* There are margins, but they are hidden : perfect ! */
+                    FAST_MEMCPY( p_dest->p[i].p_pixels, p_src->p[i].p_pixels,
+                                 p_src->p[i].i_pitch * p_src->p[i].i_lines );
+                    continue;
+                }
+                else
+                {
+                    /* We can't directly copy the margin. Too bad. */
+                }
+            }
+            else
+            {
+                /* Same pitch, no margins : perfect ! */
+                FAST_MEMCPY( p_dest->p[i].p_pixels, p_src->p[i].p_pixels,
+                             p_src->p[i].i_pitch * p_src->p[i].i_lines );
+                continue;
+            }
+        }
+        else
+        {
+            /* Pitch values are different */
+        }
+
+        /* We need to proceed line by line */
+        {
+            u8 *p_in = p_src->p[i].p_pixels, *p_out = p_dest->p[i].p_pixels;
+            int i_line;
+
+            for( i_line = p_src->p[i].i_lines; i_line--; )
+            {
+                FAST_MEMCPY( p_out, p_in, p_src->p[i].i_visible_bytes );
+                p_in += p_src->p[i].i_pitch;
+                p_out += p_dest->p[i].i_pitch;
+            }
+        }
+    }
+#endif
+}
+
index 9ab44cdefdd85224f393901834b2941d815a811a..0e9cebd32bba92e7767614cb778ee9c56f1a6cb6 100644 (file)
@@ -2,7 +2,7 @@
  * vout_subpictures.c : subpicture management functions
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: vout_subpictures.c,v 1.12 2002/04/05 01:05:22 gbazin Exp $
+ * $Id: vout_subpictures.c,v 1.13 2002/04/25 21:52:42 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -139,7 +139,7 @@ subpicture_t *vout_CreateSubPicture( vout_thread_t *p_vout, int i_type,
     }
 
     p_free_subpic->p_sys =
-        vlc_memalign( 16, i_size, &p_free_subpic->p_sys_orig );
+        vlc_memalign( &p_free_subpic->p_sys_orig, 16, i_size );
 
     if( p_free_subpic->p_sys != NULL )
     {