RFC2435 日本語訳

2435 RTP Payload Format for JPEG-compressed Video. L. Berc, W. Fenner,R. Frederick, S. McCanne, P. Stewart. October 1998. (Format: TXT=54173 bytes) (Obsoletes RFC2035) (Status: PROPOSED STANDARD)
プログラムでの自動翻訳です。
英語原文

Network Working Group                                            L. Berc
Request for Comments: 2435                 Digital Equipment Corporation
Obsoletes: 2035                                                W. Fenner
Category: Standards Track                                     Xerox PARC
                                                            R. Frederick
                                                              Xerox PARC
                                                              S. McCanne
                                            Lawrence Berkeley Laboratory
                                                              P. Stewart
                                                              Xerox PARC
                                                            October 1998

Bercがコメントのために要求するワーキンググループL.をネットワークでつないでください: 2435 DECは以下を時代遅れにします。 2035年のW.フェナーカテゴリ: 標準化過程ゼロックスPARC R.フレディリックゼロックスPARC S.McCanneローレンスバークレイ研究所P.スチュワートゼロックスPARC1998年10月

              RTP Payload Format for JPEG-compressed Video

JPEGによって圧縮されたビデオのためのRTP有効搭載量形式

Status of this Memo

このMemoの状態

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.

このドキュメントは、インターネットコミュニティにインターネット標準化過程プロトコルを指定して、改良のために議論と提案を要求します。 このプロトコルの標準化状態と状態への「インターネット公式プロトコル標準」(STD1)の現行版を参照してください。 このメモの分配は無制限です。

Copyright Notice

版権情報

   Copyright (C) The Internet Society (1998).  All Rights Reserved.

Copyright(C)インターネット協会(1998)。 All rights reserved。

Abstract

要約

   This memo describes the RTP payload format for JPEG video streams.
   The packet format is optimized for real-time video streams where
   codec parameters change rarely from frame to frame.

このメモはJPEGビデオストリームのためにRTPペイロード形式について説明します。フレームによってコーデックパラメタがめったに変化しないところでパケット・フォーマットはリアルタイムのビデオストリームのために最適化されます。

   This document is a product of the Audio-Video Transport working group
   within the Internet Engineering Task Force.  Comments are solicited
   and should be addressed to the working group's mailing list at rem-
   conf@es.net and/or the author(s).

このドキュメントはインターネット・エンジニアリング・タスク・フォースの中のAudio-ビデオTransportワーキンググループの製品です。 コメントは、請求されて、レム conf@es.net 、そして/または、作者にワーキンググループのメーリングリストに記述されるべきです。

Changes from RFC 2035

RFC2035からの変化

   Most of this memo is identical to RFC 2035.  The changes made to the
   protocol are summarized in Appendix D.

このメモの大部分はRFC2035と同じです。 プロトコルにされた変更はAppendix Dにまとめられます。

Berc, et. al.               Standards Track                     [Page 1]

RFC 2435              RTP Payload Format for JPEG           October 1998

et Berc、アル。 規格は1998年10月にJPEGのためにRFC2435RTP有効搭載量形式を追跡します[1ページ]。

Key Words

キーワード

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [9].

キーワード“MUST"、「必須NOT」が「必要です」、“SHALL"、「」、“SHOULD"、「「推薦され」て、「5月」の、そして、「任意」のNOTはRFC2119[9]で説明されるように本書では解釈されることであるべきですか?

1.  Introduction

1. 序論

   The Joint Photographic Experts Group (JPEG) standard [1,2,3] defines
   a family of compression algorithms for continuous-tone, still images.
   This still image compression standard can be applied to video by
   compressing each frame of video as an independent still image and
   transmitting them in series.  Video coded in this fashion is often
   called Motion-JPEG.

ジェイペグ(JPEG)規格[1、2、3]はそれでも、連続したトーン、イメージのために圧縮アルゴリズムの家族を定義します。 独立している静止画像としてビデオの各フレームを圧縮して、連続的にそれらを伝えることによって、この静止画像圧縮規格をビデオに適用できます。 こんなやり方でコード化されたビデオはしばしばMotionJPEGと呼ばれます。

   We first give an overview of JPEG and then describe the specific
   subset of JPEG that is supported in RTP and the mechanism by which
   JPEG frames are carried as RTP payloads.

私たちは、最初に、JPEGの概観を与えて、次に、RTPでサポートされるJPEGの特定の部分集合とJPEGフレームがRTPペイロードとして運ばれるメカニズムについて説明します。

   The JPEG standard defines four modes of operation: the sequential DCT
   mode, the progressive DCT mode, the lossless mode, and the
   hierarchical mode.  Depending on the mode, the image is represented
   in one or more passes.  Each pass (called a frame in the JPEG
   standard) is further broken down into one or more scans.  Within each
   scan, there are one to four components, which represent the three
   components of a color signal (e.g., "red, green, and blue", or a
   luminance signal and two chrominance signals).  These components can
   be encoded as separate scans or interleaved into a single scan.

JPEG規格は4つの運転モードを定義します: 連続したDCTモード、進歩的なDCTモード、losslessモード、および階層的なモード。 モードによって、イメージが1に表されるか、または以上は通ります。 それぞれのパス(JPEGのフレームが標準であると言う)は1つ以上のスキャンへさらに砕けています。 各スキャンの中に、1〜4つのコンポーネントがあります。(コンポーネントはカラー信号(例えば、「緑色の、そして、青い赤」か、輝度信号と2つのクロミナンス信号)の3つの部品を表します)。 これらのコンポーネントを別々のスキャンとしてコード化するか、またはただ一つのスキャンにはさみ込むことができます。

   Each frame and scan is preceded with a header containing optional
   definitions for compression parameters like quantization tables and
   Huffman coding tables.  The headers and optional parameters are
   identified with "markers" and comprise a marker segment; each scan
   appears as an entropy-coded bit stream within two marker segments.
   Markers are aligned to byte boundaries and (in general) cannot appear
   in the entropy-coded segment, allowing scan boundaries to be
   determined without parsing the bit stream.

ヘッダーが量子化テーブルとハフマンコード化テーブルのような圧縮パラメタのための任意の定義を含んでいて、各フレームとスキャンは先行されています。 ヘッダーと任意のパラメタは、「マーカー」と同一視されていて、マーカーセグメントを含みます。 各スキャンはエントロピーでコード化されたビットストリームとして2つのマーカーセグメントの中に現れます。 マーカーは、バイト境界に並べられて、(一般に、)エントロピーでコード化されたセグメントに現れることができません、ビットストリームを分析しないでスキャン境界が決定しているのを許容して。

   Compressed data is represented in one of three formats: the
   interchange format, the abbreviated format, or the table-
   specification format.  The interchange format contains definitions
   for all the tables used by the entropy-coded segments, while the
   abbreviated format might omit some assuming they were defined out-
   of-band or by a "previous" image.

圧縮されたデータは3つの形式の1つで表されます: 置き換え形式、簡略化された形式、またはテーブル仕様形式。 置き換え形式はエントロピーでコード化されたセグメントによって使用されるすべてのテーブルのための定義を含んでいます、それらがバンドの外か「前」のイメージによって定義されたと仮定しながら、簡略化された形式がいくつかを省略するかもしれませんが。

   The JPEG standard does not define the meaning or format of the
   components that comprise the image.  Attributes like the color space
   and pixel aspect ratio must be specified out-of-band with respect to

JPEG規格はイメージを包括するコンポーネントの意味か書式を定義しません。 指定されていて、色のスペースとピクセルアスペクトがそうしなければならないバンドの同類を結果と考えます。

Berc, et. al.               Standards Track                     [Page 2]

RFC 2435              RTP Payload Format for JPEG           October 1998

et Berc、アル。 規格は1998年10月にJPEGのためにRFC2435RTP有効搭載量形式を追跡します[2ページ]。

   the JPEG bit stream.  The JPEG File Interchange Format (JFIF) [4] is
   a de-facto standard that provides this extra information using an
   application marker segment (APP0).  Note that a JFIF file is simply a
   JPEG interchange format image along with the APP0 segment.  In the
   case of video, additional parameters must be defined out-of-band
   (e.g., frame rate, interlaced vs. non-interlaced, etc.).

JPEGビットストリーム。 JPEG File Interchange Format(JFIF)[4]はアプリケーションマーカーセグメント(APP0)を使用することでこのその他の情報を提供するデファクト規格です。 JFIFファイルがAPP0セグメントと共に単にJPEG置き換え形式イメージであることに注意してください。 ビデオの場合では、バンドの外(例えば非交錯に対して交錯するフレームレートなど)で追加パラメタを定義しなければなりません。

   While the JPEG standard provides a rich set of algorithms for
   flexible compression, cost-effective hardware implementations of the
   full standard have not appeared.  Instead, most hardware JPEG video
   codecs implement only a subset of the sequential DCT mode of
   operation.  Typically, marker segments are interpreted in software
   (which "re-programs" the hardware) and the hardware is presented with
   a single, interleaved entropy-coded scan represented in the YUV color
   space.

JPEG規格がフレキシブルな圧縮のための豊かなセットのアルゴリズムを提供している間、完全な規格の費用対効果に優れたハードウェア実装は現れていません。 代わりに、ほとんどのハードウェアJPEGビデオコーデックが連続したDCT運転モードの部分集合だけを実行します。 通常、ソフトウェア(ハードウェアの「プログラムを変える」)でマーカーセグメントを解釈します、そして、YUV色のスペースに表された単一の、そして、はさみ込まれたエントロピーでコード化されたスキャンをハードウェアに与えます。

   The scan contains an ordered sequence of Minimum Coded Units, or
   MCUs, which are the smallest group of image data coded in a JPEG bit
   stream.  Each MCU defines the image data for a small rectangular
   block of the output image.

スキャンはMinimum Coded Units、またはMCUsの規則正しい系列を含んでいます。(MCUsはJPEGビットストリームでコード化されたイメージデータの最も小さいグループです)。 各MCUは出力イメージのわずかな矩形ブロックイメージデータを定義します。

   Restart markers in the JPEG data denote a point where the decoder
   should reset its state.  As defined by JPEG, restart markers are the
   only type of marker that may appear embedded in the entropy-coded
   segment, and they may only appear on an MCU boundary.  A "restart
   interval" is defined to be a block of data containing a restart
   marker followed by some fixed number of MCUs.  An exception is made
   for the first restart interval in each frame, which omits the initial
   restart marker and just begins with the MCU data.  When these markers
   are used, each frame is composed of some fixed number of back-to-back
   restart intervals.

JPEGデータの再開マーカーはデコーダが状態をリセットするはずであるポイントを指示します。 JPEGによって定義されるように、再開マーカーはエントロピーでコード化されたセグメントに埋め込まれているように見えるかもしれない唯一のタイプの採点者です、そして、彼らはMCU境界で見えるだけであるかもしれません。 「再開間隔」は、MCUsの何らかの定数があとに続いた再開マーカーを含む1ブロックのデータになるように定義されます。 例外は最初の再開間隔の間、各フレームで作られています。(それは、初期の再開マーカーを省略して、MCUデータでただ始まります)。 これらのマーカーが使用されているとき、各フレームは背中合わせの再開間隔の何らかの定数で構成されます。

2.  JPEG Over RTP

2. RTPの上のJPEG

   To maximize interoperability among hardware-based codecs, we assume
   the sequential DCT operating mode [1,Annex F] and restrict the set of
   predefined RTP/JPEG "type codes" (defined below) to single-scan,
   interleaved images.  While this is more restrictive than even
   baseline JPEG, many hardware implementation fall short of the
   baseline specification (e.g., most hardware cannot decode non-
   interleaved scans).

