[vlc-devel] [PATCH 09/39] display: don't store the dummy context in the display anymore

Steve Lhomme robux4 at ycbcr.xyz
Tue Oct 8 07:33:56 CEST 2019


On 2019-10-07 19:59, Rémi Denis-Courmont wrote:> Le maanantaina 7. 
lokakuuta 2019, 17.28.48 EEST Steve Lhomme a écrit :
 >> Use the one from the vout thread if it exists. We create one 
unconditionally
 >> for now not to break the current VAAPI implementation.
 >>
 >> Later the video context will come from the decoder (if any).
 >
 > Yes and that's why, for the umpteenth time, the vout display should 
not know
 > anything of the decoder device.

You can keep repeating that to yourself but that's not what we agreed 
on. As I already explained the "decoder device" hint is used to match 
what the decoder will use and what the display will use, so we can do 
little to no copy between them. So they both need to have access to that 
hint for this to work.

I also explained in a previous version of the patchset that it wasn't my 
original design, but following the discussions at the workshop it was 
clear that VAAPI would require this hint.

 > Either video context and decoder device are
 > one and the same thing, really the video buffer storage/video memory 
device,

They are not the same. As I explained during the workshop the "decoder 
device" and "video context" not only made sense but they matched 
perfectly with D3D9 and D3D11, even in the names: "decoder device" = 
ID3D11Device, "video context" = ID3D11DeviceContext.

 > and they should be unified. Or they are not the same thing, and the vout
 > display should not have to see decoder devices ever.

As said above, the hint needs to be shared to work, and that's the 
"decoder device".

And the "decoder device" and "video context" are not the same thing, as 
you can see in patches 37/39 and 38/39. Later they will also contain the 
surface pixel format in use which cannot be deduced exactly from the 
CODEC_OPAQUE chroma (which would have to grow even more to support 12/16 
bits, 4:2:2, 4:4:4, etc).

Right now a video context is created only with a matching "decoder 
device", and that's also how we can replace --avcodec-hw with --dec-dev.


More information about the vlc-devel mailing list