Commit eb1ec4a4 authored by Sam Hocevar's avatar Sam Hocevar

* ./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.
parent ebf1f255
......@@ -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.
......
......@@ -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
......
......@@ -1455,10 +1455,6 @@ SOURCE=..\..\include\darwin_specific.h
# End Source File
# Begin Source File
SOURCE=..\..\include\debug.h
# End Source File
# Begin Source File
SOURCE=.\defs.h
# End Source File
# Begin Source 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 );
......
/*****************************************************************************
* 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
......@@ -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
......
......@@ -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>
......@@ -22,19 +22,23 @@
* 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
......@@ -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
*****************************************************************************
......
......@@ -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
......@@ -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"
......
......@@ -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"
......
......@@ -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),