ISO/IEC 9637-2:1992 情報技術—コンピュータグラフィックス—グラフィカルデバイス(CGI)との対話のためのインターフェース技術—データストリームバインディング—パート2:バイナリエンコーディング | ページ 2

※一部、英文及び仏文を自動翻訳した日本語訳を使用しています。

序文

ISO (国際標準化機構) と IEC (国際電気標準会議) は、世界標準化のための専門システムを形成しています。 ISO または IEC のメンバーである国家機関は、技術活動の特定の分野を扱うために、それぞれの組織によって設立された技術委員会を通じて、国際規格の開発に参加しています。 ISO と IEC の技術委員会は、相互に関心のある分野で協力しています。 ISO および IEC と連携して、政府および非政府の他の国際機関もこの作業に参加しています。

情報技術の分野では、ISO と IEC は合同技術委員会 ISO/IEC JTC 1 を設立しました。合同技術委員会によって採択された国際規格の草案は、投票のために各国の機関に回覧されます。国際規格として発行するには、投票を行う国の機関の少なくとも 75% による承認が必要です。

国際規格 ISO/IEC 9637-2 は、合同技術委員会 ISO/IEC JTC1, 情報技術によって作成されました。

ISO/IEC 9637 は、一般的なタイトルである情報技術 — コンピュータ グラフィックス — グラフィカル デバイス (CGI) との対話のためのインターフェイス技術 — データ ストリーム バインディングの下に、次の部分で構成されています。

  • Part 1: 文字エンコーディング
  • Part 2: バイナリ エンコーディング

附属書 A は、ISO/IEC 9637 のこの部分の不可欠な部分を形成します。附属書 B は情報提供のみを目的としています。

序章

目的

コンピューター グラフィックス インターフェイス (CGI) のバイナリ エンコーディング (ISO/IEC 9636) は、生成と解釈の速度を最適化できる CGI 関数構文のデータ ストリーム表現を提供すると同時に、コンピューター システム間の交換の標準的な手段を提供します。エンコーディングでは、他のエンコーディングのデータ形式よりも、コンピュータ システム内で使用されるデータ表現に類似したバイナリ データ形式が使用されます。

一部のデータ形式は、一部のコンピューター システムのデータ形式と完全に一致する場合があります。ほとんどのコンピュータ システムでは、バイナリ エンコーディングの処理要件は、他のエンコーディングよりも大幅に低くなります。

コンピュータ システムのアーキテクチャがバイナリ エンコーディングで使用される標準形式と一致しない場合、および処理要件の絶対的な最小化が重要であり、異なるシステム間の交換が問題にならない場合は、プライベート エンコーディングを使用する方が適切な場合があります。 ISO/IEC 9636-1 で指定された規則に準拠しています。

目的

このエンコーディングには次の特徴があります。

  • a)パラメータリストの分割: 関数/応答表現は、1 つまたは複数の分割によってバイナリエンコーディングでコード化されます (節 4 を参照)表現の最初の (または唯一の) パーティションには、オペコード (クラス コードと ID コード) が含まれます。
  • b)関数表現と応答表現の整列: すべての関数/応答表現は 16 ビット境界で始まります。奇数の 8 ビット エンティティを必要とするパーティションに続く表現のアライメントでは、すべてのビットがゼロの 8 ビット エンティティでパーティションをパディングする必要がある場合があります。
  • c)フォーマットの統一: すべての関数表現と応答データ レコードには、関連するパラメータ長の値があります。その結果、インタプリタでサポートされていない関数表現を無視することができます。
  • d)パラメータデータの符号化効率。座標、インデックス、色などのパラメータ データは、1 つ以上の 8 ビット エンティティとしてエンコードされます。すべてのパラメータの精度は、適切なデフォルトの精度によって決定されるか、精度設定 CGI 関数によって設定されます。
  • e)拡張性: opcode クラスと id 値の配置は、将来の拡張を可能にするように設計されています。
  • f)実数データのフォーマット: 実数は、IEEE 浮動小数点表現または固定小数点表現のいずれかを使用してエンコードされます。
  • g)ランレングス エンコーディング オプション: 多くの隣接する色が同じ値を持つ場合、効率的なエンコーディングが可能です。実行ごとに、セル数が指定され、その後に色 (またはカラー インデックス) が続きます。
  • h)圧縮されたリスト エンコーディング オプション: 隣接する色が同じ値を持たない場合、値ができるだけ密に圧縮されたビットストリーム リストが提供されます。
  • i)勧誘機能のエンコード: 応答を必要とする機能へのオペコードの割り当ては、そのようなすべての機能が CGI インタープリターによって認識できるように設計されています。
  • j)応答データ: 勧誘機能への応答には、関連する勧誘機能とは異なるオペコードが割り当てられています。ただし、応答オペコードは、請求関数オペコードから直接的な方法で導出できます。
  • k)データのリスト: あらゆるタイプのデータのリストを表すための標準的な手法があります (いくつかの特定の例外があります)

