Re: [AVTCORE] HEVC in WebRTC: PR #17 (Guidance on RPSI)

Stephan Wenger <stewe@stewe.org> Thu, 28 September 2023 13:59 UTC

Return-Path: <stewe@stewe.org>
X-Original-To: avt@ietfa.amsl.com
Delivered-To: avt@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CDBABC15198B for <avt@ietfa.amsl.com>; Thu, 28 Sep 2023 06:59:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.908
X-Spam-Level:
X-Spam-Status: No, score=-1.908 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=steweorg.onmicrosoft.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v2O4PhpGTs_1 for <avt@ietfa.amsl.com>; Thu, 28 Sep 2023 06:59:26 -0700 (PDT)
Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2114.outbound.protection.outlook.com [40.107.223.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 56B98C151083 for <avt@ietf.org>; Thu, 28 Sep 2023 06:59:25 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lMrQ5VtNJ6DipL6RP+U1c/pjlhe82OpM7OIRmjCkhYZpkKKpuTOUWy//1f3H4iUf1FaqSkmAIqE0x4k8b7MVhAsWmIsccyicf2suILLYYHVBdJRmhq1s/ODyODlRoOFcm6BwP0iO7oeTGAodkIvHoZFWKzNoGFkbxSr7TABIvsstjntE55vVo68Ow8YEy/gGuvqix933nNeRzfqGeoC3kWCuoHkSxUn3JF8emAkZZ41NIBZdejLu1BlMDy9Ve00NxUJR2xFJeN1RwaEUtj6gauy3ok49ETB1zgTSXhb73B9bKYtpMieslCvVx8w2K5MFhtfQtcIxKxR7i5Uy/KtZow==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bvbCEnNzY3o12CKMZooC2AtoTG21YjMeTOJ7TSx/Jag=; b=FfYpCersIF2zp42yE7OC7B/u7vVbGhri8piPlGBeEp/rqog44goE/PuMPpL4MCl2AMjcVJtT2GVlAzb69qq2k8s3eR+mEklRCcsi2YQfr7SW7cciL7Uo0R/ssI0ddLITQ9E9vBVIARlvi3ikkItVLv8gX3W5WrkX+R7aW+XN4C2rVarjqamu2RfdcdvQbwEvZJ4zdfJvcerDbBp2TVFxh4HXWsXyAd9to3FlqY6OEpk2shfDvt/nDAs8Rc8I7+RPDLsWSMp/IPO+Xf1zpaZvM3shIhAVImSMhFKPPePhG0Kaj1usZgWhd+bUfGGAgmRFPK2zcTs1oQX724TdLbGebg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stewe.org; dmarc=pass action=none header.from=stewe.org; dkim=pass header.d=stewe.org; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=steweorg.onmicrosoft.com; s=selector2-steweorg-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bvbCEnNzY3o12CKMZooC2AtoTG21YjMeTOJ7TSx/Jag=; b=dJyQIkKWi7TkRqBAZ4pXpAjrU9FaEsXY8TJ0OUwitmWNb4llHl1Iw1l4AgNtFLLShxyy+BQiQojWLxjSpyPrjBlHlyUGNZ5Tz7cwX3keo+onth7bLt8JP5O+A++s31Ad8yIPU0iZs+9sxlz1gB1xLsxoPrHr9CH95GK5K2/YT18=
Received: from PH0PR17MB4908.namprd17.prod.outlook.com (2603:10b6:510:d6::23) by PH0PR17MB4421.namprd17.prod.outlook.com (2603:10b6:510:1e::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.28; Thu, 28 Sep 2023 13:59:22 +0000
Received: from PH0PR17MB4908.namprd17.prod.outlook.com ([fe80::1906:4f47:64dc:e1d0]) by PH0PR17MB4908.namprd17.prod.outlook.com ([fe80::1906:4f47:64dc:e1d0%4]) with mapi id 15.20.6792.026; Thu, 28 Sep 2023 13:59:22 +0000
From: Stephan Wenger <stewe@stewe.org>
To: Bernard Aboba <bernard.aboba@gmail.com>, IETF AVTCore WG <avt@ietf.org>
Thread-Topic: [AVTCORE] HEVC in WebRTC: PR #17 (Guidance on RPSI)
Thread-Index: AQHZ8b4v5WoIJCKD+U+8tJT0HVFTM7AwNue/
Date: Thu, 28 Sep 2023 13:59:22 +0000
Message-ID: <PH0PR17MB4908291294518D648220442AAEC1A@PH0PR17MB4908.namprd17.prod.outlook.com>
References: <CAOW+2dt8wECW8Qv8qatWvzJAOqq+Q6e_M6ggUCA8MGidcfo30A@mail.gmail.com>
In-Reply-To: <CAOW+2dt8wECW8Qv8qatWvzJAOqq+Q6e_M6ggUCA8MGidcfo30A@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=stewe.org;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: PH0PR17MB4908:EE_|PH0PR17MB4421:EE_
x-ms-office365-filtering-correlation-id: dc5d5003-c8d6-4c08-bfe5-08dbc02b1df3
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 9LP2eboj+cxrfP4FCdzGCTH62vLhCDxmZv0tp5R7JG5WDRlq9qDfjkYhy2gCGX3lc58t76DRlvMRlWVEehs7K5rTwhTmEc7dKuodQfUeaZ8QAcLJUFkBNglg8C9E/2MLXvCF1u1TaErqSwPrF8VkK2SIMwDidPhN3SWMU2Ol50b5grbjFvykOHi5bMknCtfd1Wu/PsJO8V1W8ga6ShzGH4vWPqC7sA+oDpu4dDLpAmrHrcfzj9QxKK7Ukr5tGFZ7kKvbJXIbPNj8HhM09Kea3JIKJWVhowJshfI1amI4vDHwWD3AfkGipCpQbpFCkOG6EZx64n794h8Y55Uj6+ZuemJBL8iOmOe0yw8j837/q+e8ybi5/IGmWnYSvcJl5RtzrItqz9UQzMR7xisfWowKlgdrbRd2QJHjF0x+d1Nf4s2U1svR3aiDMHzQdU45SMkD7u3YpSoEL52a0K+C+X91LeCPObD7FuclAsjsScDyOJyVPLmtdkSq2xaJi7rgJvmN0XMrApUKetBrgpX9zEVFWSCDhx1IdNjh3SHX0yYE3snWniHj6TFCpOv6vPsNkDZgSRKi5CFIXJIrqHbdQfaRA8vliKbcrCYQmjJa1w6hVgE=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR17MB4908.namprd17.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39830400003)(396003)(136003)(376002)(366004)(346002)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(9686003)(33656002)(6506007)(2906002)(7696005)(66899024)(53546011)(86362001)(55016003)(71200400001)(966005)(478600001)(8676002)(8936002)(166002)(38070700005)(122000001)(38100700002)(83380400001)(41300700001)(52536014)(5660300002)(316002)(26005)(66574015)(110136005)(66446008)(9326002)(76116006)(66476007)(66946007)(64756008)(66556008); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: A/spTXgnDzJEZrlMsvLEyIc1MzG0pjRFxCpc+c7DAtQt7p8MhdU2o0W9+Mah+kJC8otYfpEcinuh/oKL4ofvC8ltEm/pm22qKe+iTfhpLDRKosX6RXmCCAkdU3yt2CyAYgsgDPf4JgwIzpZ/fp9DA9G+yb2mx7b+9U+veIVyRx44oE2nSpQ0XCR9DKoqJe3Bv4uYr79yS6tl/iwhbOlpCxMUGarNVr/pdYZqSXUj8rQm8y9e/ZWZ45Y7C5x/S59cE/JgU/zM9vbGYjvgWgz1SnWGcxQOeI/ZZxibd3pSKqf7piDS3Ina8grwRqw7oJy9JcgAVPDnyR1lQi3nJ+1xQn7XmxcQiK+lOUVoDPLap/9MYiKHxRqll4T24YDKhQifS3BOxko2C5mp1ipXbnYy85aGORRgTLd4fKepAhooNh5jytJ44mbwkESiDiMD7aogr1ZBJ8O6vDzIVfT9JWisZo40uCgV6oSMhf7YeJB5fc7GkBNTHE1y0D0O28llChrDUMY1LkYx3bOhvLqFjpbjkMMe49VYZa+cnWkKfGWIu4LTxBxs/2F9aPKw+6Cu3pTn1LRqSwBfdPcDtJZcel37c+wEFCqODICecRtpGxSuLbyeXoJ84lO1dO1Vn1pWKl93xQiJgJdQgqXZlIeVxRx/Us/XRXU5QYJ+2mQaDzzZU0bcllxYhoPqn8m+v7Vb26ETYhgRvo6GjBVt/OEKghjOiJWN718Un8PiuAIJvRe33M/lnf8d9Zsggq1clm4I7lMogKCJkL9zKP3nfQlwEEB6MBoKFiSPP+qITyVWmB8sNSxdXMSHMkRGA+miLbMZumfMXOgbgk2lJp1+g74G1tX+zwZarEkTkF1U9NwrcffKfyEJ+nv0BrhLT544TtJdlk0tfQz0DvWeIXfTYmDLzZI1kSS6iekcd3W2hrJvmNubHKiNlA7OaP48m5BU7ym6N0/RRvkMAFkn8uLZjxIonR8NngAF176sAzIhfr8QVWLO69K2Q0eCwL98QElQbtR8NuOS8vKXUoq1VcHn7C/0sSRJiSdJJ7bobdFjMiihvGmLELm8mfoDPVWgX97OK6XGdPQ5SvNByUncbu8Xk5cyGN7eRZLiZBf3n4UnuhXqwNrsJwMmX7XR+EYayf8mbN0ApaqYB0TQFM5SSC/MJUl7wGN39Ob8TbmDuJKgQaRwbxdARkfNm+UETpsEKdBuUZWG/dnr4SPddWWHAS5WMZ28CTBM+iA9jq7uzVRsQIt24g77LlbhkGm3yn7YQxD2BJo+r43wj+PGvk2YfjzAGDw9/R70mS/mtvYiWdvDOVnvfkdMdyW+biF8P/FCt/hozobvKyUQ9FUVB8u+c/H/4gAghKSgiO++nKQu20I+Sslxxw7ZL3GqNoIPaN4wVeE6aI7ITbi63gORdNhksj7RDK8wKnDEMDLZPPCazMg0ZBlR7WutsEbrEeajoidbnpTYGsFaZX354YieyBMUsJ8ULRd/mjl7Pl2TeduPGOkx8CDFr5xc95l/dCV7SoDrgCQquBNOymlW0Pt1Hps7C3qsFlKfkGfdjK8IbJnMMwBPp05XRBCUpjV4UBZBtxZXpHNAnxmOAmd9
Content-Type: multipart/alternative; boundary="_000_PH0PR17MB4908291294518D648220442AAEC1APH0PR17MB4908namp_"
MIME-Version: 1.0
X-OriginatorOrg: stewe.org
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: PH0PR17MB4908.namprd17.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: dc5d5003-c8d6-4c08-bfe5-08dbc02b1df3
X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Sep 2023 13:59:22.1639 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 865fc51c-5fae-4322-98ef-0121a85df0b6
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: tbM+Dq7WkSotTtRLjpKmjNpOhP6kvhBo1xZSsp8DH84W1t/qnQUxwaNXyJfpeRFG
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR17MB4421
Archived-At: <https://mailarchive.ietf.org/arch/msg/avt/mrQ53xo_UI_8nR80MQQnH6CtAlY>
Subject: Re: [AVTCORE] HEVC in WebRTC: PR #17 (Guidance on RPSI)
X-BeenThere: avt@ietf.org
X-Mailman-Version: 2.1.39
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: <https://mailarchive.ietf.org/arch/browse/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: Thu, 28 Sep 2023 13:59:30 -0000

Hi Bernard,
Inline in blue for those with a reasonably modern HTML-capable MUA, indented for the rest.
Allow me to comment here as I do not use github.  Feel free to copy-past the comments over.
Sorry for the word count.
Stephan


From: avt <avt-bounces@ietf.org> on behalf of Bernard Aboba <bernard.aboba@gmail.com>
Date: Wednesday, September 27, 2023 at 20:45
To: IETF AVTCore WG <avt@ietf.org>
Subject: [AVTCORE] HEVC in WebRTC: PR #17 (Guidance on RPSI)

Based on the discussion at the Virtual Interim, I have submitted PR #17:

The proposed text is as follows:

[RFC7798] Section 8.3 specifies the use of the Reference Picture Selection
Indication (RPSI) in H.265. As noted in "Media Transport and Use of RTP in WebRTC"
[RFC8834] Section 5.1.4:

"Receivers that detect that encoder-decoder synchronization has been lost SHOULD
generate an RPSI feedback message if the codec being used supports reference-picture
selection.


Procedurally, based on recent experience, a SHOULD without explanation of that level of mandation (typically, “SHOULD unless blah blah”) will raise eyebrows.
Technically, in this case, a good “unless” could be something like “unless the receiver has knowledge that the transmitter does not support RPSI.  Such knowledge can be established through a) the capability exchange, but also b) through previously sent RPSI requests that were not replied to by the transmitter through the use of a non-IRAP picture.”
To explain, when you have learned that you lost a picture and a fallback to a previous identified picture is desirable, a transmitter capable of using reference picture selection would, of course, use such a reference picture.  However, a slightly less smart transmitter may signal at the cap exchange time that RPSI is supported, only to treat RPSI as another form of Picture Loss Indication (PLI) and respond with an IDR/IRAP.  That’s totally fine and within language and intent of RFC 5104 and 8082.  However, if such a behavior is observed repeatedly, it’s a smart strategy for the receiver to discontinue the use of RPSI and fallback to sending PLI, and internally label that transmitter as RPSI-incapable.  That may come handy in multipoint scenarios.





