Bug 240118 - Remove usage of PixelBufferConformer in RealtimeOutgoingVideoSourceCocoa
Summary: Remove usage of PixelBufferConformer in RealtimeOutgoingVideoSourceCocoa
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-05-05 05:21 PDT by youenn fablet
Modified: 2022-05-16 14:58 PDT (History)
13 users (show)

See Also:


Attachments
Patch (12.68 KB, patch)
2022-05-05 05:32 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (14.20 KB, patch)
2022-05-05 09:26 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (14.34 KB, patch)
2022-05-05 11:46 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].