Set initial max/min qp values in the AV1 encoder wrapper [chromium/src : main]

58 views
Skip to first unread message

Joe Downing (Gerrit)

unread,
Jan 18, 2023, 11:45:20 AM1/18/23
to Lambros Lambrou, chromotin...@chromium.org, poscia...@chromium.org, Marco Paniconi

Attention is currently required from: Lambros Lambrou.

Joe Downing would like Lambros Lambrou to review this change.

View Change

Set initial max/min qp values in the AV1 encoder wrapper

Per the codec team, setting the initial values will help keep frame
quality high for the first keyframe after the encoder is reconfigured. I
did some testing with these values this morning and that does appear to
be the case (stats-for-nerds did not show a quality drop when re-sizing
w/ AV1 like it did before).

Bug: b:217468304
Change-Id: I4c5fc3633afd47b7c54fc4d0ea5e9ad615868121
---
M remoting/codec/webrtc_video_encoder_av1.cc
1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/remoting/codec/webrtc_video_encoder_av1.cc b/remoting/codec/webrtc_video_encoder_av1.cc
index 89949e8..cfe87f4 100644
--- a/remoting/codec/webrtc_video_encoder_av1.cc
+++ b/remoting/codec/webrtc_video_encoder_av1.cc
@@ -305,8 +305,11 @@

config_.kf_mode = AOM_KF_DISABLED;

- config_.rc_max_quantizer = 0;
- config_.rc_min_quantizer = 0;
+ // Initial max/min qp values were suggested by the codecs team. The intent is
+ // to set a reasonable default for the first key frame before WebRTC begins
+ // sending us updated max/min qp values based on the network conditions.
+ config_.rc_max_quantizer = 52;
+ config_.rc_min_quantizer = 10;
config_.rc_dropframe_thresh = 0;
config_.rc_undershoot_pct = 50;
config_.rc_overshoot_pct = 50;

To view, visit change 4178570. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I4c5fc3633afd47b7c54fc4d0ea5e9ad615868121
Gerrit-Change-Number: 4178570
Gerrit-PatchSet: 2
Gerrit-Owner: Joe Downing <joe...@chromium.org>
Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
Gerrit-CC: Marco Paniconi <mar...@google.com>
Gerrit-Attention: Lambros Lambrou <lambros...@chromium.org>
Gerrit-MessageType: newchange

Joe Downing (Gerrit)

unread,
Jan 18, 2023, 11:45:23 AM1/18/23
to chromotin...@chromium.org, poscia...@chromium.org, Lambros Lambrou, Marco Paniconi, chromium...@chromium.org

Attention is currently required from: Lambros Lambrou.

Patch set 2:Auto-Submit +1Commit-Queue +1

View Change

1 comment:

To view, visit change 4178570. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I4c5fc3633afd47b7c54fc4d0ea5e9ad615868121
Gerrit-Change-Number: 4178570
Gerrit-PatchSet: 2
Gerrit-Owner: Joe Downing <joe...@chromium.org>
Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
Gerrit-CC: Marco Paniconi <mar...@google.com>
Gerrit-Attention: Lambros Lambrou <lambros...@chromium.org>
Gerrit-Comment-Date: Wed, 18 Jan 2023 16:45:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

Marco Paniconi (Gerrit)

unread,
Jan 18, 2023, 1:13:30 PM1/18/23
to Joe Downing, chromotin...@chromium.org, poscia...@chromium.org, Chromium LUCI CQ, Lambros Lambrou, chromium...@chromium.org

Attention is currently required from: Joe Downing, Lambros Lambrou.

View Change

1 comment:

