Add explicit strides to YCbCrImageDataSerializer

RESOLVED FIXED in mozilla29

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: alessandro.d, Assigned: alessandro.d)

Tracking

Trunk
mozilla29
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Posted patch yuv-image-stride.patch (obsolete) — Splinter Review
YCbCrImageDataSerializer (and the deserializer), assume that plane width = plane stride. That isn't always true anymore after https://bugzilla.mozilla.org/show_bug.cgi?id=928806. 

The current patch adds explicit plane strides to YCbCrImageDataSerializer, which fixes accelerated compositing of YUV images. Basic YUV rendering works fine without this patch, which is why I hadn't caught this issue before (on my system, <video> always seems to trigger basic rendering, I had to hack somewhere in nsVideoFrame to force it to get a layer - hopefully more on that in a separate bug report soon)

For reference, this is the code path that is broken without this patch (it uploads YUV frames to GL):

#0  mozilla::layers::BufferTextureHost::Upload (this=0x123d17980, aRegion=0x0) at TextureHost.cpp:459
#1  0x00000001021f4fc0 in mozilla::layers::BufferTextureHost::MaybeUpload (this=0x123d17980, aRegion=0x0) at TextureHost.cpp:432
#2  0x00000001021f51dd in mozilla::layers::BufferTextureHost::GetTextureSources (this=0x123d17980) at TextureHost.cpp:404
#3  0x00000001021eea55 in mozilla::layers::ImageHost::Composite (this=0x1225e8dc0, aEffectChain=@0x11597fb80, aOpacity=1, aTransform=@0x11597fb38, aFilter=@0x11597fb24, aClipRect=@0x11597fb28, aVisibleRegion=0x0, aLayerProperties=0x0) at ImageHost.cpp:83
#4  0x00000001021f0dcb in mozilla::layers::ImageLayerComposite::RenderLayer (this=0x11fd52c00, aClipRect=@0x11597ff10) at ImageLayerComposite.cpp:110
#5  0x00000001021f0e1f in non-virtual thunk to mozilla::layers::ImageLayerComposite::RenderLayer(nsIntRect const&) (this=0x11fd52db8, aClipRect=@0x11597ff10) at Unified_cpp_gfx_layers2.cpp:112
Blocks: 806917
Posted patch yuv-image-stride.patch (obsolete) — Splinter Review
rebased
Attachment #8350909 - Attachment is obsolete: true
same patch as before w/ updated bug# in the title
Attachment #8350911 - Attachment is obsolete: true
Attachment #8350969 - Flags: review?(nical.bugzilla)
Attachment #8350969 - Flags: review?(nical.bugzilla) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/05eea186ef5c
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.