私たちは、ハードウェアベースのコーデックの中で相互運用性を最大にするために、連続したDCTがオペレーティング・モード[1、Annex F]であると思って、事前に定義されたRTP/JPEG「タイプコード」(以下では、定義される)のセットをただ一つのスキャンであって、はさみ込まれたイメージに制限します。 これは多くのハードウェア実装秋に基線JPEGよりさえベースライン仕様書に不足していた状態で制限していますが(例えば、ほとんどのハードウェアは非はさみ込まれたスキャンを解読できません)。

   In practice, most of the table-specification data rarely changes from
   frame to frame within a single video stream.  Therefore RTP/JPEG data
   is represented in abbreviated format, with all of the tables omitted
   from the bit stream where possible.  Each frame begins immediately
   with the (single) entropy-coded scan.  The information that would
   otherwise be in both the frame and scan headers is represented

実際には、フレームによって仕様を見送っているデータの大部分はただ一つのビデオストリームの中でめったに変化しません。 したがって、テーブルのすべてが可能であるところでビットストリームから省略されている状態で、RTP/JPEGデータは簡略化された形式で表されます。 各フレームはすぐ(単一)のエントロピーでコード化されたスキャンで始まります。 そうでなければフレームとスキャンヘッダーの両方にある情報は表されます。

Berc, et. al.               Standards Track                     [Page 3]

RFC 2435              RTP Payload Format for JPEG           October 1998

et Berc、アル。 規格は1998年10月にJPEGのためにRFC2435RTP有効搭載量形式を追跡します[3ページ]。

   entirely within the RTP/JPEG header (defined below) that lies between
   the RTP header and the JPEG payload.

完全にRTP/JPEGヘッダー(以下では、定義される)の中では、それはRTPヘッダーとJPEGペイロードの間に横たわっています。

   While parameters like Huffman tables and color space are likely to
   remain fixed for the lifetime of the video stream, other parameters
   should be allowed to vary, notably the quantization tables and image
   size (e.g., to implement rate-adaptive transmission or allow a user
   to adjust the "quality level" or resolution manually).  Thus explicit
   fields in the RTP/JPEG header are allocated to represent this
   information.  Since only a small set of quantization tables are
   typically used, we encode the entire set of quantization tables in a
   small integer field.  Customized quantization tables are accommodated
   by using a special range of values in this field, and then placing
   the table before the beginning of the JPEG payload.  The image width
   and height are encoded explicitly.

ハフマンテーブルと色のスペースのようなパラメタがビデオストリームの生涯に修理されたままで残っていそうな間、他のパラメタが異なることができるべきであって、著しく量子化は、テーブルと画像寸法(例えば、レート適応型のトランスミッションを実行するか、またはユーザが手動で「品質水準」か解決を調整するのを許容する)です。 したがって、この情報を表すためにRTP/JPEGヘッダーの明白な野原を割り当てます。 小さいセットの量子化テーブルだけが通常使用されるので、私たちは小さい整数分野で全体のセットの量子化テーブルをコード化します。 カスタム設計された量子化テーブルは、この分野で特別な範囲の値を使用して、次に、JPEGペイロードの始まりの前にテーブルを置くことによって、設備されます。 イメージ幅と高さは明らかにコード化されます。

   Because JPEG frames are typically larger than the underlying
   network's maximum packet size, frames must often be fragmented into
   several packets.  One approach is to allow the network layer below
   RTP (e.g., IP) to perform the fragmentation.  However, this precludes
   rate-controlling the resulting packet stream or partial delivery in
   the presence of loss, and frames may be larger than the maximum
   network layer reassembly length (see [10] for more information).  To
   avoid these limitations, RTP/JPEG defines a simple fragmentation and
   reassembly scheme at the RTP level.

JPEGフレームが基本的なネットワークの最大のパケット規模より通常大きいので、しばしばいくつかのパケットにフレームを断片化しなければなりません。 1つのアプローチはRTP(例えば、IP)の下のネットワーク層が断片化を実行するのを許容することです。 しかしながら、これが、損失の面前で結果として起こるパケットの流れか一部受け渡しをレートで制御するのを排除して、フレームはネットワーク層の最大の再アセンブリの長さより大きいかもしれません(詳しい情報のための[10]を見てください)。 これらの制限を避けるために、RTP/JPEGはRTPレベルで簡単な断片化と再アセンブリ計画を定義します。

3.  RTP/JPEG Packet Format

3. RTP/JPEGパケット・フォーマット

   The RTP timestamp is in units of 90000Hz.  The same timestamp MUST
   appear in each fragment of a given frame.  The RTP marker bit MUST be
   set in the last packet of a frame.

RTPタイムスタンプが90000Hzのユニットにあります。 同じタイムスタンプは与えられたフレームの各断片に現れなければなりません。 フレームの最後のパケットにRTPマーカービットを設定しなければなりません。

3.1.  JPEG header

3.1. JPEGヘッダー

   Each packet contains a special JPEG header which immediately follows
   the RTP header.  The first 8 bytes of this header, called the "main
   JPEG header", are as follows:

各パケットはすぐにRTPヘッダーについて来る特別なJPEGヘッダーを含んでいます。 「主なJPEGヘッダー」と呼ばれるこのヘッダーの最初の8バイトは以下の通りです:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Type-specific |              Fragment Offset                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Type     |       Q       |     Width     |     Height    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | タイプ特有です。| 断片オフセット| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | タイプ| Q| 幅| 高さ| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Berc, et. al.               Standards Track                     [Page 4]

RFC 2435              RTP Payload Format for JPEG           October 1998

et Berc、アル。 規格は1998年10月にJPEGのためにRFC2435RTP有効搭載量形式を追跡します[4ページ]。

   All fields in this header except for the Fragment Offset field MUST
   remain the same in all packets that correspond to the same JPEG
   frame.

Fragment Offset分野以外のこのヘッダーのすべての分野が同じJPEGフレームに対応するすべてのパケットで同じままで残らなければなりません。

   A Restart Marker header and/or Quantization Table header may follow
   this header, depending on the values of the Type and Q fields.

Restart Markerヘッダー、そして/または、Quantization Tableヘッダーはこのヘッダーについて来るかもしれません、TypeとQ分野の値によって。

3.1.1.  Type-specific: 8 bits

3.1.1. タイプ特有: 8ビット

   Interpretation depends on the value of the type field.  If no
   interpretation is specified, this field MUST be zeroed on
   transmission and ignored on reception.

解釈はタイプ分野の値に依存します。 解釈が全く指定されないなら、この分野をトランスミッションのときにゼロに合わせられていて、レセプションで無視しなければなりません。

3.1.2.  Fragment Offset: 24 bits

3.1.2. 断片は相殺されました: 24ビット

   The Fragment Offset is the offset in bytes of the current packet in
   the JPEG frame data. This value is encoded in network byte order
   (most significant byte first). The Fragment Offset plus the length of
   the payload data in the packet MUST NOT exceed 2^24 bytes.

Fragment OffsetはJPEGフレームデータの現在のパケットのバイトがオフセットです。 この値がネットワークバイトオーダーでコード化される、(最も重要なバイト、1番目) パケットのペイロードデータのFragment Offsetと長さは2^24バイトを超えてはいけません。

3.1.3.  Type: 8 bits

3.1.3. 以下をタイプしてください。 8ビット

   The type field specifies the information that would otherwise be
   present in a JPEG abbreviated table-specification as well as the
   additional JFIF-style parameters not defined by JPEG.  Types 0-63 are
   reserved as fixed, well-known mappings to be defined by this document
   and future revisions of this document.  Types 64-127 are the same as
   types 0-63, except that restart markers are present in the JPEG data
   and a Restart Marker header appears immediately following the main
   JPEG header.  Types 128-255 are free to be dynamically defined by a
   session setup protocol (which is beyond the scope of this document).

タイプ分野はJPEGによって定義されなかった追加JFIF-スタイルパラメタと同様にそうでなければ、JPEGでのプレゼントがテーブル仕様を簡略化したということである情報を指定します。 タイプ0-63は、このドキュメントのこのドキュメントと今後の改正で定義されるために修理されて、周知のマッピングとして予約されます。 タイプ64-127はタイプ0-63と同じです、再開マーカーがJPEGデータに出席していて、すぐに主なJPEGヘッダーに続いて、Restart Markerヘッダーが現れるのを除いて。 セッションセットアッププロトコル(このドキュメントの範囲にある)でタイプ128-255は無料でダイナミックに定義できます。

3.1.4.  Q: 8 bits

3.1.4. Q: 8ビット

   The Q field defines the quantization tables for this frame.  Q values
   0-127 indicate the quantization tables are computed using an
   algorithm determined by the Type field (see below).  Q values 128-255
   indicate that a Quantization Table header appears after the main JPEG
   header (and the Restart Marker header, if present) in the first
   packet of the frame (fragment offset 0).  This header can be used to
   explicitly specify the quantization tables in-band.

Q分野は量子化テーブルをこのフレームと定義します。 Q値0-127は、量子化テーブルがType分野のそばで決定しているアルゴリズムを使用することで計算されるのを(以下を見てください)示します。 Q値128-255が、Quantization Tableヘッダーが主なJPEGヘッダーの後に現れるのを示す、(そして、Restart Markerヘッダー、プレゼント) フレーム(オフセット0を断片化する)の最初のパケットで。 バンドで明らかに量子化テーブルを指定するのにこのヘッダーを使用できます。

3.1.5.  Width: 8 bits

3.1.5. 幅: 8ビット

   This field encodes the width of the image in 8-pixel multiples (e.g.,
   a width of 40 denotes an image 320 pixels wide).  The maximum width
   is 2040 pixels.

この分野は8画素の倍数における、イメージの幅をコード化します(例えば、40の幅は320幅画素のイメージを指示します)。 全幅は2040画素です。

Berc, et. al.               Standards Track                     [Page 5]

RFC 2435              RTP Payload Format for JPEG           October 1998

et Berc、アル。 規格は1998年10月にJPEGのためにRFC2435RTP有効搭載量形式を追跡します[5ページ]。

3.1.6.  Height: 8 bits

3.1.6. 高さ: 8ビット

   This field encodes the height of the image in 8-pixel multiples
   (e.g., a height of 30 denotes an image 240 pixels tall). When
   encoding interlaced video, this is the height of a video field, since
   fields are individually JPEG encoded. The maximum height is 2040
   pixels.

この分野は8画素の倍数における、イメージの高さをコード化します(例えば、30の高さは240高さ画素のイメージを指示します)。 分野がビデオ分野個別に高さであるので、交錯しているビデオをコード化するとき、これは高さです。コード化されたJPEG。 最大の高さは2040画素です。

3.1.7.  Restart Marker header

3.1.7. 再開Markerヘッダー

   This header MUST be present immediately after the main JPEG header
   when using types 64-127.  It provides the additional information
   required to properly decode a data stream containing restart markers.

主なJPEGヘッダー直後タイプ64-127を使用するのに、このヘッダーは出席しているに違いありません。 それは適切に再開マーカーを含むデータ・ストリームを解読するのに必要である追加情報を提供します。

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       Restart Interval        |F|L|       Restart Count       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 再開間隔|F|L| 再開カウント| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Restart Interval field specifies the number of MCUs that appear
   between restart markers.  It is identical to the 16 bit value that
   would appear in the DRI marker segment of a JFIF header.  This value
   MUST NOT be zero.

Restart Interval分野は再開マーカーの間に現れるMCUsの数を指定します。 それはJFIFヘッダーのDRIマーカーセグメントに現れる16ビットの値と同じです。 この値はゼロであるはずがありません。

   If the restart intervals in a frame are not guaranteed to be aligned
   with packet boundaries, the F (first) and L (last) bits MUST be set
   to 1 and the Restart Count MUST be set to 0x3FFF.  This indicates
   that a receiver MUST reassemble the entire frame before decoding it.

フレームの再開間隔がパケット境界に並べられるために保証されないなら、F(最初に)とL(最後)ビットを1に設定しなければなりません、そして、Restart Countは0x3FFFに用意ができなければなりません。 これは、それを解読する前に受信機が全体のフレームを組み立て直さなければならないのを示します。

   To support partial frame decoding, the frame is broken into "chunks"
   each containing an integral number of restart intervals. The Restart
   Count field contains the position of the first restart interval in
   the current "chunk" so that receivers know which part of the frame
   this data corresponds to.  A Restart Interval value SHOULD be chosen
   to allow a "chunk" to completely fit within a single packet.  In this
   case, both the F and L bits of the packet are set to 1.  However, if
   a chunk needs to be spread across multiple packets, the F bit will be
   set to 1 in the first packet of the chunk (and only that one) and the
   L bit will be set to 1 in the last packet of the chunk (and only that
   one).

部分的なフレーム解読を支持するために、それぞれ整数の再開間隔を含んでいて、「塊」はフレームに細かく分けられます。 Restart Count分野が現在の「塊」における最初の再開間隔の位置を含んでいるので、受信機は、このデータがフレームのどの部分に相当するかを知っています。 Restart IntervalはSHOULDを評価します。「塊」が単一のパケットの中で完全に合うのを許容するために、選ばれています。 この場合、FとパケットのLビットの両方が1に設定されます。 しかしながら、塊が、複数のパケットの向こう側に広げられる必要があると、Fビットは塊(そして、それだけ)の最初のパケットの1に設定されるでしょう、そして、Lビットは塊(そして、それだけ)の最後のパケットの1に設定されるでしょう。

3.1.8.  Quantization Table header

3.1.8. 量子化Tableヘッダー

   This header MUST be present after the main JPEG header (and after the
   Restart Marker header, if present) when using Q values 128-255.  It
   provides a way to specify the quantization tables associated with
   this Q value in-band.

そして、このヘッダーが主なJPEGヘッダーの後に出席しているに違いない、(Restart Markerヘッダーの後に、プレゼント) いつかときに、Qを使用すると、128-255は評価されます。 それは関連しているこのバンドであるQ値で量子化テーブルを指定する方法を提供します。

Berc, et. al.               Standards Track                     [Page 6]

RFC 2435              RTP Payload Format for JPEG           October 1998

et Berc、アル。 規格は1998年10月にJPEGのためにRFC2435RTP有効搭載量形式を追跡します[6ページ]。

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      MBZ      |   Precision   |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Quantization Table Data                    |
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MBZ| 精度| 長さ| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 量子化テーブルデータ| | ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Length field is set to the length in bytes of the quantization
   table data to follow.  The Length field MAY be set to zero to
   indicate that no quantization table data is included in this frame.
   See section 4.2 for more information.  If the Length field in a
   received packet is larger than the remaining number of bytes, the
   packet MUST be discarded.

量子化テーブルデータのバイトで表現される長さにLength分野が続くように設定されます。 ゼロにLength分野が、量子化テーブルデータが全くこのフレームに含まれていないのを示すように設定されるかもしれません。 詳しい情報に関してセクション4.2を見てください。 容認されたパケットのLength分野がバイトの残っている数より大きいなら、パケットを捨てなければなりません。

   When table data is included, the number of tables present depends on
   the JPEG type field.  For example, type 0 uses two tables (one for
   the luminance component and one shared by the chrominance
   components).  Each table is an array of 64 values given in zig-zag
   order, identical to the format used in a JFIF DQT marker segment.

テーブルデータが含まれているとき、テーブルの現在の数はJPEGタイプフィールドに依存します。 例えば、タイプ0は2個のテーブルを使用します(輝度成分と1のための1つは色差成分によって共有されました)。 各テーブルはジグザグなオーダーで与えられた64の値の勢ぞろいです、JFIF DQTマーカーセグメントに使用される形式と同じです。

   For each quantization table present, a bit in the Precision field
   specifies the size of the coefficients in that table.  If the bit is
   zero, the coefficients are 8 bits yielding a table length of 64
   bytes.  If the bit is one, the coefficients are 16 bits for a table
   length of 128 bytes.  For 16 bit tables, the coefficients are
   presented in network byte order.  The rightmost bit in the Precision
   field (bit 15 in the diagram above) corresponds to the first table
   and each additional table uses the next bit to the left.  Bits beyond
   those corresponding to the tables needed by the type in use MUST be
   ignored.

それぞれの量子化テーブルプレゼントとして、Precisionでは、少し、分野はそのテーブルの係数のサイズを指定します。 ビットがゼロであるなら、係数は64バイトのテーブルの長さをもたらす8ビットです。 ビットが1であるなら、係数は128バイトのテーブルの長さのための16ビットです。 16個のビット・テーブルに関しては、係数はネットワークバイトオーダーで提示されます。 Precision分野(上のダイヤグラムによるビット15)の一番右のビットは最初のテーブルに対応しています、そして、それぞれの追加テーブルは次のビットを左まで使用します。 使用中のタイプによって必要とされたテーブルに対応するそれらを超えたビットを無視しなければなりません。

   For Q values from 128 to 254, the Q value to quantization table data
   mapping MUST be static, i.e., the receivers are guaranteed that they
   only need to read the table data once in order to correctly decode
   frames sent with that Q value.  A Q value of 255 denotes that the
   quantization table mapping is dynamic and can change on every frame.
   Decoders MUST NOT depend on any previous version of the tables, and
   need to reload these tables on every frame.  Packets MUST NOT contain
   Q = 255 and Length = 0.

128〜254までのQ値に、量子化テーブルデータマッピングへのQ値が静的であるに違いない、すなわち、受信機は正しくそのQ値と共に送られたフレームを解読するために一度テーブルデータを読むのが必要であるだけであることが保証されます。 255のQ値は、量子化テーブルマッピングがダイナミックであることを指示して、あらゆるフレームで変化できます。 デコーダは、テーブルのどんな旧バージョンにもよって、あらゆるフレームの上のこれらのテーブルを再び積む必要はなくなければなりません。 パケットはQ=255とLength=0を含んではいけません。

3.1.9.  JPEG Payload

3.1.9. JPEG有効搭載量

   The data following the RTP/JPEG headers is an entropy-coded segment
   consisting of a single scan.  The scan header is not present and is
   inferred from the RTP/JPEG header.  The scan is terminated either
   implicitly (i.e., the point at which the image is fully parsed), or

RTP/JPEGヘッダーに続くデータはただ一つのスキャンから成るエントロピーでコード化されたセグメントです。 スキャンヘッダーは、存在していなくて、RTP/JPEGヘッダーから推論されます。 またはスキャンがそれとなく(すなわち、イメージが完全に分析されるポイント)終えられる。

Berc, et. al.               Standards Track                     [Page 7]

RFC 2435              RTP Payload Format for JPEG           October 1998

et Berc、アル。 規格は1998年10月にJPEGのためにRFC2435RTP有効搭載量形式を追跡します[7ページ]。

   explicitly with an EOI marker.  The scan may be padded to arbitrary
   length with undefined bytes.  (Some existing hardware codecs generate
   extra lines at the bottom of a video frame and removal of these lines
   would require a Huffman-decoding pass over the data.)

明らかである、EOIマーカーで。 スキャンは未定義のバイトがある任意の長さに水増しされるかもしれません。 (いくつかの既存のハードウェアコーデックがビデオフレームの下部で余分な線を発生させて、これらの線の取り外しはデータに関してハフマン-解読パスを必要とするでしょう。)

   The type code determines whether restart markers are present.  If a
   type supports restart markers, the packet MUST contain a non-zero
   Restart Interval value in a Restart Marker Header and restart markers
   MUST appear on byte aligned boundaries beginning with an 0xFF between
   MCUs at that interval.  Additional 0xFF bytes MAY appear between
   restart intervals.  This can be used in the packetization process to
   align data to something like a word boundary for more efficient
   copying.  Restart markers MUST NOT appear anywhere else in the JPEG
   payload.  Types which do not support restart makers MUST NOT contain
   restart markers anywhere in the JPEG payload. All packets MUST
   contain a "stuffed" 0x00 byte following any true 0xFF byte generated
   by the entropy coder [1, Sec.  B.1.1.5].

タイプコードは、再開マーカーに出席しているかどうか決定します。 タイプが再開マーカーをサポートするなら、パケットはRestart Marker Headerに非ゼロRestart Interval価値を含まなければなりません、そして、マーカーがバイトで見えなければならない再開はその間隔で、MCUsの間の0xFFと共に始まる境界を並べました。 追加0xFFバイトは再開間隔の間に現れるかもしれません。 何かより効率的なコピーのための語境界のようなものにデータを並べるのにpacketizationの過程でこれを使用できます。 再開マーカーはJPEGペイロードの他のどこかに見えてはいけません。 再開メーカーを支持しないタイプはJPEGペイロードでどこでも再開マーカーを含んではいけません。 すべてのパケットがエントロピー符号化器で発生するどんな真の0xFFバイト続く「詰められた」0×00バイトを含まなければなりません。[1、秒 B.1.1.5].

4.  Discussion

4. 議論

4.1.  The Type Field

4.1. タイプ分野

   The Type field defines the abbreviated table-specification and
   additional JFIF-style parameters not defined by JPEG, since they are
   not present in the body of the transmitted JPEG data.

Type分野はJPEGによって定義されなかった簡略化されたテーブル仕様と追加JFIF-スタイルパラメタを定義します、それらが伝えられたJPEGデータのボディーに存在していないので。

   Three ranges of the type field are currently defined. Types 0-63 are
   reserved as fixed, well-known mappings to be defined by this document
   and future revisions of this document. Types 64-127 are the same as
   types 0-63, except that restart markers are present in the JPEG data
   and a Restart Marker header appears immediately following the main
   JPEG header. Types 128-255 are free to be dynamically defined by a
   session setup protocol (which is beyond the scope of this document).

タイプ分野の3つの範囲が現在、定義されます。 タイプ0-63は、このドキュメントのこのドキュメントと今後の改正で定義されるために修理されて、周知のマッピングとして予約されます。 タイプ64-127はタイプ0-63と同じです、再開マーカーがJPEGデータに出席していて、すぐに主なJPEGヘッダーに続いて、Restart Markerヘッダーが現れるのを除いて。 セッションセットアッププロトコル(このドキュメントの範囲にある)でタイプ128-255は無料でダイナミックに定義できます。

   Of the first group of fixed mappings, types 0 and 1 are currently
   defined, along with the corresponding types 64 and 65 that indicate
   the presence of restart markers.  They correspond to an abbreviated
   table-specification indicating the "Baseline DCT sequential" mode,
   8-bit samples, square pixels, three components in the YUV color
   space, standard Huffman tables as defined in [1, Annex K.3], and a
   single interleaved scan with a scan component selector indicating
   components 1, 2, and 3 in that order.  The Y, U, and V color planes
   correspond to component numbers 1, 2, and 3, respectively.  Component
   1 (i.e., the luminance plane) uses Huffman table number 0 and
   quantization table number 0 (defined below) and components 2 and 3
   (i.e., the chrominance planes) use Huffman table number 1 and
   quantization table number 1 (defined below).

タイプ0と1は現在定義されます、固定マッピングの最初のグループでは再開マーカーの存在を示す対応するタイプ64と65と共に。 彼らは、「基線DCT連続した」モード、8ビットのサンプル、正方形の画素、YUV色のスペースの3つのコンポーネント、[1、Annex K.3]で定義される、標準のハフマンテーブル、およびスキャンコンポーネントセレクタがそのオーダーでコンポーネント1、2、および3を示しているただ一つのはさみ込まれたスキャンを示しながら、簡略化されたテーブル仕様に対応します。 Y、U、およびVカラー飛行機はそれぞれコンポーネントNo.1、2、および3に対応しています。 コンポーネント1(すなわち、輝度飛行機)はハフマン表番号0と量子化表番号0(以下では、定義されます)を使用します、そして、コンポーネント2と3(すなわち、色差飛行機)はハフマン表番号1と量子化表番号1(以下では、定義されます)を使用します。

Berc, et. al.               Standards Track                     [Page 8]

RFC 2435              RTP Payload Format for JPEG           October 1998

et Berc、アル。 規格は1998年10月にJPEGのためにRFC2435RTP有効搭載量形式を追跡します[8ページ]。

   Type numbers 2-5 are reserved and SHOULD NOT be used.  Applications
   based on previous versions of this document (RFC 2035) should be
   updated to indicate the presence of restart markers with type 64 or
   65 and the Restart Marker header.

予約されたNo.2-5とSHOULD NOTをタイプしてください。使用されます。 タイプ64か65とRestart Markerヘッダーと共に再開マーカーの存在を示すためにこのドキュメント(RFC2035)の旧バージョンに基づくアプリケーションをアップデートするべきです。

   The two RTP/JPEG types currently defined are described below:

現在定義されている2つのRTP/JPEGタイプが以下で説明されます:

                            horizontal   vertical   Quantization
           types  component samp. fact. samp. fact. table number
         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
         |       |  1 (Y)  |     2     |     1     |     0     |
         | 0, 64 |  2 (U)  |     1     |     1     |     1     |
         |       |  3 (V)  |     1     |     1     |     1     |
         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
         |       |  1 (Y)  |     2     |     2     |     0     |
         | 1, 65 |  2 (U)  |     1     |     1     |     1     |
         |       |  3 (V)  |     1     |     1     |     1     |
         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

水平な垂直なQuantizationはコンポーネント挽き割りトウモロコシ事実挽き割りトウモロコシ事実表番号++++++++++++++++++++++++++++をタイプします。| | 1 (Y)| 2 | 1 | 0 | | 0, 64 | 2 (U)| 1 | 1 | 1 | | | 3 (V)| 1 | 1 | 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | 1 (Y)| 2 | 2 | 0 | | 1, 65 | 2 (U)| 1 | 1 | 1 | | | 3 (V)| 1 | 1 | 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   These sampling factors indicate that the chrominance components of
   type 0 video is downsampled horizontally by 2 (often called 4:2:2)
   while the chrominance components of type 1 video are downsampled both
   horizontally and vertically by 2 (often called 4:2:0).

これらの標本抽出要素は、タイプ1ビデオの色差成分が2(しばしば4:2:0と呼ぶ)時までに水平に垂直にdownsampledされますが、2(しばしば4:2:2と呼ぶ)時までにタイプ0ビデオの色差成分が水平にdownsampledされるのを示します。

   Types 0 and 1 can be used to carry both progressively scanned and
   interlaced image data.  This is encoded using the Type-specific field
   in the main JPEG header.  The following values are defined:

次第にスキャンされて、ともに交錯しているイメージデータを運ぶのにタイプ0と1を使用できます。 これは、主なJPEGヘッダーのType特有の分野を使用することでコード化されます。 以下の値は定義されます:

      0 : Image is progressively scanned.  On a computer monitor, it can
          be displayed as-is at the specified width and height.

0 : イメージは次第にスキャンされます。 コンピュータ用モニターの上では、指定された幅と高さでそのままでそれを表示できます。

      1 : Image is an odd field of an interlaced video signal.  The
          height specified in the main JPEG header is half of the height
          of the entire displayed image.  This field should be de-
          interlaced with the even field following it such that lines
          from each of the images alternate.  Corresponding lines from
          the even field should appear just above those same lines from
          the odd field.

1 : イメージは交錯しているビデオ信号の変な分野です。 主なJPEGヘッダーで指定された高さは半分の全体の表示されたイメージの高さです。 同等の分野がそれに続いていてこの分野が反-交錯するべきであるので、それぞれのイメージからの線は交替されます。 同等の分野からの対応する線はそれらの同じ線のすぐ上に変な分野から現れるはずです。

      2 : Image is an even field of an interlaced video signal.

2 : イメージは交錯しているビデオ信号の同等の分野です。

      3 : Image is a single field from an interlaced video signal, but
          it should be displayed full frame as if it were received as
          both the odd & even fields of the frame.  On a computer
          monitor, each line in the image should be displayed twice,
          doubling the height of the image.

3 : イメージは交錯しているビデオ信号からのただ一つの分野ですが、それはまるでフレームの両方の変で同等の分野としてそれを受け取るかのように表示された完全なフレームであるべきです。 コンピュータ用モニターの上では、イメージの高さを倍にして、二度イメージによる各台詞を表示するべきです。

Berc, et. al.               Standards Track                     [Page 9]

RFC 2435              RTP Payload Format for JPEG           October 1998

et Berc、アル。 規格は1998年10月にJPEGのためにRFC2435RTP有効搭載量形式を追跡します[9ページ]。

   Appendix B contains C source code for transforming the RTP/JPEG
   header parameters into the JPEG frame and scan headers that are
   absent from the data payload.

付録BはRTP/JPEGヘッダーパラメタをデータペイロードから欠けているJPEGフレームとスキャンヘッダーに変えるためのCソースコードを含んでいます。

4.2.  The Q Field

4.2. Q分野

   For JPEG types 0 and 1 (and their corresponding types 64 and 65), Q
   values between 1 and 99 inclusive are defined as follows.  Other
   values less than 128 are reserved.  Additional types are encouraged
   to use this definition if applicable.

JPEGタイプ0と1(彼らの対応は64と65をタイプします)において、1と99の間で包括的なQ値は以下の通り定義されます。 他の値128は予約されています。 適切であるなら、追加タイプがこの定義を使用するよう奨励されます。

   Both type 0 and type 1 JPEG require two quantization tables.  These
   tables are calculated as follows.  For 1 <= Q <= 99, the Independent
   JPEG Group's formula [5] is used to produce a scale factor S as:

両方が0をタイプします、そして、タイプ1JPEGが2個の量子化テーブルを必要とします。 これらのテーブルは以下の通り計算されます。 Q<1<==99に関しては、無党派JPEG Groupの公式[5]は、以下として位取り因数Sを生産するのに使用されます。

           S = 5000 / Q          for  1 <= Q <= 50
             = 200 - 2 * Q       for 51 <= Q <= 99

SはQ<1<==50 = 200のための5000/Qと等しいです--51<のための2*QはQ<=99と等しいです。

   This value is then used to scale Tables K.1 and K.2 from [1]
   (saturating each value to 8 bits) to give quantization table numbers
   0 and 1, respectively.  C source code is provided in Appendix A to
   compute these tables.

そして、この値は、量子化表番号0と1を与えるために[1](各値を8ビットに飽和状態にする)からTables K.1とK.2をそれぞれスケーリングするのに使用されます。 これらのテーブルを計算するためにCソースコードをAppendix Aに提供します。

   For Q values 128-255, dynamically defined quantization tables are
   used.  These tables may be specified either in-band or out of band by
   something like a session setup protocol, but the Quantization Table
   header MUST be present in the first packet of every frame. When the
   tables are specified out of band, they may be omitted from the packet
   by setting the Length field in this header to 0.

For Q values 128-255, dynamically defined quantization tables are used. These tables may be specified either in-band or out of band by something like a session setup protocol, but the Quantization Table header MUST be present in the first packet of every frame. When the tables are specified out of band, they may be omitted from the packet by setting the Length field in this header to 0.

   When the quantization tables are sent in-band, they need not be sent
   with every frame.  Like the out of band case, frames which do not
   contain tables will have a Quantization Table header with a Length
   field of 0.  While this does decrease the overhead of including the
   tables, new receivers will be unable to properly decode frames from
   the time they start up until they receive the tables.

When the quantization tables are sent in-band, they need not be sent with every frame. Like the out of band case, frames which do not contain tables will have a Quantization Table header with a Length field of 0. While this does decrease the overhead of including the tables, new receivers will be unable to properly decode frames from the time they start up until they receive the tables.

4.3.  Fragmentation and Reassembly

4.3. Fragmentation and Reassembly

   Since JPEG frames can be large, they must often be fragmented.
   Frames SHOULD be fragmented into packets in a manner avoiding
   fragmentation at a lower level.  If support for partial frame
   decoding is desired, frames SHOULD be fragmented such that each
   packet contains an integral number of restart intervals (see below).

Since JPEG frames can be large, they must often be fragmented. Frames SHOULD be fragmented into packets in a manner avoiding fragmentation at a lower level. If support for partial frame decoding is desired, frames SHOULD be fragmented such that each packet contains an integral number of restart intervals (see below).

   Each packet that makes up a single frame MUST have the same
   timestamp, and the RTP marker bit MUST be set on the last packet in a
   frame.  The fragment offset field of each packet is set to the byte

Each packet that makes up a single frame MUST have the same timestamp, and the RTP marker bit MUST be set on the last packet in a frame. The fragment offset field of each packet is set to the byte

Berc, et. al.               Standards Track                    [Page 10]

RFC 2435              RTP Payload Format for JPEG           October 1998

Berc, et. al. Standards Track [Page 10] RFC 2435 RTP Payload Format for JPEG October 1998

   offset of its payload data within the original frame.  Packets making
   up a frame SHOULD be sent sequentially and the fragments they contain
   MUST NOT overlap one another.

offset of its payload data within the original frame. Packets making up a frame SHOULD be sent sequentially and the fragments they contain MUST NOT overlap one another.

   An entire frame can be identified as a sequence of packets beginning
   with a packet having a zero fragment offset and ending with a packet
   having the RTP marker bit set.  Missing packets can be detected
   either with RTP sequence numbers or with the fragment offset and
   lengths of each packet.  Reassembly could be carried out without the
   offset field (i.e., using only the RTP marker bit and sequence
   numbers), but an efficient single-copy implementation would not
   otherwise be possible in the presence of misordered packets.
   Moreover, if the last packet of the previous frame (containing the
   marker bit) were dropped, then a receiver could not always detect
   that the current frame is entirely intact.

An entire frame can be identified as a sequence of packets beginning with a packet having a zero fragment offset and ending with a packet having the RTP marker bit set. Missing packets can be detected either with RTP sequence numbers or with the fragment offset and lengths of each packet. Reassembly could be carried out without the offset field (i.e., using only the RTP marker bit and sequence numbers), but an efficient single-copy implementation would not otherwise be possible in the presence of misordered packets. Moreover, if the last packet of the previous frame (containing the marker bit) were dropped, then a receiver could not always detect that the current frame is entirely intact.

