Commit 2faf5103 authored by Vincent Seguin's avatar Vincent Seguin

Nettoyage, ajout du gamma, pr�paration de la yuv walken.

parent a6bc5de8
...@@ -22,7 +22,7 @@ VIDEO=X11 ...@@ -22,7 +22,7 @@ VIDEO=X11
# Target architecture and optimization # Target architecture and optimization
#ARCH= #ARCH=
ARCH=MMX #ARCH=MMX
#ARCH=PPC #ARCH=PPC
# Decoder choice - ?? old decoder will be removed soon # Decoder choice - ?? old decoder will be removed soon
...@@ -64,6 +64,7 @@ endif ...@@ -64,6 +64,7 @@ endif
# Libraries # Libraries
# #
LIB += -lpthread LIB += -lpthread
LIB += -lm
ifeq ($(VIDEO),X11) ifeq ($(VIDEO),X11)
LIB += -L/usr/X11R6/lib LIB += -L/usr/X11R6/lib
...@@ -211,7 +212,7 @@ misc_obj = misc/mtime.o \ ...@@ -211,7 +212,7 @@ misc_obj = misc/mtime.o \
ifeq ($(ARCH),MMX) ifeq ($(ARCH),MMX)
ASM_OBJ = video_decoder_ref/idctmmx.o \ ASM_OBJ = video_decoder_ref/idctmmx.o \
video_output/yuv_mmx.o video_output/video_yuv_mmx.o
endif endif
C_OBJ = $(interface_obj) \ C_OBJ = $(interface_obj) \
......
...@@ -119,6 +119,11 @@ ...@@ -119,6 +119,11 @@
/* Base delay in micro second for interface sleeps */ /* Base delay in micro second for interface sleeps */
#define INTF_IDLE_SLEEP 100000 #define INTF_IDLE_SLEEP 100000
/* Factor for changing gamma, and minimum and maximum values */
#define INTF_GAMMA_FACTOR 1.1
#define INTF_GAMMA_MIN 0.1
#define INTF_GAMMA_MAX 10
/* /*
* X11 settings * X11 settings
*/ */
...@@ -241,6 +246,9 @@ ...@@ -241,6 +246,9 @@
#define VOUT_GRAYSCALE_VAR "vlc_grayscale" #define VOUT_GRAYSCALE_VAR "vlc_grayscale"
#define VOUT_GRAYSCALE_DEFAULT 0 #define VOUT_GRAYSCALE_DEFAULT 0
/* Default gamma */
#define VOUT_GAMMA 1.
/* /*
* Time settings * Time settings
*/ */
......
...@@ -57,7 +57,7 @@ typedef struct ...@@ -57,7 +57,7 @@ typedef struct
* (the pointer) should NEVER be modified. In YUV format, the p_y, p_u and * (the pointer) should NEVER be modified. In YUV format, the p_y, p_u and
* p_v data pointers refers to different areas of p_data, and should not * p_v data pointers refers to different areas of p_data, and should not
* be freed */ * be freed */
byte_t * p_data; /* picture data */ void * p_data; /* picture data */
yuv_data_t * p_y; /* pointer to beginning of Y image in p_data */ yuv_data_t * p_y; /* pointer to beginning of Y image in p_data */
yuv_data_t * p_u; /* pointer to beginning of U image in p_data */ yuv_data_t * p_u; /* pointer to beginning of U image in p_data */
yuv_data_t * p_v; /* pointer to beginning of V image in p_data */ yuv_data_t * p_v; /* pointer to beginning of V image in p_data */
......
...@@ -34,9 +34,11 @@ typedef struct vout_thread_s ...@@ -34,9 +34,11 @@ typedef struct vout_thread_s
int i_bytes_per_pixel; /* real screen depth */ int i_bytes_per_pixel; /* real screen depth */
float f_x_ratio; /* horizontal display ratio */ float f_x_ratio; /* horizontal display ratio */
float f_y_ratio; /* vertical display ratio */ float f_y_ratio; /* vertical display ratio */
float f_gamma; /* gamma */
/* New size for resizeable windows - they may be ignored or handled by /* Changed properties values - some of them are treated directly by the
* vout_SysManage */ * thread, the over may be ignored or handled by vout_SysManage */
boolean_t b_gamma_change; /* gamma change indicator */
int i_new_width; /* new width */ int i_new_width; /* new width */
int i_new_height; /* new height */ int i_new_height; /* new height */
...@@ -59,15 +61,16 @@ typedef struct vout_thread_s ...@@ -59,15 +61,16 @@ typedef struct vout_thread_s
/* Video heap */ /* Video heap */
picture_t p_picture[VOUT_MAX_PICTURES]; /* pictures */ picture_t p_picture[VOUT_MAX_PICTURES]; /* pictures */
/* YUV translation tables, for 15,16 and 24/32 bpp displays. 16 bits and 32 /* YUV translation tables - they have to be casted to the appropriate width
* bits pointers points on the same data. * on use. All tables are allocated in the same memory block, based at
* CAUTION: these tables are translated: their origin is -384 */ * p_trans_base, and shifted depending of the output thread configuration */
u16 * pi_trans16_red; byte_t * p_trans_base; /* base for all translation tables */
u16 * pi_trans16_green; void * p_trans_red;
u16 * pi_trans16_blue; void * p_trans_green;
u32 * pi_trans32_red; void * p_trans_blue;
u32 * pi_trans32_green; void * p_trans_gray;
u32 * pi_trans32_blue;
/* YUV translation tables, for optimized C YUV transform ?? */
} vout_thread_t; } vout_thread_t;
/******************************************************************************* /*******************************************************************************
......
...@@ -16,7 +16,7 @@ void vout_SysEnd ( p_vout_thread_t p_vout ); ...@@ -16,7 +16,7 @@ void vout_SysEnd ( p_vout_thread_t p_vout );
void vout_SysDestroy ( p_vout_thread_t p_vout ); void vout_SysDestroy ( p_vout_thread_t p_vout );
int vout_SysManage ( p_vout_thread_t p_vout ); int vout_SysManage ( p_vout_thread_t p_vout );
void vout_SysDisplay ( p_vout_thread_t p_vout ); void vout_SysDisplay ( p_vout_thread_t p_vout );
byte_t * vout_SysGetPicture ( p_vout_thread_t p_vout ); void * vout_SysGetPicture ( p_vout_thread_t p_vout );
void vout_SysPrint ( p_vout_thread_t p_vout, int i_x, int i_y, void vout_SysPrint ( p_vout_thread_t p_vout, int i_x, int i_y,
int i_halign, int i_valign, int i_halign, int i_valign,
unsigned char *psz_text ); unsigned char *psz_text );
......
...@@ -166,7 +166,7 @@ void vout_SysDisplay( vout_thread_t *p_vout ) ...@@ -166,7 +166,7 @@ void vout_SysDisplay( vout_thread_t *p_vout )
******************************************************************************* *******************************************************************************
* This function returns the address of the current display buffer. * This function returns the address of the current display buffer.
*******************************************************************************/ *******************************************************************************/
byte_t * vout_SysGetPicture( vout_thread_t *p_vout ) void * vout_SysGetPicture( vout_thread_t *p_vout )
{ {
return( p_vout->p_sys->p_buffer[ p_vout->p_sys->i_buffer_index ]->write ); return( p_vout->p_sys->p_buffer[ p_vout->p_sys->i_buffer_index ]->write );
} }
......
This diff is collapsed.
...@@ -275,7 +275,7 @@ void vout_SysDisplay( vout_thread_t *p_vout ) ...@@ -275,7 +275,7 @@ void vout_SysDisplay( vout_thread_t *p_vout )
******************************************************************************* *******************************************************************************
* This function returns the address of the current display buffer. * This function returns the address of the current display buffer.
*******************************************************************************/ *******************************************************************************/
byte_t * vout_SysGetPicture( vout_thread_t *p_vout ) void * vout_SysGetPicture( vout_thread_t *p_vout )
{ {
return( p_vout->p_sys->p_ximage[ p_vout->p_sys->i_buffer_index ]->data ); return( p_vout->p_sys->p_ximage[ p_vout->p_sys->i_buffer_index ]->data );
} }
...@@ -407,10 +407,6 @@ static int X11OpenDisplay( vout_thread_t *p_vout, char *psz_display, Window root ...@@ -407,10 +407,6 @@ static int X11OpenDisplay( vout_thread_t *p_vout, char *psz_display, Window root
return( 1 ); return( 1 );
} }
/* Store additionnal vout informations */
p_vout->i_new_width = p_vout->i_width;
p_vout->i_new_height = p_vout->i_height;
/* Get font information */ /* Get font information */
if( X11GetFont( p_vout ) ) if( X11GetFont( p_vout ) )
{ {
......
This diff is collapsed.
/******************************************************************************* /*******************************************************************************
* yuv_mmx.S: YUV transformation, optimized for MMX processors * video_yuv_mmx.S: YUV transformation, optimized for MMX processors
* (c)1999 VideoLAN * (c)1999 VideoLAN
******************************************************************************* *******************************************************************************
* Following functions are defined: * Following functions are defined:
......
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