BIFS/OD Encoder
===============

Release 1.1.

/***********************************************************************
This software module was originally developed by Zvi Lifshitz
(VDOnet Corp.) in the course of development of the MPEG-4 Systems
(ISO/IEC 14496-1) standard. This software module is an implementation of
a part of one or more MPEG-4 Systems (ISO/IEC 14496-1) tools as
specified by the MPEG-4 Systems (ISO/IEC 14496-1) standard. ISO/IEC
gives users of the MPEG-4 Systems (ISO/IEC 14496-1) free license to
this software module or modifications thereof for use in hardware or
software products claiming conformance to the MPEG-4 Systems (ISO/IEC
14496-1). Those intending to use this software module in hardware or
software products are advised that its use may infringe existing patents.
The original developer of this software module and his/her company, the
subsequent editors and their companies, and ISO/IEC have no liability
for use of this software module or modifications thereof in an
implementation. Copyright is not released for non MPEG-4 Systems
(ISO/IEC 14496-1) conforming products. VDOnet Corp. retains full right
to use the code for his/her own purpose, assign or donate the code to a
third party and to inhibit third parties from using the code for non
MPEG-4 Systems (ISO/IEC 14496-1) conforming products. This copyright
notice must be included in all copies or derivative works.
Copyright  1998.
************************************************************************

For more information or to receive an up to date version fo this module,
you may call Zvi Lifshitz at zvil@vdo.net or zvil@compuserve.com.
----------------------------------------------------------------------*/


1.  General
============

This application reads a textual description of a scene, scene updates
and ObjectDescriptor commands, and produces two binary files - a BIFS
file and an OD stream.


2.  Command Arguments
=====================

This is a console application, which receives one argument - the file
name. The default extension is .txt. The application produces two files.
Both have the same name as the input file, one with the extension .bif,
the other with the extension .od. In addition, a text file with same name
and the extension .lst is produced. This file lists all the input lines,
each followed by error descriptions, if any, and a textual description
of the binary encoding.


3.  Input File Syntax
=====================

The input text file uses free syntax format. Tabs and line-breaks are
considered white space characters.
consists of one or more Update-Frames. An 
Update-Frame has the following format:

AT time_in_milliseconds {
	one or more Update-Commands
}

or

AT time_in_milliseconds Update-Command

The square brackets around AT 


includes the following parts, in the specified
order:

1.	Scene description without routes (required)
2.	Routes description (optional)
3.	SessionStreamAssociation definition (optional)
4.	Update frames (optional)


3.1  Scene Description
----------------------

The textual description of the scene is similar to the textual VRML
format. Free syntax is used. Line breaks and tab stops are considerred
white spaces.

The scene is described as one root node and its fields. Only one root
node is allowed, which may, of course, contain sub-nodes.

Node description syntax is as following:

DEF <user-defined-name> <node-name> {field1 field2 ...}
\---------------------/
       optional

The field description syntax is:

<field-name> <field-value>

The field value syntax can be one of the following:

For a scalar numerical field:	value
For a vector numerical field:	value-0 value-1 ...
For an SFBool field:			TRUE or FALSE
For an SFString field:			any text with or without double quotes.
								If the text contains spaces it must be
								quoted.
For an SFNode field:			A node descripton
For an MField					[value-1, value-2, ...]

A special case of an SFString field is the buffer field of a Conditional
node. In this case, the value of the field is given as following:

{ update-command-1  update-command-2 ...}


3.2  Routes Description
-----------------------

The routes description part may contain any number of route descriptions.
A single route description has the following syntax:

ROUTE DEF <user-defined-name>
      \---------------------/
             optional

<from-node-name>.<from-field-name> TO <to-node-name>.<to-field-name>

Please note the that ROUTE keyword must precede the DEF keyboard. This
is different than VRML.


3.3  SessionStreamAssociation Definion
--------------------------------------

This part associates nodes with ObjectDescriptiors. The same syntax as
a node description is used, when the described "node" is
SessionStreamAssociation.

SessionStreamAssociation is defined as following:

SessionStreamAssociation {
    field    MFNode    children
}

The child "nodes" are of type ObjectDescriptor. This is defined as
following:

ObjectDescriptor {
	field    SFInt        objectDescriptorID
	field    SFString	  decTypeString
	field    SFInt        configParam
}

The value of configParam is the code of the proper predefined
ALConfigParam. See the Mux application for details.


3.4  Update Frames
--------------------

Update frames have the following format:

AT [time in milliseconds] {
	one or more update commands
}

When an update command is one of the following:

INSERT AT <NodeName>.<FieldName> [i] <value>
APPEND TO <NodeName>.<FieldName> <value>
INSERT ROUTE <NodeName>.<FieldName> TO <NodeName>.<FieldName>
DELETE <NodeName>
DELETE ROUTE <RouteName>
DELETE <NodeName>.<FieldName> [i]
DELETE LAST <NodeName>.<FieldName>
REPLACE <NodeName> BY <NodeDefinition>
REPLACE <NodeName>.<FieldName> BY <value>
REPLACE <NodeName>.<FieldName> [i] BY <value>
REPLACE LAST <NodeName>.<FieldName> BY <value>
REPLACE ROUTE <RouteName> BY <RouteDefinition>
REPLACE SCENE BY <SceneDefinition>


3.5  Comments
-------------

The input file may contain comments. Any text follwing the symbol # or //
till the end of the line is considered a comment and ignored.


4.  Examples
============

See BifsUpdateExample.txt and ConditionalExample.txt is this directory.


5.  Building the applications
=============================

BifsEnc.mak is the VC++ (4.2) make file which builds this application.
To build the application, you will also need some of the files of the
Core directory.

If you choose to create your own make file (or if you use another 
platform), you must globaly #define the preprocessor variable BIFSENC.

