[Mlcodec] Re: Last call for Opus Extension

Roman Shpount <roman@telurix.com> Fri, 08 August 2025 16:21 UTC

Return-Path: <roman@telurix.com>
X-Original-To: mlcodec@mail2.ietf.org
Delivered-To: mlcodec@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id D283451C2372 for <mlcodec@mail2.ietf.org>; Fri, 8 Aug 2025 09:21:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (1024-bit key) header.d=telurix.com
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uStsrMNSfO1y for <mlcodec@mail2.ietf.org>; Fri, 8 Aug 2025 09:21:53 -0700 (PDT)
Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id 1BF6351C235D for <mlcodec@ietf.org>; Fri, 8 Aug 2025 09:21:53 -0700 (PDT)
Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-55b86c75f11so494992e87.3 for <mlcodec@ietf.org>; Fri, 08 Aug 2025 09:21:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telurix.com; s=google; t=1754670111; x=1755274911; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0dU6QgT7aBlz0J41CKcC7fqYSRka4aRwCgffzCky78w=; b=IqwtpvWoIhjFNRM1Pv3EGYrZUHRGjCAPgnEAh0rAzmih9dITQ/gypiChzd9axF4YT0 Zgg2c+RfAn/81YwUME9xtp/7uViUvVQEehK7a7JLnF2CYjgf8D61GmUf2cIB57xG13P1 4WRMiZXwTWtuCOQwfoEHcSJ8UXNqt8fOB+bEc=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754670111; x=1755274911; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0dU6QgT7aBlz0J41CKcC7fqYSRka4aRwCgffzCky78w=; b=W4lGP85Jh6dbMmTgPmUwZ69h9Z3irn+KltjX1w1hLeuJ++Sd8ADGor7k/WL7G8hkbH QN6fXAfkoYii8G9Ni6oisl4E1wctGzVOlYKp4laThbzPms+X2nepbSGX8praxhDIj4El mikCQmcvLdBKrsBy40UVt6E3QXtZpHVAZj7vM+Utvtd8EXI4xlyCZeN5c6SQAXfUkZSN V6xKM27ep4SREYn+8ckJHfEBWWsTr98z3BvzEJb3ZdXPEaXtwUhGm6nS32OebaxtwnIq LAuBwPjyL+5By14pYIBGt4U+XDz6l1WZfl/8mPonh/J9gwD6gepnV/bgPAQ0dyBQ6roW bnuw==
X-Forwarded-Encrypted: i=1; AJvYcCU1DqGMhWDQkb1Q+ofk9sZQpyfdcuPsZj8MfXjIgggl8pilOUMYl0cUPyqvpXWAhsTItIEhc1fG@ietf.org
X-Gm-Message-State: AOJu0YzTJ1m3adie2Yu05sn06JxHo62lpccfPf5t6weadn9WpO14GVgz KFLXDQfCG02UkvarzeUrvehNzejumE5Dou4vlr55FfLmnMjqfxwinhb6NnSqtZYg2OfjAkXeTAX AKwR08Ds=
X-Gm-Gg: ASbGncvCkkvd/kt0x/CPyYEGfTq5ij6NkmGqOuJRUDKr32JL+VbVaYLvl7nZZ3GTOiV jKm3h1JAYlIWNgI7mFqRkWSX+2RTS6ofjRjmpTA9qBRfacuXMxRXBScb39WKFIe1h5+A4DSpzd+ kqTbNAwtzqdPyPMndLzGighhwmQNGPWDIiKVlNyGLeOFt8auY9RN5/n552pemzDAhZ7BpA5Km2F bW787gBFDOXNX84Z2ITV2ncuHptcO0ozbfz9GDdrVWQPbTZoA5WQWY/Toyo0Dhqt6tSBybhZyqS JDVCmBg5uNfh4tyzf8TtQrjIVZmo9X8+jwMWr9sIcrM5ttp4qIvC6wQC5AV9VWUhL9eE8geE1oc zY9BPl8qq+lXda91FGhfT+K2EOz5ctqgwS19xusiWWBeSQZgDwfjyWI9KJ8+LLo8fxJxf/K0=
X-Google-Smtp-Source: AGHT+IEWEi/TPJ4o0EihqnaHXqpI2UOfVrBDLBreZZ6X8OMUU47gYtfzgJA0fZ+vczk8p2jd93rk9g==
X-Received: by 2002:a05:651c:3248:10b0:332:65c5:1f6a with SMTP id 38308e7fff4ca-333a20e013emr2957421fa.1.1754670111358; Fri, 08 Aug 2025 09:21:51 -0700 (PDT)
Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-332388fcb8fsm30350591fa.65.2025.08.08.09.21.51 for <mlcodec@ietf.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Aug 2025 09:21:51 -0700 (PDT)
Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-3338149d8a3so27688971fa.0 for <mlcodec@ietf.org>; Fri, 08 Aug 2025 09:21:51 -0700 (PDT)
X-Forwarded-Encrypted: i=1; AJvYcCWj7ECUGGeB9TpN1pyU3n/2FJsSMUCMLB58qCOnz3JWs3/ZwHzzirRFLytGAhzm+S+DjgF9l1xO@ietf.org
X-Received: by 2002:a05:651c:221b:b0:333:ac42:8d36 with SMTP id 38308e7fff4ca-333ac429874mr3051541fa.17.1754670110734; Fri, 08 Aug 2025 09:21:50 -0700 (PDT)
MIME-Version: 1.0
References: <DS0PR11MB8181387CC2F639F5CEDECCE7B42CA@DS0PR11MB8181.namprd11.prod.outlook.com> <CAD5OKxtf+ru0xuDcYJaN9uGcCQ0eX2=R+hv-pTNbTrP0O4cKJw@mail.gmail.com> <ae5fce22-ad82-4bbe-abbc-6b088be27cfe@xiph.org> <CAD5OKxvK9aM=Ru5ntaN9gdHgWi99jr7=7njianeyzjOxtODTqA@mail.gmail.com>
In-Reply-To: <CAD5OKxvK9aM=Ru5ntaN9gdHgWi99jr7=7njianeyzjOxtODTqA@mail.gmail.com>
From: Roman Shpount <roman@telurix.com>
Date: Fri, 08 Aug 2025 12:21:38 -0400
X-Gmail-Original-Message-ID: <CAD5OKxuFtCOV_L9wMH-JOZ4=f7XcR_6brYK-_8F7iR0DyJLc4g@mail.gmail.com>
X-Gm-Features: Ac12FXyV-IXA4IiuPHYAgRBCAH3qtwK6C0Jau32KFwMYV8NksKDcGhsWYyYBJ5A
Message-ID: <CAD5OKxuFtCOV_L9wMH-JOZ4=f7XcR_6brYK-_8F7iR0DyJLc4g@mail.gmail.com>
To: "Timothy B. Terriberry" <tterribe@xiph.org>
Content-Type: multipart/alternative; boundary="000000000000a603bd063bdcf82c"
Message-ID-Hash: ZOM34V2V7S6ZNL7XWV6ZMLFC3QBBTIQ2
X-Message-ID-Hash: ZOM34V2V7S6ZNL7XWV6ZMLFC3QBBTIQ2
X-MailFrom: roman@telurix.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: "Mo Zanaty (mzanaty)" <mzanaty=40cisco.com@dmarc.ietf.org>, "mlcodec@ietf.org" <mlcodec@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [Mlcodec] Re: Last call for Opus Extension
List-Id: Machine Learning for Audio Coding <mlcodec.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/mlcodec/eGuARWSKPyPoUwLEtRenkDIimec>
List-Archive: <https://mailarchive.ietf.org/arch/browse/mlcodec>
List-Help: <mailto:mlcodec-request@ietf.org?subject=help>
List-Owner: <mailto:mlcodec-owner@ietf.org>
List-Post: <mailto:mlcodec@ietf.org>
List-Subscribe: <mailto:mlcodec-join@ietf.org>
List-Unsubscribe: <mailto:mlcodec-leave@ietf.org>

