Pass AVChannelLayout to ChannelLayoutToChromeChannelLayout [chromium/src : main]

0 views
Skip to first unread message

Thomas Guilbert (Gerrit)

unread,
Jan 20, 2026, 6:45:47 PM (7 hours ago) Jan 20
to Syed AbuTalib, Code Review Nudger, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org
Attention needed from Syed AbuTalib

Thomas Guilbert added 1 comment

File media/ffmpeg/ffmpeg_common.cc
Line 909, Patchset 5 (Latest): if (layout.order == AV_CHANNEL_ORDER_AMBISONIC) {
return CHANNEL_LAYOUT_DISCRETE;
}
Thomas Guilbert . unresolved

To be extra, extra cautious, we could split the changes in 2:
1) Pass AVChannelLayout here (no-op) and add a UMA for Ambisonic
2) Force Ambisonic to DISCRETE.

Open in Gerrit

Related details

Attention is currently required from:
  • Syed AbuTalib
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: If0ee02ca4ce98b950f1d17bae88f77471f7c31d9
Gerrit-Change-Number: 7427205
Gerrit-PatchSet: 5
Gerrit-Owner: Syed AbuTalib <low...@google.com>
Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-Attention: Syed AbuTalib <low...@google.com>
Gerrit-Comment-Date: Tue, 20 Jan 2026 23:45:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Syed AbuTalib (Gerrit)

unread,
Jan 20, 2026, 7:51:21 PM (6 hours ago) Jan 20
to Chromium Metrics Reviews, AyeAye, Code Review Nudger, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org
Attention needed from Thomas Guilbert

Syed AbuTalib added 1 comment

File media/ffmpeg/ffmpeg_common.cc
Line 909, Patchset 5: if (layout.order == AV_CHANNEL_ORDER_AMBISONIC) {
return CHANNEL_LAYOUT_DISCRETE;
}
Thomas Guilbert . resolved

To be extra, extra cautious, we could split the changes in 2:
1) Pass AVChannelLayout here (no-op) and add a UMA for Ambisonic
2) Force Ambisonic to DISCRETE.

Syed AbuTalib

Made this CL a no-op, will send the next CL with a `DO NOT SUBMIT` comment.

Open in Gerrit

Related details