To view, visit change 4178570. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I4c5fc3633afd47b7c54fc4d0ea5e9ad615868121
Gerrit-Change-Number: 4178570
Gerrit-PatchSet: 2
Gerrit-Owner: Joe Downing <joe...@chromium.org>
Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
Gerrit-CC: Marco Paniconi <mar...@google.com>
Gerrit-Attention: Joe Downing <joe...@chromium.org>
Gerrit-Attention: Lambros Lambrou <lambros...@chromium.org>
Gerrit-Comment-Date: Wed, 18 Jan 2023 18:13:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Lambros Lambrou (Gerrit)

unread,
Jan 18, 2023, 2:28:49 PM1/18/23
to Joe Downing, chromotin...@chromium.org, poscia...@chromium.org, Chromium LUCI CQ, Marco Paniconi, chromium...@chromium.org

Attention is currently required from: Joe Downing.

Patch set 2:Code-Review +1Commit-Queue +2

View Change

    To view, visit change 4178570. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I4c5fc3633afd47b7c54fc4d0ea5e9ad615868121
    Gerrit-Change-Number: 4178570
    Gerrit-PatchSet: 2
    Gerrit-Owner: Joe Downing <joe...@chromium.org>
    Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
    Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
    Gerrit-CC: Marco Paniconi <mar...@google.com>
    Gerrit-Attention: Joe Downing <joe...@chromium.org>
    Gerrit-Comment-Date: Wed, 18 Jan 2023 19:28:43 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Chromium LUCI CQ (Gerrit)

    unread,
    Jan 18, 2023, 2:31:01 PM1/18/23
    to Joe Downing, chromotin...@chromium.org, poscia...@chromium.org, Lambros Lambrou, Marco Paniconi, chromium...@chromium.org

    Chromium LUCI CQ submitted this change.

    View Change

    Approvals: Lambros Lambrou: Looks good to me; Commit Joe Downing: Send CL to CQ automatically after approval
    Set initial max/min qp values in the AV1 encoder wrapper

    Per the codec team, setting the initial values will help keep frame
    quality high for the first keyframe after the encoder is reconfigured. I
    did some testing with these values this morning and that does appear to
    be the case (stats-for-nerds did not show a quality drop when re-sizing
    w/ AV1 like it did before).

    Bug: b:217468304
    Change-Id: I4c5fc3633afd47b7c54fc4d0ea5e9ad615868121
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4178570
    Auto-Submit: Joe Downing <joe...@chromium.org>
    Commit-Queue: Lambros Lambrou <lambros...@chromium.org>
    Reviewed-by: Lambros Lambrou <lambros...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1094016}
    ---
    M remoting/codec/webrtc_video_encoder_av1.cc
    1 file changed, 26 insertions(+), 2 deletions(-)

    diff --git a/remoting/codec/webrtc_video_encoder_av1.cc b/remoting/codec/webrtc_video_encoder_av1.cc
    index 89949e8..cfe87f4 100644
    --- a/remoting/codec/webrtc_video_encoder_av1.cc
    +++ b/remoting/codec/webrtc_video_encoder_av1.cc
    @@ -305,8 +305,11 @@

    config_.kf_mode = AOM_KF_DISABLED;

    - config_.rc_max_quantizer = 0;
    - config_.rc_min_quantizer = 0;
    + // Initial max/min qp values were suggested by the codecs team. The intent is
    + // to set a reasonable default for the first key frame before WebRTC begins
    + // sending us updated max/min qp values based on the network conditions.
    + config_.rc_max_quantizer = 52;
    + config_.rc_min_quantizer = 10;
    config_.rc_dropframe_thresh = 0;
    config_.rc_undershoot_pct = 50;
    config_.rc_overshoot_pct = 50;

    To view, visit change 4178570. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I4c5fc3633afd47b7c54fc4d0ea5e9ad615868121
    Gerrit-Change-Number: 4178570
    Gerrit-PatchSet: 3
    Gerrit-Owner: Joe Downing <joe...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
    Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
    Gerrit-CC: Marco Paniconi <mar...@google.com>
    Gerrit-MessageType: merged
    Reply all
    Reply to author
    Forward
    0 new messages