[UNTESTED] Highly experimental H264 support for G45/CTG#11
[UNTESTED] Highly experimental H264 support for G45/CTG#11irql-notlessorequal wants to merge 8 commits intomasterfrom
Conversation
|
Could you suggest which software might make use of this acceleration? Is it VLC, MPlayer, ffmpeg? I can see pretty clear in the |
Assuming it works (probably need to rebase the changes and add some missing patches), most software should be able to take advantage of it, Chromium is the odd one out because it is using VPP [1] (post-processing using GPU shaders) to convert the raw NV12 image you get from decoding into BGRA unlike everyone else. [1] This isn't supported on G45 because the GPU is way more limited in capabilities (to be fair it is a very old integrated graphics solution) and Intel didn't provide any shaders to do conversion with. |
This enables the code path for CTG/G45 H.264 support. Currently does nothing.
ca7b70b to
833bf93
Compare
More work is required.
Need to update the support matrix in a future commit.
6c47e93 to
5e27f28
Compare
5e27f28 to
5c668ce
Compare
|
I tried this branch $ git clone --depth 1 --branch experimental-g45-h264 https://github.com/irql-notlessorequal/intel-vaapi-driver.git
$ cd intel-vaapi-driver
$ ./autogen.sh
$ ./configure --enable-h264-ctg LIBVA_DRIVERS_PATH="$(pwd)"
$ make install -j $(nproc)
$ sudo cp i965_drv_video.so /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so$ sudo vainfoSupport for H264 is not listed. I would expect following lines My GPU is GMA 4500MHD (CTG) and I saw H264 being listed by $ inxi -GThe switch to enable H264 in CTG seems to be accepted during building $ cat config.log | grep ENABLE_CTGThis modification by Bitbucket user alium makes the H264 entry appear in At the first glance I would expect this declaration to be involved But as far as I can tell, it is set to |
|
I reached the same result while I was updating the branch and pulling in additional changes on the G45 test machine that I have, when I get a moment to set it up again I'll go figure out why it isn't exposing H264 support. |
|
This is missing some includes: --- a/src/i965_device_info.c
+++ b/src/i965_device_info.c
@@ -23,6 +23,7 @@
*
*/
+#include "sysdeps.h"
#include <stdio.h>
#include <stdlib.h>
#include "i965_drv_video.h"
--- a/src/i965_media.h
+++ b/src/i965_media.h
@@ -30,6 +30,8 @@
#ifndef _I965_MEDIA_H_
#define _I965_MEDIA_H_
+#include "sysdeps.h"
+
#include <xf86drm.h>
#include <drm.h>
#include <i915_drm.h>so that the code paths relying on With that, the expected H.264 profiles are returned: Playing a video with mpv 0.40 in Fedora 43 LXQt (miriway as the Wayland compositor): pauses for a few seconds and then the screen comes up a solid green with the audio playing.
Same result with a 480p24 H.264 video. My understanding is this needs a much larger allocation of video memory than the 32MiB provided by the BIOS but this Lenovo T400 does not have an option to change it. |
|
I've tried this with the above includes patch on my HP Touchsmart tm2 with the most favourable video memory allocation (64MB pre-allocated + 224MB DVMT) however the outcome is the same - a GPU hang followed by a green screen in mpv, no matter whether the video is 480i, 720p or 1080p Presumably this must have worked at some point, however I'm not super invested so I'll probably just stick to using the dedicated ATI HD4550 to decode video and put up with the reduced battery life that entails. |
|
I tried this with the patch above on ThinkPad T500 with QX9300 and Libreboot and i am having the same issue. I just get a green screen. |
|
There were some details in the section removed from the Arch Linux wiki on Intel graphics, in particular this November 2019 post on the guix-patches mailing list that says a 256MB video RAM allocation on a Librebooted ThinkPad T400 worked with the previous version of this patch, at least with the software stack at the time. |
I'm leaving this out for several releases since this is a mess.
My gripes with it is that:
I'm leaving this PR here for the poor souls that want to test this.
As of writing, this is using the unmodified shaders for CTG, they might work or they might not.
Please leave feedback here, or yell at me to make a dedicated issue tracker for this specific issue.
Compiling this requires setting
-Denable_h264_ctg=truein Meson or--enable-h264-ctgin Make.