Attention is currently required from:
  • Thomas Guilbert
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: If0ee02ca4ce98b950f1d17bae88f77471f7c31d9
    Gerrit-Change-Number: 7427205
    Gerrit-PatchSet: 6
    Gerrit-Owner: Syed AbuTalib <low...@google.com>
    Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
    Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-Attention: Thomas Guilbert <tgui...@chromium.org>
    Gerrit-Comment-Date: Wed, 21 Jan 2026 00:51:12 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Thomas Guilbert <tgui...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Thomas Guilbert (Gerrit)

    unread,
    Jan 20, 2026, 8:00:26 PM (6 hours ago) Jan 20
    to Syed AbuTalib, Chromium Metrics Reviews, AyeAye, Code Review Nudger, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org
    Attention needed from Syed AbuTalib

    Thomas Guilbert added 4 comments

    Commit Message
    Line 15, Patchset 7 (Latest):This change prevents a bug where an 11-channel stream (such as a 2nd
    order ambisonic layout + stereo) would be incorrectly
    identified as a standard stereo layout if the maximum channel limit is
    increased. By checking the layout order, the decoder can correctly
    identify these cases as discrete layouts.

    Additionally, this patch:
    * Includes a new UMA histogram, Media.Ambisonic.ChannelCount, to track
    the frequency and channel counts of ambisonic streams.
    * Simplifies call sites by passing the internal FFmpeg layout directly.
    Thomas Guilbert . unresolved

    Too much detail, you can remove this.

    File tools/metrics/histograms/metadata/media/histograms.xml
    Line 498, Patchset 6:<histogram name="Media.Ambisonic.ChannelCount" units="units"
    Thomas Guilbert . unresolved

    I would put this in `Media.Audio.` at least. Possibly `Media.Audio.Layouts.Ambisonic.ChannelCount`?

    Line 498, Patchset 6:<histogram name="Media.Ambisonic.ChannelCount" units="units"
    Thomas Guilbert . unresolved

    Channels

    Line 504, Patchset 6: Channel count of Ambisonic layouts as determined by FFmpeg. This is to track
    how often 1st order, 2nd, 3rd, etc. layouts are seen in media.
    Thomas Guilbert . unresolved

    You should specify when this is logged.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Syed AbuTalib
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: If0ee02ca4ce98b950f1d17bae88f77471f7c31d9
      Gerrit-Change-Number: 7427205
      Gerrit-PatchSet: 7
      Gerrit-Owner: Syed AbuTalib <low...@google.com>
      Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
      Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Syed AbuTalib <low...@google.com>
      Gerrit-Comment-Date: Wed, 21 Jan 2026 01:00:17 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Syed AbuTalib (Gerrit)

      unread,
      Jan 20, 2026, 8:06:39 PM (6 hours ago) Jan 20
      to Chromium Metrics Reviews, AyeAye, Code Review Nudger, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org
      Attention needed from Thomas Guilbert

      Syed AbuTalib added 4 comments

      Commit Message
      Line 15, Patchset 7:This change prevents a bug where an 11-channel stream (such as a 2nd

      order ambisonic layout + stereo) would be incorrectly
      identified as a standard stereo layout if the maximum channel limit is
      increased. By checking the layout order, the decoder can correctly
      identify these cases as discrete layouts.

      Additionally, this patch:
      * Includes a new UMA histogram, Media.Ambisonic.ChannelCount, to track
      the frequency and channel counts of ambisonic streams.
      * Simplifies call sites by passing the internal FFmpeg layout directly.
      Thomas Guilbert . resolved

      Too much detail, you can remove this.

      Syed AbuTalib

      Done

      File tools/metrics/histograms/metadata/media/histograms.xml
      Line 498, Patchset 6:<histogram name="Media.Ambisonic.ChannelCount" units="units"
      Thomas Guilbert . resolved

      Channels

      Syed AbuTalib

      Done

      Line 498, Patchset 6:<histogram name="Media.Ambisonic.ChannelCount" units="units"
      Thomas Guilbert . resolved

      I would put this in `Media.Audio.` at least. Possibly `Media.Audio.Layouts.Ambisonic.ChannelCount`?

      Syed AbuTalib

      Done

      Line 504, Patchset 6: Channel count of Ambisonic layouts as determined by FFmpeg. This is to track
      how often 1st order, 2nd, 3rd, etc. layouts are seen in media.
      Thomas Guilbert . resolved

      You should specify when this is logged.

      Syed AbuTalib

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Thomas Guilbert
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: If0ee02ca4ce98b950f1d17bae88f77471f7c31d9
        Gerrit-Change-Number: 7427205
        Gerrit-PatchSet: 9
        Gerrit-Owner: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-Attention: Thomas Guilbert <tgui...@chromium.org>
        Gerrit-Comment-Date: Wed, 21 Jan 2026 01:06:28 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Thomas Guilbert <tgui...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Thomas Guilbert (Gerrit)

        unread,
        Jan 20, 2026, 8:19:37 PM (6 hours ago) Jan 20
        to Syed AbuTalib, Chromium Metrics Reviews, AyeAye, Code Review Nudger, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org
        Attention needed from Syed AbuTalib

        Thomas Guilbert added 3 comments

        Patchset-level comments
        File-level comment, Patchset 9 (Latest):
        Thomas Guilbert . resolved

        1 small fix + 1 more comment

        File media/ffmpeg/ffmpeg_common.cc
        Line 915, Patchset 9 (Latest): base::UmaHistogramExactLinear("Media.Ambisonic.ChannelCount",
        Thomas Guilbert . unresolved

        This needs to match the path in the histogram XML.

        Line 916, Patchset 9 (Latest): layout.nb_channels, 33);
        Thomas Guilbert . unresolved

        Use
        ```
        constexpr int kMaxAmbisonicsChannels = 32;
        static_assert(kMaxAmbisonicsChannels == media::limits::kMaxChannels, "kMaxAmbisonicsChannels doesn't match kMaxChannels")
        base::UmaHistogramExactLinear(..., kMaxAmbisonicsChannels+1);
        ```

        so we get a warning if ever kMaxChannel was bumped up (I don't think UMA would like). This would need to be handled at that time.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Syed AbuTalib
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: If0ee02ca4ce98b950f1d17bae88f77471f7c31d9
          Gerrit-Change-Number: 7427205
          Gerrit-PatchSet: 9
          Gerrit-Owner: Syed AbuTalib <low...@google.com>
          Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
          Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-Attention: Syed AbuTalib <low...@google.com>
          Gerrit-Comment-Date: Wed, 21 Jan 2026 01:19:29 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Syed AbuTalib (Gerrit)

          unread,
          Jan 20, 2026, 8:30:21 PM (6 hours ago) Jan 20
          to Chromium Metrics Reviews, AyeAye, Code Review Nudger, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org
          Attention needed from Thomas Guilbert

          Syed AbuTalib added 2 comments

          File media/ffmpeg/ffmpeg_common.cc
          Line 915, Patchset 9: base::UmaHistogramExactLinear("Media.Ambisonic.ChannelCount",
          Thomas Guilbert . resolved

          This needs to match the path in the histogram XML.

          Syed AbuTalib

          Dang, surprised I missed this. Done.

          Line 916, Patchset 9: layout.nb_channels, 33);
          Thomas Guilbert . resolved

          Use
          ```
          constexpr int kMaxAmbisonicsChannels = 32;
          static_assert(kMaxAmbisonicsChannels == media::limits::kMaxChannels, "kMaxAmbisonicsChannels doesn't match kMaxChannels")
          base::UmaHistogramExactLinear(..., kMaxAmbisonicsChannels+1);
          ```

          so we get a warning if ever kMaxChannel was bumped up (I don't think UMA would like). This would need to be handled at that time.

          Syed AbuTalib

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Thomas Guilbert
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: If0ee02ca4ce98b950f1d17bae88f77471f7c31d9
            Gerrit-Change-Number: 7427205
            Gerrit-PatchSet: 10
            Gerrit-Owner: Syed AbuTalib <low...@google.com>
            Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
            Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
            Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
            Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
            Gerrit-Attention: Thomas Guilbert <tgui...@chromium.org>
            Gerrit-Comment-Date: Wed, 21 Jan 2026 01:30:13 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Thomas Guilbert <tgui...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy
            Reply all
            Reply to author
            Forward
            0 new messages