List Info

Thread: compress/doc/documentation/code/programmers_guide common_data_structs.htm, 1.9, 1.10




compress/doc/documentation/code/program mers_guide common_data_structs.htm, 1.9, 1.10
user name
2008-05-09 00:04:18
Update of
/cvsroot/dirac/compress/doc/documentation/code/programmers_g
uide
In directory
sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv17127/documentatio
n/code/programmers_guide

Modified Files:
	common_data_structs.htm decoder_api_example.htm 
	decoder_api_functions.htm decoder_api_overview.htm 
	decoder_api_reference.htm decoder_data_structs.htm 
	encoder_api_example.htm encoder_api_functions.htm 
	encoder_api_overview.htm encoder_api_reference.htm 
	encoder_data_structs.htm index.htm intro.htm software.htm 
	toc.htm 
Log Message:
Update programmer's guide to reflect changes to Dirac
Library API.


Index: decoder_data_structs.htm
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/documentation/code/programmers_g
uide/decoder_data_structs.htm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** decoder_data_structs.htm	5 Sep 2007 13:20:25 -0000	1.3
--- decoder_data_structs.htm	9 May 2008 05:04:16 -0000	1.4
***************
*** 25,29 ****
  in.<br>
  <pre><br><span
!  style="font-weight: bold; font-family: Courier
New,Courier,monospace;">typedef enum { <br>   
STATE_BUFFER, <br>    STATE_SEQUENCE, <br>   
STATE_PICTURE_START, <br>    STATE_PICTURE_DECODE,
<br>    STATE_PICTURE_AVAIL, <br>   
STATE_SEQUENCE_END,<br></span><span
   style="font-weight: bold; font-family: Courier
New,Courier,monospace;">   
STATE_INVALID,</span><span
   style="font-weight: bold; font-family: Courier
New,Courier,monospace;"> <br>}
DecoderState;<br>typedef DecoderState
dirac_decoder_state_t;<br></span><span
--- 25,29 ----
  in.<br>
  <pre><br><span
!  style="font-weight: bold; font-family: Courier
New,Courier,monospace;">typedef enum { <br>   
STATE_BUFFER, <br>    STATE_SEQUENCE, <br>   
STATE_PICTURE_AVAIL, <br>   
STATE_SEQUENCE_END,<br></span><span
   style="font-weight: bold; font-family: Courier
New,Courier,monospace;">   
STATE_INVALID,</span><span
   style="font-weight: bold; font-family: Courier
New,Courier,monospace;"> <br>}
DecoderState;<br>typedef DecoderState
dirac_decoder_state_t;<br></span><span
***************
*** 44,56 ****
  and has processed the source parameters in the
bitstream.<br>
    </dd>
-  
<dt><i>STATE_PICTURE_START</i></dt>
-   <dd>The decoder detected a start
- of frame in the input bitstream and
- has processed the frame parameters.<br>
-   </dd>
-  
<dt><i>STATE_PICTURE_DECODE</i></dt>

-   <dd>The decoder is decoding the
- current frame<br>
-   </dd>
    <dt><i>STATE_PICTURE_AVAIL<br>
      </i></dt>
--- 44,47 ----
***************
*** 96,100 ****
   style="font-weight: bold; font-family: courier
new,courier,monospace;">    dirac_sourceparams_t
src_params;</span><br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">    dirac_frame_params_t
frame_params;<br>    void *parser;<br>   
dirac_framebuf_t *fbuf;<br>    int
frame_avail;<br>    int verbose;<br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"></span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;">}
dirac_decoder_t;<br><br></span></pre>
;
--- 87,91 ----
   style="font-weight: bold; font-family: courier
new,courier,monospace;">    dirac_sourceparams_t
src_params;</span><br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">    unsigned int
frame_num;<br>    void *parser;<br>   
dirac_framebuf_t *fbuf;<br>    int
frame_avail;<br>    int verbose;<br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"></span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;">}
dirac_decoder_t;<br><br></span></pre>
;
***************
*** 131,143 ****
  This field must be used by the user only after the decoder
returns a
  state of STATE_SEQUENCE.</dd>
!   <dt><i>frame_params</i></dt>
!   <dd>Parameters of the frame
! currently being decoded or the decoded
! frame available . It is of type <a
! 
href="common_data_structs.htm#dirac_frameparams_t"
>dirac_frameparams_t</a>.
! This field is populated with the parameters of the frame
being decoded
! if the decoder returns a state of STATE_PICTURE_START. It
is populated
! with the parameters of the decoded frame available to the
user if the
! decoder returns a STATE_PICTURE_AVAIL state.<br>
    </dd>
    <dt><span style="font-style:
italic;">parser</span><br>
--- 122,129 ----
  This field must be used by the user only after the decoder
returns a
  state of STATE_SEQUENCE.</dd>
!   <dt><i>frame_num</i></dt>
!   <dd>Frame number of the decoded frame available .

! This field is populated with the frame number of the
decoded frame available 
! to the user if the decoder returns a STATE_PICTURE_AVAIL
state.<br>
    </dd>
    <dt><span style="font-style:
italic;">parser</span><br>

Index: decoder_api_example.htm
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/documentation/code/programmers_g
uide/decoder_api_example.htm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** decoder_api_example.htm	5 Sep 2007 13:20:25 -0000	1.3
--- decoder_api_example.htm	9 May 2008 05:04:15 -0000	1.4
***************
*** 212,223 ****
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            * Next frame in
display order is available in the decoder
buffer</span><br
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            *
decoder-&gt;fbuf. Information related to the frame is
available in </span><br
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            *
decoder-&gt;frame_params.</span><br
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;">           
*/</span><br
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            printf ("Frame
%d Availablen",
decoder-&gt;frame_params.fnum);</span><br
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            /* Write Y Component
to output file */</span><br
--- 212,223 ----
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            * Next frame in
display order is available in the decoder
buffer</span><br
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            *
decoder-&gt;fbuf. Frame number of the frame decoded is
available in </span><br
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            *
decoder-&gt;frame_num.</span><br
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;">           
*/</span><br
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            printf ("Frame
%d Availablen",
decoder-&gt;frame_num);</span><br
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
   style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            /* Write Y Component
to output file */</span><br

Index: decoder_api_functions.htm
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/documentation/code/programmers_g
uide/decoder_api_functions.htm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** decoder_api_functions.htm	22 Jan 2008 11:39:05
-0000	1.6
--- decoder_api_functions.htm	9 May 2008 05:04:15 -0000	1.7
***************
*** 130,151 ****
  frame to this buffer.<br>
    </dd>
-  
<dt><i>STATE_PICTURE_START</i></dt>
-   <dd>The decoder has detected and
- decoded a frame header. The decoder sets up the <a
- 
href="common_data_structs.htm#dirac_frameparams_t"
>frame_params</a>
- structure in&nbsp; <a
href="decoder_data_structs.htm#dirac_decoder_t">
;decoder
- handle</a>
- with the information from the frame header. <span
-  style="font-weight: bold;">NOTE: This state
is
- currently not returned
- by the Decoder library</span>.<br>
-   </dd>
   
<dt><i>STATE_PICTURE_AVAIL</i></dt>
    <dd>The decoder has successfully
! decoded a frame. The decoder sets up the <a
! 
href="common_data_structs.htm#dirac_frameparams_t"
>frame_params</a>
! structure in&nbsp; <a
href="decoder_data_structs.htm#dirac_decoder_t">
;decoder
  handle</a>
! with the information from header of the decoded frame. It
copies the
  decoded frame into the frame buffer, <a
  
href="common_data_structs.htm#dirac_framebuf_t">
;fbuf</a>,
--- 130,139 ----
  frame to this buffer.<br>
    </dd>
   
<dt><i>STATE_PICTURE_AVAIL</i></dt>
    <dd>The decoder has successfully
! decoded a frame. The decoder sets up the frame_num field
in 
! &nbsp; <a
href="decoder_data_structs.htm#dirac_decoder_t">
;decoder
  handle</a>
! with the frame number of the decoded frame. It copies the
  decoded frame into the frame buffer, <a
  
href="common_data_structs.htm#dirac_framebuf_t">
;fbuf</a>,
***************
*** 230,282 ****
  <p> </p>
  <a
