New issue
Advanced search Search tips

Issue 640610 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Aug 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Incorrect channel mapping for 8-channel audio in ffmpeg_aac_bitstream_converter

Reported by jwalc...@opera.com, Aug 24 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/51.0.2704.79 Chrome/51.0.2704.79 Safari/537.36

Example URL:

Steps to reproduce the problem:
Logic in fmpeg_aac_bitstream_converter.cc, specifically in GenerateAdtsHeader() incorrectly maps FFmpeg 8-channel audio to ATDS 8-channel audio.

Currently there is:
    case 7:
      // front-center, front-left, front-right, side-left, side-right,
      // back-left, back-right, LFE-channel
      hdr[2] |= 1;
      hdr[3] |= (3 << 6);
      break;

But there should be:
    case 8:
      // front-center, front-left, front-right, side-left, side-right,
      // back-left, back-right, LFE-channel
      hdr[2] |= 1;
      hdr[3] |= (3 << 6);
      break;

What is the expected behavior?

What went wrong?
The mapping is incorrect

Did this work before? N/A 

Is it a problem with Flash or HTML5? N/A

Does this work in other browsers? N/A 

Chrome version:   Channel: n/a
OS Version: 
Flash Version: 

FFmpeg's AVCodecContext->channels contains "raw number of channels" (e.g. 8 for 8 channels) instead of "MPEG-4 Channel Configuration (e.g. 7 aka 0b111 for 8 channels)".
 
Were you going to submit a patch?
Labels: TE-NeedsTriageHelp

Comment 3 by jwalc...@opera.com, Aug 25 2016

I will prepare a patch, but I am not sure about ETA.
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a5cd9c49bcb56a12f04555cc218c4a940a579a4e

commit a5cd9c49bcb56a12f04555cc218c4a940a579a4e
Author: jwalczak <jwalczak@opera.com>
Date: Fri Aug 26 11:16:22 2016

Fix channel mapping for 8-ch audio in ffmpeg_aac_bitstream_converter

FFmpeg's AVCodecContext->channels contains "raw number of channels"
(e.g. "2" for 2 channels, "8" for 8 channels). The change ensures that:
- the value of "8" is correctly mapped to 0b111 ADTS channel
config (aka MPEG-4 Channel Configuration),
- the value of "7" becomes unsupported.

BUG= 640610 

Review-Url: https://codereview.chromium.org/2273203003
Cr-Commit-Position: refs/heads/master@{#414685}

[modify] https://crrev.com/a5cd9c49bcb56a12f04555cc218c4a940a579a4e/media/filters/ffmpeg_aac_bitstream_converter.cc

Status: Fixed (was: Unconfirmed)
CL is submitted. close this bug.

Sign in to add a comment