]> git.sesse.net Git - vlc/commitdiff
* configure.ac.in: fixed linkage of theora plugin.
authorGildas Bazin <gbazin@videolan.org>
Thu, 28 Nov 2002 21:00:48 +0000 (21:00 +0000)
committerGildas Bazin <gbazin@videolan.org>
Thu, 28 Nov 2002 21:00:48 +0000 (21:00 +0000)
* modules/codec/theora.c, modules/codec/tarkin.c: fixed breakage.
* modules/codec/vorbis.c: lowered the priority of the tremor plugin.

configure.ac.in
modules/codec/tarkin.c
modules/codec/theora.c
modules/codec/vorbis.c

index bf882daf9da9df9eb2571e582827dc3f63ca7373..0859d7e0be625ec69ea8efad91a2b494d696865a 100644 (file)
@@ -1557,7 +1557,7 @@ then
   AC_CHECK_HEADERS(theora/theora.h, [
     AC_CHECK_LIB(theora, theora_granule_time, [
       BUILTINS="${BUILTINS} theora"
-      LDFLAGS_theora="${LDFLAGS_theora} -logg -ltheora" ],[
+      LDFLAGS_theora="${LDFLAGS_theora} -ltheora -logg" ],[
       AC_MSG_ERROR([libtheora doesn't appear to be installed on you system.
 You also need to check that you have a libogg posterior to the 1.0 release.])],
       [-logg])
index f4224ba1b63812ae678d5fad6efc1fc7cc261a31..ea27d159782265484c5a975b6c00a1996663354b 100644 (file)
@@ -2,7 +2,7 @@
  * tarkin.c: tarkin decoder module making use of libtarkin.
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: tarkin.c,v 1.3 2002/11/28 17:34:59 sam Exp $
+ * $Id: tarkin.c,v 1.4 2002/11/28 21:00:48 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -86,7 +86,7 @@ static void CloseDecoder ( dec_thread_t * );
 static void DecodePacket ( dec_thread_t * );
 static int  GetOggPacket ( dec_thread_t *, ogg_packet *, mtime_t * );
 
-static void tarkin_CopyPicture( dec_thread_t *, picture_t *, uint8_t * );
+static void tarkin_CopyPicture( dec_thread_t *, picture_t *, uint8_t *, int );
 
 /*****************************************************************************
  * Module descriptor
@@ -216,8 +216,7 @@ static void DecodePacket( dec_thread_t *p_dec )
     ogg_packet oggpacket;
     picture_t *p_pic;
     mtime_t i_pts;
-    int i_width, i_height, i_chroma, i_aspect;
-    uint32_t frame = 0;
+    int i_width, i_height, i_chroma, i_stride, i_aspect;
     uint8_t *rgb;
 
     if( GetOggPacket( p_dec, &oggpacket, &i_pts ) != VLC_SUCCESS )
@@ -237,21 +236,26 @@ static void DecodePacket( dec_thread_t *p_dec )
         switch( p_dec->tarkin_stream->layer->desc.format )
         {
         case TARKIN_RGB24:
+            /*i_chroma = VLC_FOURCC('R','G','B','A');*/
             i_chroma = VLC_FOURCC('R','V','2','4');
+            i_stride = i_width * 3;
             break;
         case TARKIN_RGB32:
             i_chroma = VLC_FOURCC('R','V','3','2');
+            i_stride = i_width * 4;
             break;
         case TARKIN_RGBA:
             i_chroma = VLC_FOURCC('R','G','B','A');
+            i_stride = i_width * 4;
             break;
         default:
             i_chroma = VLC_FOURCC('Y','V','1','2');
+            i_stride = i_width;
             break;
         }
         i_aspect = VOUT_ASPECT_FACTOR * i_width / i_height;
         p_dec->p_vout = vout_Request( p_dec->p_fifo, p_dec->p_vout,
-                                      i_width, i_height, i_aspect, i_chroma );
+                                      i_width, i_height, i_chroma, i_aspect );
 
         /* Get a new picture */
         while( !(p_pic = vout_CreatePicture( p_dec->p_vout, 0, 0, 0 ) ) )