Hi Timothy,

After I reread this and thought about it a bit more I have a few technical
comments:

In the introduction, it would be helpful to add that existing decoders will
safely ignore all non-zero padding (already true per RFC6716), and that
extended decoders MUST behave identically to legacy decoders when
extensions are absent, ensuring backward compatibility.

Section 2  states that  "An encoder MUST NOT alter the way it encodes the
non-extension part of an Opus packet in such a way as to noticeably reduce
its quality when decoded with a non-extended decoder." What does
"noticeably" mean in this context? Should this reference RFC 6716 Section 6
instead?

In Section 2.1, the document provides the example of extension encoding.
Still, it would be helpful to state explicitly that "L is the least
significant bit of the extension ID byte, with the upper 7 bits encoding
the ID."

It would help to make the "ignore on overrun" rule more prominent and
centralized. I would suggest making a section stating that "Any extension
signaled with a length that would cause the decoder to read beyond the
bounds of the packet MUST be ignored," and then referencing this from the
RTE and Separator sections.

In section 2.2. ID 1: Separator
* It should probably be named "Frame Separator" for consistency
* Is it legal to have a separator with L=1 and the following byte 0? This
would be functionally equivalent to no separator.

In section 2.3. ID 2: Repeat These Extensions (RTE)
It would be easier to follow if some examples were added. Specifically,
examples of all corner cases, such as the final long extension with L=0
when followed by repeated short extensions or multiple RTEs per frame.