An RTP packet-stream sender that receives such an RPSI message SHOULD
act on that messages to change the reference picture, if it is possible to do
so within the available bandwidth constraints and with the codec being used."


There’s first the “SHOULD” without an “unless”, which will create heartache.  However, we have a deeper problem here regarding the “bandwidth constraints”.  That’s tricky, as the typical IETFer probably does not understand some of what I write below without reading up on video codec technology, and getting into such details in a profiling document like yours seems questionable.  Still, as written, the guidance provided is misleading.  As a transmitter, you do not have a practical option to move on with business as usual once you have received an RPSI.  You have to react, or the user experience will suffer—badly.  Your language could be read as if doing nothing were an option if you are in a congestion situation.  It’s not.
I assume that language regarding “available bandwidth constraints” is present to appease the congestion control crowd for the usual political reasons, and for that purpose it’s probably fine, though they may also complain about the “SHOULD”.  They will hopefully read it, and nod, and go on with their business.  A real-world implementer will instead rely on network elasticity and ignore congestion control advise and go on with their business also.  Which, so far, hasn’t brought the Internet down, either, despite gazillion of bits being sent every day by real-time video codecs.
I would remove the bandwidth constraint language.  If that’s not possible, I think you need more explanation that your otherwise laudably concise document offers elsewhere.  That explanation could be along the lines “if you receive RPSI, you know something is wrong in the decoder’s reference picture buffer, and you need to react or watch your product losing market share due to bad user experience.  That reaction will cost bits on the wire, and that may upset the congestion control mechanics and violate constraints.  Still, you have to spend those bits, otherwise the user experience will be dismal.  If you choose to stay within the bandwidth budget the congestion control algorithm suggests, or if you are up to a hard limit, you have a few options, though none of them particularly palatable.  An encoder capable of RPSI necessarily is a real-time encoder, which has means to reduce its sending bitrate on a per picture basis.  Two common strategies are to skip source pictures (reducing the frame rate on the wire), or dial up the quantizer (hence reduce user-perceived quality, but not as badly as it would be if an RPSI were ignored).  Those, techniques, in combination with the use a reference picture indicated as useful in the RPSI, are the best known reaction by a transmitter to an RPSI under congestion.  Less good but still acceptable and common implementation practice in some systems is to wait for bitrate budget and then send an IR/IRAP.  The user has to cope with the frozen picture.  Worst case, you can terminate the video.





Review comments welcome:

https://github.com/aboba/hevc-webrtc/pull/17<https://github.com/aboba/hevc-webrtc/pull/9>