]> git.sesse.net Git - vlc/commitdiff
(new in MAIN)
authorSam Hocevar <sam@videolan.org>
Sun, 2 Jun 2002 13:49:35 +0000 (13:49 +0000)
committerSam Hocevar <sam@videolan.org>
Sun, 2 Jun 2002 13:49:35 +0000 (13:49 +0000)
  * ./plugins/dvd/dvd_es.c, ./plugins/satellite/input_satellite.c,
    ./plugins/dvdread/input_dvdread.c: updated outdated variable names.
(ported from 0_4_1_branch)
  * ./plugins/spudec/spu_decoder.c: fixed a margin bug in the SPU renderer
    which caused subtitles to appear slanted in odd width windows.

ChangeLog
plugins/dvd/dvd_es.c
plugins/dvdread/input_dvdread.c
plugins/satellite/input_satellite.c
plugins/spudec/spu_decoder.c

index 59dd2bd36bba8231c521ebcc6d915714c817514d..279ff240e0d5b2b9835c19c67283ebd159f23450 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@
 
 HEAD
 
+  * ./plugins/dvd/dvd_es.c, ./plugins/satellite/input_satellite.c,
+    ./plugins/dvdread/input_dvdread.c: updated outdated variable names.
   * ./src/playlist/playlist.c, src/input/input.c: added safety checks to
     prevent crashes on next file.
   * ./src/misc/objects.c: commented all functions.
@@ -34,6 +36,8 @@ HEAD
 0.4.1
 Not released yet
 
+  * ./plugins/spudec/spu_decoder.c: fixed a margin bug in the SPU renderer
+    which caused subtitles to appear slanted in odd width windows.
   * ./plugins/gtk/gtk_display.c, ./plugins/win32/mainframe.cpp: we deactivate
     popup menus when no stream is being played, even in network mode.
   * ./src/input/mpeg_system.c: removed unnecessarily verbose message.
index f498c25fe8abb412e680736fdd37865ea6791dbe..8348410c23c921b4c66db46e34678f1ebb88773f 100644 (file)
@@ -1,7 +1,7 @@
 /* dvd_es.c: functions to find and select ES
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_es.c,v 1.12 2002/06/01 12:31:58 sam Exp $
+ * $Id: dvd_es.c,v 1.13 2002/06/02 13:49:35 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -255,13 +255,13 @@ void DVDLaunchDecoders( input_thread_t * p_input )
     p_dvd = (thread_dvd_data_t*)(p_input->p_access_data);
 
     /* Select Video stream (always 0) */
-    if( !config_GetInt( p_input, "novideo" ) )
+    if( config_GetInt( p_input, "video" ) )
     {
         input_SelectES( p_input, p_input->stream.pp_es[0] );
     }
 
     /* Select audio stream */
-    if( p_dvd->i_audio_nb > 0 && !config_GetInt( p_input, "noaudio" ) )
+    if( p_dvd->i_audio_nb > 0 && config_GetInt( p_input, "audio" ) )
     {
         /* For audio: first one if none or a not existing one specified */
         i_audio = config_GetInt( p_input, "audio-channel" );
@@ -295,7 +295,7 @@ void DVDLaunchDecoders( input_thread_t * p_input )
     }
 
     /* Select subtitle */