href="decoder_api_functions.htm#top"><img
src="images/arrow_up.gif">top</a><br&g
t;
- <h2><a
name="dirac_skip">dirac_skip</a></h2&g
t;
- <span style="font-style:
italic;">Declared
- in libdirac_decoder/dirac_parser.h</span><br>
- <br>
- <span style="font-weight: bold;">NOTE:
- This functionality is not
- available from v0.7.0 onwards</span><br>
- <br>
- This function instructs the decoder to skip/decode the
next frame in
- the bitstream.&nbsp; The behaviour of the decoder to
the
- skip instruction depends on the type of the frame it is
currently
- processing. It the current frame is an intra frame,
I_frame,&nbsp;
- or an L1 type inter frame, L1_frame, the decoder skips
decoding all
- frames until the next intra frame is detected in the
bitstream. If the
- current frame being processed in an L2 type inter frame,
the decoder
- skips decoding until the next frame is detected. The
decoder will
- continue skipping decoding frames until it is instructed
- to start decoding frames again.<br>
- <pre><br><font
size="+1"><span
-  style="font-weight: bold; font-family: Courier
New,Courier,monospace;">void dirac_skip
(dirac_decoder_t *decoder, int
skip);</span></font><span
-  style="font-weight: bold; font-family: Courier
New,Courier,monospace;"><br><span
-  style="font-family: Courier New,Courier,monospace;
font-weight:
bold;"><br></span></span></pre&
gt;
- <h3>Parameters</h3>
- <dl>
-   <dt><i>decoder<br>
-     </i></dt>
-   <dd>A pointer to the<a
href="decoder_data_structs.htm#dirac_decoder_t">
;
- dirac_decoder_t</a>
- returned by <a
href="decoder_api_functions.htm#dirac_decoder_init"
;>dirac_decoder_init</a>.<br>
-   </dd>
-   <dt><i>skip
-     <br>
-     </i></dt>
-   <dd>A
- flag that instructs the decoder to skip/continue decoding
frames. It
- takes two values:<br>
-   </dd>
-   <dd>&gt;0 : Skip decoding
- frames </dd>
-   <dd>&lt;=0 : start decoding
- frames again </dd>
- </dl>
- <h3>Return Values<br>
- </h3>
- <dl>
-   <dd>None.</dd>
- </dl>
- <p> </p>
- <a
href="decoder_api_functions.htm#top"><img
src="images/arrow_up.gif">top</a><br&g
t;
  <h2><a
name="dirac_decoder_close">dirac_decoder_close&
lt;/a></h2>
  <span style="font-style:
italic;">Declared
--- 218,221 ----

Index: encoder_api_example.htm
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/documentation/code/programmers_g
uide/encoder_api_example.htm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** encoder_api_example.htm	22 Jan 2008 11:39:05 -0000	1.5
--- encoder_api_example.htm	9 May 2008 05:04:16 -0000	1.6
***************
*** 2,23 ****
  <html>
  <head>
    <style type="text/css"
media="all">
    import url(styles.css);
      
    </style>
    <title>Dirac: A programmer's guide</title>
  </head>
  <body>
  <h3>Dirac video codec: A
  programmer's guide</h3>
  <p> <a href="toc.htm"><img
src="images/toc.gif">Table
  of Contents</a> | <a
href="encoder_api.htm">Back
  to Encoder API
! Contents</a> | <a
href="encoder_api_reference.htm"><img
!  src="images/prev.gif">API
  Reference</a>
  </p>
  <h1>Encoder API Example<br>
  </h1>
  <p>
  The following code describes a simple example on how to
use the Dirac
--- 2,32 ----
  <html>
  <head>
+ 
+   
    <style type="text/css"
media="all">
    import url(styles.css);
      
    </style>
+   
    <title>Dirac: A programmer's guide</title>
  </head>
+ 
+ 
  <body>
+ 
  <h3>Dirac video codec: A
  programmer's guide</h3>
+ 
  <p> <a href="toc.htm"><img
src="images/toc.gif">Table
  of Contents</a> | <a
href="encoder_api.htm">Back
  to Encoder API
! Contents</a> | <a
href="encoder_api_reference.htm"><img
src="images/prev.gif">API
  Reference</a>
  </p>
+ 
  <h1>Encoder API Example<br>
+ 
  </h1>
+ 
  <p>
  The following code describes a simple example on how to
use the Dirac
***************
*** 29,257 ****
  Planar YUV 4:2:0 format from an input file, and writes the
encoded
  bitstream to an output file. <br>
  </p>
