[Cin] Cinelerra & GPU

Andrew Randrianasulu randrianasulu at gmail.com
Fri Apr 26 07:05:17 CEST 2019


В сообщении от Friday 26 April 2019 07:12:53 Phyllis Smith написал(а):
> Pierre: just some commentary here.
> 
> I wish it had worked better....
> >
> That is what I was afraid of.
> 
> >
> > I did a lot of tests with the same.xml file that contains 4 mixers. Each
> > time I checked both with mpeg proxies and original DNxHD sources.
> >
> When I load DNxHD sources, it falls back to using software as seen on the
> startup window:
> 
> Decoder dnxhd does not support device type vdpau.
> HW device init failed, using SW decode.
> file:/root/Downloads/DNx145_1080i_2997.gxf
>   err: Success
> 
> FFmpeg apparently can not handle dnxhd with vdpau so that would be why you
> see not speed up for those.
> 

Yeah, it seems vdpau as API only accelerate those (+may be something recently added):

vdpauinfo
display: :0   screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0

Video surface:

name   width height types
-------------------------------------------
420     8192  8192  NV12 YV12
422     8192  8192  UYVY YUYV
444     8192  8192  Y8U8V8A8 V8U8Y8A8

Decoder capabilities:

name                        level macbs width height
----------------------------------------------------
MPEG1                           0 16384  2048  2048
MPEG2_SIMPLE                    3 16384  2048  2048
MPEG2_MAIN                      3 16384  2048  2048
H264_BASELINE                  --- not supported ---
H264_MAIN                      --- not supported ---
H264_HIGH                      --- not supported ---
VC1_SIMPLE                     --- not supported ---
VC1_MAIN                       --- not supported ---
VC1_ADVANCED                   --- not supported ---
MPEG4_PART2_SP                 --- not supported ---
MPEG4_PART2_ASP                --- not supported ---
DIVX4_QMOBILE                  --- not supported ---
DIVX4_MOBILE                   --- not supported ---
DIVX4_HOME_THEATER             --- not supported ---
DIVX4_HD_1080P                 --- not supported ---
DIVX5_QMOBILE                  --- not supported ---
DIVX5_MOBILE                   --- not supported ---
DIVX5_HOME_THEATER             --- not supported ---
DIVX5_HD_1080P                 --- not supported ---
H264_CONSTRAINED_BASELINE      --- not supported ---
H264_EXTENDED                  --- not supported ---
H264_PROGRESSIVE_HIGH          --- not supported ---
H264_CONSTRAINED_HIGH          --- not supported ---
H264_HIGH_444_PREDICTIVE       --- not supported ---
HEVC_MAIN                      --- not supported ---
HEVC_MAIN_10                   --- not supported ---
HEVC_MAIN_STILL                --- not supported ---
HEVC_MAIN_12                   --- not supported ---
HEVC_MAIN_444                  --- not supported ---

I think va-api can  accelerate vp8/vp9/mjpeg (some  variants)

https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/state_trackers/va

as you can see for open-source drivers based on gallium framework (radeonsi as most advanced example)
acceleration supported for mpeg1/2,h264,hevc(h265),vc1,vp9,mjpeg

I sadly can't test new acceleration because reverse-engineered Nouveau driver for my card (nv92 GeForce 8800)
simply leaves default clocks for video decoding engines (and changig clocks on this generation of GPUs and newest ones is not simple)
So, I can only see slideshow with va-api and mpeg2 file:

CIN_HW_DEV=vaapi cin
Cinelerra Infinity - built: Apr 25 2019 18:53:16
git://git.cinelerra-gg.org/goodguy/cinelerra.git
(c) 2006-2018 Heroine Virtual Ltd. by Adam Williams
(c) 2007-2018 cin5 derivative by W.P. Morrow aka goodguy
Cinelerra is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. There is absolutely no warranty for Cinelerra.

libva info: VA-API version 0.40.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/X11R7/lib/dri/nouveau_drv_video.so
libva info: Found init function __vaDriverInit_0_40
libva info: va_openDriver() returns 0
libva info: VA-API version 0.40.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/X11R7/lib/dri/nouveau_drv_video.so
libva info: Found init function __vaDriverInit_0_40
libva info: va_openDriver() returns 0
libva info: VA-API version 0.40.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/X11R7/lib/dri/nouveau_drv_video.so
libva info: Found init function __vaDriverInit_0_40
libva info: va_openDriver() returns 0
Session time: 0:04:12
Cpu time: user: 0:00:13.844 sys: 0:00:02.309

vdpau for me result in this output:
CIN_HW_DEV=vdpau cin
Cinelerra Infinity - built: Apr 25 2019 18:53:16
git://git.cinelerra-gg.org/goodguy/cinelerra.git
(c) 2006-2018 Heroine Virtual Ltd. by Adam Williams
(c) 2007-2018 cin5 derivative by W.P. Morrow aka goodguy
Cinelerra is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. There is absolutely no warranty for Cinelerra.

Decoder mpeg2video does not support device type vdpau.
HW device init failed, using SW decode.
file:/home/guest/botva/vid/BENCHMARK/1080p25.ts
  err: Выполнено
Decoder mpeg2video does not support device type vdpau.
HW device init failed, using SW decode.
file:/home/guest/botva/vid/BENCHMARK/1080p25.ts
  err: Выполнено
IndexFile::draw_index: index has 0 zoom
IndexFile::draw_index: index has 0 zoom
IndexFile::draw_index: index has 0 zoom
IndexFile::draw_index: index has 0 zoom
audio0 pad 32 -4159 (4191)
audio0 pad 0 -2623 (2623)
audio0 pad 0 -1087 (1087)
Decoder mpeg2video does not support device type vdpau.
HW device init failed, using SW decode.
file:/home/guest/botva/vid/BENCHMARK/1080p25.ts
  err: Выполнено
Session time: 0:02:30
Cpu time: user: 0:01:25.833 sys: 0:00:17.366


I run into small problem during compilation, because libva was installed in non-standard location
(/usr/X11R7/lib) , but then adding symlink to /usr/includes from /usr/X11R7/includes/va fixed configure 
and another small hack fixed linking:

cat libva_x11r7.diff
--- configure.ac.orig   2019-04-25 16:48:18.302721570 +0300
+++ configure.ac        2019-04-25 17:09:32.994737160 +0300
@@ -889,7 +889,7 @@
 FFMPEG_EXTRA_LDFLAGS=""
 if test "x$HAVE_vaapi" = "xyes"; then
   FFMPEG_EXTRA_LDFLAGS+=' -lva'
-  EXTRA_LIBS+=' -lva'
+  EXTRA_LIBS+=' -lva -L/usr/X11R7/lib'
   WANT_VAAPI='yes'
   CFG_WANTS+=" VAAPI"
   if test "x$HAVE_vaapi_x11" = "xyes"; then


More information about the Cin mailing list