Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify requirement of handling symmetric/asymmetric levels of HEVC offer/answer #27

Open
taste1981 opened this issue Sep 20, 2024 · 12 comments
Assignees
Labels
AVTCORE Virtual Interim For discussion at AVTCORE VI PR exists There is a PR submitted to address this issue

Comments

@taste1981
Copy link
Collaborator

taste1981 commented Sep 20, 2024

Unlike AVC, in RFC 7798 we don't explicitly signal level-asymmetric-allowed in the SDP.

A few things that should be clarified for sendonly/sendrecv/recvonly cases in the O/A flow for HEVC

  • level-asymmetric-allowed should be implicitly always true for HEVC;
  • With a fixed profile/tier, if the offerer is able to decode/encode up to level 5.2, and the answerer is able to decode/encode up to level 3.1, what level/levels should answer include for sendonly/sendrecv/recvonly?
  • With a fixed profile/tier, if the offerer is able to decode/encode up to level 3.1, and the answerer is able to decode/encode up to level 5.2, what level/levels should answer include for sendonly/sendrecv/recvonly?
  • With a fixed profile/tier, if the offerer is able to encode up to level 3.1, but decode up to level 5.2, what level/levels should offer include for sendonly/sendrecv/recvonly?
  • With a fixed profile, if the offerer is able to encode up to level 5.2, but decode up to level 3.1, what level/levels should the offer include for sendonly/sendrecv/recvonly?

There might be more combinations. So a rule should be specified for SDP offer/answer generation.

@aboba
Copy link
Collaborator

aboba commented Sep 20, 2024

RFC 7798 Section 7.2.2 allows level-id asymmetry:

“The parameters identifying a media format configuration for HEVC are profile-space, profile-id, tier-flag, level-id, interop-constraints, profile-compatibility-indicator, and tx-mode. These media configuration parameters, except level-id, MUST be used symmetrically when the answerer does not include recv-sub-layer-id in the answer for the media format (payload type) or the included recv-sub-layer-id is equal to sprop-sub-layer-id in the offer.”

However, it also says:

“The Answerer MUST:

  1. maintain all configuration parameters with the values remaining the same as in the offer for the media format (payload type), with the exception that the value of level-id is changeable as long as the highest level indicated by the answer is not higher than that indicated by the offer;”

@fippo What do you think?

@taste1981
Copy link
Collaborator Author

taste1981 commented Sep 20, 2024

What about this case:

With a fixed profile/tier, if the offerer is able to decode/encode up to level 3.1, and the answerer is able to decode/encode up to level 5.2, what level/levels should answer include for sendonly/sendrecv/recvonly?

sendrecv Offer

Offer: 3.1
Answer: 3.1?

sendonly Offer

Offer: 3.1
Answer: 3.1?

recvonly Offer

Offer: 3.1
Answer: 3.1?

@aboba
Copy link
Collaborator

aboba commented Sep 20, 2024

The meaning of the Offer and Answer changes based on direction. Here is my take:

sendrecv Offer

Offer: 3.1 (maximum it can encode and decode)
Answer: 3.1 (constrained by the Offer)

Result: Offerer would send 3.1 to the the Answerer, Answerer will send 3.1 to the Offerer.

sendonly Offer

Offer: 3.1 (maximum it can encode)
Answer: 3.1 (constrained by the Offer)

Result: Offerer would send 3.1 to the the Answerer.

recvonly Offer

Offer: 3.1 (maximum it can decode)
Answer: 3.1 (constrained by the Offer)

Result: Answerer would send 3.1 to the the Offerer.

@fippo
Copy link
Collaborator

fippo commented Sep 21, 2024

are we interpreting SDP correctly? The "sCP take" is what I put in my SDP is what I would prefer to receive
(which makes me wonder if some of the current behavior for VP9 profiles is correct... h/t @alvestrand)

sendrecv

Offer: 3.1 (maximum it can decode)
Answer: 5.2 (maximum it can decode)
Result: Offerer would send 5.2 to the the Answerer if it can encode that, Answerer wil send 3.1 to the Offerer because that is the maximum that the Offerer can decode.

sendonly

Offer: 3.1 (maximum it can decode)
Answer: 5.2 (maximum it can decode)
Result: Offerer would send up to 5.2

recvonly

Offer: 3.1 (maximum it can decode)
Answer: 5.2 (maximum it can decode)
Result: Answerer would send 3.1 to the the Offerer

@aboba
Copy link
Collaborator

aboba commented Sep 21, 2024

@fippo RFC 7798 Table 1 seems to indicate that level-id reflects what can be sent (not received) on a sendonly m-line.

@fippo
Copy link
Collaborator

fippo commented Sep 24, 2024

And that is backed by RFC 3264 section 5.1 so we can not have nice things :-(

@aboba
Copy link
Collaborator

aboba commented Oct 5, 2024

At TPAC 2024, the W3C WEBRTC WG decided on "Proposal A" which is aligned with RFC 3264 Section 5.1.

Related: w3c/webrtc-pc#3006

@aboba aboba added the AVTCORE Virtual Interim For discussion at AVTCORE VI label Oct 6, 2024
@aboba aboba self-assigned this Oct 6, 2024
@taste1981
Copy link
Collaborator Author

Looks like the proposal does not conform to RFC 7798(https://datatracker.ietf.org/doc/html/rfc7798#section-7.2.2, sub-clause #1):

  The answerer MUST:

  1) maintain all configuration parameters with the values remaining
     the same as in the offer for the media format (payload type),
     with the exception that the value of level-id is changeable as
     long as the highest level indicated by the answer is not higher
     than that indicated by the offer;

With this requirement, the answer must ensure level-id is no larger than that in offer.

@aboba
Copy link
Collaborator

aboba commented Oct 14, 2024

@sprangerik @Djuffin @JonathanLennox PTAL

@alvestrand
Copy link

Is this a bug in RFC 7798 (that it doesn't support answerer indicating that it supports more than the offerer does)?

@aboba
Copy link
Collaborator

aboba commented Nov 4, 2024

@alvestrand We will explore this at IETF 121. Some of the text does look wrong (e.g. level-id should not be part of the "media format").

@aboba
Copy link
Collaborator

aboba commented Nov 9, 2024

Resolution: Discussion at IETF 121 indicates that the text in Section 7.2.2 relating to the Answer level-id not being larger than the Offer is not an error.

aboba added a commit that referenced this issue Nov 9, 2024
@aboba aboba added the PR exists There is a PR submitted to address this issue label Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AVTCORE Virtual Interim For discussion at AVTCORE VI PR exists There is a PR submitted to address this issue
Projects
None yet
Development

No branches or pull requests

4 participants