va-api scaling with nv50-class cards incomplete?
Submitted by Andrew Randrianasulu
Assigned to Nouveau Project
Link to original bug (#110679)
Description
Created attachment 144278 ffmpeg's output and command line
Hello!
I was trying to find answer to 'good ffmpeg commandline showing how to use scale_vaapi filter' [1], but unfortunately none of my attempts worked for me :/
Mesa/va state tarcker: glxinfo | grep OpenGL OpenGL vendor string: nouveau OpenGL renderer string: NV92 OpenGL core profile version string: 3.3 (Core Profile) Mesa 19.2.0-devel (git-4fd81617) OpenGL core profile shading language version string: 3.30 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 3.3 (Compatibility Profile) Mesa 19.2.0-devel (git-4fd81617) OpenGL shading language version string: 3.30 OpenGL context flags: (none) OpenGL profile mask: compatibility profile OpenGL extensions: OpenGL ES profile version string: OpenGL ES 3.0 Mesa 19.2.0-devel (git-4fd81617) OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00 OpenGL ES profile extensions:
vainfo: vainfo 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 vainfo: VA-API version: 0.40 (libva ) vainfo: Driver version: Mesa Gallium driver 19.2.0-devel for NV92 vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileNone : VAEntrypointVideoProc
First, I think EncSlice lines are invalid (or mesa can magically (shaders?) encode mpeg2 videos?)
Second .. ffmpeg command failed for me :/ ffmpeg -vaapi_device /dev/dri/renderD128 -benchmark -c:v libdav1d -i /mnt/sdb1/Stream2_AV1_720p_3.2mbps.webm -vf format=nv12,hwupload,scale_vaapi=w=240:h=120 -map 0:v:0 -v trace -f null - ffmpeg version N-93862-gf49cec2ba8 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 5.5.0 (GCC)
[skip]
Applying option vaapi_device (set VAAPI hardware device (DRM path or X11 display name)) with argument /dev/dri/renderD128. [AVHWDeviceContext @ 0xaef7d00] Opened VA display via DRM device /dev/dri/renderD128. 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 [AVHWDeviceContext @ 0xaef7d00] Initialised VAAPI connection: version 0.40 [AVHWDeviceContext @ 0xaef7d00] Format 0x3231564e -> nv12. [AVHWDeviceContext @ 0xaef7d00] Format 0x30313050 -> p010le. [AVHWDeviceContext @ 0xaef7d00] Format 0x36313050 -> unknown. [AVHWDeviceContext @ 0xaef7d00] Format 0x32315659 -> yuv420p. [AVHWDeviceContext @ 0xaef7d00] Format 0x56595559 -> unknown. [AVHWDeviceContext @ 0xaef7d00] Format 0x59565955 -> uyvy422. [AVHWDeviceContext @ 0xaef7d00] Format 0x41524742 -> bgra. [AVHWDeviceContext @ 0xaef7d00] Format 0x41424752 -> rgba. [AVHWDeviceContext @ 0xaef7d00] Format 0x58524742 -> bgr0. [AVHWDeviceContext @ 0xaef7d00] Format 0x58424752 -> rgb0. [AVHWDeviceContext @ 0xaef7d00] VAAPI driver: Mesa Gallium driver 19.2.0-devel for NV92. [AVHWDeviceContext @ 0xaef7d00] Driver not found in known nonstandard list, using standard behaviour.
[skip]
[Parsed_format_0 @ 0xaf4dcc0] Setting 'pix_fmts' to value 'nv12' [Parsed_scale_vaapi_2 @ 0xb005a40] Setting 'w' to value '240' [Parsed_scale_vaapi_2 @ 0xb005a40] Setting 'h' to value '120' [graph 0 input from stream 0:0 @ 0xb006300] Setting 'video_size' to value '1280x720' [graph 0 input from stream 0:0 @ 0xb006300] Setting 'pix_fmt' to value '0' [graph 0 input from stream 0:0 @ 0xb006300] Setting 'time_base' to value '1/1000' [graph 0 input from stream 0:0 @ 0xb006300] Setting 'pixel_aspect' to value '1/1' [graph 0 input from stream 0:0 @ 0xb006300] Setting 'sws_param' to value 'flags=2' [graph 0 input from stream 0:0 @ 0xb006300] Setting 'frame_rate' to value '25/1' [graph 0 input from stream 0:0 @ 0xb006300] w:1280 h:720 pixfmt:yuv420p tb:1/1000 fr:25/1 sar:1/1 sws_param:flags=2 [auto_scaler_0 @ 0xb007b40] Setting 'flags' to value 'bicubic' [auto_scaler_0 @ 0xb007b40] w:iw h:ih flags:'bicubic' interl:0 [Parsed_format_0 @ 0xaf4dcc0] auto-inserting filter 'auto_scaler_0' between the filter 'graph 0 input from stream 0:0' and the filter 'Parsed_format_0' [AVFilterGraph @ 0xaf3ed00] query_formats: 5 queried, 3 merged, 1 already done, 0 delayed [auto_scaler_0 @ 0xb007b40] w:1280 h:720 fmt:yuv420p sar:1/1 -> w:1280 h:720 fmt:nv12 sar:1/1 flags:0x4 [hwupload @ 0xaf4e200] Surface format is nv12. [AVHWFramesContext @ 0xaf4e4c0] Created surface 0x1. [AVHWFramesContext @ 0xaf4e4c0] Direct mapping disabled: deriving image does not work: 1 (operation failed). [AVHWFramesContext @ 0xb08d2c0] Created surface 0x3. [AVHWFramesContext @ 0xb08d2c0] Direct mapping disabled: deriving image does not work: 1 (operation failed). [AVHWFramesContext @ 0xb08d2c0] Created surface 0x4. [AVHWFramesContext @ 0xb08d2c0] Created surface 0x5. [AVHWFramesContext @ 0xb08d2c0] Created surface 0x6. [AVHWFramesContext @ 0xb08d2c0] Created surface 0x7. [AVHWFramesContext @ 0xb08d2c0] Created surface 0x8. [AVHWFramesContext @ 0xb08d2c0] Created surface 0x9. [AVHWFramesContext @ 0xb08d2c0] Created surface 0xa. [AVHWFramesContext @ 0xb08d2c0] Created surface 0xb. [AVHWFramesContext @ 0xb08d2c0] Created surface 0xc. [AVHWFramesContext @ 0xaf4e4c0] Map surface 0x1. [AVHWFramesContext @ 0xaf4e4c0] Unmap surface 0x1. [Parsed_scale_vaapi_2 @ 0xb005a40] Filter input: vaapi_vld, 1280x720 (0). [Parsed_scale_vaapi_2 @ 0xb005a40] Using surface 0x1 for scale input. [Parsed_scale_vaapi_2 @ 0xb005a40] Using surface 0xc for scale output. [Parsed_scale_vaapi_2 @ 0xb005a40] Pipeline parameter buffer is 0xe. [Parsed_scale_vaapi_2 @ 0xb005a40] Failed to render parameter buffer: 2 (resource allocation failed). Error while filtering: Input/output error Failed to inject frame into filter network: Input/output error Error while processing the decoded data for stream #0:0 bench: maxrss=106420kB [AVIOContext @ 0xaf40640] Statistics: 759514 bytes read, 0 seeks Conversion failed!
Ow :( [full log attached]
Note, i use libva1:
libva-1.8.3
Can libva2 be installed in parallel with libva1 ?
[1] - https://lists.cinelerra-gg.org/pipermail/cin/2019-May/000665.html
Attachment 144278, "ffmpeg's output and command line":
ffmpeg_output.log
Version: git