Commit 52d7937c authored by Sam Hocevar's avatar Sam Hocevar

. rajout de l'option -Winline

 . fix de certaines fonctions qui devraient �tre inlin�es
 . gain de place dans la YUVMMX
parent e13aed00
[]
0.1.99f :
* plugin detection now works
* "gvlc", "fbvlc", "ggivlc" aliases now work
* fixed functions that weren't properly inlined
* removed bloat from the MMX YUV plugin
Thu Jul 20 15:14:06 CEST 2000
0.1.99e :
......
......@@ -8,6 +8,11 @@ A typical way to configure the vlc is :
./configure --prefix=/usr --enable-mmx --enable-gnome
For a full compilation, you may try :
./configure --prefix=/usr --enable-mmx --enable-gnome --enable-fb \
--enable-glide --enable-ggi --enable-mga --enable-esd
See `./configure --help' for more information.
Then, run `make', and `make install' to install it.
......
......@@ -79,12 +79,14 @@ endif
# C compiler flags: compilation
#
CCFLAGS += $(DEFINE) $(INCLUDE)
CCFLAGS += -Wall
CCFLAGS += -Wall -Winline
CCFLAGS += -D_REENTRANT
CCFLAGS += -D_GNU_SOURCE
# flags needed for clean beos compilation
ifeq ($(SYS),beos)
CCFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
endif
# Optimizations : don't compile debug versions with them
ifeq ($(DEBUG),0)
......
......@@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH VLC 1 "March 13, 2000"
.TH VLC 1 "July 30, 2000"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
......@@ -36,7 +36,7 @@ A summary of options is included below.
Disable audio output.
.TP
.B \-\-aout <plugin>
Specify an audio output plugin.
Specify an audio output plugin: "dsp", "esd", for instance.
.TP
.B \-\-stereo, \-\-mono
Choose stereo or mono audio output
......@@ -45,7 +45,10 @@ Choose stereo or mono audio output
Disable video output.
.TP
.B \-\-vout <plugin>
Specify a video output plugin.
Specify a video output plugin: "gnome", "fb", "glide", for instance.
.TP
.B \-\-yuv <plugin>
Specify a YUV plugin: "mmx", "nommx", for instance.
.TP
.B \-\-display <display>
Specify the display name.
......
......@@ -90,13 +90,13 @@ typedef struct picture_s
#define YUV_444_PICTURE 102 /* 4:4:4 YUV picture */
/* Pictures status */
#define FREE_PICTURE 0 /* picture is free and not allocated */
#define RESERVED_PICTURE 1 /* picture is allocated and reserved */
#define RESERVED_DATED_PICTURE 2 /* picture is waiting for DisplayPicture */
#define RESERVED_DISP_PICTURE 3 /* picture is waiting for a DatePixture */
#define READY_PICTURE 4 /* picture is ready for display */
#define DISPLAYED_PICTURE 5/* picture has been displayed but is linked */
#define DESTROYED_PICTURE 6 /* picture is allocated but no more used */
#define FREE_PICTURE 0 /* free and not allocated */
#define RESERVED_PICTURE 1 /* allocated and reserved */
#define RESERVED_DATED_PICTURE 2 /* waiting for DisplayPicture */
#define RESERVED_DISP_PICTURE 3 /* waiting for a DatePicture */
#define READY_PICTURE 4 /* ready for display */
#define DISPLAYED_PICTURE 5 /* been displayed but is linked */
#define DESTROYED_PICTURE 6 /* allocated but no more used */
/* Aspect ratios (ISO/IEC 13818-2 section 6.3.3, table 6-3) */
#define AR_SQUARE_PICTURE 1 /* square pixels */
......@@ -105,9 +105,9 @@ typedef struct picture_s
#define AR_221_1_PICTURE 4 /* 2.21:1 picture (movie) */
/*****************************************************************************
* subpicture_t: video sub picture unit
* subpicture_t: video subtitle
*****************************************************************************
* Any sub picture unit destined to be displayed by a video output thread should
* Any subtitle destined to be displayed by a video output thread should
* be stored in this structure from it's creation to it's effective display.
* Subtitle type and flags should only be modified by the output thread. Note
* that an empty subtitle MUST have its flags set to 0.
......@@ -118,7 +118,7 @@ typedef struct subpicture_s
int i_type; /* type */
int i_status; /* flags */
int i_size; /* data size */
struct subpicture_s * p_next; /* next SPU to be displayed */
struct subpicture_s * p_next; /* next subtitle to be displayed */
/* Other properties */
mtime_t begin_date; /* beginning of display date */
......@@ -126,7 +126,7 @@ typedef struct subpicture_s
/* Display properties - these properties are only indicative and may be
* changed by the video output thread, or simply ignored depending of the
* subpicture type. */
* subtitle type. */
int i_x; /* offset from alignment position */
int i_y; /* offset from alignment position */
int i_width; /* picture width */
......@@ -160,29 +160,29 @@ typedef struct subpicture_s
} subpicture_t;
/* Subpicture type */
#define EMPTY_SUBPICTURE 0 /* subtitle slot is empty and available */
#define DVD_SUBPICTURE 100 /* DVD subpicture unit */
#define TEXT_SUBPICTURE 200 /* single line text */
#define EMPTY_SUBPICTURE 0 /* subtitle slot is empty and available */
#define DVD_SUBPICTURE 100 /* DVD subpicture unit */
#define TEXT_SUBPICTURE 200 /* single line text */
/* Subpicture status */
#define FREE_SUBPICTURE 0 /* subpicture is free and not allocated */
#define RESERVED_SUBPICTURE 1 /* subpicture is allocated and reserved */
#define READY_SUBPICTURE 2 /* subpicture is ready for display */
#define DESTROYED_SUBPICTURE 3/* subpicture is allocated but no more used */
#define FREE_SUBPICTURE 0 /* free and not allocated */
#define RESERVED_SUBPICTURE 1 /* allocated and reserved */
#define READY_SUBPICTURE 2 /* ready for display */
#define DESTROYED_SUBPICTURE 3 /* allocated but not used anymore */
/* Alignment types */
#define RIGHT_ALIGN 10 /* x is absolute for right */
#define LEFT_ALIGN 11 /* x is absolute for left */
#define RIGHT_RALIGN 12 /* x is relative for right from right */
#define LEFT_RALIGN 13 /* x is relative for left from left */
#define CENTER_ALIGN 20 /* x, y are absolute for center */
#define CENTER_RALIGN 21 /* x, y are relative for center from center */
#define BOTTOM_ALIGN 30 /* y is absolute for bottom */
#define TOP_ALIGN 31 /* y is absolute for top */
#define BOTTOM_RALIGN 32 /* y is relative for bottom from bottom */
#define TOP_RALIGN 33 /* y is relative for top from top */
#define SUBTITLE_RALIGN 34 /* y is relative for center from subtitle */
#define RIGHT_ALIGN 10 /* x is absolute for right */
#define LEFT_ALIGN 11 /* x is absolute for left */
#define RIGHT_RALIGN 12 /* x is relative for right from right */
#define LEFT_RALIGN 13 /* x is relative for left from left */
#define CENTER_ALIGN 20 /* x, y are absolute for center */
#define CENTER_RALIGN 21 /* x,y are relative for center from center */
#define BOTTOM_ALIGN 30 /* y is absolute for bottom */
#define TOP_ALIGN 31 /* y is absolute for top */
#define BOTTOM_RALIGN 32 /* y is relative for bottom from bottom */
#define TOP_RALIGN 33 /* y is relative for top from top */
#define SUBTITLE_RALIGN 34 /* y is relative for center from subtitle */
......@@ -24,10 +24,10 @@
*****************************************************************************/
/*****************************************************************************
* vout_yuv_convert_t: YUV convertion function
* vout_yuv_convert_t: YUV conversion function
*****************************************************************************
* This is the prototype common to all convertion functions. The type of p_pic
* will change depending of the screen depth treated.
* This is the prototype common to all conversion functions. The type of p_pic
* will change depending on the processed screen depth.
* Parameters:
* p_vout video output thread
* p_pic picture address
......@@ -45,13 +45,13 @@ typedef void (vout_yuv_convert_t)( p_vout_thread_t p_vout, void *p_pic,
int i_matrix_coefficients );
/*****************************************************************************
* vout_yuv_t: pre-calculated YUV convertion tables
* vout_yuv_t: pre-calculated YUV conversion tables
*****************************************************************************
* These tables are used by convertion and scaling functions.
* These tables are used by conversion and scaling functions.
*****************************************************************************/
typedef struct vout_yuv_s
{
/* Convertion functions */
/* conversion functions */
vout_yuv_convert_t * p_Convert420; /* YUV 4:2:0 converter */
vout_yuv_convert_t * p_Convert422; /* YUV 4:2:2 converter */
vout_yuv_convert_t * p_Convert444; /* YUV 4:4:4 converter */
......@@ -69,21 +69,21 @@ typedef struct vout_yuv_s
} yuv;
/* Temporary conversion buffer and offset array */
void * p_buffer; /* convertion buffer */
void * p_buffer; /* conversion buffer */
int * p_offset; /* offset array */
} vout_yuv_t;
/*****************************************************************************
* vout_buffer_t: rendering buffer
*****************************************************************************
* This structure store informations about a buffer. Buffers are not completely
* This structure stores information about a buffer. Buffers are not completely
* cleared between displays, and modified areas need to be stored.
*****************************************************************************/
typedef struct vout_buffer_s
{
/* Picture area */
int i_pic_x, i_pic_y; /* picture position */
int i_pic_width, i_pic_height; /* picture extension */
int i_pic_width, i_pic_height; /* picture size */
/* Other areas - only vertical extensions of areas are stored */
int i_areas; /* number of areas */
......@@ -172,7 +172,7 @@ typedef struct vout_thread_s
/* Pictures and rendering properties */
boolean_t b_grayscale; /* color or grayscale display */
boolean_t b_info; /* print additionnal informations */
boolean_t b_info; /* print additional information */
boolean_t b_interface; /* render interface */
boolean_t b_scale; /* allow picture scaling */
......@@ -192,7 +192,7 @@ typedef struct vout_thread_s
int i_buffer_index; /* buffer index */
vout_buffer_t p_buffer[2]; /* buffers properties */
/* Videos heap and translation tables */
/* Video heap and translation tables */
picture_t p_picture[VOUT_MAX_PICTURES]; /* pictures */
subpicture_t p_subpicture[VOUT_MAX_PICTURES]; /* subpictures */
int i_pictures; /* current heap size */
......@@ -202,7 +202,7 @@ typedef struct vout_thread_s
p_vout_font_t p_default_font; /* default font */
p_vout_font_t p_large_font; /* large font */
/* Synchronisation informations - synchro level is updated by the vout
/* Synchronization informations - synchro level is updated by the vout
* thread and read by decoder threads */
int i_synchro_level; /* trashing level */
} vout_thread_t;
......
......@@ -73,7 +73,6 @@ int aout_EsdOpen( aout_thread_t *p_aout )
int i_mode = ESD_STREAM;
int i_func = ESD_PLAY;
fprintf(stderr, "aout-esd !!\n");
/* Allocate structure */
p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
if( p_aout->p_sys == NULL )
......
This diff is collapsed.
/*****************************************************************************
* video_yuv.h: YUV transformation functions
* video_yuv.h: MMX YUV transformation functions
* Provides functions to perform the YUV conversion. The functions provided here
* are a complete and portable C implementation, and may be replaced in certain
* case by optimized functions.
......@@ -28,30 +28,11 @@
* Constants
*****************************************************************************/
/* Margins and offsets in conversion tables - Margins are used in case a RGB
* RGB conversion would give a value outside the 0-255 range. Offsets have been
* calculated to avoid using the same cache line for 2 tables. conversion tables
* are 2*MARGIN + 256 long and stores pixels.*/
#define RED_MARGIN 178
#define GREEN_MARGIN 135
#define BLUE_MARGIN 224
#define RED_OFFSET 1501 /* 1323 to 1935 */
#define GREEN_OFFSET 135 /* 0 to 526 */
#define BLUE_OFFSET 818 /* 594 to 1298 */
#define RGB_TABLE_SIZE 1935 /* total table size */
#define GRAY_MARGIN 384
#define GRAY_TABLE_SIZE 1024 /* total table size */
#define PALETTE_TABLE_SIZE 2176 /* YUV -> 8bpp palette lookup table */
/* macros used for YUV pixel conversions */
#define SHIFT 20
#define U_GREEN_COEF ((int)(-0.391 * (1<<SHIFT) / 1.164))
#define U_BLUE_COEF ((int)(2.018 * (1<<SHIFT) / 1.164))
#define V_RED_COEF ((int)(1.596 * (1<<SHIFT) / 1.164))
#define V_GREEN_COEF ((int)(-0.813 * (1<<SHIFT) / 1.164))
/* argument lists for YUV functions */
#define YUV_ARGS_8BPP p_vout_thread_t p_vout, u8 *p_pic, yuv_data_t *p_y, \
yuv_data_t *p_u, yuv_data_t *p_v, int i_width, int i_height, int i_pic_width, \
......
......@@ -99,7 +99,10 @@ void ConvertYUV420RGB16( YUV_ARGS_16BPP )
__asm__( MMX_INIT_16
: : "r" (p_y), "r" (p_u), "r" (p_v), "r" (p_buffer) );
__asm__( ".align 8" MMX_YUV_MUL MMX_YUV_ADD MMX_UNPACK_16
__asm__( ".align 8"
MMX_YUV_MUL
MMX_YUV_ADD
MMX_UNPACK_16
: : "r" (p_y), "r" (p_u), "r" (p_v), "r" (p_buffer) );
p_y += 8;
......
/*****************************************************************************
* video_yuv24.c: YUV transformation functions for 24 bpp
* video_yuv24.c: MMX YUV transformation functions for 24 bpp
* Provides functions to perform the YUV conversion. The functions provided here
* are a complete and portable C implementation, and may be replaced in certain
* case by optimized functions.
......
/*****************************************************************************
* video_yuv32.c: YUV transformation functions for 32 bpp
* video_yuv32.c: MMX YUV transformation functions for 32 bpp
* Provides functions to perform the YUV conversion. The functions provided here
* are a complete and portable C implementation, and may be replaced in certain
* case by optimized functions.
......
/*****************************************************************************
* video_yuv8.c: YUV transformation functions for 8bpp
* video_yuv8.c: MMX YUV transformation functions for 8bpp
* Provides functions to perform the YUV conversion. The functions provided here
* are a complete and portable C implementation, and may be replaced in certain
* case by optimized functions.
......
/*****************************************************************************
* video_yuv_asm.h: YUV transformation assembly
* video_yuv_asm.h: MMX YUV transformation assembly
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
......@@ -82,7 +82,7 @@ movq %%mm1, %%mm3 # Copy 4 Cr 00 v3 00 v2 00 v1 00 v0 \n\
pmulhw mmx_U_green, %%mm2 # Mul Cb with green coeff -> Cb green \n\
pmulhw mmx_V_green, %%mm3 # Mul Cr with green coeff -> Cr green \n\
pmulhw mmx_U_blue, %%mm0 # Mul Cb -> Cblue 00 b3 00 b2 00 b1 00 b0 \n\
pmulhw mmx_V_red, %%mm1 # Mul Cr -> Cred 00 r3 00 r2 00 r1 00 \n\
pmulhw mmx_V_red, %%mm1 # Mul Cr -> Cred 00 r3 00 r2 00 r1 00 r0 \n\
paddsw %%mm3, %%mm2 # Cb green + Cr green -> Cgreen \n\
\n\
# convert the luma part \n\
......
/*****************************************************************************
* video_yuv_macros.h: YUV transformation macros
* video_yuv_macros.h: MMX YUV transformation macros
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
......
......@@ -74,6 +74,25 @@ void aout_Thread_U16_Stereo ( aout_thread_t * p_aout );
static __inline__ void InitializeIncrement( aout_increment_t * p_increment, long l_numerator, long l_denominator );
static __inline__ int NextFrame( aout_thread_t * p_aout, aout_fifo_t * p_fifo, mtime_t aout_date );
/*****************************************************************************
* InitializeIncrement
*****************************************************************************/
static __inline__ void InitializeIncrement( aout_increment_t * p_increment, long l_numerator, long l_denominator )
{
p_increment->l_remainder = -l_denominator;
p_increment->l_euclidean_integer = 0;
while ( l_numerator >= l_denominator )
{
p_increment->l_euclidean_integer++;
l_numerator -= l_denominator;
}
p_increment->l_euclidean_remainder = l_numerator;
p_increment->l_euclidean_denominator = l_denominator;
}
/*****************************************************************************
* aout_CreateThread: initialize audio thread
*****************************************************************************/
......@@ -467,25 +486,6 @@ void aout_DestroyFifo( aout_fifo_t * p_fifo )
/* Following functions are local */
/*****************************************************************************
* InitializeIncrement
*****************************************************************************/
static __inline__ void InitializeIncrement( aout_increment_t * p_increment, long l_numerator, long l_denominator )
{
p_increment->l_remainder = -l_denominator;
p_increment->l_euclidean_integer = 0;
while ( l_numerator >= l_denominator )
{
p_increment->l_euclidean_integer++;
l_numerator -= l_denominator;
}
p_increment->l_euclidean_remainder = l_numerator;
p_increment->l_euclidean_denominator = l_denominator;
}
/*****************************************************************************
* NextFrame
*****************************************************************************/
......
This diff is collapsed.
This diff is collapsed.
......@@ -22,11 +22,11 @@
/* Text styles - these are primary text styles, used by the vout_Print function.
* They may be ignored or interpreted by higher level functions */
#define WIDE_TEXT 1 /* interspacing is doubled */
#define ITALIC_TEXT 2 /* italic */
#define OPAQUE_TEXT 4 /* text with background */
#define OUTLINED_TEXT 8 /* border around letters */
#define VOID_TEXT 16 /* no foreground */
#define WIDE_TEXT 1<<0 /* interspacing is doubled */
#define ITALIC_TEXT 1<<1 /* italic */
#define OPAQUE_TEXT 1<<2 /* text with background */
#define OUTLINED_TEXT 1<<3 /* border around letters */
#define VOID_TEXT 1<<4 /* no foreground */
/*****************************************************************************
......
......@@ -46,10 +46,10 @@
#include "main.h"
/*****************************************************************************
* vout_InitYUV: allocate and initialize translations tables
* vout_InitYUV: allocate and initialize translation tables
*****************************************************************************
* This function will allocate memory to store translation tables, depending
* of the screen depth.
* on the screen depth.
*****************************************************************************/
int vout_InitYUV( vout_thread_t *p_vout )
{
......@@ -76,7 +76,7 @@ int vout_InitYUV( vout_thread_t *p_vout )
}
/*****************************************************************************
* vout_ResetYUV: re-initialize translations tables
* vout_ResetYUV: re-initialize translation tables
*****************************************************************************
* This function will initialize the tables allocated by vout_InitYUV and
* set functions pointers.
......@@ -88,7 +88,7 @@ int vout_ResetYUV( vout_thread_t *p_vout )
}
/*****************************************************************************
* vout_EndYUV: destroy translations tables
* vout_EndYUV: destroy translation tables
*****************************************************************************
* Free memory allocated by vout_InitYUV
*****************************************************************************/
......
......@@ -159,7 +159,7 @@ void vpar_SynchroUpdateStructures( vpar_thread_t * p_vpar,
#if 1
if( p_vpar->synchro.b_all_I )
intf_ErrMsg( "I: 1/1 " );
intf_ErrMsg( " I: 1/1 " );
if( p_vpar->synchro.b_all_P )
intf_ErrMsg( "P: %i/%i ", p_vpar->synchro.i_P_seen,
p_vpar->synchro.i_P_seen );
......@@ -172,7 +172,7 @@ void vpar_SynchroUpdateStructures( vpar_thread_t * p_vpar,
else if( p_vpar->synchro.displayable_b > 0 )
intf_ErrMsg( "B: %.2f/%i", p_vpar->synchro.displayable_b,
p_vpar->synchro.i_B_seen );
intf_ErrMsg( "\n" );
intf_ErrMsg( " " );
#endif
p_vpar->synchro.i_P_seen = 0;
p_vpar->synchro.i_B_seen = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment