[vlc-devel] [PATCH 1/7] avcodec: va: pass the software format description to the VA

Steve Lhomme robux4 at ycbcr.xyz
Mon Oct 7 08:04:03 CEST 2019


On 2019-10-05 9:57, Rémi Denis-Courmont wrote:
> Le lauantaina 5. lokakuuta 2019, 9.56.31 EEST Steve Lhomme a écrit :
>> On 2019-10-04 16:26, Rémi Denis-Courmont wrote:
>>> Hi,
>>>
>>> Why does the decoder need to care? Isn't that a hassle for the RGB
>>> conversion shader rather than the decoding??
>>
>> Hardware decoders can only decode certain profiles. If you're out of
>> that profile it just won't work. In the case of HEVC the 4:2:2, 4:4:4
>> and 12 bits support are all in a single "profile" (Range Extension). But
>> that information alone doesn't tell much about what kind of output
>> you're getting. And some hardware decoders (newer Intel CPUs in my case)
>> only support some combination (no 12 bits for example, 4:2:2 only for 10
>> bits). The only way to know the kind of output the decoder is going to
>> require (and thus if the decoder can actually support the stream) is by
>> getting the chroma subsampling from the pixel format.
> 
> How will this work for non-avcodec based (hardware) decoders? AFAICT, we don't
> have the chroma infos early enough for probing.

It won't work in that case. That's a current limitation of nvdec.

It may be possible in the future if we parse the data ourselves (through 
the hxxx helpers) and do an asynchronous opening of nvdec. The problem 
is if we end up trying to decode something it cannot decode. We'd have 
to fallback to another decoder and lose data already parsed. So for now 
the conservative approach is used: if we are not certain we can decode, 
we don't do it.


More information about the vlc-devel mailing list