他の規格との関係

このエンコーディングは、コンピュータ グラフィックス メタファイル バイナリ エンコーディング、ISO/IEC 8632-3:1992 と同じ目的に基づいています。セマンティクスとパラメータ化の両方で CGM 要素と同一である各 CGI 関数について、エンコーディングは同一になります。つまり、オペコードは同一で、パラメーターは同じデータ型を使用し、同じ順序で表示されます。このエンコーディングで定義された拡張メカニズムは、CGM Binary Encoding とも互換性があります。

標準のこの部分における実データの浮動小数点表現は、ANSI/IEEE 754-1986 のものです。

標準のこの部分での文字データの表現は、ISO 646 および ISO 2022 の規則に従います。

特定の関数と応答データについて、CGI はパラメーター値の範囲を登録用に予約されているものとして定義します。値とその意味は、ISO TR 9973 で確立された手順を使用して定義されます。

1 スコープ

ISO/IEC 9637 のこの部分は、コンピュータ グラフィックス インターフェイス (CGI) データ ストリームのバイナリ エンコーディングを指定します。 ISO/IEC 9636-2, ISO/IEC 9636-3, ISO/IEC 9636-4, ISO/IEC 9636-5, および ISO/IEC 9636-6 の第 5 節および第 6 節の関数構文のそれぞれについて、エンコーディングは次のとおりです。オペコードと指定されたデータ型のパラメータのシーケンスで指定されます。これらのデータ型のそれぞれについて、ビット、8 ビット、および 16 ビットのエンティティに関する明示的な表現が指定されています。一部のデータ型では、正確な表現は、データ ストリームで使用されるデータの型や精度によって異なります。

コンピュータ グラフィックス インターフェイス データ ストリームのバイナリ エンコーディングは、多くの状況で、他のエンコーディングと比較して、データ ストリームの生成と解釈に必要な労力を削減します。

2 参考文献

以下の規格には、このテキストでの参照により、ISO/IEC 9637 のこの部分の規定を構成する規定が含まれています。発行の時点で、示された版は有効でした。すべての規格は改訂される可能性があり、ISO/IEC 9637 のこの部分に基づく契約の当事者は、以下にリストされている規格の最新版を適用する可能性を調査することをお勧めします。 IEC および ISO のメンバーは、現在有効な国際規格の登録簿を維持しています。

  • ISO/IEC 646:1991, 情報技術 — 情報交換用の ISO 7 ビット コード化文字セット。
  • ISO 2022:1986, 情報処理 - ISO 7 ビットおよび 8 ビット コード化文字セット - コード拡張技術。
  • ISO/IEC 7942:1985/Amd.1:1991, 情報処理システム — コンピュータ グラフィックス — グラフィカル カーネル システム (GKS) の機能説明 — 修正 l
  • ISO 8632-1:1992, 情報技術 — コンピュータ グラフィックス — 画像記述情報の保存と転送のためのメタファイル — 1: 機能仕様。
  • ISO 8632-3:1992, 情報技術 — コンピュータ グラフィックス — 画像記述情報の保存と転送のためのメタファイル — 3: バイナリ エンコーディング。
  • ISO/IEC 9636-1:1991, 情報技術 — コンピュータ グラフィックス — グラフィック デバイス (CGI) との対話のためのインターフェイス技術 — 機能仕様 — 1: 概要、プロファイル、および適合性。
  • ISO/IEC 9636-2:1991, 情報技術 — コンピュータ グラフィックス — グラフィカル デバイス (CGI) との対話のためのインターフェイス技術 — 機能仕様 — 2: コントロール。
  • ISO/IEC 9636-3:1991, 情報技術 — コンピュータ グラフィックス — グラフィカル デバイス (CGI) との対話のためのインターフェイス技術 — 機能仕様 — 3: 出力。
  • ISO/IEC 9636-4:1991, 情報技術 — コンピュータ グラフィックス — グラフィック デバイス (CGI) との対話のためのインターフェイス技術 — 機能仕様 — 4: セグメント。
  • ISO/IEC 9636-5:1991, 情報技術 — コンピュータ グラフィックス — グラフィカル デバイス (CGI) との対話のためのインターフェイス技術 — 機能仕様 — 5: 入力とエコー。
  • ISO/IEC 9636-6:1991, 情報技術 — コンピュータ グラフィックス — グラフィック デバイス (CGI) との対話のためのインターフェイス技術 — 機能仕様 — 6: グリッド。
  • ISO/IEC 9637-1:1992, 情報技術 — コンピュータ グラフィックス — グラフィック デバイス (CGI) との対話のためのインターフェイス手法 — データ ストリーム バインディング — I: 文字エンコーディング。
  • ISO/IEC TR 9973:1988, 情報技術 — コンピュータ グラフィックス — グラフィック アイテムの登録手順。
  • ANS I/IEEE 754, バイナリ浮動小数点演算の標準。

