[CinCV TNG] VA-API (intel), AMD and NVIDIA hw decoding and encoding - few links

Andrew Randrianasulu randrianasulu at gmail.com
Thu Jul 20 09:40:17 CEST 2017


Hello again.

I just wanted to back up my words about va-api/GPU-side encoding in general.

I was not accurate when I said GPU-side shaders  always closed-source. Intel 
provides assembler-type source code  to run on media parts of their GPUs:

https://github.com/01org/intel-vaapi-driver/tree/master/src/shaders/mpeg2/vld

for example. BUT this is quite specialized filed, so few outside Intel looked 
into it deep enough.

If you look at NEWS file at 
https://github.com/01org/intel-vaapi-driver/blob/master/NEWS you will notice 
lines like

.....

Version 1.8.0 - 31.Mar.2017
* Improve the quality of the H.264 encoder on SKL+ for CQP and CBR mode
* Improve the quality of the VP8 encoder on BSW+ for CQP and CBR mode
* Add support for H.264 VBR mode on SKL+
* Add support for VP8 VBR mode on BSW+
* Add support for low-power H.264 encoder on BXT and KBL
* Add support for CBR / VBR with low-power H.264 encoder on SKL+ (A HuC Firmware 
and
a HuC supported Linux kernel are required)

.....

so, while quality in 2016 was not so great - it might be improved this year, and 
it will be not end of the line!

Speaking about NVIDIA decoders ....
https://nouveau.freedesktop.org/wiki/VideoAcceleration/ - overview
http://envytools.readthedocs.io/en/latest/hw/vdec/vpe/pvp1/intro.html - just 
some sketches/docs from reverse-engineering

My bug:
https://bugs.freedesktop.org/show_bug.cgi?id=82835

I will look around for some cheapo radeon pcie card to install in second pci-e 
slot, so it will be possible to run some decoding tests on it, while using 
current NVIDIA card for display. (I already tried this setup briefly, it was 
possible to utilize decoder part of radeon 4xxx card via VDPAU/mplayer, and 
watch result on screen connected to NVIDIA card. But old 4xxx had its own share 
of...specific bugs. Not all resolutions worked. One bug with mpeg2 decode was 
fixed in mesa master  shortly after I swapped out this card (I only had it 
briefly for some testing).

this is not bug I personally run into, but it talks about some details probably 
important for video editor too, like frames vs fields:

https://bugs.freedesktop.org/show_bug.cgi?id=92220

--------------
UVD 1.0-2.1 (R6xx, RS780, RS880, RV770, RV790) - don't support decoding to 
fields
UVD 2.2 and newer (RV710, RV730, RV740, evergreen, NI, SI, CI, VI) - support 
decoding to fields
---------------


Even if Cinelerra currently has no way to utilize such features - I at least 
will able to provide some data from ffmpeg runs ..I hope? I mean mostly for 
seeing how much it takes for simple decode-> filter> download to cpu-> filter 
there -> upload back to hw with uvd as opposed to purely sw decoding (modern 
ffmpeg hopefully will allow me to construct few internal pipelines - but you 
never know fully until you try ..like with this dvc pro hd encoder bug - I was 
firmly and wrongly believing it was already fully implemented in ffmpeg, until 
I was proven otherwise, by test run and look at code)


More information about the Cinelerra mailing list