Bug 240118

Summary: Remove usage of PixelBufferConformer in RealtimeOutgoingVideoSourceCocoa
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, hta, jer.noble, philipj, sergio, simon.fraser, tommyw, webkit-bug-importer, youennf, youssefdevelops, y_soliman
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=240463
https://bugs.webkit.org/show_bug.cgi?id=240348
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch for landing none

Description youenn fablet 2022-05-05 05:21:34 PDT
Remove usage of PixelBufferConformer in RealtimeOutgoingVideoSourceCocoa
Comment 1 youenn fablet 2022-05-05 05:32:55 PDT
Created attachment 458867 [details]
Patch
Comment 2 youenn fablet 2022-05-05 05:33:38 PDT
<rdar://92784872>
Comment 3 Eric Carlson 2022-05-05 05:48:48 PDT
Comment on attachment 458867 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=458867&action=review

r=me once the bots are happy

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.mm:251
> +    auto result = libyuv::ARGBToI420(static_cast<uint8_t*>(CVPixelBufferGetBaseAddress(pixelBuffer)),

The function name suggests it converts BGRA to YUV, but it calls a function that seems to convert ARGB to YUV. Is this correct?
Comment 4 youenn fablet 2022-05-05 06:53:54 PDT
(In reply to Eric Carlson from comment #3)
> Comment on attachment 458867 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=458867&action=review
> 
> r=me once the bots are happy
> 
> > Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.mm:251
> > +    auto result = libyuv::ARGBToI420(static_cast<uint8_t*>(CVPixelBufferGetBaseAddress(pixelBuffer)),
> 
> The function name suggests it converts BGRA to YUV, but it calls a function
> that seems to convert ARGB to YUV. Is this correct?

Yes, this is confusing but is covered by tests.
The same confusing naming happens in RTCCVPixelBuffer toI420 method.
Comment 5 youenn fablet 2022-05-05 09:24:15 PDT
Mac-wk1 failure is legit and is due to the fact we need to pass a CVPixelBUffer to the H264 encoders instead of a webrtc buffer, I'll change this.
Comment 6 youenn fablet 2022-05-05 09:26:30 PDT
Created attachment 458879 [details]
Patch for landing
Comment 7 youenn fablet 2022-05-05 11:46:49 PDT
Created attachment 458902 [details]
Patch for landing
Comment 8 EWS 2022-05-06 01:46:04 PDT
Committed r293885 (250343@main): <https://commits.webkit.org/250343@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 458902 [details].