Make D3D9SurfaceImage store data in YUV rather than RGB32

NEW
Unassigned

Status

()

Core
Graphics: Layers
P5
normal
3 years ago
2 years ago

People

(Reporter: cpearce, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: gfx-noted)

(Reporter)

Description

3 years ago
D3D9SurfaceImage stores its contents in RGB32. This is because I implemented it, and I don't know how to paint the NV12 GPU surfaces we get out of DXVA decoders using a shader or whatever.

Someone who has a clue about graphics would know however.

If we stored D3D9SurfaceImage in YUV and only converted to RGB on paint, we'd half the memory cost of storing video frames when using DXVA.

Updated

3 years ago
Priority: -- → P5
Is this an option? I was sort of under the impression that only supported conversion method was using StretchRect.
I looked into this a while back, I believe you're right. Attempting to create a new NV12 texture with DXGI sharing enabled fails, so we can't get the data to the compositor in NV12 format.

It does work if we use the D3D11 DXVA API though, so that's an option for the future.

Updated

3 years ago
Whiteboard: gfx-noted
No longer blocks: 778617
You need to log in before you can comment on or make changes to this bug.