In section 3. IANA Considerations: a new registry is defined. It would be
helpful to provide the IANA registration template.

In section 3.2 Mapping to SDP Parameters
You are referencing  RFC5576 Section 6.3. This section refers to fmtp ssrc
parameters, not to media parameters in general. The meaning of media-level
parameters is typically defined according to the codec. Therefore, I
recommend not referencing RFC5576 and specifying the handling of these
parameters in this document by stating that "The media-level format
parameters described in this document MUST be explicitly specified and MUST
NOT be carried over blindly from another offer or answer." Furthermore,
"receiver MUST be capable of receiving any signal" should be more specific,
such as "receiver MUST be capable of decoding any unknown or non-negotiated
extensions, even if the negotiation fails."

In security considerations:
Should we include a language that malicious packets can be constructed with
extensions claiming excessive length, thereby introducing the risk of
buffer overflows? RFC 6716 already warns against malicious packets, but it
might be prudent to add additional language here.

Best regards,
_____________
Roman Shpount


On Fri, Aug 8, 2025 at 10:39 AM Roman Shpount <roman@telurix.com> wrote:

> Hi Timothy,
>
> These are the things I noticed:
> "A given extension ID MAY appear multiple times and the ordering of
> extension instances within each Opus frame is significant"
> should be
> "A given extension ID MAY appear multiple times. The ordering of extension
> instances within each Opus frame is significant"
>
> "A particular extension ID definition MAY place further restrictions on
> count and ordering of these extensions instances"
> should be
> "A particular extension ID definition MAY place further restrictions on
> the count and the ordering of these extension instances"
>
> "Reordering of extension instances between Opus frames caused by the
> repeat mechanism is not significant and an extended decoder MUST treat
> repeated extensions as equivalent to the same extensions coded individually"
> should be
> "Reordering of extension instances between Opus frames caused by the
> repeat mechanism is not significant, and an extended decoder MUST treat
> repeated extensions as equivalent to the same extensions coded individually"
>
> "In the case where the L flag is set, the extension ID byte (0x01) is
> simply skipped and extension decoding continues from the next byte."
> should be
> "In the case where the L flag is set, the extension ID byte (0x01) is
> simply skipped, and extension decoding continues from the next byte."
>
> "Only the extensions which follow the most recent RTE (if any) are
> repeated by a subsequent RTE."
> should be
> "Only the extensions that follow the most recent RTE (if any) are repeated
> by a subsequent RTE."
>
> "These extensions are to be defined in their own respective documents and
> the IDs are to be assigned by IANA."
> should be
> "These extensions are to be defined in their own respective documents, and
> the IDs are to be assigned by IANA. "
>
> "Due to potential for interaction between extensions"
> should be
> "Due to the potential interaction between extensions"
>
> This document defines a new registry "Opus Extension IDs" in a new "Opus"
> group, that allocates individual IDs to individual extensions to be defined
> in the future.
> should be
> This document defines a new registry, "Opus Extension IDs", in a new
> "Opus" group, that allocates individual IDs to individual extensions to be
> defined in the future.
>
> Best regards,
> _____________
> Roman Shpount
>
>
> On Fri, Aug 8, 2025 at 6:40 AM Timothy B. Terriberry <tterribe@xiph.org>
> wrote:
>
>> Roman Shpount wrote:
>> > This document appears to be well-written (apart from a few missing
>> > commas before the "and" in the compound sentences). I have no negative
>>
>> I found four. Let me know if I missed any.
>>
>