-    if( p_dvd->i_spu_nb > 0 && !config_GetInt( p_input, "novideo" ) )
+    if( p_dvd->i_spu_nb > 0 && config_GetInt( p_input, "video" ) )
     {
         /* for spu, default is none */
         i_spu = config_GetInt( p_input, "spu-channel" );
index 31a24e5b3bb225f494ce7df9b684adaa3c71dd85..74aa6d5e27b0ef4963f0f11749fc35da379c174e 100644 (file)
@@ -6,7 +6,7 @@
  * It depends on: libdvdread for ifo files and block reading.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: input_dvdread.c,v 1.39 2002/06/01 12:31:59 sam Exp $
+ * $Id: input_dvdread.c,v 1.40 2002/06/02 13:49:35 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -1204,12 +1204,12 @@ static void DvdReadLauchDecoders( input_thread_t * p_input )
     
     p_dvd = (thread_dvd_data_t*)(p_input->p_access_data);            
             
-    if( !config_GetInt( p_input, "novideo" ) )
+    if( config_GetInt( p_input, "video" ) )
     {
         input_SelectES( p_input, p_input->stream.pp_es[0] );
     }
 
-    if( !config_GetInt( p_input, "noaudio" ) )
+    if( config_GetInt( p_input, "audio" ) )
     {
         /* For audio: first one if none or a not existing one specified */
         int i_audio = config_GetInt( p_input, "audio-channel" );
@@ -1244,7 +1244,7 @@ static void DvdReadLauchDecoders( input_thread_t * p_input )
         }
     }
 
