[vlc-devel] [PATCH] [RFC] decoder: add more decoder device types

Steve Lhomme robux4 at ycbcr.xyz
Tue Jun 25 06:26:31 CEST 2019


On 2019-06-24 18:51, Rémi Denis-Courmont wrote:
> Le maanantaina 24. kesäkuuta 2019, 8.31.45 EEST Steve Lhomme a écrit :
>> These are types needed to move the decoder pools that exist in various
>> display modules closer to the decoder.
>>
>> That means we need to make the decision early on which flavor of OpenGL will
>> be used before the OpenGL display module is created. Depending on the
>> platform used it could be VAAPI, VDPAU, DXVA2, OpenGL PBO (persistent and
>> non-persistent).
>>
>> And to do that we need to create the "decoder device" using the es_format_t
>> that will be decoded (so we can pick a hardware decoder or a software one),
>> which contains the codec, profile and dimensions. When any of these change
>> we will need to create a new decoder device (or check the one we have is
>> compatible).
>> ---
>>   include/vlc_codec.h | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/include/vlc_codec.h b/include/vlc_codec.h
>> index 71f3e8439f..ec5d7e32af 100644
>> --- a/include/vlc_codec.h
>> +++ b/include/vlc_codec.h
>> @@ -491,6 +491,9 @@ enum vlc_decoder_device_type
>>       VLC_DECODER_DEVICE_DXVA2,
>>       VLC_DECODER_DEVICE_D3D11VA,
>>       VLC_DECODER_DEVICE_AWINDOW,
>> +    VLC_DECODER_DEVICE_VULKAN,
>> +    VLC_DECODER_DEVICE_PBO,
>> +    VLC_DECODER_DEVICE_MMAL,
> 
> I don't see how/when OpenGL PBO or Vulkan-whatever would be used. If we have a
> hardware decoder, then it will be VAAPI or VDPAU or whatever already. And if
> we don'tm then the software decoder, won't know/care about the decoder device,
> and should anyway decode in main memory for performance reasons.

I agree the CPU memory will always be faster for CPU decoding (famous 
last words). But that's not how it's done right now so I assumed there 
was a reason for that. If there's none the code should be simplified to 
use the default CPU pool that you created as a fallback.

> Basically what Thomas wrote.
> 
> 
> I don't know about MMAL.
> 
> -- 
> Rémi Denis-Courmont
> http://www.remlab.net/
> 
> 
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list