[Webkit-unassigned] [Bug 236699] New: REGRESSION (iOS 15.4b3): Catastrophic (20x) performance regression in texImage2D from mp4 video

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 16 02:23:26 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=236699

            Bug ID: 236699
           Summary: REGRESSION (iOS 15.4b3): Catastrophic (20x)
                    performance regression in texImage2D from mp4 video
           Product: WebKit
           Version: Safari 15
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Major
          Priority: P2
         Component: WebGL
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: simontaylor1 at ntlworld.com
                CC: dino at apple.com, kbr at google.com, kkinnunen at apple.com

Another major video texImage2D performance regression has appeared with iOS 15.4 beta.

Using my usual test cases from Bug 216250, featuring a 720p video:
https://tango-bravo.net/WebGLVideoPerformance/texImage2d_video.html (uses gl.RGB format and internal format)
https://tango-bravo.net/WebGLVideoPerformance/texImage2d_video_rgba.html (uses gl.RGBA format and internal format)

On an iPhone 12 Pro with iOS 15.4 beta 3, the first one results in ~60ms per frame for texImage2D and the second one is ~40ms. I've confirmed with systrace that the CPU is busy for all that time in the WebKit content process, and running on a performance core.

This is around a 20x performance regression (previously typical timings were in the 2-3ms range when CPU is running with high clocks).

---

In case it's helpful:

I know in the past some of these regressions have been caused by the compressed internal IOSurface formats - I wonder if it might be worth explicitly requesting a non-compressed format for AVPlayerItemVideoOutput / AVCaptureVideoDataOutput?

Something like this (ideally I suppose you'd pick the best match for the source video in terms of full / video range):

NSDictionary *pixBuffAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange],
                                   (id)kCVPixelBufferPixelFormatTypeKey, nil];

AVPlayerItemVideoOutput* output = [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:pixBuffAttributes];

I struggled to find much about the compressed IOSurface support, but this WWDC talk is the best reference I've seen:
https://developer.apple.com/videos/play/wwdc2021/10047/?time=1843

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220216/15ca17ce/attachment-0001.htm>


More information about the webkit-unassigned mailing list