Open Bug 1776641 Opened 3 years ago Updated 3 years ago

There's a slight color difference for HDR videos on YouTube between Firefox and Chrome

Categories

(Core :: Audio/Video, enhancement, P4)

Firefox 103
Unspecified
macOS
enhancement

Tracking

()

Tracking Status
firefox102 --- affected
firefox103 --- affected

People

(Reporter: rpopovici, Unassigned)

References

Details

Attachments

(5 files)

Found in:
M1 Mac 11.6

Affected versions:
M1 Mac 11.6

Affected version:
Nightly 103.0a1(2021-06-26)

Steps to reproduce:

  1. Open firefox
  2. Access the following HDR videos: - https://www.youtube.com/watch?v=tO01J-M3g0U (The World in HDR in 4K (ULTRA HD))
  1. For the NIGHTLY/BETA windows, Turn on HDR in video. Choose the highest resolution available. (e.g. 2160p60 4K)

Actual result:
There's a slight color difference for HDR videos on YouTube between Firefox and Chrome

Expected result:
HDR videos has the same color as in Chrome.

Regression range:
No regression range.

Severity: -- → S3
Has STR: --- → yes

I can reproduce this, though the effect is subtle. With the video https://www.youtube.com/watch?v=tO01J-M3g0U paused at the 0:02 mark, using the macOS Digital Color Meter with a middle-size aperture on the area of the image with the ocean water just to the left of the foreground island, I get these color values:

Firefox: 0, 223, 212
Chrome: 0, 190, 181

Meaning that Firefox is generating slightly brighter values than Chrome. OS color profile does affect the results, but there's no choice that brings the colors into agreement. The output with the gfx.core-animation.specialize-video.log pref on is:

2022-06-28 14:08:10.316 firefox[31888:623141] Surface values are {
    CreationProperties =     {
        IOSurfaceAllocSize = 2773008;
        IOSurfaceHeight = 720;
        IOSurfaceIsGlobal = 1;
        IOSurfacePixelFormat = 2016686640;
        IOSurfacePixelSizeCastingAllowed = 1;
        IOSurfacePlaneInfo =         (
                        {
                IOSurfacePlaneBytesPerElement = 2;
                IOSurfacePlaneBytesPerRow = 2560;
                IOSurfacePlaneHeight = 720;
                IOSurfacePlaneOffset = 0;
                IOSurfacePlaneSize = 1843216;
                IOSurfacePlaneWidth = 1280;
            },
                        {
                IOSurfacePlaneBytesPerElement = 4;
                IOSurfacePlaneBytesPerRow = 2560;
                IOSurfacePlaneHeight = 360;
                IOSurfacePlaneOffset = 1851392;
                IOSurfacePlaneSize = 921616;
                IOSurfacePlaneWidth = 640;
            }
        );
        IOSurfaceWidth = 1280;
    };
    IOSurfaceColorPrimaries = "ITU_R_2020";
    IOSurfaceColorSpace = {length = 3144, bytes = 0x00000c48 4c696e6f 02100000 6d6e7472 ... fe4bfedc ff6dffff };
    IOSurfaceTransferFunction = "SMPTE_ST_2084_PQ";
    IOSurfaceYCbCrMatrix = "ITU_R_2020";
}.
2022-06-28 14:08:10.316 firefox[31888:623141] ColorSpace is <CGColorSpace 0x105012140> (kCGColorSpaceICCBased; kCGColorSpaceModelRGB; sRGB IEC61966-2.1).
2022-06-28 14:08:10.316 firefox[31888:623141] Buffer attachments are {
    CGColorSpace = "<CGColorSpace 0x105012140> (kCGColorSpaceICCBased; kCGColorSpaceModelRGB; sRGB IEC61966-2.1)";
    CVImageBufferColorPrimaries = "ITU_R_2020";
    CVImageBufferTransferFunction = "SMPTE_ST_2084_PQ";
    CVImageBufferYCbCrMatrix = "ITU_R_2020";
}.
2022-06-28 14:08:10.316 firefox[31888:623141] Codec is x420.
2022-06-28 14:08:10.317 firefox[31888:623141] Format extensions are {
    CVBytesPerRow = 1280;
    CVImageBufferColorPrimaries = "ITU_R_2020";
    CVImageBufferTransferFunction = "SMPTE_ST_2084_PQ";
    CVImageBufferYCbCrMatrix = "ITU_R_2020";
    Version = 2;
}.

Which are all values that we should be able to handle. It's possible we are arbitrarily assigning a colorspace instead of reading it from the video data. I'll explore that.

Assignee: nobody → bwerth

After having to create a new profile for an unrelated reason, I am no longer able to reproduce this. I'm not sure what pref could have been involved. Ralu, would you please try to reproduce with a new profile?

Flags: needinfo?(raluca.popovici)

I'll keep this on my list and try to reproduce again.

Flags: needinfo?(jmathies)

I can reproduce it again on https://www.youtube.com/watch?v=tO01J-M3g0U, but not on https://www.youtube.com/watch?v=LXb3EKWsInQ. The effect is even more subtle than the last time I measured it (Firefox 0, 197, 188 vs Chrome 0, 172, 166). We're not going to prioritize this and hopefully it will normalize as we solve other issues with our colorspace interpretation.

Type: defect → enhancement
Priority: -- → P4

Taking myself off for now.

Assignee: bwerth → nobody
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: