Bug 256848

Summary: VideoFrame buffer constructor doesn't respect codedWidth if visibleRect is present
Product: WebKit Reporter: Brooke Vibber <bvibber>
Component: MediaAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, jer.noble, karlcow, webkit-bug-importer, youennf
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari 16   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Drawn gradient frame with packed (16 stride) and extra bytes (32 stride) on 16x16 input, as seen in Safari 16.4
none
rendering in safari, firefox, chrome none

Brooke Vibber
Reported 2023-05-16 10:27:06 PDT
Created attachment 466363 [details] Drawn gradient frame with packed (16 stride) and extra bytes (32 stride) on 16x16 input, as seen in Safari 16.4 When creating a VideoFrame from an ArrayBuffer, if the codedWidth is wider than the provided visibleWidth, the resulting frame is corrupted in Safari, while it works as expected in Chrome. Here's a sample jsfiddle which works as expected in Chrome on my M1 MacBook Air but fails in Safari on the M1 MacBook Air, iPhone 13, and i9 MacBook Pro: https://jsfiddle.net/1tf8g04c/ I've worked around it in my case by simply producing packed frames that don't need a larger codedWidth, but this may not always be convenient.
Attachments
Drawn gradient frame with packed (16 stride) and extra bytes (32 stride) on 16x16 input, as seen in Safari 16.4 (64.33 KB, image/png)
2023-05-16 10:27 PDT, Brooke Vibber
no flags
rendering in safari, firefox, chrome (511.74 KB, image/png)
2023-05-16 18:25 PDT, Karl Dubost
no flags
Karl Dubost
Comment 1 2023-05-16 18:25:01 PDT
Created attachment 466372 [details] rendering in safari, firefox, chrome Rendering in the latest versions of STP, nightly and canary Tested on macOS 13.4 --- Safari Technology Preview 169 18616.1.12.2 Firefox Nightly 115.0a1 11523.5.10 Google Chrome Canary 115.0.5762.0 5762.0
Radar WebKit Bug Importer
Comment 2 2023-05-23 10:28:17 PDT
youenn fablet
Comment 3 2023-07-07 02:24:00 PDT
EWS
Comment 4 2023-07-07 08:30:41 PDT
Committed 265844@main (e919dcfad3da): <https://commits.webkit.org/265844@main> Reviewed commits have been landed. Closing PR #15626 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.