Re: [AVT] Clarification on Offer Answer usage of H.264 payload format (RFC 3984)

Randell Jesup <rjesup@wgate.com> Wed, 05 March 2008 00:11 UTC

Return-Path: <avt-bounces@ietf.org>
X-Original-To: ietfarch-avt-archive@core3.amsl.com
Delivered-To: ietfarch-avt-archive@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 3D9DE3A6B06; Tue, 4 Mar 2008 16:11:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.709
X-Spam-Level:
X-Spam-Status: No, score=-0.709 tagged_above=-999 required=5 tests=[AWL=-0.272, BAYES_00=-2.599, FH_RELAY_NODNS=1.451, HELO_MISMATCH_ORG=0.611, RDNS_NONE=0.1]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cdNZYEPbaALV; Tue, 4 Mar 2008 16:11:41 -0800 (PST)
Received: from core3.amsl.com (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 08C253A6BE9; Tue, 4 Mar 2008 16:11:41 -0800 (PST)
X-Original-To: avt@core3.amsl.com
Delivered-To: avt@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id E3C223A6BE9 for <avt@core3.amsl.com>; Tue, 4 Mar 2008 16:11:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Et+C2+bLn5wB for <avt@core3.amsl.com>; Tue, 4 Mar 2008 16:11:39 -0800 (PST)
Received: from exchange1.wgate.com (pr-66-150-46-254.wgate.com [66.150.46.254]) by core3.amsl.com (Postfix) with ESMTP id EBC383A6B06 for <avt@ietf.org>; Tue, 4 Mar 2008 16:11:36 -0800 (PST)
Received: from jesup.eng.wgate.com ([10.32.2.26]) by exchange1.wgate.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 4 Mar 2008 19:11:25 -0500
To: Magnus Westerlund <magnus.westerlund@ericsson.com>
References: <434D085D.6090606@ericsson.com>
From: Randell Jesup <rjesup@wgate.com>
Date: Tue, 04 Mar 2008 19:11:23 -0500
In-Reply-To: <434D085D.6090606@ericsson.com> (Magnus Westerlund's message of "Wed, 12 Oct 2005 14:58:05 +0200")
Message-ID: <ybuwsoi3u8k.fsf@jesup.eng.wgate.com>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
X-OriginalArrivalTime: 05 Mar 2008 00:11:25.0612 (UTC) FILETIME=[738ED6C0:01C87E55]
Cc: "Stephan Wenger (Nokia)" <Stephan.Wenger@nokia.com>, Miska.Hannuksela@nokia.com, IETF AVT WG <avt@ietf.org>, Dave Singer <singer@apple.com>
Subject: Re: [AVT] Clarification on Offer Answer usage of H.264 payload format (RFC 3984)
X-BeenThere: avt@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: Randell Jesup <rjesup@wgate.com>
List-Id: Audio/Video Transport Working Group <avt.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/avt>, <mailto:avt-request@ietf.org?subject=unsubscribe>
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>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: avt-bounces@ietf.org
Errors-To: avt-bounces@ietf.org

This is a response to a VERY old message (and there's been one long
discussion of this since then (last summer)).  

Magnus Westerlund <magnus.westerlund@ericsson.com> writes:
>We authors was made aware of an issue in the Offer/Answer usage for the
>H.264 RTP payload format by Tang Yongliang.
>
>The issue is that section 8.2.2 says:
>
>    o  The parameters identifying a media format configuration for H.264
>       are "profile-level-id", "packetization-mode", and, if required by
>       "packetization-mode", "sprop-deint-buf-req".  These three
>       parameters MUST be used symmetrically; i.e., the answerer MUST
>       either maintain all configuration parameters or remove the media
>       format (payload type) completely, if one or more of the parameter
>       values are not supported.
>
>And later
>
>"  o  Parameters declaring a configuration point are not downgradable,
>       with the exception of the level part of the "profile-level-id"
>       parameter."
>
>That is contradicting for the "profile-level-id" parameter. The intention
>of the authors was that the profile part (profile_idc and profile_iop)
>would be fixed but the level (level_idc) can be downgraded. That way you as
>an receiver state the profiles and highest level for that profile you are
>willing to accept. The answerer can then respond with the same profile but
>with a possibly lower level.
>
>So for clarification: An answerer MUST only maintain the profile_idc and
>profile_iop bytes of the profile-level-id value and MAY downgrade the level
>part.
>
>Please note: This may require the offering party to make a new offer to
>provide its "sprop" parameters correctly due to the reduction in level.
>
>However without this clarification the only way of getting a successful
>offer/answer for H.264 when not fully aware of the counter-parts
>capabilities would be to write one payload type for each profile-level
>combination that one could downgrade to.
>
>Any comments on this clarification?

Yes:

There is another side-effect on the text of RFC 3984 of this clarification.

In particular, this text (in description of Offer/Answer):

  o  The "sprop-parameter-sets" parameter is used as described above.
      In addition, an answerer MUST maintain all parameter sets received
      in the offer in its answer.  Depending on the value of the
      "parameter-add" parameter, different rules apply: If "parameter-
      add" is false (0), the answer MUST NOT add any additional
      parameter sets.  If "parameter-add" is true (1), the answerer, in
      its answer, MAY add additional parameter sets to the "sprop-
      parameter-sets" parameter.  The answerer MUST also, independent of
      the value of "parameter-add", accept to receive a video stream
      using the sprop-parameter-sets it declared in the answer.

         Informative note: care must be taken when parameter sets are
         added not to cause overwriting of already transmitted parameter
         sets by using conflicting parameter set identifiers.

is a real problem.

If you offer level 3.0, and include a level 3.0 sprop-paramater-set (which
you should), then per the above, I MUST maintain the 3.0 parameter-set in
my response.  If I want to respond with level 1.0, Magnus says above
that I can, but I'm going to have to include a level 3.0 parameter set.
I can also (if allowed by parameter-add) add a level 1.0 set.  When you add
this:

 o  The parameters "sprop-parameter-sets", "sprop-deint-buf-req",
      "sprop-interleaving-depth", "sprop-max-don-diff", and "sprop-
      init-buf-time" describe the properties of the NAL unit stream that
      the offerer or answerer is sending for this media format
      configuration.  This differs from the normal usage of the
      Offer/Answer parameters: normally such parameters declare the
      properties of the stream that the offerer or the answerer is able
      to receive.  When dealing with H.264, the offerer assumes that the
      answerer will be able to receive media encoded using the
      configuration being offered.

That says the offerer should assume the answerer can receive it, and the
previous quote says that the answerer MUST be willing to receive any
parameter-set in the answer, and it also says the answerer MUST maintain
the original parameter sets in the answer.  Since in most cases, the reason
for downgrading the level in a response is the inability to handle the
level of the offer, the answerer won't be able to handle video encoded
using the parameter sets from the offer.  

Thus, I see no way an answerer can validly answer with a downgrade unless
it internally decides to lie, and drop all video packets until the offerer
renegotiates to remove the unusable parameter sets.

Also, to verify: does this mean that offer-matching is done using the first
4 digits of profile-level-id (and packetization-mode and
sprop-deint-buf-req as needed)?  Should "is the same" (when applied to
profile-level-id) always mean "first 4 digits the same, and last two digits
be the same or lower"?


This really, really, really needs a rewrite.  It's also so complex, it
needs more examples, and if possible an informational(?) algorithm on
how to respond. Right now, I'm not certain *anyone* has come even close to
100% compliance.  (Maybe one or two have, but...)

Existing examples of H.264 traces I've seen show huge variations:

*) Many respond without a matching packetization-mode (i.e. respond to an
   offer of packetization-mode=1 with no packetization-mode)
*) Some respond with a level *higher* than the offer.
*) None I've seen include the sprop-parameter-sets from the offerer.
*) I haven't seen any that respect parameter-add, though given the previous
   point it may not matter.
*) Some don't even include profile-level-id at all.
*) Some accept packetization-mode=1 in the SDP, but send packetization-mode=0.
and there are more problems, that's just the start.  :-(

-- 
Randell Jesup, Worldgate (developers of the Ojo videophone), ex-Amiga OS team
rjesup@wgate.com
"The fetters imposed on liberty at home have ever been forged out of the weapons
provided for defence against real, pretended, or imaginary dangers from abroad."
		- James Madison, 4th US president (1751-1836)

_______________________________________________
Audio/Video Transport Working Group
avt@ietf.org
https://www.ietf.org/mailman/listinfo/avt