The invention relates to a method of issuing a bit stream organized in fields according to a certain format. The invention also relates to with a schema that generically describes such a bit stream format, and is to be used for implementing said method of issuing a bit stream. The invention also relates to a computer program that comprises instructions for implementing said method of issuing a bit stream. The invention further relates to a software comprising such a schema and such a computer program, and to a storage media for storing such software.
Bit streams usually have a compact binary aspect that is not human readable. The invention proposes a method for issuing a bit stream in a human-readable form. The invention is advantageously used for debugging software designed for reading/writing bit streams. For instance, it is advantageously used for validating software designed for encoding/decoding a bit stream (such software is generally called “codec”).
International patent application WO02/069187 filed by Koninklijke Philips Electronics N.V. and published on Sep. 06, 2002 discloses a schema that generically describes a bit stream format, and a method of syntactically analyzing a bit stream that is compliant with said format, by using said schema, so as to generate a structured description of the bit stream, said structured description being an instance of said schema. The application that is contemplated in this prior art is the adaptation of content.
The present invention is directed to another application of such a method of syntactically analyzing a bit stream.
The application that is contemplated in the present invention is issuing bit streams that are organized in fields according to a certain format, said fields having a value and semantics called field semantics.
A method of issuing a bit stream according to the invention is defined in claims 1 to 6 of the present patent application. A schema according to the invention is defined in claims 7 and 8. A computer program according to the invention is defined in claim 9, software according to the invention is defined in claim 10, and a storage medium according to the invention is defined in claim 11.
In the present invention, an enhanced schema is proposed. In addition to generically describing the bit stream format, the proposed enhanced schema includes components containing the field semantics of at least part of the fields defined in the bit stream format.
These components are used during the syntactical analysis of the bit stream so as to generate a structured description of the bit stream that comprises not only the value of the fields but also the field semantics.
Then a transformation is applied to the structured description for producing a document comprising at least the field semantics and an indication of the value of the field, for at least part of the fields of the bit stream. The function of this transformation is to format the information present in the structured description for presentation.
The document obtained is directly usable, for instance, by a developer for debugging purposes. In this document, readability of the bit stream is achieved by indicating the field semantics in association with the value of the field.
In an advantageous embodiment of the invention, when the bit stream format is such that the value of at least one field has semantics (called value semantics), the enhanced schema further includes a component containing a list of {value; value semantics} pairs for that field. During the syntactical analysis of the bit stream, comparing the value of the field in the bit stream with the list of values defined in the schema allows retrieving the associated value semantics. The retrieved value semantics are added to the structured description. Eventually, the document produced after transformation of the structured description comprises said value semantics.
Giving the value semantics in addition to (or instead of) the value itself increases the readability of the document for the user.
The method of issuing a bit stream according to the invention is advantageous because it is applicable to any bit stream format as far as the bit stream format is generically described in an available schema.
Another advantage of the proposed solution is that:
These and other aspects of the invention will be further described with reference to the following drawings:
The schema D2 describes the syntax of the bit stream, notably the type of data that may be contained in the bit stream and the manner in which these data are to be included in the structured document D4. It is not always necessary to give complete details of the structure of the bit stream format in the schema. The level of detail depends on the application considered. Consequently some of the fields defined in the bit stream format may not be detailed in the schema D2.
Advantageously, the schema D2 is of the type disclosed in the above-mentioned patent application which means that:
In a preferred embodiment, the schema D2 is written in a language that is derived from XML-schema. This derived language and the above-mentioned components of the schema D2 are fully described in International Patent Application WO02/069187.
Some of the elements mentioned at point b) above are associated with a field of the bit stream (the other elements describe the structure of the document D4).
According to the present invention, the schema D2 further comprises, for the elements mentioned at point b) above that are associated with a field of the bit stream, a component containing the field semantics for that particular field. For instance, the field semantics are added to the schema D2 by using the component “xsd:documentation” defined in XML-schema.
Advantageously, when the schema describes a field for which each possible value has specific associated semantics (called value semantics), the schema D2 also comprises a component containing a list of {value; semantics} pairs for that field. For instance, said list is added to the schema by using the component “xsd:appinfo” (“xsd:appinfo” is defined in XML-schema for holding application-specific information). The content of the “xsd:appinfo” component of a schema is not taken into account in the XML-schema validation process. This means that the information added in the “xsd:appinfo” components are ignored by XML-schema.
According to XML-schema, the components “xsd:documentation” and “xsd:appinfo” must also be enclosed in a component “xsd:annotation”.
It is also useful to define a specific hierarchy to be used by the transformation D5 for presenting the bit stream. This allows presenting the fields of a first hierarchical level in a first style, and the fields of a second hierarchical level in a second style (the hierarchical level referred to here is a presentation level; it does not necessarily correspond to the hierarchy of the field in the bit stream). XML-schema gives the possibility to define new attributes for specific schema components by qualifying them with a specific namespace. In an advantageous embodiment of the invention, a presentation level is added to the schema by using such an attribute. In the following description the attribute used to add this presentation level to the schema is named “bv:presLevel” (in the following description, the prefix “xsd” is used to refer to the XML-schema conventional namespace and the prefix “bv” is used to refer to extensions introduced by the present invention; in the Annex, the prefix “bsdl” refers to the extensions of the L-schema that were defined in International Patent Application WO02/069187).
Annex A gives an extract of a schema according to the invention that generically describes the JPEG 2000 bit stream format (JPEG 2000 is described in the document ISO/IEC FCD 15444-1 “JPEG 2000 Final Draft International Standard”). The components that are added to the schema according to the invention are written in bold letters.
For instance, it can be seen from Annex A that the field “SIZ” has to be presented by applying a presentation level “1”. It can also be seen that the field semantics of the field “Rsiz” are “Decoder capabilities”, and that the field “Rsiz” may have different values. The value semantics of the value “0” are “Capabilities specified in this Recommendation|International Standard only” (ie. when the field “Rsiz” takes value “0”, this means that the decoder capabilities are specified in the recommendation/International Standard only). The value semantics of any other value (referred to by “default” in the schema) are “reserved”.
The syntactical analyzer D3 uses the schema D2 to parse the bit stream D1 and generate a structured description D4 of the bit stream D1. The structured description D4 comprises a plurality of elements each associated with a field of the bit stream. The value of each element is calculated from the associated binary representation in the bit stream D1 and the associated data type in the schema D2 (which means that the value contained in the structured description is formatted according to the data type definition given in the schema). This process is fully described in International Patent Application WO02/069187.
According to the present invention, the syntactical analyzer D3 further adds one or more attributes to the elements of the structured description D4.
In the simplest embodiment of the invention, the syntactical analyzer D3 adds an attribute containing the field semantics contained in the “xsd:documentation” component described above. In the following description, this attribute is named “bv:fieldSemantics”.
In more sophisticated embodiments of the invention, the syntactical analyzer D3 also adds one or more of the following attributes:
Annex B gives an extract of an example of a structured description obtained according to the invention from a JPEG 2000 input bit stream. In Annex B the added attributes are presented in bold letters.
According to the invention, a transformation D5 is applied to the structured description D4 generated by the syntactical analyzer D3. The object of the transformation D5 is to produce a document D6 in an easily readable format (the transformation D6 does not modify the information contained in the structured description. It only formats said information for presentation purposes. In particular when the structured description D4 contains presentation level information, the transformation uses this information when generating the document D6.
Advantageously, the transformation D5 is defined in an XSLT style sheet. XSLT is a tool of XML that allows defining transformations to be applied to XML documents. In an XSLT transformation, an XSLT processor reads an XML document and an XSLT style sheet so as to generate a transformed document. In
Advantageously in the invention the transformed document D6 is written in the HTML or XHTML language.
Annex C gives an example of a style sheet to be applied to the structured description of Annex B. Annex D gives an example of an XHTML document that is generated by applying the style sheet of Annex C to the structured description of Annex B.
It can be seen from Annex D that the field “Main header” (having a presentation level “2” in the structured description of Annex B) is presented with a first presentation style, the fields “SOC” and “SIZ” (both having a presentation level “1” in Annex B) are presented with a second presentation style, and the other fields (no presentation level defined in Annex B) are presented with a third presentation style.
It can also be seen that the value semantics for the field “Rsiz” takes the place of the value recovered from the bit stream.
A plurality of memories can be used for storing the above-mentioned data (bit stream D1, schema D2) and programs (program G1 implementing the syntactical analyzer D3 and program G2 implementing the transformation D5).
One or more schema can be stored on a removable storage medium (for instance on an optical disc) together with the programs G1 and G2 so as to allow implementation of the method of the invention on any work station comprising a reader for reading such an optical disc.
With respect to the described method, schema, programs and storage medium, modifications or improvements may be proposed without departing from the scope of the invention. The invention is thus not limited to the examples provided.
In particular, the invention is not restricted to the languages used in the above description (XML, XML-schema, HTML, XHTML, XSLT). The invention can be implemented by using other languages, for instance languages of the DSD type (Document Structure Description, proposed by AT&T and BRICS from the university of Aarhus in Denmark, available on the Internet at http://www.brics.dk/DSD).
The invention is neither restricted to any particular bit stream format. It is applicable to any format as far as this format can be described in a schema of the type disclosed in the present patent application.
The invention has been described by reference to International Patent Application WO02/069187. However, the invention is not limited to the type of schema described in this prior-art document. It applies to any schema that generically describes the format of a bit stream.
Use of the verb “comprise” and its conjugations does not exclude the presence of elements or steps other than those stated in the claims. Use of the article “a” or “an” preceding an element or step does not exclude the presence of a plurality of such an element or step.
Number | Date | Country | Kind |
---|---|---|---|
03290407.0 | Feb 2003 | EP | regional |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/IB04/00324 | 2/3/2004 | WO | 8/16/2005 |