Changeset 276478 in webkit


Ignore:
Timestamp:
Apr 22, 2021 5:56:56 PM (15 months ago)
Author:
Jean-Yves Avenard
Message:

Fix color gamut in WebRTC when using VPx software decoder.
https://bugs.webkit.org/show_bug.cgi?id=220972
<rdar://problem/73616455>

Reviewed by Youenn Fablet.

Source/WebCore:

By default, and how libwebrtc is configuring its encoders and decoder, video range levels are used
(16-235). Video range was assumed to use full range instead (0-255), causing blacks to look grey and
whites to appear washed-out.
It is theoretically possible, when using VP9 that full-range level are used. While the information
related to video levels is available at the VP9 codec level; only the color space information is
being made available in libwebrtc's public image data structure, color range isn't.
For now we can assume the default is sufficient, and a follow-up change will be submitted to libwebrtc
later on.

In memory of Dr. Alex. May he rest in peace.
Test: webrtc/video-vp8-videorange.html

  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:

(WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferPool):

LayoutTests:

  • webrtc/video-vp8-videorange-expected.txt: Added.
  • webrtc/video-vp8-videorange.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r276467 r276478  
     12021-04-22  Jean-Yves Avenard  <jya@apple.com>
     2
     3        Fix color gamut in WebRTC when using VPx software decoder.
     4        https://bugs.webkit.org/show_bug.cgi?id=220972
     5        <rdar://problem/73616455>
     6
     7        Reviewed by Youenn Fablet.
     8
     9        * webrtc/video-vp8-videorange-expected.txt: Added.
     10        * webrtc/video-vp8-videorange.html: Added.
     11
    1122021-04-22  Robert Jenner  <jenner@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r276471 r276478  
     12021-04-22  Jean-Yves Avenard  <jya@apple.com>
     2
     3        Fix color gamut in WebRTC when using VPx software decoder.
     4        https://bugs.webkit.org/show_bug.cgi?id=220972
     5        <rdar://problem/73616455>
     6
     7        Reviewed by Youenn Fablet.
     8
     9        By default, and how libwebrtc is configuring its encoders and decoder, video range levels are used
     10        (16-235). Video range was assumed to use full range instead (0-255), causing blacks to look grey and
     11        whites to appear washed-out.
     12        It is theoretically possible, when using VP9 that full-range level are used. While the information
     13        related to video levels is available at the VP9 codec level; only the color space information is
     14        being made available in libwebrtc's public image data structure, color range isn't.
     15        For now we can assume the default is sufficient, and a follow-up change will be submitted to libwebrtc
     16        later on.
     17
     18        In memory of Dr. Alex. May he rest in peace.
     19        Test: webrtc/video-vp8-videorange.html
     20
     21        * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
     22        (WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferPool):
     23
    1242021-04-22  Michael Catanzaro  <mcatanzaro@gnome.org>
    225
  • trunk/Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm

    r275033 r276478  
    9595        switch (bufferType) {
    9696        case webrtc::BufferType::I420:
    97             poolBufferType = kCVPixelFormatType_420YpCbCr8BiPlanarFullRange;
     97            poolBufferType = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
    9898            break;
    9999        case webrtc::BufferType::I010:
    100             poolBufferType = kCVPixelFormatType_420YpCbCr10BiPlanarFullRange;
     100            poolBufferType = kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange;
    101101        }
    102102        m_pixelBufferPool = createPixelBufferPool(width, height, poolBufferType);
Note: See TracChangeset for help on using the changeset viewer.