Commit 0eba28c2 authored by Sam Hocevar's avatar Sam Hocevar

. bug dans le code des sous-titres (mauvais scaling en Y)

 . le vlc ne meurt pas salement en mode framebuffer quand on change
  de console (par contre, segfault en quittant, je ne sais pas encore
  pourquoi)
 . le make est � nouveau un peu plus verbose
parent 2b9f6f33
...@@ -28,7 +28,7 @@ default: ...@@ -28,7 +28,7 @@ default:
-include $(MAKECMDGOALS) -include $(MAKECMDGOALS)
$(dependancies): .dep/%.d: %.c $(dependancies): .dep/%.d: %.c
@test -d .dep/$(dir $*) || mkdir -p .dep/$(dir $*) @test -d .dep/$(dir $*) || mkdir -p .dep/$(dir $*)
@echo "generating dependancies for $*.c" #@echo "generating dependancies for $*.c"
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) $< \ @$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \ | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
.dep\/$(subst /,\/,$*).d : /g'\'' > $@; \ .dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
......
...@@ -42,7 +42,7 @@ PROGRAM_BUILD = `date` $(USER) ...@@ -42,7 +42,7 @@ PROGRAM_BUILD = `date` $(USER)
# DEFINE will contain some of the constants definitions decided in Makefile, # DEFINE will contain some of the constants definitions decided in Makefile,
# including SYS_xx. It will be passed to C compiler. # including SYS_xx. It will be passed to C compiler.
DEFINE += -DSYS_`echo $(SYS) | sed 's/-.*//' | tr a-z A-Z` DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr a-z A-Z)
DEFINE += -DPLUGIN_PATH="\"$(prefix)/lib/videolan/vlc\"" DEFINE += -DPLUGIN_PATH="\"$(prefix)/lib/videolan/vlc\""
DEFINE += -DDATA_PATH="\"$(prefix)/share/videolan/vlc\"" DEFINE += -DDATA_PATH="\"$(prefix)/share/videolan/vlc\""
#DEFINE += -DPROGRAM_OPTIONS="\"$(shell echo $(PROGRAM_OPTIONS) | tr 'A-Z' 'a-z')\"" #DEFINE += -DPROGRAM_OPTIONS="\"$(shell echo $(PROGRAM_OPTIONS) | tr 'A-Z' 'a-z')\""
...@@ -340,79 +340,65 @@ $(dependancies): %.d: FORCE ...@@ -340,79 +340,65 @@ $(dependancies): %.d: FORCE
$(C_OBJ): %.o: Makefile.dep $(C_OBJ): %.o: Makefile.dep
$(C_OBJ): %.o: .dep/%.d $(C_OBJ): %.o: .dep/%.d
$(C_OBJ): %.o: %.c $(C_OBJ): %.o: %.c
@echo "compiling $*.o from $*.c" $(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
@$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CPP_OBJ): %.o: %.cpp $(CPP_OBJ): %.o: %.cpp
@echo "compiling $*.o from $*.cpp" $(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
@$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(ASM_OBJ): %.o: Makefile.dep $(ASM_OBJ): %.o: Makefile.dep
$(ASM_OBJ): %.o: %.S $(ASM_OBJ): %.o: %.S
@echo "assembling $*.o from $*.S" $(CC) $(CFLAGS) -c -o $@ $<
@$(CC) $(CFLAGS) -c -o $@ $<
#$(PLUGIN_OBJ): %.so: Makefile.dep #$(PLUGIN_OBJ): %.so: Makefile.dep
#$(PLUGIN_OBJ): %.so: .dep/%.d #$(PLUGIN_OBJ): %.so: .dep/%.d
# audio plugins # audio plugins
plugins/aout/aout_dummy.so plugins/aout/aout_dsp.so: %.so: %.c plugins/aout/aout_dummy.so plugins/aout/aout_dsp.so: %.so: %.c
@echo "compiling $*.so from $*.c"
ifeq ($(SYS),beos) ifeq ($(SYS),beos)
@$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_ $(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
else else
@$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $< $(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
endif endif
plugins/aout/aout_esd.so: %.so: %.c plugins/aout/aout_esd.so: %.so: %.c
@echo "compiling $*.so from $*.c"
ifneq (,$(findstring bsd,$(SYS))) ifneq (,$(findstring bsd,$(SYS)))
@$(CC) $(CCFLAGS) $(CFLAGS) -lesd -shared -o $@ $< $(CC) $(CCFLAGS) $(CFLAGS) -lesd -shared -o $@ $<
else else
@$(CC) $(CCFLAGS) $(CFLAGS) -laudiofile -lesd -shared -o $@ $< $(CC) $(CCFLAGS) $(CFLAGS) -laudiofile -lesd -shared -o $@ $<
endif endif
# video plugins # video plugins
plugins/intf/intf_dummy.so plugins/vout/vout_dummy.so \ plugins/intf/intf_dummy.so plugins/vout/vout_dummy.so \
plugins/intf/intf_fb.so plugins/vout/vout_fb.so: %.so: %.c plugins/intf/intf_fb.so plugins/vout/vout_fb.so: %.so: %.c
@echo "compiling $*.so from $*.c"
ifeq ($(SYS),beos) ifeq ($(SYS),beos)
@$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_ $(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
else else
@$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $< $(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
endif endif
plugins/intf/intf_x11.so plugins/vout/vout_x11.so: %.so: %.c plugins/intf/intf_x11.so plugins/vout/vout_x11.so: %.so: %.c
@echo "compiling $*.so from $*.c" $(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
@$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
plugins/intf/intf_mga.so plugins/vout/vout_mga.so: %.so: %.c plugins/intf/intf_mga.so plugins/vout/vout_mga.so: %.so: %.c
@echo "compiling $*.so from $*.c" $(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
@$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
plugins/intf/intf_gnome.so: %.so: %.c plugins/intf/intf_gnome.so: %.so: %.c
@echo "compiling $*.so from $*.c" $(CC) $(CCFLAGS) $(CFLAGS) $(LCFLAGS) `gnome-config --libs --cflags gnomeui` -shared -o $@ $< plugins/intf/intf_gnome_callbacks.c plugins/intf/intf_gnome_interface.c plugins/intf/intf_gnome_support.c
@$(CC) $(CCFLAGS) $(CFLAGS) $(LCFLAGS) `gnome-config --libs --cflags gnomeui` -shared -o $@ $< plugins/intf/intf_gnome_callbacks.c plugins/intf/intf_gnome_interface.c plugins/intf/intf_gnome_support.c
plugins/vout/vout_gnome.so: %.so: %.c plugins/vout/vout_gnome.so: %.so: %.c
@echo "compiling $*.so from $*.c" $(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
@$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
plugins/intf/intf_glide.so plugins/vout/vout_glide.so: %.so: %.c plugins/intf/intf_glide.so plugins/vout/vout_glide.so: %.so: %.c
@echo "compiling $*.so from $*.c" $(CC) $(CCFLAGS) $(CFLAGS) -I/usr/include/glide -lglide2x -shared -o $@ $<
@$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/include/glide -lglide2x -shared -o $@ $<
plugins/intf/intf_ggi.so plugins/vout/vout_ggi.so: %.so: %.c plugins/intf/intf_ggi.so plugins/vout/vout_ggi.so: %.so: %.c
@echo "compiling $*.so from $*.c" $(CC) $(CCFLAGS) $(CFLAGS) -lggi -shared -o $@ $<
@$(CC) $(CCFLAGS) $(CFLAGS) -lggi -shared -o $@ $<
plugins/intf/intf_beos.so: %.so: %.cpp plugins/intf/intf_beos.so: %.so: %.cpp
@echo "compiling $*.so from $*.cpp" $(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
@$(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
plugins/vout/vout_beos.so: %.so: %.cpp plugins/vout/vout_beos.so: %.so: %.cpp
@echo "compiling $*.so from $*.cpp" $(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
@$(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
################################################################################ ################################################################################
......
...@@ -12,7 +12,10 @@ build: build-stamp ...@@ -12,7 +12,10 @@ build: build-stamp
build-stamp: build-stamp:
dh_testdir dh_testdir
./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info ./configure --prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--with-ppro --with-mmx
$(MAKE) $(MAKE)
touch build-stamp touch build-stamp
......
shlibs:Depends=libc6 (>= 2.1.2), xlib6g (>= 3.3.6) shlibs:Depends=libc6 (>= 2.1.2), xlib6g (>= 3.3.6-4)
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
*****************************************************************************/ *****************************************************************************/
/* Program version and copyright message */ /* Program version and copyright message */
#define VERSION_MESSAGE "vlc @VLC_VERSION@ @VLC_CODENAME@" \ #define VERSION_MESSAGE "vlc @VLC_VERSION@ @VLC_CODENAME@ " \
/* " (" PROGRAM_BUILD ") (" PROGRAM_OPTIONS ")\n" */ \ /* "(" PROGRAM_BUILD ") (" PROGRAM_OPTIONS ")\n" */ \
"Copyright 1996-2000 VideoLAN\n" "Copyright 1996-2000 VideoLAN\n"
#define COPYRIGHT_MESSAGE "VideoLAN Client - version @VLC_VERSION@" \ #define COPYRIGHT_MESSAGE "VideoLAN Client - version @VLC_VERSION@" \
" @VLC_CODENAME@ - (c)1996-2000 VideoLAN" " @VLC_CODENAME@ - (c)1996-2000 VideoLAN"
......
...@@ -952,7 +952,7 @@ int input_FileOpen( input_thread_t *p_input ) ...@@ -952,7 +952,7 @@ int input_FileOpen( input_thread_t *p_input )
ps_thread( &input_file ); ps_thread( &input_file );
break; break;
case 0x47: case 0x47:
intf_ErrMsg( "input error: ts file are not currently supported\n" ); intf_ErrMsg( "input error: ts files are not currently supported\n" );
return( 1 ); return( 1 );
default: default:
intf_ErrMsg( "input error: cannot determine stream type\n" ); intf_ErrMsg( "input error: cannot determine stream type\n" );
......
...@@ -44,11 +44,11 @@ typedef struct vout_spu_s ...@@ -44,11 +44,11 @@ typedef struct vout_spu_s
byte_t *p_data; byte_t *p_data;
/* drawing coordinates inside the spu */ /* drawing coordinates inside the spu */
int x; int i_x;
int y; int i_y;
/* target size */ /* target size */
int width; int i_width;
int height; int i_height;
} vout_spu_t; } vout_spu_t;
...@@ -117,14 +117,16 @@ void vout_RenderSPU( vout_buffer_t *p_buffer, subpicture_t *p_subpic, ...@@ -117,14 +117,16 @@ void vout_RenderSPU( vout_buffer_t *p_buffer, subpicture_t *p_subpic,
p_from[1] = p_subpic->p_data + p_subpic->type.spu.i_offset[1]; p_from[1] = p_subpic->p_data + p_subpic->type.spu.i_offset[1];
p_from[0] = p_subpic->p_data + p_subpic->type.spu.i_offset[0]; p_from[0] = p_subpic->p_data + p_subpic->type.spu.i_offset[0];
vspu.x = 0; vspu.i_x = 0;
vspu.y = 0; vspu.i_y = 0;
vspu.width = TARGET_WIDTH; vspu.i_width = TARGET_WIDTH;
vspu.height = TARGET_HEIGHT; vspu.i_height = TARGET_HEIGHT;
vspu.p_data = p_buffer->p_data vspu.p_data = p_buffer->p_data
/* add the picture coordinates and the SPU coordinates */ /* add the picture coordinates and the SPU coordinates */
+ ( p_buffer->i_pic_x + p_subpic->i_x ) * i_bytes_per_pixel + ( p_buffer->i_pic_x + ((p_subpic->i_x * i_x_scale) >> 6))
+ ( p_buffer->i_pic_y + p_subpic->i_y ) * i_bytes_per_line; * i_bytes_per_pixel
+ ( p_buffer->i_pic_y + ((p_subpic->i_y * i_y_scale) >> 6))
* i_bytes_per_line;
while( p_from[0] < (byte_t *)p_subpic->p_data while( p_from[0] < (byte_t *)p_subpic->p_data
+ p_subpic->type.spu.i_offset[1] ) + p_subpic->type.spu.i_offset[1] )
...@@ -135,13 +137,13 @@ void vout_RenderSPU( vout_buffer_t *p_buffer, subpicture_t *p_subpic, ...@@ -135,13 +137,13 @@ void vout_RenderSPU( vout_buffer_t *p_buffer, subpicture_t *p_subpic,
{ {
found_code: found_code:
if( ((i_code >> 2) + vspu.x + vspu.y * vspu.width) if( ((i_code >> 2) + vspu.i_x + vspu.i_y * vspu.i_width)
> vspu.height * vspu.width ) > vspu.i_height * vspu.i_width )
{ {
intf_DbgMsg ( "video_spu: invalid draw request ! %d %d\n", intf_DbgMsg ( "video_spu: invalid draw request ! %d %d\n",
i_code >> 2, vspu.height * vspu.width i_code >> 2, vspu.i_height * vspu.i_width
- ( (i_code >> 2) + vspu.x - ( (i_code >> 2) + vspu.i_x
+ vspu.y * vspu.width ) ); + vspu.i_y * vspu.i_width ) );
return; return;
} }
else else
...@@ -149,8 +151,8 @@ void vout_RenderSPU( vout_buffer_t *p_buffer, subpicture_t *p_subpic, ...@@ -149,8 +151,8 @@ void vout_RenderSPU( vout_buffer_t *p_buffer, subpicture_t *p_subpic,
if( (i_color = i_code & 0x3) ) if( (i_color = i_code & 0x3) )
{ {
u8 *p_target = &vspu.p_data[ u8 *p_target = &vspu.p_data[
i_bytes_per_pixel * ((vspu.x * i_x_scale) >> 6) i_bytes_per_pixel * ((vspu.i_x * i_x_scale) >> 6)
+ i_bytes_per_line * ((vspu.y * i_y_scale) >> 6) ]; + i_bytes_per_line * ((vspu.i_y * i_y_scale) >> 6) ];
memset( p_target, p_palette[i_color], memset( p_target, p_palette[i_color],
((((i_code - 1) * i_x_scale) >> 8) + 1) ((((i_code - 1) * i_x_scale) >> 8) + 1)
...@@ -168,10 +170,10 @@ void vout_RenderSPU( vout_buffer_t *p_buffer, subpicture_t *p_subpic, ...@@ -168,10 +170,10 @@ void vout_RenderSPU( vout_buffer_t *p_buffer, subpicture_t *p_subpic,
* i_bytes_per_pixel ); * i_bytes_per_pixel );
} }
} }
vspu.x += i_code >> 2; vspu.i_x += i_code >> 2;
} }
if( vspu.x >= vspu.width ) if( vspu.i_x >= vspu.i_width )
{ {
/* byte-align the stream */ /* byte-align the stream */
b_aligned = 1; b_aligned = 1;
...@@ -207,7 +209,7 @@ void vout_RenderSPU( vout_buffer_t *p_buffer, subpicture_t *p_subpic, ...@@ -207,7 +209,7 @@ void vout_RenderSPU( vout_buffer_t *p_buffer, subpicture_t *p_subpic,
/* we have a boo boo ! */ /* we have a boo boo ! */
intf_DbgMsg( "video_spu: unknown code 0x%x " intf_DbgMsg( "video_spu: unknown code 0x%x "
"(dest %x side %x, x=%d, y=%d)\n", "(dest %x side %x, x=%d, y=%d)\n",
i_code, p_from[i_id], i_id, vspu.x, vspu.y ); i_code, p_from[i_id], i_id, vspu.i_x, vspu.i_y );
if( NewLine( &vspu, &i_id ) < 0 ) if( NewLine( &vspu, &i_id ) < 0 )
return; return;
continue; continue;
...@@ -219,10 +221,10 @@ static int NewLine( vout_spu_t *p_vspu, int *i_id ) ...@@ -219,10 +221,10 @@ static int NewLine( vout_spu_t *p_vspu, int *i_id )
{ {
*i_id = 1 - *i_id; *i_id = 1 - *i_id;
p_vspu->x = 0; p_vspu->i_x = 0;
p_vspu->y++; p_vspu->i_y++;
return( p_vspu->width - p_vspu->y ); return( p_vspu->i_width - p_vspu->i_y );
} }
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