Repository navigation
VP9 with transparency plays back incorrectly - #64837
webkit-commit-queue merged 1 commit into
Conversation
|
EWS run on previous version of this PR (hash b64d88f) Details |
b64d88f to
17b3e6b
Compare
|
EWS run on previous version of this PR (hash 17b3e6b) Details |
17b3e6b to
df083da
Compare
|
EWS run on previous version of this PR (hash df083da) Details |
df083da to
361707f
Compare
|
EWS run on previous version of this PR (hash 361707f) Details |
361707f to
73020d4
Compare
|
EWS run on previous version of this PR (hash 73020d4) Details |
macOS Safer C++ Build #102744 (73020d4)❌ Found 1 failing file with 10 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
iOS Safer C++ Build #21104 (73020d4)❌ Found 1 failing file with 10 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
73020d4 to
5073136
Compare
|
EWS run on previous version of this PR (hash 5073136) Details |
iOS Safer C++ Build #21173 (5073136)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
5073136 to
264853b
Compare
|
EWS run on previous version of this PR (hash 264853b) Details |
macOS Safer C++ Build #102813 (5073136)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
macOS Safer C++ Build #102828 (264853b)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
iOS Safer C++ Build #21188 (264853b)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
264853b to
07966d4
Compare
|
EWS run on previous version of this PR (hash 07966d4) Details |
macOS Safer C++ Build #102918 (07966d4)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
iOS Safer C++ Build #21278 (07966d4)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
07966d4 to
86f6d5b
Compare
|
EWS run on previous version of this PR (hash 86f6d5b) Details |
macOS Safer C++ Build #102977 (86f6d5b)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
iOS Safer C++ Build #21337 (86f6d5b)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
86f6d5b to
df91298
Compare
|
EWS run on previous version of this PR (hash df91298) Details |
|
EWS run on previous version of this PR (hash bb1d662) Details |
macOS Safer C++ Build #139086 (bb1d662)❌ Found 1 failing file with 2 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
bb1d662 to
e6a5ae0
Compare
|
EWS run on previous version of this PR (hash e6a5ae0) Details |
e6a5ae0 to
e68dd99
Compare
|
EWS run on previous version of this PR (hash e68dd99) Details |
e68dd99 to
aa54cf0
Compare
|
EWS run on previous version of this PR (hash aa54cf0) Details |
aa54cf0 to
a84faf1
Compare
|
EWS run on previous version of this PR (hash a84faf1) Details |
|
Problems with alpha playback during scrolling (when the video leaves the field of view) have been detected. The bug occurs with a vertical video file 774px x 1000px, while no issues are observed with a horizontal video file 1640px x 920px. |
|
@dorfee , could you share the videos you used to reproduce it? I was not able to reproduce it yet |
jyavenard
left a comment
There was a problem hiding this comment.
LGTM.
Please remove all those now unnecessary RetainPtr::get() calls everywhere. I pointed out of few, but there's too many to do.
a84faf1 to
3a61d75
Compare
|
EWS run on previous version of this PR (hash 3a61d75) Details |
| WTF_MAKE_STRUCT_TZONE_ALLOCATED(InFlightFrame); | ||
| MediaSamplesBlock::MediaSampleItem metadata; | ||
| // The first sequence of the block the frame was decoded from. | ||
| int64_t blockSequence { 0 }; | ||
| }; | ||
| HashMap<int64_t, InFlightFrame, DefaultHash<int64_t>, WTF::SignedWithZeroKeyHashTraits<int64_t>> m_inFlight WTF_GUARDED_BY_CAPABILITY(m_queue.get()); | ||
| HashMap<int64_t, UniqueRef<InFlightFrame>, DefaultHash<int64_t>, WTF::SignedWithZeroKeyHashTraits<int64_t>> m_inFlight WTF_GUARDED_BY_CAPABILITY(m_queue.get()); |
There was a problem hiding this comment.
@jyavenard, since we added alphaData to MediaSampleItem in this PR, the size of InFlightFrame has increased so now int64_t + InFlightFrame = 152 bytes. static_assert has failed, and it is recommended to use UniqueRef, so, I updated this place. Are you ok with it?
|
|
EWS run on previous version of this PR (hash 5394d64) Details |
|
@dorfee, I couldn’t reproduce this with the latest commit 5394d64ccd1: both of your videos keep their alpha after repeatedly scrolling them out of view and back. Your screenshot looks like a build without this patch. Could you confirm which build you tested and, if it still reproduces with this PR, share a screencast, your macOS version and the exact steps? Url of webpage could be helpful too |
|
@jyavenard, all comments are addressed and EWS is green on the latest commit, so I think this is ready for merge-queue. The merging-blocked label is left over from an earlier GTK/WPE failure that has since been fixed. About the report from @dorfee - even if it happens, it doesn’t break anything. The video just falls back to rendering without alpha, which is what Safari does today. I couldn’t reproduce it on 3 devices, so I think it’s rare. If it gets confirmed, I’ll follow up with a fix in a separate PR. |
|
EWS run on current version of this PR (hash 79c134b) Details |
https://bugs.webkit.org/show_bug.cgi?id=275908 Reviewed by Jean-Yves Avenard. WebM carries a VP9 alpha plane as a second bitstream in BlockAdditional, which nothing decoded, so a video with transparency played back opaque. Carry the plane through the parser as per-sample data, decode it in a second WebCoreDecompressionSession whose sync flags come from its own bitstream, and blend it onto the colour frame with CIBlendWithRedMask. The plane stores coverage over the whole 0-255 range, so undo the rescaling that reading it as video range applies. Tell AVFoundation the merged frame carries alpha by adding ContainsAlphaChannel and AlphaChannelMode to its format description, which is what CMVideoFormatDescriptionCreateForImageBuffer leaves out and what kept the display layer compositing the frame opaque. RenderVideo also called any frame it had an opaque foreground, which left the element's background unpainted in a backing store allocated without an alpha channel, so the area the video leaves transparent came out black on roughly half of the loads. Report the alpha channel from the WebM track's AlphaMode, known from the initialization segment, and keep the foreground opaque only for videos without one. * LayoutTests/TestExpectations: * LayoutTests/http/wpt/webcodecs/videoFrame-webglCanvasImageSource-expected.txt: * LayoutTests/media/content/video-with-alpha-10bit.webm: Added. * LayoutTests/media/content/video-with-alpha-full-range.webm: Added. * LayoutTests/media/content/video-with-alpha-midrange.webm: Added. * LayoutTests/media/content/video-with-alpha-misaligned-keyframes.webm: Added. * LayoutTests/media/content/video-with-alpha-vp8-full-range.webm: Added. * LayoutTests/media/content/video-with-alpha-vp8.webm: Added. * LayoutTests/media/video-with-alpha-10bit-expected.txt: Added. * LayoutTests/media/video-with-alpha-10bit.html: Added. * LayoutTests/media/video-with-alpha-full-range-expected.txt: Added. * LayoutTests/media/video-with-alpha-full-range.html: Added. * LayoutTests/media/video-with-alpha-midrange-expected.txt: Added. * LayoutTests/media/video-with-alpha-midrange.html: Added. * LayoutTests/media/video-with-alpha-misaligned-keyframes-expected.txt: Added. * LayoutTests/media/video-with-alpha-misaligned-keyframes.html: Added. * LayoutTests/media/video-with-alpha-vp8-expected.txt: Added. * LayoutTests/media/video-with-alpha-vp8-full-range-expected.txt: Added. * LayoutTests/media/video-with-alpha-vp8-full-range.html: Added. * LayoutTests/media/video-with-alpha-vp8.html: Added. * LayoutTests/platform/glib/TestExpectations: * LayoutTests/platform/glib/http/wpt/webcodecs/videoFrame-webglCanvasImageSource-expected.txt: Added. * Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.cpp: * Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.h: * Source/WebCore/platform/MediaSamplesBlock.h: * Source/WebCore/platform/MediaSamplesDecoder.cpp: (WebCore::MediaSamplesDecoder::decodeOnQueue): (WebCore::MediaSamplesDecoder::didDecodeVideo): * Source/WebCore/platform/MediaSamplesDecoder.h: * Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp: * Source/WebCore/platform/cocoa/CoreVideoSoftLink.h: * Source/WebCore/platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::videoFrameHasAlpha const): * Source/WebCore/platform/graphics/MediaPlayer.h: * Source/WebCore/platform/graphics/MediaPlayerPrivate.h: * Source/WebCore/platform/graphics/cocoa/CMUtilities.h: * Source/WebCore/platform/graphics/cocoa/CMUtilities.mm: (WebCore::compressedAlphaData): (WebCore::toCMSampleBuffer): (WebCore::samplesBlockFromCMSampleBuffer): * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h: * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm: (WebCore::MediaPlayerPrivateWebM::didParseInitializationData): (WebCore::MediaPlayerPrivateWebM::clearTracks): * Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp: (WebCore::WebMParser::VideoTrackData::consumeAdditionalBlockData): * Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h: * Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm: * Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.mm: (WebCore::VideoMediaSampleRenderer::initializeDecompressionSession): (WebCore::VideoMediaSampleRenderer::setResourceOwner): * Source/WebCore/platform/graphics/cocoa/VideoTrackPrivateWebM.cpp: (WebCore::VideoTrackPrivateWebM::hasAlpha const): * Source/WebCore/platform/graphics/cocoa/VideoTrackPrivateWebM.h: * Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.h: * Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm: (WebCore::vpxFrameIsKeyframe): (WebCore::createAlphaSampleBuffer): (WebCore::alphaPlaneRange): (WebCore::createMaskImage): (WebCore::mergeColorAndAlphaPixelBuffers): (WebCore::createFormatDescriptionWithAlpha): (WebCore::createSampleBufferWithPixelBuffer): (WebCore::WebCoreDecompressionSession::invalidate): (WebCore::WebCoreDecompressionSession::decodeSample): (WebCore::WebCoreDecompressionSession::decodeSampleWithAlpha): (WebCore::WebCoreDecompressionSession::compositeAlphaOntoColorFrames): (WebCore::WebCoreDecompressionSession::flush): * Source/WebCore/platform/graphics/cv/CVUtilities.mm: (WebCore::createImageFrom32BGRAPixelBuffer): * Source/WebCore/rendering/RenderVideo.cpp: (WebCore::RenderVideo::foregroundIsKnownToBeOpaqueInRect const): * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerReadyStateChanged): (WebKit::RemoteMediaPlayerProxy::mediaPlayerCharacteristicChanged): * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in: * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::updateCachedState): (WebKit::MediaPlayerPrivateRemote::videoFrameHasAlpha const): * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerState.h: * Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerState.serialization.in: Canonical link: https://commits.webkit.org/326354@main
|
Committed 326354@main (35a52d2): https://commits.webkit.org/326354@main Reviewed commits have been landed. Closing PR #64837 and removing active labels. |
🛠 🧪 jsc-debug-arm64
🧪 wpe-wk2
35a52d2
79c134b
🛠 playstation