4.4.  Restart Markers

4.4. Restart Markers

   Restart markers indicate a point in the JPEG stream at which the
   Huffman decoder and DC predictors are reset, allowing partial
   decoding starting at that point.  To fully take advantage of this,
   however, a decoder must know which MCUs of a frame a particular
   restart interval encodes.  While the original JPEG specification does
   provide a small sequence number field in the restart markers for this
   purpose, it is not large enough to properly cope with the loss of an
   entire packet's worth of data at a typical network MTU size.  The
   RTP/JPEG Restart Marker header contains the additional information
   needed to accomplish this.

Restart markers indicate a point in the JPEG stream at which the Huffman decoder and DC predictors are reset, allowing partial decoding starting at that point. To fully take advantage of this, however, a decoder must know which MCUs of a frame a particular restart interval encodes. While the original JPEG specification does provide a small sequence number field in the restart markers for this purpose, it is not large enough to properly cope with the loss of an entire packet's worth of data at a typical network MTU size. The RTP/JPEG Restart Marker header contains the additional information needed to accomplish this.

   The size of restart intervals SHOULD be chosen to always allow an
   integral number of restart intervals to fit within a single packet.
   This will guarantee that packets can be decoded independently from
   one another.  If a restart interval ends up being larger than a
   packet, the F and L bits in the Restart Marker header can be used to
   fragment it, but the resulting set of packets must all be received by
   a decoder for that restart interval to be decoded properly.

The size of restart intervals SHOULD be chosen to always allow an integral number of restart intervals to fit within a single packet. This will guarantee that packets can be decoded independently from one another. If a restart interval ends up being larger than a packet, the F and L bits in the Restart Marker header can be used to fragment it, but the resulting set of packets must all be received by a decoder for that restart interval to be decoded properly.

   Once a decoder has received either a single packet with both the F
   and L bits set on or a contiguous sequence of packets (based on the
   RTP sequence number) which begin with an F bit and end with an L bit,
   it can begin decoding.  The position of the MCU at the beginning of
   the data can be determined by multiplying the Restart Count value by
   the Restart Interval value.  A packet (or group of packets as
   identified by the F and L bits) may contain any number of consecutive
   restart intervals.

Once a decoder has received either a single packet with both the F and L bits set on or a contiguous sequence of packets (based on the RTP sequence number) which begin with an F bit and end with an L bit, it can begin decoding. The position of the MCU at the beginning of the data can be determined by multiplying the Restart Count value by the Restart Interval value. A packet (or group of packets as identified by the F and L bits) may contain any number of consecutive restart intervals.

   To accommodate encoders which generate frames with restart markers in
   them but cannot fragment the data in this manner, the Restart Count

To accommodate encoders which generate frames with restart markers in them but cannot fragment the data in this manner, the Restart Count

Berc, et. al.               Standards Track                    [Page 11]

RFC 2435              RTP Payload Format for JPEG           October 1998

Berc, et. al. Standards Track [Page 11] RFC 2435 RTP Payload Format for JPEG October 1998

   field may be set to 0x3FFF with the F and L bits both set to 1.  This
   indicates to decoders that the entire frame must be reassembled
   before decoding it.

field may be set to 0x3FFF with the F and L bits both set to 1. This indicates to decoders that the entire frame must be reassembled before decoding it.

5.  Security Considerations

5. Security Considerations

   RTP packets using the payload format defined in this specification
   are subject to the security considerations discussed in the RTP
   specification [6], and any appropriate RTP profile (for example [7]).
   This implies that confidentiality of the media streams is achieved by
   encryption. Because the data compression used with this payload
   format is applied end-to-end, encryption may be performed after
   compression so there is no conflict between the two operations.

RTP packets using the payload format defined in this specification are subject to the security considerations discussed in the RTP specification [6], and any appropriate RTP profile (for example [7]). This implies that confidentiality of the media streams is achieved by encryption. Because the data compression used with this payload format is applied end-to-end, encryption may be performed after compression so there is no conflict between the two operations.

   A potential denial-of-service threat exists for data encodings using
   compression techniques that have non-uniform receiver-end
   computational load.  The attacker can inject pathological datagrams
   into the stream which are complex to decode and cause the receiver to
   be overloaded.  However, this encoding does not exhibit any
   significant non-uniformity.

A potential denial-of-service threat exists for data encodings using compression techniques that have non-uniform receiver-end computational load. The attacker can inject pathological datagrams into the stream which are complex to decode and cause the receiver to be overloaded. However, this encoding does not exhibit any significant non-uniformity.

   Another potential denial-of-service threat exists around the
   fragmentation mechanism presented here.  Receivers should be prepared
   to limit the total amount of data associated with assembling received
   frames so as to avoid resource exhaustion.

Another potential denial-of-service threat exists around the fragmentation mechanism presented here. Receivers should be prepared to limit the total amount of data associated with assembling received frames so as to avoid resource exhaustion.

   As with any IP-based protocol, in some circumstances a receiver may
   be overloaded simply by the receipt of too many packets, either
   desired or undesired.  Network-layer authentication may be used to
   discard packets from undesired sources, but the processing cost of
   the authentication itself may be too high.  In a multicast
   environment, pruning of specific sources will be implemented in a
   future version of IGMP [8] and in multicast routing protocols to
   allow a receiver to select which sources are allowed to reach it.

As with any IP-based protocol, in some circumstances a receiver may be overloaded simply by the receipt of too many packets, either desired or undesired. Network-layer authentication may be used to discard packets from undesired sources, but the processing cost of the authentication itself may be too high. In a multicast environment, pruning of specific sources will be implemented in a future version of IGMP [8] and in multicast routing protocols to allow a receiver to select which sources are allowed to reach it.

   A security review of this payload format found no additional
   considerations beyond those in the RTP specification.

A security review of this payload format found no additional considerations beyond those in the RTP specification.

Berc, et. al.               Standards Track                    [Page 12]

RFC 2435              RTP Payload Format for JPEG           October 1998

Berc, et. al. Standards Track [Page 12] RFC 2435 RTP Payload Format for JPEG October 1998

6.  Authors' Addresses

6. Authors' Addresses

   Lance M. Berc
   Systems Research Center
   Digital Equipment Corporation
   130 Lytton Ave
   Palo Alto CA 94301

Lance M. Berc Systems Research Center Digital Equipment Corporation 130 Lytton Ave Palo Alto CA 94301

   Phone: +1 650 853 2100
   EMail: berc@pa.dec.com

Phone: +1 650 853 2100 EMail: berc@pa.dec.com

   William C. Fenner
   Xerox PARC
   3333 Coyote Hill Road
   Palo Alto, CA 94304

William C. Fenner Xerox PARC 3333 Coyote Hill Road Palo Alto, CA 94304

   Phone: +1 650 812 4816
   EMail: fenner@parc.xerox.com

Phone: +1 650 812 4816 EMail: fenner@parc.xerox.com

   Ron Frederick
   Xerox PARC
   3333 Coyote Hill Road
   Palo Alto, CA 94304

Ron Frederick Xerox PARC 3333 Coyote Hill Road Palo Alto, CA 94304

   Phone: +1 650 812 4459
   EMail: frederick@parc.xerox.com

Phone: +1 650 812 4459 EMail: frederick@parc.xerox.com

   Steven McCanne
   University of California at Berkeley
   Electrical Engineering and Computer Science
   633 Soda Hall
   Berkeley, CA 94720

Steven McCanne University of California at Berkeley Electrical Engineering and Computer Science 633 Soda Hall Berkeley, CA 94720

   Phone: +1 510 642 0865
   EMail: mccanne@cs.berkeley.edu

Phone: +1 510 642 0865 EMail: mccanne@cs.berkeley.edu

   Paul Stewart
   Xerox PARC
   3333 Coyote Hill Road
   Palo Alto, CA 94304

Paul Stewart Xerox PARC 3333 Coyote Hill Road Palo Alto, CA 94304

   Phone: +1 650 812 4821
   EMail: stewart@parc.xerox.com

Phone: +1 650 812 4821 EMail: stewart@parc.xerox.com

Berc, et. al.               Standards Track                    [Page 13]

RFC 2435              RTP Payload Format for JPEG           October 1998

Berc, et. al. Standards Track [Page 13] RFC 2435 RTP Payload Format for JPEG October 1998

7.  References

7. References

   [1]  ISO DIS 10918-1. Digital Compression and Coding of Continuous-
        tone Still Images (JPEG), CCITT Recommendation T.81.

[1] ISO DIS 10918-1. Digital Compression and Coding of Continuous- tone Still Images (JPEG), CCITT Recommendation T.81.

   [2]  William B. Pennebaker, Joan L. Mitchell, JPEG: Still Image Data
        Compression Standard, Van Nostrand Reinhold, 1993.

[2] William B. Pennebaker, Joan L. Mitchell, JPEG: Still Image Data Compression Standard, Van Nostrand Reinhold, 1993.

   [3]  Gregory K. Wallace, The JPEG Sill Picture Compression Standard,
        Communications of the ACM, April 1991, Vol 34, No. 1, pp. 31-44.

[3] Gregory K. Wallace, The JPEG Sill Picture Compression Standard, Communications of the ACM, April 1991, Vol 34, No. 1, pp. 31-44.

   [4]  The JPEG File Interchange Format.  Maintained by C-Cube
        Microsystems, Inc., and available in
        ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz.

[4] The JPEG File Interchange Format. Maintained by C-Cube Microsystems, Inc., and available in ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz.

   [5]  Tom Lane et. al., The Independent JPEG Group software JPEG
        codec.  Source code available in
        ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6a.tar.gz.

[5] Tom Lane et. al., The Independent JPEG Group software JPEG codec. Source code available in ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6a.tar.gz.

   [6]  Schulzrinne, H., Casner, S., Frederick, R. and V. Jacobson,
        "RTP: A Transport Protocol for Real-Time Applications", RFC
        1889, January 1996.

[6] Schulzrinne, H., Casner, S., Frederick, R. and V. Jacobson, "RTP: A Transport Protocol for Real-Time Applications", RFC 1889, January 1996.

   [7]  Schulzrinne, H., "RTP Profile for Audio and Video Conferences
        with Minimal Control", RFC 1890, January 1996.

[7] Schulzrinne, H., "RTP Profile for Audio and Video Conferences with Minimal Control", RFC 1890, January 1996.

   [8]  Fenner, W., "Internet Group Management Protocol Version 2", RFC
        2236, November 1997.

[8] Fenner, W., "Internet Group Management Protocol Version 2", RFC 2236, November 1997.

   [9]  Bradner, S., "Key words for use in RFCs to Indicate Requirement
        Levels", BCP 14, RFC 2119, March 1997.

[9] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

   [10] Kent C., and J. Mogul, "Fragmentation Considered Harmful",
        Proceedings of the ACM SIGCOMM '87 Workshop on Frontiers in
        Computer Communications Technology, August 1987.

[10] Kent C., and J. Mogul, "Fragmentation Considered Harmful", Proceedings of the ACM SIGCOMM '87 Workshop on Frontiers in Computer Communications Technology, August 1987.

Berc, et. al.               Standards Track                    [Page 14]

RFC 2435              RTP Payload Format for JPEG           October 1998

Berc, et. al. Standards Track [Page 14] RFC 2435 RTP Payload Format for JPEG October 1998

Appendix A

Appendix A

   The following code can be used to create a quantization table from a
   Q factor:

The following code can be used to create a quantization table from a Q factor:

/*
 * Table K.1 from JPEG spec.
 */
static const int jpeg_luma_quantizer[64] = {
        16, 11, 10, 16, 24, 40, 51, 61,
        12, 12, 14, 19, 26, 58, 60, 55,
        14, 13, 16, 24, 40, 57, 69, 56,
        14, 17, 22, 29, 51, 87, 80, 62,
        18, 22, 37, 56, 68, 109, 103, 77,
        24, 35, 55, 64, 81, 104, 113, 92,
        49, 64, 78, 87, 103, 121, 120, 101,
        72, 92, 95, 98, 112, 100, 103, 99
};

/* * Table K.1 from JPEG spec. */ static const int jpeg_luma_quantizer[64] = { 16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99 };

/*
 * Table K.2 from JPEG spec.
 */
static const int jpeg_chroma_quantizer[64] = {
        17, 18, 24, 47, 99, 99, 99, 99,
        18, 21, 26, 66, 99, 99, 99, 99,
        24, 26, 56, 99, 99, 99, 99, 99,
        47, 66, 99, 99, 99, 99, 99, 99,
        99, 99, 99, 99, 99, 99, 99, 99,
        99, 99, 99, 99, 99, 99, 99, 99,
        99, 99, 99, 99, 99, 99, 99, 99,
        99, 99, 99, 99, 99, 99, 99, 99
};

/* * Table K.2 from JPEG spec. */ static const int jpeg_chroma_quantizer[64] = { 17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99 };

/*
 * Call MakeTables with the Q factor and two u_char[64] return arrays
 */
void
MakeTables(int q, u_char *lqt, u_char *cqt)
{
  int i;
  int factor = q;

/* * Call MakeTables with the Q factor and two u_char[64] return arrays */ void MakeTables(int q, u_char *lqt, u_char *cqt) { int i; int factor = q;

  if (q < 1) factor = 1;
  if (q > 99) factor = 99;
  if (q < 50)
    q = 5000 / factor;
  else
    q = 200 - factor*2;

if (q < 1) factor = 1; if (q > 99) factor = 99; if (q < 50) q = 5000 / factor; else q = 200 - factor*2;

Berc, et. al.               Standards Track                    [Page 15]

RFC 2435              RTP Payload Format for JPEG           October 1998

Berc, et. al. Standards Track [Page 15] RFC 2435 RTP Payload Format for JPEG October 1998

  for (i=0; i < 64; i++) {
    int lq = (jpeg_luma_quantizer[i] * q + 50) / 100;
    int cq = (jpeg_chroma_quantizer[i] * q + 50) / 100;

for (i=0; i < 64; i++) { int lq = (jpeg_luma_quantizer[i] * q + 50) / 100; int cq = (jpeg_chroma_quantizer[i] * q + 50) / 100;

    /* Limit the quantizers to 1 <= q <= 255 */
    if (lq < 1) lq = 1;
    else if (lq > 255) lq = 255;
    lqt[i] = lq;

/* Limit the quantizers to 1 <= q <= 255 */ if (lq < 1) lq = 1; else if (lq > 255) lq = 255; lqt[i] = lq;

    if (cq < 1) cq = 1;
    else if (cq > 255) cq = 255;
    cqt[i] = cq;
  }
}

if (cq < 1) cq = 1; else if (cq > 255) cq = 255; cqt[i] = cq; } }

Berc, et. al.               Standards Track                    [Page 16]

RFC 2435              RTP Payload Format for JPEG           October 1998

Berc, et. al. Standards Track [Page 16] RFC 2435 RTP Payload Format for JPEG October 1998

Appendix B

Appendix B

   The following routines can be used to create the JPEG marker segments
   corresponding to the table-specification data that is absent from the
   RTP/JPEG body.

The following routines can be used to create the JPEG marker segments corresponding to the table-specification data that is absent from the RTP/JPEG body.

u_char lum_dc_codelens[] = {
        0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
};

u_char lum_dc_codelens[] = { 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, };

u_char lum_dc_symbols[] = {
        0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
};

u_char lum_dc_symbols[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, };

u_char lum_ac_codelens[] = {
        0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d,
};

u_char lum_ac_codelens[] = { 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d, };

u_char lum_ac_symbols[] = {
        0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,
        0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07,
        0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08,
        0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0,
        0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16,
        0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28,
        0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
        0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
        0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
        0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
        0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
        0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
        0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98,
        0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
        0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6,
        0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5,
        0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4,
        0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2,
        0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea,
        0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
        0xf9, 0xfa,
};

u_char lum_ac_symbols[] = { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, };

u_char chm_dc_codelens[] = {
        0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
};

u_char chm_dc_codelens[] = { 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, };

u_char chm_dc_symbols[] = {
        0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,

u_char chm_dc_symbols[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,

Berc, et. al.               Standards Track                    [Page 17]

RFC 2435              RTP Payload Format for JPEG           October 1998

Berc, et. al. Standards Track [Page 17] RFC 2435 RTP Payload Format for JPEG October 1998

};

};

u_char chm_ac_codelens[] = {
        0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77,
};

u_char chm_ac_codelens[] = { 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77, };

u_char chm_ac_symbols[] = {
        0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21,
        0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
        0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91,
        0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0,
        0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34,
        0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26,
        0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38,
        0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
        0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
        0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
        0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
        0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
        0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96,
        0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5,
        0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4,
        0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3,
        0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2,
        0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda,
        0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
        0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
        0xf9, 0xfa,
};

u_char chm_ac_symbols[] = { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34, 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, };

u_char *
MakeQuantHeader(u_char *p, u_char *qt, int tableNo)
{
        *p++ = 0xff;
        *p++ = 0xdb;            /* DQT */
        *p++ = 0;               /* length msb */
        *p++ = 67;              /* length lsb */
        *p++ = tableNo;
        memcpy(p, qt, 64);
        return (p + 64);
}

u_char * MakeQuantHeader(u_char *p, u_char *qt, int tableNo) { *p++ = 0xff; *p++ = 0xdb; /* DQT */ *p++ = 0; /* length msb */ *p++ = 67; /* length lsb */ *p++ = tableNo; memcpy(p, qt, 64); return (p + 64); }

u_char *
MakeHuffmanHeader(u_char *p, u_char *codelens, int ncodes,
                  u_char *symbols, int nsymbols, int tableNo,
                  int tableClass)
{
        *p++ = 0xff;

u_char * MakeHuffmanHeader(u_char *p, u_char *codelens, int ncodes, u_char *symbols, int nsymbols, int tableNo, int tableClass) { *p++ = 0xff;

Berc, et. al.               Standards Track                    [Page 18]

RFC 2435              RTP Payload Format for JPEG           October 1998

Berc, et. al. Standards Track [Page 18] RFC 2435 RTP Payload Format for JPEG October 1998

        *p++ = 0xc4;            /* DHT */
        *p++ = 0;               /* length msb */
        *p++ = 3 + ncodes + nsymbols; /* length lsb */
        *p++ = (tableClass << 4) | tableNo;
        memcpy(p, codelens, ncodes);
        p += ncodes;
        memcpy(p, symbols, nsymbols);
        p += nsymbols;
        return (p);
}

*p++ = 0xc4; /* DHT */ *p++ = 0; /* length msb */ *p++ = 3 + ncodes + nsymbols; /* length lsb */ *p++ = (tableClass << 4) | tableNo; memcpy(p, codelens, ncodes); p += ncodes; memcpy(p, symbols, nsymbols); p += nsymbols; return (p); }

u_char *
MakeDRIHeader(u_char *p, u_short dri) {
        *p++ = 0xff;
        *p++ = 0xdd;            /* DRI */
        *p++ = 0x0;             /* length msb */
        *p++ = 4;               /* length lsb */
        *p++ = dri >> 8;        /* dri msb */
        *p++ = dri & 0xff;      /* dri lsb */
        return (p);
}

u_char * MakeDRIHeader(u_char *p, u_short dri) { *p++ = 0xff; *p++ = 0xdd; /* DRI */ *p++ = 0x0; /* length msb */ *p++ = 4; /* length lsb */ *p++ = dri >> 8; /* dri msb */ *p++ = dri & 0xff; /* dri lsb */ return (p); }

/*
 *  Arguments:
 *    type, width, height: as supplied in RTP/JPEG header
 *    lqt, cqt: quantization tables as either derived from
 *         the Q field using MakeTables() or as specified
 *         in section 4.2.
 *    dri: restart interval in MCUs, or 0 if no restarts.
 *
 *    p: pointer to return area
 *
 *  Return value:
 *    The length of the generated headers.
 *
 *    Generate a frame and scan headers that can be prepended to the
 *    RTP/JPEG data payload to produce a JPEG compressed image in
 *    interchange format (except for possible trailing garbage and
 *    absence of an EOI marker to terminate the scan).
 */
