[vlc-devel] Decoder/Display implementation selection
Thomas Guillem
thomas at gllm.fr
Thu Jul 4 09:23:57 CEST 2019
I'm in favor of removing avcodec-hw and use only use "dec-dev" to select the hw decoder.
By default it's automatic. For example on linux, it will probe in the following order:
- VAAPI
- NVDEC
- VDPAU
If the dec-dev succeed to load one of these backend, it is very likely that the hw decoder will succeed too. So we don't have your problem on Linux.
If the user force one backend, it will try that backend and fallback to SW if the backend can't be loaded.
On Windows, you have
- D3D11
- D3D9
- NVDEC
But you need to load lavc to know the correct backend, is that right ? What I would do:
Only one decoder device module for D3D11/D3D9, linked with avcodec. This module should first load the hw decoder via lavc in order to know which backend will be used in order to set the enum vlc_decoder_device_type.
On Thu, Jul 4, 2019, at 08:49, Steve Lhomme wrote:
> On 2019-07-04 8:23, Steve Lhomme wrote:
> > The default behavior should not be an issue. It could select the decoder
> > device based on the OS and if the implementation is available. It's bit
> > heavier than the current ffmpeg VLD flavor selection as we need to open
> > system resources to know if the HW acceleration is available (and yet we
> > don't know exactly the codec/profile needed). On the other hand right
> > now we open a whole display module and then check the VLD flavor works.
> > So it would probably be done faster anyway.
>
> There's a slight difference with the current behaviour. Currently lavc
> proposes various VLD flavors and we go though each to pick the right
> decoder and end up with software decoding if none is found. If we always
> select the same "default" decoder device no matter the VLD flavor, we
> lose the possibility of trying different decoders. So the VLD flavor (or
> more likely the VLC FourCC) be passed to the decoder device creation so
> it can decide better if it's a good match or not ?
>
> If the case of NVDec, it's a full on decoder. So it will be driving the
> decoder device creation, it can also iterate through possibilities like
> lavc until it finds a match.
> _______________________________________________
> 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