Re: [AVTCORE] [Technical Errata Reported] RFC2435 (4094)

"Frederick, Ron" <ron.frederick@bluecoat.com> Tue, 17 February 2015 20:43 UTC

Return-Path: <ron.frederick@bluecoat.com>
X-Original-To: avt@ietfa.amsl.com
Delivered-To: avt@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B94A91A0097 for <avt@ietfa.amsl.com>; Tue, 17 Feb 2015 12:43:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.911
X-Spam-Level:
X-Spam-Status: No, score=-6.911 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y2BrlRm08ywG for <avt@ietfa.amsl.com>; Tue, 17 Feb 2015 12:43:18 -0800 (PST)
Received: from plsvl-mailgw-01.bluecoat.com (spf.bluecoat.com [199.91.133.11]) by ietfa.amsl.com (Postfix) with ESMTP id E98801A87C5 for <avt@ietf.org>; Tue, 17 Feb 2015 12:42:14 -0800 (PST)
Received: from pwsvl-exchts-06.internal.cacheflow.com (esxdev03.bluecoat.com [10.2.2.166]) by plsvl-mailgw-01.bluecoat.com (Postfix) with ESMTP id 749BE81A6D1; Tue, 17 Feb 2015 12:42:14 -0800 (PST)
Received: from pwsvl-excmbx-05.internal.cacheflow.com ([fe80::f848:d461:9aa9:59a8]) by pwsvl-exchts-06.internal.cacheflow.com ([fe80::8554:761:8def:a2e1%12]) with mapi id 14.03.0123.003; Tue, 17 Feb 2015 12:42:14 -0800
From: "Frederick, Ron" <ron.frederick@bluecoat.com>
To: Julius Friedman <juliusfriedman@gmail.com>
Thread-Topic: [AVTCORE] [Technical Errata Reported] RFC2435 (4094)
Thread-Index: AQHQPDU53kDg45vfj0Gx4JNI3XxmLZzzjn8AgAAKzQCAAljPAA==
Date: Tue, 17 Feb 2015 20:42:12 +0000
Message-ID: <893707E3-6213-405F-A245-604603FBA0F5@bluecoat.com>
References: <87sietgfoe.fsf@hobgoblin.ariadne.com> <54E1A696.8020500@ericsson.com> <CACFvNHW224B+J-b0mxcUxQarc2Ajcr+aasuEGrcM3QHe74=MTQ@mail.gmail.com>
In-Reply-To: <CACFvNHW224B+J-b0mxcUxQarc2Ajcr+aasuEGrcM3QHe74=MTQ@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.2.2.106]
Content-Type: text/plain; charset="utf-8"
Content-ID: <07D0404E13285D41A61F1AA5D6AC6A29@bluecoat.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: <http://mailarchive.ietf.org/arch/msg/avt/zmS7X0gEtqLz2Vyv3nSL47i3lAg>
Cc: "avt@ietf.org" <avt@ietf.org>
Subject: Re: [AVTCORE] [Technical Errata Reported] RFC2435 (4094)
X-BeenThere: avt@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Audio/Video Transport Core Maintenance <avt.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/avt>, <mailto:avt-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/avt/>
List-Post: <mailto:avt@ietf.org>
List-Help: <mailto:avt-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/avt>, <mailto:avt-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Feb 2015 20:43:20 -0000

Hi Julius,

On Feb 16, 2015, at 12:51 AM, Julius Friedman <juliusfriedman@gmail.com> wrote:
> And please, as per my final emails with Mr. Frederick, please do also see if there is a way to indicate somehow that progressive images would need to utilize a dynamic profile, the same for images which use components which are non incremental or do not start at 0.
> 
> In short, the standard doesn't explicitly tell people that if you want to do things like that you must use a dynamic profile.

Do you have a suggestion for how the wording can be improved on this point? This is actually spelled out in the current RFCs. For instance, in RFC 2435 section 2, there is the following text:

   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).

In section 4.1 it then goes on to say:

   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).

This specifically states that only the baseline DCT sequential mode is supported (ruling out progressive DCT mode when using these predefined types) and also specifies the exact set of components, their numbering, and the mapping from them to the corresponding quantization and Huffman tables.

> Part of these desires I have came from the upset that the standard didn't specify a standard way to use dynamic profiles, therefore even if I did utilize a dynamic one the receiver would need to know how to handle the format and kind of defeats the purpose of having a standard in the first place.

This is the responsibility of a session setup protocol, as covered in the last sentence of section 3.1.3:

   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).

> RFC2435 also specifically states progressive DCT would be supported in the profile but unfortunately it cannot be supported unless a dynamic profile is used or the DCT used is compatible with the interlaced DCT (coefficient wise) making it a interlaced image anyway.

We discussed this in our earlier e-mail exchange. The references in RFC 2435 are to the pre-defined types support “progressively scanned” image data, which is different from support for progressive DCT mode. Both progressive and interlaced images are supported, but the corresponding frames or interlaced fields are encoded independently, each as an entropy-coded segment containing a single JPEG scan using a subset of the baseline sequential DCT mode.

> I suppose even though the Quantization tables are not in the correct order that is because the RFC was only showing the tables, it would be up to someone to put them into the ZigZag order as per the JPEG spec.

I took a closer look at the sample code here, and the SendFrame() function that refers to these quantization tables is showing an example of how to format the RTP header data in the case where a dynamic Q value is used that requires that the tables be transmitted explicitly. In RTP, the quantization table data is NOT sent in zig-zag order, so I believe the sample code here is correct. If you have a custom quantization table coming from another source which is already in zig-zag order, this would need to be un-done before it is encoded in the RTP JPEG packet as in-band data.
-- 
Ron Frederick
ronf@bluecoat.com