Bug 110666 - VA-API complains about unsupported VA image format nv12
Summary: VA-API complains about unsupported VA image format nv12
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/Iris (show other bugs)
Version: 19.1
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-12 13:21 UTC by i
Modified: 2019-05-17 02:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description i 2019-05-12 13:21:39 UTC
On Arch Linux with mesa 19.1.0rc1, using MPV with hardware decoding through VA-API shows a blue screen video output with the following logs:

Using hardware decoding (vaapi).
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 1920x1080 vaapi[nv12]
[vo/gpu/vaapi-egl] unsupported VA image format nv12
[vo/gpu] Initializing texture for hardware decoding failed.

This issue can be observed with both i965_drv_video and iHD_drv_video.
Comment 1 Denis 2019-05-13 10:13:33 UTC
hi, could you please clarify how did you run mpv?
In my case - 
>mpv --hwsub=auto <path_to_video>
doesn't print this error (tested on 19.1.0-rc1 and git master).
Also provide please link to video, if this may be important.
Comment 2 i 2019-05-13 10:22:19 UTC
Since I only have an integrated graphics adapter I tried to make the build as slim as possible. Here are the configuration options I use to build mesa:

    -D b_lto=false \
    -D b_ndebug=true \
    -D platforms=x11,wayland,drm,surfaceless \
    -D dri-drivers=i965 \
    -D gallium-drivers=iris,swrast \
    -D vulkan-drivers=intel \
    -D swr-arches=avx,avx2 \
    -D dri3=true \
    -D egl=true \
    -D gallium-extra-hud=true \
    -D gallium-nine=true \
    -D gallium-omx=disabled \
    -D gallium-opencl=icd \
    -D gallium-va=false\
    -D gallium-vdpau=false \
    -D gallium-xa=false \
    -D gallium-xvmc=false \
    -D gbm=true \
    -D gles1=true \
    -D gles2=true \
    -D glvnd=true \
    -D glx=dri \
    -D libunwind=true \
    -D llvm=true \
    -D lmsensors=true \
    -D osmesa=gallium \
    -D shared-glapi=true \
    -D valgrind=false

Did I accidentally turn off any important options for hardware decoding?

The command line to run mpv is:

MESA_LOADER_DRIVER_OVERRIDE=iris mpv --no-config --hwdec=auto "https://www.youtube.com/watch?v=jKv4Pb0SEJE"
Comment 3 Denis 2019-05-13 12:02:47 UTC
thanks for clarification. Could you also specify you HW information?

I reproduced this issue only on CFL with intel UHD630.
Issue wasn't reproduced on KBL's with UHD620 (manjaro) and HD620 (ubuntu and manjaro).
Comment 4 i 2019-05-13 12:32:48 UTC
HW information:

$ lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation Iris Plus Graphics 640 (rev 06)

$ MESA_LOADER_DRIVER_OVERRIDE=iris glxinfo | grep -i opengl
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Iris Plus Graphics 640 (Kaby Lake GT3e)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.1.0-rc1
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 19.1.0-rc1
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.1.0-rc1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
Comment 5 Kenneth Graunke 2019-05-14 06:32:13 UTC
Yes, Iris doesn't support nv12 EGL image import yet.

This won't be fixed on 19.1, but I hope to fix it on master at some point.
Comment 6 Kenneth Graunke 2019-05-15 22:50:15 UTC
Hmm, actually this is working fine for me, with libva-intel-driver 2.3.0, mpv 0.29.1, and mesa master...
Comment 7 Denis 2019-05-16 07:20:53 UTC
Hi Kenneth, yes, I can confirm the same. Looks like it was fixed/implemented with this commit (at least reversed bisect pointed on it):


Author: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>  2019-04-30 21:51:52
Committer: Kenneth Graunke <kenneth@whitecape.org>  2019-05-07 23:36:08
Parent: 748f603390bdfec129bc73d3d2608db20f1571ae (gallivm: fix broken 8-wide s3tc decoding)
Branches: master, remotes/origin/master
Follows: 19.1-branchpoint
Precedes: 

    iris: support dmabuf imports with offsets
    
    this adds support for imports where the image data begins at an offset
    from the start of the buffer, as used in h/x264
    
    fixes kwg/mesa#47
Comment 8 Kenneth Graunke 2019-05-17 02:47:16 UTC
That makes sense.  Commit 4b5e8eb3c8d709bd7c6d1a33a114bf4b002548f8 from today should also help with NV12 support.

We're not backporting iris fixes to 19.1; feel free to use master.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.