]> git.sesse.net Git - vlc/commitdiff
* Updated documentation with recent changes ;
authorChristophe Massiot <massiot@videolan.org>
Wed, 18 Jul 2001 17:05:39 +0000 (17:05 +0000)
committerChristophe Massiot <massiot@videolan.org>
Wed, 18 Jul 2001 17:05:39 +0000 (17:05 +0000)
* Decoders are niced again, for it is really better.

doc/developer/.cvsignore [new file with mode: 0644]
doc/developer/Makefile
doc/developer/decoders.xml
doc/developer/overview.xml
include/config.h.in
src/video_decoder/video_decoder.c
src/video_decoder/vpar_blocks.c

diff --git a/doc/developer/.cvsignore b/doc/developer/.cvsignore
new file mode 100644 (file)
index 0000000..682e497
--- /dev/null
@@ -0,0 +1,7 @@
+manual.aux
+manual.dvi
+manual.html
+manual.log
+manual.ps
+manual.tex
+manual.txt
index c1d693f57884c6e7ea2a4f2b0477621e7d8b2baf..19ecf07cf8cddcd6bd824f1a012f61aecafbcbd4 100644 (file)
@@ -18,25 +18,25 @@ JADE=jade
 
 manual: manual.txt manual.ps manual.html
 
-%.tex: %.xml
-       $(JADE) -t tex -V %section-autolabel% -d $(PRINT_SS) $(XML_DECL) $<
+manual.tex: audio_output.xml debugging.xml decoders.xml gfdl.xml glossary.xml history.xml input.xml interface.xml manual.xml overview.xml ports.xml video_output.xml
+       $(JADE) -t tex -V %section-autolabel% -d $(PRINT_SS) $(XML_DECL) manual.xml
        perl -i.bak -pe 's/\000//g' $@ && rm $*.tex.bak
 # No it's not a joke
 
-%.html: %.xml
+manual.html: audio_output.xml debugging.xml decoders.xml gfdl.xml glossary.xml history.xml input.xml interface.xml manual.xml overview.xml ports.xml video_output.xml
        $(JADE) -t sgml -V %section-autolabel% -V nochunks \
-         -d $(HTML_SS) $(XML_DECL) $< > $@
+         -d $(HTML_SS) $(XML_DECL) manual.xml > $@
 
-%.dvi: %.tex
-       jadetex $<
-       jadetex $<
-       jadetex $<
+manual.dvi: manual.tex modules.eps ps.eps stream.eps ts.eps
+       jadetex manual.tex
+       jadetex manual.tex
+       jadetex manual.tex
 
-%.ps: %.dvi
+manual.ps: manual.dvi
        dvips -f $< > $@
 
-%.txt: %.xml
-       $(JADE) -t sgml -V nochunks -d $(HTML_SS) $(XML_DECL) $< > dump.html
+manual.txt: audio_output.xml debugging.xml decoders.xml gfdl.xml glossary.xml history.xml input.xml interface.xml manual.xml overview.xml ports.xml video_output.xml
+       $(JADE) -t sgml -V nochunks -d $(HTML_SS) $(XML_DECL) manual.xml > dump.html
        lynx -force_html -dump dump.html > $@
        -rm -f dump.html
 
index f382346d6e58da2b224b2710d36777b7de3cc272..354de019ebd78deb569db3767b19125694d0c916 100644 (file)
@@ -310,16 +310,13 @@ be described in the following section.
 VideoLAN Client provides an MPEG-1, and an MPEG-2 Main Profile @
 Main Level decoder. It has been natively written for VLC, and is quite
 mature. Its status is a bit special, since it is splitted between two
-modules : video parser and video decoder [this is subject to change].
+logicial entities : video parser and video decoder.
 The initial goal is to separate bit stream parsing functions from
 highly parallelizable mathematical algorithms. In theory, there can be
 one video parser thread (and only one, otherwise we would have race
-conditions reading the bit stream), along with several video decoder
+conditions reading the bit stream), along with a pool of video decoder
 threads, which do IDCT and motion compensation on several blocks
