Closed Bug 1613364 Opened 4 years ago Closed 4 years ago

[Wayland] Implement YUV surfaces by WaylandDMABUFSurface

Categories

(Core :: Widget: Gtk, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

(Blocks 2 open bugs)

Details

Attachments

(7 files)

We need store decoded YUV (NV12) video images at WaylandDMABUFSurface.

Thanks but it's not the case here, we need only support for NV12 which is supported fine.

Summary: [Wayland] Implement YUV surfaces to WaylandDMABUFSurface → [Wayland] Implement YUV surfaces by WaylandDMABUFSurface

We need to export more planes in SurfaceDescriptorDMABuf and also YUV color space.

We need WaylandDMABufSurface to hold both RGBA and YUV surfaces co create WaylandDMABufSurface as a base
class and derive WaylandDMABufSurfaceRGBA from it.

Depends on D62000

WaylandDMABufSurfaceNV12 holds HW decoded video frames from VA-API in NV12 format and it's implemented
as specialization of WaylandDMABufSurface base class.

Depends on D62001

  • Update WaylandDMABUFTextureClientOGL to work with WaylandDMABufSurfaceRGBA which is used for GL/WebRender compositor
    with dmabuf texture backend.
  • Update WaylandDMABUFTextureHostOGL to work with both RGBA and NV12 surface formats.
  • Use GLTextureSource instead of EGLImageTextureSource as we need to store more than one texture there with NV12
    and pass the textures there by CreateTextureSourceForPlane().
  • Implement NV12 related function by WaylandDMABUFTextureHostOGL (color space, color range, sub-textures num).
  • Add NV12 implementation to PushResourceUpdates()/PushDisplayItems() for WebRender.

Depends on D62003

WaylandDMABufSurface/WaylandDMABufSurfaceRGBA uses textures interface instead of EGLImages so we need
to update gfx code accordingly:

  • rename CreateEGLImage() -> CreateTexture()
  • rename ReleaseEGLImage() -> ReleaseTextures()
  • rename GetGLTexture() -> GetTexture()
  • rename WaylandDMABufSurface::CreateDMABufSurface() to WaylandDMABufSurfaceRGBA::CreateDMABufSurface()

Depends on D62004

Attachment #9125768 - Attachment description: Bug 1613364 [Wayland] Include va_drmcommon.h file to build without libva headers, r?jhorak → Bug 1613364 [Wayland] Clean up WaylandDMABufSurface class, r?jhorak
Pushed by shindli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/640f0fc81c1f
[Wayland] Update SurfaceDescriptorDMABuf to export YUV surfaces, r=sotaro
https://hg.mozilla.org/integration/autoland/rev/6ea8ea6e6216
[Wayland] Derive WaylandDMABufSurfaceRGBA from WaylandDMABufSurface, r=jhorak
https://hg.mozilla.org/integration/autoland/rev/64592d09f5e4
[Wayland] Implement WaylandDMABufSurfaceNV12 to hold HW decoded video frames, r=jhorak
https://hg.mozilla.org/integration/autoland/rev/66cc62933540
[Wayland] Update RenderWaylandDMABUFTextureHostOGL to work with NV12 texture format, r=sotaro
https://hg.mozilla.org/integration/autoland/rev/cdab069b9ed9
[Wayland] Update WaylandDMABUFTextureHostOGL and WaylandDMABUFTextureClientOGL to work with NV12 format, r=sotaro
https://hg.mozilla.org/integration/autoland/rev/e4383c8d1123
[Wayland] Update gfx code to derived WaylandDMABufSurfaceRGBA class, r=sotaro
https://hg.mozilla.org/integration/autoland/rev/4e6ca0999851
[Wayland] Clean up WaylandDMABufSurface class, r=jhorak
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: