WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
235951
LibWebRTCCodecs should not need to create IOSurfaces
https://bugs.webkit.org/show_bug.cgi?id=235951
Summary
LibWebRTCCodecs should not need to create IOSurfaces
youenn fablet
Reported
2022-02-01 07:20:04 PST
LibWebRTCCodecs should not need to create IOSurfaces
Attachments
Patch
(65.48 KB, patch)
2022-02-01 08:04 PST
,
youenn fablet
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(69.00 KB, patch)
2022-02-01 08:53 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(69.13 KB, patch)
2022-02-01 09:20 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(69.13 KB, patch)
2022-02-01 23:28 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(69.23 KB, patch)
2022-02-02 02:23 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-02-01 07:20:52 PST
<
rdar://problem/88326654
>
youenn fablet
Comment 2
2022-02-01 08:04:41 PST
Created
attachment 450528
[details]
Patch
youenn fablet
Comment 3
2022-02-01 08:53:34 PST
Created
attachment 450535
[details]
Patch
Eric Carlson
Comment 4
2022-02-01 09:13:55 PST
Comment on
attachment 450528
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=450528&action=review
> Source/ThirdParty/libwebrtc/ChangeLog:9 > + Introduce helper routines to copy a webrtc VideoFrame in a bufer and get a CVPixelBuffer from a webrtc VideoFrame.
s/bufer/buffer/
> Source/WebCore/platform/cocoa/SharedVideoFrameInfo.mm:187 > + if (CVPixelBufferGetWidthOfPlane(rawPixelBuffer, 1) != m_widthPlaneB || CVPixelBufferGetHeightOfPlane(rawPixelBuffer, 1) != m_heightPlaneB)
This leaves the buffer base address locked. Maybe use `makeScopeExit` to unlock instead?
youenn fablet
Comment 5
2022-02-01 09:20:33 PST
Created
attachment 450539
[details]
Patch
youenn fablet
Comment 6
2022-02-01 09:22:16 PST
(In reply to Eric Carlson from
comment #4
)
> Comment on
attachment 450528
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=450528&action=review
> > > Source/ThirdParty/libwebrtc/ChangeLog:9 > > + Introduce helper routines to copy a webrtc VideoFrame in a bufer and get a CVPixelBuffer from a webrtc VideoFrame. > > s/bufer/buffer/
Fixed
> > Source/WebCore/platform/cocoa/SharedVideoFrameInfo.mm:187 > > + if (CVPixelBufferGetWidthOfPlane(rawPixelBuffer, 1) != m_widthPlaneB || CVPixelBufferGetHeightOfPlane(rawPixelBuffer, 1) != m_heightPlaneB) > > This leaves the buffer base address locked. Maybe use `makeScopeExit` to > unlock instead?
Right, fixed!
Eric Carlson
Comment 7
2022-02-01 12:13:51 PST
Comment on
attachment 450539
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=450539&action=review
> Source/ThirdParty/libwebrtc/ChangeLog:9 > + Introduce helper routines to copy a webrtc VideoFrame in a memory buffer and get a CVPixelBuffer from a webrtc VideoFrame.
s/in a memory buffer/into a memory buffer/
> Source/WebCore/platform/cocoa/SharedVideoFrameInfo.h:79 > +
Nit: extra blank line.
> Source/WebCore/platform/cocoa/SharedVideoFrameInfo.mm:210 > + CVPixelBufferUnlockBaseAddress(rawPixelBuffer, 0);
This is unnecessary.
> Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:70 > for (auto decoder : decoders.values())
`auto&`?
> Source/WebKit/WebProcess/GPU/webrtc/SharedVideoFrame.cpp:71 > + if (!m_storage || m_storage->size() < size) {
Should we also reallocate if m_storage is (significantly?) larger than needed?
> Source/WebKit/WebProcess/GPU/webrtc/SharedVideoFrame.cpp:135 > +
Nit: extra blank
> Source/WebKit/WebProcess/GPU/webrtc/SharedVideoFrame.h:96 > +
Ditto
youenn fablet
Comment 8
2022-02-01 23:26:08 PST
> > Source/WebCore/platform/cocoa/SharedVideoFrameInfo.mm:210 > > + CVPixelBufferUnlockBaseAddress(rawPixelBuffer, 0); > > This is unnecessary.
OK
> > Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:70 > > for (auto decoder : decoders.values()) > > `auto&`?
decoder is a pointer so auto is fine here.
> > Source/WebKit/WebProcess/GPU/webrtc/SharedVideoFrame.cpp:71 > > + if (!m_storage || m_storage->size() < size) { > > Should we also reallocate if m_storage is (significantly?) larger than > needed?
Good question. I guess we should consider it. What would be a reasonable heuristic?
youenn fablet
Comment 9
2022-02-01 23:28:06 PST
Created
attachment 450616
[details]
Patch for landing
youenn fablet
Comment 10
2022-02-02 02:23:57 PST
Created
attachment 450628
[details]
Patch for landing
EWS
Comment 11
2022-02-02 05:22:11 PST
Committed
r288951
(
246680@main
): <
https://commits.webkit.org/246680@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 450628
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug