If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Add explicit strides to YCbCrImageDataSerializer

RESOLVED FIXED in mozilla29

Status

()

Core
Graphics: Layers
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Alessandro Decina, Assigned: Alessandro Decina)

Tracking

Trunk
mozilla29
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

4 years ago
Created attachment 8350909 [details] [diff] [review]
yuv-image-stride.patch

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
(Assignee)

Updated

4 years ago
Blocks: 806917
(Assignee)

Comment 1

4 years ago
Created attachment 8350911 [details] [diff] [review]
yuv-image-stride.patch

rebased
Attachment #8350909 - Attachment is obsolete: true
https://tbpl.mozilla.org/?tree=Try&rev=8da4ad156c94
(Assignee)

Comment 3

4 years ago
Created attachment 8350969 [details] [diff] [review]
bug952769.patch

same patch as before w/ updated bug# in the title
Attachment #8350911 - Attachment is obsolete: true
Attachment #8350969 - Flags: review?(nical.bugzilla)

Updated

4 years ago
Attachment #8350969 - Flags: review?(nical.bugzilla) → review+
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/05eea186ef5c
Assignee: nobody → alessandro.d
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/05eea186ef5c
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.