@@ -265,7 +269,7 @@ static void DecodePacket( dec_thread_t *p_dec )
         if( !p_pic )
             break;
 
-        tarkin_CopyPicture( p_dec, p_pic, rgb );
+        tarkin_CopyPicture( p_dec, p_pic, rgb, i_stride );
 
         tarkin_synthesis_freeframe( p_dec->tarkin_stream, rgb );
 
@@ -313,7 +317,7 @@ static void CloseDecoder( dec_thread_t * p_dec )
         if( p_dec->p_pes )
             input_DeletePES( p_dec->p_fifo->p_packets_mgt, p_dec->p_pes );
 
-        vout_Request( p_dec, p_dec->p_vout, 0, 0, 0, 0 );
+        vout_Request( p_dec->p_fifo, p_dec->p_vout, 0, 0, 0, 0 );
 
         if( p_dec->tarkin_stream )
             tarkin_stream_destroy( p_dec->tarkin_stream );
@@ -327,21 +331,23 @@ static void CloseDecoder( dec_thread_t * p_dec )
  *                     picture_t structure.
  *****************************************************************************/
 static void tarkin_CopyPicture( dec_thread_t *p_dec, picture_t *p_pic,
-                                uint8_t *p_src )
+                                uint8_t *p_src, int i_pitch )
 {
-    int i_plane, i_line, i_width, i_dst_stride;
+    int i_plane, i_line, i_src_stride, i_dst_stride;
     u8  *p_dst;
 
     for( i_plane = 0; i_plane < p_pic->i_planes; i_plane++ )
     {
         p_dst = p_pic->p[i_plane].p_pixels;
-        i_width = p_pic->p[i_plane].i_visible_pitch;
         i_dst_stride = p_pic->p[i_plane].i_pitch;
+        i_src_stride = i_pitch;
 
         for( i_line = 0; i_line < p_pic->p[i_plane].i_lines; i_line++ )
         {
-            p_dec->p_fifo->p_vlc->pf_memcpy( p_dst, p_src, i_width );
-            p_src += i_width;
+            p_dec->p_fifo->p_vlc->pf_memcpy( p_dst, p_src,
+                                             i_src_stride );
+
+            p_src += i_src_stride;
             p_dst += i_dst_stride;
         }
     }
index b70b919b2f228c92a5bb62666a754b8c019e78da..64c7b42a5abe570a291ce5c855bdd46ee712823a 100644 (file)
@@ -2,7 +2,7 @@
  * theora.c: theora decoder module making use of libtheora.
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: theora.c,v 1.2 2002/11/28 17:34:59 sam Exp $
+ * $Id: theora.c,v 1.3 2002/11/28 21:00:48 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -155,7 +155,7 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
 
     p_dec->p_vout = vout_Request( p_dec->p_fifo, p_dec->p_vout,
                                   p_dec->ti.width, p_dec->ti.height,
-                                  i_aspect, i_chroma );
+                                  i_chroma, i_aspect );
 
     /* theora decoder thread's main loop */
     while( (!p_dec->p_fifo->b_die) && (!p_dec->p_fifo->b_error) )
index 8759a1b3cb2d849f44bed9ce73fb661a5cae1159..86570b93e4703985db00347aa885eee964f1c91d 100644 (file)
@@ -2,7 +2,7 @@
  * vorbis.c: vorbis decoder module making use of libvorbis.
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: vorbis.c,v 1.7 2002/11/21 21:37:46 gbazin Exp $
+ * $Id: vorbis.c,v 1.8 2002/11/28 21:00:48 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -110,7 +110,11 @@ static void Interleave   ( float *, const float **, int, int );
  *****************************************************************************/
 vlc_module_begin();
     set_description( _("Vorbis decoder module") );
+#ifdef MODULE_NAME_IS_tremor
+    set_capability( "decoder", 90 );
+#else
     set_capability( "decoder", 100 );
+#endif
     set_callbacks( OpenDecoder, NULL );
 vlc_module_end();