-at once [practically,
-multi-threaded mode hasn't been tested for a while, still needs some
-work, and was actually slower than mono-threaded mode ; the
-multi-threaded mode won't be documented for the moment].
+at once.
       </para>
 
       <para>
@@ -375,7 +372,9 @@ Note also that the DMV algorithm is untested and is probably buggy.
 
         <para>
 Just like motion compensation, IDCT is platform-specific. So we moved it
-to <filename> plugins/idct</filename>. You need to define four methods :
+to <filename> plugins/idct</filename>. This module does the IDCT
+calculation, and copies the data to the final picture. You need to define
+seven methods :
         </para>
 
         <itemizedlist>
@@ -407,6 +406,25 @@ to <filename> plugins/idct</filename>. You need to define four methods :
           some IDCT (MMX) need to invert certain coefficients in the
           MPEG scan matrices (see ISO/IEC 13818-2).
           </para> </listitem>
+
+          <listitem> <para> <function> vdec_InitDecode </function>
+          <parameter> ( struct vdec_thread_s * p_vdec ) </parameter> :
+          Initializes the IDCT and optional crop tables.
+          </para> </listitem>
+
+          <listitem> <para> <function> vdec_DecodeMacroblockC </function>
+          <parameter> ( struct vdec_thread_s *p_vdec,
+          struct macroblock_s * p_mb ); </parameter> :
+          Decodes an entire macroblock and copies its data to the final
+          picture, including chromatic information.
+          </para> </listitem>
+
+          <listitem> <para> <function> vdec_DecodeMacroblockBW </function>
+          <parameter> ( struct vdec_thread_s *p_vdec,
+          struct macroblock_s * p_mb ); </parameter> :
+          Decodes an entire macroblock and copies its data to the final
+          picture, except chromatic information (used in grayscale mode).
+          </para> </listitem>
         </itemizedlist>
 
         <para>
@@ -417,10 +435,21 @@ and the simple 1-D separation IDCT from the ISO reference decoder
 (<filename>idctclassic.c</filename>).
         </para>
 
+      </sect2>
+
+      <sect2> <title> Symmetrical Multiprocessing </title>
+
+        <para>
+The MPEG video decoder of VLC can take advantage of several processors if
+necessary. The idea is to launch a pool of decoders, which will do
+IDCT/motion compensation on several macroblocks at once.
+        </para>
+
         <para>
-[In the future, the IDCT plug-in will include <function> vdec_AddBlock
-</function> and <function> vdec_CopyBlock </function>, which are
-often architecture-specific.]
+The functions managing the pool are in <filename>
+src/video_decoder/vpar_pool.c</filename>. Its use on non-SMP machines is
+not recommanded, since it is actually slower than the monothread version.
+Even on SMP machines sometimes...
         </para>
 
       </sect2>
index 21593a4709818ac5cf437d39556c81c92155c076..562e99a7ecd953e10ce28d444fad0c5c168f77a4 100644 (file)
@@ -92,6 +92,7 @@ reasons, we don't call <function>pthread_*</function> functions
 directly, but use a similar wrapper, made of <function> vlc_thread_create,
 vlc_thread_exit, vlc_thread_join, vlc_mutex_init, vlc_mutex_lock,
 vlc_mutex_unlock, vlc_mutex_destroy, vlc_cond_init, vlc_cond_signal,
+vlc_cond_broadcast,
 vlc_cond_wait, vlc_cond_destroy</function>, and structures <type>
 vlc_thread_t, vlc_mutex_t, and vlc_cond_t</type>.
     </para>
@@ -165,7 +166,7 @@ don't need usage of the module name.
     <sect2> <title> Variable naming </title>
 
       <para>
-Hungarian notations used, that means we have the following prefixes :
+Hungarian notations are used, that means we have the following prefixes :
       </para>
 
       <itemizedlist>
index e918f0005fda1d09b8c8ba1118a3b86c25c84a03..a4fc4a7fd243c4e0ec3984e499372a4b00d2fbbb 100644 (file)
 #define VDEC_SMP_VAR                   "vlc_smp"
 
 /* No SMP by default, since it slows down things on non-smp machines. */
-#define VDEC_SMP_DEFAULT               0
+#define VDEC_SMP_DEFAULT                0
+
+/* Nice increments for decoders -- necessary for x11 scheduling */
+#define VDEC_NICE                       3
 
 /*****************************************************************************
  * Messages and console interfaces configuration
index 8acd39680dc9543eabb7707ae1c08b2278f68b0c..731edca35e2e9eadd44cba8914422087b98f33f5 100644 (file)
@@ -2,7 +2,7 @@
  * video_decoder.c : video decoder thread
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_decoder.c,v 1.54 2001/07/18 14:21:00 massiot Exp $
+ * $Id: video_decoder.c,v 1.55 2001/07/18 17:05:39 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          GaĆ«l Hendryckx <jimmy@via.ecp.fr>
@@ -130,6 +130,18 @@ void vdec_InitThread( vdec_thread_t *p_vdec )
 {
     intf_DbgMsg("vdec debug: initializing video decoder thread %p", p_vdec);
 
+#if !defined(SYS_BEOS) && !defined(WIN32)
+#   if VDEC_NICE
+    /* Re-nice ourself - otherwise we would steal CPU time from the video
+     * output, which would make a poor display. */
+    if( nice(VDEC_NICE) == -1 )
+    {
+        intf_WarnMsg( 2, "vpar warning : couldn't nice() (%s)",
+                      strerror(errno) );
+    }
+#   endif
+#endif
+
     p_vdec->p_idct_data = NULL;
 
     p_vdec->p_pool->pf_decode_init( p_vdec );
index 6af8a573f9c0527a75cb79ea226d5b56627cf067..42734fb9953efab2ccfa6104aa4a02bda67e05d6 100644 (file)
@@ -2,7 +2,7 @@
  * vpar_blocks.c : blocks parsing
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_blocks.c,v 1.3 2001/07/18 14:21:00 massiot Exp $
+ * $Id: vpar_blocks.c,v 1.4 2001/07/18 17:05:39 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Jean-Marc Dressler <polux@via.ecp.fr>
@@ -1347,6 +1347,9 @@ static __inline__ void MotionVector( vpar_thread_t * p_vpar,
         }
 
         /* Dual Prime Arithmetic (ISO/IEC 13818-2 section 7.6.3.6). */
+        /* FIXME */
+        intf_Msg( "Your stream uses Dual Prime Arithmetic. Please send a mail"
+                  "to massiot@via.ecp.fr for debugging purposes. Thank you." );
 
 #define i_mv_x  p_mb->pppi_motion_vectors[0][0][0]
         if( i_structure == FRAME_STRUCTURE )