3 つの定義

3.1

表現

オペコード (関数/応答クラスと関数/応答 ID) およびパラメーター長情報を含むバイナリ エンコードされた関数または応答表現の一部。 (4.3.4 参照)

3.2

オクテット

すべてのビットが有効な 8 ビット エンティティ。ビットには 7 (最上位) から 0 (最下位) までの番号が付けられます。

3.3

すべてのビットが有効な 16 ビット エンティティ。ビットには 15 (最上位) から 0 (最下位) までの番号が付けられます。

3.4

単語の整列

エンティティがデータ ストリーム内のワード (16 ビット) 境界で始まる場合、エンティティはワード境界で整列されます。

注記 1: ISO/IEC 9637 のこの部分では、用語「オクテット」、「ワード」、および「ワード アライン」には特定の意味があります。データ ストリームが使用されます。

Foreword

ISO (the International Organization for Standardization) and IEC (the International Electrotechnical Commission) form the specialized system for worldwide standardization. National bodies that are members of ISO or IEC participate in the development of International Standards through technical committees established by the respective organization to deal with particular fields of technical activity. ISO and IEC technical committees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the work.

In the field of information technology, ISO and IEC have established a joint technical committee, ISO/IEC JTC 1. Draft International Standards adopted by the joint technical committee are circulated to national bodies for voting. Publication as an International Standard requires approval by at least 75 % of the national bodies casting a vote.

International Standard ISO/IEC 9637-2 was prepared by Joint Technical Committee ISO/IEC JTC1, Information technology.

ISO/IEC 9637 consists of the following parts, under the general title Information technology — Computer graphics — Interfacing techniques for dialogues with graphical devices (CGI) — Data stream binding

  • Part 1:Character encoding
  • Part 2: Binary encoding

Annex A forms an integral part of this part of ISO/IEC 9637. Annex B is for information only.

Introduction

Purpose

The Binary Encoding of the Computer Graphics Interface (CGI), ISO/IEC 9636, provides a data stream representation of the CGI function syntax that can be optimized for speed of generation and interpretation, while still providing a standard means of interchange among computer systems. The encoding uses binary data formats that are more similar to the data representations used within computer systems than the data formats of the other encodings.

Some of the data formats may exactly match those of some computer systems. On most computer systems processing requirements for the Binary Encoding will be substantially lower than for the other encodings.

In cases where a computer system's architecture does not match the standard formats used in the Binary Encoding, and where absolute minimization of processing requirements is critical, and where interchange among dissimilar systems does not matter, it may be more appropriate to use a private encoding, conforming to the rules specified in ISO/IEC 9636-1.

Objectives

This encoding has the following features:

  • a) Partitioning of parameter lists: function/response representations are coded in the Binary Encoding by one or more partitions (see clause 4); the first (or only) partition of a representation contains the opcode (class code and id code);
  • b) Alignment of function representations and response representations: every function/response representation begins on a 16-bit boundary. Alignment of representations which follow partitions that require an odd number of 8-bit entities may require a partition to be padded with an 8-bit entity with all bits zero;
  • c) Uniformity of format: all function representations and response data records have an associated parameter length value. As a result, it is possible to ignore function representations which are not supported by the interpreter;
  • d) Efficiency of encoding parameter data; parameter data such as coordinates, indexes and colours are encoded as one or more 8-bit entities. The precision of every parameter is determined by the appropriate default precision or as set by a precision setting CGI function;
  • e) Extensibility: the arrangement of opcode class and id values has been designed to allow future growth;
  • f) Format of real data: real numbers are encoded using either IEEE floating point representation or a fixed-point representation;
  • g) Run length encoding option: if many adjacent colours have the same value, efficient encoding is possible. For each run a cell count is specified followed by the colour (or colour index);
  • h) Packed list encoding option: if adjacent colours do not have the same value, bit-stream lists are provided in which the values are packed as closely as possible;
  • i) Encoding of soliciting functions: the assignment of opcodes to functions which require a response has been designed so that all such functions can be recognized by a CGI interpreter;
  • j) Response Data: responses to soliciting functions have been assigned different opcodes from their associated soliciting functions. However, the response opcode can be derived in a straightforward manner from the soliciting function opcode;
  • k) Lists of data: there is a standard technique for representing lists of any type of data (with a few specific exceptions);