int MakeHeaders(u_char *p, int type, int w, int h, u_char *lqt,
                u_char *cqt, u_short dri)
{
        u_char *start = p;

/* * Arguments: * type, width, height: as supplied in RTP/JPEG header * lqt, cqt: quantization tables as either derived from * the Q field using MakeTables() or as specified * in section 4.2. * dri: restart interval in MCUs, or 0 if no restarts. * * p: pointer to return area * * Return value: * The length of the generated headers. * * Generate a frame and scan headers that can be prepended to the * RTP/JPEG data payload to produce a JPEG compressed image in * interchange format (except for possible trailing garbage and * absence of an EOI marker to terminate the scan). */ int MakeHeaders(u_char *p, int type, int w, int h, u_char *lqt, u_char *cqt, u_short dri) { u_char *start = p;

        /* convert from blocks to pixels */
        w <<= 3;
        h <<= 3;

/* convert from blocks to pixels */ w <<= 3; h <<= 3;

Berc, et. al.               Standards Track                    [Page 19]

RFC 2435              RTP Payload Format for JPEG           October 1998

Berc, et. al. Standards Track [Page 19] RFC 2435 RTP Payload Format for JPEG October 1998

        *p++ = 0xff;
        *p++ = 0xd8;            /* SOI */

*p++ = 0xff; *p++ = 0xd8; /* SOI */

        p = MakeQuantHeader(p, lqt, 0);
        p = MakeQuantHeader(p, cqt, 1);

p = MakeQuantHeader(p, lqt, 0); p = MakeQuantHeader(p, cqt, 1);

        if (dri != 0)
                p = MakeDRIHeader(p, dri);

if (dri != 0) p = MakeDRIHeader(p, dri);

        *p++ = 0xff;
        *p++ = 0xc0;            /* SOF */
        *p++ = 0;               /* length msb */
        *p++ = 17;              /* length lsb */
        *p++ = 8;               /* 8-bit precision */
        *p++ = h >> 8;          /* height msb */
        *p++ = h;               /* height lsb */
        *p++ = w >> 8;          /* width msb */
        *p++ = w;               /* wudth lsb */
        *p++ = 3;               /* number of components */
        *p++ = 0;               /* comp 0 */
        if (type == 0)
                *p++ = 0x21;    /* hsamp = 2, vsamp = 1 */
        else
                *p++ = 0x22;    /* hsamp = 2, vsamp = 2 */
        *p++ = 0;               /* quant table 0 */
        *p++ = 1;               /* comp 1 */
        *p++ = 0x11;            /* hsamp = 1, vsamp = 1 */
        *p++ = 1;               /* quant table 1 */
        *p++ = 2;               /* comp 2 */
        *p++ = 0x11;            /* hsamp = 1, vsamp = 1 */
        *p++ = 1;               /* quant table 1 */
        p = MakeHuffmanHeader(p, lum_dc_codelens,
                              sizeof(lum_dc_codelens),
                              lum_dc_symbols,
                              sizeof(lum_dc_symbols), 0, 0);
        p = MakeHuffmanHeader(p, lum_ac_codelens,
                              sizeof(lum_ac_codelens),
                              lum_ac_symbols,
                              sizeof(lum_ac_symbols), 0, 1);
        p = MakeHuffmanHeader(p, chm_dc_codelens,
                              sizeof(chm_dc_codelens),
                              chm_dc_symbols,
                              sizeof(chm_dc_symbols), 1, 0);
        p = MakeHuffmanHeader(p, chm_ac_codelens,
                              sizeof(chm_ac_codelens),
                              chm_ac_symbols,
                              sizeof(chm_ac_symbols), 1, 1);

*p++ = 0xff; *p++ = 0xc0; /* SOF */ *p++ = 0; /* length msb */ *p++ = 17; /* length lsb */ *p++ = 8; /* 8-bit precision */ *p++ = h >> 8; /* height msb */ *p++ = h; /* height lsb */ *p++ = w >> 8; /* width msb */ *p++ = w; /* wudth lsb */ *p++ = 3; /* number of components */ *p++ = 0; /* comp 0 */ if (type == 0) *p++ = 0x21; /* hsamp = 2, vsamp = 1 */ else *p++ = 0x22; /* hsamp = 2, vsamp = 2 */ *p++ = 0; /* quant table 0 */ *p++ = 1; /* comp 1 */ *p++ = 0x11; /* hsamp = 1, vsamp = 1 */ *p++ = 1; /* quant table 1 */ *p++ = 2; /* comp 2 */ *p++ = 0x11; /* hsamp = 1, vsamp = 1 */ *p++ = 1; /* quant table 1 */ p = MakeHuffmanHeader(p, lum_dc_codelens, sizeof(lum_dc_codelens), lum_dc_symbols, sizeof(lum_dc_symbols), 0, 0); p = MakeHuffmanHeader(p, lum_ac_codelens, sizeof(lum_ac_codelens), lum_ac_symbols, sizeof(lum_ac_symbols), 0, 1); p = MakeHuffmanHeader(p, chm_dc_codelens, sizeof(chm_dc_codelens), chm_dc_symbols, sizeof(chm_dc_symbols), 1, 0); p = MakeHuffmanHeader(p, chm_ac_codelens, sizeof(chm_ac_codelens), chm_ac_symbols, sizeof(chm_ac_symbols), 1, 1);

Berc, et. al.               Standards Track                    [Page 20]

RFC 2435              RTP Payload Format for JPEG           October 1998

Berc, et. al. Standards Track [Page 20] RFC 2435 RTP Payload Format for JPEG October 1998

        *p++ = 0xff;
        *p++ = 0xda;            /* SOS */
        *p++ = 0;               /* length msb */
        *p++ = 12;              /* length lsb */
        *p++ = 3;               /* 3 components */
        *p++ = 0;               /* comp 0 */
        *p++ = 0;               /* huffman table 0 */
        *p++ = 1;               /* comp 1 */
        *p++ = 0x11;            /* huffman table 1 */
        *p++ = 2;               /* comp 2 */
        *p++ = 0x11;            /* huffman table 1 */
        *p++ = 0;               /* first DCT coeff */
        *p++ = 63;              /* last DCT coeff */
        *p++ = 0;               /* sucessive approx. */

*p++ = 0xff; *p++ = 0xda; /* SOS */ *p++ = 0; /* length msb */ *p++ = 12; /* length lsb */ *p++ = 3; /* 3 components */ *p++ = 0; /* comp 0 */ *p++ = 0; /* huffman table 0 */ *p++ = 1; /* comp 1 */ *p++ = 0x11; /* huffman table 1 */ *p++ = 2; /* comp 2 */ *p++ = 0x11; /* huffman table 1 */ *p++ = 0; /* first DCT coeff */ *p++ = 63; /* last DCT coeff */ *p++ = 0; /* sucessive approx. */

        return (p - start);
};

return (p - start); };

Berc, et. al.               Standards Track                    [Page 21]

RFC 2435              RTP Payload Format for JPEG           October 1998

Berc, et. al. Standards Track [Page 21] RFC 2435 RTP Payload Format for JPEG October 1998

Appendix C

Appendix C

   The following routine is used to illustrate the RTP/JPEG packet
   fragmentation and header creation.

The following routine is used to illustrate the RTP/JPEG packet fragmentation and header creation.

   For clarity and brevity, the structure definitions are only valid for
   32-bit big-endian (most significant octet first) architectures. Bit
   fields are assumed to be packed tightly in big-endian bit order, with
   no additional padding. Modifications would be required to construct a
   portable implementation.

For clarity and brevity, the structure definitions are only valid for 32-bit big-endian (most significant octet first) architectures. Bit fields are assumed to be packed tightly in big-endian bit order, with no additional padding. Modifications would be required to construct a portable implementation.

/*
 * RTP data header from RFC1889
 */
typedef struct {
        unsigned int version:2;   /* protocol version */
        unsigned int p:1;         /* padding flag */
        unsigned int x:1;         /* header extension flag */
        unsigned int cc:4;        /* CSRC count */
        unsigned int m:1;         /* marker bit */
        unsigned int pt:7;        /* payload type */
        u_int16 seq;              /* sequence number */
        u_int32 ts;               /* timestamp */
        u_int32 ssrc;             /* synchronization source */
        u_int32 csrc[1];          /* optional CSRC list */
} rtp_hdr_t;

/* * RTP data header from RFC1889 */ typedef struct { unsigned int version:2; /* protocol version */ unsigned int p:1; /* padding flag */ unsigned int x:1; /* header extension flag */ unsigned int cc:4; /* CSRC count */ unsigned int m:1; /* marker bit */ unsigned int pt:7; /* payload type */ u_int16 seq; /* sequence number */ u_int32 ts; /* timestamp */ u_int32 ssrc; /* synchronization source */ u_int32 csrc[1]; /* optional CSRC list */ } rtp_hdr_t;

#define RTP_HDR_SZ 12

#define RTP_HDR_SZ 12

/* The following definition is from RFC1890 */
#define RTP_PT_JPEG             26

/* The following definition is from RFC1890 */ #define RTP_PT_JPEG 26

struct jpeghdr {
        unsigned int tspec:8;   /* type-specific field */
        unsigned int off:24;    /* fragment byte offset */
        u_int8 type;            /* id of jpeg decoder params */
        u_int8 q;               /* quantization factor (or table id) */
        u_int8 width;           /* frame width in 8 pixel blocks */
        u_int8 height;          /* frame height in 8 pixel blocks */
};

struct jpeghdr { unsigned int tspec:8; /* type-specific field */ unsigned int off:24; /* fragment byte offset */ u_int8 type; /* id of jpeg decoder params */ u_int8 q; /* quantization factor (or table id) */ u_int8 width; /* frame width in 8 pixel blocks */ u_int8 height; /* frame height in 8 pixel blocks */ };

struct jpeghdr_rst {
        u_int16 dri;
        unsigned int f:1;
        unsigned int l:1;
        unsigned int count:14;
};

struct jpeghdr_rst { u_int16 dri; unsigned int f:1; unsigned int l:1; unsigned int count:14; };

Berc, et. al.               Standards Track                    [Page 22]

RFC 2435              RTP Payload Format for JPEG           October 1998

Berc, et. al. Standards Track [Page 22] RFC 2435 RTP Payload Format for JPEG October 1998

struct jpeghdr_qtable {
        u_int8  mbz;
        u_int8  precision;
        u_int16 length;
};

struct jpeghdr_qtable { u_int8 mbz; u_int8 precision; u_int16 length; };

#define RTP_JPEG_RESTART           0x40

#define RTP_JPEG_RESTART 0x40

/* Procedure SendFrame:
 *
 *  Arguments:
 *    start_seq: The sequence number for the first packet of the current
 *               frame.
 *    ts: RTP timestamp for the current frame
 *    ssrc: RTP SSRC value
 *    jpeg_data: Huffman encoded JPEG scan data
 *    len: Length of the JPEG scan data
 *    type: The value the RTP/JPEG type field should be set to
 *    typespec: The value the RTP/JPEG type-specific field should be set
 *              to
 *    width: The width in pixels of the JPEG image
 *    height: The height in pixels of the JPEG image
 *    dri: The number of MCUs between restart markers (or 0 if there
 *         are no restart markers in the data
 *    q: The Q factor of the data, to be specified using the Independent
 *       JPEG group's algorithm if 1 <= q <= 99, specified explicitly
 *       with lqt and cqt if q >= 128, or undefined otherwise.
 *    lqt: The quantization table for the luminance channel if q >= 128
 *    cqt: The quantization table for the chrominance channels if
 *         q >= 128
 *
 *  Return value:
 *    the sequence number to be sent for the first packet of the next
 *    frame.
 *
 * The following are assumed to be defined:
 *
 * PACKET_SIZE                         - The size of the outgoing packet
 * send_packet(u_int8 *data, int len)  - Sends the packet to the network
 */

/* Procedure SendFrame: * * Arguments: * start_seq: The sequence number for the first packet of the current * frame. * ts: RTP timestamp for the current frame * ssrc: RTP SSRC value * jpeg_data: Huffman encoded JPEG scan data * len: Length of the JPEG scan data * type: The value the RTP/JPEG type field should be set to * typespec: The value the RTP/JPEG type-specific field should be set * to * width: The width in pixels of the JPEG image * height: The height in pixels of the JPEG image * dri: The number of MCUs between restart markers (or 0 if there * are no restart markers in the data * q: The Q factor of the data, to be specified using the Independent * JPEG group's algorithm if 1 <= q <= 99, specified explicitly * with lqt and cqt if q >= 128, or undefined otherwise. * lqt: The quantization table for the luminance channel if q >= 128 * cqt: The quantization table for the chrominance channels if * q >= 128 * * Return value: * the sequence number to be sent for the first packet of the next * frame. * * The following are assumed to be defined: * * PACKET_SIZE - The size of the outgoing packet * send_packet(u_int8 *data, int len) - Sends the packet to the network */

