draft-ietf-avt-jpeg-new-00.txt   draft-ietf-avt-jpeg-new-01.txt 
Internet Engineering Task Force Audio-Video Transport Working Group Internet Engineering Task Force Audio-Video Transport Working Group
INTERNET-DRAFT L. Berc INTERNET-DRAFT L. Berc
draft-ietf-avt-jpeg-new-00.txt Digital Equipment Corporation draft-ietf-avt-jpeg-new-01.txt Digital Equipment Corporation
W. Fenner W. Fenner
Xerox PARC Xerox PARC
R. Frederick R. Frederick
Xerox PARC Xerox PARC
S. McCanne S. McCanne
Lawrence Berkeley Laboratory Lawrence Berkeley Laboratory
P. Stewart P. Stewart
Xerox PARC Xerox PARC
November 20, 1997 March 6, 1998
Expires April 1998 Expires September 1998
RTP Payload Format for JPEG-compressed Video RTP Payload Format for JPEG-compressed Video
Status of this Memo Status of this Memo
This document is an Internet Draft. Internet Drafts are working This document is an Internet Draft. Internet Drafts are working
documents of the Internet Engineering Task Force (IETF), its Areas, and documents of the Internet Engineering Task Force (IETF), its Areas, and
its Working Groups. Note that other groups may also distribute working its Working Groups. Note that other groups may also distribute working
documents as Internet Drafts. documents as Internet Drafts.
skipping to change at page 2, line 7 skipping to change at page 2, line 7
This memo describes the RTP payload format for JPEG video streams. This memo describes the RTP payload format for JPEG video streams.
The packet format is optimized for real-time video streams where The packet format is optimized for real-time video streams where
codec parameters change rarely from frame to frame. codec parameters change rarely from frame to frame.
This document is a product of the Audio-Video Transport working group This document is a product of the Audio-Video Transport working group
within the Internet Engineering Task Force. Comments are solicited and within the Internet Engineering Task Force. Comments are solicited and
should be addressed to the working group's mailing list at rem- should be addressed to the working group's mailing list at rem-
conf@es.net and/or the author(s). conf@es.net and/or the author(s).
Changes from RFC 2035
Most of this draft is identical to RFC 2035. The changes made to the
protocol are summarized in Appendix D.
1. Introduction 1. Introduction
The Joint Photographic Experts Group (JPEG) standard [1,2,3] defines a The Joint Photographic Experts Group (JPEG) standard [1,2,3] defines a
family of compression algorithms for continuous-tone, still images. family of compression algorithms for continuous-tone, still images.
This still image compression standard can be applied to video by This still image compression standard can be applied to video by
compressing each frame of video as an independent still image and compressing each frame of video as an independent still image and
transmitting them in series. Video coded in this fashion is often transmitting them in series. Video coded in this fashion is often
called Motion-JPEG. called Motion-JPEG.
We first give an overview of JPEG and then describe the specific subset We first give an overview of JPEG and then describe the specific subset
skipping to change at page 22, line 11 skipping to change at page 22, line 11
/* Procedure SendFrame: /* Procedure SendFrame:
* *
* Arguments: * Arguments:
* start_seq: The sequence number for the first packet of the current frame. * start_seq: The sequence number for the first packet of the current frame.
* ts: RTP timestamp for the current frame * ts: RTP timestamp for the current frame
* ssrc: RTP SSRC value * ssrc: RTP SSRC value
* jpeg_data: Huffman encoded JPEG scan data * jpeg_data: Huffman encoded JPEG scan data
* len: Length of the JPEG scan data * len: Length of the JPEG scan data
* type: The value the RTP/JPEG type field should be set to * 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 * typespec: The value the RTP/JPEG type-specific field should be set to
* width: The width in pixels of the JPEG image * width: The width in pixels of the JPEG image
* height: The height 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 ther are no * dri: The number of MCUs between restart markers (or 0 if ther are no
* restart markers in the data * restart markers in the data
* q: The Q factor of the data, to be specified using the Independent * q: The Q factor of the data, to be specified using the Independent
* JPEG group's algorithm if 1 <= q <= 99, specified explicitly with * JPEG group's algorithm if 1 <= q <= 99, specified explicitly with
* lqt and cqt if q >= 128, or undefined otherwise. * lqt and cqt if q >= 128, or undefined otherwise.
* lqt: The quantization table for the luminance channel if q >= 128 * lqt: The quantization table for the luminance channel if q >= 128
* cqt: The quantization table for the chrominance channels if q >= 128 * cqt: The quantization table for the chrominance channels if q >= 128
* *
skipping to change at page 23, line 26 skipping to change at page 23, line 26
/* Initialize DRI header /* Initialize DRI header
*/ */
if (dri != 0) { if (dri != 0) {
rsthdr.dri = dri; rsthdr.dri = dri;
rsthdr.f = 1; /* This code does not align RIs */ rsthdr.f = 1; /* This code does not align RIs */
rsthdr.l = 1; rsthdr.l = 1;
rsthdr.count = 0x3fff; rsthdr.count = 0x3fff;
} }
/* Initialize Q table header /* Initialize quantization table header
*/ */
if (q >= 128) { if (q >= 128) {
qtblhdr.mbz = 0; qtblhdr.mbz = 0;
qtblhdr.precision = 0; /* This code uses 8 bit tables only */ qtblhdr.precision = 0; /* This code uses 8 bit tables only */
qtblhdr.length = 128; /* 2 64-byte tables */ qtblhdr.length = 128; /* 2 64-byte tables */
} }
while (bytes_left > 0) { while (bytes_left > 0) {
ptr = packet_buf + RTP_HDR_SZ; ptr = packet_buf + RTP_HDR_SZ;
memcpy(ptr, &jpghdr, sizeof(jpghdr)); memcpy(ptr, &jpghdr, sizeof(jpghdr));
skipping to change at line 1055 skipping to change at page 24, line 21
memcpy(ptr, jpeg_data + jpghdr.off, data_len); memcpy(ptr, jpeg_data + jpghdr.off, data_len);
send_packet(packet_buf, (ptr - packet_buf) + data_len); send_packet(packet_buf, (ptr - packet_buf) + data_len);
jpghdr.off += data_len; jpghdr.off += data_len;
bytes_left -= data_len; bytes_left -= data_len;
rtphdr.seq++; rtphdr.seq++;
} }
return rtphdr.seq; return rtphdr.seq;
} }
Appendix 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.
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 There has been discussion in the working group arguing for more
flexibility in specifying the JPEG quantization tables. This draft
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 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 draft 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.
 End of changes. 

This html diff was produced by rfcdiff 1.23, available from http://www.levkowetz.com/ietf/tools/rfcdiff/