! <pre><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">#include
&lt;stdio.h&gt;<br>#include
&lt;errno.h&gt;<br><br>/* Include Dirac
Encoder Header file */<br
!  style="font-family: Courier
New,Courier,monospace;">#include
&lt;libdirac_encoder/dirac_encoder.h&gt;</span>
;<br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br>#define ENCBUF_SIZE
(1024*1024)</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br>extern int main (int
argc, char **argv)</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">{</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    FILE
*in;</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    FILE
*out;</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    dirac_encoder_context_t
enc_ctx;</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    dirac_encoder_t
*encoder;</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    unsigned char
*unc_frame;</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    int
unc_frame_size;</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    unsigned char
enc_frame[ENCBUF_SIZE];</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    if (argc &lt;
3)</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    {</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">        printf ("Usage : %s
input-file output-filen",
argv[0]);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">       
exit(0);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    }</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* open input file
*/</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    if ( (in = fopen (argv[1],
"rb")) == NULL)</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    {</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">        perror
(argv[1]);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">       
exit(errno);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    }</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* open output file
*/</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    if ( (out = fopen (argv[2],
"wb")) == NULL)</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    {</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">        perror
(argv[2]);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">       
exit(errno);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    }</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* Initialise the encoder
context with presets for SD576I50 */</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    dirac_encoder_context_init
(&amp;enc_ctx, SD576I50);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-weight: bold;">   
</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* override some of the
preset defaults */<br>    /* Set quality factor to 7.5
*/<br>    enc_ctx.enc_params.qf =
7.5;</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    <br>    /* set input
video type to progressive video */<br>   
enc_ctx.source_params.source_sampling =
0;</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    <br>    /* set flag to
retrieve locally decoded frames from encoder */<br>  
&nbsp;enc_ctx.decode_flag = 1;</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    </span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* Initialise the encoder
with the encoder context */<br>    if ( (encoder =
dirac_encoder_init(&amp;enc_ctx, 0)) ==
NULL)</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    {</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">        printf ("Error
initialising the encodern");</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">       
exit(-1);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    }</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* Calculate the size of an
uncompressed frame */<br>    unc_frame_size =
(encoder-&gt;enc_ctx.src_params.height *
</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">      
encoder-&gt;enc_ctx.src_params.width)
+</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">      
2*(encoder-&gt;enc_ctx.src_params.chroma_height
</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               *
encoder-&gt;enc_ctx.src_params.chroma_width);</span&g
t;<br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* Allocate memory for an
uncompressed frame */<br>    unc_frame = (unsigned
char *)malloc(unc_frame_size);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* Main loop */<br>   
while (fread(unc_frame, unc_frame_size, 1, in) ==
1)</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    {</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">        /* <br>        *
Read one frame of uncompressed data into the buffer
and<br>        * load it into the encoder<br>   
    */<br>        if (dirac_encoder_load (encoder,
unc_frame, unc_frame_size) &gt; 0)</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">        {</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">           
dirac_encoder_state_t state;</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">           
do</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            { <br
!  style="font-family: Courier
New,Courier,monospace;">                /*<br>
               * Frame loaded successfully, so now set up
the encode<br>                * buffer in the encoder
handler before calling the<br>                *
encoding function.<br>                */<br>    
           encoder-&gt;enc_buf.buffer =
enc_frame;</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               
encoder-&gt;enc_buf.size = ENCBUF_SIZE;<br
!  style="font-family: Courier
New,Courier,monospace;">                <br>  
             /* Call the encoding function */<br>     
          state = dirac_encoder_output
(encoder);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                <br>      
         /*<br>                * Depending on the
return value of the encode function<br>               
* take appropriate action<br>               
*/<br>                switch
(state)</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               
{</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                case
ENC_STATE_AVAIL:</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                    /*
<br>                    * Encoded frame available in
enc_buf. Write the<br>                    * buffer to
the output file<br>                    */<br>   
                fwrite (encoder-&gt;enc_buf.buffer,
encoder-&gt;enc_buf.size,</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                            1,
out);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                    /*
</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                    * In
addition to the encoded frame, the following
metadata</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                    * is also
available.</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                    * encoded
frame stats in
encoder-&gt;enc_fstats</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                    * encoded
frame params in
encoder-&gt;enc_fparams</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                   
*/</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                   
break;<br><br
!  style="font-family: Courier
New,Courier,monospace;">                case
ENC_STATE_BUFFER:<br>                    /*<br> 
                  * Encoder needs more data to continue
processing<br
!  style="font-family: Courier
New,Courier,monospace;">                   
*/<br>                    break;<br><br
!  style="font-family: Courier
New,Courier,monospace;">                case
ENC_STATE_INVALID:</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               
default:</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                    printf
("Irrecoverable error.
quitting...");</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                    free
(unc_frame);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                   
dirac_encoder_close(encoder);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                   
exit(-1);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                   
break;</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               
}</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                if
(encoder-&gt;decoded_frame_avail)</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               
{</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                   
/*</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                    * Locally
decoded frame available in
encoder-&gt;dec_buf</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                   
*/</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               
}</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                if
(encoder-&gt;instr_data_avail)</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               
{</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                   
/*</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                    *
Instrumentation data available in
encoder-&gt;instr</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                   
*/</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               
}</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            } while (state ==
ENC_STATE_AVAIL);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">        }</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    }</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* Retrieve end of sequence
information */</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">   
encoder-&gt;enc_buf.buffer =
enc_frame;</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    encoder-&gt;enc_buf.size
= ENCBUF_SIZE;</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    dirac_encoder_end_sequence(
encoder );</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    fwrite
(encoder-&gt;enc_buf.buffer,
encoder-&gt;enc_buf.size, 1, out);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* Sequence statistics
available in encoder-&gt;enc_seqstats;
*/</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* Free the encoder
resources */</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">   
dirac_encoder_close(encoder);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    <br>    /* Free the
uncompressed data buffer */</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    free
(unc_frame);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    <br>    fclose
(in);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    fclose
(out);</span><br
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
!  style="font-weight:
bold;">}</span></span><font
size="+1"><span
!  style="font-family: Courier New,Courier,monospace;
font-weight:
bold;"><br><br></span></font>
;</pre>
  <p> </p>
! <a
href="decoder_api_functions.htm#top"><img
src="images/arrow_up.gif">top</a><br&g
t;
  <br>
! <p> <a href="http://source
forge.net"><img
!  style="border: 0pt none ; width: 88px; height:
31px;"
!  src="http://sourceforge.net/sflogo.php?group_id=
24405&amp;type=1"
!  alt="SourceForge.net Logo"></a>
  </p>
  </body>
  </html>
--- 38,55 ----
  Planar YUV 4:2:0 format from an input file, and writes the
encoded
  bitstream to an output file. <br>
+ 
  </p>
! 
! <pre><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">#include
&lt;stdio.h&gt;<br>#include
&lt;errno.h&gt;<br><br>/* Include Dirac
Encoder Header file */<br style="font-family:
Courier New,Courier,monospace;">#include
&lt;libdirac_encoder/dirac_encoder.h&gt;</span>
;<br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br>#define ENCBUF_SIZE
(1024*1024)</span><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight:
bold;"><br>extern int main (int argc, char
**argv)</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">{</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-we
 ight: bold;">    FILE *in;</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    FILE
*out;</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    dirac_encoder_context_t
enc_ctx;</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    dirac_encoder_t
*encoder;</span><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">   
unsigned char *unc_frame;</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    int
unc_frame_size;</span><br style="font-family:
Courie
 r New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">   
unsigned char enc_frame[ENCBUF_SIZE];<br>    int go =
1;<br></span><span style="font-family:
Courier New,Courier,monospace; font-weight: bold;"> 
  dirac_encoder_state_t state;</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    <br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    if (argc &lt;
3)</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    {</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">        printf ("Usage : %s
input-file output-filen", argv[0]);</span><br
style="font-family: Courier New
 ,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">       
exit(0);</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    }</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">    /*
open input file */</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    if ( (in = fopen (argv[1],
"rb")) == NULL)</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    {</span><br
style="font-family: Courier New,Courier,monospace; fo
 nt-weight: bold;"><span style="font-family:
Courier New,Courier,monospace; font-weight: bold;"> 
      perror (argv[1]);</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">       
exit(errno);</span><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">   
}</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* open output file
*/</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    if ( (out = fopen (argv[2],
"wb")) == NULL)</span><br
style="font-family: Courier New,Courier,monospace
 ; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    {</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">        perror
(argv[2]);</span><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">       
exit(errno);</span><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">   
}</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* Initialise the encoder
context with presets for SD576I50 */</span><br
style="font-family: Courier New,Courier,monospa
 ce; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    dirac_encoder_context_init
(&amp;enc_ctx, SD576I50);</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-weight: bold;">   
</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* override some of the
preset defaults */<br>    /* Set quality factor to 7.5
*/<br>    enc_ctx.enc_params.qf =
7.5;</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    <br>    /* set input
video type to progressive video */<br>   
enc_ctx.source_params.source_sampling =
0;</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    <b
 r>    /* set flag to retrieve locally decoded frames
from encoder */<br>   &nbsp;enc_ctx.decode_flag =
1;</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    </span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* Initialise the encoder
with the encoder context */<br>    if ( (encoder =
dirac_encoder_init(&amp;enc_ctx, 0)) ==
NULL)</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    {</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">        printf ("Error
initialising the encodern");</span><br
style="font-family: Courier New,Courier,monospace;
  font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">       
exit(-1);</span><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">   
}</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* Calculate the size of an
uncompressed frame */<br>    unc_frame_size =
(encoder-&gt;enc_ctx.src_params.height *
</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">      
encoder-&gt;enc_ctx.src_params.width)
+</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: 
 bold;">      
2*(encoder-&gt;enc_ctx.src_params.chroma_height
</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               *
encoder-&gt;enc_ctx.src_params.chroma_width);</span&g
t;<br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* Allocate memory for an
uncompressed frame */<br>    unc_frame = (unsigned
char *)malloc(unc_frame_size);</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">    /*
Main loop */<br>    do</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span style="fon
 t-family: Courier New,Courier,monospace; font-weight:
bold;">    {</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">        /* <br>        *
Read one frame of uncompressed data into the buffer
and<br>        * load it into the encoder<br>   
    */<br>        if ( fread( unc_frame,
unf_frame_size, 1, in) == 1)<br>        {<br>   
        if (dirac_encoder_load( encoder, unc_frame,
unc_frame_size ) &lt; 0)</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            {<br>         
       fprintf (stderr, "dirac_encoder_load failed.
Unrecoverable error...n");<br>                
exit(-1);<br>            }<br>       
}<br>        else<br>        {<br>        
   /* signal end of sequence to encoder */<br>        
   dirac_encoder_end_sequence( encoder );<br>     
    }<br style="font-family: Courier
New,Courier,monospace; font-weight:
bold;"></span><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"> </span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">        do</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">        { <br
style="font-family: Courier
New,Courier,monospace;">            /*<br>    
       * Frame loaded successfully, so now set up the
encode<br>            * buffer in the encoder handler
before calling the<br>            * encoding
function.<br>            */<br>           
encoder-&gt;enc_buf.buffer =
enc_frame;</span><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">         
  en
 coder-&gt;enc_buf.size = ENCBUF_SIZE;<br
style="font-family: Courier
New,Courier,monospace;">                <br>  
         /* Call the encoding function */<br>         
  state = dirac_encoder_output (encoder);</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                <br>      
     /*<br>            * Depending on the return value
of the encode function<br>            * take
appropriate action<br>            */<br>        
   switch (state)</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            {</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            case
ENC_STATE_AVAIL:</span><br style="font-family:
Courier New,Courier,monospace;
  font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                /* <br>   
            * Encoded picture available in enc_buf. Write
the<br>                * buffer to the output
file<br>                */<br>               
fwrite (encoder-&gt;enc_buf.buffer,
encoder-&gt;enc_buf.size,</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                        1,
out);</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                /*
</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                * In addition to
the encoded picture, the following
metadata</span><br style="font-family: Courier
New,Courie
 r,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                * is also
available.</span><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">         
      * encoded picture stats in
encoder-&gt;enc_pstats</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                * encoded
picture params in
encoder-&gt;enc_pparams</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               
*/</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               
break;<br><br style="font-family: Courier
  New,Courier,monospace;">            case
ENC_STATE_BUFFER:<br>                /*<br>     
          * Encoder needs more data to continue
processing<br style="font-family: Courier
New,Courier,monospace;">                */<br>
               break;<br></span><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br>            case
ENC_STATE_EOS:</span><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">         
      /* <br>                * End of sequence info
available in enc_buf. Write the<br>                *
buffer to the output file<br>               
*/<br>                fwrite
(encoder-&gt;enc_buf.buffer,
encoder-&gt;enc_buf.size,</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                        1,
out);</span><br style="font-f
 amily: Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">         
      /* </span><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">         
      * In addition to the encoded picture, the following
metadata</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                * is also
available.</span><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">         
      * encoded sequence stats in
encoder-&gt;enc_seqstats</span><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"></span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span style=
 "font-family: Courier New,Courier,monospace;
font-weight: bold;">               
*/</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               
break;</span><br><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><br style="font-family:
Courier New,Courier,monospace;">            case
ENC_STATE_INVALID:</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">           
default:</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                printf
("Irrecoverable error.
quitting...");</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weig
 ht: bold;">                free
(unc_frame);</span><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">         
      dirac_encoder_close(encoder);</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               
exit(-1);</span><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">         
      break;</span><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">         
  }</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            if
(encoder-&gt;decoded_frame_ava
 il)</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            {</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               
/*</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                * Locally
decoded frame available in
encoder-&gt;dec_buf</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               
*/</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            }</span><br
style="font-family: Courier New,Courier,monosp
 ace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            if
(encoder-&gt;instr_data_avail)</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            {</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               
/*</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">                *
Instrumentation data available in
encoder-&gt;instr</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">               
*/</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span

 style="font-family: Courier New,Courier,monospace;
font-weight: bold;">            }</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">        } while (state ==
ENC_STATE_AVAIL);</span><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"></span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    } </span><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">while
(go);<br></span><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">&nbsp;   </span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    /* Free the encoder
resources */</span><br style="font-family:
Courier New,Courier,monospace; font-
 weight: bold;"><span style="font-family:
Courier New,Courier,monospace; font-weight: bold;"> 
  dirac_encoder_close(encoder);</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    <br>    /* Free the
uncompressed data buffer */</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    free
(unc_frame);</span><br style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><span style="font-family: Courier
New,Courier,monospace; font-weight: bold;">   
<br>    fclose (in);</span><br
style="font-family: Courier New,Courier,monospace;
font-weight: bold;"><span
style="font-family: Courier New,Courier,monospace;
font-weight: bold;">    fclose
(out);</span><br style="font-family: Courier
New,Courier,monospace; font-weight: bold;"><span
style="font-family: Courier
  New,Courier,monospace; font-weight:
bold;"><span style="font-weight:
bold;">}</span></span><font
size="+1"><span style="font-family:
Courier New,Courier,monospace; font-weight:
bold;"><br><br></span></font>
;</pre>
! 
  <p> </p>
! 
! <a
href="encoder_api_example.htm#top"><img
src="images/arrow_up.gif">top</a><br&g
t;
! 
  <br>
! 
! <p> <a href="http://source
forge.net"><img style="border: 0pt none
; width: 88px; height: 31px;" src="http://sourceforge.net/sflogo.php?group_id=
24405&amp;type=1" alt="SourceForge.net
Logo"></a>
  </p>
+ 
  </body>
  </html>

Index: encoder_api_reference.htm
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/documentation/code/programmers_g
uide/encoder_api_reference.htm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** encoder_api_reference.htm	5 Sep 2007 13:20:25 -0000	1.3
--- encoder_api_reference.htm	9 May 2008 05:04:16 -0000	1.4
***************
*** 20,23 ****
--- 20,24 ----
  <a
href="encoder_data_structs.htm#dirac_encoder_state_t&qu
ot;>dirac_encoder_state_t</a><br>
  <a
href="encoder_data_structs.htm#dirac_encoder_presets_t&
quot;>dirac_encoder_presets_t</a><br>
+ <a
href="common_data_structs.htm#dirac_prefilter_t"&g
t;dirac_prefilter_t</a><br>
  <a
href="encoder_data_structs.htm#dirac_mvprecision_t"
;>dirac_mvprecision_t</a><br>
  <a
href="common_data_structs.htm#dirac_wlt_filter_t"&
gt;dirac_wlt_filter_t</a><br>
***************
*** 26,35 ****
  <a
href="encoder_data_structs.htm#dirac_encoder_context_t&
quot;>dirac_encoder_context_t</a><br>
  <a
href="encoder_data_structs.htm#dirac_enc_data_t"&g
t;dirac_enc_data_t</a><br>
! <a
href="encoder_data_structs.htm#dirac_enc_framestats_t&q
uot;>dirac_enc_framestats_t</a><br>
  <a
href="encoder_data_structs.htm#dirac_enc_seqstats_t&quo
t;>dirac_enc_seqstats_t</a><br>
  <a
href="encoder_data_structs.htm#dirac_mv_t">dira
c_mv_t</a><br>
  <a
href="encoder_data_structs.htm#dirac_mv_cost_t">
;dirac_mv_cost_t</a><br>
  <a
href="encoder_data_structs.htm#dirac_instr_t">d
irac_instr_t</a><br>
! <a
href="common_data_structs.htm#dirac_frameparams_t"
>dirac_frameparams_t</a><br>
  <a
href="common_data_structs.htm#dirac_framebuf_t">
;dirac_framebuf_t</a><br>
  <a
href="encoder_data_structs.htm#dirac_encoder_t">
;dirac_encoder_t</a><br>
--- 27,36 ----
  <a
href="encoder_data_structs.htm#dirac_encoder_context_t&
quot;>dirac_encoder_context_t</a><br>
  <a
href="encoder_data_structs.htm#dirac_enc_data_t"&g
t;dirac_enc_data_t</a><br>
! <a
href="encoder_data_structs.htm#dirac_enc_picstats_t&quo
t;>dirac_enc_picstats_t</a><br>
  <a
href="encoder_data_structs.htm#dirac_enc_seqstats_t&quo
t;>dirac_enc_seqstats_t</a><br>
  <a
href="encoder_data_structs.htm#dirac_mv_t">dira
c_mv_t</a><br>
  <a
href="encoder_data_structs.htm#dirac_mv_cost_t">
;dirac_mv_cost_t</a><br>
  <a
href="encoder_data_structs.htm#dirac_instr_t">d
irac_instr_t</a><br>
! <a
href="common_data_structs.htm#dirac_picparams_t"&g
t;dirac_picparams_t</a><br>
  <a
href="common_data_structs.htm#dirac_framebuf_t">
;dirac_framebuf_t</a><br>
  <a
href="encoder_data_structs.htm#dirac_encoder_t">
;dirac_encoder_t</a><br>

Index: encoder_data_structs.htm
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/documentation/code/programmers_g
uide/encoder_data_structs.htm,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** encoder_data_structs.htm	22 Jan 2008 11:39:05
-0000	1.12
--- encoder_data_structs.htm	9 May 2008 05:04:16 -0000	1.13
***************
*** 26,30 ****
  This enumerated type defines the state of the Dirac
encoder. <br>
  <pre><br><span
!  style="font-weight: bold; font-family: Courier
New,Courier,monospace;">typedef enum { <br>   
ENC_STATE_INVALID = -1, <br>    ENC_STATE_BUFFER,
<br>    ENC_STATE_AVAIL <br>}
dirac_encoder_state_t;</span><span
   style="font-family: Courier New,Courier,monospace;
font-weight:
bold;"><br><br></span></pre>

  <h3>
--- 26,30 ----
  This enumerated type defines the state of the Dirac
encoder. <br>
  <pre><br><span
!  style="font-weight: bold; font-family: Courier
New,Courier,monospace;">typedef enum { <br>   
ENC_STATE_INVALID = -1, <br>    ENC_STATE_BUFFER,
<br>    ENC_STATE_AVAIL, <br>    ENC_STATE_EOS
<br>} dirac_encoder_state_t;</span><span
   style="font-family: Courier New,Courier,monospace;
font-weight:
bold;"><br><br></span></pre>

  <h3>
***************
*** 43,47 ****
    <dt><i>ENC_STATE_AVAIL</i>
</dt>
   
<dt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
! An encoded frame is available to the end user<br>
    </dt>
  </dl>
--- 43,51 ----
    <dt><i>ENC_STATE_AVAIL</i>
</dt>
   
<dt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
! An encoded picture is available to the end user<br>
!   </dt>
!   <dt><i>ENC_STATE_EOS</i> </dt>
!  
<dt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
! End of sequence information is available to the end
user<br>
    </dt>
  </dl>
***************
*** 89,93 ****
   style="font-weight: bold; font-family: Courier
New,Courier,monospace;">   
VIDEO_FORMAT_1080P50,<br></span><span
   style="font-weight: bold; font-family: Courier
New,Courier,monospace;">   
VIDEO_FORMAT_DIGI_CINEMA_2K24,<br></span><spa
n
!  style="font-weight: bold; font-family: Courier
New,Courier,monospace;">   
VIDEO_FORMAT_DIGICINEMA_4K24</span><br><span
   style="font-weight: bold; font-family: Courier
New,Courier,monospace;">}
VideoFormat;<br>typedef VideoFormat
dirac_encoder_presets_t<br></span><span
   style="font-family: Courier New,Courier,monospace;
font-weight:
bold;"><br></span></pre>
--- 93,102 ----
   style="font-weight: bold; font-family: Courier
New,Courier,monospace;">   
VIDEO_FORMAT_1080P50,<br></span><span
   style="font-weight: bold; font-family: Courier
New,Courier,monospace;">   
VIDEO_FORMAT_DIGI_CINEMA_2K24,<br></span><spa
n
!  style="font-weight: bold; font-family: Courier
New,Courier,monospace;">   
VIDEO_FORMAT_DIGICINEMA_4K24,</span><br><span

!  style="font-weight: bold; font-family: Courier
New,Courier,monospace;">   
VIDEO_FORMAT_UHDTV_4K60,</span><br><span
!  style="font-weight: bold; font-family: Courier
New,Courier,monospace;">   
VIDEO_FORMAT_UHDTV_4K50,</span><br><span
!  style="font-weight: bold; font-family: Courier
New,Courier,monospace;">   
VIDEO_FORMAT_UHDTV_8K60,</span><br><span
!  style="font-weight: bold; font-family: Courier
New,Courier,monospace;">   
VIDEO_FORMAT_UHDTV_8K50,</span><br><span
!  style="font-weight: bold; font-family: Courier
New,Courier,monospace;">   
VIDEO_FORMAT_UNDEFINED</span><br><span
   style="font-weight: bold; font-family: Courier
New,Courier,monospace;">}
VideoFormat;<br>typedef VideoFormat
dirac_encoder_presets_t<br></span><span
   style="font-family: Courier New,Courier,monospace;
font-weight:
bold;"><br></span></pre>
***************
*** 168,171 ****
--- 177,196 ----
    <dd>Initialise using default
  values for the Digital Cinema 4K Format</dd>
+   <dt></dt>
+  
<dt><i>VIDEO_FORMAT_UHDTV_4K60</i></dt&
gt;
+   <dd>Initialise using default
+ values for the Ultra High Definition 4K  60Hz
Format</dd>
+   <dt></dt>
+  
<dt><i>VIDEO_FORMAT_UHDTV_4K50</i></dt&
gt;
+   <dd>Initialise using default
+ values for the Ultra High Definition 4K  50Hz
Format</dd>
+   <dt></dt>
+  
<dt><i>VIDEO_FORMAT_UHDTV_8K60</i></dt&
gt;
+   <dd>Initialise using default
+ values for the Ultra High Definition 8K  60Hz
Format</dd>
+   <dt></dt>
+  
<dt><i>VIDEO_FORMAT_UHDTV_8K50</i></dt&
gt;
+   <dd>Initialise using default
+ values for the Ultra High Definition 8K  50Hz
Format</dd>
    <dd> <br>
    </dd>
***************
*** 241,245 ****
   class="code"><span
style="font-family: Courier;">    unisgned int
wlt_depth;<br></span></span><span
   class="code"><span
style="font-family: Courier;">    unsigned int
spatial_partition;<br></span></span><sp
an
!  class="code"><span
style="font-family: Courier;">    unsigned int
denoise;<br></span></span><span
   class="code"><span
style="font-family: Courier;">    unsigned int
multi_quants;<br></span></span><span
   class="code"><span
style="font-family: Courier;">   
dirac_mvprecision_t
mv_precision;<br></span></span><span
--- 266,271 ----
   class="code"><span
style="font-family: Courier;">    unisgned int
wlt_depth;<br></span></span><span
   class="code"><span
style="font-family: Courier;">    unsigned int
spatial_partition;<br></span></span><sp
an
!  class="code"><span
style="font-family: Courier;">   
dirac_prefilter_t
prefilter;<br></span></span><span
!  class="code"><span
style="font-family: Courier;">    unsigned int
prefilter_strength;<br></span></span><s
pan
   class="code"><span
style="font-family: Courier;">    unsigned int
multi_quants;<br></span></span><span
   class="code"><span
style="font-family: Courier;">   
dirac_mvprecision_t
mv_precision;<br></span></span><span
***************
*** 272,285 ****
    <dt><i>L1_sep</i> </dt>
    <dd>The separation between L1
! frames, i.e. the inter frames that can
  be used
! as reference frames.<br>
    </dd>
    <dt><span style="font-style:
italic;">num_L1</span><br>
    </dt>
!   <dd>The number of L1 frames
! before the next Intra frame (I_frame).
  Together with L1_sep it determines the GOP (group of
pictures) size.
! Set this value to 0 to enable I_frame only encoding, i.e.
all frames
  are intra coded. <br>
    </dd>
--- 298,311 ----
    <dt><i>L1_sep</i> </dt>
    <dd>The separation between L1
! pictures, i.e. the inter pictures that can
  be used
! as reference pictures.<br>
    </dd>
    <dt><span style="font-style:
italic;">num_L1</span><br>
    </dt>
!   <dd>The number of L1 pictures
! before the next Intra picture (I_picture).
  Together with L1_sep it determines the GOP (group of
pictures) size.
! Set this value to 0 to enable I_picture only encoding,
i.e. all pictures
  are intra coded. <br>
    </dd>
***************
*** 307,316 ****
    <dd>Wavelet
  filter used for
! encoding Intra frames.&nbsp; Default value is DD9_7.
This field is
  of type <a
href="common_data_structs.htm#dirac_wlt_filter_t"&
gt;dirac_wlt_filter_t</a>.</dd>
    <dt><i>inter_wlt_filter</i>
</dt>
    <dd>Wavelet
  filter used for
! encoding Inter frames.&nbsp; Default value is
LEGALL5_3. This field is
  of type <span style="text-decoration:
underline;"><a
  
href="common_data_structs.htm#dirac_wlt_filter_t"&
gt;dirac_wlt_filter_t</a>.</dd>
--- 333,342 ----
    <dd>Wavelet
  filter used for
! encoding Intra pictures.&nbsp; Default value is DD9_7.
This field is
  of type <a
href="common_data_structs.htm#dirac_wlt_filter_t"&
gt;dirac_wlt_filter_t</a>.</dd>
    <dt><i>inter_wlt_filter</i>
</dt>
    <dd>Wavelet
  filter used for
! encoding Inter pictures.&nbsp; Default value is
LEGALL5_3. This field is
  of type <span style="text-decoration:
underline;"><a
  
href="common_data_structs.htm#dirac_wlt_filter_t"&
gt;dirac_wlt_filter_t</a>.</dd>
***************
*** 322,329 ****
  If set to to a non-zero value, the
  subband is divided into coeff blocks before entropy coding
is performed.</dd>
!   <dt><span style="font-style:
italic;">denoise</span></dt>
!   <dd>Input denoising flag.
! If set to to a non-zero value, the
! input is denoised before coding.</dd>
    <dt><span style="font-style:
italic;">multi_quants</span></dt>
    <dd>Multiple quantisers flag. If
--- 348,356 ----
  If set to to a non-zero value, the
  subband is divided into coeff blocks before entropy coding
is performed.</dd>
!   <dt><span style="font-style:
italic;">prefilter</span></dt>
!   <dd>Prefilter type.
! Type of prefiltering to apply to input picture before
encoding.</dd>
!   <dt><span style="font-style:
italic;">prefilter_strength</span></dt>
!   <dd>Prefilter strength. Valid range is
0-10.</dd>
    <dt><span style="font-style:
italic;">multi_quants</span></dt>
    <dd>Multiple quantisers flag. If
***************
*** 424,428 ****
  libdirac_encoder/dirac_encoder.h</span><br>
  <br>
! This structure holds the encoded frame data.&nbsp; It
must be
  initialised and managed by the user.<br>
  <pre><span
--- 451,455 ----
  libdirac_encoder/dirac_encoder.h</span><br>
  <br>
! This structure holds the encoded picture data.&nbsp;
It must be
  initialised and managed by the user.<br>
  <pre><span
***************
*** 441,447 ****
    <dt><i>buf</i> </dt>
    <dd>A buffer to hold the encoded
! frame. It must be initialised and by
  the user before every call to the encoding
functions.&nbsp; Upon
! successful completion of encoding a frame, the encoder
copies the
  encoded output to this buffer.<br>
    </dd>
--- 468,474 ----
    <dt><i>buf</i> </dt>
    <dd>A buffer to hold the encoded
! picture. It must be initialised and by
  the user before every call to the encoding
functions.&nbsp; Upon
! successful completion of encoding a picture, the encoder
copies the
  encoded output to this buffer.<br>
    </dd>
***************
*** 450,457 ****
    <dd>The user should initialise
  this field to the size of the buffer,
! in bytes, used to receive the encoded data. If the encoded
frame size
  is greater than the value of this field, the encoding
functions will
! return an error. Upon successful encoding of a frame, the
encoder sets
! this field to the actual size, in bytes, of the encoded
frame.<br>
    </dd>
  </dl>
--- 477,484 ----
    <dd>The user should initialise
  this field to the size of the buffer,
! in bytes, used to receive the encoded data. If the encoded
picture size
  is greater than the value of this field, the encoding
functions will
! return an error. Upon successful encoding of a picture,
the encoder sets
! this field to the actual size, in bytes, of the encoded
picture.<br>
    </dd>
  </dl>
***************
*** 459,471 ****
   src="images/arrow_up.gif">top</a>
  <br>
! <h2><a
name="dirac_enc_framestats_t">dirac_enc_framest
ats_t</a></h2>
  <span style="font-style:
italic;">Declared
  in
  libdirac_encoder/dirac_encoder.h</span><br>
  <br>
! This structure holds data about the frame encoded that
might be of
! interest to the user, e.g. size of encoded frame, etc. The
encoder
  manages this field. This field is set up by the encoder
after the
! successfully encoding a frame. <br>
  <pre><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;">typedef
struct</span><br
--- 486,498 ----
   src="images/arrow_up.gif">top</a>
  <br>
! <h2><a
name="dirac_enc_picstats_t">dirac_enc_picstats_
t</a></h2>
  <span style="font-style:
italic;">Declared
  in
  libdirac_encoder/dirac_encoder.h</span><br>
  <br>
! This structure holds data about the picture encoded that
might be of
! interest to the user, e.g. size of encoded picture, etc.
The encoder
  manages this field. This field is set up by the encoder
after the
! successfully encoding a picture. <br>
  <pre><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;">typedef
struct</span><br
***************
*** 482,491 ****
   style="font-weight: bold; font-family: courier
new,courier,monospace;">   unsigned int
vcomp_bits;<br></span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"> </span><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">   unsigned int
frame_bits;</span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">}
dirac_enc_framestats_t;</span><br></span>&
lt;/span></span></pre>
  <h3>Structure members<br>
  </h3>
--- 509,518 ----
   style="font-weight: bold; font-family: courier
new,courier,monospace;">   unsigned int
vcomp_bits;<br></span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"> </span><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">   unsigned int
pic_bits;</span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">}
dirac_enc_picstats_t;</span><br></span><
;/span></span></pre>
  <h3>Structure members<br>
  </h3>
***************
*** 495,499 ****
    <dd>Number of bits used to
  encode motion estimation information. This
! field is set to 0 for intra coded frames.<br>
    </dd>
    <dt><span style="font-style:
italic;">ycomp_bits</span><br>
--- 522,526 ----
    <dd>Number of bits used to
  encode motion estimation information. This
! field is set to 0 for intra coded pictures.<br>
    </dd>
    <dt><span style="font-style:
italic;">ycomp_bits</span><br>
***************
*** 501,505 ****
    <dd>Number of bits used to
  encode the luma (Y) component of the input
! frame. <br>
    </dd>
    <dt><span style="font-style:
italic;">ucomp_bits</span><br>
--- 528,532 ----
    <dd>Number of bits used to
  encode the luma (Y) component of the input
! picture. <br>
    </dd>
    <dt><span style="font-style:
italic;">ucomp_bits</span><br>
***************
*** 507,511 ****
    <dd>Number of bits used to
  encode the U chroma component of the input
! frame.<br>
    </dd>
    <dt><span style="font-style:
italic;">vcomp_bits</span><br>
--- 534,538 ----
    <dd>Number of bits used to
  encode the U chroma component of the input
! picture.<br>
    </dd>
    <dt><span style="font-style:
italic;">vcomp_bits</span><br>
***************
*** 513,522 ****
    <dd>Number of bits used to
  encode the V chroma component of the input
! frame.<br>
    </dd>
!   <dt><span style="font-style:
italic;">frame_bits</span><br>
    </dt>
    <dd>Number of bits used to
! encode the the entire frame.<br>
    </dd>
    <dd><br>
--- 540,549 ----
    <dd>Number of bits used to
  encode the V chroma component of the input
! picture.<br>
    </dd>
!   <dt><span style="font-style:
italic;">pic_bits</span><br>
    </dt>
    <dd>Number of bits used to
! encode the the entire picture.<br>
    </dd>
    <dd><br>
***************
*** 540,559 ****
   style="font-weight: bold; font-family: courier
new,courier,monospace;">{</span><br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">    unsigned int
mv_bits;</span><br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">    unsigned int
seq_bits;<br></span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"> </span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">   unsigned int
ycomp_bits;<br> </span><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">   unsigned int
ucomp_bits;<br></span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">    unsigned int
vcomp_bits;<br></span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;">    </span><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">unsigned int
bit_rate;</span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">}
dirac_enc_framestats_t;</span><br></span>&
lt;/span></span></span></span></pre&
gt;
  <h3>Structure members<br>
  </h3>
--- 567,586 ----
   style="font-weight: bold; font-family: courier
new,courier,monospace;">{</span><br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">    int64_t
mv_bits;</span><br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">    int64_t
seq_bits;<br></span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"> </span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">   int64_t
ycomp_bits;<br> </span><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">   int64_t
ucomp_bits;<br></span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">    int64_t
vcomp_bits;<br></span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;">    </span><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">int64_t
bit_rate;</span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">}
dirac_enc_picstats_t;</span><br></span><
;/span></span></span></span></pre>
;
  <h3>Structure members<br>
  </h3>
***************
*** 563,567 ****
    <dd>Number of bits used to
  encode motion estimation information for
! the entire sequence. This field is set to 0 if I_frame
only encoding is
  used for the sequence.<br>
    </dd>
--- 590,594 ----
    <dd>Number of bits used to
  encode motion estimation information for
! the entire sequence. This field is set to 0 if
INTRA_PICTURE only encoding is
  used for the sequence.<br>
    </dd>
***************
*** 675,679 ****
  The field is managed by the encoder. The encoder copies
the motion
  estimation and mode decision information into this field
after
! successfully encoding a frame of data. This information
can be used by
  the end user to visualise the decisions taken by the
encoder while
  encoding. <br>
--- 702,706 ----
  The field is managed by the encoder. The encoder copies
the motion
  estimation and mode decision information into this field
after
! successfully encoding a picture of data. This information
can be used by
  the end user to visualise the decisions taken by the
encoder while
  encoding. <br>
***************
*** 683,687 ****
   style="font-weight: bold; font-family: courier
new,courier,monospace;">{</span><br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">    dirac_frame_type_t
ftype;<br>    int fnum;<br>    int
num_refs;<br>    int refs[2];<br>    int
xbsep;<br>    int ybsep;<br>    int
mb_xlen;<br>    int mb_ylen;<br>    int
mv_xlen;<br>    int mv_ylen;<br>    int
*mb_split_mode;<br>    float *mb_costs;<br>   
int *pred_mode;<br>    float *intra_costs;<br>  
 dirac_mv_cost_t *bipred_costs;<br>    short
*dc_ycomp;<br>    short *dc_ucomp;<br>    short
*dc_vcomp;<br>    dirac_mv_t *mv[2];<br>   
dirac_mv_cost_t *pred_costs[2];<br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"></span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
--- 710,714 ----
   style="font-weight: bold; font-family: courier
new,courier,monospace;">{</span><br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">    dirac_picture_type_t
ptype;<br>    dirac_reference_type_t rtype;<br> 
  int pnum;<br>    int num_refs;<br>    int
refs[2];<br>    int xbsep;<br>    int
ybsep;<br>    int mb_xlen;<br>    int
mb_ylen;<br>    int mv_xlen;<br>    int
mv_ylen;<br>    int *mb_split_mode;<br>    float
*mb_costs;<br>    int *pred_mode;<br>    float
*intra_costs;<br>    dirac_mv_cost_t
*bipred_costs;<br>    short *dc_ycomp;<br>   
short *dc_ucomp;<br>    short *dc_vcomp;<br>   
dirac_mv_t *mv[2];<br>    dirac_mv_cost_t
*pred_costs[2];<br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"></span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
***************
*** 690,720 ****
  </h3>
  <dl>
!   <dt><span style="font-style:
italic;">ftype</span><br>
    </dt>
!   <dd>Encoded frame type i.e intra
! coded (I_frame) or inter coded
! (L1_frame, or L2_frame). This field is of type <a
! 
href="common_data_structs.htm#dirac_frame_type_t"&
gt;dirac_frame_type_t.</a><br>
    </dd>
!   <dt><span style="font-style:
italic;">fnum</span><br>
    </dt>
!   <dd>Frame number of the frame in
  display order. Since the coded order
  can be different from the display order, this number does
not reflect
! the temporal position of the frame in the coded bitstream,
but the
  temporal display order.</dd>
    <dt><span style="font-style:
italic;">num_refs</span><br>
    </dt>
    <dd>Number of previously encoded
! frames used to encoded this frame.
  It ranges from 0 to 2. This
! field is set to 0 for intra coded frames. <br>
    </dd>
    <dt><span style="font-style:
italic;">refs</span><br>
    </dt>
!   <dd>Array holding the frame
  numbers (in display order) of the
! reference frames used to encode the current frame. This
field is not
! set for intra coded frames.<br>
    </dd>
    <dt><span style="font-style:
italic;">xbsep</span><br>
--- 717,752 ----
  </h3>
  <dl>
!   <dt><span style="font-style:
italic;">ptype</span><br>
    </dt>
!   <dd>Encoded picture type i.e intra
! coded (INTRA_PICTURE) or inter coded (INTER_PICTURE). This
field is of type <a
! 
href="common_data_structs.htm#dirac_picture_type_t"
;>dirac_picture_type_t.</a><br>
    </dd>
!   <dt><span style="font-style:
italic;">rtype</span><br>
    </dt>
!   <dd>Specifies if the picture is used as a
reference for predicted pictures or
! not. This field is of type <a
! 
href="common_data_structs.htm#dirac_reference_type_t&qu
ot;>dirac_reference_type_t.</a><br>
!   </dd>
!   <dt><span style="font-style:
italic;">pnum</span><br>
!   </dt>
!   <dd>Picture number of the picture in
  display order. Since the coded order
  can be different from the display order, this number does
not reflect
! the temporal position of the picture in the coded
bitstream, but the
  temporal display order.</dd>
    <dt><span style="font-style:
italic;">num_refs</span><br>
    </dt>
    <dd>Number of previously encoded
! pictures used to encoded this picture.
  It ranges from 0 to 2. This
! field is set to 0 for intra coded pictures. <br>
    </dd>
    <dt><span style="font-style:
italic;">refs</span><br>
    </dt>
!   <dd>Array holding the picture
  numbers (in display order) of the
! reference pictures used to encode the current picture.
This field is not
! set for intra coded pictures.<br>
    </dd>
    <dt><span style="font-style:
italic;">xbsep</span><br>
***************
*** 722,766 ****
    <dd>Horizontal separation
  between blocks. This field is not set for
! intra coded frames.</dd>
    <dt><span style="font-style:
italic;">ybsep</span><br>
    </dt>
    <dd>Vertical separation between
  blocks. This field is not set for
! intra coded frames.</dd>
    <dt><span style="font-style:
italic;">mb_xblen</span><br>
    </dt>
    <dd>Width of the macro-block.
  This field is not set for intra coded
! frames.</dd>
    <dt><span style="font-style:
italic;">mb_yblen</span><br>
    </dt>
    <dd>Height of the macro-block.
  This field is not set for intra coded
! frames.</dd>
    <dt><span style="font-style:
italic;">mv_xblen</span><br>
    </dt>
    <dd>Motion vector array length
  in x direction. This field is not set
! for intra coded frames. </dd>
    <dt><span style="font-style:
italic;">mv_yblen</span><br>
    </dt>
    <dd>Motion vector array length
  in y direction. This field is not set
! for intra coded frames.</dd>
    <dt><span style="font-style:
italic;">mb_split_mode</span><br>
    </dt>
    <dd>Array holding macro-block
  split level decisions. The size of the
! array is mb_xlen*mb_ylen. This field is not set for intra
coded frames.</dd>
    <dt><span style="font-style:
italic;">mb_costs</span><br>
    </dt>
    <dd>Array holding macro-block
  cost parameters. The size of the array
! is mb_xlen*mb_ylen. This field is not set for intra coded
frames.</dd>
    <dt><span style="font-style:
italic;">pred_mode</span><br>
    </dt>
    <dd>Array holding block
  prediction mode. The size of the array is
! mv_xlen*mv_ylen. This field is not set for intra coded
frames.</dd>
    <dt><span style="font-style:
italic;">intra_costs</span><br>
    </dt>
--- 754,798 ----
    <dd>Horizontal separation
  between blocks. This field is not set for
! intra coded pictures.</dd>
    <dt><span style="font-style:
italic;">ybsep</span><br>
    </dt>
    <dd>Vertical separation between
  blocks. This field is not set for
! intra coded pictures.</dd>
    <dt><span style="font-style:
italic;">mb_xblen</span><br>
    </dt>
    <dd>Width of the macro-block.
  This field is not set for intra coded
! pictures.</dd>
    <dt><span style="font-style:
italic;">mb_yblen</span><br>
    </dt>
    <dd>Height of the macro-block.
  This field is not set for intra coded
! pictures.</dd>
    <dt><span style="font-style:
italic;">mv_xblen</span><br>
    </dt>
    <dd>Motion vector array length
  in x direction. This field is not set
! for intra coded pictures. </dd>
    <dt><span style="font-style:
italic;">mv_yblen</span><br>
    </dt>
    <dd>Motion vector array length
  in y direction. This field is not set
! for intra coded pictures.</dd>
    <dt><span style="font-style:
italic;">mb_split_mode</span><br>
    </dt>
    <dd>Array holding macro-block
  split level decisions. The size of the
! array is mb_xlen*mb_ylen. This field is not set for intra
coded pictures.</dd>
    <dt><span style="font-style:
italic;">mb_costs</span><br>
    </dt>
    <dd>Array holding macro-block
  cost parameters. The size of the array
! is mb_xlen*mb_ylen. This field is not set for intra coded
pictures.</dd>
    <dt><span style="font-style:
italic;">pred_mode</span><br>
    </dt>
    <dd>Array holding block
  prediction mode. The size of the array is
! mv_xlen*mv_ylen. This field is not set for intra coded
pictures.</dd>
    <dt><span style="font-style:
italic;">intra_costs</span><br>
    </dt>
***************
*** 768,772 ****
  predicting each block in intra mode.
  The size of the array is mv_xlen*mv_ylen. This field is
not set for
! intra coded frames.</dd>
    <dt><span style="font-style:
italic;">bipred_costs</span><br>
    </dt>
--- 800,804 ----
  predicting each block in intra mode.
  The size of the array is mv_xlen*mv_ylen. This field is
not set for
! intra coded pictures.</dd>
    <dt><span style="font-style:
italic;">bipred_costs</span><br>
    </dt>
***************
*** 776,780 ****
  
href="#dirac_mv_cost_t">dirac_mv_cost_t</a&g
t;.
  The size of the
! array is mv_xlen*mv_ylen. This field is not set for intra
coded frames.</dd>
    <dt><span style="font-style:
italic;">dc_ycomp</span><br>
    </dt>
--- 808,812 ----
  
href="#dirac_mv_cost_t">dirac_mv_cost_t</a&g
t;.
  The size of the
! array is mv_xlen*mv_ylen. This field is not set for intra
coded pictures.</dd>
    <dt><span style="font-style:
italic;">dc_ycomp</span><br>
    </dt>
***************
*** 782,786 ****
  the Luma (Y) component. The size of
  the array is mv_xlen*mv_ylen. This field is not set for
intra coded
! frames.</dd>
    <dt><span style="font-style:
italic;">dc_ucomp</span><br>
    </dt>
--- 814,818 ----
  the Luma (Y) component. The size of
  the array is mv_xlen*mv_ylen. This field is not set for
intra coded
! pictures.</dd>
    <dt><span style="font-style:
italic;">dc_ucomp</span><br>
    </dt>
***************
*** 788,792 ****
  the U Chroma Component. The size of
  the array is mv_xlen*mv_ylen. This field is not set for
intra coded
! frames.</dd>
    <dt><span style="font-style:
italic;">dc_vcomp</span><br>
    </dt>
--- 820,824 ----
  the U Chroma Component. The size of
  the array is mv_xlen*mv_ylen. This field is not set for
intra coded
! pictures.</dd>
    <dt><span style="font-style:
italic;">dc_vcomp</span><br>
    </dt>
***************
*** 794,817 ****
  the V Chroma component. The size of
  the array is mv_xlen*mv_ylen. This field is not set for
intra coded
! frames.</dd>
    <dt><span style="font-style:
italic;">mv</span><br>
    </dt>
    <dd>Array holding motion vectors
! arrays of the current frame for each
! reference frame(s) from which it was predicted. Each
element in this
  array is an array of elements of type&nbsp; <a
href="#dirac_mv_t">dirac_mv_t</a>
  and the size of each
  motion vector array is mv_xlen*mv_ylen. This field is not
set for intra
! coded frames.</dd>
    <dt><span style="font-style:
italic;">pred_costs</span><br>
    </dt>
    <dd>Array holding prediction
! cost arrays of the current frame for
! each reference frame(s) from which it was predicted. Each
element
  in this array is an array of elements of type&nbsp;
<a
  
href="#dirac_mv_cost_t">dirac_mv_cost_t</a&g
t;
  and the size of
  each prediction cost array is mv_xlen*mv_ylen. This field
is not set
! for intra coded frames.</dd>
  </dl>
  <a
href="encoder_data_structs.htm#top"><img
--- 826,849 ----
  the V Chroma component. The size of
  the array is mv_xlen*mv_ylen. This field is not set for
intra coded
! pictures.</dd>
    <dt><span style="font-style:
italic;">mv</span><br>
    </dt>
    <dd>Array holding motion vectors
! arrays of the current picture for each
! reference picture(s) from which it was predicted. Each
element in this
  array is an array of elements of type&nbsp; <a
href="#dirac_mv_t">dirac_mv_t</a>
  and the size of each
  motion vector array is mv_xlen*mv_ylen. This field is not
set for intra
! coded pictures.</dd>
    <dt><span style="font-style:
italic;">pred_costs</span><br>
    </dt>
    <dd>Array holding prediction
! cost arrays of the current picture for
! each reference picture(s) from which it was predicted.
Each element
  in this array is an array of elements of type&nbsp;
<a
  
href="#dirac_mv_cost_t">dirac_mv_cost_t</a&g
t;
  and the size of
  each prediction cost array is mv_xlen*mv_ylen. This field
is not set
! for intra coded pictures.</dd>
  </dl>
  <a
href="encoder_data_structs.htm#top"><img
***************
*** 836,840 ****
   style="font-weight: bold; font-family: courier
new,courier,monospace;">{</span><br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">    dirac_encoder_context_t
enc_ctx;<br>    int encoded_frame_avail;<br>   
dirac_enc_data_t enc_buf;<br>    dirac_frameparams_t
enc_fparams;<br>    dirac_enc_framestats_t
enc_fstats;<br>    dirac_enc_seqstats_t
enc_seqstats;<br>    int end_of_sequence;<br>   
int decoded_frame_avail;<br>    dirac_framebuf_t
dec_buf;<br>    dirac_frameparams_t
dec_fparams;<br>    dirac_instr_t instr;<br>   
int instr_data_avail;<br>    const void
*compressor;<br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"></span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
--- 868,872 ----
   style="font-weight: bold; font-family: courier
new,courier,monospace;">{</span><br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
!  style="font-weight: bold; font-family: courier
new,courier,monospace;">    dirac_encoder_context_t
enc_ctx;<br>    int encoded_picture_avail;<br>  
 dirac_enc_data_t enc_buf;<br>    dirac_picparams_t
enc_pparams;<br>    dirac_enc_picstats_t
enc_pstats;<br>    dirac_enc_seqstats_t
enc_seqstats;<br>    int end_of_sequence;<br>   
int decoded_frame_avail;<br>    dirac_framebuf_t
dec_buf;<br>    dirac_picparams_t
dec_pparams;<br>    dirac_instr_t instr;<br>   
int instr_data_avail;<br>    const void
*compressor;<br
   style="font-weight: bold; font-family: courier
new,courier,monospace;"></span><span
   style="font-weight: bold; font-family: courier
new,courier,monospace;"><span
***************
*** 849,856 ****
  
href="encoder_api_functions.htm#dirac_encoder_init"
;>dirac_encoder_init</a>.<br>
    </dd>
!   <dt><span style="font-style:
italic;">encoded_frame_avail</span><br>
    </dt>
    <dd>This flag is set when an
! encoded frame is available in the
  encoder buffer enc_buf.<br>
    </dd>
--- 881,888 ----
  
href="encoder_api_functions.htm#dirac_encoder_init"
;>dirac_encoder_init</a>.<br>
    </dd>
!   <dt><span style="font-style:
italic;">encoded_picture_avail</span><br>
;
    </dt>
    <dd>This flag is set when an
! encoded picture is available in the
  encoder buffer enc_buf.<br>
    </dd>
***************
*** 858,862 ****
    </dt>
    <dd>Buffer to hold an encoded
! frame. This field is of type <a
href="#dirac_enc_data_t">dirac_enc_data_t</a
>.
  This buffer must
  be initialised by the user before calling the encode
function <a
--- 890,894 ----
    </dt>
    <dd>Buffer to hold an encoded
! picture. This field is of type <a
href="#dirac_enc_data_t">dirac_enc_data_t</a
>.
  This buffer must
  be initialised by the user before calling the encode
function <a
***************
*** 864,883 ****
      <br>
    </dd>
!   <dt><span style="font-style:
italic;">enc_fparams</span><br>
    </dt>
!   <dd>Parameters of the frame just
  encoded . The encoder sets this
! field after successfully encoding a frame. This field is
of type <a
! 
href="common_data_structs.htm#dirac_frameparams_t"
>dirac_frameparams_t</a>.
! The end user must check to see if the encoded_frame_avail
flag is set
  before using this field.</dd>
!   <dt><span style="font-style:
italic;">enc_fstats</span><br>
    </dt>
    <dd>Information related to the
! frame just encoded . The encoder
  manages this field. This field is of type <a
! 
href="#dirac_enc_framestats_t">dirac_enc_frames
tats_t</a>.
  The encoder
! sets this field after successfully encoding a
frame.<br>
    </dd>
    <dt><span style="font-style:
italic;">enc_seqstats</span><br>
--- 896,915 ----
      <br>
    </dd>
!   <dt><span style="font-style:
italic;">enc_pparams</span><br>
    </dt>
!   <dd>Parameters of the picture just
  encoded . The encoder sets this
! field after successfully encoding a picture. This field is
of type <a
! 
href="common_data_structs.htm#dirac_picparams_t"&g
t;dirac_picparams_t</a>.
! The end user must check to see if the
encoded_picture_avail flag is set
  before using this field.</dd>
!   <dt><span style="font-style:
italic;">enc_pstats</span><br>
    </dt>
    <dd>Information related to the
! picture just encoded . The encoder
  manages this field. This field is of type <a
! 
href="#dirac_enc_picstats_t">dirac_enc_picstats
_t</a>.
  The encoder
! sets this field after successfully encoding a
picture.<br>
    </dd>
    <dt><span style="font-style:
italic;">enc_seqstats</span><br>
***************
*** 909,917 ****
  decoded_frame_avail flag is set before using this
field.<br>
    </dd>
!   <dt><span style="font-style:
italic;">dec_fparams</span><br>
    </dt>
    <dd>Parameters of the locally
  decoded frame. This field is of type <a
! 
href="common_data_structs.htm#dirac_frameparams_t"
>dirac_frameparams_t</a>.
  It is set
  by the encoder.&nbsp; The end user must check to see
if the
--- 941,949 ----
  decoded_frame_avail flag is set before using this
field.<br>
    </dd>
!   <dt><span style="font-style:
italic;">dec_pparams</span><br>
    </dt>
    <dd>Parameters of the locally
  decoded frame. This field is of type <a
! 
href="common_data_structs.htm#dirac_picparams_t"&g
t;dirac_picparams_t</a>.
  It is set
  by the encoder.&nbsp; The end user must check to see
if the
***************
*** 925,929 ****
    </dt>
    <dd>Buffer to hold the
! instrumentation data associated with the frame
  just encoded. This field is of type <a
href="#dirac_instr_t">dirac_instr_t</a>.
  It is managed by the encoder.&nbsp; The end user must
check to see
--- 957,961 ----
    </dt>
    <dd>Buffer to hold the
! instrumentation data associated with the picture
  just encoded. This field is of type <a
href="#dirac_instr_t">dirac_instr_t</a>.
  It is managed by the encoder.&nbsp; The end user must
check to see

Index: software.htm
============================================================
=======
RCS file:
/cvsroot/dirac/compress/doc/documentation/code/programmers_g
uide/software.htm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** software.htm	22 Jan 2008 11:39:05 -0000	1.4
--- software.htm	9 May 2008 05:04:16 -0000	1.5
***************
*** 29,33 ****
  UNIX, MacOS X, Cygwin, MinGW</a></h2>
  Under these environments, Dirac has been successfully
compiled and
! tested with the GNU g++ compiler (version 3.4.x and 4.0.x,
4.1.x, 4.2.x)
  and Intel's C++
  compiler (icc version 8.0). Core Dirac libraries have no
dependencies
--- 29,33 ----
  UNIX, MacOS X, Cygwin, MinGW</a></h2>
  Under these environments, Dirac has been successfully
compiled and
! tested with the GNU g++ compiler (version 3.4.x and 4.0.x,
4.1.x, 4.2.x, 4.3.x)
  and Intel's C++
  compiler (icc version 8.0). Core Dirac libraries have no
dependencies
***************
*** 51,55 ****
  The last command must be executed with root privileges so
that the
  libraries and programs will copied to the appropriate
directories. By
! default, the libraries are copied to /usr/local/bin, the
header files
  to /usr/local/include/dirac and the utilities to
/usr/local/bin.<br>
  <br>
--- 51,55 ----
  The last command must be executed with root privileges so
that the
  libraries and programs will copied to the appropriate
directories. By
! default, the libraries are copied to /usr/local/lib, the
header files
  to /usr/local/include/dirac and the utilities to
/usr/local/bin.<br>
  <br>
***************
*** 97,112 ****
  <br>
  <h2><a name="msys">MS
! Windows 2000/XP, MSYS and Microsoft Visual C++
2005<br>
  </a></h2>
  In this environment, Dirac has been successfully compiled
and tested
  using MSYS version 1.0.10&nbsp; and the no-cost
Microsoft Visual
! C++ 2005 Express Edition.
  &nbsp;&nbsp; <br>
  <br>
  Download and install the no-cost Microsoft C++ compiler
from <a
!  href="http://msdn.microsoft.com/vstudio/exp
ress/visualc/">here</a>.
  Make
  sure that the PATH, INCLUDE and LIB environment variables
are set
! correctly to point to the MS&nbsp; VC++ 2005 Express
Edition.<br>
  <br>
  Download and install MSYS (the MinGW Minimal SYStem),
--- 97,112 ----
  <br>
  <h2><a name="msys">MS
! Windows 2000/XP, MSYS and Microsoft Visual C++
2008<br>
  </a></h2>
  In this environment, Dirac has been successfully compiled
and tested
  using MSYS version 1.0.10&nbsp; and the no-cost
Microsoft Visual
! C++ 2008 Express Edition.
  &nbsp;&nbsp; <br>
  <br>
  Download and install the no-cost Microsoft C++ compiler
from <a
!  href="