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.
# 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
# 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
* 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>
/* 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
# 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
*****************************************************************************/
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 );
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 );
+++ /dev/null
-/*****************************************************************************
- * 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
* 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>
*
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
* 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
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
+
* 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>
*
#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
#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
*****************************************************************************
* 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>
*
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 );
# 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
* 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>
/*****************************************************************************
* Required vlc headers
*****************************************************************************/
-#if defined( __VLC__ ) || defined( __PLUGIN__ ) || defined( __BUILTIN__ )
+#if defined( __VLC__ )
# include "defs.h"
# include "config.h"
* (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>
*
#include "stream_control.h"
#include "input_ext-dec.h"
-#include "debug.h"
-
#include <a52dec/a52.h> /* liba52 header file */
#include "a52.h"
* 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>
*
*/
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
* 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 );
/* 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 );
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 )
{
* 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
#include "input_ext-dec.h"
#include "input_ext-plugins.h"
+#include "video.h"
+
/*****************************************************************************
* Constants
*****************************************************************************/
/*****************************************************************************
* Definition of structures and libraries for this plugins
*****************************************************************************/
-#include "fourcc.h"
#include "libLE.c"
#include "libioRIFF.c"
#include "avi.h"
* 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 */
+++ /dev/null
-/*****************************************************************************
- * 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' )
-
* 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>
*
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;
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;
* -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>
*
#include "dvd_summary.h"
#include "iso_lang.h"
-#include "debug.h"
-
/*****************************************************************************
* Local prototypes
*****************************************************************************/
/* 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>
*
#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
/* 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>
*
#include "dvd_summary.h"
#include "iso_lang.h"
-#include "debug.h"
-
/*****************************************************************************
* Local prototypes
*****************************************************************************/
/* 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>
*
#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
* 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>
*
#include "dvd_ifo.h"
#include "iso_lang.h"
-#include "debug.h"
-
/*
* Local tools to decode some data in ifo
*/
* 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>
*
#include "iso_lang.h"
-#include "debug.h"
-
/* how many blocks DVDRead will read in each loop */
#define DVD_BLOCK_READ_ONCE 64
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;
#include "stream_control.h"
#include "input_ext-dec.h"
-#include "debug.h"
-
/*****************************************************************************
* Libmad include files *
*****************************************************************************/
#include "stream_control.h"
#include "input_ext-dec.h"
-#include "debug.h"
-
/*****************************************************************************
* Libmad includes files
*****************************************************************************/
* 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>
*
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) );
}
}
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 );
#include "input_ext-dec.h"
#include "input_ext-plugins.h"
-#include "debug.h"
-
#include "satellite_tools.h"
#define SATELLITE_READ_ONCE 3
#include "input_ext-dec.h"
#include "input_ext-plugins.h"
-#include "debug.h"
-
#include "input_vcd.h"
#include "cdrom_tools.h"
* 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>
*
#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
* 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>
#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.
/*
* System specific configuration
*/
-#if defined( WIN32 )
system_Configure();
-#endif
/* p_main inititalization. FIXME ? */
p_main->i_warning_level = config_GetIntVariable( "warning" );
/*
* System specific cleaning code
*/
-#if defined( SYS_BEOS ) || defined( SYS_DARWIN ) || defined( WIN32 )
system_End();
-#endif
-
/*
* Terminate messages interface and program
* 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>
*
(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; \
(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; \
* 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>
*
}
}
+/*****************************************************************************
+ * 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
*****************************************************************************
* 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
*****************************************************************************
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 )
{
}
}
+/* 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
+}
+
* 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>
}
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 )
{