RFC 2029

RTP Payload Format of Sun's CellB Video Encoding

๐Ÿ“… published October 1996, from ietf

RFC 2029: RTP Payload Format of Sun's CellB Video Encoding ๐ŸŽ€

Okay bestie, so this is an RFC from October 1996 (Standards Track ๐Ÿฆ‹) by M. Speer and D. Hoffman, both at Sun Microsystems, Inc. ๐Ÿ’… It's all about how to pack Sun's CellB video into RTP packets. It doesn't list anything it obsoletes or updates, so it's standing on its own โœจ

Status of this 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.

Abstract ๐ŸŒธ

This memo describes a packetization scheme for the CellB video encoding. The scheme proposed allows applications to transport CellB video flows over protocols used by RTP. This document is meant for implementors of video applications that want to use RTP and CellB.

1. Introduction ๐Ÿงš

The Cell image compression algorithm is a variable bit-rate video coding scheme. It gives you "high" quality, low bit-rate image compression at low computational cost ๐Ÿ”ฅ The bytestream the Cell encoder spits out is made of instructional codes plus info about the compressed image.

For more on Cell compression tech, check out [1]. There are currently two versions: CellA and CellB. CellA is mainly for encoding stored video meant for local display, so this memo won't cover it ๐Ÿ™ˆ

CellB is derived from CellA and was optimized for network-based video apps. It's computationally symmetric in both encode and decode, which is so iconic ๐Ÿ‘‘ CellB uses a fixed colormap and vector quantization techniques in the YUV color space to get its compression.

2. Network Packetization and Encapsulation ๐ŸŽ€

2.1 RTP Usage ๐Ÿ’–

The RTP timestamp is in units of 90KHz. Every packet payload for a frame uses the same timestamp value. The RTP maker bit marks the end of a frame โœจ

2.2 CellB Header ๐Ÿฆ‹

The CellB bytestream gets packetized so the packet stream is robust to packet loss, and that's the whole goal here ๐Ÿซถ To make it work, each RTP packet gets an extra header that uniquely identifies where the first cell of that packet sits inside the current frame. The frame's width and height in pixels also ride along in every CellB packet header. The size can only change between frames, but it's carried in every packet anyway to keep packet encoding simple ๐Ÿ’…

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       Cell X Location         |      Cell Y Location          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       Width of Image          |      Height of Image          |
   +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
   |                     Compressed CellB Data                     |
   |                             ....                              |
   +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+

Every field is a 16-bit unsigned integer in network byte order, and they all sit at the start of each RTP packet's payload. The Cell X and Cell Y Location coordinates are cell coordinates, not pixel coordinates ๐Ÿ“ Since cells are 4x4 blocks of pixels, the X or Y value of a cell coordinate goes from 0 up to 1/4 of that same dimension in pixel coordinates.

2.3 Packetization Rules ๐Ÿง

A packet can be any size the implementor picks, up to a full frame. All multi-byte codes must be completely contained within a packet. In general, the implementor should avoid packet sizes that cause fragmentation by the network ๐ŸŒˆ

3. References ๐Ÿ“š

1.      "Cell Image Compression Byte Stream Description,"
        ftp://playground.sun.com:/pub/multimedia/video/
        cellbytestream.ps.Z

2.      Turletti, T., and C. Huitema, "RTP Payload Format
        for H.261 Video Streams", RFC 2032, October 1996.

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

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

4 Authors' Addresses ๐Ÿ’Œ

Michael F. Speer
Sun Microsystems Computer Corporation
2550 Garcia Ave MailStop UMPK14-305
Mountain View, CA 94043

Voice: +1 415 786 6368
Fax: +1 415 786 6445
EMail: michael.speer@eng.sun.com


Don Hoffman
Sun Microsystems Computer Corporation
2550 Garcia Ave MailStop UMPK14-305
Mountain View, CA 94043

Voice: +1 415 786 6370
Fax: +1 415 786 6445
EMail: don.hoffman@eng.sun.com

Appendix A - Structure of the CellB Video Stream ๐Ÿฆ‹

The CellB bytestream is made of cell codes, skip codes, and quantization-table specific codes. Here's how each one works ๐Ÿงš

A.1 CellB Cell Code ๐Ÿ’Ž

Cell codes are 4 bytes long and describe a 4x4 pixel cell. Each cell has two possible luminance (Y) levels but only one pair of chrominance (UV) values. Here's the CellB cell code:

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0 M M M M M M M M M M M M M M M|U V U V U V U V|Y Y Y Y Y Y Y Y|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                4x4 Bitmask             U/V Code       Y/Y Code

The first two bytes are a bitmask. Each bit stands for one pixel in a 16-pixel cell. Bit 0 is the upper right-hand pixel of the cell, and the following bits go through the pixels in row-major order. If a pixel's bit is set in the 4x4 Bitmask, that pixel gets rendered with the value <Y(1), U, V>. If it isn't set, the pixel gets rendered with <Y(0), U, V>. The bitmask is normalized so the most significant bit is always 0 (meaning it corresponds to <Y(0), U, V>) โœจ

The U/V field holds the chrominance component. This code is an index into a table of vectors that represents two independent chrominance components.

The Y/Y field holds two luminance values, Y(0) and Y(1). This code is an index into a table of two-component luminance vectors.

How the U/V and Y/Y tables are derived is outside the scope of this memo. The full story is in [1] ๐Ÿ™ˆ

A.2 CellB Skip Code ๐Ÿšซ

The single-byte CellB skip code tells the decoder to skip the next S+1 cells in the current video frame being decoded. The most cells you can skip is 32. The skip code format is:

                     0 1 2 3 4 5 6 7
                    +-+-+-+-+-+-+-+-+
                    |1 0 0 S S S S S|
                    +-+-+-+-+-+-+-+-+

A.3 CellB Y/Y Table Code ๐ŸŒ™

The single-byte "new Y/Y table" code tells the decoder that the next 512 bytes are a new Y/Y quantization table. The code and the table layout are below. The sample encoder/decoder pair in this document doesn't implement this feature of CellB compression, but future CellB codecs might ๐Ÿ”ฎ

                     0 1 2 3 4 5 6 7
                    +-+-+-+-+-+-+-+-+
                    |1 1 1 1 1 1 1 0|
                    +-+-+-+-+-+-+-+-+

The new Y/Y table is laid out like this:

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |    Y1_000     |    Y2_000     |   Y1_001      |   Y2_001      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

             .
             .
             .

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |    Y1_254     |    Y2_254     |   Y1_255      |   Y2_255      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

A.4 CellB U/V Table Code ๐ŸŽจ

The single-byte "new U/V table" code tells the decoder that the next 512 bytes are a new U/V quantization table. The code is below. The sample encoder/decoder pair in this document doesn't implement this feature of CellB compression either, though future CellB codecs may ๐Ÿ’œ

                     0 1 2 3 4 5 6 7
                    +-+-+-+-+-+-+-+-+
                    |1 1 1 1 1 1 1 1|
                    +-+-+-+-+-+-+-+-+

The bytes of the new U/V quantization table are arranged like this:

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |    U_000      |    V_000      |   U_001       |   V_001       |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

             .
             .
             .

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |    U_254      |    V_254      |   U_255       |   V_255       |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Appendix B - Availability of CellB ๐ŸŒŸ

Sun Microsystems, Inc. takes the view that CellB is publicly available for use without any license. iconic, no license needed ๐ŸŒˆโœจ

๐Ÿ“ฆ where this page comes from