Relationship to other standards

This encoding is guided by the same objectives as the Computer Graphics Metafile Binary Encoding, ISO/IEC 8632-3:1992. For each CGI function which is identical in both semantics and parameterization to a CGM element, the encoding will be identical. That is, the opcodes will be identical and the parameters will use the same data type and appear in the same order. The extension mechanism defined in this encoding is also compatible with the CGM Binary Encoding.

The floating point representation of real data in this part of the Standard is that in ANSI/IEEE 754-1986.

The representation of character data in this part of the Standard follows the rules of ISO 646 and ISO 2022.

For certain functions and response data, the CGI defines parameter value ranges as being reserved for registration. The values and their meanings will be defined using the procedures established in ISO TR 9973.

1 Scope

This part of ISO/IEC 9637 specifies a Binary Encoding of the Computer Graphics Interface (CGI) data stream. For each of the function syntaxes in clause 5 and clause 6 of ISO/IEC 9636-2, ISO/IEC 9636-3, ISO/IEC 9636-4, ISO/IEC 9636-5, and ISO/IEC 9636-6, an encoding is specified in terms of an opcode and a sequence of parameters of specified data types. For each of these data types, an explicit representation in terms of bits, 8-bit and 16-bit entities is specified. For some data types, the exact representation depends on a type and/or precision for the data as used in the data stream.

The Binary Encoding of the Computer Graphics Interface data stream will, in many circumstances, reduce the effort required to generate and interpret the data stream as compared to other encodings.

2 Normative references

The following standards contain provisions which, through reference in this text, constitute provisions of this part of ISO/IEC 9637. At the time of publication, the editions indicated were valid. All standards are subject to revisions, and parties to agreements based on this part of ISO/IEC 9637 are encouraged to investigate the possibility of applying the most recent editions of the standards listed below. Members of IEC and ISO maintain registers of currently valid International Standards.

  • ISO/IEC 646:1991, Information technology — ISO 7-bit coded character set for information interchange.
  • ISO 2022:1986, Information processing — ISO 7-bit and 8-bit coded character sets — Code extension techniques.
  • ISO/IEC 7942:1985/Amd.1:1991, Information processing systems — Computer graphics — Graphical Kernel System (GKS) functional description — Amendment l
  • ISO 8632-1:1992 , Information technology — Computer graphics — Metafile for the storage and transfer of picture description information — 1: Functional specification.
  • ISO 8632-3:1992, Information technology — Computer graphics — Metafile for the storage and transfer of picture description information — 3: Binary encoding.
  • ISO/IEC 9636-1:1991, Information technology — Computer graphics — Interfacing techniques for dialogues with graphical devices(CGI) — Functional specification — 1: Overview, profiles and conformance.
  • ISO/IEC 9636-2:1991, Information technology — Computer graphics — Interfacing techniques for dialogues with graphical devices(CGI) — Functional specification — 2: Control.
  • ISO/IEC 9636-3:1991, Information technology — Computer graphics — Interfacing techniques for dialogues with graphical devices(CGI) — Functional specification — 3: Output.
  • ISO/IEC 9636-4:1991, Information technology — Computer graphics — Interfacing techniques for dialogues with graphical devices(CGI) — Functional specification — 4: Segments.
  • ISO/IEC 9636-5:1991, Information technology — Computer graphics — Interfacing techniques for dialogues with graphical devices(CGI) — Functional specification — 5: Input and echoing.
  • ISO/IEC 9636-6:1991, Information technology — Computer graphics — Interfacing techniques for dialogues with graphical devices(CGI) — Functional specification — 6: Raster.
  • ISO/IEC 9637-1:1992, Information technology — Computer graphics — Interfacing techniques for dialogues with graphical devices(CGI) — Data stream binding — I: Character encoding.
  • ISO/IEC TR 9973:1988, Information technology — Computer graphics — Procedures for registration of graphical items.
  • ANS I/IEEE 754 , Standard for Binary Floating Point Arithmetic.

3 Definitions

3.1

representation

Portion of a binary-encoded function or response representation that contains the opcode (function/response class plus function/response id) and parameter length information. (See 4.3.4.)

3.2

octet

8-bit entity in which all bits are significant. The bits are numbered from 7 (most significant) to 0 (least significant).

3.3

word

16-bit entity in which all bits are significant. The bits are numbered from 15 (most significant) to 0 (least significant).

3.4

word-aligned

An entity is word-aligned when it begins on a word (16-bit) boundary within the data stream.

Note 1 to entry: Within this part of ISO/IEC 9637, the terms"octet","word", and “word-aligned" have specific meanings. These meanings may not match those of a particular computer system on which this encoding of the data stream is used.