-    if( !config_GetInt( p_input, "novideo" ) )
+    if( config_GetInt( p_input, "video" ) )
     {
         /* for spu, default is none */
         int i_spu = config_GetInt( p_input, "spu-channel" );
index 0fa0316039248f7a7050e90cc492b46b11fce644..ffc4ecf5cc0499189b27d7433fa92425faaa3810 100644 (file)
@@ -409,7 +409,7 @@ int SatelliteSetProgram( input_thread_t    * p_input,
         {
             case MPEG1_VIDEO_ES:
             case MPEG2_VIDEO_ES:
-                if ( !config_GetInt( p_input, "novideo" ) )
+                if ( config_GetInt( p_input, "video" ) )
                 {
                     ioctl_SetDMXFilter( p_es->i_id, &p_es->i_demux_fd, 1);
                     input_SelectES( p_input , p_es );
@@ -417,7 +417,7 @@ int SatelliteSetProgram( input_thread_t    * p_input,
                 break;
             case MPEG1_AUDIO_ES:
             case MPEG2_AUDIO_ES:
-                if ( !config_GetInt( p_input, "noaudio" ) )
+                if ( config_GetInt( p_input, "audio" ) )
                 {
                     ioctl_SetDMXFilter( p_es->i_id, &p_es->i_demux_fd, 2);
                     input_SelectES( p_input , p_es );
index d7d0da2e96886f203a6c38b0dd402d4248b1915f..438b464fc980c17897ad3943a85cccb7ad1bc81e 100644 (file)
@@ -2,7 +2,7 @@
  * spu_decoder.c : spu decoder thread
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: spu_decoder.c,v 1.25 2002/06/01 12:32:00 sam Exp $
+ * $Id: spu_decoder.c,v 1.26 2002/06/02 13:49:35 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Rudolf Cornelissen <rag.cornelissen@inter.nl.net>
@@ -884,6 +884,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
     /* RV16 target, scaling */
     case FOURCC_RV16:
 
+    /* XXX: this is a COMPLETE HACK, memcpy is unable to do u16s anyway */
     /* FIXME: get this from the DVD */
     for( i_color = 0; i_color < 4; i_color++ )
     {
@@ -900,7 +901,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
     p_dest = p_pic->p->p_pixels + ( i_width >> 6 ) * 2
               /* Add the picture coordinates and the SPU coordinates */
               + ( (p_spu->i_x * i_xscale) >> 6 ) * 2
-              + ( (p_spu->i_y * i_yscale) >> 6 ) * p_vout->output.i_width * 2;
+              + ( (p_spu->i_y * i_yscale) >> 6 ) * p_pic->p->i_pitch;
 
     /* Draw until we reach the bottom of the subtitle */
     for( i_y = 0 ; i_y < i_height ; )
@@ -912,7 +913,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
         if( i_ytmp + 1 >= ( i_y >> 6 ) )
         {
             /* Just one line : we precalculate i_y >> 6 */
-            i_yreal = p_vout->output.i_width * 2 * i_ytmp;
+            i_yreal = p_pic->p->i_pitch * i_ytmp;
 
             /* Draw until we reach the end of the line */
             for( i_x = i_width ; i_x ; )
@@ -948,8 +949,8 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
         }
         else
         {
-            i_yreal = p_vout->output.i_width * 2 * i_ytmp;
-            i_ynext = p_vout->output.i_width * 2 * i_y >> 6;
+            i_yreal = p_pic->p->i_pitch * i_ytmp;
+            i_ynext = p_pic->p->i_pitch * i_y >> 6;
 
             /* Draw until we reach the end of the line */
             for( i_x = i_width ; i_x ; )
@@ -966,7 +967,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
                 case 0x0f:
                     i_len = i_xscale * ( *p_source++ >> 2 );
                     for( i_ytmp = i_yreal ; i_ytmp < i_ynext ;
-                         i_ytmp += p_vout->output.i_width * 2 )
+                         i_ytmp += p_pic->p->i_pitch )
                     {
                         memset( p_dest - 2 * ( i_x >> 6 ) + i_ytmp,
                                 p_clut16[ i_color ],
@@ -979,7 +980,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
                     /* FIXME: we should do transparency */
                     i_len = i_xscale * ( *p_source++ >> 2 );
                     for( i_ytmp = i_yreal ; i_ytmp < i_ynext ;
-                         i_ytmp += p_vout->output.i_width * 2 )
+                         i_ytmp += p_pic->p->i_pitch )
                     {
                         memset( p_dest - 2 * ( i_x >> 6 ) + i_ytmp,
                                 p_clut16[ i_color ],
@@ -1015,7 +1016,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
     p_dest = p_pic->p->p_pixels + ( i_width >> 6 ) * 4
               /* Add the picture coordinates and the SPU coordinates */
               + ( (p_spu->i_x * i_xscale) >> 6 ) * 4
-              + ( (p_spu->i_y * i_yscale) >> 6 ) * p_vout->output.i_width * 4;
+              + ( (p_spu->i_y * i_yscale) >> 6 ) * p_pic->p->i_pitch;
 
     /* Draw until we reach the bottom of the subtitle */
     for( i_y = 0 ; i_y < i_height ; )
@@ -1027,7 +1028,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
         if( i_ytmp + 1 >= ( i_y >> 6 ) )
         {
             /* Just one line : we precalculate i_y >> 6 */
-            i_yreal = p_vout->output.i_width * 4 * i_ytmp;
+            i_yreal = p_pic->p->i_pitch * i_ytmp;
 
             /* Draw until we reach the end of the line */
             for( i_x = i_width ; i_x ; )
@@ -1061,8 +1062,8 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
         }
         else
         {
-            i_yreal = p_vout->output.i_width * 4 * i_ytmp;
-            i_ynext = p_vout->output.i_width * 4 * i_y >> 6;
+            i_yreal = p_pic->p->i_pitch * i_ytmp;
+            i_ynext = p_pic->p->i_pitch * i_y >> 6;
 
             /* Draw until we reach the end of the line */
             for( i_x = i_width ; i_x ; )
@@ -1079,7 +1080,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
                 case 0x0f:
                     i_len = i_xscale * ( *p_source++ >> 2 );
                     for( i_ytmp = i_yreal ; i_ytmp < i_ynext ;
-                         i_ytmp += p_vout->output.i_width * 4 )
+                         i_ytmp += p_pic->p->i_pitch )
                     {
                         memset( p_dest - 4 * ( i_x >> 6 ) + i_ytmp,
                                 p_clut32[ i_color ],
@@ -1092,7 +1093,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
                     /* FIXME: we should do transparency */
                     i_len = i_xscale * ( *p_source++ >> 2 );
                     for( i_ytmp = i_yreal ; i_ytmp < i_ynext ;
-                         i_ytmp += p_vout->output.i_width * 4 )
+                         i_ytmp += p_pic->p->i_pitch )
                     {
                         memset( p_dest - 4 * ( i_x >> 6 ) + i_ytmp,
                                 p_clut32[ i_color ],