Commit 33687bb4 authored by Christophe Massiot's avatar Christophe Massiot

* Updated documentation with recent changes ;

* Decoders are niced again, for it is really better.
parent 24305848
manual.aux
manual.dvi
manual.html
manual.log
manual.ps
manual.tex
manual.txt
......@@ -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
......
......@@ -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>
......
......@@ -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>
......
......@@ -458,7 +458,10 @@
#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
......
......@@ -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>
* Gal 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 );
......
......@@ -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 )
......
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