u_int16 SendFrame(u_int16 start_seq, u_int32 ts, u_int32 ssrc,
                   u_int8 *jpeg_data, int len, u_int8 type,
                   u_int8 typespec, int width, int height, int dri,
                   u_int8 q, u_int8 *lqt, u_int8 *cqt) {
        rtp_hdr_t rtphdr;
        struct jpeghdr jpghdr;
        struct jpeghdr_rst rsthdr;

u_int16 SendFrame(u_int16 start_seq, u_int32 ts, u_int32 ssrc, u_int8 *jpeg_data, int len, u_int8 type, u_int8 typespec, int width, int height, int dri, u_int8 q, u_int8 *lqt, u_int8 *cqt) { rtp_hdr_t rtphdr; struct jpeghdr jpghdr; struct jpeghdr_rst rsthdr;

Berc, et. al.               Standards Track                    [Page 23]

RFC 2435              RTP Payload Format for JPEG           October 1998

Berc, et. al. Standards Track [Page 23] RFC 2435 RTP Payload Format for JPEG October 1998

        struct jpeghdr_qtable qtblhdr;
        u_int8 packet_buf[PACKET_SIZE];
        u_int8 *ptr;
        int bytes_left = len;
        int seq = start_seq;
        int pkt_len, data_len;

struct jpeghdr_qtable qtblhdr; u_int8 packet_buf[PACKET_SIZE]; u_int8 *ptr; int bytes_left = len; int seq = start_seq; int pkt_len, data_len;

        /* Initialize RTP header
         */
        rtphdr.version = 2;
        rtphdr.p = 0;
        rtphdr.x = 0;
        rtphdr.cc = 0;
        rtphdr.m = 0;
        rtphdr.pt = RTP_PT_JPEG;
        rtphdr.seq = start_seq;
        rtphdr.ts = ts;
        rtphdr.ssrc = ssrc;

/* Initialize RTP header */ rtphdr.version = 2; rtphdr.p = 0; rtphdr.x = 0; rtphdr.cc = 0; rtphdr.m = 0; rtphdr.pt = RTP_PT_JPEG; rtphdr.seq = start_seq; rtphdr.ts = ts; rtphdr.ssrc = ssrc;

        /* Initialize JPEG header
         */
        jpghdr.tspec = typespec;
        jpghdr.off = 0;
        jpghdr.type = type | ((dri != 0) ? RTP_JPEG_RESTART : 0);
        jpghdr.q = q;
        jpghdr.width = width / 8;
        jpghdr.height = height / 8;

/* Initialize JPEG header */ jpghdr.tspec = typespec; jpghdr.off = 0; jpghdr.type = type | ((dri != 0) ? RTP_JPEG_RESTART : 0); jpghdr.q = q; jpghdr.width = width / 8; jpghdr.height = height / 8;

        /* Initialize DRI header
         */
        if (dri != 0) {
                rsthdr.dri = dri;
                rsthdr.f = 1;        /* This code does not align RIs */
                rsthdr.l = 1;
                rsthdr.count = 0x3fff;
        }

/* Initialize DRI header */ if (dri != 0) { rsthdr.dri = dri; rsthdr.f = 1; /* This code does not align RIs */ rsthdr.l = 1; rsthdr.count = 0x3fff; }

        /* Initialize quantization table header
         */
        if (q >= 128) {
                qtblhdr.mbz = 0;
                qtblhdr.precision = 0; /* This code uses 8 bit tables only */
                qtblhdr.length = 128;  /* 2 64-byte tables */
        }

/* Initialize quantization table header */ if (q >= 128) { qtblhdr.mbz = 0; qtblhdr.precision = 0; /* This code uses 8 bit tables only */ qtblhdr.length = 128; /* 2 64-byte tables */ }

        while (bytes_left > 0) {
                ptr = packet_buf + RTP_HDR_SZ;
                memcpy(ptr, &jpghdr, sizeof(jpghdr));

(_左の>0のバイト)である、ptrはパケット_buf+RTP_HDR_SZと等しいです; memcpy(ptr、およびjpghdr、sizeof(jpghdr))

Berc, et. al.               Standards Track                    [Page 24]

RFC 2435              RTP Payload Format for JPEG           October 1998

et Berc、アル。 規格は1998年10月にJPEGのためにRFC2435RTP有効搭載量形式を追跡します[24ページ]。

                ptr += sizeof(jpghdr);

ptr+=sizeof(jpghdr)。

                if (dri != 0) {
                        memcpy(ptr, &rsthdr, sizeof(rsthdr));
                        ptr += sizeof(rsthdr);
                }

(dri!=0)です。memcpy(ptr、およびrsthdr、sizeof(rsthdr))(ptr+=sizeof(rsthdr))

                if (q >= 128 && jpghdr.off == 0) {
                        memcpy(ptr, &qtblhdr, sizeof(qtblhdr));
                        ptr += sizeof(qtblhdr);
                        memcpy(ptr, lqt, 64);
                        ptr += 64;
                        memcpy(ptr, cqt, 64);
                        ptr += 64;
                }

(q>=128、jpghdr.off=0)memcpy(ptr、およびqtblhdr、sizeof(qtblhdr)); ptr+=sizeof(qtblhdr); memcpy(ptr、lqt、64); ptr+=64; memcpy(ptr、cqt、64)(ptr+=64)

                data_len = PACKET_SIZE - (ptr - packet_buf);
                if (data_len >= bytes_left) {
                        data_len = bytes_left;
                        rtphdr.m = 1;
                }

データ_len=PACKET_SIZE--(ptr--パケット_はbufされます)。 (データ_len>=バイト左_)データ_lenはバイト_左と等しいです; rtphdr.m=1

                memcpy(packet_buf, &rtphdr, RTP_HDR_SZ);
                memcpy(ptr, jpeg_data + jpghdr.off, data_len);

memcpy(パケット_buf、およびrtphdr、RTP_HDR_SZ)。 memcpy(ptr、jpeg_データ+jpghdr.off、データ_len)。

                send_packet(packet_buf, (ptr - packet_buf) + data_len);

_パケット(__パケットbuf、+ (ptr--パケット_buf)データlen)を送ってください。

                jpghdr.off += data_len;
                bytes_left -= data_len;
                rtphdr.seq++;
        }
        return rtphdr.seq;
}

jpghdr.off+=データ_len。 _バイト_左の-=データlen。 rtphdr.seq++。 rtphdr.seqを返してください。 }

Berc, et. al.               Standards Track                    [Page 25]

RFC 2435              RTP Payload Format for JPEG           October 1998

et Berc、アル。 規格は1998年10月にJPEGのためにRFC2435RTP有効搭載量形式を追跡します[25ページ]。

Appendix D

付録D

   This section outlines the changes between this document and its
   precdecessor, RFC 2035.  The changes to the protocol were made with
   an eye towards causing as few interoperability problems between
   implementations based on the older text and newer implementations,
   and indeed, many of the obsolete conventions can still be
   unambiguously decoded by a newer implementation.  However, use of the
   older conventions in newer implementations is strongly discouraged.

このセクションはこのドキュメントとそのprecdecessorの間の変化、RFC2035について概説します。 より古いテキストと、より新しい実現に基づく実現の間の同じくらいわずかな相互運用性問題しか引き起こさないのに目を向けてプロトコルへの変更をしました、そして、本当に、より新しい実現でまだ明白に時代遅れのコンベンションの多くを解読できます。 しかしながら、より新しい実現における、より古いコンベンションの使用は強くお勧めできないです。

    o   Types 0 and 1 have been augmented to allow for the encoding of
        interlaced video images, using 2 bits of the type-specific
        field.  See section 4.1 for details.

o タイプ0と1は交錯しているビデオ画像のコード化を考慮するために増大しました、タイプ特有の分野の2ビットを使用して。 詳細に関してセクション4.1を見てください。

    o   There has been discussion in the working group arguing for more
        flexibility in specifying the JPEG quantization tables.  This
        memo allows table coefficients to be specified explicitly
        through the use of an optional Quantization Table header,
        discussed in sections 3.1.8 and 4.2.

o JPEG量子化テーブルを指定する際に、より多くの柔軟性について賛成の議論をするワーキンググループには議論がありました。 このメモは、テーブル係数がセクション3.1.8と4.2で議論した任意のQuantization Tableヘッダーの使用で明らかに指定されるのを許容します。

    o   In RFC 2035, the encoding of restart marker information in the
        Type field made it difficult to add new types. Additionally, the
        type- specific field was used for the restart count, making it
        unavailable for other type-specific purposes.  This memo moves
        the restart marker indication to a particular bit in the Type
        field, and adds an optional header to hold the additional
        information required, leaving the type-specific field free for
        its intended purpose.  The handling of partial frame decoding
        was also made more robust against packet loss.  See sections
        3.1.7 and 4.4 for details.

o RFC2035では、Type分野での再開マーカー情報のコード化で、新しいタイプを加えるのは難しくなりました。 それを他のタイプ特有の目的を入手できなくして、さらに、タイプの特定の分野は再開カウントに使用されました。 このメモは、Type分野で再開マーカー指示を特定のビットに動かして、追加情報が必要であるままにするために任意のヘッダーを加えます、本来の目的のために無料でタイプ特有の野原を出て。 また、部分的なフレーム解読の取り扱いをパケット損失に対して、より強健にしました。 詳細に関してセクション3.1 .7と4.4を見てください。

Berc, et. al.               Standards Track                    [Page 26]

RFC 2435              RTP Payload Format for JPEG           October 1998

et Berc、アル。 規格は1998年10月にJPEGのためにRFC2435RTP有効搭載量形式を追跡します[26ページ]。

Full Copyright Statement

完全な著作権宣言文

   Copyright (C) The Internet Society (1998).  All Rights Reserved.

Copyright(C)インターネット協会(1998)。 All rights reserved。

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

それに関するこのドキュメントと翻訳は、コピーして、それが批評するか、またはそうでなければわかる他のもの、および派生している作品に提供するか、または準備されているかもしれなくて、コピーされて、発行されて、全体か一部広げられた実現を助けるかもしれません、どんな種類の制限なしでも、上の版権情報とこのパラグラフがそのようなすべてのコピーと派生している作品の上に含まれていれば。 しかしながら、このドキュメント自体は何らかの方法で変更されないかもしれません、インターネット協会か他のインターネット組織の版権情報か参照を取り除くのなどように、それを英語以外の言語に翻訳するのが著作権のための手順がインターネットStandardsの過程で定義したどのケースに従わなければならないか、必要に応じてさもなければ、インターネット標準を開発する目的に必要であるのを除いて。

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

上に承諾された限られた許容は、永久であり、インターネット協会、後継者または案配によって取り消されないでしょう。

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

このドキュメントとそして、「そのままで」という基礎とインターネットの振興発展を目的とする組織に、インターネット・エンジニアリング・タスク・フォースが速達の、または、暗示しているすべての保証を放棄するかどうかというここにことであり、他を含んでいて、含まれて、情報の使用がここに侵害しないどんな保証も少しもまっすぐになるという情報か市場性か特定目的への適合性のどんな黙示的な保証。

Berc, et. al.               Standards Track                    [Page 27]

et Berc、アル。 標準化過程[27ページ]

一覧

 RFC 1〜100  RFC 1401〜1500  RFC 2801〜2900  RFC 4201〜4300 
 RFC 101〜200  RFC 1501〜1600  RFC 2901〜3000  RFC 4301〜4400 
 RFC 201〜300  RFC 1601〜1700  RFC 3001〜3100  RFC 4401〜4500 
 RFC 301〜400  RFC 1701〜1800  RFC 3101〜3200  RFC 4501〜4600 
 RFC 401〜500  RFC 1801〜1900  RFC 3201〜3300  RFC 4601〜4700 
 RFC 501〜600  RFC 1901〜2000  RFC 3301〜3400  RFC 4701〜4800 
 RFC 601〜700  RFC 2001〜2100  RFC 3401〜3500  RFC 4801〜4900 
 RFC 701〜800  RFC 2101〜2200  RFC 3501〜3600  RFC 4901〜5000 
 RFC 801〜900  RFC 2201〜2300  RFC 3601〜3700  RFC 5001〜5100 
 RFC 901〜1000  RFC 2301〜2400  RFC 3701〜3800  RFC 5101〜5200 
 RFC 1001〜1100  RFC 2401〜2500  RFC 3801〜3900  RFC 5201〜5300 
 RFC 1101〜1200  RFC 2501〜2600  RFC 3901〜4000  RFC 5301〜5400 
 RFC 1201〜1300  RFC 2601〜2700  RFC 4001〜4100  RFC 5401〜5500 
 RFC 1301〜1400  RFC 2701〜2800  RFC 4101〜4200 

スポンサーリンク

COALESCE関数 NULL値でない最初の引数を返す

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る